diff --git a/.gitignore b/.gitignore index c059b261116..3aeefbafe9e 100644 --- a/.gitignore +++ b/.gitignore @@ -112,6 +112,8 @@ tests/auto/qmake/testdata/quotedfilenames/*.exe tests/auto/compilerwarnings/*.exe tests/auto/qmake/testdata/quotedfilenames/test.cpp tests/auto/qprocess/fileWriterProcess.txt +tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-cache/mime/ +tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-xml/mime/ .com.apple.timemachine.supported tests/auto/qlibrary/libmylib.so* tests/auto/qresourceengine/runtime_resource.rcc diff --git a/bin/syncqt b/bin/syncqt index 15814df3f9c..9129de053a3 100755 --- a/bin/syncqt +++ b/bin/syncqt @@ -607,22 +607,14 @@ sub loadSyncProfile { sub locateSyncProfile { my ($directory) = @_; - my $syncprofile; $directory = abs_path($directory); - while(!defined $syncprofile) { - local(*D); - if (opendir(D, $directory)) { - foreach my $file (sort readdir(D)) { - next if ($file =~ /^\.\.?$/); - $syncprofile = "$directory/$file" if ($file =~ /^sync\.profile$/); - last if (defined $syncprofile); - } - closedir(D); - } - last if (defined $syncprofile || $directory eq "/" || $directory =~ /^?:[\/\\]$/); + while (1) { + my $file = $directory."/sync.profile"; + return $file if (-e $file); + my $odir = $directory; $directory = dirname($directory); + return undef if ($directory eq $odir); } - return $syncprofile; } # check if this is an in-source build, and if so use that as the basedir too @@ -1138,6 +1130,9 @@ foreach my $lib (@modules_to_sync) { my $guard = "DEPRECATED_HEADER_" . $lib . "_" . $header; $guard =~ s/([^a-zA-Z0-9_])/_/g; + my $header_dir = dirname($header_path); + make_path($header_dir, $lib, $verbose_level); + open HEADER, ">$header_path" || die "Could not open $header_path for writing!\n"; print HEADER "#ifndef $guard\n"; print HEADER "#define $guard\n"; diff --git a/config.tests/mac/crc.test b/config.tests/mac/crc.test deleted file mode 100755 index 9cbe7bad948..00000000000 --- a/config.tests/mac/crc.test +++ /dev/null @@ -1,71 +0,0 @@ -#!/bin/sh - -SUCCESS=no -QMKSPEC=$1 -XPLATFORM=`basename "$1"` -QMAKE_CONFIG=$2 -VERBOSE=$3 -SRCDIR=$4 -OUTDIR=$5 -TEST=$6 -EXE=`basename "$6"` -ARG=$7 -shift 7 -LFLAGS="" -INCLUDEPATH="" -CXXFLAGS="" -while [ "$#" -gt 0 ]; do - PARAM=$1 - case $PARAM in - -framework) - LFLAGS="$LFLAGS -framework \"$2\"" - shift - ;; - -F*|-m*|-x*) - LFLAGS="$LFLAGS $PARAM" - CXXFLAGS="$CXXFLAGS $PARAM" - ;; - -L*|-l*|-pthread) - LFLAGS="$LFLAGS $PARAM" - ;; - -I*) - INC=`echo $PARAM | sed -e 's/^-I//'` - INCLUDEPATH="$INCLUDEPATH $INC" - ;; - -f*|-D*) - CXXFLAGS="$CXXFLAGS $PARAM" - ;; - -Qoption) - # Two-argument form for the Sun Compiler - CXXFLAGS="$CXXFLAGS $PARAM \"$2\"" - shift - ;; - *) ;; - esac - shift -done - -# debuggery -[ "$VERBOSE" = "yes" ] && echo "$DESCRIPTION auto-detection... ($*)" - -test -d "$OUTDIR/$TEST" || mkdir -p "$OUTDIR/$TEST" - -cd "$OUTDIR/$TEST" - -$MAKE distclean >/dev/null 2>&1 -"$OUTDIR/bin/qmake" -nocache -spec "$QMKSPEC" "CONFIG+=$QMAKE_CONFIG" "LIBS*=$LFLAGS" "INCLUDEPATH*=$INCLUDEPATH" "QMAKE_CXXFLAGS*=$CXXFLAGS" "QT_BUILD_TREE=$OUTDIR" "$SRCDIR/$TEST/$EXE.pro" -o "$OUTDIR/$TEST/Makefile" - -if [ "$VERBOSE" = "yes" ]; then - $MAKE -else - $MAKE >/dev/null 2>&1 -fi - - -if [ -x "$EXE" ]; then - foo=`$OUTDIR/$TEST/$EXE $ARG` - echo "$foo" -else - echo "'CUTE'" #1129665605 # == 'CUTE' -fi - diff --git a/config.tests/mac/crc/crc.pro b/config.tests/mac/crc/crc.pro deleted file mode 100644 index c3abf15759d..00000000000 --- a/config.tests/mac/crc/crc.pro +++ /dev/null @@ -1,2 +0,0 @@ -SOURCES = main.cpp -CONFIG -= app_bundle qt diff --git a/config.tests/mac/crc/main.cpp b/config.tests/mac/crc/main.cpp deleted file mode 100644 index f02177ccb74..00000000000 --- a/config.tests/mac/crc/main.cpp +++ /dev/null @@ -1,108 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the config.tests of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include -#include -#include - - -class CCRC32 -{ -public: - CCRC32() { initialize(); } - - unsigned long FullCRC(const unsigned char *sData, unsigned long ulDataLength) - { - unsigned long ulCRC = 0xffffffff; - PartialCRC(&ulCRC, sData, ulDataLength); - return(ulCRC ^ 0xffffffff); - } - - void PartialCRC(unsigned long *ulCRC, const unsigned char *sData, unsigned long ulDataLength) - { - while(ulDataLength--) { - *ulCRC = (*ulCRC >> 8) ^ ulTable[(*ulCRC & 0xFF) ^ *sData++]; - } - } - -private: - void initialize(void) - { - unsigned long ulPolynomial = 0x04C11DB7; - memset(&ulTable, 0, sizeof(ulTable)); - for(int iCodes = 0; iCodes <= 0xFF; iCodes++) { - ulTable[iCodes] = Reflect(iCodes, 8) << 24; - for(int iPos = 0; iPos < 8; iPos++) { - ulTable[iCodes] = ((ulTable[iCodes] << 1) & 0xffffffff) - ^ ((ulTable[iCodes] & (1 << 31)) ? ulPolynomial : 0); - } - - ulTable[iCodes] = Reflect(ulTable[iCodes], 32); - } - } - unsigned long Reflect(unsigned long ulReflect, const char cChar) - { - unsigned long ulValue = 0; - // Swap bit 0 for bit 7, bit 1 For bit 6, etc.... - for(int iPos = 1; iPos < (cChar + 1); iPos++) { - if(ulReflect & 1) { - ulValue |= (1ul << (cChar - iPos)); - } - ulReflect >>= 1; - } - return ulValue; - } - unsigned long ulTable[256]; // CRC lookup table array. -}; - - -int main(int argc, char **argv) -{ - CCRC32 crc; - char *name; - if (argc < 2) { - std::cerr << "usage: crc \n"; - return 0; - } else { - name = argv[1]; - } - std::cout << crc.FullCRC((unsigned char *)name, strlen(name)) << std::endl; -} diff --git a/config.tests/mac/defaultarch.test b/config.tests/mac/defaultarch.test deleted file mode 100755 index 80f244a8bb2..00000000000 --- a/config.tests/mac/defaultarch.test +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/sh - -COMPILER=$1 -VERBOSE=$2 -WORKDIR=$3 -QT_MAC_DEFAULT_ARCH= - -touch defaultarch.c - -# compile something and run 'file' on it. -if "$COMPILER" -c defaultarch.c 2>/dev/null 1>&2; then - FIlE_OUTPUT=`file defaultarch.o` - [ "$VERBOSE" = "yes" ] && echo "'file' reports compiler ($COMPILER) default architechture as: $FIlE_OUTPUT" - -fi -rm -f defaultarch.c defaultarch.o - -# detect our known archs. -if echo "$FIlE_OUTPUT" | grep '\' > /dev/null 2>&1; then - QT_MAC_DEFAULT_ARCH=x86 # configure knows it as "x86" not "i386" -fi -if echo "$FIlE_OUTPUT" | grep '\' > /dev/null 2>&1; then - QT_MAC_DEFAULT_ARCH=x86_64 -fi -if echo "$FIlE_OUTPUT" | grep '\' > /dev/null 2>&1; then - QT_MAC_DEFAULT_ARCH=ppc -fi -if echo "$FIlE_OUTPUT" | grep '\' > /dev/null 2>&1; then - QT_MAC_DEFAULT_ARCH=ppc64 -fi - -[ "$VERBOSE" = "yes" ] && echo "setting QT_MAC_DEFAULT_ARCH to \"$QT_MAC_DEFAULT_ARCH\"" -export QT_MAC_DEFAULT_ARCH diff --git a/config.tests/mac/xarch.test b/config.tests/mac/xarch.test deleted file mode 100755 index 08322a96cfa..00000000000 --- a/config.tests/mac/xarch.test +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/sh - -XARCH_SUPPORT=no -COMPILER=$1 -VERBOSE=$2 -WORKDIR=$3 - -touch xarch.c - -if "$COMPILER" -c xarch.c -Xarch_i386 -mmmx 2>/dev/null 1>&2; then - if "$COMPILER" -c xarch.c -Xarch_i386 -mmmx 2>&1 | grep "unrecognized" >/dev/null ; then - true - else - XARCH_SUPPORT=yes - fi -fi -rm -f xarch.c xarch.o - -# done -if [ "$XARCH_SUPPORT" != "yes" ]; then - [ "$VERBOSE" = "yes" ] && echo "Xarch is not supported" - exit 0 -else - [ "$VERBOSE" = "yes" ] && echo "Xarch support detected" - exit 1 -fi diff --git a/config.tests/unix/endian.test b/config.tests/unix/endian.test index 2985fd8241b..6c5c3118883 100755 --- a/config.tests/unix/endian.test +++ b/config.tests/unix/endian.test @@ -4,13 +4,14 @@ QMKSPEC=$1 VERBOSE=$2 SRCDIR=$3 OUTDIR=$4 +QMFLAGS=$5 # debuggery [ "$VERBOSE" = "yes" ] && echo "Determining machine byte-order... ($*)" # build and run a test program test -d "$OUTDIR/config.tests/unix/endian" || mkdir -p "$OUTDIR/config.tests/unix/endian" -"$OUTDIR/bin/qmake" -nocache -spec "$QMKSPEC" "QT_BUILD_TREE=$OUTDIR" "QMAKE_LFLAGS+=$SYSROOT_FLAG" "$SRCDIR/config.tests/unix/endian/endiantest.pro" -o "$OUTDIR/config.tests/unix/endian/Makefile" >/dev/null 2>&1 +"$OUTDIR/bin/qmake" -nocache -spec "$QMKSPEC" "QT_BUILD_TREE=$OUTDIR" $QMFLAGS "$SRCDIR/config.tests/unix/endian/endiantest.pro" -o "$OUTDIR/config.tests/unix/endian/Makefile" >/dev/null 2>&1 cd "$OUTDIR/config.tests/unix/endian" diff --git a/src/corelib/arch/qatomic_arm.h b/config.tests/unix/evdev/evdev.cpp similarity index 68% rename from src/corelib/arch/qatomic_arm.h rename to config.tests/unix/evdev/evdev.cpp index 3852bbb9e2c..3dddd600380 100644 --- a/src/corelib/arch/qatomic_arm.h +++ b/config.tests/unix/evdev/evdev.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtCore module of the Qt Toolkit. +** This file is part of the config.tests of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,28 +39,21 @@ ** ****************************************************************************/ -#ifndef QATOMIC_ARM_H -#define QATOMIC_ARM_H +#include -#if defined(__ARM_ARCH_7__) \ - || defined(__ARM_ARCH_7A__) \ - || defined(__ARM_ARCH_7R__) \ - || defined(__ARM_ARCH_7M__) -# define QT_ARCH_ARMV7 -# include "QtCore/qatomic_armv7.h" -#elif defined(__ARM_ARCH_6__) \ - || defined(__ARM_ARCH_6J__) \ - || defined(__ARM_ARCH_6T2__) \ - || defined(__ARM_ARCH_6Z__) \ - || defined(__ARM_ARCH_6K__) \ - || defined(__ARM_ARCH_6ZK__) \ - || defined(__ARM_ARCH_6M__) \ - || (defined(__TARGET_ARCH_ARM) && (__TARGET_ARCH_ARM-0 >= 6)) -# define QT_ARCH_ARMV6 -# include "QtCore/qatomic_armv6.h" -#else -# define QT_ARCH_ARMV5 -# include "QtCore/qatomic_armv5.h" -#endif +enum { + e1 = ABS_MT_POSITION_X, + e2 = ABS_MT_TRACKING_ID, + e3 = ABS_PRESSURE, + e4 = ABS_X, + e5 = REL_X, + e6 = SYN_REPORT, + e7 = SYN_MT_REPORT +}; -#endif // QATOMIC_ARM_H +int main() +{ + ::input_event buf[32]; + (void) buf; + return 0; +} diff --git a/config.tests/unix/evdev/evdev.pro b/config.tests/unix/evdev/evdev.pro new file mode 100644 index 00000000000..42db3912162 --- /dev/null +++ b/config.tests/unix/evdev/evdev.pro @@ -0,0 +1,2 @@ +SOURCES = evdev.cpp +CONFIG -= qt diff --git a/config.tests/unix/libudev/libudev.cpp b/config.tests/unix/libudev/libudev.cpp new file mode 100644 index 00000000000..1a08a715d88 --- /dev/null +++ b/config.tests/unix/libudev/libudev.cpp @@ -0,0 +1,49 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the config.tests of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include + +int main() +{ + udev *u = udev_new(); + udev_unref(u); + return 0; +} diff --git a/config.tests/unix/libudev/libudev.pro b/config.tests/unix/libudev/libudev.pro new file mode 100644 index 00000000000..7f571b5a6d6 --- /dev/null +++ b/config.tests/unix/libudev/libudev.pro @@ -0,0 +1,3 @@ +SOURCES = libudev.cpp +CONFIG -= qt +LIBS += -ludev diff --git a/configure b/configure index 5e78360fa68..20df77f3955 100755 --- a/configure +++ b/configure @@ -278,12 +278,6 @@ earlyArgParse() VAL=$1 fi ;; - -nacl) - shift; - VAR=nacl - VAL=$1 - ;; - -h|help|--help|-help) if [ "$VAL" = "yes" ]; then OPT_HELP="$VAL" @@ -334,15 +328,6 @@ earlyArgParse() CFG_EMBEDDED=no fi ;; - nacl) - echo "Using NaCl at $VAL." - PLATFORM_X11=no - PLATFORM_MAC=no - PLATFORM_QWS=no - CFG_NACL_PATH=$VAL - CFG_EMBEDDED=nacl - ;; - developer-build) CFG_DEV="yes" ;; @@ -727,6 +712,8 @@ CFG_XKB=auto CFG_XCB=auto CFG_XCB_LIMITED=yes CFG_WAYLAND=auto +CFG_LIBUDEV=auto +CFG_EVDEV=auto CFG_NIS=auto CFG_CUPS=auto CFG_ICONV=auto @@ -772,7 +759,6 @@ CFG_FRAMEWORK=auto CFG_MAC_ARCHS= MAC_CONFIG_TEST_COMMANDLINE= # used to make the configure tests run with the correct arch's and SDK settings CFG_MAC_DWARF2=auto -CFG_MAC_XARCH=auto CFG_MAC_HARFBUZZ=no CFG_SXE=no CFG_PREFIX_INSTALL=yes @@ -912,36 +898,6 @@ if [ -d "$relpath/src/plugins/imageformats" ]; then done fi -#------------------------------------------------------------------------------- -# Set Default NaCl options -#------------------------------------------------------------------------------- -if [ "$CFG_EMBEDDED" = "nacl" ]; then - echo "Setting NaCl options:" - echo "-static" - CFG_SHARED=no - echo "-qpa nacl" - PLATFORM_QPA=yes - echo "-fast" - OPT_FAST=yes - echo "-qconfig nacl" - CFG_QCONFIG=nacl - - if [ `uname` = "Linux" ]; then - I_FLAGS="$I_FLAGS -I${CFG_NACL_PATH}/toolchain/linux_x86/sdk/nacl-sdk/include" - L_FLAGS="$L_FLAGS -I${CFG_NACL_PATH}/toolchain/linux_x86/sdk/nacl-sdk/lib" - else - I_FLAGS="$I_FLAGS -I${CFG_NACL_PATH}/toolchain/mac_x86/sdk/nacl-sdk/include" - L_FLAGS="$L_FLAGS -I${CFG_NACL_PATH}/toolchain/mac_x86/sdk/nacl-sdk/lib" - fi - - echo "-no-mediaservices -no-sql-sqlite -nomake tests" - CFG_MEDIASERVICES=no - CFG_SQLITE=no - CFG_SQL_sqlite=no - CFG_NOBUILD_PARTS="$CFG_NOBUILD_PARTS tests" - QT_CONFIG="$QT_CONFIG nacl" -fi - #------------------------------------------------------------------------------- # parse command line arguments #------------------------------------------------------------------------------- @@ -1039,10 +995,6 @@ while [ "$#" -gt 0 ]; do VAL=$1 fi ;; - -nacl) - VAR=nacl - shift; - ;; -opengl) VAR=opengl # this option may or may not be followed by an argument @@ -1269,8 +1221,6 @@ while [ "$#" -gt 0 ]; do PLATFORM_QWS=no PLATFORM_QPA=yes ;; - nacl) - ;; sse) if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then CFG_SSE="$VAL" @@ -1355,7 +1305,7 @@ while [ "$#" -gt 0 ]; do PLATFORM_X11=yes ;; sdk) - if [ "$PLATFORM_MAC" = "yes" ]; then + if [ "$BUILD_ON_MAC" = "yes" ]; then CFG_SDK="$VAL" else UNKNOWN_OPT=yes @@ -1381,7 +1331,7 @@ while [ "$#" -gt 0 ]; do CFG_HOST_ARCH=$VAL ;; harfbuzz) - if [ "$PLATFORM_MAC" = "yes" ] && [ "$VAL" = "yes" ]; then + if [ "$BUILD_ON_MAC" = "yes" ] && [ "$VAL" = "yes" ]; then CFG_MAC_HARFBUZZ="$VAL" else UNKNOWN_OPT=yes @@ -1389,7 +1339,7 @@ while [ "$#" -gt 0 ]; do ;; framework) - if [ "$PLATFORM_MAC" = "yes" ] || [ "$PLATFORM_QPA" = "yes" ]; then + if [ "$BUILD_ON_MAC" = "yes" ]; then CFG_FRAMEWORK="$VAL" else UNKNOWN_OPT=yes @@ -1843,6 +1793,20 @@ while [ "$#" -gt 0 ]; do UNKNOWN_OPT=yes fi ;; + libudev) + if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then + CFG_LIBUDEV="$VAL" + else + UNKNOWN_OPT=yes + fi + ;; + evdev) + if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then + CFG_EVDEV="$VAL" + else + UNKNOWN_OPT=yes + fi + ;; cups) if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then CFG_CUPS="$VAL" @@ -2128,7 +2092,7 @@ while [ "$#" -gt 0 ]; do l_FLAGS="$l_FLAGS -l\"${VAL}\"" ;; add_fpath) - if [ "$PLATFORM_MAC" = "yes" ]; then + if [ "$BUILD_ON_MAC" = "yes" ]; then L_FLAGS="$L_FLAGS -F\"${VAL}\"" I_FLAGS="$I_FLAGS -F\"${VAL}\"" else @@ -2136,7 +2100,7 @@ while [ "$#" -gt 0 ]; do fi ;; add_framework) - if [ "$PLATFORM_MAC" = "yes" ]; then + if [ "$BUILD_ON_MAC" = "yes" ]; then l_FLAGS="$l_FLAGS -framework \"${VAL}\"" else UNKNOWN_OPT=yes @@ -2487,7 +2451,7 @@ if [ -z "$PLATFORM" ]; then PLATFORM_NOTES= case "$UNAME_SYSTEM:$UNAME_RELEASE" in Darwin:*) - if [ "$PLATFORM_MAC" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then + if [ "$PLATFORM_QPA" = "yes" ]; then OSX_VERSION=`uname -r | cut -d. -f1` if [ "$OSX_VERSION" -ge 11 ]; then # We're on Lion or above. Check if we have a supported Clang version @@ -2688,7 +2652,7 @@ if [ "$PLATFORM" != "$XPLATFORM" ]; then QMAKE_CONFIG="$QMAKE_CONFIG cross_compile" fi -if [ "$PLATFORM_MAC" = "yes" ]; then +if [ "$BUILD_ON_MAC" = "yes" ]; then if [ `basename $QMAKESPEC` = "macx-xcode" ] || [ `basename $XQMAKESPEC` = "macx-xcode" ]; then echo >&2 echo " Platform 'macx-xcode' should not be used when building Qt/Mac." >&2 @@ -3027,7 +2991,7 @@ if [ '!' -z "$CFG_SDK" ]; then fi # find the default framework value -if [ "$PLATFORM_MAC" = "yes" ]; then +if [ "$BUILD_ON_MAC" = "yes" ]; then if [ "$CFG_FRAMEWORK" = "auto" ]; then CFG_FRAMEWORK="$CFG_SHARED" elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then @@ -3041,9 +3005,8 @@ else fi QMAKE_CONF_COMPILER=`getQMakeConf "$XQMAKESPEC" | grep "^QMAKE_CXX[^_A-Z0-9]" | sed "s,.* *= *\(.*\)$,\1," | tail -1` -TEST_COMPILER="$CXX" -[ -z "$TEST_COMPILER" ] && TEST_COMPILER=$QMAKE_CONF_COMPILER +TEST_COMPILER=$QMAKE_CONF_COMPILER if [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then if [ -z "$TEST_COMPILER" ]; then echo "ERROR: Cannot set the compiler for the configuration tests" @@ -3051,10 +3014,6 @@ if [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then fi fi -if [ "$CFG_EMBEDDED" = "nacl" ]; then - TEST_COMPILER="nacl-gcc" -fi - SYSROOT_FLAG= if [ -n "$CFG_SYSROOT" ]; then if compilerSupportsFlag --sysroot="$CFG_SYSROOT"; then @@ -3077,7 +3036,7 @@ if [ "$CFG_PRECOMPILE" = "auto" ]; then fi #auto-detect DWARF2 on the mac -if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_DWARF2" = "auto" ]; then +if [ "$BUILD_ON_MAC" = "yes" ] && [ "$CFG_MAC_DWARF2" = "auto" ]; then if "$mactests/dwarf2.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests" ; then CFG_MAC_DWARF2=no else @@ -3141,15 +3100,8 @@ if [ "$PLATFORM_QWS" = "yes" ] && [ "$CFG_OPENGL" = "auto" ]; then CFG_OPENGL=no fi -# mac -if [ "$PLATFORM_MAC" = "yes" ]; then - if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then - CFG_OPENGL=desktop - fi -fi - # find the default framework value -if [ "$PLATFORM_MAC" = "yes" ]; then +if [ "$BUILD_ON_MAC" = "yes" ]; then if [ "$CFG_FRAMEWORK" = "auto" ]; then CFG_FRAMEWORK="$CFG_SHARED" elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then @@ -3162,18 +3114,6 @@ else CFG_FRAMEWORK=no fi -# Print a warning if configure was called with the 10.4u SDK option on Snow Leopard -# with the default mkspec. The 10.4u SDK does not support gcc 4.2. -if [ "$PLATFORM_MAC" = "yes" ] && [ '!' -z "$CFG_SDK" ]; then - # get the darwin version. 10.0.0 and up means snow leopard. - VERSION=`uname -r | tr '.' ' ' | awk '{print $1}'` - if [ "$VERSION" -gt 9 ] && [ "$CFG_SDK" == "/Developer/SDKs/MacOSX10.4u.sdk/" ] && [ "$PLATFORM" == "macx-g++" ]; then - echo - echo "WARNING: The 10.4u SDK does not support gcc 4.2. Configure with -platform macx-g++40. " - echo - fi -fi - # x11 tests are done after qmake is built @@ -3211,7 +3151,7 @@ QT_INSTALL_PREFIX=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PREFIX"` if [ -z "$QT_INSTALL_DOCS" ]; then #default if [ "$CFG_PREFIX_INSTALL" = "no" ]; then - if [ "$PLATFORM_MAC" = "yes" ]; then + if [ "$BUILD_ON_MAC" = "yes" ]; then QT_INSTALL_DOCS="/Developer/Documentation/Qt" fi fi @@ -3222,7 +3162,7 @@ QT_INSTALL_DOCS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DOCS"` if [ -z "$QT_INSTALL_HEADERS" ]; then #default if [ "$CFG_PREFIX_INSTALL" = "no" ]; then - if [ "$PLATFORM_MAC" = "yes" ]; then + if [ "$BUILD_ON_MAC" = "yes" ]; then if [ "$CFG_FRAMEWORK" = "yes" ]; then QT_INSTALL_HEADERS= fi @@ -3235,7 +3175,7 @@ QT_INSTALL_HEADERS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_HEADERS"` if [ -z "$QT_INSTALL_LIBS" ]; then #default if [ "$CFG_PREFIX_INSTALL" = "no" ]; then - if [ "$PLATFORM_MAC" = "yes" ]; then + if [ "$BUILD_ON_MAC" = "yes" ]; then if [ "$CFG_FRAMEWORK" = "yes" ]; then QT_INSTALL_LIBS="/Libraries/Frameworks" fi @@ -3247,7 +3187,7 @@ QT_INSTALL_LIBS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_LIBS"` if [ -z "$QT_INSTALL_BINS" ]; then #default if [ "$CFG_PREFIX_INSTALL" = "no" ]; then - if [ "$PLATFORM_MAC" = "yes" ]; then + if [ "$BUILD_ON_MAC" = "yes" ]; then QT_INSTALL_BINS="/Developer/Applications/Qt" fi fi @@ -3257,7 +3197,7 @@ QT_INSTALL_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_BINS"` if [ -z "$QT_INSTALL_PLUGINS" ]; then #default if [ "$CFG_PREFIX_INSTALL" = "no" ]; then - if [ "$PLATFORM_MAC" = "yes" ]; then + if [ "$BUILD_ON_MAC" = "yes" ]; then QT_INSTALL_PLUGINS="/Developer/Applications/Qt/plugins" fi fi @@ -3267,7 +3207,7 @@ QT_INSTALL_PLUGINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PLUGINS"` if [ -z "$QT_INSTALL_IMPORTS" ]; then #default if [ "$CFG_PREFIX_INSTALL" = "no" ]; then - if [ "$PLATFORM_MAC" = "yes" ]; then + if [ "$BUILD_ON_MAC" = "yes" ]; then QT_INSTALL_IMPORTS="/Developer/Applications/Qt/imports" fi fi @@ -3286,7 +3226,7 @@ fi QT_INSTALL_TRANSLATIONS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TRANSLATIONS"` if [ -z "$QT_INSTALL_SETTINGS" ]; then #default - if [ "$PLATFORM_MAC" = "yes" ]; then + if [ "$BUILD_ON_MAC" = "yes" ]; then QT_INSTALL_SETTINGS=/Library/Preferences/Qt else QT_INSTALL_SETTINGS=/etc/xdg @@ -3296,7 +3236,7 @@ QT_INSTALL_SETTINGS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_SETTINGS" if [ -z "$QT_INSTALL_EXAMPLES" ]; then #default if [ "$CFG_PREFIX_INSTALL" = "no" ]; then - if [ "$PLATFORM_MAC" = "yes" ]; then + if [ "$BUILD_ON_MAC" = "yes" ]; then QT_INSTALL_EXAMPLES="/Developer/Examples/Qt" fi fi @@ -3307,7 +3247,7 @@ QT_INSTALL_EXAMPLES=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_EXAMPLES" #tests if [ -z "$QT_INSTALL_TESTS" ]; then #default if [ "$CFG_PREFIX_INSTALL" = "no" ]; then - if [ "$PLATFORM_MAC" = "yes" ]; then + if [ "$BUILD_ON_MAC" = "yes" ]; then QT_INSTALL_TESTS="/Developer/Tests/Qt" fi fi @@ -4053,8 +3993,6 @@ if [ "$PLATFORM_QWS" = "yes" ]; then Platform="Qt for Embedded Linux" elif [ "$PLATFORM_QPA" = "yes" ]; then Platform="Qt Lighthouse" -elif [ "$PLATFORM_MAC" = "yes" ]; then - Platform="Qt for Mac OS X" elif [ "$XPLATFORM_MINGW" = "yes" ]; then Platform="Qt for Windows" elif [ '!' -z "`getQMakeConf \"$XQMAKESPEC\" | grep QMAKE_LIBS_X11 | awk '{print $3;}'`" ]; then @@ -4478,14 +4416,12 @@ if true; then ###[ '!' -f "$outpath/bin/qmake" ]; EXTRA_LFLAGS="$EXTRA_LFLAGS -lm" fi - [ -n "$CC" ] && echo "CC = $CC" >> "$mkfile" - [ -n "$CXX" ] && echo "CXX = $CXX" >> "$mkfile" if [ "$CFG_SILENT" = "yes" ]; then - [ -z "$CC" ] && setBootstrapVariable QMAKE_CC 's,QMAKE_CC.*=,CC=\@,' - [ -z "$CXX" ] && setBootstrapVariable QMAKE_CXX 's,QMAKE_CXX.*=,CXX=\@,' + setBootstrapVariable QMAKE_CC 's,QMAKE_CC.*=,CC=\@,' + setBootstrapVariable QMAKE_CXX 's,QMAKE_CXX.*=,CXX=\@,' else - [ -z "$CC" ] && setBootstrapVariable QMAKE_CC 's,QMAKE_CC,CC,' - [ -z "$CXX" ] && setBootstrapVariable QMAKE_CXX 's,QMAKE_CXX,CXX,' + setBootstrapVariable QMAKE_CC 's,QMAKE_CC,CC,' + setBootstrapVariable QMAKE_CXX 's,QMAKE_CXX,CXX,' fi setBootstrapVariable QMAKE_CFLAGS setBootstrapVariable QMAKE_CXXFLAGS 's,\$\$QMAKE_CFLAGS,\$(QMAKE_CFLAGS),' @@ -4833,7 +4769,7 @@ for _SQLDR in $CFG_SQL_AVAILABLE; do ;; odbc) if [ "$CFG_SQL_odbc" != "no" ]; then - if ( [ "$PLATFORM_MAC" != "yes" ] || [ "$XPLATFORM_MINGW" = "yes" ] ) && "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/odbc "ODBC" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then + if ( [ "$BUILD_ON_MAC" != "yes" ] || [ "$XPLATFORM_MINGW" = "yes" ] ) && "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/odbc "ODBC" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then if [ "$CFG_SQL_odbc" = "auto" ]; then CFG_SQL_odbc=plugin fi @@ -5543,7 +5479,7 @@ if [ "$PLATFORM_X11" = "yes" ]; then fi # X11 -if [ "$PLATFORM_MAC" = "yes" ]; then +if [ "$BUILD_ON_MAC" = "yes" ]; then if [ "$CFG_PHONON" != "no" ]; then # Always enable Phonon (unless it was explicitly disabled) CFG_PHONON=yes @@ -5561,9 +5497,7 @@ fi if [ "$PLATFORM_QPA" = "yes" ]; then # auto-detect OpenGL support (es2 = OpenGL ES 2.x) - if [ "$PLATFORM_MAC" = "yes" ]; then - CFG_OPENGL=desktop - elif [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then + if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengldesktop "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then CFG_OPENGL=desktop elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS; then @@ -5651,6 +5585,32 @@ if [ "$PLATFORM_QPA" = "yes" ]; then fi fi + if [ "$CFG_LIBUDEV" != "no" ]; then + if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/libudev "libudev" $L_FLAGS $I_FLAGS $l_FLAGS; then + CFG_LIBUDEV=yes + QT_CONFIG="$QT_CONFIG libudev" + elif [ "$CFG_LIBUDEV" = "yes" ]; then + echo "The libudev functionality test failed!" + exit 1 + else + CFG_LIBUDEV=no + QMakeVar add DEFINES QT_NO_LIBUDEV + fi + fi + + if [ "$CFG_EVDEV" != "no" ]; then + if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/evdev "evdev" $L_FLAGS $I_FLAGS $l_FLAGS; then + CFG_EVDEV=yes + QT_CONFIG="$QT_CONFIG evdev" + elif [ "$CFG_EVDEV" = "yes" ]; then + echo "The evdev functionality test failed!" + exit 1 + else + CFG_EVDEV=no + QMakeVar add DEFINES QT_NO_EVDEV + fi + fi + # Check we actually have X11 :-) if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xlib "XLib" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then QT_CONFIG="$QT_CONFIG xlib" @@ -5675,18 +5635,22 @@ if [ "$PLATFORM_QPA" = "yes" ]; then fi if [ "$CFG_XCB" != "no" ]; then - if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qpa/xcb "xcb" $L_FLAGS $I_FLAGS $l_FLAGS; then + if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists xcb 2>/dev/null; then + QMAKE_CFLAGS_XCB="`$PKG_CONFIG --cflags xcb 2>/dev/null`" + QMAKE_LIBS_XCB="`$PKG_CONFIG --libs xcb 2>/dev/null`" + fi + if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qpa/xcb "xcb" $L_FLAGS $I_FLAGS $l_FLAGS $QMAKE_CFLAGS_XCB $QMAKE_LIBS_XCB; then CFG_XCB=yes - if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qpa/xcb-render "xcb-render" $L_FLAGS $I_FLAGS $l_FLAGS; then + if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qpa/xcb-render "xcb-render" $L_FLAGS $I_FLAGS $l_FLAGS $QMAKE_CFLAGS_XCB $QMAKE_LIBS_XCB; then QT_CONFIG="$QT_CONFIG xcb-render" fi - if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qpa/xcb-poll-for-queued-event "xcb-poll-for-queued-event" $L_FLAGS $I_FLAGS $l_FLAGS; then + if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qpa/xcb-poll-for-queued-event "xcb-poll-for-queued-event" $L_FLAGS $I_FLAGS $l_FLAGS $QMAKE_CFLAGS_XCB $QMAKE_LIBS_XCB; then CFG_XCB_LIMITED=no QT_CONFIG="$QT_CONFIG xcb-poll-for-queued-event" fi - if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qpa/xcb-xlib "xcb-xlib" $L_FLAGS $I_FLAGS $l_FLAGS; then + if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qpa/xcb-xlib "xcb-xlib" $L_FLAGS $I_FLAGS $l_FLAGS $QMAKE_CFLAGS_XCB $QMAKE_LIBS_XCB; then QT_CONFIG="$QT_CONFIG xcb-xlib" fi @@ -5921,7 +5885,6 @@ fi # freetype support [ "x$CFG_EMBEDDED" != "xno" ] && CFG_LIBFREETYPE="$CFG_QWS_FREETYPE" -[ "x$PLATFORM_MAC" = "xyes" ] && CFG_LIBFREETYPE=no [ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_LIBFREETYPE" = "auto" ] && CFG_LIBFREETYPE=no if [ "$CFG_LIBFREETYPE" = "auto" ]; then if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/freetype "FreeType" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then @@ -5934,10 +5897,8 @@ fi if [ "$CFG_ENDIAN" = "auto" ]; then if [ "$XPLATFORM_MINGW" = "yes" ]; then CFG_ENDIAN="Q_LITTLE_ENDIAN" - elif [ "$PLATFORM_MAC" = "yes" ]; then - true #leave as auto else - "$unixtests/endian.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" + "$unixtests/endian.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" "QMAKE_LFLAGS+=$SYSROOT_FLAG" F="$?" if [ "$F" -eq 0 ]; then CFG_ENDIAN="Q_LITTLE_ENDIAN" @@ -5955,7 +5916,7 @@ if [ "$CFG_ENDIAN" = "auto" ]; then fi if [ "$CFG_HOST_ENDIAN" = "auto" ]; then - if [ "$PLATFORM_MAC" = "yes" ]; then + if [ "$BUILD_ON_MAC" = "yes" ]; then true #leave as auto else "$unixtests/endian.test" "$QMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" @@ -6298,11 +6259,30 @@ if [ "$CFG_MAC_DWARF2" = "yes" ]; then QT_CONFIG="$QT_CONFIG dwarf2" fi -# Set the default arch if there are no "-arch" arguments on the configure line -if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_ARCHS" = "" ]; then - source "$mactests/defaultarch.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests" - CFG_MAC_ARCHS=" $QT_MAC_DEFAULT_ARCH" - [ "$OPT_VERBOSE" = "yes" ] && echo "Setting Mac architechture to$CFG_MAC_ARCHS." +# Set the default Mac OS X arch if there are no "-arch" arguments on the configure line +if [ "$BUILD_ON_MAC" = "yes" ]; then + DEFAULT_ARCH="$CFG_MAC_ARCHS" + if [ -z "$DEFAULT_ARCH" ]; then + case `file "${outpath}/bin/qmake"` in + *i?86) + DEFAULT_ARCH=x86 + ;; + *x86_64) + DEFAULT_ARCH=x86_64 + ;; + *ppc|*ppc64|*) + # unsupported/unknown + ;; + esac + fi + if [ -n "$DEFAULT_ARCH" ]; then + [ "$OPT_VERBOSE" = "yes" ] && echo "Setting default Mac OS X architechture to $DEFAULT_ARCH." + QT_CONFIG="$QT_CONFIG $DEFAULT_ARCH" + QMAKE_CONFIG="$QMAKE_CONFIG $DEFAULT_ARCH" + # Make the application arch follow the Qt arch for single arch builds. + # (for multiple-arch builds, set CONFIG manually in the application .pro file) + [ `echo "$DEFAULT_ARCH" | wc -w` -eq 1 ] && QTCONFIG_CONFIG="$QTCONFIG_CONFIG $DEFAULT_ARCH" + fi fi # ### Vestige @@ -6398,12 +6378,6 @@ if [ "$PLATFORM_QPA" = "yes" ]; then rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes fi -if [ "$CFG_EMBEDDED" = "nacl" ]; then - QMAKE_CONFIG="$QMAKE_CONFIG nacl pepper" - QT_CONFIG="$QT_CONFIG nacl pepper" - rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes -fi - if [ "$XPLATFORM_MINGW" != "yes" ]; then # Do not set this here for Windows. Let qmake do it so # debug and release precompiled headers are kept separate. @@ -6446,7 +6420,6 @@ fi [ "$CFG_AVX" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG avx" [ "$CFG_IWMMXT" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG iwmmxt" [ "$CFG_NEON" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG neon" -[ "$PLATFORM_MAC" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG $CFG_MAC_ARCHS" if [ "$CFG_CLOCK_GETTIME" = "yes" ]; then QT_CONFIG="$QT_CONFIG clock-gettime" fi @@ -6512,7 +6485,7 @@ else fi -if [ "x$PLATFORM_MAC" = "xyes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then +if [ "x$BUILD_ON_MAC" = "xyes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then #On Mac we implicitly link against libz, so we #never use the 3rdparty stuff. [ "$CFG_ZLIB" = "yes" ] && CFG_ZLIB="system" @@ -7011,7 +6984,7 @@ if [ "$CFG_FRAMEWORK" = "yes" ]; then echo "#define QT_MAC_FRAMEWORK_BUILD" >>"$outpath/src/corelib/global/qconfig.h.new" fi -if [ "$PLATFORM_MAC" = "yes" ]; then +if [ "$BUILD_ON_MAC" = "yes" ]; then cat >>"$outpath/src/corelib/global/qconfig.h.new" <>"$outpath/src/corelib/global/qconfig.h.new" fi +#REDUCE_RELOCATIONS is a elf/unix only thing, so not in windows configure.exe +if [ "$CFG_REDUCE_RELOCATIONS" = "yes" ]; then + echo "#define QT_REDUCE_RELOCATIONS" >>"$outpath/src/corelib/global/qconfig.h.new" +fi + echo "" >>"$outpath/src/corelib/global/qconfig.h.new" @@ -7257,19 +7235,10 @@ else QT_CONFIG="$QT_CONFIG qt_framework" QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_framework" fi -if [ "$BUILD_ON_MAC" = "yes" ]; then - QT_CONFIG="$QT_CONFIG $CFG_MAC_ARCHS" -fi if [ "$CFG_DEV" = "yes" ]; then QT_CONFIG="$QT_CONFIG private_tests" fi -# Make the application arch follow the Qt arch for single arch builds. -# (for multiple-arch builds, set CONFIG manually in the application .pro file) -if [ `echo "$CFG_MAC_ARCHS" | wc -w` -eq 1 ]; then - QTCONFIG_CONFIG="$QTCONFIG_CONFIG $CFG_MAC_ARCHS" -fi - cat >>"$QTCONFIG.tmp" <> "$QTMODULE.tmp" # Ensure we can link to uninistalled libraries -if [ "$XPLATFORM_MINGW" != "yes" ] && [ "$CFG_EMBEDDED" != "nacl" ] && linkerSupportsFlag -rpath-link "$outpath/lib"; then +if [ "$BUILD_ON_MAC" != "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ] && linkerSupportsFlag -rpath-link "$outpath/lib"; then echo "QMAKE_LFLAGS = -Wl,-rpath-link,\$\$QT_BUILD_TREE/lib \$\$QMAKE_LFLAGS" >> "$QTMODULE.tmp" fi if [ -n "$QT_CFLAGS_PSQL" ]; then @@ -7372,11 +7340,6 @@ if [ '!' -z "$CFG_SDK" ]; then echo "QMAKE_MAC_SDK = $CFG_SDK" >> "$QTMODULE.tmp" fi -# mac gcc -Xarch support -if [ "$CFG_MAC_XARCH" = "no" ]; then - echo "QMAKE_MAC_XARCH = no" >> "$QTMODULE.tmp" -fi - # cmdline args cat "$QMAKE_VARS_FILE" >> "$QTMODULE.tmp" rm -f "$QMAKE_VARS_FILE" 2>/dev/null @@ -7655,7 +7618,7 @@ elif [ "$CFG_OPENSSL" = "linked" ]; then fi echo "OpenSSL support ........ $CFG_OPENSSL $OPENSSL_LINKAGE" echo "Alsa support ........... $CFG_ALSA" -if [ "$PLATFORM_MAC" = "yes" ]; then +if [ "$BUILD_ON_MAC" = "yes" ]; then echo "CoreWlan support ....... $CFG_COREWLAN" fi echo "libICU support ......... $CFG_ICU" @@ -7687,7 +7650,7 @@ if [ "$CFG_OPENSSL" = "linked" ] && [ "$OPENSSL_LIBS" = "" ]; then echo " OPENSSL_LIBS='-L/opt/ssl/lib -lssl -lcrypto' ./configure -openssl-linked" echo fi -if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_DEBUG" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "no" ]; then +if [ "$BUILD_ON_MAC" = "yes" ] && [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_DEBUG" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "no" ]; then echo echo "Error: debug-only framework builds are not supported. Configure with -no-framework" echo "if you want a pure debug build." diff --git a/configure.bat b/configure.bat new file mode 100644 index 00000000000..e872de27972 --- /dev/null +++ b/configure.bat @@ -0,0 +1,121 @@ +::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +:: +:: Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +:: Contact: http://www.qt-project.org/ +:: +:: This file is part of the tools applications of the Qt Toolkit. +:: +:: $QT_BEGIN_LICENSE:LGPL$ +:: GNU Lesser General Public License Usage +:: 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. +:: +:: GNU General Public License Usage +:: Alternatively, this file may be used under the terms of the GNU General +:: Public License version 3.0 as published by the Free Software Foundation +:: and appearing in the file LICENSE.GPL included in the packaging of this +:: file. Please review the following information to ensure the GNU General +:: Public License version 3.0 requirements will be met: +:: http://www.gnu.org/copyleft/gpl.html. +:: +:: Other Usage +:: Alternatively, this file may be used in accordance with the terms and +:: conditions contained in a signed written agreement between you and Nokia. +:: +:: +:: +:: +:: +:: +:: $QT_END_LICENSE$ +:: +::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: + +@echo off +set QTSRC=%~dp0 +set QTDIR=%CD% +if exist configure.exe goto conf +echo Please wait while bootstrapping configure ... + +for %%C in (cl.exe icl.exe g++.exe perl.exe) do set %%C=%%~$PATH:C + +set nosyncqt= +if not exist include ( + if "%perl.exe%" == "" ( + echo Perl not found in PATH. Aborting. >&2 + exit /b 1 + ) + if not exist mkspecs ( + md mkspecs + if errorlevel 1 goto exit + ) + perl %QTSRC%bin\syncqt -outdir %QTDIR% %QTSRC% + if errorlevel 1 goto exit + set nosyncqt=-no-syncqt +) + +if not exist src\corelib\global\qconfig.h ( + if not exist src\corelib\global ( + md src\corelib\global + if errorlevel 1 goto exit + ) + echo #define Q_BIG_ENDIAN 4321 > src\corelib\global\qconfig.h + echo #define Q_LITTLE_ENDIAN 1234 >> src\corelib\global\qconfig.h + echo #define Q_BYTE_ORDER Q_LITTLE_ENDIAN >> src\corelib\global\qconfig.h +) + +if not exist tools\configure ( + md tools\configure + if errorlevel 1 goto exit +) +cd tools\configure +if errorlevel 1 goto exit + +echo #### Generated by configure.bat - DO NOT EDIT! ####> Makefile +echo/>> Makefile +for /f "tokens=3 usebackq" %%V in (`findstr QT_VERSION_STR %QTSRC%\src\corelib\global\qglobal.h`) do @echo QTVERSION = %%~V>> Makefile +if not "%cl.exe%" == "" ( + echo CXX = cl>>Makefile + echo EXTRA_CXXFLAGS =>>Makefile + rem This must have a trailing space. + echo QTSRC = %QTSRC% >> Makefile + set tmpl=win32 + set make=nmake +) else if not "%icl.exe%" == "" ( + echo CXX = icl>>Makefile + echo EXTRA_CXXFLAGS = /Zc:forScope>>Makefile + rem This must have a trailing space. + echo QTSRC = %QTSRC% >> Makefile + set tmpl=win32 + set make=nmake +) else if not "%g++.exe%" == "" ( + echo CXX = g++>>Makefile + echo EXTRA_CXXFLAGS =>>Makefile + rem This must NOT have a trailing space. + echo QTSRC = %QTSRC:\=/%>> Makefile + set tmpl=mingw + set make=mingw32-make +) else ( + echo No suitable compiler found in PATH. Aborting. >&2 + cd ..\.. + exit /b 1 +) +echo/>> Makefile +type %QTSRC%tools\configure\Makefile.%tmpl% >> Makefile + +%make% +if errorlevel 1 (cd ..\.. & exit /b 1) + +cd ..\.. + +:conf +configure.exe -srcdir %QTSRC% %nosyncqt% %* +:exit diff --git a/configure.exe b/configure.exe deleted file mode 100644 index e27966e3cd6..00000000000 Binary files a/configure.exe and /dev/null differ diff --git a/dist/changes-5.0.0 b/dist/changes-5.0.0 index e73ecc50eef..6ec968a059c 100644 --- a/dist/changes-5.0.0 +++ b/dist/changes-5.0.0 @@ -52,9 +52,16 @@ information about a particular change. in Qt4, so these methods return a bool now. If your code used the undocumented QBool, simply replace it with bool. -- QMetaType::construct() has been renamed to QMetaType::create(). +- QMetaType: + * QMetaType::construct() has been renamed to QMetaType::create(). + * QMetaType::unregisterType() has been removed. - QTestLib: + * The plain-text, xml and lightxml test output formats have been changed to + show a test result for every row of test data in data-driven tests. In + Qt4, only fails and skips were shown for individual data rows and passes + were not shown for individual data rows, preventing accurate calculation + of test run rates and pass rates. * The QTRY_VERIFY and QTRY_COMPARE macros have been moved into QTestLib. These macros formerly lived in tests/shared/util.h but are now provided by including the header. In addition, @@ -93,8 +100,9 @@ information about a particular change. text(Text t, int child) -> text(Text t), rect(int child) -> rect() setText(Text t, int child, const QString &text) -> setText(Text t, const QString &text) role(int child) -> role(), state(int child) -> state() - relationTo(int child, const QAccessibleInterface *other, int otherChild) -> - relationTo(const QAccessibleInterface *other) + * parent() and child() was added in order to do hierarchical navigation. + * relations() was added as a replacement to relationTo() + * As a consequence of the above two points, navigate() was removed. * Accessible-Action related functions have been removed. QAccessibleInterface subclasses are expected to implement the QAccessibleActionInterface instead. These functions have been removed: @@ -127,10 +135,16 @@ information about a particular change. * QWidget *widget() has been removed and is replaced by QObject *target() in order to avoid QWidget dependencies. + * QEvent::TouchCancel has been introduced. On systems where it makes + sense this event type can be used to differentiate between a + regular TouchEnd and abrupt touch sequence cancellations caused by + the compositor, for example when a system gesture gets recognized. + - QMetaType - * It is no longer possible to use Q_DECLARE_METATYPE(Foo*) where Foo is only - forward declared - it must be fully defined. + * Q_DECLARE_METATYPE(Foo*) now requires that Foo is fully defined. In + cases where a forward declared type should be used as a metatype, + Q_DECLARE_OPAQUE_POINTER(Foo*) can be used to allow that. - QItemEditorFactory @@ -207,6 +221,8 @@ information about a particular change. - QSystemLocale has been removed from the public API. +- QSqlQueryModel::indexInQuery() is now virtual. See note below under QSql. + **************************************************************************** * General * **************************************************************************** @@ -333,6 +349,38 @@ QTestLib * [QTBUG-20615] Autotests can now log test output to multiple destinations and log formats simultaneously. +QtSql +----- +QSqlTableModel/QSqlRelationalTableModel + +* The dataChanged() signal is now emitted for changes made to an inserted +record that has not yet been committed. Previously, dataChanged() was +suppressed in this case for OnRowChange and OnFieldChange. This was probably +an attempt to avoid trouble if setData() was called while handling +primeInsert(). By emitting dataChanged(), we ensure that all views are aware +of the change. + +* While handling primeInsert() signal, the record must be manipulated using +the provided reference. Do not attempt to manipulate the records using the +model methods setData() or setRecord(). + +* removeRows() no longer emits extra beforeDelete signal for out of range row. + +* removeRows() now requires the whole range of targetted rows to be valid +before doing anything. Previously, it would remove what it could and +ignore the rest of the range. + +* setRecord() and insertRecord() + -Only use fields where generated flag is set to true. This is + is consistent with the meaning of the flag. + -Require all fields to map correctly. Previously fields that didn't + map were simply ignored. + -For OnManualSubmit, insertRecord() no longer leaves behind an empty + row if setRecord() fails. + +* QSqlQueryModel::indexInQuery() is now virtual. See +QSqlTableModel::indexInQuery() as example of how to implement in a +subclass. **************************************************************************** * Database Drivers * @@ -444,6 +492,13 @@ Qt for Windows CE cause an abort(). +- QVariant + + * Definition of QVariant::UserType changed. Currently it is the same as + QMetaType::User, which means that it points to the first registered custom + type, instead of a nonexistent type. + + - QMessageBox * The static function QMessageBox::question has changed the default argument diff --git a/doc/src/examples/dirview.qdoc b/doc/src/examples/dirview.qdoc index 329f90e6979..a4b799678a1 100644 --- a/doc/src/examples/dirview.qdoc +++ b/doc/src/examples/dirview.qdoc @@ -30,7 +30,7 @@ \title Dir View Example The Dir View example shows a tree view onto the local filing system. It uses the - QDirModel class to provide supply file and directory information. + QDirModel class to provide file and directory information. \image dirview-example.png */ diff --git a/doc/src/examples/editabletreemodel.qdoc b/doc/src/examples/editabletreemodel.qdoc index 20d9efccd70..306295842eb 100644 --- a/doc/src/examples/editabletreemodel.qdoc +++ b/doc/src/examples/editabletreemodel.qdoc @@ -48,14 +48,15 @@ As described in the \l{Model Subclassing Reference}, models must provide implementations for the standard set of model functions: \l{QAbstractItemModel::}{flags()}, \l{QAbstractItemModel::}{data()}, - \l{QAbstractItemModel::}{headerData()}, and + \l{QAbstractItemModel::}{headerData()}, + \l{QAbstractItemModel::}{columnCount()}, and \l{QAbstractItemModel::}{rowCount()}. In addition, hierarchical models, such as this one, need to provide implementations of \l{QAbstractItemModel::}{index()} and \l{QAbstractItemModel::}{parent()}. An editable model needs to provide implementations of \l{QAbstractItemModel::}{setData()} and - \l{QAbstractItemModel::}{headerData()}, and must return a suitable + \l{QAbstractItemModel::}{setHeaderData()}, and must return a suitable combination of flags from its \l{QAbstractItemModel::}{flags()} function. Since this example allows the dimensions of the model to be changed, diff --git a/doc/src/network/files-and-resources/resources.qdoc b/doc/src/network/files-and-resources/resources.qdoc index 847f086bee8..1d0fc51631b 100644 --- a/doc/src/network/files-and-resources/resources.qdoc +++ b/doc/src/network/files-and-resources/resources.qdoc @@ -101,8 +101,8 @@ In this case, the file is accessible as \c :/myresources/cut-img.png. - Some resources, such as translation files and icons, many need to - change based on the user's locale. This is done by adding a \c lang + Some resources need to change based on the user's locale, + such as translation files or icons. This is done by adding a \c lang attribute to the \c qresource tag, specifying a suitable locale string. For example: diff --git a/doc/src/snippets/code/src_corelib_kernel_qmetatype.cpp b/doc/src/snippets/code/src_corelib_kernel_qmetatype.cpp index b1e5df90019..9d72c425045 100644 --- a/doc/src/snippets/code/src_corelib_kernel_qmetatype.cpp +++ b/doc/src/snippets/code/src_corelib_kernel_qmetatype.cpp @@ -73,7 +73,7 @@ MyStruct s2 = var.value(); //! [3] int id = QMetaType::type("MyClass"); -if (id == 0) { +if (id != 0) { void *myClassPtr = QMetaType::create(id); ... QMetaType::destroy(id, myClassPtr); diff --git a/doc/src/snippets/code/src_corelib_mimetype_qmimedatabase.cpp b/doc/src/snippets/code/src_corelib_mimetype_qmimedatabase.cpp new file mode 100644 index 00000000000..e59a96b87a3 --- /dev/null +++ b/doc/src/snippets/code/src_corelib_mimetype_qmimedatabase.cpp @@ -0,0 +1,47 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** 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$ +** +****************************************************************************/ + +//! [0] +QMimeDatabase db; +QMimeType mime = db.mimeTypeForFile(fileName); +if (mime.inherits("text/plain")) { + // The file is plain text, we can display it in a QTextEdit +} +//! [0] diff --git a/doc/src/snippets/code/src_corelib_thread_qmutex.cpp b/doc/src/snippets/code/src_corelib_thread_qmutex.cpp index 84fe348eb24..f5fbeb8419a 100644 --- a/doc/src/snippets/code/src_corelib_thread_qmutex.cpp +++ b/doc/src/snippets/code/src_corelib_thread_qmutex.cpp @@ -114,8 +114,8 @@ int complexFunction(int flag) switch (flag) { case 0: case 1: - mutex.unlock(); - return moreComplexFunction(flag); + retVal = moreComplexFunction(flag); + break; case 2: { int status = anotherFunction(); diff --git a/doc/src/snippets/code/src_gui_accessible_qaccessible.cpp b/doc/src/snippets/code/src_gui_accessible_qaccessible.cpp index 52d40d90384..f12f55051e0 100644 --- a/doc/src/snippets/code/src_gui_accessible_qaccessible.cpp +++ b/doc/src/snippets/code/src_gui_accessible_qaccessible.cpp @@ -38,15 +38,6 @@ ** ****************************************************************************/ -//! [0] -QAccessibleInterface *child = 0; -int targetChild = object->navigate(Accessible::Child, 1, &child); -if (child) { - // ... - delete child; -} -//! [0] - //! [1] typedef QAccessibleInterface* myFactoryFunction(const QString &key, QObject *); //! [1] diff --git a/doc/src/snippets/sqldatabase/sqldatabase.cpp b/doc/src/snippets/sqldatabase/sqldatabase.cpp index 305c79e6ea3..81f806309af 100644 --- a/doc/src/snippets/sqldatabase/sqldatabase.cpp +++ b/doc/src/snippets/sqldatabase/sqldatabase.cpp @@ -284,12 +284,12 @@ void QSqlTableModel_snippets() model->setTable("employee"); model->setEditStrategy(QSqlTableModel::OnManualSubmit); model->select(); - model->removeColumn(0); // don't show the ID model->setHeaderData(0, Qt::Horizontal, tr("Name")); model->setHeaderData(1, Qt::Horizontal, tr("Salary")); QTableView *view = new QTableView; view->setModel(model); + view->hideColumn(0); // don't show the ID view->show(); //! [24] diff --git a/doc/src/sql/sql-programming/sql-driver.qdoc b/doc/src/sql/sql-programming/sql-driver.qdoc index 994d31f43f7..667b9eba54e 100644 --- a/doc/src/sql/sql-programming/sql-driver.qdoc +++ b/doc/src/sql/sql-programming/sql-driver.qdoc @@ -494,7 +494,7 @@ \snippet doc/src/snippets/code/doc_src_sql-driver.qdoc 15 Users of MinGW may wish to consult the following online document: - \l{Compiling PostgreSQL On Native Win32 FAQ}. + \l{PostgreSQL MinGW/Native Windows}. \bold{Note:} This database plugin is not supported for Windows CE. diff --git a/examples/network/fortuneclient/client.cpp b/examples/network/fortuneclient/client.cpp index 01048f137d4..fe16554eae9 100644 --- a/examples/network/fortuneclient/client.cpp +++ b/examples/network/fortuneclient/client.cpp @@ -51,26 +51,35 @@ Client::Client(QWidget *parent) hostLabel = new QLabel(tr("&Server name:")); portLabel = new QLabel(tr("S&erver port:")); - // find out which IP to connect to - QString ipAddress; - QList ipAddressesList = QNetworkInterface::allAddresses(); - // use the first non-localhost IPv4 address - for (int i = 0; i < ipAddressesList.size(); ++i) { - if (ipAddressesList.at(i) != QHostAddress::LocalHost && - ipAddressesList.at(i).toIPv4Address()) { - ipAddress = ipAddressesList.at(i).toString(); - break; - } + hostCombo = new QComboBox; + hostCombo->setEditable(true); + // find out name of this machine + QString name = QHostInfo::localHostName(); + if (!name.isEmpty()) { + hostCombo->addItem(name); + QString domain = QHostInfo::localDomainName(); + if (!domain.isEmpty()) + hostCombo->addItem(name + QChar('.') + domain); + } + if (name != QString("localhost")) + hostCombo->addItem(QString("localhost")); + // find out IP addresses of this machine + QList ipAddressesList = QNetworkInterface::allAddresses(); + // add non-localhost addresses + for (int i = 0; i < ipAddressesList.size(); ++i) { + if (!ipAddressesList.at(i).isLoopback()) + hostCombo->addItem(ipAddressesList.at(i).toString()); + } + // add localhost addresses + for (int i = 0; i < ipAddressesList.size(); ++i) { + if (ipAddressesList.at(i).isLoopback()) + hostCombo->addItem(ipAddressesList.at(i).toString()); } - // if we did not find one, use IPv4 localhost - if (ipAddress.isEmpty()) - ipAddress = QHostAddress(QHostAddress::LocalHost).toString(); - hostLineEdit = new QLineEdit(ipAddress); portLineEdit = new QLineEdit; portLineEdit->setValidator(new QIntValidator(1, 65535, this)); - hostLabel->setBuddy(hostLineEdit); + hostLabel->setBuddy(hostCombo); portLabel->setBuddy(portLineEdit); statusLabel = new QLabel(tr("This examples requires that you run the " @@ -90,7 +99,7 @@ Client::Client(QWidget *parent) tcpSocket = new QTcpSocket(this); //! [1] - connect(hostLineEdit, SIGNAL(textChanged(QString)), + connect(hostCombo, SIGNAL(editTextChanged(QString)), this, SLOT(enableGetFortuneButton())); connect(portLineEdit, SIGNAL(textChanged(QString)), this, SLOT(enableGetFortuneButton())); @@ -107,7 +116,7 @@ Client::Client(QWidget *parent) QGridLayout *mainLayout = new QGridLayout; mainLayout->addWidget(hostLabel, 0, 0); - mainLayout->addWidget(hostLineEdit, 0, 1); + mainLayout->addWidget(hostCombo, 0, 1); mainLayout->addWidget(portLabel, 1, 0); mainLayout->addWidget(portLineEdit, 1, 1); mainLayout->addWidget(statusLabel, 2, 0, 1, 2); @@ -150,7 +159,7 @@ void Client::requestNewFortune() blockSize = 0; tcpSocket->abort(); //! [7] - tcpSocket->connectToHost(hostLineEdit->text(), + tcpSocket->connectToHost(hostCombo->currentText(), portLineEdit->text().toInt()); //! [7] } @@ -224,7 +233,7 @@ void Client::displayError(QAbstractSocket::SocketError socketError) void Client::enableGetFortuneButton() { getFortuneButton->setEnabled((!networkSession || networkSession->isOpen()) && - !hostLineEdit->text().isEmpty() && + !hostCombo->currentText().isEmpty() && !portLineEdit->text().isEmpty()); } diff --git a/examples/network/fortuneclient/client.h b/examples/network/fortuneclient/client.h index 6e65e6e021c..dc652514762 100644 --- a/examples/network/fortuneclient/client.h +++ b/examples/network/fortuneclient/client.h @@ -45,6 +45,7 @@ #include QT_BEGIN_NAMESPACE +class QComboBox; class QDialogButtonBox; class QLabel; class QLineEdit; @@ -71,7 +72,7 @@ private slots: private: QLabel *hostLabel; QLabel *portLabel; - QLineEdit *hostLineEdit; + QComboBox *hostCombo; QLineEdit *portLineEdit; QLabel *statusLabel; QPushButton *getFortuneButton; diff --git a/mkspecs/common/gcc-base.conf b/mkspecs/common/gcc-base.conf index 0e906663502..28e3b87b5d8 100644 --- a/mkspecs/common/gcc-base.conf +++ b/mkspecs/common/gcc-base.conf @@ -39,6 +39,7 @@ QMAKE_CFLAGS_RELEASE += -O2 QMAKE_CFLAGS_DEBUG += -g QMAKE_CFLAGS_SHLIB += -fPIC QMAKE_CFLAGS_STATIC_LIB += -fPIC +QMAKE_CFLAGS_APP += -fPIE QMAKE_CFLAGS_YACC += -Wno-unused -Wno-parentheses QMAKE_CFLAGS_HIDESYMS += -fvisibility=hidden @@ -50,6 +51,7 @@ QMAKE_CXXFLAGS_RELEASE += $$QMAKE_CFLAGS_RELEASE QMAKE_CXXFLAGS_DEBUG += $$QMAKE_CFLAGS_DEBUG QMAKE_CXXFLAGS_SHLIB += $$QMAKE_CFLAGS_SHLIB QMAKE_CXXFLAGS_STATIC_LIB += $$QMAKE_CFLAGS_STATIC_LIB +QMAKE_CXXFLAGS_APP += $$QMAKE_CFLAGS_APP QMAKE_CXXFLAGS_YACC += $$QMAKE_CFLAGS_YACC QMAKE_CXXFLAGS_HIDESYMS += $$QMAKE_CFLAGS_HIDESYMS -fvisibility-inlines-hidden diff --git a/mkspecs/common/linux.conf b/mkspecs/common/linux.conf index de28ec7d1fc..f8f007bada6 100644 --- a/mkspecs/common/linux.conf +++ b/mkspecs/common/linux.conf @@ -7,12 +7,12 @@ QMAKE_CXXFLAGS_THREAD += $$QMAKE_CFLAGS_THREAD QMAKE_INCDIR = QMAKE_LIBDIR = -QMAKE_INCDIR_X11 = /usr/X11R6/include -QMAKE_LIBDIR_X11 = /usr/X11R6/lib +QMAKE_INCDIR_X11 = +QMAKE_LIBDIR_X11 = QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS] QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS] -QMAKE_INCDIR_OPENGL = /usr/X11R6/include -QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib +QMAKE_INCDIR_OPENGL = +QMAKE_LIBDIR_OPENGL = QMAKE_INCDIR_OPENGL_ES1 = $$QMAKE_INCDIR_OPENGL QMAKE_LIBDIR_OPENGL_ES1 = $$QMAKE_LIBDIR_OPENGL QMAKE_INCDIR_OPENGL_ES2 = $$QMAKE_INCDIR_OPENGL @@ -42,6 +42,10 @@ QMAKE_LIBDIR_WAYLAND = QMAKE_DEFINES_WAYLAND = QMAKE_WAYLAND_SCANNER = wayland-scanner +QMAKE_CFLAGS_XCB = +QMAKE_LIBS_XCB = +QMAKE_DEFINES_XCB = + QMAKE_MOC = $$[QT_INSTALL_BINS]/moc QMAKE_UIC = $$[QT_INSTALL_BINS]/uic diff --git a/mkspecs/features/create_cmake.prf b/mkspecs/features/create_cmake.prf index 0a14b5cea46..3ae4ddc83b5 100644 --- a/mkspecs/features/create_cmake.prf +++ b/mkspecs/features/create_cmake.prf @@ -29,13 +29,17 @@ CMAKE_BIN_DIR = $$replace(CMAKE_BINS, ^.*/, ) CMAKE_RELATIVE_INSTALL_DIR = "../../../" +static|staticlib:CMAKE_STATIC_TYPE = true + +contains(QT_CONFIG, reduce_relocations):CMAKE_ADD_FPIE_FLAGS = "true" + macx { CONFIG(qt_framework, qt_framework|qt_no_framework) { CMAKE_LIB_FILE_LOCATION_DEBUG = Qt$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}.framework/Qt$${CMAKE_MODULE_NAME}$${QT_LIBINFIX} CMAKE_LIB_FILE_LOCATION_RELEASE = Qt$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}.framework/Qt$${CMAKE_MODULE_NAME}$${QT_LIBINFIX} CMAKE_BUILD_IS_FRAMEWORK = "true" } else { - static { + !isEmpty(CMAKE_STATIC_TYPE) { CMAKE_LIB_FILE_LOCATION_DEBUG = libQt$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}.a CMAKE_LIB_FILE_LOCATION_RELEASE = libQt$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}.a } else { @@ -44,7 +48,7 @@ macx { } } } else:win32 { - static { + !isEmpty(CMAKE_STATIC_TYPE) { CMAKE_IMPLIB_FILE_LOCATION_DEBUG = Qt$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}d.lib CMAKE_IMPLIB_FILE_LOCATION_RELEASE = Qt$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}.lib } else { @@ -55,7 +59,7 @@ macx { } CMAKE_BIN_SUFFIX = ".exe" } else { - static { + !isEmpty(CMAKE_STATIC_TYPE) { CMAKE_LIB_FILE_LOCATION_DEBUG = libQt$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}.a CMAKE_LIB_FILE_LOCATION_RELEASE = libQt$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}.a } else { @@ -72,8 +76,6 @@ debug_and_release|release:release_type = release INSTALLS += cmake_qt5_module_files -static:CMAKE_STATIC_TYPE = true - cmake_config_file.input = $$PWD/../cmake/Qt5BasicConfig.cmake.in cmake_config_file.output = $$eval(QT.$${MODULE}.libs)/cmake/Qt5$${CMAKE_MODULE_NAME}/Qt5$${CMAKE_MODULE_NAME}Config.cmake @@ -100,19 +102,16 @@ exists($$cmake_extras_file.input) { $$cmake_extras_file.output } -cmake_macros_file = $$_PRO_FILE_PWD_/Qt5$${CMAKE_MODULE_NAME}Macros.cmake -exists($$cmake_macros_file) { +cmake_macros_file.input = $$_PRO_FILE_PWD_/Qt5$${CMAKE_MODULE_NAME}Macros.cmake +exists($$cmake_macros_file.input) { CMAKE_MODULE_MACROS = "true" - cmake_qt5_module_files.files += $$cmake_macros_file - CMAKE_MACROS_FILE_SOURCE = $$_PRO_FILE_PWD_/Qt5$${CMAKE_MODULE_NAME}Macros.cmake - CMAKE_MACROS_FILE_DESTINATION = $$eval(QT.$${MODULE}.libs)/cmake/Qt5$${CMAKE_MODULE_NAME} + cmake_macros_file.output = $$eval(QT.$${MODULE}.libs)/cmake/Qt5$${CMAKE_MODULE_NAME}/Qt5$${CMAKE_MODULE_NAME}Macros.cmake + cmake_macros_file.config = verbatim - CMAKE_MACROS_FILE_SOURCE ~= s,[/\\\\],$$QMAKE_DIR_SEP, - CMAKE_MACROS_FILE_DESTINATION ~= s,[/\\\\],$$QMAKE_DIR_SEP, + QMAKE_SUBSTITUTES += cmake_macros_file - system($$QMAKE_MKDIR \"$$CMAKE_MACROS_FILE_DESTINATION\") - system($$QMAKE_COPY \"$$CMAKE_MACROS_FILE_SOURCE\" \"$$CMAKE_MACROS_FILE_DESTINATION\") + cmake_qt5_module_files.files += $$cmake_macros_file.output } cmake_qt5_module_files.path = $$[QT_INSTALL_LIBS]/cmake/Qt5$${CMAKE_MODULE_NAME} diff --git a/mkspecs/features/qt_installs.prf b/mkspecs/features/qt_installs.prf index b0de7b8fd86..8b17aa90fb2 100644 --- a/mkspecs/features/qt_installs.prf +++ b/mkspecs/features/qt_installs.prf @@ -11,8 +11,7 @@ qt_install_headers { INSTALL_HEADERS = $$SYNCQT.HEADER_FILES equals(TARGET, QtCore) { #headers created by configure - INSTALL_HEADERS *= $$QT_BUILD_TREE/src/corelib/global/qconfig.h \ - $$QT_SOURCE_TREE/src/corelib/arch/$$QT_ARCH/arch + INSTALL_HEADERS *= $$QT_BUILD_TREE/src/corelib/global/qconfig.h } equals(TARGET, phonon) { diff --git a/mkspecs/features/qt_module_config.prf b/mkspecs/features/qt_module_config.prf index 4da1666fc58..a8439198dfa 100644 --- a/mkspecs/features/qt_module_config.prf +++ b/mkspecs/features/qt_module_config.prf @@ -17,7 +17,6 @@ INCLUDEPATH *= $$MODULE_PRIVATE_INCLUDES INCLUDEPATH *= $$MODULE_PRIVATE_INCLUDES/$$TARGET INCLUDEPATH *= $$MODULE_INCLUDES $$MODULE_INCLUDES/.. #just for today to have some compat !isEmpty(RCC_DIR): INCLUDEPATH += $$RCC_DIR -isEmpty(QT_ARCH):!isEmpty(ARCH):QT_ARCH=$$ARCH #another compat that will rot for change #215700 TEMPLATE = lib isEmpty(QT_MAJOR_VERSION) { VERSION=5.0.0 diff --git a/mkspecs/features/testcase.prf b/mkspecs/features/testcase.prf index f890e97733e..9bb9875f6d3 100644 --- a/mkspecs/features/testcase.prf +++ b/mkspecs/features/testcase.prf @@ -49,11 +49,11 @@ QMAKE_EXTRA_TARGETS *= check } else { check.CONFIG = recursive # In debug and release mode, only run the test once. - # Run debug if available, release otherwise. + # Run debug if that is the preferred config, release otherwise. debug_and_release { check.target = dummy_check check.recurse_target = check - debug { + CONFIG(debug, debug|release) { real_check.depends = debug-check real_check.target = check QMAKE_EXTRA_TARGETS += real_check diff --git a/mkspecs/linux-cxx/qmake.conf b/mkspecs/linux-cxx/qmake.conf index ce303b7f90f..79aa834a90e 100644 --- a/mkspecs/linux-cxx/qmake.conf +++ b/mkspecs/linux-cxx/qmake.conf @@ -38,12 +38,12 @@ QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC QMAKE_INCDIR = QMAKE_LIBDIR = -QMAKE_INCDIR_X11 = /usr/X11R6/include -QMAKE_LIBDIR_X11 = /usr/X11R6/lib +QMAKE_INCDIR_X11 = +QMAKE_LIBDIR_X11 = QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS] QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS] -QMAKE_INCDIR_OPENGL = /usr/X11R6/include -QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib +QMAKE_INCDIR_OPENGL = +QMAKE_LIBDIR_OPENGL = QMAKE_LINK = cxx QMAKE_LINK_SHLIB = cxx diff --git a/mkspecs/linux-ecc-64/qmake.conf b/mkspecs/linux-ecc-64/qmake.conf index 61a056b7467..50f841f1d4e 100644 --- a/mkspecs/linux-ecc-64/qmake.conf +++ b/mkspecs/linux-ecc-64/qmake.conf @@ -40,12 +40,12 @@ QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD QMAKE_INCDIR = QMAKE_LIBDIR = -QMAKE_INCDIR_X11 = /usr/X11R6/include -QMAKE_LIBDIR_X11 = /usr/X11R6/lib +QMAKE_INCDIR_X11 = +QMAKE_LIBDIR_X11 = QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS] QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS] -QMAKE_INCDIR_OPENGL = /usr/X11R6/include -QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib +QMAKE_INCDIR_OPENGL = +QMAKE_LIBDIR_OPENGL = QMAKE_LINK = ecpc QMAKE_LINK_SHLIB = ecpc diff --git a/mkspecs/linux-g++-maemo/qmake.conf b/mkspecs/linux-g++-maemo/qmake.conf index 23f1f71e0f1..d5828ab5c83 100644 --- a/mkspecs/linux-g++-maemo/qmake.conf +++ b/mkspecs/linux-g++-maemo/qmake.conf @@ -10,19 +10,5 @@ CONFIG += nostrip QT += core gui QMAKE_INCREMENTAL_STYLE = sublib -include(../common/linux.conf) -include(../common/gcc-base-unix.conf) -include(../common/g++-unix.conf) +include(../linux-arm-gnueabi-g++/qmake.conf) - -# Override the default lib/include directories for scratchbox: -QMAKE_INCDIR_X11 = /usr/include/X11 -QMAKE_INCDIR_OPENGL = /usr/include -QMAKE_LIBDIR_X11 = /usr/lib -QMAKE_LIBDIR_OPENGL = /usr/lib - -# We still need to generate debug symbols in release mode to put into the *-dbg packages: -QMAKE_CFLAGS_RELEASE += -g -Wno-psabi -QMAKE_CXXFLAGS_RELEASE += -g -Wno-psabi - -load(qt_config) diff --git a/mkspecs/linux-icc/qmake.conf b/mkspecs/linux-icc/qmake.conf index 38916ece5c9..4ff63cda710 100644 --- a/mkspecs/linux-icc/qmake.conf +++ b/mkspecs/linux-icc/qmake.conf @@ -46,12 +46,12 @@ QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD QMAKE_INCDIR = QMAKE_LIBDIR = -QMAKE_INCDIR_X11 = /usr/X11R6/include -QMAKE_LIBDIR_X11 = /usr/X11R6/lib +QMAKE_INCDIR_X11 = +QMAKE_LIBDIR_X11 = QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS] QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS] -QMAKE_INCDIR_OPENGL = /usr/X11R6/include -QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib +QMAKE_INCDIR_OPENGL = +QMAKE_LIBDIR_OPENGL = QMAKE_LINK = icpc QMAKE_LINK_SHLIB = icpc diff --git a/mkspecs/linux-kcc/qmake.conf b/mkspecs/linux-kcc/qmake.conf index 01e3b73479f..23fd6298ac5 100644 --- a/mkspecs/linux-kcc/qmake.conf +++ b/mkspecs/linux-kcc/qmake.conf @@ -49,12 +49,12 @@ QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD QMAKE_INCDIR = QMAKE_LIBDIR = -QMAKE_INCDIR_X11 = /usr/X11R6/include -QMAKE_LIBDIR_X11 = /usr/X11R6/lib +QMAKE_INCDIR_X11 = +QMAKE_LIBDIR_X11 = QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS] QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS] -QMAKE_INCDIR_OPENGL = /usr/X11R6/include -QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib +QMAKE_INCDIR_OPENGL = +QMAKE_LIBDIR_OPENGL = QMAKE_LINK = KCC QMAKE_LINK_SHLIB = KCC diff --git a/mkspecs/linux-lsb-g++/qmake.conf b/mkspecs/linux-lsb-g++/qmake.conf index 4197db09786..4335f5ae91e 100644 --- a/mkspecs/linux-lsb-g++/qmake.conf +++ b/mkspecs/linux-lsb-g++/qmake.conf @@ -2,96 +2,18 @@ # qmake configuration for linux-g++ # -MAKEFILE_GENERATOR = UNIX -TARGET_PLATFORM = unix -TEMPLATE = app -CONFIG += qt warn_on release incremental link_prl gdb_dwarf_index -QT += core gui +MAKEFILE_GENERATOR = UNIX +TARGET_PLATFORM = unix +TEMPLATE = app +CONFIG += qt warn_on release incremental link_prl gdb_dwarf_index +QT += core gui QMAKE_INCREMENTAL_STYLE = sublib -QMAKE_CC = lsbcc -QMAKE_LEX = flex -QMAKE_LEXFLAGS = -QMAKE_YACC = yacc -QMAKE_YACCFLAGS = -d -QMAKE_YACCFLAGS_MANGLE = -p $base -b $base -QMAKE_YACC_HEADER = $base.tab.h -QMAKE_YACC_SOURCE = $base.tab.c -QMAKE_CFLAGS = -pipe -QMAKE_CFLAGS_DEPS = -M -QMAKE_CFLAGS_WARN_ON = -Wall -W -QMAKE_CFLAGS_WARN_OFF = -w -QMAKE_CFLAGS_RELEASE = -O2 -QMAKE_CFLAGS_DEBUG = -g -QMAKE_CFLAGS_SHLIB = -fPIC -QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB -QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses -QMAKE_CFLAGS_THREAD = -D_REENTRANT -QMAKE_CFLAGS_HIDESYMS = -fvisibility=hidden +include(../common/linux.conf) +include(../common/gcc-base-unix.conf) +include(../common/g++-unix.conf) +load(qt_config) QMAKE_LSB = 1 - +QMAKE_CC = lsbcc QMAKE_CXX = lsbc++ -QMAKE_CXXFLAGS = $$QMAKE_CFLAGS -QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS -QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON -QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF -QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE -QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG -QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB -QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB -QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC -QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD -QMAKE_CXXFLAGS_HIDESYMS = $$QMAKE_CFLAGS_HIDESYMS -fvisibility-inlines-hidden - -QMAKE_INCDIR = -QMAKE_LIBDIR = -QMAKE_INCDIR_X11 = /opt/lsb/include -QMAKE_LIBDIR_X11 = /opt/lsb/lib -QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS] -QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS] -QMAKE_INCDIR_OPENGL = /opt/lsb/include -QMAKE_LIBDIR_OPENGL = /opt/lsb/lib - -QMAKE_LINK = lsbc++ -QMAKE_LINK_SHLIB = lsbc++ -QMAKE_LFLAGS = -QMAKE_LFLAGS_RELEASE = -QMAKE_LFLAGS_DEBUG = -QMAKE_LFLAGS_SHLIB = -shared -QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB -QMAKE_LFLAGS_SONAME = -Wl,-soname, -QMAKE_LFLAGS_THREAD = -QMAKE_LFLAGS_RPATH = -Wl,-rpath, - -QMAKE_LIBS = -QMAKE_LIBS_DYNLOAD = -ldl -QMAKE_LIBS_X11 = -lXext -lX11 -lm -QMAKE_LIBS_X11SM = -lSM -lICE -QMAKE_LIBS_NIS = -lnsl -QMAKE_LIBS_OPENGL = -lGL -QMAKE_LIBS_OPENGL_QT = -lGL -QMAKE_LIBS_THREAD = -lpthread - -QMAKE_MOC = $$[QT_INSTALL_BINS]/moc -QMAKE_UIC = $$[QT_INSTALL_BINS]/uic - -QMAKE_AR = ar cqs -QMAKE_OBJCOPY = objcopy -QMAKE_RANLIB = - -QMAKE_TAR = tar -cf -QMAKE_GZIP = gzip -9f - -QMAKE_COPY = cp -f -QMAKE_COPY_FILE = $(COPY) -QMAKE_COPY_DIR = $(COPY) -r -QMAKE_MOVE = mv -f -QMAKE_DEL_FILE = rm -f -QMAKE_DEL_DIR = rmdir -QMAKE_STRIP = strip -QMAKE_STRIPFLAGS_LIB += --strip-unneeded -QMAKE_CHK_DIR_EXISTS = test -d -QMAKE_MKDIR = mkdir -p -include(../common/unix.conf) -load(qt_config) diff --git a/mkspecs/linux-pgcc/qmake.conf b/mkspecs/linux-pgcc/qmake.conf index 63ede781a7d..ed882156098 100644 --- a/mkspecs/linux-pgcc/qmake.conf +++ b/mkspecs/linux-pgcc/qmake.conf @@ -40,12 +40,12 @@ QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD QMAKE_INCDIR = QMAKE_LIBDIR = -QMAKE_INCDIR_X11 = /usr/X11R6/include -QMAKE_LIBDIR_X11 = /usr/X11R6/lib +QMAKE_INCDIR_X11 = +QMAKE_LIBDIR_X11 = QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS] QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS] -QMAKE_INCDIR_OPENGL = /usr/X11R6/include -QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib +QMAKE_INCDIR_OPENGL = +QMAKE_LIBDIR_OPENGL = QMAKE_LINK = pgCC QMAKE_LINK_SHLIB = pgCC diff --git a/mkspecs/unsupported/linux-host-g++/qmake.conf b/mkspecs/unsupported/linux-host-g++/qmake.conf index 46ecf375e87..1ad529ebae7 100644 --- a/mkspecs/unsupported/linux-host-g++/qmake.conf +++ b/mkspecs/unsupported/linux-host-g++/qmake.conf @@ -80,12 +80,12 @@ QMAKE_CXXFLAGS_THREAD += $$QMAKE_CFLAGS_THREAD QMAKE_INCDIR = QMAKE_LIBDIR = -QMAKE_INCDIR_X11 = /usr/X11R6/include -QMAKE_LIBDIR_X11 = /usr/X11R6/lib +QMAKE_INCDIR_X11 = +QMAKE_LIBDIR_X11 = QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS] QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS] -QMAKE_INCDIR_OPENGL = /usr/X11R6/include -QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib +QMAKE_INCDIR_OPENGL = +QMAKE_LIBDIR_OPENGL = QMAKE_INCDIR_OPENGL_ES1 = $$QMAKE_INCDIR_OPENGL QMAKE_LIBDIR_OPENGL_ES1 = $$QMAKE_LIBDIR_OPENGL QMAKE_INCDIR_OPENGL_ES2 = $$QMAKE_INCDIR_OPENGL diff --git a/mkspecs/wince70embedded-armv4i-msvc2008/qmake.conf b/mkspecs/wince70embedded-armv4i-msvc2008/qmake.conf index 1cda0cf32f6..c9ca7188126 100644 --- a/mkspecs/wince70embedded-armv4i-msvc2008/qmake.conf +++ b/mkspecs/wince70embedded-armv4i-msvc2008/qmake.conf @@ -8,7 +8,7 @@ include(../common/wince/qmake.conf) CE_SDK = WEC7_SDK_NAME # replace with actual SDK name CE_ARCH = armv4i -DEFINES += QT_NO_GESTURES QT_NOSTANDARDSHELL_UI_MODEL _CRT_SECURE_NO_DEPRECATE _WIN32_WCE=0x700 $$CE_ARCH _AMRV7_ armv7 _ARM_ +DEFINES += QT_NO_NATIVE_GESTURES QT_NOSTANDARDSHELL_UI_MODEL _CRT_SECURE_NO_DEPRECATE _WIN32_WCE=0x700 $$CE_ARCH _AMRV7_ armv7 _ARM_ QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:WINDOWSCE,7.00 /MACHINE:THUMB /ENTRY:mainACRTStartup QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:WINDOWSCE,7.00 /MACHINE:THUMB diff --git a/mkspecs/wince70embedded-x86-msvc2008/qmake.conf b/mkspecs/wince70embedded-x86-msvc2008/qmake.conf index febd1835214..89d912a3476 100644 --- a/mkspecs/wince70embedded-x86-msvc2008/qmake.conf +++ b/mkspecs/wince70embedded-x86-msvc2008/qmake.conf @@ -7,7 +7,7 @@ include(../common/wince/qmake.conf) CE_SDK = Platform Builder CE_ARCH = _TGTCPU -DEFINES += QT_NO_GESTURES QT_NOSTANDARDSHELL_UI_MODEL _CRT_SECURE_NO_DEPRECATE _WIN32_WCE=0x700 $$CE_ARCH _X86_ _M_IX86 +DEFINES += QT_NO_NATIVE_GESTURES QT_NOSTANDARDSHELL_UI_MODEL _CRT_SECURE_NO_DEPRECATE _WIN32_WCE=0x700 $$CE_ARCH _X86_ _M_IX86 QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:WINDOWSCE,7.00 /MACHINE:X86 /ENTRY:mainACRTStartup QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:WINDOWSCE,7.00 /MACHINE:X86 diff --git a/qmake/Makefile.unix b/qmake/Makefile.unix index 286e2ebcbcd..16af49311b0 100644 --- a/qmake/Makefile.unix +++ b/qmake/Makefile.unix @@ -22,7 +22,7 @@ QOBJS=qtextcodec.o qutfcodec.o qstring.o qtextstream.o qiodevice.o qmalloc.o qgl qfileinfo.o qdatetime.o qstringlist.o qabstractfileengine.o qtemporaryfile.o \ qmap.o qmetatype.o qsettings.o qsystemerror.o qlibraryinfo.o qvariant.o qvsnprintf.o \ qlocale.o qlocale_tools.o qlocale_unix.o qlinkedlist.o qurl.o qnumeric.o qcryptographichash.o \ - qxmlstream.o qxmlutils.o \ + qxmlstream.o qxmlutils.o qlogging.o \ $(QTOBJS) @@ -66,6 +66,7 @@ DEPEND_SRC=project.cpp property.cpp meta.cpp main.cpp generators/makefile.cpp ge $(SOURCE_PATH)/src/corelib/xml/qxmlstream.cpp \ $(SOURCE_PATH)/src/corelib/xml/qxmlutils.cpp \ $(SOURCE_PATH)/src/corelib/kernel/qsystemerror.cpp \ + $(SOURCE_PATH)/src/corelib/global/qlogging.cpp \ $(QTSRCS) CPPFLAGS = -g -I. -Igenerators -Igenerators/unix -Igenerators/win32 \ @@ -316,6 +317,9 @@ qxmlstream.o: $(SOURCE_PATH)/src/corelib/xml/qxmlstream.cpp qxmlutils.o: $(SOURCE_PATH)/src/corelib/xml/qxmlutils.cpp $(CXX) -c -o $@ $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/xml/qxmlutils.cpp +qlogging.o: $(SOURCE_PATH)/src/corelib/global/qlogging.cpp + $(CXX) -c -o $@ $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/global/qlogging.cpp + #default rules .cpp.o: $(CXX) -c -o $@ $(CXXFLAGS) $< diff --git a/qmake/Makefile.win32 b/qmake/Makefile.win32 index e7677860012..767237fcfc7 100644 --- a/qmake/Makefile.win32 +++ b/qmake/Makefile.win32 @@ -29,7 +29,7 @@ CFLAGS_EXTRA = /MP !endif CFLAGS_BARE = -c -Fo./ \ - -W3 -nologo -O2 \ + -W3 -nologo -O1 \ $(CFLAGS_EXTRA) \ -I. -Igenerators -Igenerators\unix -Igenerators\win32 -Igenerators\mac -Igenerators\integrity \ -I$(BUILD_PATH)\include -I$(BUILD_PATH)\include\QtCore -I$(BUILD_PATH)\include\QtCore\$(QT_VERSION) -I$(BUILD_PATH)\include\QtCore\$(QT_VERSION)\QtCore \ @@ -118,8 +118,8 @@ QTOBJS= \ qmetatype.obj \ qxmlstream.obj \ qxmlutils.obj \ - qnumeric.obj - + qnumeric.obj \ + qlogging.obj first all: qmake.exe diff --git a/qmake/Makefile.win32-g++ b/qmake/Makefile.win32-g++ index 443dba390aa..585061ed268 100644 --- a/qmake/Makefile.win32-g++ +++ b/qmake/Makefile.win32-g++ @@ -95,7 +95,8 @@ QTOBJS= \ qmetatype.o \ qxmlstream.o \ qxmlutils.o \ - qnumeric.o + qnumeric.o \ + qlogging.o qmake.exe: $(OBJS) $(QTOBJS) @@ -339,3 +340,5 @@ qxmlstream.o: $(SOURCE_PATH)/src/corelib/xml/qxmlstream.cpp qxmlutils.o: $(SOURCE_PATH)/src/corelib/xml/qxmlutils.cpp $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/xml/qxmlutils.cpp +qlogging.o: $(SOURCE_PATH)/src/corelib/global/qlogging.cpp + $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/global/qlogging.cpp diff --git a/qmake/Makefile.win32-g++-sh b/qmake/Makefile.win32-g++-sh index bc8356e178a..6dfb4863754 100644 --- a/qmake/Makefile.win32-g++-sh +++ b/qmake/Makefile.win32-g++-sh @@ -95,7 +95,8 @@ QTOBJS= \ qmetatype.o \ qxmlstream.o \ qxmlutils.o \ - qnumeric.o + qnumeric.o \ + qlogging.o qmake.exe: $(OBJS) $(QTOBJS) $(LINKQMAKE) @@ -337,3 +338,6 @@ qxmlstream.o: $(SOURCE_PATH)/src/corelib/xml/qxmlstream.cpp qxmlutils.o: $(SOURCE_PATH)/src/corelib/xml/qxmlutils.cpp $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/xml/qxmlutils.cpp + +qlogging.o: $(SOURCE_PATH)/src/corelib/global/qlogging.cpp + $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/global/qlogging.cpp diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp index 59e17b0beaf..dd098596e9c 100644 --- a/qmake/generators/makefile.cpp +++ b/qmake/generators/makefile.cpp @@ -498,62 +498,74 @@ MakefileGenerator::init() } outn = fileFixify(inn.left(inn.length()-3), qmake_getpwd(), Option::output_dir); } + + QString confign = subs.at(i) + ".config"; + bool verbatim = false; + if (v.contains(confign)) + verbatim = v[confign].contains(QLatin1String("verbatim")); + QFile in(inn); - if(in.open(QFile::ReadOnly)) { - QString contents; - QStack state; - enum { IN_CONDITION, MET_CONDITION, PENDING_CONDITION }; - for(int count = 1; !in.atEnd(); ++count) { - QString line = QString::fromUtf8(in.readLine()); - if(line.startsWith("!!IF ")) { - if(state.isEmpty() || state.top() == IN_CONDITION) { - QString test = line.mid(5, line.length()-(5+1)); - if(project->test(test)) - state.push(IN_CONDITION); - else - state.push(PENDING_CONDITION); - } else { - state.push(MET_CONDITION); - } - } else if(line.startsWith("!!ELIF ")) { - if(state.isEmpty()) { - warn_msg(WarnLogic, "(%s:%d): Unexpected else condition", - in.fileName().toLatin1().constData(), count); - } else if(state.top() == PENDING_CONDITION) { - QString test = line.mid(7, line.length()-(7+1)); - if(project->test(test)) { + if (in.open(QFile::ReadOnly)) { + QByteArray contentBytes; + if (verbatim) { + contentBytes = in.readAll(); + } else { + QString contents; + QStack state; + enum { IN_CONDITION, MET_CONDITION, PENDING_CONDITION }; + for (int count = 1; !in.atEnd(); ++count) { + QString line = QString::fromUtf8(in.readLine()); + if (line.startsWith("!!IF ")) { + if (state.isEmpty() || state.top() == IN_CONDITION) { + QString test = line.mid(5, line.length()-(5+1)); + if (project->test(test)) + state.push(IN_CONDITION); + else + state.push(PENDING_CONDITION); + } else { + state.push(MET_CONDITION); + } + } else if (line.startsWith("!!ELIF ")) { + if (state.isEmpty()) { + warn_msg(WarnLogic, "(%s:%d): Unexpected else condition", + in.fileName().toLatin1().constData(), count); + } else if (state.top() == PENDING_CONDITION) { + QString test = line.mid(7, line.length()-(7+1)); + if (project->test(test)) { + state.pop(); + state.push(IN_CONDITION); + } + } else if (state.top() == IN_CONDITION) { + state.pop(); + state.push(MET_CONDITION); + } + } else if (line.startsWith("!!ELSE")) { + if (state.isEmpty()) { + warn_msg(WarnLogic, "(%s:%d): Unexpected else condition", + in.fileName().toLatin1().constData(), count); + } else if (state.top() == PENDING_CONDITION) { state.pop(); state.push(IN_CONDITION); + } else if (state.top() == IN_CONDITION) { + state.pop(); + state.push(MET_CONDITION); } - } else if(state.top() == IN_CONDITION) { - state.pop(); - state.push(MET_CONDITION); + } else if (line.startsWith("!!ENDIF")) { + if (state.isEmpty()) + warn_msg(WarnLogic, "(%s:%d): Unexpected endif", + in.fileName().toLatin1().constData(), count); + else + state.pop(); + } else if (state.isEmpty() || state.top() == IN_CONDITION) { + contents += project->expand(line, in.fileName(), count); } - } else if(line.startsWith("!!ELSE")) { - if(state.isEmpty()) { - warn_msg(WarnLogic, "(%s:%d): Unexpected else condition", - in.fileName().toLatin1().constData(), count); - } else if(state.top() == PENDING_CONDITION) { - state.pop(); - state.push(IN_CONDITION); - } else if(state.top() == IN_CONDITION) { - state.pop(); - state.push(MET_CONDITION); - } - } else if(line.startsWith("!!ENDIF")) { - if(state.isEmpty()) - warn_msg(WarnLogic, "(%s:%d): Unexpected endif", - in.fileName().toLatin1().constData(), count); - else - state.pop(); - } else if(state.isEmpty() || state.top() == IN_CONDITION) { - contents += project->expand(line, in.fileName(), count); } + contentBytes = contents.toUtf8(); } QFile out(outn); - if(out.exists() && out.open(QFile::ReadOnly)) { - QString old = QString::fromUtf8(out.readAll()); - if(contents == old) { + if (out.exists() && out.open(QFile::ReadOnly)) { + QByteArray old = out.readAll(); + if (contentBytes == old) { v["QMAKE_INTERNAL_INCLUDED_FILES"].append(in.fileName()); continue; } @@ -567,7 +579,7 @@ MakefileGenerator::init() mkdir(QFileInfo(out).absolutePath()); if(out.open(QFile::WriteOnly)) { v["QMAKE_INTERNAL_INCLUDED_FILES"].append(in.fileName()); - out.write(contents.toUtf8()); + out.write(contentBytes); } else { warn_msg(WarnLogic, "Cannot open substitute for output '%s'", out.fileName().toLatin1().constData()); @@ -2496,10 +2508,10 @@ MakefileGenerator::writeSubTargets(QTextStream &t, QListtarget << "-qmake_all: "; if(project->isEmpty("QMAKE_NOFORCE")) @@ -2508,10 +2520,10 @@ MakefileGenerator::writeSubTargets(QTextStream &t, QList &nvars) { init(p, &nvars); } ~QMakeProject(); - enum { ReadCache=0x01, ReadConf=0x02, ReadCmdLine=0x04, ReadProFile=0x08, - ReadFeatures=0x20, ReadConfigs=0x40, ReadAll=0xFF }; + enum { ReadProFile=0x01, ReadSetup=0x02, ReadFeatures=0x04, ReadAll=0xFF }; inline bool parse(const QString &text) { return parse(text, vars); } bool read(const QString &project, uchar cmd=ReadAll); bool read(uchar cmd=ReadAll); diff --git a/qmake/qmake.pri b/qmake/qmake.pri index 1f59531c420..ba6ab383c7e 100644 --- a/qmake/qmake.pri +++ b/qmake/qmake.pri @@ -76,7 +76,8 @@ bootstrap { #Qt code qvector.cpp \ qvsnprintf.cpp \ qxmlstream.cpp \ - qxmlutils.cpp + qxmlutils.cpp \ + qlogging.cpp HEADERS+= \ qbitarray.h \ diff --git a/qtbase.pro b/qtbase.pro index 56f40cdb7a9..5fc9cb38884 100644 --- a/qtbase.pro +++ b/qtbase.pro @@ -132,3 +132,11 @@ win32:!equals(QT_BUILD_TREE, $$QT_SOURCE_TREE) { mkspecs.files += $$QT_BUILD_TREE/mkspecs/default } INSTALLS += mkspecs + +OTHER_FILES += \ + configure \ + header.BSD \ + header.FDL \ + header.LGPL \ + header.LGPL-ONLY \ + sync.profile diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-gpos-private.h b/src/3rdparty/harfbuzz/src/harfbuzz-gpos-private.h index 63ba90797d1..b363b81d874 100644 --- a/src/3rdparty/harfbuzz/src/harfbuzz-gpos-private.h +++ b/src/3rdparty/harfbuzz/src/harfbuzz-gpos-private.h @@ -39,6 +39,10 @@ HB_BEGIN_HEADER #define VR_X_ADVANCE_DEVICE 2 #define VR_Y_ADVANCE_DEVICE 3 +#ifndef HB_SUPPORT_MULTIPLE_MASTER +# define HB_USE_FLEXIBLE_VALUE_RECORD +#endif + struct HB_ValueRecord_ { HB_Short XPlacement; /* horizontal adjustment for @@ -242,7 +246,11 @@ typedef struct HB_Class2Record_ HB_Class2Record; struct HB_Class1Record_ { - HB_Class2Record* Class2Record; /* array of Class2Record tables */ + hb_uint8 IsFlexible; + union { + HB_Class2Record* Class2Record; /* array of Class2Record tables */ + HB_Short* ValueRecords; + } c2r; }; typedef struct HB_Class1Record_ HB_Class1Record; diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-gpos.c b/src/3rdparty/harfbuzz/src/harfbuzz-gpos.c index a21600579e5..2a86cb21e91 100644 --- a/src/3rdparty/harfbuzz/src/harfbuzz-gpos.c +++ b/src/3rdparty/harfbuzz/src/harfbuzz-gpos.c @@ -194,6 +194,43 @@ HB_Error HB_Done_GPOS_Table( HB_GPOSHeader* gpos ) /* ValueRecord */ +static HB_Error Get_FlexibleValueRecord( GPOS_Instance* gpi, + HB_Short* vr, + HB_UShort format, + HB_Position gd ) +{ + HB_Error error = HB_Err_Ok; + + HB_16Dot16 x_scale, y_scale; + + if ( !format ) + return HB_Err_Ok; + + x_scale = gpi->font->x_scale; + y_scale = gpi->font->y_scale; + + /* design units -> fractional pixel */ + + if ( format & HB_GPOS_FORMAT_HAVE_X_PLACEMENT ) { + gd->x_pos += *vr * x_scale / 0x10000; + vr++; + } + if ( format & HB_GPOS_FORMAT_HAVE_Y_PLACEMENT ) { + gd->y_pos += *vr * y_scale / 0x10000; + vr++; + } + if ( format & HB_GPOS_FORMAT_HAVE_X_ADVANCE ) { + gd->x_advance += *vr * x_scale / 0x10000; + vr++; + } + if ( format & HB_GPOS_FORMAT_HAVE_Y_ADVANCE ) { + gd->y_advance += *vr * y_scale / 0x10000; + vr++; + } + + return error; +} + /* There is a subtle difference in the specs between a `table' and a `record' -- offsets for device tables in ValueRecords are taken from the parent table and not the parent record. */ @@ -1245,6 +1282,19 @@ static void Free_PairPos1( HB_PairPosFormat1* ppf1, } } +static HB_UInt Calculate_Class2RecordSize(HB_UShort format1, HB_UShort format2) +{ + // Return number of 16 bit values in two value records with given formats + return (format1 & 0x01) + (format2 & 0x01) + + ((format1 & 0x02) >> 1) + ((format2 & 0x02) >> 1) + + ((format1 & 0x04) >> 2) + ((format2 & 0x04) >> 2) + + ((format1 & 0x08) >> 3) + ((format2 & 0x08) >> 3) + + ((format1 & 0x10) >> 4) + ((format2 & 0x10) >> 4) + + ((format1 & 0x20) >> 5) + ((format2 & 0x20) >> 5) + + ((format1 & 0x40) >> 6) + ((format2 & 0x40) >> 6) + + ((format1 & 0x80) >> 7) + ((format2 & 0x80) >> 7); +} + /* PairPosFormat2 */ @@ -1256,11 +1306,14 @@ static HB_Error Load_PairPos2( HB_PairPosFormat2* ppf2, HB_Error error; HB_UShort m, n, k, count1, count2; - HB_UInt cur_offset, new_offset1, new_offset2, base_offset; + HB_UInt cur_offset, new_offset1, new_offset2, base_offset, cls2_record_size = 0; HB_Class1Record* c1r; HB_Class2Record* c2r; + HB_Short* vr; + + hb_uint8 use_flexible_value_records; base_offset = FILE_Pos() - 8L; @@ -1276,6 +1329,13 @@ static HB_Error Load_PairPos2( HB_PairPosFormat2* ppf2, count1 = ppf2->Class1Count = GET_UShort(); count2 = ppf2->Class2Count = GET_UShort(); +#ifndef HB_USE_FLEXIBLE_VALUE_RECORD + use_flexible_value_records = 0; +#else + use_flexible_value_records = !((format1 & HB_GPOS_FORMAT_HAVE_DEVICE_TABLES) || + (format2 & HB_GPOS_FORMAT_HAVE_DEVICE_TABLES)); +#endif + FORGET_Frame(); cur_offset = FILE_Pos(); @@ -1296,35 +1356,55 @@ static HB_Error Load_PairPos2( HB_PairPosFormat2* ppf2, c1r = ppf2->Class1Record; + if ( use_flexible_value_records ) + cls2_record_size = Calculate_Class2RecordSize(format1, format2); + for ( m = 0; m < count1; m++ ) { - c1r[m].Class2Record = NULL; + c1r[m].IsFlexible = use_flexible_value_records; + if ( use_flexible_value_records ) { + c1r[m].c2r.ValueRecords = NULL; - if ( ALLOC_ARRAY( c1r[m].Class2Record, count2, HB_Class2Record ) ) - goto Fail1; + if ( ALLOC_ARRAY( c1r[m].c2r.ValueRecords, count2 * cls2_record_size, HB_UShort ) ) + goto Fail1; - c2r = c1r[m].Class2Record; + vr = c1r[m].c2r.ValueRecords; - for ( n = 0; n < count2; n++ ) - { - if ( format1 ) - { - error = Load_ValueRecord( &c2r[n].Value1, format1, - base_offset, stream ); - if ( error ) - goto Fail0; - } - if ( format2 ) - { - error = Load_ValueRecord( &c2r[n].Value2, format2, - base_offset, stream ); - if ( error ) - { - if ( format1 ) - Free_ValueRecord( &c2r[n].Value1, format1 ); - goto Fail0; - } - } + if ( ACCESS_Frame( count2 * cls2_record_size * 2L )) + goto Fail1; + + for ( n = 0; n < count2 * cls2_record_size; n++ ) + vr[n] = GET_Short(); + + FORGET_Frame(); + } else { + c1r[m].c2r.Class2Record = NULL; + + if ( ALLOC_ARRAY( c1r[m].c2r.Class2Record, count2, HB_Class2Record ) ) + goto Fail1; + + c2r = c1r[m].c2r.Class2Record; + for ( n = 0; n < count2; n++ ) + { + if ( format1 ) + { + error = Load_ValueRecord( &c2r[n].Value1, format1, + base_offset, stream ); + if ( error ) + goto Fail0; + } + if ( format2 ) + { + error = Load_ValueRecord( &c2r[n].Value2, format2, + base_offset, stream ); + if ( error ) + { + if ( format1 ) + Free_ValueRecord( &c2r[n].Value1, format1 ); + goto Fail0; + } + } + } } continue; @@ -1345,17 +1425,21 @@ static HB_Error Load_PairPos2( HB_PairPosFormat2* ppf2, Fail1: for ( k = 0; k < m; k++ ) { - c2r = c1r[k].Class2Record; + if ( !use_flexible_value_records ) { + c2r = c1r[k].c2r.Class2Record; - for ( n = 0; n < count2; n++ ) - { - if ( format1 ) - Free_ValueRecord( &c2r[n].Value1, format1 ); - if ( format2 ) - Free_ValueRecord( &c2r[n].Value2, format2 ); - } + for ( n = 0; n < count2; n++ ) + { + if ( format1 ) + Free_ValueRecord( &c2r[n].Value1, format1 ); + if ( format2 ) + Free_ValueRecord( &c2r[n].Value2, format2 ); + } - FREE( c2r ); + FREE( c2r ); + } else { + FREE( c1r[k].c2r.ValueRecords ); + } } FREE( c1r ); @@ -1387,17 +1471,21 @@ static void Free_PairPos2( HB_PairPosFormat2* ppf2, for ( m = 0; m < count1; m++ ) { - c2r = c1r[m].Class2Record; + if ( !c1r[m].IsFlexible ) { + c2r = c1r[m].c2r.Class2Record; - for ( n = 0; n < count2; n++ ) - { - if ( format1 ) - Free_ValueRecord( &c2r[n].Value1, format1 ); - if ( format2 ) - Free_ValueRecord( &c2r[n].Value2, format2 ); - } + for ( n = 0; n < count2; n++ ) + { + if ( format1 ) + Free_ValueRecord( &c2r[n].Value1, format1 ); + if ( format2 ) + Free_ValueRecord( &c2r[n].Value2, format2 ); + } - FREE( c2r ); + FREE( c2r ); + } else { + FREE( c1r[m].c2r.ValueRecords ); + } } FREE( c1r ); @@ -1544,6 +1632,10 @@ static HB_Error Lookup_PairPos2( GPOS_Instance* gpi, HB_Class1Record* c1r; HB_Class2Record* c2r; + HB_Short* vr; + + HB_UShort vr1_size; + HB_UShort vr2_size; error = _HB_OPEN_Get_Class( &ppf2->ClassDef1, IN_GLYPH( first_pos ), @@ -1558,15 +1650,28 @@ static HB_Error Lookup_PairPos2( GPOS_Instance* gpi, c1r = &ppf2->Class1Record[cl1]; if ( !c1r ) return ERR(HB_Err_Invalid_SubTable); - c2r = &c1r->Class2Record[cl2]; - error = Get_ValueRecord( gpi, &c2r->Value1, format1, POSITION( first_pos ) ); - if ( error ) - return error; - return Get_ValueRecord( gpi, &c2r->Value2, format2, POSITION( buffer->in_pos ) ); + if ( !c1r->IsFlexible ) { + c2r = &c1r->c2r.Class2Record[cl2]; + + error = Get_ValueRecord( gpi, &c2r->Value1, format1, POSITION( first_pos ) ); + if ( error ) + return error; + return Get_ValueRecord( gpi, &c2r->Value2, format2, POSITION( buffer->in_pos ) ); + } else { + vr1_size = Calculate_Class2RecordSize( format1, 0 ); + vr2_size = Calculate_Class2RecordSize( format2, 0 ); + + vr = c1r->c2r.ValueRecords + (cl2 * ( vr1_size + vr2_size )); + + error = Get_FlexibleValueRecord( gpi, vr, format1, POSITION( first_pos ) ); + if ( error ) + return error; + vr += vr1_size; // Skip to second record + return Get_FlexibleValueRecord( gpi, vr, format2, POSITION( buffer->in_pos ) ); + } } - static HB_Error Lookup_PairPos( GPOS_Instance* gpi, HB_GPOS_SubTable* st, HB_Buffer buffer, diff --git a/src/3rdparty/libpng.pri b/src/3rdparty/libpng.pri index 7ac19101516..8479114aa23 100644 --- a/src/3rdparty/libpng.pri +++ b/src/3rdparty/libpng.pri @@ -1,5 +1,4 @@ DEFINES *= QT_USE_BUNDLED_LIBPNG -!isEqual(QT_ARCH, i386):!isEqual(QT_ARCH, x86_64):DEFINES += PNG_NO_ASSEMBLER_CODE INCLUDEPATH += $$PWD/libpng SOURCES += $$PWD/libpng/png.c \ $$PWD/libpng/pngerror.c \ diff --git a/src/3rdparty/pcre.pri b/src/3rdparty/pcre.pri index 92066e1aeea..7febd8fd0bb 100644 --- a/src/3rdparty/pcre.pri +++ b/src/3rdparty/pcre.pri @@ -1,14 +1,5 @@ DEFINES += PCRE_HAVE_CONFIG_H -# man 3 pcrejit for a list of supported platforms; -# as PCRE 8.30, stable JIT support is available for: -# - ARM v5, v7, and Thumb2 -# - x86/x86-64 -# - MIPS 32bit -equals(QT_ARCH, "i386")|equals(QT_ARCH, "x86_64")|equals(QT_ARCH, "arm")|if(equals(QT_ARCH, "mips"):!*-64) { - DEFINES += SUPPORT_JIT -} - win32:DEFINES += PCRE_STATIC INCLUDEPATH += $$PWD/pcre diff --git a/src/3rdparty/pcre/config.h b/src/3rdparty/pcre/config.h index 4fe10f41d8a..fede0dcbb0c 100644 --- a/src/3rdparty/pcre/config.h +++ b/src/3rdparty/pcre/config.h @@ -13,3 +13,20 @@ #define SUPPORT_UCP #define SUPPORT_UTF16 +/* + man 3 pcrejit for a list of supported platforms; + as PCRE 8.30, stable JIT support is available for: + - ARM v5, v7, and Thumb2 + - x86/x86-64 + - MIPS 32bit +*/ +#if \ + /* ARM */ \ + defined(__arm__) || defined(__TARGET_ARCH_ARM) \ + /* x86 32/64 */ \ + || defined(__i386) || defined(__i386__) || defined(_M_IX86) \ + || defined(__x86_64) || defined(__x86_64__) || defined(__amd64) || defined(_M_X64) \ + /* MIPS32 */ \ + || defined(__mips) || defined(__mips__) || defined(_M_MRX000) && !(defined(_MIPS_ARCH_MIPS64) || defined(__mips64)) +# define SUPPORT_JIT +#endif diff --git a/src/3rdparty/zlib/gzguts.h b/src/3rdparty/zlib/gzguts.h index c752b5763b6..26b4d37c1d2 100644 --- a/src/3rdparty/zlib/gzguts.h +++ b/src/3rdparty/zlib/gzguts.h @@ -32,7 +32,10 @@ # include #endif #if !defined(_WIN32_WCE) -#include +# include +#else +# include +# include #endif #ifdef NO_DEFLATE /* for compatibility with old definition */ @@ -40,7 +43,9 @@ #endif #ifdef _MSC_VER -# include +# if !defined(_WIN32_WCE) +# include +# endif # define vsnprintf _vsnprintf #endif diff --git a/src/3rdparty/zlib/zutil.c b/src/3rdparty/zlib/zutil.c index 898ed345b0e..3418c5999fd 100644 --- a/src/3rdparty/zlib/zutil.c +++ b/src/3rdparty/zlib/zutil.c @@ -136,14 +136,6 @@ const char * ZEXPORT zError(err) return ERR_MSG(err); } -#if defined(_WIN32_WCE) - /* The Microsoft C Run-Time Library for Windows CE doesn't have - * errno. We define it as a global variable to simplify porting. - * Its value is always 0 and should not be used. - */ - int errno = 0; -#endif - #ifndef HAVE_MEMCPY void ZLIB_INTERNAL zmemcpy(dest, source, len) diff --git a/src/concurrent/concurrent.pro b/src/concurrent/concurrent.pro index a9482af0572..6bf16e6a0a5 100644 --- a/src/concurrent/concurrent.pro +++ b/src/concurrent/concurrent.pro @@ -1,3 +1,5 @@ +load(qt_module) + TARGET = QtConcurrent QPRO_PWD = $$PWD QT = core-private @@ -12,7 +14,7 @@ unix|win32-g++*:QMAKE_PKGCONFIG_REQUIRES = QtCore load(qt_module_config) -HEADERS += $$QT_SOURCE_TREE/src/xml/qtconcurrentversion.h +HEADERS += $$QT_SOURCE_TREE/src/concurrent/qtconcurrentversion.h PRECOMPILED_HEADER = ../corelib/global/qt_pch.h @@ -29,6 +31,7 @@ SOURCES += \ qtconcurrentexception.cpp HEADERS += \ + qtconcurrent_global.h \ qfuture.h \ qfutureinterface.h \ qfuturesynchronizer.h \ diff --git a/src/concurrent/qfuture.h b/src/concurrent/qfuture.h index 6e99a6068e2..4005fe58fa9 100644 --- a/src/concurrent/qfuture.h +++ b/src/concurrent/qfuture.h @@ -42,7 +42,7 @@ #ifndef QFUTURE_H #define QFUTURE_H -#include +#include #ifndef QT_NO_QFUTURE diff --git a/src/concurrent/qfutureinterface.h b/src/concurrent/qfutureinterface.h index f64623ae587..9ae2df5d07d 100644 --- a/src/concurrent/qfutureinterface.h +++ b/src/concurrent/qfutureinterface.h @@ -42,7 +42,8 @@ #ifndef QFUTUREINTERFACE_H #define QFUTUREINTERFACE_H -#include +#include + #include #ifndef QT_NO_QFUTURE @@ -60,7 +61,7 @@ class QFutureInterfaceBasePrivate; class QFutureWatcherBase; class QFutureWatcherBasePrivate; -class Q_CORE_EXPORT QFutureInterfaceBase +class Q_CONCURRENT_EXPORT QFutureInterfaceBase { public: enum State { diff --git a/src/concurrent/qfutureinterface_p.h b/src/concurrent/qfutureinterface_p.h index ea52621378a..3a73f846ac5 100644 --- a/src/concurrent/qfutureinterface_p.h +++ b/src/concurrent/qfutureinterface_p.h @@ -53,6 +53,8 @@ // We mean it. // +#include + #include #include #include diff --git a/src/concurrent/qfuturesynchronizer.h b/src/concurrent/qfuturesynchronizer.h index 8b7e710ea93..3106dd44acd 100644 --- a/src/concurrent/qfuturesynchronizer.h +++ b/src/concurrent/qfuturesynchronizer.h @@ -42,6 +42,8 @@ #ifndef QFUTRUESYNCHRONIZER_H #define QFUTRUESYNCHRONIZER_H +#include + #include #ifndef QT_NO_CONCURRENT diff --git a/src/concurrent/qfuturewatcher.h b/src/concurrent/qfuturewatcher.h index 0e94863d129..11dab42174c 100644 --- a/src/concurrent/qfuturewatcher.h +++ b/src/concurrent/qfuturewatcher.h @@ -42,6 +42,8 @@ #ifndef QFUTUREWATCHER_H #define QFUTUREWATCHER_H +#include + #include #ifndef QT_NO_QFUTURE @@ -55,7 +57,7 @@ QT_BEGIN_NAMESPACE class QEvent; class QFutureWatcherBasePrivate; -class Q_CORE_EXPORT QFutureWatcherBase : public QObject +class Q_CONCURRENT_EXPORT QFutureWatcherBase : public QObject { Q_OBJECT Q_DECLARE_PRIVATE(QFutureWatcherBase) diff --git a/src/concurrent/qfuturewatcher_p.h b/src/concurrent/qfuturewatcher_p.h index 27bc49439ae..46486bf571e 100644 --- a/src/concurrent/qfuturewatcher_p.h +++ b/src/concurrent/qfuturewatcher_p.h @@ -53,6 +53,8 @@ // We mean it. // +#include + #include "qfutureinterface_p.h" #include diff --git a/src/corelib/arch/qatomic_arch.h b/src/concurrent/qtconcurrent_global.h similarity index 64% rename from src/corelib/arch/qatomic_arch.h rename to src/concurrent/qtconcurrent_global.h index 59c8de3cdeb..1e26c2321d2 100644 --- a/src/corelib/arch/qatomic_arch.h +++ b/src/concurrent/qtconcurrent_global.h @@ -39,39 +39,46 @@ ** ****************************************************************************/ -#ifndef QATOMIC_ARCH_H -#define QATOMIC_ARCH_H +#ifndef QTCONCURRENT_GLOBAL_H +#define QTCONCURRENT_GLOBAL_H -QT_BEGIN_HEADER +#include -#include "QtCore/qglobal.h" - -#if defined(QT_ARCH_INTEGRITY) -# include "QtCore/qatomic_integrity.h" -#elif defined(QT_ARCH_VXWORKS) -# include "QtCore/qatomic_vxworks.h" -#elif defined(QT_ARCH_ALPHA) -# include "QtCore/qatomic_alpha.h" -#elif defined(QT_ARCH_BFIN) -# include "QtCore/qatomic_bfin.h" -#elif defined(QT_ARCH_GENERIC) -# include "QtCore/qatomic_generic.h" -#elif defined(QT_ARCH_PARISC) -# include "QtCore/qatomic_parisc.h" -#elif defined(QT_ARCH_POWERPC) -# include "QtCore/qatomic_powerpc.h" -#elif defined(QT_ARCH_S390) -# include "QtCore/qatomic_s390.h" -#elif defined(QT_ARCH_SPARC) -# include "QtCore/qatomic_sparc.h" -#elif defined(QT_ARCH_SH) -# include "QtCore/qatomic_sh.h" -#elif defined(QT_ARCH_SH4A) -# include "QtCore/qatomic_sh4a.h" -#else -# error "Qt has not been ported to this architecture" +#ifdef QT_NO_CONCURRENT +# define QT_NO_QFUTURE #endif -QT_END_HEADER +#if defined(Q_OS_WIN) && !defined(QT_NODLL) +# if defined(QT_MAKEDLL) +# if defined(QT_BUILD_CONCURRENT_LIB) +# define Q_CONCURRENT_EXPORT Q_DECL_EXPORT +# else +# define Q_CONCURRENT_EXPORT Q_DECL_IMPORT +# endif +# elif defined(QT_DLL) +# define Q_CONCURRENT_EXPORT Q_DECL_IMPORT +# endif +#endif -#endif // QATOMIC_ARCH_H +#if !defined(Q_CONCURRENT_EXPORT) +# if defined(QT_SHARED) +# define Q_CONCURRENT_EXPORT Q_DECL_EXPORT +# else +# define Q_CONCURRENT_EXPORT +# endif +#endif + +// gcc 3 version has problems with some of the +// map/filter overloads. +#if defined(Q_CC_GNU) && (__GNUC__ < 4) +# define QT_NO_CONCURRENT_MAP +# define QT_NO_CONCURRENT_FILTER +#endif + +#if defined (Q_CC_MSVC) && (_MSC_VER < 1300) +# define QT_TYPENAME +#else +# define QT_TYPENAME typename +#endif + +#endif // include guard diff --git a/src/concurrent/qtconcurrentcompilertest.h b/src/concurrent/qtconcurrentcompilertest.h index 78184230902..7f3f7d42628 100644 --- a/src/concurrent/qtconcurrentcompilertest.h +++ b/src/concurrent/qtconcurrentcompilertest.h @@ -42,20 +42,13 @@ #ifndef QTCONCURRENT_COMPILERTEST_H #define QTCONCURRENT_COMPILERTEST_H -#include +#include #ifndef QT_NO_CONCURRENT QT_BEGIN_HEADER QT_BEGIN_NAMESPACE - -#if defined (Q_CC_MSVC) && (_MSC_VER < 1300) -# define QT_TYPENAME -#else -# define QT_TYPENAME typename -#endif - namespace QtPrivate { template diff --git a/src/concurrent/qtconcurrentexception.h b/src/concurrent/qtconcurrentexception.h index b04e1f2a04a..80926c49c19 100644 --- a/src/concurrent/qtconcurrentexception.h +++ b/src/concurrent/qtconcurrentexception.h @@ -42,7 +42,7 @@ #ifndef QTCONCURRENT_EXCEPTION_H #define QTCONCURRENT_EXCEPTION_H -#include +#include #ifndef QT_NO_QFUTURE @@ -62,14 +62,14 @@ namespace QtConcurrent #ifndef QT_NO_EXCEPTIONS -class Q_CORE_EXPORT Exception : public std::exception +class Q_CONCURRENT_EXPORT Exception : public std::exception { public: virtual void raise() const; virtual Exception *clone() const; }; -class Q_CORE_EXPORT UnhandledException : public Exception +class Q_CONCURRENT_EXPORT UnhandledException : public Exception { public: void raise() const; @@ -90,7 +90,7 @@ public: QExplicitlySharedDataPointer base; }; -class Q_CORE_EXPORT ExceptionStore +class Q_CONCURRENT_EXPORT ExceptionStore { public: void setException(const Exception &e); @@ -107,7 +107,7 @@ public: namespace internal { -class Q_CORE_EXPORT ExceptionStore +class Q_CONCURRENT_EXPORT ExceptionStore { public: ExceptionStore() { } diff --git a/src/concurrent/qtconcurrentfilter.h b/src/concurrent/qtconcurrentfilter.h index 1de8d230b1d..3d4c1d6f57a 100644 --- a/src/concurrent/qtconcurrentfilter.h +++ b/src/concurrent/qtconcurrentfilter.h @@ -42,7 +42,7 @@ #ifndef QTCONCURRENT_FILTER_H #define QTCONCURRENT_FILTER_H -#include +#include #ifndef QT_NO_CONCURRENT diff --git a/src/concurrent/qtconcurrentfilterkernel.h b/src/concurrent/qtconcurrentfilterkernel.h index 71112cb5a34..9bb4396f41e 100644 --- a/src/concurrent/qtconcurrentfilterkernel.h +++ b/src/concurrent/qtconcurrentfilterkernel.h @@ -42,7 +42,7 @@ #ifndef QTCONCURRENT_FILTERKERNEL_H #define QTCONCURRENT_FILTERKERNEL_H -#include +#include #ifndef QT_NO_CONCURRENT diff --git a/src/concurrent/qtconcurrentfunctionwrappers.h b/src/concurrent/qtconcurrentfunctionwrappers.h index 9b86b73f6d3..c87770f6c06 100644 --- a/src/concurrent/qtconcurrentfunctionwrappers.h +++ b/src/concurrent/qtconcurrentfunctionwrappers.h @@ -42,7 +42,7 @@ #ifndef QTCONCURRENT_FUNCTIONWRAPPERS_H #define QTCONCURRENT_FUNCTIONWRAPPERS_H -#include +#include #ifndef QT_NO_CONCURRENT diff --git a/src/concurrent/qtconcurrentiteratekernel.h b/src/concurrent/qtconcurrentiteratekernel.h index a28bc31a645..6776ff03469 100644 --- a/src/concurrent/qtconcurrentiteratekernel.h +++ b/src/concurrent/qtconcurrentiteratekernel.h @@ -42,7 +42,7 @@ #ifndef QTCONCURRENT_ITERATEKERNEL_H #define QTCONCURRENT_ITERATEKERNEL_H -#include +#include #ifndef QT_NO_CONCURRENT @@ -80,7 +80,7 @@ namespace QtConcurrent { management is done on the basis of the median of several timing measuremens, and it is done induvidualy for each thread. */ -class Q_CORE_EXPORT BlockSizeManager +class Q_CONCURRENT_EXPORT BlockSizeManager { public: BlockSizeManager(int iterationCount); diff --git a/src/concurrent/qtconcurrentmap.h b/src/concurrent/qtconcurrentmap.h index 8a5557183d9..4e51816b587 100644 --- a/src/concurrent/qtconcurrentmap.h +++ b/src/concurrent/qtconcurrentmap.h @@ -42,7 +42,7 @@ #ifndef QTCONCURRENT_MAP_H #define QTCONCURRENT_MAP_H -#include +#include #ifndef QT_NO_CONCURRENT diff --git a/src/concurrent/qtconcurrentmapkernel.h b/src/concurrent/qtconcurrentmapkernel.h index ceeaa6e3b35..a1ca2b60fd8 100644 --- a/src/concurrent/qtconcurrentmapkernel.h +++ b/src/concurrent/qtconcurrentmapkernel.h @@ -42,7 +42,7 @@ #ifndef QTCONCURRENT_MAPKERNEL_H #define QTCONCURRENT_MAPKERNEL_H -#include +#include #ifndef QT_NO_CONCURRENT diff --git a/src/concurrent/qtconcurrentmedian.h b/src/concurrent/qtconcurrentmedian.h index 78fc3d97c88..9a17ecb3b47 100644 --- a/src/concurrent/qtconcurrentmedian.h +++ b/src/concurrent/qtconcurrentmedian.h @@ -42,7 +42,7 @@ #ifndef QTCONCURRENT_MEDIAN_H #define QTCONCURRENT_MEDIAN_H -#include +#include #ifndef QT_NO_CONCURRENT diff --git a/src/concurrent/qtconcurrentreducekernel.h b/src/concurrent/qtconcurrentreducekernel.h index ddf56298adb..4eaa767b1dd 100644 --- a/src/concurrent/qtconcurrentreducekernel.h +++ b/src/concurrent/qtconcurrentreducekernel.h @@ -42,7 +42,7 @@ #ifndef QTCONCURRENT_REDUCEKERNEL_H #define QTCONCURRENT_REDUCEKERNEL_H -#include +#include #ifndef QT_NO_CONCURRENT diff --git a/src/concurrent/qtconcurrentresultstore.h b/src/concurrent/qtconcurrentresultstore.h index d39a45bba33..bb7b39311fe 100644 --- a/src/concurrent/qtconcurrentresultstore.h +++ b/src/concurrent/qtconcurrentresultstore.h @@ -42,7 +42,7 @@ #ifndef QTCONCURRENT_RESULTSTORE_H #define QTCONCURRENT_RESULTSTORE_H -#include +#include #ifndef QT_NO_QFUTURE @@ -78,7 +78,7 @@ public: const void *result; // if count is 0 it's a result, otherwise it's a vector. }; -class Q_CORE_EXPORT ResultIteratorBase +class Q_CONCURRENT_EXPORT ResultIteratorBase { public: ResultIteratorBase(); @@ -119,7 +119,7 @@ public: } }; -class Q_CORE_EXPORT ResultStoreBase +class Q_CONCURRENT_EXPORT ResultStoreBase { public: ResultStoreBase(); diff --git a/src/concurrent/qtconcurrentrun.h b/src/concurrent/qtconcurrentrun.h index d7285388da6..0e46db868d6 100644 --- a/src/concurrent/qtconcurrentrun.h +++ b/src/concurrent/qtconcurrentrun.h @@ -43,7 +43,7 @@ #ifndef QTCONCURRENT_RUN_H #define QTCONCURRENT_RUN_H -#include +#include #ifndef QT_NO_CONCURRENT diff --git a/src/concurrent/qtconcurrentrunbase.h b/src/concurrent/qtconcurrentrunbase.h index 2105437edeb..2637abfc2e7 100644 --- a/src/concurrent/qtconcurrentrunbase.h +++ b/src/concurrent/qtconcurrentrunbase.h @@ -42,7 +42,7 @@ #ifndef QTCONCURRENT_RUNBASE_H #define QTCONCURRENT_RUNBASE_H -#include +#include #ifndef QT_NO_CONCURRENT diff --git a/src/concurrent/qtconcurrentstoredfunctioncall.h b/src/concurrent/qtconcurrentstoredfunctioncall.h index c311a72427c..d980e256235 100644 --- a/src/concurrent/qtconcurrentstoredfunctioncall.h +++ b/src/concurrent/qtconcurrentstoredfunctioncall.h @@ -43,7 +43,7 @@ #ifndef QTCONCURRENT_STOREDFUNCTIONCALL_H #define QTCONCURRENT_STOREDFUNCTIONCALL_H -#include +#include #ifndef QT_NO_CONCURRENT #include diff --git a/src/concurrent/qtconcurrentthreadengine.h b/src/concurrent/qtconcurrentthreadengine.h index 20e86f59b6d..3ecdc84600e 100644 --- a/src/concurrent/qtconcurrentthreadengine.h +++ b/src/concurrent/qtconcurrentthreadengine.h @@ -42,7 +42,7 @@ #ifndef QTCONCURRENT_THREADENGINE_H #define QTCONCURRENT_THREADENGINE_H -#include +#include #ifndef QT_NO_CONCURRENT @@ -93,7 +93,7 @@ enum ThreadFunctionResult { ThrottleThread, ThreadFinished }; // Can be run in three modes: single threaded, multi-threaded blocking // and multi-threaded asynchronous. // The code for the single threaded mode is -class Q_CORE_EXPORT ThreadEngineBase: public QRunnable +class Q_CONCURRENT_EXPORT ThreadEngineBase: public QRunnable { public: // Public API: diff --git a/src/corelib/Qt5CoreConfigExtras.cmake.in b/src/corelib/Qt5CoreConfigExtras.cmake.in index e97493f65d0..440d5e92bb3 100644 --- a/src/corelib/Qt5CoreConfigExtras.cmake.in +++ b/src/corelib/Qt5CoreConfigExtras.cmake.in @@ -5,3 +5,14 @@ get_filename_component(_qt5_corelib_install_prefix ${CMAKE_CURRENT_LIST_DIR}/$${ set(QT_QMAKE_EXECUTABLE \"${_qt5_corelib_install_prefix}/$$CMAKE_BIN_DIR/qmake$$CMAKE_BIN_SUFFIX\") set(QT_MOC_EXECUTABLE \"${_qt5_corelib_install_prefix}/$$CMAKE_BIN_DIR/moc$$CMAKE_BIN_SUFFIX\") set(QT_RCC_EXECUTABLE \"${_qt5_corelib_install_prefix}/$$CMAKE_BIN_DIR/rcc$$CMAKE_BIN_SUFFIX\") + +list(APPEND Qt5Core_INCLUDE_DIRS \"${_qt5_corelib_install_prefix}/mkspecs/default\") + +if (NOT \"$${CMAKE_ADD_FPIE_FLAGS}\" STREQUAL \"\") + set(Qt5Core_COMPILE_FLAGS "-fPIE") +endif() + +if (NOT \"$$QT_NAMESPACE\" STREQUAL \"\") + list(APPEND Qt5Core_DEFINITIONS -DQT_NAMESPACE=$$QT_NAMESPACE) + list(APPEND Qt5Core_COMPILE_DEFINITIONS QT_NAMESPACE=$$QT_NAMESPACE) +endif() diff --git a/src/corelib/animation/qabstractanimation.cpp b/src/corelib/animation/qabstractanimation.cpp index 30f071498ed..04df52c6f01 100644 --- a/src/corelib/animation/qabstractanimation.cpp +++ b/src/corelib/animation/qabstractanimation.cpp @@ -248,6 +248,12 @@ QUnifiedTimer *QUnifiedTimer::instance() return instance(true); } +void QUnifiedTimer::maybeUpdateAnimationsToCurrentTime() +{ + if (time.elapsed() - lastTick > 50) + updateAnimationTimers(driver->elapsed()); +} + void QUnifiedTimer::updateAnimationTimers(qint64 currentTick) { //setCurrentTime can get this called again while we're the for loop. At least with pauseAnimations @@ -590,7 +596,7 @@ void QAnimationTimer::startAnimations() startAnimationPending = false; //force timer to update, which prevents large deltas for our newly added animations if (!animations.isEmpty()) - QUnifiedTimer::instance()->updateAnimationTimers(-1); + QUnifiedTimer::instance()->maybeUpdateAnimationsToCurrentTime(); //we transfer the waiting animations into the "really running" state animations += animationsToStart; diff --git a/src/corelib/animation/qabstractanimation.h b/src/corelib/animation/qabstractanimation.h index 70200c4064d..34ddbc606f5 100644 --- a/src/corelib/animation/qabstractanimation.h +++ b/src/corelib/animation/qabstractanimation.h @@ -149,7 +149,7 @@ public: bool isRunning() const; - qint64 elapsed() const; + virtual qint64 elapsed() const; Q_SIGNALS: void started(); diff --git a/src/corelib/animation/qabstractanimation_p.h b/src/corelib/animation/qabstractanimation_p.h index c4d53342c25..02a3c02ddce 100644 --- a/src/corelib/animation/qabstractanimation_p.h +++ b/src/corelib/animation/qabstractanimation_p.h @@ -185,6 +185,7 @@ public: bool canUninstallAnimationDriver(QAnimationDriver *driver); void restart(); + void maybeUpdateAnimationsToCurrentTime(); void updateAnimationTimers(qint64 currentTick); //useful for profiling/debugging diff --git a/src/corelib/arch/alpha/arch.pri b/src/corelib/arch/alpha/arch.pri deleted file mode 100644 index 448a531f073..00000000000 --- a/src/corelib/arch/alpha/arch.pri +++ /dev/null @@ -1,4 +0,0 @@ -# -# Alpha architecture -# -!*-g++*:SOURCES += $$QT_ARCH_CPP/qatomic_alpha.s diff --git a/src/corelib/arch/alpha/qatomic_alpha.s b/src/corelib/arch/alpha/qatomic_alpha.s deleted file mode 100644 index 3bccd128493..00000000000 --- a/src/corelib/arch/alpha/qatomic_alpha.s +++ /dev/null @@ -1,239 +0,0 @@ -;/**************************************************************************** -;** -;** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -;** Contact: http://www.qt-project.org/ -;** -;** This file is part of the QtGui module of the Qt Toolkit. -;** -;** $QT_BEGIN_LICENSE:LGPL$ -;** GNU Lesser General Public License Usage -;** 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. -;** -;** GNU General Public License Usage -;** Alternatively, this file may be used under the terms of the GNU General -;** Public License version 3.0 as published by the Free Software Foundation -;** and appearing in the file LICENSE.GPL included in the packaging of this -;** file. Please review the following information to ensure the GNU General -;** Public License version 3.0 requirements will be met: -;** http://www.gnu.org/copyleft/gpl.html. -;** -;** Other Usage -;** Alternatively, this file may be used in accordance with the terms and -;** conditions contained in a signed written agreement between you and Nokia. -;** -;** -;** -;** -;** -;** -;** $QT_END_LICENSE$ -;** -;****************************************************************************/ - .set noreorder - .set volatile - .set noat - .arch ev4 - .text - .align 2 - .align 4 - .globl q_atomic_test_and_set_int - .ent q_atomic_test_and_set_int -q_atomic_test_and_set_int: - .frame $30,0,$26,0 - .prologue 0 -1: ldl_l $0,0($16) - cmpeq $0,$17,$0 - beq $0,3f - mov $18,$0 - stl_c $0,0($16) - beq $0,2f - br 3f -2: br 1b -3: addl $31,$0,$0 - ret $31,($26),1 - .end q_atomic_test_and_set_int - .align 2 - .align 4 - .globl q_atomic_test_and_set_acquire_int - .ent q_atomic_test_and_set_acquire_int -q_atomic_test_and_set_acquire_int: - .frame $30,0,$26,0 - .prologue 0 -1: ldl_l $0,0($16) - cmpeq $0,$17,$0 - beq $0,3f - mov $18,$0 - stl_c $0,0($16) - beq $0,2f - br 3f -2: br 1b -3: mb - addl $31,$0,$0 - ret $31,($26),1 - .end q_atomic_test_and_set_acquire_int - .align 2 - .align 4 - .globl q_atomic_test_and_set_release_int - .ent q_atomic_test_and_set_release_int -q_atomic_test_and_set_release_int: - .frame $30,0,$26,0 - .prologue 0 - mb -1: ldl_l $0,0($16) - cmpeq $0,$17,$0 - beq $0,3f - mov $18,$0 - stl_c $0,0($16) - beq $0,2f - br 3f -2: br 1b -3: addl $31,$0,$0 - ret $31,($26),1 - .end q_atomic_test_and_set_release_int - .align 2 - .align 4 - .globl q_atomic_test_and_set_ptr - .ent q_atomic_test_and_set_ptr -q_atomic_test_and_set_ptr: - .frame $30,0,$26,0 - .prologue 0 -1: ldq_l $0,0($16) - cmpeq $0,$17,$0 - beq $0,3f - mov $18,$0 - stq_c $0,0($16) - beq $0,2f - br 3f -2: br 1b -3: addl $31,$0,$0 - ret $31,($26),1 - .end q_atomic_test_and_set_ptr - .align 2 - .align 4 - .globl q_atomic_increment - .ent q_atomic_increment -q_atomic_increment: - .frame $30,0,$26,0 - .prologue 0 -1: ldl_l $0,0($16) - addl $0,1,$1 - stl_c $1,0($16) - beq $1,2f - br 3f -2: br 1b -3: addl $31,$0,$0 - cmpeq $0,$1,$0 - xor $0,1,$0 - ret $31,($26),1 - .end q_atomic_increment - .align 2 - .align 4 - .globl q_atomic_decrement - .ent q_atomic_decrement -q_atomic_decrement: - .frame $30,0,$26,0 - .prologue 0 -1: ldl_l $0,0($16) - subl $0,1,$1 - stl_c $1,0($16) - beq $1,2f - br 3f -2: br 1b -3: addl $31,$0,$0 - cmpeq $0,1,$0 - xor $0,1,$0 - ret $31,($26),1 - .end q_atomic_decrement - .align 2 - .align 4 - .globl q_atomic_set_int - .ent q_atomic_set_int -q_atomic_set_int: - .frame $30,0,$26,0 - .prologue 0 -1: ldl_l $0,0($16) - mov $17,$1 - stl_c $1,0($16) - beq $1,2f - br 3f -2: br 1b -3: addl $31,$0,$0 - ret $31,($26),1 - .end q_atomic_set_int - .align 2 - .align 4 - .globl q_atomic_set_ptr - .ent q_atomic_set_ptr -q_atomic_set_ptr: - .frame $30,0,$26,0 - .prologue 0 -1: ldq_l $0,0($16) - mov $17,$1 - stq_c $1,0($16) - beq $1,2f - br 3f -2: br 1b -3: ret $31,($26),1 - .end q_atomic_set_ptr - - .align 2 - .align 4 - .globl q_atomic_fetch_and_add_int - .ent q_atomic_fetch_and_add_int -q_atomic_fetch_and_add_int: - .frame $30,0,$26,0 - .prologue 0 -1: ldl_l $0,0($16) - addl $0,$17,$1 - stl_c $1,0($16) - beq $1,2f - br 3f -2: br 1b -3: addl $31,$0,$0 - ret $31,($26),1 - .end q_atomic_fetch_and_add_int - - .align 2 - .align 4 - .globl q_atomic_fetch_and_add_acquire_int - .ent q_atomic_fetch_and_add_acquire_int -q_atomic_fetch_and_add_acquire_int: - .frame $30,0,$26,0 - .prologue 0 -1: ldl_l $0,0($16) - addl $0,$17,$1 - stl_c $1,0($16) - beq $1,2f - br 3f -2: br 1b -3: mb - addl $31,$0,$0 - ret $31,($26),1 - .end q_atomic_fetch_and_add_acquire_int - - .align 2 - .align 4 - .globl q_atomic_fetch_and_add_release_int - .ent q_atomic_fetch_and_add_release_int -q_atomic_fetch_and_add_release_int: - .frame $30,0,$26,0 - .prologue 0 - mb -1: ldl_l $0,0($16) - addl $0,$17,$1 - stl_c $1,0($16) - beq $1,2f - br 3f -2: br 1b -3: addl $31,$0,$0 - ret $31,($26),1 - .end q_atomic_fetch_and_add_release_int diff --git a/src/corelib/arch/arch.pri b/src/corelib/arch/arch.pri index 62b07a4a996..c6110870431 100644 --- a/src/corelib/arch/arch.pri +++ b/src/corelib/arch/arch.pri @@ -1,39 +1,27 @@ -win32:HEADERS += arch/qatomic_msvc.h \ - arch/qatomic_generic.h - -win32-g++*:HEADERS += arch/qatomic_i386.h \ - arch/qatomic_x86_64.h - -mac:HEADERS += arch/qatomic_i386.h \ - arch/qatomic_x86_64.h \ - arch/qatomic_generic.h - +win32|wince:HEADERS += arch/qatomic_msvc.h vxworks:HEADERS += arch/qatomic_vxworks.h - integrity:HEADERS += arch/qatomic_integrity.h -!wince*:!win32:!mac:HEADERS += arch/qatomic_alpha.h \ - arch/qatomic_ia64.h \ - arch/qatomic_parisc.h \ - arch/qatomic_sparc.h \ - arch/qatomic_arch.h \ - arch/qatomic_generic.h \ - arch/qatomic_powerpc.h \ - arch/qatomic_arm.h \ - arch/qatomic_armv5.h \ - arch/qatomic_armv6.h \ - arch/qatomic_armv7.h \ - arch/qatomic_i386.h \ - arch/qatomic_mips.h \ - arch/qatomic_s390.h \ - arch/qatomic_x86_64.h \ - arch/qatomic_sh.h \ - arch/qatomic_sh4a.h \ - arch/qatomic_gcc.h \ - arch/qatomic_cxx11.h +HEADERS += \ + arch/qatomic_alpha.h \ + arch/qatomic_armv5.h \ + arch/qatomic_armv6.h \ + arch/qatomic_armv7.h \ + arch/qatomic_bfin.h \ + arch/qatomic_bootstrap.h \ + arch/qatomic_i386.h \ + arch/qatomic_ia64.h \ + arch/qatomic_mips.h \ + arch/qatomic_power.h \ + arch/qatomic_s390.h \ + arch/qatomic_sh4a.h \ + arch/qatomic_sparc.h \ + arch/qatomic_x86_64.h \ + arch/qatomic_gcc.h \ + arch/qatomic_cxx11.h -QT_ARCH_CPP = $$QT_SOURCE_TREE/src/corelib/arch/$$QT_ARCH -exists($$QT_ARCH_CPP) { - DEPENDPATH += $$QT_ARCH_CPP - include($$QT_ARCH_CPP/arch.pri, "", true) +unix { + # fallback implementation when no other appropriate qatomic_*.h exists + HEADERS += arch/qatomic_unix.h + SOURCES += arch/qatomic_unix.cpp } diff --git a/src/corelib/arch/generic/arch.pri b/src/corelib/arch/generic/arch.pri deleted file mode 100644 index 8fee63fa5da..00000000000 --- a/src/corelib/arch/generic/arch.pri +++ /dev/null @@ -1,6 +0,0 @@ -# -# 'generic' architecture -# - -unix:SOURCES += qatomic_generic_unix.cpp -win32:SOURCES += qatomic_generic_windows.cpp diff --git a/src/corelib/arch/generic/qatomic_generic_unix.cpp b/src/corelib/arch/generic/qatomic_generic_unix.cpp deleted file mode 100644 index eb1498fcebc..00000000000 --- a/src/corelib/arch/generic/qatomic_generic_unix.cpp +++ /dev/null @@ -1,120 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the QtCore module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qplatformdefs.h" - -#include - -QT_BEGIN_NAMESPACE -static pthread_mutex_t qAtomicMutex = PTHREAD_MUTEX_INITIALIZER; - -Q_CORE_EXPORT -bool QBasicAtomicInt_testAndSetOrdered(volatile int *_q_value, int expectedValue, int newValue) -{ - bool returnValue = false; - pthread_mutex_lock(&qAtomicMutex); - if (*_q_value == expectedValue) { - *_q_value = newValue; - returnValue = true; - } - pthread_mutex_unlock(&qAtomicMutex); - return returnValue; -} - -Q_CORE_EXPORT -int QBasicAtomicInt_fetchAndStoreOrdered(volatile int *_q_value, int newValue) -{ - int returnValue; - pthread_mutex_lock(&qAtomicMutex); - returnValue = *_q_value; - *_q_value = newValue; - pthread_mutex_unlock(&qAtomicMutex); - return returnValue; -} - -Q_CORE_EXPORT -int QBasicAtomicInt_fetchAndAddOrdered(volatile int *_q_value, int valueToAdd) -{ - int returnValue; - pthread_mutex_lock(&qAtomicMutex); - returnValue = *_q_value; - *_q_value += valueToAdd; - pthread_mutex_unlock(&qAtomicMutex); - return returnValue; -} - -Q_CORE_EXPORT -bool QBasicAtomicPointer_testAndSetOrdered(void * volatile *_q_value, - void *expectedValue, - void *newValue) -{ - bool returnValue = false; - pthread_mutex_lock(&qAtomicMutex); - if (*_q_value == expectedValue) { - *_q_value = newValue; - returnValue = true; - } - pthread_mutex_unlock(&qAtomicMutex); - return returnValue; -} - -Q_CORE_EXPORT -void *QBasicAtomicPointer_fetchAndStoreOrdered(void * volatile *_q_value, void *newValue) -{ - void *returnValue; - pthread_mutex_lock(&qAtomicMutex); - returnValue = *_q_value; - *_q_value = newValue; - pthread_mutex_unlock(&qAtomicMutex); - return returnValue; -} - -Q_CORE_EXPORT -void *QBasicAtomicPointer_fetchAndAddOrdered(void * volatile *_q_value, qptrdiff valueToAdd) -{ - void *returnValue; - pthread_mutex_lock(&qAtomicMutex); - returnValue = *_q_value; - *_q_value = reinterpret_cast(returnValue) + valueToAdd; - pthread_mutex_unlock(&qAtomicMutex); - return returnValue; -} -QT_END_NAMESPACE diff --git a/src/corelib/arch/generic/qatomic_generic_windows.cpp b/src/corelib/arch/generic/qatomic_generic_windows.cpp deleted file mode 100644 index dafc8133b20..00000000000 --- a/src/corelib/arch/generic/qatomic_generic_windows.cpp +++ /dev/null @@ -1,131 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the QtCore module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qplatformdefs.h" - -#include - - -class QCriticalSection -{ -public: - QCriticalSection() { InitializeCriticalSection(§ion); } - ~QCriticalSection() { DeleteCriticalSection(§ion); } - void lock() { EnterCriticalSection(§ion); } - void unlock() { LeaveCriticalSection(§ion); } - -private: - CRITICAL_SECTION section; -}; - -static QCriticalSection qAtomicCriticalSection; - -Q_CORE_EXPORT -bool QBasicAtomicInt_testAndSetOrdered(volatile int *_q_value, int expectedValue, int newValue) -{ - bool returnValue = false; - qAtomicCriticalSection.lock(); - if (*_q_value == expectedValue) { - *_q_value = newValue; - returnValue = true; - } - qAtomicCriticalSection.unlock(); - return returnValue; -} - -Q_CORE_EXPORT -int QBasicAtomicInt_fetchAndStoreOrdered(volatile int *_q_value, int newValue) -{ - int returnValue; - qAtomicCriticalSection.lock(); - returnValue = *_q_value; - *_q_value = newValue; - qAtomicCriticalSection.unlock(); - return returnValue; -} - -Q_CORE_EXPORT -int QBasicAtomicInt_fetchAndAddOrdered(volatile int *_q_value, int valueToAdd) -{ - int returnValue; - qAtomicCriticalSection.lock(); - returnValue = *_q_value; - *_q_value += valueToAdd; - qAtomicCriticalSection.unlock(); - return returnValue; -} - -Q_CORE_EXPORT -bool QBasicAtomicPointer_testAndSetOrdered(void * volatile *_q_value, - void *expectedValue, - void *newValue) -{ - bool returnValue = false; - qAtomicCriticalSection.lock(); - if (*_q_value == expectedValue) { - *_q_value = newValue; - returnValue = true; - } - qAtomicCriticalSection.unlock(); - return returnValue; -} - -Q_CORE_EXPORT -void *QBasicAtomicPointer_fetchAndStoreOrdered(void * volatile *_q_value, void *newValue) -{ - void *returnValue; - qAtomicCriticalSection.lock(); - returnValue = *_q_value; - *_q_value = newValue; - qAtomicCriticalSection.unlock(); - return returnValue; -} - -Q_CORE_EXPORT -void *QBasicAtomicPointer_fetchAndAddOrdered(void * volatile *_q_value, qptrdiff valueToAdd) -{ - void *returnValue; - qAtomicCriticalSection.lock(); - returnValue = *_q_value; - *_q_value = reinterpret_cast(returnValue) + valueToAdd; - qAtomicCriticalSection.unlock(); - return returnValue; -} diff --git a/src/corelib/arch/parisc/arch.pri b/src/corelib/arch/parisc/arch.pri deleted file mode 100644 index fab2897f04d..00000000000 --- a/src/corelib/arch/parisc/arch.pri +++ /dev/null @@ -1,5 +0,0 @@ -# -# HP PA-RISC architecture -# -SOURCES += $$QT_ARCH_CPP/q_ldcw.s \ - $$QT_ARCH_CPP/qatomic_parisc.cpp diff --git a/src/corelib/arch/parisc/q_ldcw.s b/src/corelib/arch/parisc/q_ldcw.s deleted file mode 100644 index 8af2861c504..00000000000 --- a/src/corelib/arch/parisc/q_ldcw.s +++ /dev/null @@ -1,62 +0,0 @@ -;/**************************************************************************** -;** -;** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -;** Contact: http://www.qt-project.org/ -;** -;** This file is part of the QtGui module of the Qt Toolkit. -;** -;** $QT_BEGIN_LICENSE:LGPL$ -;** GNU Lesser General Public License Usage -;** 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. -;** -;** GNU General Public License Usage -;** Alternatively, this file may be used under the terms of the GNU General -;** Public License version 3.0 as published by the Free Software Foundation -;** and appearing in the file LICENSE.GPL included in the packaging of this -;** file. Please review the following information to ensure the GNU General -;** Public License version 3.0 requirements will be met: -;** http://www.gnu.org/copyleft/gpl.html. -;** -;** Other Usage -;** Alternatively, this file may be used in accordance with the terms and -;** conditions contained in a signed written agreement between you and Nokia. -;** -;** -;** -;** -;** -;** -;** $QT_END_LICENSE$ -;** -;****************************************************************************/ - .SPACE $PRIVATE$ - .SUBSPA $DATA$,QUAD=1,ALIGN=8,ACCESS=31 - .SUBSPA $BSS$,QUAD=1,ALIGN=8,ACCESS=31,ZERO,SORT=82 - .SPACE $TEXT$ - .SUBSPA $LIT$,QUAD=0,ALIGN=8,ACCESS=44 - .SUBSPA $CODE$,QUAD=0,ALIGN=8,ACCESS=44,CODE_ONLY - .IMPORT $global$,DATA - .IMPORT $$dyncall,MILLICODE - .SPACE $TEXT$ - .SUBSPA $CODE$ - - .align 4 - .EXPORT q_ldcw,ENTRY,PRIV_LEV=3,ARGW0=GR,RTNVAL=GR -q_ldcw - .PROC - .CALLINFO FRAME=0,CALLS,SAVE_RP - .ENTRY - ldcw 0(%r26),%r1 - bv %r0(%r2) - copy %r1,%r28 - .EXIT - .PROCEND diff --git a/src/corelib/arch/powerpc/arch.pri b/src/corelib/arch/powerpc/arch.pri deleted file mode 100644 index 1989ac73a7d..00000000000 --- a/src/corelib/arch/powerpc/arch.pri +++ /dev/null @@ -1,10 +0,0 @@ -# -# PowerPC architecture -# -!*-g++* { - *-64 { - SOURCES += $$QT_ARCH_CPP/qatomic64.s - } else { - SOURCES += $$QT_ARCH_CPP/qatomic32.s - } -} diff --git a/src/corelib/arch/powerpc/qatomic32.s b/src/corelib/arch/powerpc/qatomic32.s deleted file mode 100644 index 8e2dbe2e2f7..00000000000 --- a/src/corelib/arch/powerpc/qatomic32.s +++ /dev/null @@ -1,525 +0,0 @@ -############################################################################ -## -## Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -## Contact: http://www.qt-project.org/ -## -## This file is part of the QtGui module of the Qt Toolkit. -## -## $QT_BEGIN_LICENSE:LGPL$ -## GNU Lesser General Public License Usage -## 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. -## -## GNU General Public License Usage -## Alternatively, this file may be used under the terms of the GNU General -## Public License version 3.0 as published by the Free Software Foundation -## and appearing in the file LICENSE.GPL included in the packaging of this -## file. Please review the following information to ensure the GNU General -## Public License version 3.0 requirements will be met: -## http://www.gnu.org/copyleft/gpl.html. -## -## Other Usage -## Alternatively, this file may be used in accordance with the terms and -## conditions contained in a signed written agreement between you and Nokia. -## -## -## -## -## -## -## $QT_END_LICENSE$ -## -############################################################################ - .machine "ppc" - .toc - .csect .text[PR] - - .align 2 - .globl q_atomic_test_and_set_int - .globl .q_atomic_test_and_set_int - .csect q_atomic_test_and_set_int[DS],3 -q_atomic_test_and_set_int: - .long .q_atomic_test_and_set_int,TOC[tc0],0 - .csect .text[PR] -.q_atomic_test_and_set_int: - lwarx 6,0,3 - xor. 6,6,4 - bne $+12 - stwcx. 5,0,3 - bne- $-16 - subfic 3,6,0 - adde 3,3,6 - blr -LT..q_atomic_test_and_set_int: - .long 0 - .byte 0,9,32,64,0,0,3,0 - .long 0 - .long LT..q_atomic_test_and_set_int-.q_atomic_test_and_set_int - .short 25 - .byte "q_atomic_test_and_set_int" - .align 2 - - .align 2 - .globl q_atomic_test_and_set_acquire_int - .globl .q_atomic_test_and_set_acquire_int - .csect q_atomic_test_and_set_acquire_int[DS],3 -q_atomic_test_and_set_acquire_int: - .long .q_atomic_test_and_set_acquire_int,TOC[tc0],0 - .csect .text[PR] -.q_atomic_test_and_set_acquire_int: - lwarx 6,0,3 - xor. 6,6,4 - bne $+16 - stwcx. 5,0,3 - bne- $-16 - isync - subfic 3,6,0 - adde 3,3,6 - blr -LT..q_atomic_test_and_set_acquire_int: - .long 0 - .byte 0,9,32,64,0,0,3,0 - .long 0 - .long LT..q_atomic_test_and_set_acquire_int-.q_atomic_test_and_set_acquire_int - .short 33 - .byte "q_atomic_test_and_set_acquire_int" - .align 2 - - .align 2 - .globl q_atomic_test_and_set_release_int - .globl .q_atomic_test_and_set_release_int - .csect q_atomic_test_and_set_release_int[DS],3 -q_atomic_test_and_set_release_int: - .long .q_atomic_test_and_set_release_int,TOC[tc0],0 - .csect .text[PR] -.q_atomic_test_and_set_release_int: - eieio - lwarx 6,0,3 - xor. 6,6,4 - bne $+12 - stwcx. 5,0,3 - bne- $-16 - subfic 3,6,0 - adde 3,3,6 - blr -LT..q_atomic_test_and_set_release_int: - .long 0 - .byte 0,9,32,64,0,0,3,0 - .long 0 - .long LT..q_atomic_test_and_set_release_int-.q_atomic_test_and_set_release_int - .short 33 - .byte "q_atomic_test_and_set_release_int" - .align 2 - - .align 2 - .globl q_atomic_test_and_set_ptr - .globl .q_atomic_test_and_set_ptr - .csect q_atomic_test_and_set_ptr[DS],3 -q_atomic_test_and_set_ptr: - .long .q_atomic_test_and_set_ptr,TOC[tc0],0 - .csect .text[PR] -.q_atomic_test_and_set_ptr: - lwarx 6,0,3 - xor. 6,6,4 - bne $+12 - stwcx. 5,0,3 - bne- $-16 - subfic 3,6,0 - adde 3,3,6 - blr -LT..q_atomic_test_and_set_ptr: - .long 0 - .byte 0,9,32,64,0,0,3,0 - .long 0 - .long LT..q_atomic_test_and_set_ptr-.q_atomic_test_and_set_ptr - .short 25 - .byte "q_atomic_test_and_set_ptr" - .align 2 - - .align 2 - .globl q_atomic_test_and_set_acquire_ptr - .globl .q_atomic_test_and_set_acquire_ptr - .csect q_atomic_test_and_set_acquire_ptr[DS],3 -q_atomic_test_and_set_acquire_ptr: - .long .q_atomic_test_and_set_acquire_ptr,TOC[tc0],0 - .csect .text[PR] -.q_atomic_test_and_set_acquire_ptr: - lwarx 6,0,3 - xor. 6,6,4 - bne $+16 - stwcx. 5,0,3 - bne- $-16 - isync - subfic 3,6,0 - adde 3,3,6 - blr -LT..q_atomic_test_and_set_acquire_ptr: - .long 0 - .byte 0,9,32,64,0,0,3,0 - .long 0 - .long LT..q_atomic_test_and_set_acquire_ptr-.q_atomic_test_and_set_acquire_ptr - .short 25 - .byte "q_atomic_test_and_set_acquire_ptr" - .align 2 - - .align 2 - .globl q_atomic_test_and_set_release_ptr - .globl .q_atomic_test_and_set_release_ptr - .csect q_atomic_test_and_set_release_ptr[DS],3 -q_atomic_test_and_set_release_ptr: - .long .q_atomic_test_and_set_release_ptr,TOC[tc0],0 - .csect .text[PR] -.q_atomic_test_and_set_release_ptr: - eieio - lwarx 6,0,3 - xor. 6,6,4 - bne $+12 - stwcx. 5,0,3 - bne- $-16 - subfic 3,6,0 - adde 3,3,6 - blr -LT..q_atomic_test_and_set_release_ptr: - .long 0 - .byte 0,9,32,64,0,0,3,0 - .long 0 - .long LT..q_atomic_test_and_set_release_ptr-.q_atomic_test_and_set_release_ptr - .short 33 - .byte "q_atomic_test_and_set_release_ptr" - .align 2 - - .align 2 - .globl q_atomic_increment - .globl .q_atomic_increment - .csect q_atomic_increment[DS],3 -q_atomic_increment: - .long .q_atomic_increment,TOC[tc0],0 - .csect .text[PR] -.q_atomic_increment: - lwarx 4,0,3 - addi 4,4,1 - stwcx. 4,0,3 - bne- $-12 - mr 3,4 - blr -LT..q_atomic_increment: - .long 0 - .byte 0,9,32,64,0,0,1,0 - .long 0 - .long LT..q_atomic_increment-.q_atomic_increment - .short 18 - .byte "q_atomic_increment" - .align 2 - - .align 2 - .globl q_atomic_decrement - .globl .q_atomic_decrement - .csect q_atomic_decrement[DS],3 -q_atomic_decrement: - .long .q_atomic_decrement,TOC[tc0],0 - .csect .text[PR] -.q_atomic_decrement: - lwarx 4,0,3 - subi 4,4,1 - stwcx. 4,0,3 - bne- $-12 - mr 3,4 - blr -LT..q_atomic_decrement: - .long 0 - .byte 0,9,32,64,0,0,1,0 - .long 0 - .long LT..q_atomic_decrement-.q_atomic_decrement - .short 18 - .byte "q_atomic_decrement" - .align 2 - - .align 2 - .globl q_atomic_set_int - .globl .q_atomic_set_int - .csect q_atomic_set_int[DS],3 -q_atomic_set_int: - .long .q_atomic_set_int,TOC[tc0],0 - .csect .text[PR] -.q_atomic_set_int: - lwarx 5,0,3 - stwcx. 4,0,3 - bne- $-8 - mr 3,5 - blr -LT..q_atomic_set_int: - .long 0 - .byte 0,9,32,64,0,0,2,0 - .long 0 - .long LT..q_atomic_set_int-.q_atomic_set_int - .short 16 - .byte "q_atomic_set_int" - .align 2 - - .align 2 - .globl q_atomic_fetch_and_store_acquire_int - .globl .q_atomic_fetch_and_store_acquire_int - .csect q_atomic_fetch_and_store_acquire_int[DS],3 -q_atomic_fetch_and_store_acquire_int: - .long .q_atomic_fetch_and_store_acquire_int,TOC[tc0],0 - .csect .text[PR] -.q_atomic_fetch_and_store_acquire_int: - lwarx 5,0,3 - stwcx. 4,0,3 - bne- $-8 - isync - mr 3,5 - blr -LT..q_atomic_fetch_and_store_acquire_int: - .long 0 - .byte 0,9,32,64,0,0,2,0 - .long 0 - .long LT..q_atomic_fetch_and_store_acquire_int-.q_atomic_fetch_and_store_acquire_int - .short 16 - .byte "q_atomic_fetch_and_store_acquire_int" - .align 2 - - .align 2 - .globl q_atomic_fetch_and_store_release_int - .globl .q_atomic_fetch_and_store_release_int - .csect q_atomic_fetch_and_store_release_int[DS],3 -q_atomic_fetch_and_store_release_int: - .long .q_atomic_fetch_and_store_release_int,TOC[tc0],0 - .csect .text[PR] -.q_atomic_fetch_and_store_release_int: - eieio - lwarx 5,0,3 - stwcx. 4,0,3 - bne- $-8 - mr 3,5 - blr -LT..q_atomic_fetch_and_store_release_int: - .long 0 - .byte 0,9,32,64,0,0,2,0 - .long 0 - .long LT..q_atomic_fetch_and_store_release_int-.q_atomic_fetch_and_store_release_int - .short 16 - .byte "q_atomic_fetch_and_store_release_int" - .align 2 - - .align 2 - .globl q_atomic_set_ptr - .globl .q_atomic_set_ptr - .csect q_atomic_set_ptr[DS],3 -q_atomic_set_ptr: - .long .q_atomic_set_ptr,TOC[tc0],0 - .csect .text[PR] -.q_atomic_set_ptr: - lwarx 5,0,3 - stwcx. 4,0,3 - bne- $-8 - mr 3,5 - blr -LT..q_atomic_set_ptr: - .long 0 - .byte 0,9,32,64,0,0,2,0 - .long 0 - .long LT..q_atomic_set_ptr-.q_atomic_set_ptr - .short 16 - .byte "q_atomic_set_ptr" - .align 2 - - .align 2 - .globl q_atomic_fetch_and_store_acquire_ptr - .globl .q_atomic_fetch_and_store_acquire_ptr - .csect q_atomic_fetch_and_store_acquire_ptr[DS],3 -q_atomic_fetch_and_store_acquire_ptr: - .long .q_atomic_fetch_and_store_acquire_ptr,TOC[tc0],0 - .csect .text[PR] -.q_atomic_fetch_and_store_acquire_ptr: - lwarx 5,0,3 - stwcx. 4,0,3 - bne- $-8 - isync - mr 3,5 - blr -LT..q_atomic_fetch_and_store_acquire_ptr: - .long 0 - .byte 0,9,32,64,0,0,2,0 - .long 0 - .long LT..q_atomic_fetch_and_store_acquire_ptr-.q_atomic_fetch_and_store_acquire_ptr - .short 16 - .byte "q_atomic_fetch_and_store_acquire_ptr" - .align 2 - - .align 2 - .globl q_atomic_fetch_and_store_release_ptr - .globl .q_atomic_fetch_and_store_release_ptr - .csect q_atomic_fetch_and_store_release_ptr[DS],3 -q_atomic_fetch_and_store_release_ptr: - .long .q_atomic_fetch_and_store_release_ptr,TOC[tc0],0 - .csect .text[PR] -.q_atomic_fetch_and_store_release_ptr: - eieio - lwarx 5,0,3 - stwcx. 4,0,3 - bne- $-8 - mr 3,5 - blr -LT..q_atomic_fetch_and_store_release_ptr: - .long 0 - .byte 0,9,32,64,0,0,2,0 - .long 0 - .long LT..q_atomic_fetch_and_store_release_ptr-.q_atomic_fetch_and_store_release_ptr - .short 16 - .byte "q_atomic_fetch_and_store_release_ptr" - .align 2 - - .align 2 - .globl q_atomic_fetch_and_add_int - .globl .q_atomic_fetch_and_add_int - .csect q_atomic_fetch_and_add_int[DS],3 -q_atomic_fetch_and_add_int: - .long .q_atomic_fetch_and_add_int,TOC[tc0],0 - .csect .text[PR] -.q_atomic_fetch_and_add_int: - lwarx 5,0,3 - add 6,4,5 - stwcx. 6,0,3 - bne- $-12 - mr 3,5 - blr -LT..q_atomic_fetch_and_add_int: - .long 0 - .byte 0,9,32,64,0,0,1,0 - .long 0 - .long LT..q_atomic_fetch_and_add_int-.q_atomic_fetch_and_add_int - .short 18 - .byte "q_atomic_fetch_and_add_int" - .align 2 - - .align 2 - .globl q_atomic_fetch_and_add_acquire_int - .globl .q_atomic_fetch_and_add_acquire_int - .csect q_atomic_fetch_and_add_acquire_int[DS],3 -q_atomic_fetch_and_add_acquire_int: - .long .q_atomic_fetch_and_add_acquire_int,TOC[tc0],0 - .csect .text[PR] -.q_atomic_fetch_and_add_acquire_int: - lwarx 5,0,3 - add 6,4,5 - stwcx. 6,0,3 - bne- $-12 - isync - mr 3,5 - blr -LT..q_atomic_fetch_and_add_acquire_int: - .long 0 - .byte 0,9,32,64,0,0,1,0 - .long 0 - .long LT..q_atomic_fetch_and_add_acquire_int-.q_atomic_fetch_and_add_acquire_int - .short 18 - .byte "q_atomic_fetch_and_add_acquire_int" - .align 2 - - .align 2 - .globl q_atomic_fetch_and_add_release_int - .globl .q_atomic_fetch_and_add_release_int - .csect q_atomic_fetch_and_add_release_int[DS],3 -q_atomic_fetch_and_add_release_int: - .long .q_atomic_fetch_and_add_release_int,TOC[tc0],0 - .csect .text[PR] -.q_atomic_fetch_and_add_release_int: - eieio - lwarx 5,0,3 - add 6,4,5 - stwcx. 6,0,3 - bne- $-12 - mr 3,5 - blr -LT..q_atomic_fetch_and_add_release_int: - .long 0 - .byte 0,9,32,64,0,0,1,0 - .long 0 - .long LT..q_atomic_fetch_and_add_release_int-.q_atomic_fetch_and_add_release_int - .short 34 - .byte "q_atomic_fetch_and_add_release_int" - .align 2 - - .align 2 - .globl q_atomic_fetch_and_add_ptr - .globl .q_atomic_fetch_and_add_ptr - .csect q_atomic_fetch_and_add_ptr[DS],3 -q_atomic_fetch_and_add_ptr: - .long .q_atomic_fetch_and_add_ptr,TOC[tc0],0 - .csect .text[PR] -.q_atomic_fetch_and_add_ptr: - lwarx 5,0,3 - add 6,4,5 - stwcx. 6,0,3 - bne- $-12 - mr 3,5 - blr -LT..q_atomic_fetch_and_add_ptr: - .long 0 - .byte 0,9,32,64,0,0,1,0 - .long 0 - .long LT..q_atomic_fetch_and_add_ptr-.q_atomic_fetch_and_add_ptr - .short 26 - .byte "q_atomic_fetch_and_add_ptr" - .align 2 - - .align 2 - .globl q_atomic_fetch_and_add_acquire_ptr - .globl .q_atomic_fetch_and_add_acquire_ptr - .csect q_atomic_fetch_and_add_acquire_ptr[DS],3 -q_atomic_fetch_and_add_acquire_ptr: - .long .q_atomic_fetch_and_add_acquire_ptr,TOC[tc0],0 - .csect .text[PR] -.q_atomic_fetch_and_add_acquire_ptr: - lwarx 5,0,3 - add 6,4,5 - stwcx. 6,0,3 - bne- $-12 - isync - mr 3,5 - blr -LT..q_atomic_fetch_and_add_acquire_ptr: - .long 0 - .byte 0,9,32,64,0,0,1,0 - .long 0 - .long LT..q_atomic_fetch_and_add_acquire_ptr-.q_atomic_fetch_and_add_acquire_ptr - .short 34 - .byte "q_atomic_fetch_and_add_acquire_ptr" - .align 2 - - .align 2 - .globl q_atomic_fetch_and_add_release_ptr - .globl .q_atomic_fetch_and_add_release_ptr - .csect q_atomic_fetch_and_add_release_ptr[DS],3 -q_atomic_fetch_and_add_release_ptr: - .long .q_atomic_fetch_and_add_release_ptr,TOC[tc0],0 - .csect .text[PR] -.q_atomic_fetch_and_add_release_ptr: - eieio - lwarx 5,0,3 - add 6,4,5 - stwcx. 6,0,3 - bne- $-12 - mr 3,5 - blr -LT..q_atomic_fetch_and_add_release_ptr: - .long 0 - .byte 0,9,32,64,0,0,1,0 - .long 0 - .long LT..q_atomic_fetch_and_add_release_ptr-.q_atomic_fetch_and_add_release_ptr - .short 34 - .byte "q_atomic_fetch_and_add_release_ptr" - .align 2 - -_section_.text: - .csect .data[RW],3 - .long _section_.text diff --git a/src/corelib/arch/powerpc/qatomic64.s b/src/corelib/arch/powerpc/qatomic64.s deleted file mode 100644 index 84977d5a936..00000000000 --- a/src/corelib/arch/powerpc/qatomic64.s +++ /dev/null @@ -1,533 +0,0 @@ -############################################################################ -## -## Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -## Contact: http://www.qt-project.org/ -## -## This file is part of the QtGui module of the Qt Toolkit. -## -## $QT_BEGIN_LICENSE:LGPL$ -## GNU Lesser General Public License Usage -## 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. -## -## GNU General Public License Usage -## Alternatively, this file may be used under the terms of the GNU General -## Public License version 3.0 as published by the Free Software Foundation -## and appearing in the file LICENSE.GPL included in the packaging of this -## file. Please review the following information to ensure the GNU General -## Public License version 3.0 requirements will be met: -## http://www.gnu.org/copyleft/gpl.html. -## -## Other Usage -## Alternatively, this file may be used in accordance with the terms and -## conditions contained in a signed written agreement between you and Nokia. -## -## -## -## -## -## -## $QT_END_LICENSE$ -## -############################################################################ - .machine "ppc64" - .toc - .csect .text[PR] - - .align 2 - .globl q_atomic_test_and_set_int - .globl .q_atomic_test_and_set_int - .csect q_atomic_test_and_set_int[DS],3 -q_atomic_test_and_set_int: - .llong .q_atomic_test_and_set_int,TOC[tc0],0 - .csect .text[PR] -.q_atomic_test_and_set_int: - lwarx 6,0,3 - xor. 6,6,4 - bne $+12 - stwcx. 5,0,3 - bne- $-16 - subfic 3,6,0 - adde 3,3,6 - extsw 3,3 - blr -LT..q_atomic_test_and_set_int: - .long 0 - .byte 0,9,32,64,0,0,3,0 - .long 0 - .long LT..q_atomic_test_and_set_int-.q_atomic_test_and_set_int - .short 25 - .byte "q_atomic_test_and_set_int" - .align 2 - - .align 2 - .globl q_atomic_test_and_set_acquire_int - .globl .q_atomic_test_and_set_acquire_int - .csect q_atomic_test_and_set_acquire_int[DS],3 -q_atomic_test_and_set_acquire_int: - .llong .q_atomic_test_and_set_acquire_int,TOC[tc0],0 - .csect .text[PR] -.q_atomic_test_and_set_acquire_int: - lwarx 6,0,3 - xor. 6,6,4 - bne $+16 - stwcx. 5,0,3 - bne- $-16 - isync - subfic 3,6,0 - adde 3,3,6 - extsw 3,3 - blr -LT..q_atomic_test_and_set_acquire_int: - .long 0 - .byte 0,9,32,64,0,0,3,0 - .long 0 - .long LT..q_atomic_test_and_set_acquire_int-.q_atomic_test_and_set_acquire_int - .short 33 - .byte "q_atomic_test_and_set_acquire_int" - .align 2 - - .align 2 - .globl q_atomic_test_and_set_release_int - .globl .q_atomic_test_and_set_release_int - .csect q_atomic_test_and_set_release_int[DS],3 -q_atomic_test_and_set_release_int: - .llong .q_atomic_test_and_set_release_int,TOC[tc0],0 - .csect .text[PR] -.q_atomic_test_and_set_release_int: - eieio - lwarx 6,0,3 - xor. 6,6,4 - bne $+12 - stwcx. 5,0,3 - bne- $-16 - subfic 3,6,0 - adde 3,3,6 - extsw 3,3 - blr -LT..q_atomic_test_and_set_release_int: - .long 0 - .byte 0,9,32,64,0,0,3,0 - .long 0 - .long LT..q_atomic_test_and_set_release_int-.q_atomic_test_and_set_release_int - .short 33 - .byte "q_atomic_test_and_set_release_int" - .align 2 - - .align 2 - .globl q_atomic_test_and_set_ptr - .globl .q_atomic_test_and_set_ptr - .csect q_atomic_test_and_set_ptr[DS],3 -q_atomic_test_and_set_ptr: - .llong .q_atomic_test_and_set_ptr,TOC[tc0],0 - .csect .text[PR] -.q_atomic_test_and_set_ptr: - ldarx 6,0,3 - xor. 6,6,4 - bne $+12 - stdcx. 5,0,3 - bne- $-16 - subfic 3,6,0 - adde 3,3,6 - blr -LT..q_atomic_test_and_set_ptr: - .long 0 - .byte 0,9,32,64,0,0,3,0 - .long 0 - .long LT..q_atomic_test_and_set_ptr-.q_atomic_test_and_set_ptr - .short 25 - .byte "q_atomic_test_and_set_ptr" - .align 2 - - .align 2 - .globl q_atomic_test_and_set_acquire_ptr - .globl .q_atomic_test_and_set_acquire_ptr - .csect q_atomic_test_and_set_acquire_ptr[DS],3 -q_atomic_test_and_set_acquire_ptr: - .llong .q_atomic_test_and_set_acquire_ptr,TOC[tc0],0 - .csect .text[PR] -.q_atomic_test_and_set_acquire_ptr: - ldarx 6,0,3 - xor. 6,6,4 - bne $+16 - stdcx. 5,0,3 - bne- $-16 - isync - subfic 3,6,0 - adde 3,3,6 - blr -LT..q_atomic_test_and_set_acquire_ptr: - .long 0 - .byte 0,9,32,64,0,0,3,0 - .long 0 - .long LT..q_atomic_test_and_set_acquire_ptr-.q_atomic_test_and_set_acquire_ptr - .short 33 - .byte "q_atomic_test_and_set_acquire_ptr" - .align 2 - - .align 2 - .globl q_atomic_test_and_set_release_ptr - .globl .q_atomic_test_and_set_release_ptr - .csect q_atomic_test_and_set_release_ptr[DS],3 -q_atomic_test_and_set_release_ptr: - .llong .q_atomic_test_and_set_release_ptr,TOC[tc0],0 - .csect .text[PR] -.q_atomic_test_and_set_release_ptr: - eieio - ldarx 6,0,3 - xor. 6,6,4 - bne $+12 - stdcx. 5,0,3 - bne- $-16 - subfic 3,6,0 - adde 3,3,6 - blr -LT..q_atomic_test_and_set_release_ptr: - .long 0 - .byte 0,9,32,64,0,0,3,0 - .long 0 - .long LT..q_atomic_test_and_set_release_ptr-.q_atomic_test_and_set_release_ptr - .short 33 - .byte "q_atomic_test_and_set_release_ptr" - .align 2 - - .align 2 - .globl q_atomic_increment - .globl .q_atomic_increment - .csect q_atomic_increment[DS],3 -q_atomic_increment: - .llong .q_atomic_increment,TOC[tc0],0 - .csect .text[PR] -.q_atomic_increment: - lwarx 4,0,3 - addi 5,4,1 - extsw 4,5 - stwcx. 4,0,3 - bne- $-16 - mr 3,4 - blr -LT..q_atomic_increment: - .long 0 - .byte 0,9,32,64,0,0,1,0 - .long 0 - .long LT..q_atomic_increment-.q_atomic_increment - .short 18 - .byte "q_atomic_increment" - .align 2 - - .align 2 - .globl q_atomic_decrement - .globl .q_atomic_decrement - .csect q_atomic_decrement[DS],3 -q_atomic_decrement: - .llong .q_atomic_decrement,TOC[tc0],0 - .csect .text[PR] -.q_atomic_decrement: - lwarx 4,0,3 - subi 5,4,1 - extsw 4,5 - stwcx. 4,0,3 - bne- $-16 - mr 3,4 - blr -LT..q_atomic_decrement: - .long 0 - .byte 0,9,32,64,0,0,1,0 - .long 0 - .long LT..q_atomic_decrement-.q_atomic_decrement - .short 18 - .byte "q_atomic_decrement" - .align 2 - - .align 2 - .globl q_atomic_set_int - .globl .q_atomic_set_int - .csect q_atomic_set_int[DS],3 -q_atomic_set_int: - .llong .q_atomic_set_int,TOC[tc0],0 - .csect .text[PR] -.q_atomic_set_int: - lwarx 5,0,3 - stwcx. 4,0,3 - bne- $-8 - extsw 3,5 - blr -LT..q_atomic_set_int: - .long 0 - .byte 0,9,32,64,0,0,2,0 - .long 0 - .long LT..q_atomic_set_int-.q_atomic_set_int - .short 16 - .byte "q_atomic_set_int" - .align 2 - - .align 2 - .globl q_atomic_fetch_and_store_acquire_int - .globl .q_atomic_fetch_and_store_acquire_int - .csect q_atomic_fetch_and_store_acquire_int[DS],3 -q_atomic_fetch_and_store_acquire_int: - .llong .q_atomic_fetch_and_store_acquire_int,TOC[tc0],0 - .csect .text[PR] -.q_atomic_fetch_and_store_acquire_int: - lwarx 5,0,3 - stwcx. 4,0,3 - bne- $-8 - isync - extsw 3,5 - blr -LT..q_atomic_fetch_and_store_acquire_int: - .long 0 - .byte 0,9,32,64,0,0,2,0 - .long 0 - .long LT..q_atomic_fetch_and_store_acquire_int-.q_atomic_fetch_and_store_acquire_int - .short 36 - .byte "q_atomic_fetch_and_store_acquire_int" - .align 2 - - .align 2 - .globl q_atomic_fetch_and_store_release_int - .globl .q_atomic_fetch_and_store_release_int - .csect q_atomic_fetch_and_store_release_int[DS],3 -q_atomic_fetch_and_store_release_int: - .llong .q_atomic_fetch_and_store_release_int,TOC[tc0],0 - .csect .text[PR] -.q_atomic_fetch_and_store_release_int: - eieio - lwarx 5,0,3 - stwcx. 4,0,3 - bne- $-8 - extsw 3,5 - blr -LT..q_atomic_fetch_and_store_release_int: - .long 0 - .byte 0,9,32,64,0,0,2,0 - .long 0 - .long LT..q_atomic_fetch_and_store_release_int-.q_atomic_fetch_and_store_release_int - .short 36 - .byte "q_atomic_fetch_and_store_release_int" - .align 2 - - .align 2 - .globl q_atomic_set_ptr - .globl .q_atomic_set_ptr - .csect q_atomic_set_ptr[DS],3 -q_atomic_set_ptr: - .llong .q_atomic_set_ptr,TOC[tc0],0 - .csect .text[PR] -.q_atomic_set_ptr: - ldarx 5,0,3 - stdcx. 4,0,3 - bne- $-8 - mr 3,5 - blr -LT..q_atomic_set_ptr: - .long 0 - .byte 0,9,32,64,0,0,2,0 - .long 0 - .long LT..q_atomic_set_ptr-.q_atomic_set_ptr - .short 16 - .byte "q_atomic_set_ptr" - .align 2 - - .align 2 - .globl q_atomic_fetch_and_store_acquire_ptr - .globl .q_atomic_fetch_and_store_acquire_ptr - .csect q_atomic_fetch_and_store_acquire_ptr[DS],3 -q_atomic_fetch_and_store_acquire_ptr: - .llong .q_atomic_fetch_and_store_acquire_ptr,TOC[tc0],0 - .csect .text[PR] -.q_atomic_fetch_and_store_acquire_ptr: - ldarx 5,0,3 - stdcx. 4,0,3 - bne- $-8 - isync - mr 3,5 - blr -LT..q_atomic_fetch_and_store_acquire_ptr: - .long 0 - .byte 0,9,32,64,0,0,2,0 - .long 0 - .long LT..q_atomic_fetch_and_store_acquire_ptr-.q_atomic_fetch_and_store_acquire_ptr - .short 36 - .byte "q_atomic_fetch_and_store_acquire_ptr" - .align 2 - - .align 2 - .globl q_atomic_fetch_and_store_release_ptr - .globl .q_atomic_fetch_and_store_release_ptr - .csect q_atomic_fetch_and_store_release_ptr[DS],3 -q_atomic_fetch_and_store_release_ptr: - .llong .q_atomic_fetch_and_store_release_ptr,TOC[tc0],0 - .csect .text[PR] -.q_atomic_fetch_and_store_release_ptr: - eieio - ldarx 5,0,3 - stdcx. 4,0,3 - bne- $-8 - mr 3,5 - blr -LT..q_atomic_fetch_and_store_release_ptr: - .long 0 - .byte 0,9,32,64,0,0,2,0 - .long 0 - .long LT..q_atomic_fetch_and_store_release_ptr-.q_atomic_fetch_and_store_release_ptr - .short 36 - .byte "q_atomic_fetch_and_store_release_ptr" - .align 2 - - .align 2 - .globl q_atomic_fetch_and_add_int - .globl .q_atomic_fetch_and_add_int - .csect q_atomic_fetch_and_add_int[DS],3 -q_atomic_fetch_and_add_int: - .llong .q_atomic_fetch_and_add_int,TOC[tc0],0 - .csect .text[PR] -.q_atomic_fetch_and_add_int: - lwarx 5,0,3 - add 6,4,5 - extsw 7,6 - stwcx. 7,0,3 - bne- $-16 - extsw 3,5 - blr -LT..q_atomic_fetch_and_add_int: - .long 0 - .byte 0,9,32,64,0,0,1,0 - .long 0 - .long LT..q_atomic_fetch_and_add_int-.q_atomic_fetch_and_add_int - .short 26 - .byte "q_atomic_fetch_and_add_int" - .align 2 - - .align 2 - .globl q_atomic_fetch_and_add_acquire_int - .globl .q_atomic_fetch_and_add_acquire_int - .csect q_atomic_fetch_and_add_acquire_int[DS],3 -q_atomic_fetch_and_add_acquire_int: - .llong .q_atomic_fetch_and_add_acquire_int,TOC[tc0],0 - .csect .text[PR] -.q_atomic_fetch_and_add_acquire_int: - lwarx 5,0,3 - add 6,4,5 - extsw 7,6 - stwcx. 7,0,3 - bne- $-16 - isync - extsw 3,5 - blr -LT..q_atomic_fetch_and_add_acquire_int: - .long 0 - .byte 0,9,32,64,0,0,1,0 - .long 0 - .long LT..q_atomic_fetch_and_add_acquire_int-.q_atomic_fetch_and_add_acquire_int - .short 34 - .byte "q_atomic_fetch_and_add_acquire_int" - .align 2 - - .align 2 - .globl q_atomic_fetch_and_add_release_int - .globl .q_atomic_fetch_and_add_release_int - .csect q_atomic_fetch_and_add_release_int[DS],3 -q_atomic_fetch_and_add_release_int: - .llong .q_atomic_fetch_and_add_release_int,TOC[tc0],0 - .csect .text[PR] -.q_atomic_fetch_and_add_release_int: - eieio - lwarx 5,0,3 - add 6,4,5 - extsw 7,6 - stwcx. 7,0,3 - bne- $-16 - extsw 3,5 - blr -LT..q_atomic_fetch_and_add_release_int: - .long 0 - .byte 0,9,32,64,0,0,1,0 - .long 0 - .long LT..q_atomic_fetch_and_add_release_int-.q_atomic_fetch_and_add_release_int - .short 34 - .byte "q_atomic_fetch_and_add_release_int" - .align 2 - - .align 2 - .globl q_atomic_fetch_and_add_ptr - .globl .q_atomic_fetch_and_add_ptr - .csect q_atomic_fetch_and_add_ptr[DS],3 -q_atomic_fetch_and_add_ptr: - .llong .q_atomic_fetch_and_add_ptr,TOC[tc0],0 - .csect .text[PR] -.q_atomic_fetch_and_add_ptr: - ldarx 5,0,3 - add 6,4,5 - stdcx. 6,0,3 - bne- $-12 - mr 3,5 - blr -LT..q_atomic_fetch_and_add_ptr: - .long 0 - .byte 0,9,32,64,0,0,1,0 - .long 0 - .long LT..q_atomic_fetch_and_add_ptr-.q_atomic_fetch_and_add_ptr - .short 26 - .byte "q_atomic_fetch_and_add_ptr" - .align 2 - - .align 2 - .globl q_atomic_fetch_and_add_acquire_ptr - .globl .q_atomic_fetch_and_add_acquire_ptr - .csect q_atomic_fetch_and_add_acquire_ptr[DS],3 -q_atomic_fetch_and_add_acquire_ptr: - .llong .q_atomic_fetch_and_add_acquire_ptr,TOC[tc0],0 - .csect .text[PR] -.q_atomic_fetch_and_add_acquire_ptr: - ldarx 5,0,3 - add 6,4,5 - stdcx. 6,0,3 - bne- $-12 - isync - mr 3,5 - blr -LT..q_atomic_fetch_and_add_acquire_ptr: - .long 0 - .byte 0,9,32,64,0,0,1,0 - .long 0 - .long LT..q_atomic_fetch_and_add_acquire_ptr-.q_atomic_fetch_and_add_acquire_ptr - .short 34 - .byte "q_atomic_fetch_and_add_acquire_ptr" - .align 2 - - .align 2 - .globl q_atomic_fetch_and_add_release_ptr - .globl .q_atomic_fetch_and_add_release_ptr - .csect q_atomic_fetch_and_add_release_ptr[DS],3 -q_atomic_fetch_and_add_release_ptr: - .llong .q_atomic_fetch_and_add_release_ptr,TOC[tc0],0 - .csect .text[PR] -.q_atomic_fetch_and_add_release_ptr: - eieio - ldarx 5,0,3 - add 6,4,5 - stdcx. 6,0,3 - bne- $-12 - mr 3,5 - blr -LT..q_atomic_fetch_and_add_release_ptr: - .long 0 - .byte 0,9,32,64,0,0,1,0 - .long 0 - .long LT..q_atomic_fetch_and_add_release_ptr-.q_atomic_fetch_and_add_release_ptr - .short 34 - .byte "q_atomic_fetch_and_add_release_ptr" - .align 2 - -_section_.text: - .csect .data[RW],3 - .llong _section_.text diff --git a/src/corelib/arch/qatomic_alpha.h b/src/corelib/arch/qatomic_alpha.h index 432fb62c0a9..0ac2d8da9c9 100644 --- a/src/corelib/arch/qatomic_alpha.h +++ b/src/corelib/arch/qatomic_alpha.h @@ -42,6 +42,8 @@ #ifndef QATOMIC_ALPHA_H #define QATOMIC_ALPHA_H +#include + QT_BEGIN_HEADER QT_BEGIN_NAMESPACE @@ -476,130 +478,8 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer::fetchAndAddRelease(qptrdiff valueTo return reinterpret_cast(old); } -#else // !Q_CC_GNU - -extern "C" { - Q_CORE_EXPORT int q_atomic_test_and_set_int(volatile int *ptr, int expected, int newval); - Q_CORE_EXPORT int q_atomic_test_and_set_acquire_int(volatile int *ptr, int expected, int newval); - Q_CORE_EXPORT int q_atomic_test_and_set_release_int(volatile int *ptr, int expected, int newval); - Q_CORE_EXPORT int q_atomic_test_and_set_ptr(volatile void *ptr, void *expected, void *newval); - Q_CORE_EXPORT int q_atomic_increment(volatile int *ptr); - Q_CORE_EXPORT int q_atomic_decrement(volatile int *ptr); - Q_CORE_EXPORT int q_atomic_set_int(volatile int *ptr, int newval); - Q_CORE_EXPORT void *q_atomic_set_ptr(volatile void *ptr, void *newval); - Q_CORE_EXPORT int q_atomic_fetch_and_add_int(volatile int *ptr, int value); - Q_CORE_EXPORT int q_atomic_fetch_and_add_acquire_int(volatile int *ptr, int value); - Q_CORE_EXPORT int q_atomic_fetch_and_add_release_int(volatile int *ptr, int value); -} // extern "C" - -inline bool QBasicAtomicInt::ref() -{ - return q_atomic_increment(&_q_value) != 0; -} - -inline bool QBasicAtomicInt::deref() -{ - return q_atomic_decrement(&_q_value) != 0; -} - -inline bool QBasicAtomicInt::testAndSetRelaxed(int expectedValue, int newValue) -{ - return q_atomic_test_and_set_int(&_q_value, expectedValue, newValue) != 0; -} - -inline bool QBasicAtomicInt::testAndSetAcquire(int expectedValue, int newValue) -{ - return q_atomic_test_and_set_acquire_int(&_q_value, expectedValue, newValue) != 0; -} - -inline bool QBasicAtomicInt::testAndSetRelease(int expectedValue, int newValue) -{ - return q_atomic_test_and_set_release_int(&_q_value, expectedValue, newValue) != 0; -} - -inline int QBasicAtomicInt::fetchAndStoreRelaxed(int newValue) -{ - return q_atomic_set_int(&_q_value, newValue); -} - -inline int QBasicAtomicInt::fetchAndStoreAcquire(int newValue) -{ - return q_atomic_fetch_and_store_acquire_int(&_q_value, newValue); -} - -inline int QBasicAtomicInt::fetchAndStoreRelease(int newValue) -{ - return q_atomic_fetch_and_store_release_int(&_q_value, newValue); -} - -inline int QBasicAtomicInt::fetchAndAddRelaxed(int valueToAdd) -{ - return q_atomic_fetch_and_add_int(&_q_value, valueToAdd); -} - -inline int QBasicAtomicInt::fetchAndAddAcquire(int valueToAdd) -{ - return q_atomic_fetch_and_add_acquire_int(&_q_value, valueToAdd); -} - -inline int QBasicAtomicInt::fetchAndAddRelease(int valueToAdd) -{ - return q_atomic_fetch_and_add_release_int(&_q_value, valueToAdd); -} - -template -Q_INLINE_TEMPLATE bool QBasicAtomicPointer::testAndSetRelaxed(T *expectedValue, T *newValue) -{ - return q_atomic_test_and_set_ptr(&_q_value, expectedValue, newValue) != 0; -} - -template -Q_INLINE_TEMPLATE bool QBasicAtomicPointer::testAndSetAcquire(T *expectedValue, T *newValue) -{ - return q_atomic_test_and_set_acquire_ptr(&_q_value, expectedValue, newValue) != 0; -} - -template -Q_INLINE_TEMPLATE bool QBasicAtomicPointer::testAndSetRelease(T *expectedValue, T *newValue) -{ - return q_atomic_test_and_set_release_ptr(&_q_value, expectedValue, newValue) != 0; -} - -template -Q_INLINE_TEMPLATE T *QBasicAtomicPointer::fetchAndStoreRelaxed(T *newValue) -{ - return reinterpret_cast(q_atomic_set_ptr(&_q_value, newValue)); -} - -template -Q_INLINE_TEMPLATE T *QBasicAtomicPointer::fetchAndStoreAcquire(T *newValue) -{ - return reinterpret_cast(q_atomic_fetch_and_store_acquire_ptr(&_q_value, newValue)); -} - -template -Q_INLINE_TEMPLATE T *QBasicAtomicPointer::fetchAndStoreRelease(T *newValue) -{ - return reinterpret_cast(q_atomic_fetch_and_store_release_ptr(&_q_value, newValue)); -} - -template -Q_INLINE_TEMPLATE T *QBasicAtomicPointer::fetchAndAddRelaxed(qptrdiff valueToAdd) -{ - return reinterpret_cast(q_atomic_fetch_and_add_ptr(&_q_value, newValue)); -} -template -Q_INLINE_TEMPLATE T *QBasicAtomicPointer::fetchAndAddAcquire(qptrdiff valueToAdd) -{ - return reinterpret_cast(q_atomic_fetch_and_add_acquire_ptr(&_q_value, newValue)); -} - -template -Q_INLINE_TEMPLATE T *QBasicAtomicPointer::fetchAndAddRelease(qptrdiff valueToAdd) -{ - return reinterpret_cast(q_atomic_fetch_and_add_release_ptr(&_q_value, newValue)); -} - +#else +# error "This compiler for Alpha is not supported" #endif // Q_CC_GNU inline bool QBasicAtomicInt::testAndSetOrdered(int expectedValue, int newValue) diff --git a/src/corelib/arch/qatomic_armv5.h b/src/corelib/arch/qatomic_armv5.h index 95ad73b7136..b3136fe5759 100644 --- a/src/corelib/arch/qatomic_armv5.h +++ b/src/corelib/arch/qatomic_armv5.h @@ -50,6 +50,10 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE #if 0 +// silence syncqt warnings +QT_END_NAMESPACE +QT_END_HEADER + #pragma qt_sync_stop_processing #endif diff --git a/src/corelib/arch/qatomic_armv6.h b/src/corelib/arch/qatomic_armv6.h index 7095d13d9bb..41f145ad0d3 100644 --- a/src/corelib/arch/qatomic_armv6.h +++ b/src/corelib/arch/qatomic_armv6.h @@ -50,6 +50,10 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE #if 0 +// silence syncqt warnings +QT_END_NAMESPACE +QT_END_HEADER + #pragma qt_sync_stop_processing #endif diff --git a/src/corelib/arch/qatomic_armv7.h b/src/corelib/arch/qatomic_armv7.h index 5b36708ad60..43ea8ca9739 100644 --- a/src/corelib/arch/qatomic_armv7.h +++ b/src/corelib/arch/qatomic_armv7.h @@ -52,4 +52,13 @@ // ... but the implementation is otherwise identical to that for ARMv6 #include "QtCore/qatomic_armv6.h" +#if 0 +// silence syncqt warnings +QT_BEGIN_HEADER +QT_BEGIN_NAMESPACE + +QT_END_NAMESPACE +QT_END_HEADER +#endif + #endif // QATOMIC_ARMV7_H diff --git a/src/corelib/arch/qatomic_bfin.h b/src/corelib/arch/qatomic_bfin.h index 530ac8d50f2..28a5cd60c94 100644 --- a/src/corelib/arch/qatomic_bfin.h +++ b/src/corelib/arch/qatomic_bfin.h @@ -42,6 +42,8 @@ #ifndef QATOMIC_BFIN_H #define QATOMIC_BFIN_H +#include + QT_BEGIN_HEADER QT_BEGIN_NAMESPACE diff --git a/src/corelib/arch/qatomic_bootstrap.h b/src/corelib/arch/qatomic_bootstrap.h index 10cdc888f6d..75f328b7c78 100644 --- a/src/corelib/arch/qatomic_bootstrap.h +++ b/src/corelib/arch/qatomic_bootstrap.h @@ -50,6 +50,10 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE #if 0 +// silence syncqt warnings +QT_END_NAMESPACE +QT_END_HEADER + #pragma qt_sync_stop_processing #endif diff --git a/src/corelib/arch/qatomic_cxx11.h b/src/corelib/arch/qatomic_cxx11.h index c2df59fd547..27e0acda64f 100644 --- a/src/corelib/arch/qatomic_cxx11.h +++ b/src/corelib/arch/qatomic_cxx11.h @@ -49,6 +49,10 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE #if 0 +// silence syncqt warnings +QT_END_NAMESPACE +QT_END_HEADER + #pragma qt_sync_stop_processing #endif diff --git a/src/corelib/arch/qatomic_gcc.h b/src/corelib/arch/qatomic_gcc.h index b5244429e65..225a7809eb0 100644 --- a/src/corelib/arch/qatomic_gcc.h +++ b/src/corelib/arch/qatomic_gcc.h @@ -48,6 +48,10 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE #if 0 +// silence syncqt warnings +QT_END_NAMESPACE +QT_END_HEADER + #pragma qt_sync_stop_processing #endif diff --git a/src/corelib/arch/qatomic_generic.h b/src/corelib/arch/qatomic_generic.h deleted file mode 100644 index 621a767dd66..00000000000 --- a/src/corelib/arch/qatomic_generic.h +++ /dev/null @@ -1,282 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the QtCore module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QATOMIC_GENERIC_H -#define QATOMIC_GENERIC_H - -QT_BEGIN_HEADER - -QT_BEGIN_NAMESPACE - -#define Q_ATOMIC_INT_REFERENCE_COUNTING_IS_NOT_NATIVE - -inline bool QBasicAtomicInt::isReferenceCountingNative() -{ return false; } -inline bool QBasicAtomicInt::isReferenceCountingWaitFree() -{ return false; } - -#define Q_ATOMIC_INT_TEST_AND_SET_IS_NOT_NATIVE - -inline bool QBasicAtomicInt::isTestAndSetNative() -{ return false; } -inline bool QBasicAtomicInt::isTestAndSetWaitFree() -{ return false; } - -#define Q_ATOMIC_INT_FETCH_AND_STORE_IS_NOT_NATIVE - -inline bool QBasicAtomicInt::isFetchAndStoreNative() -{ return false; } -inline bool QBasicAtomicInt::isFetchAndStoreWaitFree() -{ return false; } - -#define Q_ATOMIC_INT_FETCH_AND_ADD_IS_NOT_NATIVE - -inline bool QBasicAtomicInt::isFetchAndAddNative() -{ return false; } -inline bool QBasicAtomicInt::isFetchAndAddWaitFree() -{ return false; } - -#define Q_ATOMIC_POINTER_TEST_AND_SET_IS_NOT_NATIVE - -template -Q_INLINE_TEMPLATE bool QBasicAtomicPointer::isTestAndSetNative() -{ return false; } -template -Q_INLINE_TEMPLATE bool QBasicAtomicPointer::isTestAndSetWaitFree() -{ return false; } - -#define Q_ATOMIC_POINTER_FETCH_AND_STORE_IS_NOT_NATIVE - -template -Q_INLINE_TEMPLATE bool QBasicAtomicPointer::isFetchAndStoreNative() -{ return false; } -template -Q_INLINE_TEMPLATE bool QBasicAtomicPointer::isFetchAndStoreWaitFree() -{ return false; } - -#define Q_ATOMIC_POINTER_FETCH_AND_ADD_IS_NOT_NATIVE - -template -Q_INLINE_TEMPLATE bool QBasicAtomicPointer::isFetchAndAddNative() -{ return false; } -template -Q_INLINE_TEMPLATE bool QBasicAtomicPointer::isFetchAndAddWaitFree() -{ return false; } - -Q_CORE_EXPORT bool QBasicAtomicInt_testAndSetOrdered(volatile int *, int, int); -Q_CORE_EXPORT int QBasicAtomicInt_fetchAndStoreOrdered(volatile int *, int); -Q_CORE_EXPORT int QBasicAtomicInt_fetchAndAddOrdered(volatile int *, int); - -Q_CORE_EXPORT bool QBasicAtomicPointer_testAndSetOrdered(void * volatile *, void *, void *); -Q_CORE_EXPORT void *QBasicAtomicPointer_fetchAndStoreOrdered(void * volatile *, void *); -Q_CORE_EXPORT void *QBasicAtomicPointer_fetchAndAddOrdered(void * volatile *, qptrdiff); - -// Reference counting - -inline bool QBasicAtomicInt::ref() -{ - return QBasicAtomicInt_fetchAndAddOrdered(&_q_value, 1) != -1; -} - -inline bool QBasicAtomicInt::deref() -{ - return QBasicAtomicInt_fetchAndAddOrdered(&_q_value, -1) != 1; -} - -// Test and set for integers - -inline bool QBasicAtomicInt::testAndSetOrdered(int expectedValue, int newValue) -{ - return QBasicAtomicInt_testAndSetOrdered(&_q_value, expectedValue, newValue); -} - -inline bool QBasicAtomicInt::testAndSetRelaxed(int expectedValue, int newValue) -{ - return testAndSetOrdered(expectedValue, newValue); -} - -inline bool QBasicAtomicInt::testAndSetAcquire(int expectedValue, int newValue) -{ - return testAndSetOrdered(expectedValue, newValue); -} - -inline bool QBasicAtomicInt::testAndSetRelease(int expectedValue, int newValue) -{ - return testAndSetOrdered(expectedValue, newValue); -} - -// Fetch and store for integers - -inline int QBasicAtomicInt::fetchAndStoreOrdered(int newValue) -{ - return QBasicAtomicInt_fetchAndStoreOrdered(&_q_value, newValue); -} - -inline int QBasicAtomicInt::fetchAndStoreRelaxed(int newValue) -{ - return fetchAndStoreOrdered(newValue); -} - -inline int QBasicAtomicInt::fetchAndStoreAcquire(int newValue) -{ - return fetchAndStoreOrdered(newValue); -} - -inline int QBasicAtomicInt::fetchAndStoreRelease(int newValue) -{ - return fetchAndStoreOrdered(newValue); -} - -// Fetch and add for integers - -inline int QBasicAtomicInt::fetchAndAddOrdered(int valueToAdd) -{ - return QBasicAtomicInt_fetchAndAddOrdered(&_q_value, valueToAdd); -} - -inline int QBasicAtomicInt::fetchAndAddRelaxed(int valueToAdd) -{ - return fetchAndAddOrdered(valueToAdd); -} - -inline int QBasicAtomicInt::fetchAndAddAcquire(int valueToAdd) -{ - return fetchAndAddOrdered(valueToAdd); -} - -inline int QBasicAtomicInt::fetchAndAddRelease(int valueToAdd) -{ - return fetchAndAddOrdered(valueToAdd); -} - -// Test and set for pointers - -template -Q_INLINE_TEMPLATE bool QBasicAtomicPointer::testAndSetOrdered(T *expectedValue, T *newValue) -{ - union { T * volatile * typed; void * volatile * voidp; } pointer; - pointer.typed = &_q_value; - return QBasicAtomicPointer_testAndSetOrdered(pointer.voidp, expectedValue, newValue); -} - -template -Q_INLINE_TEMPLATE bool QBasicAtomicPointer::testAndSetRelaxed(T *expectedValue, T *newValue) -{ - return testAndSetOrdered(expectedValue, newValue); -} - -template -Q_INLINE_TEMPLATE bool QBasicAtomicPointer::testAndSetAcquire(T *expectedValue, T *newValue) -{ - return testAndSetOrdered(expectedValue, newValue); -} - -template -Q_INLINE_TEMPLATE bool QBasicAtomicPointer::testAndSetRelease(T *expectedValue, T *newValue) -{ - return testAndSetOrdered(expectedValue, newValue); -} - -// Fetch and store for pointers - -template -Q_INLINE_TEMPLATE T *QBasicAtomicPointer::fetchAndStoreOrdered(T *newValue) -{ - union { T * volatile * typed; void * volatile * voidp; } pointer; - union { T *typed; void *voidp; } returnValue; - pointer.typed = &_q_value; - returnValue.voidp = QBasicAtomicPointer_fetchAndStoreOrdered(pointer.voidp, newValue); - return returnValue.typed; -} - -template -Q_INLINE_TEMPLATE T *QBasicAtomicPointer::fetchAndStoreRelaxed(T *newValue) -{ - return fetchAndStoreOrdered(newValue); -} - -template -Q_INLINE_TEMPLATE T *QBasicAtomicPointer::fetchAndStoreAcquire(T *newValue) -{ - return fetchAndStoreOrdered(newValue); -} - -template -Q_INLINE_TEMPLATE T *QBasicAtomicPointer::fetchAndStoreRelease(T *newValue) -{ - return fetchAndStoreOrdered(newValue); -} - -// Fetch and add for pointers - -template -Q_INLINE_TEMPLATE T *QBasicAtomicPointer::fetchAndAddOrdered(qptrdiff valueToAdd) -{ - union { T * volatile *typed; void * volatile *voidp; } pointer; - union { T *typed; void *voidp; } returnValue; - pointer.typed = &_q_value; - returnValue.voidp = QBasicAtomicPointer_fetchAndAddOrdered(pointer.voidp, valueToAdd * sizeof(T)); - return returnValue.typed; -} - -template -Q_INLINE_TEMPLATE T *QBasicAtomicPointer::fetchAndAddRelaxed(qptrdiff valueToAdd) -{ - return fetchAndAddOrdered(valueToAdd); -} - -template -Q_INLINE_TEMPLATE T *QBasicAtomicPointer::fetchAndAddAcquire(qptrdiff valueToAdd) -{ - return fetchAndAddOrdered(valueToAdd); -} - -template -Q_INLINE_TEMPLATE T *QBasicAtomicPointer::fetchAndAddRelease(qptrdiff valueToAdd) -{ - return fetchAndAddOrdered(valueToAdd); -} - -QT_END_NAMESPACE - -QT_END_HEADER - -#endif // QATOMIC_GENERIC_H diff --git a/src/corelib/arch/qatomic_i386.h b/src/corelib/arch/qatomic_i386.h index 6fec561177e..4d9d8103181 100644 --- a/src/corelib/arch/qatomic_i386.h +++ b/src/corelib/arch/qatomic_i386.h @@ -49,6 +49,10 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE #if 0 +// silence syncqt warnings +QT_END_NAMESPACE +QT_END_HEADER + #pragma qt_sync_stop_processing #endif diff --git a/src/corelib/arch/qatomic_ia64.h b/src/corelib/arch/qatomic_ia64.h index b5cd9f75452..d82ad122232 100644 --- a/src/corelib/arch/qatomic_ia64.h +++ b/src/corelib/arch/qatomic_ia64.h @@ -50,6 +50,10 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE #if 0 +// silence syncqt warnings +QT_END_NAMESPACE +QT_END_HEADER + #pragma qt_sync_stop_processing #endif diff --git a/src/corelib/arch/qatomic_integrity.h b/src/corelib/arch/qatomic_integrity.h index e5d226ad7f2..f290984611f 100644 --- a/src/corelib/arch/qatomic_integrity.h +++ b/src/corelib/arch/qatomic_integrity.h @@ -42,6 +42,7 @@ #ifndef QATOMIC_INTEGRITY_H #define QATOMIC_INTEGRITY_H +#include #include QT_BEGIN_HEADER diff --git a/src/corelib/arch/qatomic_mips.h b/src/corelib/arch/qatomic_mips.h index 04015c9d197..39119ba4119 100644 --- a/src/corelib/arch/qatomic_mips.h +++ b/src/corelib/arch/qatomic_mips.h @@ -50,6 +50,10 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE #if 0 +// silence syncqt warnings +QT_END_NAMESPACE +QT_END_HEADER + #pragma qt_sync_stop_processing #endif @@ -223,7 +227,7 @@ T QBasicAtomicOps<4>::fetchAndAddRelaxed(T &_q_value, typename QAtomicAdditiveTy return originalValue; } -#if defined(_MIPS_ARCH_MIPS64) || defined(__mips64) +#if defined(Q_PROCESSOR_MIPS_64) #define Q_ATOMIC_INT64_IS_SUPPORTED #define Q_ATOMIC_INT64_REFERENCE_COUNTING_IS_ALWAYS_NATIVE diff --git a/src/corelib/arch/qatomic_msvc.h b/src/corelib/arch/qatomic_msvc.h index eeb37dba89a..c5d7848734a 100644 --- a/src/corelib/arch/qatomic_msvc.h +++ b/src/corelib/arch/qatomic_msvc.h @@ -48,6 +48,10 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE #if 0 +// silence syncqt warnings +QT_END_NAMESPACE +QT_END_HEADER + #pragma qt_sync_stop_processing #endif diff --git a/src/corelib/arch/qatomic_parisc.h b/src/corelib/arch/qatomic_parisc.h deleted file mode 100644 index 221d0e36ffa..00000000000 --- a/src/corelib/arch/qatomic_parisc.h +++ /dev/null @@ -1,305 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the QtCore module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QATOMIC_PARISC_H -#define QATOMIC_PARISC_H - -QT_BEGIN_HEADER - -QT_BEGIN_NAMESPACE - -#define Q_ATOMIC_INT_REFERENCE_COUNTING_IS_NOT_NATIVE - -inline bool QBasicAtomicInt::isReferenceCountingNative() -{ return false; } -inline bool QBasicAtomicInt::isReferenceCountingWaitFree() -{ return false; } - -#define Q_ATOMIC_INT_TEST_AND_SET_IS_NOT_NATIVE - -inline bool QBasicAtomicInt::isTestAndSetNative() -{ return false; } -inline bool QBasicAtomicInt::isTestAndSetWaitFree() -{ return false; } - -#define Q_ATOMIC_INT_FETCH_AND_STORE_IS_NOT_NATIVE - -inline bool QBasicAtomicInt::isFetchAndStoreNative() -{ return false; } -inline bool QBasicAtomicInt::isFetchAndStoreWaitFree() -{ return false; } - -#define Q_ATOMIC_INT_FETCH_AND_ADD_IS_NOT_NATIVE - -inline bool QBasicAtomicInt::isFetchAndAddNative() -{ return false; } -inline bool QBasicAtomicInt::isFetchAndAddWaitFree() -{ return false; } - -#define Q_ATOMIC_POINTER_TEST_AND_SET_IS_NOT_NATIVE - -template -Q_INLINE_TEMPLATE bool QBasicAtomicPointer::isTestAndSetNative() -{ return false; } -template -Q_INLINE_TEMPLATE bool QBasicAtomicPointer::isTestAndSetWaitFree() -{ return false; } - -#define Q_ATOMIC_POINTER_FETCH_AND_STORE_IS_NOT_NATIVE - -template -Q_INLINE_TEMPLATE bool QBasicAtomicPointer::isFetchAndStoreNative() -{ return false; } -template -Q_INLINE_TEMPLATE bool QBasicAtomicPointer::isFetchAndStoreWaitFree() -{ return false; } - -#define Q_ATOMIC_POINTER_FETCH_AND_ADD_IS_NOT_NATIVE - -template -Q_INLINE_TEMPLATE bool QBasicAtomicPointer::isFetchAndAddNative() -{ return false; } -template -Q_INLINE_TEMPLATE bool QBasicAtomicPointer::isFetchAndAddWaitFree() -{ return false; } - -extern "C" { - Q_CORE_EXPORT void q_atomic_lock(int *lock); - Q_CORE_EXPORT void q_atomic_unlock(int *lock); -} - -// Reference counting - -inline bool QBasicAtomicInt::ref() -{ - q_atomic_lock(_q_lock); - bool ret = (++_q_value != 0); - q_atomic_unlock(_q_lock); - return ret; -} - -inline bool QBasicAtomicInt::deref() -{ - q_atomic_lock(_q_lock); - bool ret = (--_q_value != 0); - q_atomic_unlock(_q_lock); - return ret; -} - -// Test-and-set for integers - -inline bool QBasicAtomicInt::testAndSetOrdered(int expectedValue, int newValue) -{ - q_atomic_lock(_q_lock); - if (_q_value == expectedValue) { - _q_value = newValue; - q_atomic_unlock(_q_lock); - return true; - } - q_atomic_unlock(_q_lock); - return false; -} - -inline bool QBasicAtomicInt::testAndSetRelaxed(int expectedValue, int newValue) -{ - return testAndSetOrdered(expectedValue, newValue); -} - -inline bool QBasicAtomicInt::testAndSetAcquire(int expectedValue, int newValue) -{ - return testAndSetOrdered(expectedValue, newValue); -} - -inline bool QBasicAtomicInt::testAndSetRelease(int expectedValue, int newValue) -{ - return testAndSetOrdered(expectedValue, newValue); -} - -// Fetch-and-store for integers - -inline int QBasicAtomicInt::fetchAndStoreOrdered(int newValue) -{ - q_atomic_lock(_q_lock); - int returnValue = _q_value; - _q_value = newValue; - q_atomic_unlock(_q_lock); - return returnValue; -} - -inline int QBasicAtomicInt::fetchAndStoreRelaxed(int newValue) -{ - return fetchAndStoreOrdered(newValue); -} - -inline int QBasicAtomicInt::fetchAndStoreAcquire(int newValue) -{ - return fetchAndStoreOrdered(newValue); -} - -inline int QBasicAtomicInt::fetchAndStoreRelease(int newValue) -{ - return fetchAndStoreOrdered(newValue); -} - -// Fetch-and-add for integers - -inline int QBasicAtomicInt::fetchAndAddOrdered(int valueToAdd) -{ - q_atomic_lock(_q_lock); - int originalValue = _q_value; - _q_value += valueToAdd; - q_atomic_unlock(_q_lock); - return originalValue; -} - -inline int QBasicAtomicInt::fetchAndAddRelaxed(int valueToAdd) -{ - return fetchAndAddOrdered(valueToAdd); -} - -inline int QBasicAtomicInt::fetchAndAddAcquire(int valueToAdd) -{ - return fetchAndAddOrdered(valueToAdd); -} - -inline int QBasicAtomicInt::fetchAndAddRelease(int valueToAdd) -{ - return fetchAndAddOrdered(valueToAdd); -} - -// Test and set for pointers - -template -Q_INLINE_TEMPLATE bool QBasicAtomicPointer::testAndSetOrdered(T *expectedValue, T *newValue) -{ - q_atomic_lock(_q_lock); - if (_q_value == expectedValue) { - _q_value = newValue; - q_atomic_unlock(_q_lock); - return true; - } - q_atomic_unlock(_q_lock); - return false; -} - -template -Q_INLINE_TEMPLATE bool QBasicAtomicPointer::testAndSetRelaxed(T *expectedValue, T *newValue) -{ - return testAndSetOrdered(expectedValue, newValue); -} - -template -Q_INLINE_TEMPLATE bool QBasicAtomicPointer::testAndSetAcquire(T *expectedValue, T *newValue) -{ - return testAndSetOrdered(expectedValue, newValue); -} - -template -Q_INLINE_TEMPLATE bool QBasicAtomicPointer::testAndSetRelease(T *expectedValue, T *newValue) -{ - return testAndSetOrdered(expectedValue, newValue); -} - -// Fetch and store for pointers - -template -Q_INLINE_TEMPLATE T *QBasicAtomicPointer::fetchAndStoreOrdered(T *newValue) -{ - q_atomic_lock(_q_lock); - T *returnValue = (_q_value); - _q_value = newValue; - q_atomic_unlock(_q_lock); - return returnValue; -} - -template -Q_INLINE_TEMPLATE T *QBasicAtomicPointer::fetchAndStoreRelaxed(T *newValue) -{ - return fetchAndStoreOrdered(newValue); -} - -template -Q_INLINE_TEMPLATE T *QBasicAtomicPointer::fetchAndStoreAcquire(T *newValue) -{ - return fetchAndStoreOrdered(newValue); -} - -template -Q_INLINE_TEMPLATE T *QBasicAtomicPointer::fetchAndStoreRelease(T *newValue) -{ - return fetchAndStoreOrdered(newValue); -} - -// Fetch and add for pointers - -template -Q_INLINE_TEMPLATE T *QBasicAtomicPointer::fetchAndAddOrdered(qptrdiff valueToAdd) -{ - q_atomic_lock(_q_lock); - T *returnValue = (_q_value); - _q_value += valueToAdd; - q_atomic_unlock(_q_lock); - return returnValue; -} - -template -Q_INLINE_TEMPLATE T *QBasicAtomicPointer::fetchAndAddRelaxed(qptrdiff valueToAdd) -{ - return fetchAndAddOrdered(valueToAdd); -} - -template -Q_INLINE_TEMPLATE T *QBasicAtomicPointer::fetchAndAddAcquire(qptrdiff valueToAdd) -{ - return fetchAndAddOrdered(valueToAdd); -} - -template -Q_INLINE_TEMPLATE T *QBasicAtomicPointer::fetchAndAddRelease(qptrdiff valueToAdd) -{ - return fetchAndAddOrdered(valueToAdd); -} - -QT_END_NAMESPACE - -QT_END_HEADER - -#endif // QATOMIC_PARISC_H diff --git a/src/corelib/arch/qatomic_powerpc.h b/src/corelib/arch/qatomic_power.h similarity index 76% rename from src/corelib/arch/qatomic_powerpc.h rename to src/corelib/arch/qatomic_power.h index 949102748a9..a531dfedc81 100644 --- a/src/corelib/arch/qatomic_powerpc.h +++ b/src/corelib/arch/qatomic_power.h @@ -39,8 +39,10 @@ ** ****************************************************************************/ -#ifndef QATOMIC_POWERPC_H -#define QATOMIC_POWERPC_H +#ifndef QATOMIC_POWER_H +#define QATOMIC_POWER_H + +#include QT_BEGIN_HEADER @@ -103,13 +105,11 @@ Q_INLINE_TEMPLATE bool QBasicAtomicPointer::isFetchAndAddWaitFree() #if defined(Q_CC_GNU) -#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 2) \ - || (!defined(__64BIT__) && !defined(__powerpc64__) && !defined(__ppc64__)) +#ifdef Q_PROCESSOR_POWER_32 # define _Q_VALUE "0, %[_q_value]" # define _Q_VALUE_MEMORY_OPERAND "+m" (_q_value) # define _Q_VALUE_REGISTER_OPERAND [_q_value] "r" (&_q_value), -#else -// On 64-bit with gcc >= 4.2 +#else // Q_PROCESSOR_POWER_64 # define _Q_VALUE "%y[_q_value]" # define _Q_VALUE_MEMORY_OPERAND [_q_value] "+Z" (_q_value) # define _Q_VALUE_REGISTER_OPERAND @@ -299,7 +299,7 @@ inline int QBasicAtomicInt::fetchAndAddRelease(int valueToAdd) return originalValue; } -#if defined(__64BIT__) || defined(__powerpc64__) || defined(__ppc64__) +#ifdef Q_PROCESSOR_POWER_64 # define LPARX "ldarx" # define STPCX "stdcx." #else @@ -473,139 +473,7 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer::fetchAndAddRelease(qptrdiff valueTo #undef _Q_VALUE_REGISTER_OPERAND #else - -extern "C" { - int q_atomic_test_and_set_int(volatile int *ptr, int expectedValue, int newValue); - int q_atomic_test_and_set_acquire_int(volatile int *ptr, int expectedValue, int newValue); - int q_atomic_test_and_set_release_int(volatile int *ptr, int expectedValue, int newValue); - int q_atomic_test_and_set_ptr(volatile void *ptr, void *expectedValue, void *newValue); - int q_atomic_test_and_set_acquire_ptr(volatile void *ptr, void *expectedValue, void *newValue); - int q_atomic_test_and_set_release_ptr(volatile void *ptr, void *expectedValue, void *newValue); - int q_atomic_increment(volatile int *); - int q_atomic_decrement(volatile int *); - int q_atomic_set_int(volatile int *, int); - int q_atomic_fetch_and_store_acquire_int(volatile int *ptr, int newValue); - int q_atomic_fetch_and_store_release_int(volatile int *ptr, int newValue); - void *q_atomic_set_ptr(volatile void *, void *); - int q_atomic_fetch_and_store_acquire_ptr(volatile void *ptr, void *newValue); - int q_atomic_fetch_and_store_release_ptr(volatile void *ptr, void *newValue); - int q_atomic_fetch_and_add_int(volatile int *ptr, int valueToAdd); - int q_atomic_fetch_and_add_acquire_int(volatile int *ptr, int valueToAdd); - int q_atomic_fetch_and_add_release_int(volatile int *ptr, int valueToAdd); - void *q_atomic_fetch_and_add_ptr(volatile void *ptr, qptrdiff valueToAdd); - void *q_atomic_fetch_and_add_acquire_ptr(volatile void *ptr, qptrdiff valueToAdd); - void *q_atomic_fetch_and_add_release_ptr(volatile void *ptr, qptrdiff valueToAdd); -} // extern "C" - - -inline bool QBasicAtomicInt::ref() -{ - return q_atomic_increment(&_q_value) != 0; -} - -inline bool QBasicAtomicInt::deref() -{ - return q_atomic_decrement(&_q_value) != 0; -} - -inline bool QBasicAtomicInt::testAndSetRelaxed(int expectedValue, int newValue) -{ - return q_atomic_test_and_set_int(&_q_value, expectedValue, newValue) != 0; -} - -inline bool QBasicAtomicInt::testAndSetAcquire(int expectedValue, int newValue) -{ - return q_atomic_test_and_set_acquire_int(&_q_value, expectedValue, newValue) != 0; -} - -inline bool QBasicAtomicInt::testAndSetRelease(int expectedValue, int newValue) -{ - return q_atomic_test_and_set_release_int(&_q_value, expectedValue, newValue) != 0; -} - -inline int QBasicAtomicInt::fetchAndStoreRelaxed(int newValue) -{ - return q_atomic_set_int(&_q_value, newValue); -} - -inline int QBasicAtomicInt::fetchAndStoreAcquire(int newValue) -{ - return q_atomic_fetch_and_store_acquire_int(&_q_value, newValue); -} - -inline int QBasicAtomicInt::fetchAndStoreRelease(int newValue) -{ - return q_atomic_fetch_and_store_release_int(&_q_value, newValue); -} - -inline int QBasicAtomicInt::fetchAndAddRelaxed(int valueToAdd) -{ - return q_atomic_fetch_and_add_int(&_q_value, valueToAdd); -} - -inline int QBasicAtomicInt::fetchAndAddAcquire(int valueToAdd) -{ - return q_atomic_fetch_and_add_acquire_int(&_q_value, valueToAdd); -} - -inline int QBasicAtomicInt::fetchAndAddRelease(int valueToAdd) -{ - return q_atomic_fetch_and_add_release_int(&_q_value, valueToAdd); -} - -template -Q_INLINE_TEMPLATE bool QBasicAtomicPointer::testAndSetRelaxed(T *expectedValue, T *newValue) -{ - return q_atomic_test_and_set_ptr(&_q_value, expectedValue, newValue) != 0; -} - -template -Q_INLINE_TEMPLATE bool QBasicAtomicPointer::testAndSetAcquire(T *expectedValue, T *newValue) -{ - return q_atomic_test_and_set_acquire_ptr(&_q_value, expectedValue, newValue) != 0; -} - -template -Q_INLINE_TEMPLATE bool QBasicAtomicPointer::testAndSetRelease(T *expectedValue, T *newValue) -{ - return q_atomic_test_and_set_release_ptr(&_q_value, expectedValue, newValue) != 0; -} - -template -Q_INLINE_TEMPLATE T *QBasicAtomicPointer::fetchAndStoreRelaxed(T *newValue) -{ - return reinterpret_cast(q_atomic_set_ptr(&_q_value, newValue)); -} - -template -Q_INLINE_TEMPLATE T *QBasicAtomicPointer::fetchAndStoreAcquire(T *newValue) -{ - return reinterpret_cast(q_atomic_fetch_and_store_acquire_ptr(&_q_value, newValue)); -} - -template -Q_INLINE_TEMPLATE T *QBasicAtomicPointer::fetchAndStoreRelease(T *newValue) -{ - return reinterpret_cast(q_atomic_fetch_and_store_release_ptr(&_q_value, newValue)); -} - -template -Q_INLINE_TEMPLATE T *QBasicAtomicPointer::fetchAndAddRelaxed(qptrdiff valueToAdd) -{ - return reinterpret_cast(q_atomic_fetch_and_add_ptr(&_q_value, valueToAdd * sizeof(T))); -} -template -Q_INLINE_TEMPLATE T *QBasicAtomicPointer::fetchAndAddAcquire(qptrdiff valueToAdd) -{ - return reinterpret_cast(q_atomic_fetch_and_add_acquire_ptr(&_q_value, valueToAdd * sizeof(T))); -} - -template -Q_INLINE_TEMPLATE T *QBasicAtomicPointer::fetchAndAddRelease(qptrdiff valueToAdd) -{ - return reinterpret_cast(q_atomic_fetch_and_add_release_ptr(&_q_value, valueToAdd * sizeof(T))); -} - +# error "This compiler for Power/PowerPC is not supported" #endif inline bool QBasicAtomicInt::testAndSetOrdered(int expectedValue, int newValue) @@ -645,4 +513,4 @@ QT_END_NAMESPACE QT_END_HEADER -#endif // QATOMIC_POWERPC_H +#endif // QATOMIC_POWER_H diff --git a/src/corelib/arch/qatomic_s390.h b/src/corelib/arch/qatomic_s390.h index b6246e817fe..ef7ab346e30 100644 --- a/src/corelib/arch/qatomic_s390.h +++ b/src/corelib/arch/qatomic_s390.h @@ -42,6 +42,8 @@ #ifndef QATOMIC_S390_H #define QATOMIC_S390_H +#include + QT_BEGIN_HEADER QT_BEGIN_NAMESPACE diff --git a/src/corelib/arch/qatomic_sh.h b/src/corelib/arch/qatomic_sh.h deleted file mode 100644 index d16aaf26b15..00000000000 --- a/src/corelib/arch/qatomic_sh.h +++ /dev/null @@ -1,330 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the QtCore module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QATOMIC_SH_H -#define QATOMIC_SH_H - -QT_BEGIN_HEADER - -QT_BEGIN_NAMESPACE - -#define Q_ATOMIC_INT_REFERENCE_COUNTING_IS_NOT_NATIVE - -inline bool QBasicAtomicInt::isReferenceCountingNative() -{ return false; } -inline bool QBasicAtomicInt::isReferenceCountingWaitFree() -{ return false; } - -#define Q_ATOMIC_INT_TEST_AND_SET_IS_NOT_NATIVE - -inline bool QBasicAtomicInt::isTestAndSetNative() -{ return false; } -inline bool QBasicAtomicInt::isTestAndSetWaitFree() -{ return false; } - -#define Q_ATOMIC_INT_FETCH_AND_STORE_IS_NOT_NATIVE - -inline bool QBasicAtomicInt::isFetchAndStoreNative() -{ return false; } -inline bool QBasicAtomicInt::isFetchAndStoreWaitFree() -{ return false; } - -#define Q_ATOMIC_INT_FETCH_AND_ADD_IS_NOT_NATIVE - -inline bool QBasicAtomicInt::isFetchAndAddNative() -{ return false; } -inline bool QBasicAtomicInt::isFetchAndAddWaitFree() -{ return false; } - -#define Q_ATOMIC_POINTER_TEST_AND_SET_IS_NOT_NATIVE - -template -Q_INLINE_TEMPLATE bool QBasicAtomicPointer::isTestAndSetNative() -{ return false; } -template -Q_INLINE_TEMPLATE bool QBasicAtomicPointer::isTestAndSetWaitFree() -{ return false; } - -#define Q_ATOMIC_POINTER_FETCH_AND_STORE_IS_NOT_NATIVE - -template -Q_INLINE_TEMPLATE bool QBasicAtomicPointer::isFetchAndStoreNative() -{ return false; } -template -Q_INLINE_TEMPLATE bool QBasicAtomicPointer::isFetchAndStoreWaitFree() -{ return false; } - -#define Q_ATOMIC_POINTER_FETCH_AND_ADD_IS_NOT_NATIVE - -template -Q_INLINE_TEMPLATE bool QBasicAtomicPointer::isFetchAndAddNative() -{ return false; } -template -Q_INLINE_TEMPLATE bool QBasicAtomicPointer::isFetchAndAddWaitFree() -{ return false; } - -extern Q_CORE_EXPORT volatile char qt_atomic_lock; -Q_CORE_EXPORT void qt_atomic_yield(int *count); - -inline int qt_atomic_tasb(volatile char *ptr) -{ - register int ret; - asm volatile("tas.b @%2\n" - "movt %0" - : "=&r"(ret), "=m"(*ptr) - : "r"(ptr) - : "cc", "memory"); - return ret; -} - -// Reference counting - -inline bool QBasicAtomicInt::ref() -{ - int count = 0; - while (qt_atomic_tasb(&qt_atomic_lock) == 0) - qt_atomic_yield(&count); - int originalValue = _q_value++; - qt_atomic_lock = 0; - return originalValue != -1; -} - -inline bool QBasicAtomicInt::deref() -{ - int count = 0; - while (qt_atomic_tasb(&qt_atomic_lock) == 0) - qt_atomic_yield(&count); - int originalValue = _q_value--; - qt_atomic_lock = 0; - return originalValue != 1; -} - -// Test and set for integers - -inline bool QBasicAtomicInt::testAndSetOrdered(int expectedValue, int newValue) -{ - bool returnValue = false; - int count = 0; - while (qt_atomic_tasb(&qt_atomic_lock) == 0) - qt_atomic_yield(&count); - if (_q_value == expectedValue) { - _q_value = newValue; - returnValue = true; - } - qt_atomic_lock = 0; - return returnValue; -} - -inline bool QBasicAtomicInt::testAndSetRelaxed(int expectedValue, int newValue) -{ - return testAndSetOrdered(expectedValue, newValue); -} - -inline bool QBasicAtomicInt::testAndSetAcquire(int expectedValue, int newValue) -{ - return testAndSetOrdered(expectedValue, newValue); -} - -inline bool QBasicAtomicInt::testAndSetRelease(int expectedValue, int newValue) -{ - return testAndSetOrdered(expectedValue, newValue); -} - -// Fetch and store for integers - -inline int QBasicAtomicInt::fetchAndStoreOrdered(int newValue) -{ - int count = 0; - while (qt_atomic_tasb(&qt_atomic_lock) == 0) - qt_atomic_yield(&count); - int originalValue = _q_value; - _q_value = newValue; - qt_atomic_lock = 0; - return originalValue; -} - -inline int QBasicAtomicInt::fetchAndStoreRelaxed(int newValue) -{ - return fetchAndStoreOrdered(newValue); -} - -inline int QBasicAtomicInt::fetchAndStoreAcquire(int newValue) -{ - return fetchAndStoreOrdered(newValue); -} - -inline int QBasicAtomicInt::fetchAndStoreRelease(int newValue) -{ - return fetchAndStoreOrdered(newValue); -} - -// Fetch and add for integers - -inline int QBasicAtomicInt::fetchAndAddOrdered(int valueToAdd) -{ - int count = 0; - while (qt_atomic_tasb(&qt_atomic_lock) == 0) - qt_atomic_yield(&count); - int originalValue = _q_value; - _q_value += valueToAdd; - qt_atomic_lock = 0; - return originalValue; -} - -inline int QBasicAtomicInt::fetchAndAddRelaxed(int valueToAdd) -{ - return fetchAndAddOrdered(valueToAdd); -} - -inline int QBasicAtomicInt::fetchAndAddAcquire(int valueToAdd) -{ - return fetchAndAddOrdered(valueToAdd); -} - -inline int QBasicAtomicInt::fetchAndAddRelease(int valueToAdd) -{ - return fetchAndAddOrdered(valueToAdd); -} - -// Test and set for pointers - -template -Q_INLINE_TEMPLATE bool QBasicAtomicPointer::testAndSetOrdered(T *expectedValue, T *newValue) -{ - bool returnValue = false; - int count = 0; - while (qt_atomic_tasb(&qt_atomic_lock) == 0) - qt_atomic_yield(&count); - if (_q_value == expectedValue) { - _q_value = newValue; - returnValue = true; - } - qt_atomic_lock = 0; - return returnValue; -} - -template -Q_INLINE_TEMPLATE bool QBasicAtomicPointer::testAndSetRelaxed(T *expectedValue, T *newValue) -{ - return testAndSetOrdered(expectedValue, newValue); -} - -template -Q_INLINE_TEMPLATE bool QBasicAtomicPointer::testAndSetAcquire(T *expectedValue, T *newValue) -{ - return testAndSetOrdered(expectedValue, newValue); -} - -template -Q_INLINE_TEMPLATE bool QBasicAtomicPointer::testAndSetRelease(T *expectedValue, T *newValue) -{ - return testAndSetOrdered(expectedValue, newValue); -} - -// Fetch and store for pointers - -template -Q_INLINE_TEMPLATE T *QBasicAtomicPointer::fetchAndStoreOrdered(T *newValue) -{ - int count = 0; - while (qt_atomic_tasb(&qt_atomic_lock) == 0) - qt_atomic_yield(&count); - T *originalValue = _q_value; - _q_value = newValue; - qt_atomic_lock = 0; - return originalValue; -} - -template -Q_INLINE_TEMPLATE T *QBasicAtomicPointer::fetchAndStoreRelaxed(T *newValue) -{ - return fetchAndStoreOrdered(newValue); -} - -template -Q_INLINE_TEMPLATE T *QBasicAtomicPointer::fetchAndStoreAcquire(T *newValue) -{ - return fetchAndStoreOrdered(newValue); -} - -template -Q_INLINE_TEMPLATE T *QBasicAtomicPointer::fetchAndStoreRelease(T *newValue) -{ - return fetchAndStoreOrdered(newValue); -} - -// Fetch and add for pointers - -template -Q_INLINE_TEMPLATE T *QBasicAtomicPointer::fetchAndAddOrdered(qptrdiff valueToAdd) -{ - int count = 0; - while (qt_atomic_tasb(&qt_atomic_lock) == 0) - qt_atomic_yield(&count); - T *originalValue = (_q_value); - _q_value += valueToAdd; - qt_atomic_lock = 0; - return originalValue; -} - -template -Q_INLINE_TEMPLATE T *QBasicAtomicPointer::fetchAndAddRelaxed(qptrdiff valueToAdd) -{ - return fetchAndAddOrdered(valueToAdd); -} - -template -Q_INLINE_TEMPLATE T *QBasicAtomicPointer::fetchAndAddAcquire(qptrdiff valueToAdd) -{ - return fetchAndAddOrdered(valueToAdd); -} - -template -Q_INLINE_TEMPLATE T *QBasicAtomicPointer::fetchAndAddRelease(qptrdiff valueToAdd) -{ - return fetchAndAddOrdered(valueToAdd); -} - -QT_END_NAMESPACE - -QT_END_HEADER - -#endif // QATOMIC_SH_H diff --git a/src/corelib/arch/qatomic_sh4a.h b/src/corelib/arch/qatomic_sh4a.h index 042a602c77c..d00b9adc1de 100644 --- a/src/corelib/arch/qatomic_sh4a.h +++ b/src/corelib/arch/qatomic_sh4a.h @@ -42,6 +42,8 @@ #ifndef QATOMIC_SH4A_H #define QATOMIC_SH4A_H +#include + QT_BEGIN_HEADER QT_BEGIN_NAMESPACE diff --git a/src/corelib/arch/qatomic_sparc.h b/src/corelib/arch/qatomic_sparc.h index 5fc640e01b2..63282290c17 100644 --- a/src/corelib/arch/qatomic_sparc.h +++ b/src/corelib/arch/qatomic_sparc.h @@ -42,6 +42,8 @@ #ifndef QATOMIC_SPARC_H #define QATOMIC_SPARC_H +#include + QT_BEGIN_HEADER QT_BEGIN_NAMESPACE diff --git a/src/corelib/arch/parisc/qatomic_parisc.cpp b/src/corelib/arch/qatomic_unix.cpp similarity index 62% rename from src/corelib/arch/parisc/qatomic_parisc.cpp rename to src/corelib/arch/qatomic_unix.cpp index 5e59669b227..a709be3fa17 100644 --- a/src/corelib/arch/parisc/qatomic_parisc.cpp +++ b/src/corelib/arch/qatomic_unix.cpp @@ -39,50 +39,44 @@ ** ****************************************************************************/ -#include -#include +#include "qplatformdefs.h" + +#include + +// If operating system, processor, and compiler detection fails, we fall back +// to this generic, out-of-line implementation + +#if defined(QATOMIC_UNIX_H) QT_BEGIN_NAMESPACE +static pthread_mutex_t qAtomicMutex = PTHREAD_MUTEX_INITIALIZER; -QT_USE_NAMESPACE - -#define UNLOCKED {-1,-1,-1,-1} -#define UNLOCKED2 UNLOCKED,UNLOCKED -#define UNLOCKED4 UNLOCKED2,UNLOCKED2 -#define UNLOCKED8 UNLOCKED4,UNLOCKED4 -#define UNLOCKED16 UNLOCKED8,UNLOCKED8 -#define UNLOCKED32 UNLOCKED16,UNLOCKED16 -#define UNLOCKED64 UNLOCKED32,UNLOCKED32 -#define UNLOCKED128 UNLOCKED64,UNLOCKED64 -#define UNLOCKED256 UNLOCKED128,UNLOCKED128 - -// use a 4k page for locks -static int locks[256][4] = { UNLOCKED256 }; - -int *getLock(volatile void *addr) -{ return locks[qHash(const_cast(addr)) % 256]; } - -static int *align16(int *lock) +Q_CORE_EXPORT +bool QAtomicOps::testAndSetRelaxed(int &_q_value, int expectedValue, int newValue) { - ulong off = (((ulong) lock) % 16); - return off ? (int *)(ulong(lock) + 16 - off) : lock; -} - -extern "C" { - - int q_ldcw(volatile int *addr); - - void q_atomic_lock(int *lock) - { - // ldcw requires a 16-byte aligned address - volatile int *x = align16(lock); - while (q_ldcw(x) == 0) - ; + bool returnValue = false; + pthread_mutex_lock(&qAtomicMutex); + if (_q_value == expectedValue) { + _q_value = newValue; + returnValue = true; } - - void q_atomic_unlock(int *lock) - { lock[0] = lock[1] = lock[2] = lock[3] = -1; } + pthread_mutex_unlock(&qAtomicMutex); + return returnValue; } +Q_CORE_EXPORT +bool QAtomicOps::testAndSetRelaxed(void *&_q_value, void *expectedValue, void *newValue) +{ + bool returnValue = false; + pthread_mutex_lock(&qAtomicMutex); + if (_q_value == expectedValue) { + _q_value = newValue; + returnValue = true; + } + pthread_mutex_unlock(&qAtomicMutex); + return returnValue; +} QT_END_NAMESPACE + +#endif // QATOMIC_UNIX_H diff --git a/src/corelib/arch/qatomic_unix.h b/src/corelib/arch/qatomic_unix.h new file mode 100644 index 00000000000..3dc168c0aeb --- /dev/null +++ b/src/corelib/arch/qatomic_unix.h @@ -0,0 +1,117 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the QtCore module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QATOMIC_UNIX_H +#define QATOMIC_UNIX_H + +#include + +QT_BEGIN_HEADER +QT_BEGIN_NAMESPACE + +#if 0 +// silence syncqt warnings +QT_END_NAMESPACE +QT_END_HEADER + +#pragma qt_sync_stop_processing +#endif + +#define Q_ATOMIC_INT_REFERENCE_COUNTING_IS_NOT_NATIVE +#define Q_ATOMIC_INT_TEST_AND_SET_IS_NOT_NATIVE +#define Q_ATOMIC_INT_FETCH_AND_STORE_IS_NOT_NATIVE +#define Q_ATOMIC_INT_FETCH_AND_ADD_IS_NOT_NATIVE + +#define Q_ATOMIC_INT32_IS_SUPPORTED + +#define Q_ATOMIC_POINTER_TEST_AND_SET_IS_NOT_NATIVE +#define Q_ATOMIC_POINTER_FETCH_AND_STORE_IS_NOT_NATIVE +#define Q_ATOMIC_POINTER_FETCH_AND_ADD_IS_NOT_NATIVE + +template<> struct QAtomicIntegerTraits { enum { IsInteger = 1 }; }; + +// No definition, needs specialization +template struct QAtomicOps; + +template <> +struct QAtomicOps : QGenericAtomicOps > +{ + typedef int Type; + + static inline bool isTestAndSetNative() { return false; } + static inline bool isTestAndSetWaitFree() { return false; } + Q_CORE_EXPORT static bool testAndSetRelaxed(int &_q_value, int expectedValue, int newValue); +}; + +template <> +struct QAtomicOps : QGenericAtomicOps > +{ + typedef void *Type; + + static inline bool isTestAndSetNative() { return false; } + static inline bool isTestAndSetWaitFree() { return false; } + Q_CORE_EXPORT static bool testAndSetRelaxed(void *&_q_value, void *expectedValue, void *newValue); +}; + +template +struct QAtomicOps : QGenericAtomicOps > +{ + typedef T *Type; + + // helper to strip cv qualifiers + static inline void *nocv(const T *p) { return const_cast(static_cast(p)); } + + static inline bool isTestAndSetNative() { return false; } + static inline bool isTestAndSetWaitFree() { return false; } + static inline bool testAndSetRelaxed(T *&_q_value, T *expectedValue, T *newValue) + { + // forward to the void* specialization + void *voidp = nocv(_q_value); + bool returnValue = QAtomicOps::testAndSetRelaxed(voidp, nocv(expectedValue), nocv(newValue)); + _q_value = reinterpret_cast(voidp); + return returnValue; + } +}; + +QT_END_NAMESPACE +QT_END_HEADER + +#endif // QATOMIC_UNIX_H diff --git a/src/corelib/arch/qatomic_vxworks.h b/src/corelib/arch/qatomic_vxworks.h index c18563ef3c7..564a07f3eaa 100644 --- a/src/corelib/arch/qatomic_vxworks.h +++ b/src/corelib/arch/qatomic_vxworks.h @@ -45,9 +45,11 @@ QT_BEGIN_HEADER #if defined(__ppc) -# include +# include #else // generic implementation with taskLock() +#include + #if 0 // we don't want to include the system header here for two function prototypes, // because it pulls in a _lot_ of stuff that pollutes the global namespace diff --git a/src/corelib/arch/qatomic_x86_64.h b/src/corelib/arch/qatomic_x86_64.h index f2fa8ce5f40..33427ebf33e 100644 --- a/src/corelib/arch/qatomic_x86_64.h +++ b/src/corelib/arch/qatomic_x86_64.h @@ -50,6 +50,10 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE #if 0 +// silence syncqt warnings +QT_END_NAMESPACE +QT_END_HEADER + #pragma qt_sync_stop_processing #endif diff --git a/src/corelib/arch/sh/arch.pri b/src/corelib/arch/sh/arch.pri deleted file mode 100644 index 67fbb16c105..00000000000 --- a/src/corelib/arch/sh/arch.pri +++ /dev/null @@ -1,4 +0,0 @@ -# -# SH (Renesas SuperH) architecture -# -SOURCES += $$QT_ARCH_CPP/qatomic_sh.cpp diff --git a/src/corelib/arch/sparc/arch.pri b/src/corelib/arch/sparc/arch.pri index 9bb3a888e81..b3ca3996406 100644 --- a/src/corelib/arch/sparc/arch.pri +++ b/src/corelib/arch/sparc/arch.pri @@ -2,9 +2,9 @@ # SPARC architecture # *-64* { - SOURCES += $$QT_ARCH_CPP/qatomic64.s + SOURCES += $$PWD/qatomic64.s } else { - SOURCES += $$QT_ARCH_CPP/qatomic32.s \ - $$QT_ARCH_CPP/qatomic_sparc.cpp + SOURCES += $$PWD/qatomic32.s \ + $$PWD/qatomic_sparc.cpp } diff --git a/src/corelib/arch/vxworks/arch.pri b/src/corelib/arch/vxworks/arch.pri deleted file mode 100644 index a7686186b0e..00000000000 --- a/src/corelib/arch/vxworks/arch.pri +++ /dev/null @@ -1,6 +0,0 @@ -# -# VxWorks generic -# -*-ppc-* { - SOURCES += qatomic_ppc.s -} diff --git a/src/corelib/arch/vxworks/qatomic_ppc.s b/src/corelib/arch/vxworks/qatomic_ppc.s deleted file mode 100644 index 03971e89e8e..00000000000 --- a/src/corelib/arch/vxworks/qatomic_ppc.s +++ /dev/null @@ -1,415 +0,0 @@ - - .align 2 - .globl q_atomic_test_and_set_int - .globl .q_atomic_test_and_set_int -q_atomic_test_and_set_int: -.q_atomic_test_and_set_int: - lwarx 6,0,3 - xor. 6,6,4 - bne $+12 - stwcx. 5,0,3 - bne- $-16 - subfic 3,6,0 - adde 3,3,6 - blr -LT..q_atomic_test_and_set_int: - .long 0 - .byte 0,9,32,64,0,0,3,0 - .long 0 - .long LT..q_atomic_test_and_set_int-.q_atomic_test_and_set_int - .short 25 - .byte "q_atomic_test_and_set_int" - .align 2 - - .align 2 - .globl q_atomic_test_and_set_acquire_int - .globl .q_atomic_test_and_set_acquire_int -q_atomic_test_and_set_acquire_int: -.q_atomic_test_and_set_acquire_int: - lwarx 6,0,3 - xor. 6,6,4 - bne $+16 - stwcx. 5,0,3 - bne- $-16 - isync - subfic 3,6,0 - adde 3,3,6 - blr -LT..q_atomic_test_and_set_acquire_int: - .long 0 - .byte 0,9,32,64,0,0,3,0 - .long 0 - .long LT..q_atomic_test_and_set_acquire_int-.q_atomic_test_and_set_acquire_int - .short 33 - .byte "q_atomic_test_and_set_acquire_int" - .align 2 - - .align 2 - .globl q_atomic_test_and_set_release_int - .globl .q_atomic_test_and_set_release_int -q_atomic_test_and_set_release_int: -.q_atomic_test_and_set_release_int: - lwarx 6,0,3 - xor. 6,6,4 - bne $+12 - stwcx. 5,0,3 - bne- $-16 - subfic 3,6,0 - adde 3,3,6 - blr -LT..q_atomic_test_and_set_release_int: - .long 0 - .byte 0,9,32,64,0,0,3,0 - .long 0 - .long LT..q_atomic_test_and_set_release_int-.q_atomic_test_and_set_release_int - .short 33 - .byte "q_atomic_test_and_set_release_int" - .align 2 - - .align 2 - .globl q_atomic_test_and_set_ptr - .globl .q_atomic_test_and_set_ptr -q_atomic_test_and_set_ptr: -.q_atomic_test_and_set_ptr: - lwarx 6,0,3 - xor. 6,6,4 - bne $+12 - stwcx. 5,0,3 - bne- $-16 - subfic 3,6,0 - adde 3,3,6 - blr -LT..q_atomic_test_and_set_ptr: - .long 0 - .byte 0,9,32,64,0,0,3,0 - .long 0 - .long LT..q_atomic_test_and_set_ptr-.q_atomic_test_and_set_ptr - .short 25 - .byte "q_atomic_test_and_set_ptr" - .align 2 - - .align 2 - .globl q_atomic_test_and_set_acquire_ptr - .globl .q_atomic_test_and_set_acquire_ptr -q_atomic_test_and_set_acquire_ptr: -.q_atomic_test_and_set_acquire_ptr: - lwarx 6,0,3 - xor. 6,6,4 - bne $+16 - stwcx. 5,0,3 - bne- $-16 - isync - subfic 3,6,0 - adde 3,3,6 - blr -LT..q_atomic_test_and_set_acquire_ptr: - .long 0 - .byte 0,9,32,64,0,0,3,0 - .long 0 - .long LT..q_atomic_test_and_set_acquire_ptr-.q_atomic_test_and_set_acquire_ptr - .short 25 - .byte "q_atomic_test_and_set_acquire_ptr" - .align 2 - - .align 2 - .globl q_atomic_test_and_set_release_ptr - .globl .q_atomic_test_and_set_release_ptr -q_atomic_test_and_set_release_ptr: -.q_atomic_test_and_set_release_ptr: - lwarx 6,0,3 - xor. 6,6,4 - bne $+12 - stwcx. 5,0,3 - bne- $-16 - subfic 3,6,0 - adde 3,3,6 - blr -LT..q_atomic_test_and_set_release_ptr: - .long 0 - .byte 0,9,32,64,0,0,3,0 - .long 0 - .long LT..q_atomic_test_and_set_release_ptr-.q_atomic_test_and_set_release_ptr - .short 33 - .byte "q_atomic_test_and_set_release_ptr" - .align 2 - - .align 2 - .globl q_atomic_increment - .globl .q_atomic_increment -q_atomic_increment: -.q_atomic_increment: - lwarx 4,0,3 - addi 4,4,1 - stwcx. 4,0,3 - bne- $-12 - mr 3,4 - blr -LT..q_atomic_increment: - .long 0 - .byte 0,9,32,64,0,0,1,0 - .long 0 - .long LT..q_atomic_increment-.q_atomic_increment - .short 18 - .byte "q_atomic_increment" - .align 2 - - .align 2 - .globl q_atomic_decrement - .globl .q_atomic_decrement -q_atomic_decrement: -.q_atomic_decrement: - lwarx 4,0,3 - subi 4,4,1 - stwcx. 4,0,3 - bne- $-12 - mr 3,4 - blr -LT..q_atomic_decrement: - .long 0 - .byte 0,9,32,64,0,0,1,0 - .long 0 - .long LT..q_atomic_decrement-.q_atomic_decrement - .short 18 - .byte "q_atomic_decrement" - .align 2 - - .align 2 - .globl q_atomic_set_int - .globl .q_atomic_set_int -q_atomic_set_int: -.q_atomic_set_int: - lwarx 5,0,3 - stwcx. 4,0,3 - bne- $-8 - mr 3,5 - blr -LT..q_atomic_set_int: - .long 0 - .byte 0,9,32,64,0,0,2,0 - .long 0 - .long LT..q_atomic_set_int-.q_atomic_set_int - .short 16 - .byte "q_atomic_set_int" - .align 2 - - .align 2 - .globl q_atomic_fetch_and_store_acquire_int - .globl .q_atomic_fetch_and_store_acquire_int -q_atomic_fetch_and_store_acquire_int: -.q_atomic_fetch_and_store_acquire_int: - lwarx 5,0,3 - stwcx. 4,0,3 - bne- $-8 - isync - mr 3,5 - blr -LT..q_atomic_fetch_and_store_acquire_int: - .long 0 - .byte 0,9,32,64,0,0,2,0 - .long 0 - .long LT..q_atomic_fetch_and_store_acquire_int-.q_atomic_fetch_and_store_acquire_int - .short 16 - .byte "q_atomic_fetch_and_store_acquire_int" - .align 2 - - .align 2 - .globl q_atomic_fetch_and_store_release_int - .globl .q_atomic_fetch_and_store_release_int -q_atomic_fetch_and_store_release_int: -.q_atomic_fetch_and_store_release_int: - lwarx 5,0,3 - stwcx. 4,0,3 - bne- $-8 - mr 3,5 - blr -LT..q_atomic_fetch_and_store_release_int: - .long 0 - .byte 0,9,32,64,0,0,2,0 - .long 0 - .long LT..q_atomic_fetch_and_store_release_int-.q_atomic_fetch_and_store_release_int - .short 16 - .byte "q_atomic_fetch_and_store_release_int" - .align 2 - - .align 2 - .globl q_atomic_set_ptr - .globl .q_atomic_set_ptr -q_atomic_set_ptr: -.q_atomic_set_ptr: - lwarx 5,0,3 - stwcx. 4,0,3 - bne- $-8 - mr 3,5 - blr -LT..q_atomic_set_ptr: - .long 0 - .byte 0,9,32,64,0,0,2,0 - .long 0 - .long LT..q_atomic_set_ptr-.q_atomic_set_ptr - .short 16 - .byte "q_atomic_set_ptr" - .align 2 - - .align 2 - .globl q_atomic_fetch_and_store_acquire_ptr - .globl .q_atomic_fetch_and_store_acquire_ptr -q_atomic_fetch_and_store_acquire_ptr: -.q_atomic_fetch_and_store_acquire_ptr: - lwarx 5,0,3 - stwcx. 4,0,3 - bne- $-8 - isync - mr 3,5 - blr -LT..q_atomic_fetch_and_store_acquire_ptr: - .long 0 - .byte 0,9,32,64,0,0,2,0 - .long 0 - .long LT..q_atomic_fetch_and_store_acquire_ptr-.q_atomic_fetch_and_store_acquire_ptr - .short 16 - .byte "q_atomic_fetch_and_store_acquire_ptr" - .align 2 - - .align 2 - .globl q_atomic_fetch_and_store_release_ptr - .globl .q_atomic_fetch_and_store_release_ptr -q_atomic_fetch_and_store_release_ptr: -.q_atomic_fetch_and_store_release_ptr: - lwarx 5,0,3 - stwcx. 4,0,3 - bne- $-8 - mr 3,5 - blr -LT..q_atomic_fetch_and_store_release_ptr: - .long 0 - .byte 0,9,32,64,0,0,2,0 - .long 0 - .long LT..q_atomic_fetch_and_store_release_ptr-.q_atomic_fetch_and_store_release_ptr - .short 16 - .byte "q_atomic_fetch_and_store_release_ptr" - .align 2 - - .align 2 - .globl q_atomic_fetch_and_add_int - .globl .q_atomic_fetch_and_add_int -q_atomic_fetch_and_add_int: -.q_atomic_fetch_and_add_int: - lwarx 5,0,3 - add 6,4,5 - stwcx. 6,0,3 - bne- $-12 - mr 3,5 - blr -LT..q_atomic_fetch_and_add_int: - .long 0 - .byte 0,9,32,64,0,0,1,0 - .long 0 - .long LT..q_atomic_fetch_and_add_int-.q_atomic_fetch_and_add_int - .short 18 - .byte "q_atomic_fetch_and_add_int" - .align 2 - - .align 2 - .globl q_atomic_fetch_and_add_acquire_int - .globl .q_atomic_fetch_and_add_acquire_int -q_atomic_fetch_and_add_acquire_int: -.q_atomic_fetch_and_add_acquire_int: - lwarx 5,0,3 - add 6,4,5 - stwcx. 6,0,3 - bne- $-12 - isync - mr 3,5 - blr -LT..q_atomic_fetch_and_add_acquire_int: - .long 0 - .byte 0,9,32,64,0,0,1,0 - .long 0 - .long LT..q_atomic_fetch_and_add_acquire_int-.q_atomic_fetch_and_add_acquire_int - .short 18 - .byte "q_atomic_fetch_and_add_acquire_int" - .align 2 - - .align 2 - .globl q_atomic_fetch_and_add_release_int - .globl .q_atomic_fetch_and_add_release_int -q_atomic_fetch_and_add_release_int: -.q_atomic_fetch_and_add_release_int: - lwarx 5,0,3 - add 6,4,5 - stwcx. 6,0,3 - bne- $-12 - mr 3,5 - blr -LT..q_atomic_fetch_and_add_release_int: - .long 0 - .byte 0,9,32,64,0,0,1,0 - .long 0 - .long LT..q_atomic_fetch_and_add_release_int-.q_atomic_fetch_and_add_release_int - .short 34 - .byte "q_atomic_fetch_and_add_release_int" - .align 2 - - .align 2 - .globl q_atomic_fetch_and_add_ptr - .globl .q_atomic_fetch_and_add_ptr -q_atomic_fetch_and_add_ptr: -.q_atomic_fetch_and_add_ptr: - lwarx 5,0,3 - add 6,4,5 - stwcx. 6,0,3 - bne- $-12 - mr 3,5 - blr -LT..q_atomic_fetch_and_add_ptr: - .long 0 - .byte 0,9,32,64,0,0,1,0 - .long 0 - .long LT..q_atomic_fetch_and_add_ptr-.q_atomic_fetch_and_add_ptr - .short 26 - .byte "q_atomic_fetch_and_add_ptr" - .align 2 - - .align 2 - .globl q_atomic_fetch_and_add_acquire_ptr - .globl .q_atomic_fetch_and_add_acquire_ptr -q_atomic_fetch_and_add_acquire_ptr: -.q_atomic_fetch_and_add_acquire_ptr: - lwarx 5,0,3 - add 6,4,5 - stwcx. 6,0,3 - bne- $-12 - isync - mr 3,5 - blr -LT..q_atomic_fetch_and_add_acquire_ptr: - .long 0 - .byte 0,9,32,64,0,0,1,0 - .long 0 - .long LT..q_atomic_fetch_and_add_acquire_ptr-.q_atomic_fetch_and_add_acquire_ptr - .short 34 - .byte "q_atomic_fetch_and_add_acquire_ptr" - .align 2 - - .align 2 - .globl q_atomic_fetch_and_add_release_ptr - .globl .q_atomic_fetch_and_add_release_ptr -q_atomic_fetch_and_add_release_ptr: -.q_atomic_fetch_and_add_release_ptr: - lwarx 5,0,3 - add 6,4,5 - stwcx. 6,0,3 - bne- $-12 - mr 3,5 - blr -LT..q_atomic_fetch_and_add_release_ptr: - .long 0 - .byte 0,9,32,64,0,0,1,0 - .long 0 - .long LT..q_atomic_fetch_and_add_release_ptr-.q_atomic_fetch_and_add_release_ptr - .short 34 - .byte "q_atomic_fetch_and_add_release_ptr" - .align 2 - -_section_.text: - .long _section_.text diff --git a/src/corelib/corelib.pro b/src/corelib/corelib.pro index c8c9b9b8e6f..40b42f4dbea 100644 --- a/src/corelib/corelib.pro +++ b/src/corelib/corelib.pro @@ -28,6 +28,7 @@ include(plugin/plugin.pri) include(kernel/kernel.pri) include(codecs/codecs.pri) include(statemachine/statemachine.pri) +include(mimetypes/mimetypes.pri) include(xml/xml.pri) mac|darwin { diff --git a/src/corelib/global/global.pri b/src/corelib/global/global.pri index fca9969db09..ddba51950a8 100644 --- a/src/corelib/global/global.pri +++ b/src/corelib/global/global.pri @@ -2,11 +2,15 @@ HEADERS += \ global/qglobal.h \ + global/qsystemdetection.h \ + global/qcompilerdetection.h \ + global/qprocessordetection.h \ global/qnamespace.h \ global/qendian.h \ global/qnumeric_p.h \ global/qnumeric.h \ - global/qlogging.h + global/qlogging.h \ + global/qtypeinfo.h SOURCES += \ global/qglobal.cpp \ diff --git a/src/corelib/global/qcompilerdetection.h b/src/corelib/global/qcompilerdetection.h new file mode 100644 index 00000000000..5ab79092d20 --- /dev/null +++ b/src/corelib/global/qcompilerdetection.h @@ -0,0 +1,537 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the QtCore module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QCOMPILERDETECTION_H +#define QCOMPILERDETECTION_H + +/* + The compiler, must be one of: (Q_CC_x) + + SYM - Digital Mars C/C++ (used to be Symantec C++) + MSVC - Microsoft Visual C/C++, Intel C++ for Windows + BOR - Borland/Turbo C++ + WAT - Watcom C++ + GNU - GNU C++ + COMEAU - Comeau C++ + EDG - Edison Design Group C++ + OC - CenterLine C++ + SUN - Forte Developer, or Sun Studio C++ + MIPS - MIPSpro C++ + DEC - DEC C++ + HPACC - HP aC++ + USLC - SCO OUDK and UDK + CDS - Reliant C++ + KAI - KAI C++ + INTEL - Intel C++ for Linux, Intel C++ for Windows + HIGHC - MetaWare High C/C++ + PGI - Portland Group C++ + GHS - Green Hills Optimizing C++ Compilers + RVCT - ARM Realview Compiler Suite + CLANG - C++ front-end for the LLVM compiler + + + Should be sorted most to least authoritative. +*/ + +/* Symantec C++ is now Digital Mars */ +#if defined(__DMC__) || defined(__SC__) +# define Q_CC_SYM +/* "explicit" semantics implemented in 8.1e but keyword recognized since 7.5 */ +# if defined(__SC__) && __SC__ < 0x750 +# define Q_NO_EXPLICIT_KEYWORD +# endif +# define Q_NO_USING_KEYWORD + +#elif defined(_MSC_VER) +# define Q_CC_MSVC +# define Q_CC_MSVC_NET +# define Q_CANNOT_DELETE_CONSTANT +# define Q_OUTOFLINE_TEMPLATE inline +# define Q_NO_TEMPLATE_FRIENDS +# define Q_ALIGNOF(type) __alignof(type) +# define Q_DECL_ALIGN(n) __declspec(align(n)) +/* Intel C++ disguising as Visual C++: the `using' keyword avoids warnings */ +# if defined(__INTEL_COMPILER) +# define Q_CC_INTEL +# endif +/* MSVC does not support SSE/MMX on x64 */ +# if (defined(Q_CC_MSVC) && defined(_M_X64)) +# undef QT_HAVE_SSE +# undef QT_HAVE_MMX +# undef QT_HAVE_3DNOW +# endif + +#if defined(Q_CC_MSVC) && _MSC_VER >= 1600 +# define Q_COMPILER_RVALUE_REFS +# define Q_COMPILER_AUTO_TYPE +# define Q_COMPILER_LAMBDA +# define Q_COMPILER_DECLTYPE +# define Q_COMPILER_STATIC_ASSERT +// MSCV has std::initilizer_list, but do not support the braces initialization +//# define Q_COMPILER_INITIALIZER_LISTS +# endif + + +#elif defined(__BORLANDC__) || defined(__TURBOC__) +# define Q_CC_BOR +# define Q_INLINE_TEMPLATE +# if __BORLANDC__ < 0x502 +# define Q_NO_BOOL_TYPE +# define Q_NO_EXPLICIT_KEYWORD +# endif +# define Q_NO_USING_KEYWORD + +#elif defined(__WATCOMC__) +# define Q_CC_WAT + +/* ARM Realview Compiler Suite + RVCT compiler also defines __EDG__ and __GNUC__ (if --gnu flag is given), + so check for it before that */ +#elif defined(__ARMCC__) || defined(__CC_ARM) +# define Q_CC_RVCT +# if __TARGET_ARCH_ARM >= 6 +# define QT_HAVE_ARMV6 +# endif +/* work-around for missing compiler intrinsics */ +# define __is_empty(X) false +# define __is_pod(X) false +#elif defined(__GNUC__) +# define Q_CC_GNU +# define Q_C_CALLBACKS +# if defined(__MINGW32__) +# define Q_CC_MINGW +# endif +# if defined(__INTEL_COMPILER) +/* Intel C++ also masquerades as GCC 3.2.0 */ +# define Q_CC_INTEL +# endif +# if defined(__clang__) +/* Clang also masquerades as GCC 4.2.1 */ +# define Q_CC_CLANG +# endif +# ifdef __APPLE__ +# define Q_NO_DEPRECATED_CONSTRUCTORS +# endif +# if __GNUC__ == 2 && __GNUC_MINOR__ <= 7 +# define Q_FULL_TEMPLATE_INSTANTIATION +# endif +/* GCC 2.95 knows "using" but does not support it correctly */ +# if __GNUC__ == 2 && __GNUC_MINOR__ <= 95 +# define Q_NO_USING_KEYWORD +# endif +# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) +# define Q_ALIGNOF(type) __alignof__(type) +# define Q_TYPEOF(expr) __typeof__(expr) +# define Q_DECL_ALIGN(n) __attribute__((__aligned__(n))) +# endif +# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) +# define Q_LIKELY(expr) __builtin_expect(!!(expr), true) +# define Q_UNLIKELY(expr) __builtin_expect(!!(expr), false) +# endif +/* GCC 3.1 and GCC 3.2 wrongly define _SB_CTYPE_MACROS on HP-UX */ +# if defined(Q_OS_HPUX) && __GNUC__ == 3 && __GNUC_MINOR__ >= 1 +# define Q_WRONG_SB_CTYPE_MACROS +# endif +/* GCC <= 3.3 cannot handle template friends */ +# if __GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ <= 3) +# define Q_NO_TEMPLATE_FRIENDS +# endif +/* Apple's GCC 3.1 chokes on our streaming qDebug() */ +# if defined(Q_OS_DARWIN) && __GNUC__ == 3 && (__GNUC_MINOR__ >= 1 && __GNUC_MINOR__ < 3) +# define Q_BROKEN_DEBUG_STREAM +# endif +# if (defined(Q_CC_GNU) || defined(Q_CC_INTEL)) && !defined(QT_MOC_CPP) +# define Q_PACKED __attribute__ ((__packed__)) +# define Q_NO_PACKED_REFERENCE +# ifndef __ARM_EABI__ +# define QT_NO_ARM_EABI +# endif +# endif +# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 403 +# define Q_ALLOC_SIZE(x) __attribute__((alloc_size(x))) +# endif +# if defined(__GXX_EXPERIMENTAL_CXX0X__) && !defined(__clang__) /* clang C++11 enablers are found below, don't do them here */ +# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 403 + /* C++0x features supported in GCC 4.3: */ +# define Q_COMPILER_VARIADIC_MACROS +# define Q_COMPILER_RVALUE_REFS +# define Q_COMPILER_DECLTYPE +# define Q_COMPILER_STATIC_ASSERT +# endif +# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 + /* C++0x features supported in GCC 4.4: */ +# define Q_COMPILER_UNICODE_STRINGS +# define Q_COMPILER_VARIADIC_TEMPLATES +# define Q_COMPILER_AUTO_TYPE +# define Q_COMPILER_EXTERN_TEMPLATES +# define Q_COMPILER_DEFAULT_DELETE_MEMBERS +# define Q_COMPILER_CLASS_ENUM +# define Q_COMPILER_INITIALIZER_LISTS +# define Q_COMPILER_ATOMICS +# endif +# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 405 + /* C++0x features supported in GCC 4.5: */ +# define Q_COMPILER_LAMBDA +# endif +# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 + /* C++0x features supported in GCC 4.6: */ +# define Q_COMPILER_NULLPTR +# define Q_COMPILER_CONSTEXPR +# define Q_COMPILER_UNRESTRICTED_UNIONS +# define Q_COMPILER_RANGE_FOR +# endif +# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 + /* C++0x features supported in GCC 4.7: */ +# define Q_COMPILER_EXPLICIT_OVERRIDES +# endif + +# endif + +/* IBM compiler versions are a bit messy. There are actually two products: + the C product, and the C++ product. The C++ compiler is always packaged + with the latest version of the C compiler. Version numbers do not always + match. This little table (I'm not sure it's accurate) should be helpful: + + C++ product C product + + C Set 3.1 C Compiler 3.0 + ... ... + C++ Compiler 3.6.6 C Compiler 4.3 + ... ... + Visual Age C++ 4.0 ... + ... ... + Visual Age C++ 5.0 C Compiler 5.0 + ... ... + Visual Age C++ 6.0 C Compiler 6.0 + + Now: + __xlC__ is the version of the C compiler in hexadecimal notation + is only an approximation of the C++ compiler version + __IBMCPP__ is the version of the C++ compiler in decimal notation + but it is not defined on older compilers like C Set 3.1 */ +#elif defined(__xlC__) +# define Q_CC_XLC +# define Q_FULL_TEMPLATE_INSTANTIATION +# if __xlC__ < 0x400 +# define Q_NO_BOOL_TYPE +# define Q_NO_EXPLICIT_KEYWORD +# define Q_NO_USING_KEYWORD +# define Q_OUTOFLINE_TEMPLATE inline +# define Q_BROKEN_TEMPLATE_SPECIALIZATION +# define Q_CANNOT_DELETE_CONSTANT +# elif __xlC__ >= 0x0600 +# define Q_ALIGNOF(type) __alignof__(type) +# define Q_TYPEOF(expr) __typeof__(expr) +# define Q_DECL_ALIGN(n) __attribute__((__aligned__(n))) +# define Q_PACKED __attribute__((__packed__)) +# endif + +/* Older versions of DEC C++ do not define __EDG__ or __EDG - observed + on DEC C++ V5.5-004. New versions do define __EDG__ - observed on + Compaq C++ V6.3-002. + This compiler is different enough from other EDG compilers to handle + it separately anyway. */ +#elif defined(__DECCXX) || defined(__DECC) +# define Q_CC_DEC +/* Compaq C++ V6 compilers are EDG-based but I'm not sure about older + DEC C++ V5 compilers. */ +# if defined(__EDG__) +# define Q_CC_EDG +# endif +/* Compaq have disabled EDG's _BOOL macro and use _BOOL_EXISTS instead + - observed on Compaq C++ V6.3-002. + In any case versions prior to Compaq C++ V6.0-005 do not have bool. */ +# if !defined(_BOOL_EXISTS) +# define Q_NO_BOOL_TYPE +# endif +/* Spurious (?) error messages observed on Compaq C++ V6.5-014. */ +# define Q_NO_USING_KEYWORD +/* Apply to all versions prior to Compaq C++ V6.0-000 - observed on + DEC C++ V5.5-004. */ +# if __DECCXX_VER < 60060000 +# define Q_BROKEN_TEMPLATE_SPECIALIZATION +# define Q_CANNOT_DELETE_CONSTANT +# endif +/* avoid undefined symbol problems with out-of-line template members */ +# define Q_OUTOFLINE_TEMPLATE inline + +/* The Portland Group C++ compiler is based on EDG and does define __EDG__ + but the C compiler does not */ +#elif defined(__PGI) +# define Q_CC_PGI +# if defined(__EDG__) +# define Q_CC_EDG +# endif + +/* Compilers with EDG front end are similar. To detect them we test: + __EDG documented by SGI, observed on MIPSpro 7.3.1.1 and KAI C++ 4.0b + __EDG__ documented in EDG online docs, observed on Compaq C++ V6.3-002 + and PGI C++ 5.2-4 */ +#elif !defined(Q_OS_HPUX) && (defined(__EDG) || defined(__EDG__)) +# define Q_CC_EDG +/* From the EDG documentation (does not seem to apply to Compaq C++): + _BOOL + Defined in C++ mode when bool is a keyword. The name of this + predefined macro is specified by a configuration flag. _BOOL + is the default. + __BOOL_DEFINED + Defined in Microsoft C++ mode when bool is a keyword. */ +# if !defined(_BOOL) && !defined(__BOOL_DEFINED) +# define Q_NO_BOOL_TYPE +# endif + +/* The Comeau compiler is based on EDG and does define __EDG__ */ +# if defined(__COMO__) +# define Q_CC_COMEAU +# define Q_C_CALLBACKS + +/* The `using' keyword was introduced to avoid KAI C++ warnings + but it's now causing KAI C++ errors instead. The standard is + unclear about the use of this keyword, and in practice every + compiler is using its own set of rules. Forget it. */ +# elif defined(__KCC) +# define Q_CC_KAI +# define Q_NO_USING_KEYWORD + +/* Using the `using' keyword avoids Intel C++ for Linux warnings */ +# elif defined(__INTEL_COMPILER) +# define Q_CC_INTEL + +/* Uses CFront, make sure to read the manual how to tweak templates. */ +# elif defined(__ghs) +# define Q_CC_GHS + +# elif defined(__DCC__) +# define Q_CC_DIAB +# undef Q_NO_BOOL_TYPE +# if !defined(__bool) +# define Q_NO_BOOL_TYPE +# endif + +/* The UnixWare 7 UDK compiler is based on EDG and does define __EDG__ */ +# elif defined(__USLC__) && defined(__SCO_VERSION__) +# define Q_CC_USLC +/* The latest UDK 7.1.1b does not need this, but previous versions do */ +# if !defined(__SCO_VERSION__) || (__SCO_VERSION__ < 302200010) +# define Q_OUTOFLINE_TEMPLATE inline +# endif +# define Q_NO_USING_KEYWORD /* ### check "using" status */ + +/* Never tested! */ +# elif defined(CENTERLINE_CLPP) || defined(OBJECTCENTER) +# define Q_CC_OC +# define Q_NO_USING_KEYWORD + +/* CDS++ defines __EDG__ although this is not documented in the Reliant + documentation. It also follows conventions like _BOOL and this documented */ +# elif defined(sinix) +# define Q_CC_CDS +# define Q_NO_USING_KEYWORD + +/* The MIPSpro compiler defines __EDG */ +# elif defined(__sgi) +# define Q_CC_MIPS +# define Q_NO_USING_KEYWORD /* ### check "using" status */ +# define Q_NO_TEMPLATE_FRIENDS +# if defined(_COMPILER_VERSION) && (_COMPILER_VERSION >= 740) +# define Q_OUTOFLINE_TEMPLATE inline +# pragma set woff 3624,3625,3649 /* turn off some harmless warnings */ +# endif +# endif + +/* VxWorks' DIAB toolchain has an additional EDG type C++ compiler + (see __DCC__ above). This one is for C mode files (__EDG is not defined) */ +#elif defined(_DIAB_TOOL) +# define Q_CC_DIAB + +/* Never tested! */ +#elif defined(__HIGHC__) +# define Q_CC_HIGHC + +#elif defined(__SUNPRO_CC) || defined(__SUNPRO_C) +# define Q_CC_SUN +/* 5.0 compiler or better + 'bool' is enabled by default but can be disabled using -features=nobool + in which case _BOOL is not defined + this is the default in 4.2 compatibility mode triggered by -compat=4 */ +# if __SUNPRO_CC >= 0x500 +# define QT_NO_TEMPLATE_TEMPLATE_PARAMETERS + /* see http://developers.sun.com/sunstudio/support/Ccompare.html */ +# if __SUNPRO_CC >= 0x590 +# define Q_ALIGNOF(type) __alignof__(type) +# define Q_TYPEOF(expr) __typeof__(expr) +# define Q_DECL_ALIGN(n) __attribute__((__aligned__(n))) +# endif +# if __SUNPRO_CC >= 0x550 +# define Q_DECL_EXPORT __global +# endif +# if __SUNPRO_CC < 0x5a0 +# define Q_NO_TEMPLATE_FRIENDS +# endif +# if !defined(_BOOL) +# define Q_NO_BOOL_TYPE +# endif +# if defined(__SUNPRO_CC_COMPAT) && (__SUNPRO_CC_COMPAT <= 4) +# define Q_NO_USING_KEYWORD +# endif +# define Q_C_CALLBACKS +/* 4.2 compiler or older */ +# else +# define Q_NO_BOOL_TYPE +# define Q_NO_EXPLICIT_KEYWORD +# define Q_NO_USING_KEYWORD +# endif + +/* CDS++ does not seem to define __EDG__ or __EDG according to Reliant + documentation but nevertheless uses EDG conventions like _BOOL */ +#elif defined(sinix) +# define Q_CC_EDG +# define Q_CC_CDS +# if !defined(_BOOL) +# define Q_NO_BOOL_TYPE +# endif +# define Q_BROKEN_TEMPLATE_SPECIALIZATION + +#elif defined(Q_OS_HPUX) +/* __HP_aCC was not defined in first aCC releases */ +# if defined(__HP_aCC) || __cplusplus >= 199707L +# define Q_NO_TEMPLATE_FRIENDS +# define Q_CC_HPACC +# if __HP_aCC-0 < 060000 +# define QT_NO_TEMPLATE_TEMPLATE_PARAMETERS +# define Q_DECL_EXPORT __declspec(dllexport) +# define Q_DECL_IMPORT __declspec(dllimport) +# endif +# if __HP_aCC-0 >= 061200 +# define Q_DECL_ALIGN(n) __attribute__((aligned(n))) +# endif +# if __HP_aCC-0 >= 062000 +# define Q_DECL_EXPORT __attribute__((visibility("default"))) +# define Q_DECL_HIDDEN __attribute__((visibility("hidden"))) +# define Q_DECL_IMPORT Q_DECL_EXPORT +# endif +# else +# define Q_CC_HP +# define Q_NO_BOOL_TYPE +# define Q_FULL_TEMPLATE_INSTANTIATION +# define Q_BROKEN_TEMPLATE_SPECIALIZATION +# define Q_NO_EXPLICIT_KEYWORD +# endif +# define Q_NO_USING_KEYWORD /* ### check "using" status */ + +#else +# error "Qt has not been tested with this compiler - see http://www.qt-project.org/" +#endif + + +#ifdef Q_CC_INTEL +# if __INTEL_COMPILER < 1200 +# define Q_NO_TEMPLATE_FRIENDS +# endif +# if defined(__GXX_EXPERIMENTAL_CXX0X__) || defined(__GXX_EXPERIMENTAL_CPP0X__) +# if __INTEL_COMPILER >= 1200 +# define Q_COMPILER_RVALUE_REFS +# define Q_COMPILER_EXTERN_TEMPLATES +# define Q_COMPILER_DECLTYPE +# define Q_COMPILER_VARIADIC_TEMPLATES +# define Q_COMPILER_AUTO_TYPE +# define Q_COMPILER_DEFAULT_DELETE_MEMBERS +# define Q_COMPILER_CLASS_ENUM +# define Q_COMPILER_LAMBDA +# define Q_COMPILER_STATIC_ASSERT +# endif +# endif +#endif + +#ifdef Q_CC_CLANG +/* General C++ features */ +# if !__has_feature(cxx_exceptions) +# define QT_NO_EXCEPTIONS +# endif +# if !__has_feature(cxx_rtti) +# define QT_NO_RTTI +# endif +/* C++11 features, see http://clang.llvm.org/cxx_status.html */ +# if __cplusplus >= 201103L || __GXX_EXPERIMENTAL_CXX0X__ +# if ((__clang_major__ * 100) + __clang_minor__) >= 209 /* since clang 2.9 */ +# define Q_COMPILER_AUTO_TYPE +# define Q_COMPILER_DECLTYPE +# define Q_COMPILER_EXTERN_TEMPLATES +# define Q_COMPILER_RVALUE_REFS +# define Q_COMPILER_STATIC_ASSERT +# define Q_COMPILER_VARIADIC_MACROS +# define Q_COMPILER_VARIADIC_TEMPLATES +# endif +# if ((__clang_major__ * 100) + __clang_minor__) >= 300 /* since clang 3.0 */ +# define Q_COMPILER_CLASS_ENUM + /* defaulted members in 3.0, deleted members in 2.9 */ +# define Q_COMPILER_DEFAULT_DELETE_MEMBERS +# define Q_COMPILER_EXPLICIT_OVERRIDES +# define Q_COMPILER_NULLPTR +# define Q_COMPILER_RANGE_FOR +# define Q_COMPILER_UNICODE_STRINGS +# endif + /* not implemented in clang yet */ +# if __has_feature(cxx_constexpr) +# define Q_COMPILER_CONSTEXPR +# endif +# if __has_feature(cxx_lambdas) +# define Q_COMPILER_LAMBDA +# endif +# if __has_feature(cxx_generalized_initializers) +# define Q_COMPILER_INITIALIZER_LISTS +# endif +# if __has_feature(cxx_unrestricted_unions) +# define Q_COMPILER_UNRESTRICTED_UNIONS +# endif +# if 0 +# define Q_COMPILER_ATOMICS +# endif +# endif +#endif // Q_CC_CLANG + +#ifndef Q_COMPILER_MANGLES_RETURN_TYPE +# if defined(Q_CC_MSVC) +# define Q_COMPILER_MANGLES_RETURN_TYPE +# endif +#endif + +#endif // QCOMPILERDETECTION_H diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp index 01b3e2ec327..eea4397dcdb 100644 --- a/src/corelib/global/qglobal.cpp +++ b/src/corelib/global/qglobal.cpp @@ -45,15 +45,12 @@ #include "qlist.h" #include "qthreadstorage.h" #include "qdir.h" -#include "qstringlist.h" #include "qdatetime.h" -#include "qdebug.h" #ifndef QT_NO_QOBJECT #include #endif -#include #include #include #include @@ -677,34 +674,6 @@ QT_BEGIN_NAMESPACE \sa quintptr, qint32, qint64 */ -/*! - \typedef QtMsgHandler - \relates - \deprecated - - This is a typedef for a pointer to a function with the following - signature: - - \snippet doc/src/snippets/code/src_corelib_global_qglobal.cpp 7 - - This typedef is deprecated, you should use QMessageHandler instead. - \sa QtMsgType, QMessageHandler, qInstallMsgHandler(), qInstallMessageHandler() -*/ - -/*! - \typedef QMessageHandler - \relates - \since 5.0 - - This is a typedef for a pointer to a function with the following - signature: - - \snippet doc/src/snippets/code/src_corelib_global_qglobal.cpp 49 - - \sa QtMsgType, qInstallMessageHandler() -*/ - - /*! \enum QtMsgType \relates @@ -1390,6 +1359,230 @@ bool qSharedBuild() Defined on MAC OS (synonym for Darwin). */ +/*! + \macro Q_PROCESSOR_ALPHA + \relates + + Defined if the application is compiled for Alpha processors. +*/ + +/*! + \macro Q_PROCESSOR_ARM + \relates + + Defined if the application is compiled for ARM processors. Qt currently + supports three optional ARM revisions: \l Q_PROCESSOR_ARM_V5, \l + Q_PROCESSOR_ARM_V6, and \l Q_PROCESSOR_ARM_V7. +*/ +/*! + \macro Q_PROCESSOR_ARM_V5 + \relates + + Defined if the application is compiled for ARMv5 processors. The \l + Q_PROCESSOR_ARM macro is also defined when Q_PROCESSOR_ARM_V5 is defined. +*/ +/*! + \macro Q_PROCESSOR_ARM_V6 + \relates + + Defined if the application is compiled for ARMv6 processors. The \l + Q_PROCESSOR_ARM and \l Q_PROCESSOR_ARM_V5 macros are also defined when + Q_PROCESSOR_ARM_V6 is defined. +*/ +/*! + \macro Q_PROCESSOR_ARM_V7 + \relates + + Defined if the application is compiled for ARMv7 processors. The \l + Q_PROCESSOR_ARM, \l Q_PROCESSOR_ARM_V5, and \l Q_PROCESSOR_ARM_V6 macros + are also defined when Q_PROCESSOR_ARM_V7 is defined. +*/ + +/*! + \macro Q_PROCESSOR_AVR32 + \relates + + Defined if the application is compiled for AVR32 processors. +*/ + +/*! + \macro Q_PROCESSOR_BLACKFIN + \relates + + Defined if the application is compiled for Blackfin processors. +*/ + +/*! + \macro Q_PROCESSOR_IA64 + \relates + + Defined if the application is compiled for IA-64 processors. This includes + all Itanium and Itanium 2 processors. +*/ + +/*! + \macro Q_PROCESSOR_MIPS + \relates + + Defined if the application is compiled for MIPS processors. Qt currently + supports seven MIPS revisions: \l Q_PROCESSOR_MIPS_I, \l + Q_PROCESSOR_MIPS_II, \l Q_PROCESSOR_MIPS_III, \l Q_PROCESSOR_MIPS_IV, \l + Q_PROCESSOR_MIPS_V, \l Q_PROCESSOR_MIPS_32, and \l Q_PROCESSOR_MIPS_64. +*/ +/*! + \macro Q_PROCESSOR_MIPS_I + \relates + + Defined if the application is compiled for MIPS-I processors. The \l + Q_PROCESSOR_MIPS macro is also defined when Q_PROCESSOR_MIPS_I is defined. +*/ +/*! + \macro Q_PROCESSOR_MIPS_II + \relates + + Defined if the application is compiled for MIPS-II processors. The \l + Q_PROCESSOR_MIPS and \l Q_PROCESSOR_MIPS_I macros are also defined when + Q_PROCESSOR_MIPS_II is defined. +*/ +/*! + \macro Q_PROCESSOR_MIPS_32 + \relates + + Defined if the application is compiled for MIPS32 processors. The \l + Q_PROCESSOR_MIPS, \l Q_PROCESSOR_MIPS_I, and \l Q_PROCESSOR_MIPS_II macros + are also defined when Q_PROCESSOR_MIPS_32 is defined. +*/ +/*! + \macro Q_PROCESSOR_MIPS_III + \relates + + Defined if the application is compiled for MIPS-III processors. The \l + Q_PROCESSOR_MIPS, \l Q_PROCESSOR_MIPS_I, and \l Q_PROCESSOR_MIPS_II macros + are also defined when Q_PROCESSOR_MIPS_III is defined. +*/ +/*! + \macro Q_PROCESSOR_MIPS_IV + \relates + + Defined if the application is compiled for MIPS-IV processors. The \l + Q_PROCESSOR_MIPS, \l Q_PROCESSOR_MIPS_I, \l Q_PROCESSOR_MIPS_II, and \l + Q_PROCESSOR_MIPS_III macros are also defined when Q_PROCESSOR_MIPS_IV is + defined. +*/ +/*! + \macro Q_PROCESSOR_MIPS_V + \relates + + Defined if the application is compiled for MIPS-V processors. The \l + Q_PROCESSOR_MIPS, \l Q_PROCESSOR_MIPS_I, \l Q_PROCESSOR_MIPS_II, \l + Q_PROCESSOR_MIPS_III, and \l Q_PROCESSOR_MIPS_IV macros are also defined + when Q_PROCESSOR_MIPS_V is defined. +*/ +/*! + \macro Q_PROCESSOR_MIPS_64 + \relates + + Defined if the application is compiled for MIPS64 processors. The \l + Q_PROCESSOR_MIPS, \l Q_PROCESSOR_MIPS_I, \l Q_PROCESSOR_MIPS_II, \l + Q_PROCESSOR_MIPS_III, \l Q_PROCESSOR_MIPS_IV, and \l Q_PROCESSOR_MIPS_V + macros are also defined when Q_PROCESSOR_MIPS_64 is defined. +*/ + +/*! + \macro Q_PROCESSOR_POWER + \relates + + Defined if the application is compiled for POWER processors. Qt currently + supports two Power variants: \l Q_PROCESSOR_POWER_32 and \l + Q_PROCESSOR_POWER_64. +*/ +/*! + \macro Q_PROCESSOR_POWER_32 + \relates + + Defined if the application is compiled for 32-bit Power processors. The \l + Q_PROCESSOR_POWER macro is also defined when Q_PROCESSOR_POWER_32 is + defined. +*/ +/*! + \macro Q_PROCESSOR_POWER_64 + \relates + + Defined if the application is compiled for 64-bit Power processors. The \l + Q_PROCESSOR_POWER macro is also defined when Q_PROCESSOR_POWER_64 is + defined. +*/ + +/*! + \macro Q_PROCESSOR_S390 + \relates + + Defined if the application is compiled for S/390 processors. Qt supports + one optional variant of S/390: Q_PROCESSOR_S390_X. +*/ +/*! + \macro Q_PROCESSOR_S390_X + \relates + + Defined if the application is compiled for S/390x processors. The \l + Q_PROCESSOR_S390 macro is also defined when Q_PROCESSOR_S390_X is defined. +*/ + +/*! + \macro Q_PROCESSOR_SH + \relates + + Defined if the application is compiled for SuperH processors. Qt currently + supports one SuperH revision: \l Q_PROCESSOR_SH_4A. +*/ +/*! + \macro Q_PROCESSOR_SH_4A + \relates + + Defined if the application is compiled for SuperH 4A processors. The \l + Q_PROCESSOR_SH macro is also defined when Q_PROCESSOR_SH_4A is defined. +*/ + +/*! + \macro Q_PROCESSOR_SPARC + \relates + + Defined if the application is compiled for SPARC processors. Qt currently + supports one optional SPARC revision: \l Q_PROCESSOR_SPARC_V9. +*/ +/*! + \macro Q_PROCESSOR_SPARC_V9 + \relates + + Defined if the application is compiled for SPARC V9 processors. The \l + Q_PROCESSOR_SPARC macro is also defined when Q_PROCESSOR_SPARC_V9 is + defined. +*/ + +/*! + \macro Q_PROCESSOR_X86 + \relates + + Defined if the application is compiled for x86 processors. Qt currently + supports two x86 variants: \l Q_PROCESSOR_X86_32 and \l Q_PROCESSOR_X86_64. +*/ +/*! + \macro Q_PROCESSOR_X86_32 + \relates + + Defined if the application is compiled for 32-bit x86 processors. This + includes all i386, i486, i586, and i686 processors. The \l Q_PROCESSOR_X86 + macro is also defined when Q_PROCESSOR_X86_32 is defined. +*/ +/*! + \macro Q_PROCESSOR_X86_64 + \relates + + Defined if the application is compiled for 64-bit x86 processors. This + includes all AMD64, Intel 64, and other x86_64/x64 processors. The \l + Q_PROCESSOR_X86 macro is also defined when Q_PROCESSOR_X86_64 is defined. +*/ + /*! \macro QT_DISABLE_DEPRECATED_BEFORE \relates @@ -1726,9 +1919,6 @@ Q_CORE_EXPORT unsigned int qt_int_sqrt(unsigned int n) void *qMemCopy(void *dest, const void *src, size_t n) { return memcpy(dest, src, n); } void *qMemSet(void *dest, int c, size_t n) { return memset(dest, c, n); } -static QtMsgHandler msgHandler = 0; // pointer to debug handler (without context) -static QMessageHandler messageHandler = 0; // pointer to debug handler (with context) - #if !defined(Q_OS_WIN) && !defined(QT_NO_THREAD) && !defined(Q_OS_INTEGRITY) && !defined(Q_OS_QNX) && \ defined(_POSIX_THREAD_SAFE_FUNCTIONS) && _POSIX_VERSION >= 200112L namespace { @@ -1808,434 +1998,6 @@ QString qt_error_string(int errorCode) return ret.trimmed(); } -/*! - \fn QtMsgHandler qInstallMsgHandler(QtMsgHandler handler) - \relates - \deprecated - - Installs a Qt message \a handler which has been defined - previously. This method is deprecated, use qInstallMessageHandler - instead. - - \sa QtMsgHandler, qInstallMessageHandler -*/ - -/*! - \fn QMessageHandler qInstallMessageHandler(QMessageHandler handler) - \relates - \since 5.0 - - Installs a Qt message \a handler which has been defined - previously. Returns a pointer to the previous message handler - (which may be 0). - - The message handler is a function that prints out debug messages, - warnings, critical and fatal error messages. The Qt library (debug - mode) contains hundreds of warning messages that are printed - when internal errors (usually invalid function arguments) - occur. Qt built in release mode also contains such warnings unless - QT_NO_WARNING_OUTPUT and/or QT_NO_DEBUG_OUTPUT have been set during - compilation. If you implement your own message handler, you get total - control of these messages. - - The default message handler prints the message to the standard - output under X11 or to the debugger under Windows. If it is a - fatal message, the application aborts immediately. - - Only one message handler can be defined, since this is usually - done on an application-wide basis to control debug output. - - To restore the message handler, call \c qInstallMessageHandler(0). - - Example: - - \snippet doc/src/snippets/code/src_corelib_global_qglobal.cpp 23 - - \sa qDebug(), qWarning(), qCritical(), qFatal(), QtMsgType, - {Debugging Techniques} -*/ - -#if defined(Q_OS_WIN) && defined(QT_BUILD_CORE_LIB) -extern bool usingWinMain; -extern Q_CORE_EXPORT void qWinMsgHandler(QtMsgType t, const char *str); -extern Q_CORE_EXPORT void qWinMessageHandler(QtMsgType t, const QMessageLogContext &context, - const char *str); -#endif - -/*! - \internal -*/ -static void qDefaultMsgHandler(QtMsgType, const char *buf) -{ -#if defined(Q_OS_WINCE) - QString fstr = QString::fromLatin1(buf); - fstr += QLatin1Char('\n'); - OutputDebugString(reinterpret_cast (fstr.utf16())); -#else - fprintf(stderr, "%s\n", buf); - fflush(stderr); -#endif -} - -/*! - \internal -*/ -static void qDefaultMessageHandler(QtMsgType type, const QMessageLogContext &, const char *buf) -{ - qDefaultMsgHandler(type, buf); -} - -QMessageHandler qInstallMessageHandler(QMessageHandler h) -{ - if (!messageHandler) - messageHandler = qDefaultMessageHandler; - QMessageHandler old = messageHandler; - messageHandler = h; -#if defined(Q_OS_WIN) && defined(QT_BUILD_CORE_LIB) - if (!messageHandler && usingWinMain) - messageHandler = qWinMessageHandler; -#endif - return old; -} - -QtMsgHandler qInstallMsgHandler(QtMsgHandler h) -{ - //if handler is 0, set it to the - //default message handler - if (!msgHandler) - msgHandler = qDefaultMsgHandler; - QtMsgHandler old = msgHandler; - msgHandler = h; -#if defined(Q_OS_WIN) && defined(QT_BUILD_CORE_LIB) - if (!msgHandler && usingWinMain) - msgHandler = qWinMsgHandler; -#endif - return old; -} - -/*! - \internal -*/ -void qt_message_output(QtMsgType msgType, const QMessageLogContext &context, const char *buf) -{ - if (!msgHandler) - msgHandler = qDefaultMsgHandler; - if (!messageHandler) - messageHandler = qDefaultMessageHandler; - - // prefer new message handler over the old one - if (msgHandler == qDefaultMsgHandler - || messageHandler != qDefaultMessageHandler) { - (*messageHandler)(msgType, context, buf); - } else { - (*msgHandler)(msgType, buf); - } - - if (msgType == QtFatalMsg - || (msgType == QtWarningMsg - && (!qgetenv("QT_FATAL_WARNINGS").isNull())) ) { - -#if defined(Q_CC_MSVC) && defined(QT_DEBUG) && defined(_DEBUG) && defined(_CRT_ERROR) - // get the current report mode - int reportMode = _CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_WNDW); - _CrtSetReportMode(_CRT_ERROR, reportMode); -#if !defined(Q_OS_WINCE) - int ret = _CrtDbgReport(_CRT_ERROR, __FILE__, __LINE__, QT_VERSION_STR, buf); -#else - int ret = _CrtDbgReportW(_CRT_ERROR, _CRT_WIDE(__FILE__), - __LINE__, _CRT_WIDE(QT_VERSION_STR), reinterpret_cast (QString::fromLatin1(buf).utf16())); -#endif - if (ret == 0 && reportMode & _CRTDBG_MODE_WNDW) - return; // ignore - else if (ret == 1) - _CrtDbgBreak(); -#endif - -#if (defined(Q_OS_UNIX) || defined(Q_CC_MINGW)) - abort(); // trap; generates core dump -#else - exit(1); // goodbye cruel world -#endif - } -} - -#if !defined(QT_NO_EXCEPTIONS) -/*! - \internal - Uses a local buffer to output the message. Not locale safe + cuts off - everything after character 255, but will work in out of memory situations. -*/ -static void qEmergencyOut(QtMsgType msgType, const char *msg, va_list ap) -{ - char emergency_buf[256] = { '\0' }; - emergency_buf[255] = '\0'; - if (msg) - qvsnprintf(emergency_buf, 255, msg, ap); - QMessageLogContext context; - qt_message_output(msgType, context, emergency_buf); -} -#endif - -/*! - \internal -*/ -static void qt_message(QtMsgType msgType, const QMessageLogContext &context, const char *msg, va_list ap) -{ -#if !defined(QT_NO_EXCEPTIONS) - if (std::uncaught_exception()) { - qEmergencyOut(msgType, msg, ap); - return; - } -#endif - QByteArray buf; - if (msg) { - QT_TRY { - buf = QString().vsprintf(msg, ap).toLocal8Bit(); - } QT_CATCH(const std::bad_alloc &) { -#if !defined(QT_NO_EXCEPTIONS) - qEmergencyOut(msgType, msg, ap); - // don't rethrow - we use qWarning and friends in destructors. - return; -#endif - } - } - qt_message_output(msgType, context, buf.constData()); -} - -#undef qDebug -/*! - \fn qDebug(const char *message, ...) - \relates - - Calls the message handler with the debug message \a msg. If no - message handler has been installed, the message is printed to - stderr. Under Windows, the message is sent to the console, if it is a - console application; otherwise, it is sent to the debugger. This - function does nothing if \c QT_NO_DEBUG_OUTPUT was defined - during compilation. - - If you pass the function a format string and a list of arguments, - it works in similar way to the C printf() function. The format - should be a Latin-1 string. - - Example: - - \snippet doc/src/snippets/code/src_corelib_global_qglobal.cpp 24 - - If you include \c , a more convenient syntax is also - available: - - \snippet doc/src/snippets/code/src_corelib_global_qglobal.cpp 25 - - With this syntax, the function returns a QDebug object that is - configured to use the QtDebugMsg message type. It automatically - puts a single space between each item, and outputs a newline at - the end. It supports many C++ and Qt types. - - To suppress the output at run-time, install your own message handler - with qInstallMessageHandler(). - - \sa qWarning(), qCritical(), qFatal(), qInstallMessageHandler(), - {Debugging Techniques} -*/ - -void QMessageLogger::debug(const char *msg, ...) -{ - va_list ap; - va_start(ap, msg); // use variable arg list - qt_message(QtDebugMsg, context, msg, ap); - va_end(ap); -} - -#ifndef QT_NO_DEBUG_STREAM - -QDebug QMessageLogger::debug() -{ - QDebug dbg = QDebug(QtDebugMsg); - QMessageLogContext &ctxt = dbg.stream->context; - ctxt.file = context.file; - ctxt.line = context.line; - ctxt.function = context.function; - return dbg; -} - -QNoDebug QMessageLogger::noDebug() -{ - return QNoDebug(); -} - -#endif - -#undef qWarning -/*! - \fn qWarning(const char *message, ...) - \relates - - Calls the message handler with the warning message \a msg. If no - message handler has been installed, the message is printed to - stderr. Under Windows, the message is sent to the debugger. This - function does nothing if \c QT_NO_WARNING_OUTPUT was defined - during compilation; it exits if the environment variable \c - QT_FATAL_WARNINGS is defined. - - This function takes a format string and a list of arguments, - similar to the C printf() function. The format should be a Latin-1 - string. - - Example: - \snippet doc/src/snippets/code/src_corelib_global_qglobal.cpp 26 - - If you include , a more convenient syntax is - also available: - - \snippet doc/src/snippets/code/src_corelib_global_qglobal.cpp 27 - - This syntax inserts a space between each item, and - appends a newline at the end. - - To suppress the output at runtime, install your own message handler - with qInstallMessageHandler(). - - \sa qDebug(), qCritical(), qFatal(), qInstallMessageHandler(), - {Debugging Techniques} -*/ - -void QMessageLogger::warning(const char *msg, ...) -{ - va_list ap; - va_start(ap, msg); // use variable arg list - qt_message(QtWarningMsg, context, msg, ap); - va_end(ap); -} - -#ifndef QT_NO_DEBUG_STREAM -QDebug QMessageLogger::warning() -{ - QDebug dbg = QDebug(QtWarningMsg); - QMessageLogContext &ctxt = dbg.stream->context; - ctxt.file = context.file; - ctxt.line = context.line; - ctxt.function = context.function; - return dbg; -} -#endif - -#undef qCritical -/*! - \fn qCritical(const char *message, ...) - \relates - - Calls the message handler with the critical message \a msg. If no - message handler has been installed, the message is printed to - stderr. Under Windows, the message is sent to the debugger. - - This function takes a format string and a list of arguments, - similar to the C printf() function. The format should be a Latin-1 - string. - - Example: - \snippet doc/src/snippets/code/src_corelib_global_qglobal.cpp 28 - - If you include , a more convenient syntax is - also available: - - \snippet doc/src/snippets/code/src_corelib_global_qglobal.cpp 29 - - A space is inserted between the items, and a newline is - appended at the end. - - To suppress the output at runtime, install your own message handler - with qInstallMessageHandler(). - - \sa qDebug(), qWarning(), qFatal(), qInstallMessageHandler(), - {Debugging Techniques} -*/ - -void QMessageLogger::critical(const char *msg, ...) -{ - va_list ap; - va_start(ap, msg); // use variable arg list - qt_message(QtCriticalMsg, context, msg, ap); - va_end(ap); -} - -#ifndef QT_NO_DEBUG_STREAM -QDebug QMessageLogger::critical() -{ - QDebug dbg = QDebug(QtCriticalMsg); - QMessageLogContext &ctxt = dbg.stream->context; - ctxt.file = context.file; - ctxt.line = context.line; - ctxt.function = context.function; - return dbg; -} -#endif - -void qErrnoWarning(const char *msg, ...) -{ - // qt_error_string() will allocate anyway, so we don't have - // to be careful here (like we do in plain qWarning()) - QString buf; - va_list ap; - va_start(ap, msg); - if (msg) - buf.vsprintf(msg, ap); - va_end(ap); - - QMessageLogger().critical("%s (%s)", buf.toLocal8Bit().constData(), - qt_error_string(-1).toLocal8Bit().constData()); -} - -void qErrnoWarning(int code, const char *msg, ...) -{ - // qt_error_string() will allocate anyway, so we don't have - // to be careful here (like we do in plain qWarning()) - QString buf; - va_list ap; - va_start(ap, msg); - if (msg) - buf.vsprintf(msg, ap); - va_end(ap); - - QMessageLogger().critical("%s (%s)", buf.toLocal8Bit().constData(), - qt_error_string(code).toLocal8Bit().constData()); -} - -#undef qFatal -/*! - \fn qFatal(const char *message, ...) - \relates - - Calls the message handler with the fatal message \a msg. If no - message handler has been installed, the message is printed to - stderr. Under Windows, the message is sent to the debugger. - - If you are using the \bold{default message handler} this function will - abort on Unix systems to create a core dump. On Windows, for debug builds, - this function will report a _CRT_ERROR enabling you to connect a debugger - to the application. - - This function takes a format string and a list of arguments, - similar to the C printf() function. - - Example: - \snippet doc/src/snippets/code/src_corelib_global_qglobal.cpp 30 - - To suppress the output at runtime, install your own message handler - with qInstallMessageHandler(). - - \sa qDebug(), qCritical(), qWarning(), qInstallMessageHandler(), - {Debugging Techniques} -*/ - -void QMessageLogger::fatal(const char *msg, ...) -{ - va_list ap; - va_start(ap, msg); // use variable arg list - qt_message(QtFatalMsg, context, msg, ap); - va_end(ap); -} - // getenv is declared as deprecated in VS2005. This function // makes use of the new secure getenv function. /*! diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index c92336f95c8..d4d2ffdabb1 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -62,6 +62,11 @@ #include #endif + +#include +#include +#include + #ifdef __cplusplus #ifndef QT_NO_STL @@ -140,667 +145,13 @@ namespace QT_NAMESPACE {} #endif /* __cplusplus */ -#if defined(Q_OS_MAC) && !defined(Q_CC_INTEL) -#define QT_BEGIN_HEADER extern "C++" { -#define QT_END_HEADER } -#else #define QT_BEGIN_HEADER #define QT_END_HEADER -#endif - -/* - The operating system, must be one of: (Q_OS_x) - - DARWIN - Darwin OS (synonym for Q_OS_MAC) - MSDOS - MS-DOS and Windows - OS2 - OS/2 - OS2EMX - XFree86 on OS/2 (not PM) - WIN32 - Win32 (Windows 2000/XP/Vista/7 and Windows Server 2003/2008) - WINCE - WinCE (Windows CE 5.0) - CYGWIN - Cygwin - SOLARIS - Sun Solaris - HPUX - HP-UX - ULTRIX - DEC Ultrix - LINUX - Linux - FREEBSD - FreeBSD - NETBSD - NetBSD - OPENBSD - OpenBSD - BSDI - BSD/OS - IRIX - SGI Irix - OSF - HP Tru64 UNIX - SCO - SCO OpenServer 5 - UNIXWARE - UnixWare 7, Open UNIX 8 - AIX - AIX - HURD - GNU Hurd - DGUX - DG/UX - RELIANT - Reliant UNIX - DYNIX - DYNIX/ptx - QNX - QNX - QNX6 - QNX RTP 6.1 - LYNX - LynxOS - BSD4 - Any BSD 4.4 system - UNIX - Any UNIX BSD/SYSV system -*/ - -#if defined(__APPLE__) && (defined(__GNUC__) || defined(__xlC__) || defined(__xlc__)) -# define Q_OS_DARWIN -# define Q_OS_BSD4 -# ifdef __LP64__ -# define Q_OS_DARWIN64 -# else -# define Q_OS_DARWIN32 -# endif -#elif defined(__CYGWIN__) -# define Q_OS_CYGWIN -#elif !defined(SAG_COM) && (defined(WIN64) || defined(_WIN64) || defined(__WIN64__)) -# define Q_OS_WIN32 -# define Q_OS_WIN64 -#elif !defined(SAG_COM) && (defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__)) -# if defined(WINCE) || defined(_WIN32_WCE) -# define Q_OS_WINCE -# else -# define Q_OS_WIN32 -# endif -#elif defined(__sun) || defined(sun) -# define Q_OS_SOLARIS -#elif defined(hpux) || defined(__hpux) -# define Q_OS_HPUX -#elif defined(__ultrix) || defined(ultrix) -# define Q_OS_ULTRIX -#elif defined(sinix) -# define Q_OS_RELIANT -#elif defined(__native_client__) -# define Q_OS_NACL -#elif defined(__linux__) || defined(__linux) -# define Q_OS_LINUX -#elif defined(__FreeBSD__) || defined(__DragonFly__) -# define Q_OS_FREEBSD -# define Q_OS_BSD4 -#elif defined(__NetBSD__) -# define Q_OS_NETBSD -# define Q_OS_BSD4 -#elif defined(__OpenBSD__) -# define Q_OS_OPENBSD -# define Q_OS_BSD4 -#elif defined(__bsdi__) -# define Q_OS_BSDI -# define Q_OS_BSD4 -#elif defined(__sgi) -# define Q_OS_IRIX -#elif defined(__osf__) -# define Q_OS_OSF -#elif defined(_AIX) -# define Q_OS_AIX -#elif defined(__Lynx__) -# define Q_OS_LYNX -#elif defined(__GNU__) -# define Q_OS_HURD -#elif defined(__DGUX__) -# define Q_OS_DGUX -#elif defined(__QNXNTO__) -# define Q_OS_QNX -#elif defined(_SEQUENT_) -# define Q_OS_DYNIX -#elif defined(_SCO_DS) /* SCO OpenServer 5 + GCC */ -# define Q_OS_SCO -#elif defined(__USLC__) /* all SCO platforms + UDK or OUDK */ -# define Q_OS_UNIXWARE -#elif defined(__svr4__) && defined(i386) /* Open UNIX 8 + GCC */ -# define Q_OS_UNIXWARE -#elif defined(__INTEGRITY) -# define Q_OS_INTEGRITY -#elif defined(VXWORKS) /* there is no "real" VxWorks define - this has to be set in the mkspec! */ -# define Q_OS_VXWORKS -#elif defined(__MAKEDEPEND__) -#else -# error "Qt has not been ported to this OS - see http://www.qt-project.org/" -#endif - -#if defined(Q_OS_WIN32) || defined(Q_OS_WIN64) || defined(Q_OS_WINCE) -# define Q_OS_WIN -#endif - -#if defined(Q_OS_DARWIN) -# define Q_OS_MAC -# define Q_OS_MACX /* Q_OS_MACX is only for compatibility.*/ -# if defined(Q_OS_DARWIN64) -# define Q_OS_MAC64 -# elif defined(Q_OS_DARWIN32) -# define Q_OS_MAC32 -# endif -#endif - -#if defined(Q_OS_WIN) -# undef Q_OS_UNIX -#elif !defined(Q_OS_UNIX) -# define Q_OS_UNIX -#endif #if defined(Q_OS_DARWIN) && !defined(QT_LARGEFILE_SUPPORT) # define QT_LARGEFILE_SUPPORT 64 #endif -#ifdef Q_OS_DARWIN -# ifdef MAC_OS_X_VERSION_MIN_REQUIRED -# undef MAC_OS_X_VERSION_MIN_REQUIRED -# endif -# define MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_4 -# include -# if !defined(MAC_OS_X_VERSION_10_3) -# define MAC_OS_X_VERSION_10_3 MAC_OS_X_VERSION_10_2 + 1 -# endif -# if !defined(MAC_OS_X_VERSION_10_4) -# define MAC_OS_X_VERSION_10_4 MAC_OS_X_VERSION_10_3 + 1 -# endif -# if !defined(MAC_OS_X_VERSION_10_5) -# define MAC_OS_X_VERSION_10_5 MAC_OS_X_VERSION_10_4 + 1 -# endif -# if !defined(MAC_OS_X_VERSION_10_6) -# define MAC_OS_X_VERSION_10_6 MAC_OS_X_VERSION_10_5 + 1 -# endif -# if !defined(MAC_OS_X_VERSION_10_7) -# define MAC_OS_X_VERSION_10_7 MAC_OS_X_VERSION_10_6 + 1 -# endif -# if (MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_7) -# warning "This version of Mac OS X is unsupported" -# endif -#endif - -#ifdef __LSB_VERSION__ -# if __LSB_VERSION__ < 40 -# error "This version of the Linux Standard Base is unsupported" -# endif -#ifndef QT_LINUXBASE -# define QT_LINUXBASE -#endif -#endif - -/* - The compiler, must be one of: (Q_CC_x) - - SYM - Digital Mars C/C++ (used to be Symantec C++) - MSVC - Microsoft Visual C/C++, Intel C++ for Windows - BOR - Borland/Turbo C++ - WAT - Watcom C++ - GNU - GNU C++ - COMEAU - Comeau C++ - EDG - Edison Design Group C++ - OC - CenterLine C++ - SUN - Forte Developer, or Sun Studio C++ - MIPS - MIPSpro C++ - DEC - DEC C++ - HPACC - HP aC++ - USLC - SCO OUDK and UDK - CDS - Reliant C++ - KAI - KAI C++ - INTEL - Intel C++ for Linux, Intel C++ for Windows - HIGHC - MetaWare High C/C++ - PGI - Portland Group C++ - GHS - Green Hills Optimizing C++ Compilers - RVCT - ARM Realview Compiler Suite - CLANG - C++ front-end for the LLVM compiler - - - Should be sorted most to least authoritative. -*/ - -/* Symantec C++ is now Digital Mars */ -#if defined(__DMC__) || defined(__SC__) -# define Q_CC_SYM -/* "explicit" semantics implemented in 8.1e but keyword recognized since 7.5 */ -# if defined(__SC__) && __SC__ < 0x750 -# define Q_NO_EXPLICIT_KEYWORD -# endif -# define Q_NO_USING_KEYWORD - -#elif defined(_MSC_VER) -# define Q_CC_MSVC -# define Q_CC_MSVC_NET -# define Q_CANNOT_DELETE_CONSTANT -# define Q_OUTOFLINE_TEMPLATE inline -# define Q_NO_TEMPLATE_FRIENDS -# define Q_ALIGNOF(type) __alignof(type) -# define Q_DECL_ALIGN(n) __declspec(align(n)) -/* Intel C++ disguising as Visual C++: the `using' keyword avoids warnings */ -# if defined(__INTEL_COMPILER) -# define Q_CC_INTEL -# endif -/* MSVC does not support SSE/MMX on x64 */ -# if (defined(Q_CC_MSVC) && defined(_M_X64)) -# undef QT_HAVE_SSE -# undef QT_HAVE_MMX -# undef QT_HAVE_3DNOW -# endif - -#if defined(Q_CC_MSVC) && _MSC_VER >= 1600 -# define Q_COMPILER_RVALUE_REFS -# define Q_COMPILER_AUTO_TYPE -# define Q_COMPILER_LAMBDA -# define Q_COMPILER_DECLTYPE -# define Q_COMPILER_STATIC_ASSERT -// MSCV has std::initilizer_list, but do not support the braces initialization -//# define Q_COMPILER_INITIALIZER_LISTS -# endif - - -#elif defined(__BORLANDC__) || defined(__TURBOC__) -# define Q_CC_BOR -# define Q_INLINE_TEMPLATE -# if __BORLANDC__ < 0x502 -# define Q_NO_BOOL_TYPE -# define Q_NO_EXPLICIT_KEYWORD -# endif -# define Q_NO_USING_KEYWORD - -#elif defined(__WATCOMC__) -# define Q_CC_WAT - -/* ARM Realview Compiler Suite - RVCT compiler also defines __EDG__ and __GNUC__ (if --gnu flag is given), - so check for it before that */ -#elif defined(__ARMCC__) || defined(__CC_ARM) -# define Q_CC_RVCT -# if __TARGET_ARCH_ARM >= 6 -# define QT_HAVE_ARMV6 -# endif -/* work-around for missing compiler intrinsics */ -# define __is_empty(X) false -# define __is_pod(X) false -#elif defined(__GNUC__) -# define Q_CC_GNU -# define Q_C_CALLBACKS -# if defined(__MINGW32__) -# define Q_CC_MINGW -# endif -# if defined(__INTEL_COMPILER) -/* Intel C++ also masquerades as GCC 3.2.0 */ -# define Q_CC_INTEL -# endif -# if defined(__clang__) -/* Clang also masquerades as GCC 4.2.1 */ -# define Q_CC_CLANG -# endif -# ifdef __APPLE__ -# define Q_NO_DEPRECATED_CONSTRUCTORS -# endif -# if __GNUC__ == 2 && __GNUC_MINOR__ <= 7 -# define Q_FULL_TEMPLATE_INSTANTIATION -# endif -/* GCC 2.95 knows "using" but does not support it correctly */ -# if __GNUC__ == 2 && __GNUC_MINOR__ <= 95 -# define Q_NO_USING_KEYWORD -# endif -# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) -# define Q_ALIGNOF(type) __alignof__(type) -# define Q_TYPEOF(expr) __typeof__(expr) -# define Q_DECL_ALIGN(n) __attribute__((__aligned__(n))) -# endif -# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) -# define Q_LIKELY(expr) __builtin_expect(!!(expr), true) -# define Q_UNLIKELY(expr) __builtin_expect(!!(expr), false) -# endif -/* GCC 3.1 and GCC 3.2 wrongly define _SB_CTYPE_MACROS on HP-UX */ -# if defined(Q_OS_HPUX) && __GNUC__ == 3 && __GNUC_MINOR__ >= 1 -# define Q_WRONG_SB_CTYPE_MACROS -# endif -/* GCC <= 3.3 cannot handle template friends */ -# if __GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ <= 3) -# define Q_NO_TEMPLATE_FRIENDS -# endif -/* Apple's GCC 3.1 chokes on our streaming qDebug() */ -# if defined(Q_OS_DARWIN) && __GNUC__ == 3 && (__GNUC_MINOR__ >= 1 && __GNUC_MINOR__ < 3) -# define Q_BROKEN_DEBUG_STREAM -# endif -# if (defined(Q_CC_GNU) || defined(Q_CC_INTEL)) && !defined(QT_MOC_CPP) -# define Q_PACKED __attribute__ ((__packed__)) -# define Q_NO_PACKED_REFERENCE -# ifndef __ARM_EABI__ -# define QT_NO_ARM_EABI -# endif -# endif -# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 403 -# define Q_ALLOC_SIZE(x) __attribute__((alloc_size(x))) -# endif -# if defined(__GXX_EXPERIMENTAL_CXX0X__) && !defined(__clang__) /* clang C++11 enablers are found below, don't do them here */ -# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 403 - /* C++0x features supported in GCC 4.3: */ -# define Q_COMPILER_VARIADIC_MACROS -# define Q_COMPILER_RVALUE_REFS -# define Q_COMPILER_DECLTYPE -# define Q_COMPILER_STATIC_ASSERT -# endif -# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 - /* C++0x features supported in GCC 4.4: */ -# define Q_COMPILER_UNICODE_STRINGS -# define Q_COMPILER_VARIADIC_TEMPLATES -# define Q_COMPILER_AUTO_TYPE -# define Q_COMPILER_EXTERN_TEMPLATES -# define Q_COMPILER_DEFAULT_DELETE_MEMBERS -# define Q_COMPILER_CLASS_ENUM -# define Q_COMPILER_INITIALIZER_LISTS -# define Q_COMPILER_ATOMICS -# endif -# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 405 - /* C++0x features supported in GCC 4.5: */ -# define Q_COMPILER_LAMBDA -# endif -# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 - /* C++0x features supported in GCC 4.6: */ -# define Q_COMPILER_NULLPTR -# define Q_COMPILER_CONSTEXPR -# define Q_COMPILER_UNRESTRICTED_UNIONS -# define Q_COMPILER_RANGE_FOR -# endif -# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 - /* C++0x features supported in GCC 4.7: */ -# define Q_COMPILER_EXPLICIT_OVERRIDES -# endif - -# endif - -/* IBM compiler versions are a bit messy. There are actually two products: - the C product, and the C++ product. The C++ compiler is always packaged - with the latest version of the C compiler. Version numbers do not always - match. This little table (I'm not sure it's accurate) should be helpful: - - C++ product C product - - C Set 3.1 C Compiler 3.0 - ... ... - C++ Compiler 3.6.6 C Compiler 4.3 - ... ... - Visual Age C++ 4.0 ... - ... ... - Visual Age C++ 5.0 C Compiler 5.0 - ... ... - Visual Age C++ 6.0 C Compiler 6.0 - - Now: - __xlC__ is the version of the C compiler in hexadecimal notation - is only an approximation of the C++ compiler version - __IBMCPP__ is the version of the C++ compiler in decimal notation - but it is not defined on older compilers like C Set 3.1 */ -#elif defined(__xlC__) -# define Q_CC_XLC -# define Q_FULL_TEMPLATE_INSTANTIATION -# if __xlC__ < 0x400 -# define Q_NO_BOOL_TYPE -# define Q_NO_EXPLICIT_KEYWORD -# define Q_NO_USING_KEYWORD -# define Q_OUTOFLINE_TEMPLATE inline -# define Q_BROKEN_TEMPLATE_SPECIALIZATION -# define Q_CANNOT_DELETE_CONSTANT -# elif __xlC__ >= 0x0600 -# define Q_ALIGNOF(type) __alignof__(type) -# define Q_TYPEOF(expr) __typeof__(expr) -# define Q_DECL_ALIGN(n) __attribute__((__aligned__(n))) -# define Q_PACKED __attribute__((__packed__)) -# endif - -/* Older versions of DEC C++ do not define __EDG__ or __EDG - observed - on DEC C++ V5.5-004. New versions do define __EDG__ - observed on - Compaq C++ V6.3-002. - This compiler is different enough from other EDG compilers to handle - it separately anyway. */ -#elif defined(__DECCXX) || defined(__DECC) -# define Q_CC_DEC -/* Compaq C++ V6 compilers are EDG-based but I'm not sure about older - DEC C++ V5 compilers. */ -# if defined(__EDG__) -# define Q_CC_EDG -# endif -/* Compaq have disabled EDG's _BOOL macro and use _BOOL_EXISTS instead - - observed on Compaq C++ V6.3-002. - In any case versions prior to Compaq C++ V6.0-005 do not have bool. */ -# if !defined(_BOOL_EXISTS) -# define Q_NO_BOOL_TYPE -# endif -/* Spurious (?) error messages observed on Compaq C++ V6.5-014. */ -# define Q_NO_USING_KEYWORD -/* Apply to all versions prior to Compaq C++ V6.0-000 - observed on - DEC C++ V5.5-004. */ -# if __DECCXX_VER < 60060000 -# define Q_BROKEN_TEMPLATE_SPECIALIZATION -# define Q_CANNOT_DELETE_CONSTANT -# endif -/* avoid undefined symbol problems with out-of-line template members */ -# define Q_OUTOFLINE_TEMPLATE inline - -/* The Portland Group C++ compiler is based on EDG and does define __EDG__ - but the C compiler does not */ -#elif defined(__PGI) -# define Q_CC_PGI -# if defined(__EDG__) -# define Q_CC_EDG -# endif - -/* Compilers with EDG front end are similar. To detect them we test: - __EDG documented by SGI, observed on MIPSpro 7.3.1.1 and KAI C++ 4.0b - __EDG__ documented in EDG online docs, observed on Compaq C++ V6.3-002 - and PGI C++ 5.2-4 */ -#elif !defined(Q_OS_HPUX) && (defined(__EDG) || defined(__EDG__)) -# define Q_CC_EDG -/* From the EDG documentation (does not seem to apply to Compaq C++): - _BOOL - Defined in C++ mode when bool is a keyword. The name of this - predefined macro is specified by a configuration flag. _BOOL - is the default. - __BOOL_DEFINED - Defined in Microsoft C++ mode when bool is a keyword. */ -# if !defined(_BOOL) && !defined(__BOOL_DEFINED) -# define Q_NO_BOOL_TYPE -# endif - -/* The Comeau compiler is based on EDG and does define __EDG__ */ -# if defined(__COMO__) -# define Q_CC_COMEAU -# define Q_C_CALLBACKS - -/* The `using' keyword was introduced to avoid KAI C++ warnings - but it's now causing KAI C++ errors instead. The standard is - unclear about the use of this keyword, and in practice every - compiler is using its own set of rules. Forget it. */ -# elif defined(__KCC) -# define Q_CC_KAI -# define Q_NO_USING_KEYWORD - -/* Using the `using' keyword avoids Intel C++ for Linux warnings */ -# elif defined(__INTEL_COMPILER) -# define Q_CC_INTEL - -/* Uses CFront, make sure to read the manual how to tweak templates. */ -# elif defined(__ghs) -# define Q_CC_GHS - -# elif defined(__DCC__) -# define Q_CC_DIAB -# undef Q_NO_BOOL_TYPE -# if !defined(__bool) -# define Q_NO_BOOL_TYPE -# endif - -/* The UnixWare 7 UDK compiler is based on EDG and does define __EDG__ */ -# elif defined(__USLC__) && defined(__SCO_VERSION__) -# define Q_CC_USLC -/* The latest UDK 7.1.1b does not need this, but previous versions do */ -# if !defined(__SCO_VERSION__) || (__SCO_VERSION__ < 302200010) -# define Q_OUTOFLINE_TEMPLATE inline -# endif -# define Q_NO_USING_KEYWORD /* ### check "using" status */ - -/* Never tested! */ -# elif defined(CENTERLINE_CLPP) || defined(OBJECTCENTER) -# define Q_CC_OC -# define Q_NO_USING_KEYWORD - -/* CDS++ defines __EDG__ although this is not documented in the Reliant - documentation. It also follows conventions like _BOOL and this documented */ -# elif defined(sinix) -# define Q_CC_CDS -# define Q_NO_USING_KEYWORD - -/* The MIPSpro compiler defines __EDG */ -# elif defined(__sgi) -# define Q_CC_MIPS -# define Q_NO_USING_KEYWORD /* ### check "using" status */ -# define Q_NO_TEMPLATE_FRIENDS -# if defined(_COMPILER_VERSION) && (_COMPILER_VERSION >= 740) -# define Q_OUTOFLINE_TEMPLATE inline -# pragma set woff 3624,3625,3649 /* turn off some harmless warnings */ -# endif -# endif - -/* VxWorks' DIAB toolchain has an additional EDG type C++ compiler - (see __DCC__ above). This one is for C mode files (__EDG is not defined) */ -#elif defined(_DIAB_TOOL) -# define Q_CC_DIAB - -/* Never tested! */ -#elif defined(__HIGHC__) -# define Q_CC_HIGHC - -#elif defined(__SUNPRO_CC) || defined(__SUNPRO_C) -# define Q_CC_SUN -/* 5.0 compiler or better - 'bool' is enabled by default but can be disabled using -features=nobool - in which case _BOOL is not defined - this is the default in 4.2 compatibility mode triggered by -compat=4 */ -# if __SUNPRO_CC >= 0x500 -# define QT_NO_TEMPLATE_TEMPLATE_PARAMETERS - /* see http://developers.sun.com/sunstudio/support/Ccompare.html */ -# if __SUNPRO_CC >= 0x590 -# define Q_ALIGNOF(type) __alignof__(type) -# define Q_TYPEOF(expr) __typeof__(expr) -# define Q_DECL_ALIGN(n) __attribute__((__aligned__(n))) -# endif -# if __SUNPRO_CC >= 0x550 -# define Q_DECL_EXPORT __global -# endif -# if __SUNPRO_CC < 0x5a0 -# define Q_NO_TEMPLATE_FRIENDS -# endif -# if !defined(_BOOL) -# define Q_NO_BOOL_TYPE -# endif -# if defined(__SUNPRO_CC_COMPAT) && (__SUNPRO_CC_COMPAT <= 4) -# define Q_NO_USING_KEYWORD -# endif -# define Q_C_CALLBACKS -/* 4.2 compiler or older */ -# else -# define Q_NO_BOOL_TYPE -# define Q_NO_EXPLICIT_KEYWORD -# define Q_NO_USING_KEYWORD -# endif - -/* CDS++ does not seem to define __EDG__ or __EDG according to Reliant - documentation but nevertheless uses EDG conventions like _BOOL */ -#elif defined(sinix) -# define Q_CC_EDG -# define Q_CC_CDS -# if !defined(_BOOL) -# define Q_NO_BOOL_TYPE -# endif -# define Q_BROKEN_TEMPLATE_SPECIALIZATION - -#elif defined(Q_OS_HPUX) -/* __HP_aCC was not defined in first aCC releases */ -# if defined(__HP_aCC) || __cplusplus >= 199707L -# define Q_NO_TEMPLATE_FRIENDS -# define Q_CC_HPACC -# if __HP_aCC-0 < 060000 -# define QT_NO_TEMPLATE_TEMPLATE_PARAMETERS -# define Q_DECL_EXPORT __declspec(dllexport) -# define Q_DECL_IMPORT __declspec(dllimport) -# endif -# if __HP_aCC-0 >= 061200 -# define Q_DECL_ALIGN(n) __attribute__((aligned(n))) -# endif -# if __HP_aCC-0 >= 062000 -# define Q_DECL_EXPORT __attribute__((visibility("default"))) -# define Q_DECL_HIDDEN __attribute__((visibility("hidden"))) -# define Q_DECL_IMPORT Q_DECL_EXPORT -# endif -# else -# define Q_CC_HP -# define Q_NO_BOOL_TYPE -# define Q_FULL_TEMPLATE_INSTANTIATION -# define Q_BROKEN_TEMPLATE_SPECIALIZATION -# define Q_NO_EXPLICIT_KEYWORD -# endif -# define Q_NO_USING_KEYWORD /* ### check "using" status */ - -#else -# error "Qt has not been tested with this compiler - see http://www.qt-project.org/" -#endif - - -#ifdef Q_CC_INTEL -# if __INTEL_COMPILER < 1200 -# define Q_NO_TEMPLATE_FRIENDS -# endif -# if defined(__GXX_EXPERIMENTAL_CXX0X__) || defined(__GXX_EXPERIMENTAL_CPP0X__) -# if __INTEL_COMPILER >= 1200 -# define Q_COMPILER_RVALUE_REFS -# define Q_COMPILER_EXTERN_TEMPLATES -# define Q_COMPILER_DECLTYPE -# define Q_COMPILER_VARIADIC_TEMPLATES -# define Q_COMPILER_AUTO_TYPE -# define Q_COMPILER_DEFAULT_DELETE_MEMBERS -# define Q_COMPILER_CLASS_ENUM -# define Q_COMPILER_LAMBDA -# define Q_COMPILER_STATIC_ASSERT -# endif -# endif -#endif - -#ifdef Q_CC_CLANG -/* General C++ features */ -# if !__has_feature(cxx_exceptions) -# define QT_NO_EXCEPTIONS -# endif -# if !__has_feature(cxx_rtti) -# define QT_NO_RTTI -# endif -/* C++11 features, see http://clang.llvm.org/cxx_status.html */ -# if __cplusplus >= 201103L || __GXX_EXPERIMENTAL_CXX0X__ -# if ((__clang_major__ * 100) + __clang_minor__) >= 209 /* since clang 2.9 */ -# define Q_COMPILER_AUTO_TYPE -# define Q_COMPILER_DECLTYPE -# define Q_COMPILER_EXTERN_TEMPLATES -# define Q_COMPILER_RVALUE_REFS -# define Q_COMPILER_STATIC_ASSERT -# define Q_COMPILER_VARIADIC_MACROS -# define Q_COMPILER_VARIADIC_TEMPLATES -# endif -# if ((__clang_major__ * 100) + __clang_minor__) >= 300 /* since clang 3.0 */ -# define Q_COMPILER_CLASS_ENUM - /* defaulted members in 3.0, deleted members in 2.9 */ -# define Q_COMPILER_DEFAULT_DELETE_MEMBERS -# define Q_COMPILER_EXPLICIT_OVERRIDES -# define Q_COMPILER_NULLPTR -# define Q_COMPILER_RANGE_FOR -# define Q_COMPILER_UNICODE_STRINGS -# endif - /* not implemented in clang yet */ -# if __has_feature(cxx_constexpr) -# define Q_COMPILER_CONSTEXPR -# endif -# if __has_feature(cxx_lambdas) -# define Q_COMPILER_LAMBDA -# endif -# if __has_feature(cxx_generalized_initializers) -# define Q_COMPILER_INITIALIZER_LISTS -# endif -# if __has_feature(cxx_unrestricted_unions) -# define Q_COMPILER_UNRESTRICTED_UNIONS -# endif -# if 0 -# define Q_COMPILER_ATOMICS -# endif -# endif -#endif // Q_CC_CLANG - #ifndef Q_PACKED # define Q_PACKED # undef Q_NO_PACKED_REFERENCE @@ -847,12 +198,6 @@ namespace QT_NAMESPACE {} # endif #endif -#ifndef Q_COMPILER_MANGLES_RETURN_TYPE -# if defined(Q_CC_MSVC) -# define Q_COMPILER_MANGLES_RETURN_TYPE -# endif -#endif - QT_BEGIN_HEADER QT_BEGIN_NAMESPACE @@ -1118,7 +463,7 @@ typedef int QNoImplicitBoolCast; // This logic must match the one in qmetatype.h #if defined(QT_COORD_TYPE) typedef QT_COORD_TYPE qreal; -#elif defined(QT_NO_FPU) || defined(QT_ARCH_ARM) || defined(QT_ARCH_WINDOWSCE) +#elif defined(QT_NO_FPU) || defined(Q_PROCESSOR_ARM) || defined(Q_OS_WINCE) typedef float qreal; #else typedef double qreal; @@ -1326,11 +671,6 @@ class QDataStream; # define Q_DBUS_EXPORT Q_DECL_IMPORT # endif # define Q_TEMPLATEDLL -# if defined(QT_BUILD_CONCURRENT_LIB) -# define Q_CONCURRENT_EXPORT Q_DECL_EXPORT -# else -# define Q_CONCURRENT_EXPORT Q_DECL_IMPORT -# endif # elif defined(QT_DLL) /* use a Qt DLL library */ # define Q_CORE_EXPORT Q_DECL_IMPORT # define Q_GUI_EXPORT Q_DECL_IMPORT @@ -1352,7 +692,6 @@ class QDataStream; # define Q_SCRIPTTOOLS_EXPORT Q_DECL_IMPORT # define Q_COMPAT_EXPORT Q_DECL_IMPORT # define Q_DBUS_EXPORT Q_DECL_IMPORT -# define Q_CONCURRENT_EXPORT Q_DECL_IMPORT # define Q_TEMPLATEDLL # endif # define Q_NO_DECLARED_NOT_DEFINED @@ -1386,7 +725,6 @@ class QDataStream; # define Q_SCRIPTTOOLS_EXPORT Q_DECL_EXPORT # define Q_COMPAT_EXPORT Q_DECL_EXPORT # define Q_DBUS_EXPORT Q_DECL_EXPORT -# define Q_CONCURRENT_EXPORT Q_DECL_EXPORT # else # define Q_CORE_EXPORT # define Q_GUI_EXPORT @@ -1407,7 +745,6 @@ class QDataStream; # define Q_SCRIPTTOOLS_EXPORT # define Q_COMPAT_EXPORT # define Q_DBUS_EXPORT -# define Q_CONCURRENT_EXPORT # endif #endif @@ -1647,10 +984,6 @@ inline void qUnused(T &x) { (void)x; } class QString; Q_CORE_EXPORT QString qt_error_string(int errorCode = -1); - -Q_CORE_EXPORT void qErrnoWarning(int code, const char *msg, ...); -Q_CORE_EXPORT void qErrnoWarning(const char *msg, ...); - Q_CORE_EXPORT void qt_assert(const char *assertion, const char *file, int line); #if !defined(Q_ASSERT) @@ -1687,7 +1020,7 @@ template <> class QStaticAssertFailure {}; #define Q_STATIC_ASSERT_PRIVATE_JOIN(A, B) Q_STATIC_ASSERT_PRIVATE_JOIN_IMPL(A, B) #define Q_STATIC_ASSERT_PRIVATE_JOIN_IMPL(A, B) A ## B #define Q_STATIC_ASSERT(Condition) \ - enum {Q_STATIC_ASSERT_PRIVATE_JOIN(q_static_assert_result, __LINE__) = sizeof(QStaticAssertFailure<(Condition)>)} + enum {Q_STATIC_ASSERT_PRIVATE_JOIN(q_static_assert_result, __LINE__) = sizeof(QStaticAssertFailure)} #define Q_STATIC_ASSERT_X(Condition, Message) Q_STATIC_ASSERT(Condition) #endif @@ -1933,122 +1266,6 @@ static inline bool qIsNull(float f) # define Q_DUMMY_COMPARISON_OPERATOR(C) #endif - -/* - QTypeInfo - type trait functionality - qIsDetached - data sharing functionality -*/ - -/* - The catch-all template. -*/ - -template inline bool qIsDetached(T &) { return true; } - -template -class QTypeInfo -{ -public: - enum { - isPointer = false, - isComplex = true, - isStatic = true, - isLarge = (sizeof(T)>sizeof(void*)), - isDummy = false, - sizeOf = sizeof(T) - }; -}; - -template<> -class QTypeInfo -{ -public: - enum { - isPointer = false, - isComplex = false, - isStatic = false, - isLarge = false, - isDummy = false, - sizeOf = 0 - }; -}; - -template -class QTypeInfo -{ -public: - enum { - isPointer = true, - isComplex = false, - isStatic = false, - isLarge = false, - isDummy = false, - sizeOf = sizeof(T*) - }; -}; - - -#define Q_DECLARE_MOVABLE_CONTAINER(CONTAINER) \ -template class CONTAINER; \ -template \ -class QTypeInfo< CONTAINER > \ -{ \ -public: \ - enum { \ - isPointer = false, \ - isComplex = true, \ - isStatic = false, \ - isLarge = (sizeof(CONTAINER) > sizeof(void*)), \ - isDummy = false, \ - sizeOf = sizeof(CONTAINER) \ - }; \ -}; - -Q_DECLARE_MOVABLE_CONTAINER(QList) -Q_DECLARE_MOVABLE_CONTAINER(QVector) -Q_DECLARE_MOVABLE_CONTAINER(QQueue) -Q_DECLARE_MOVABLE_CONTAINER(QStack) -Q_DECLARE_MOVABLE_CONTAINER(QLinkedList) -Q_DECLARE_MOVABLE_CONTAINER(QSet) - -#undef Q_DECLARE_MOVABLE_CONTAINER - -/* - Specialize a specific type with: - - Q_DECLARE_TYPEINFO(type, flags); - - where 'type' is the name of the type to specialize and 'flags' is - logically-OR'ed combination of the flags below. -*/ -enum { /* TYPEINFO flags */ - Q_COMPLEX_TYPE = 0, - Q_PRIMITIVE_TYPE = 0x1, - Q_STATIC_TYPE = 0, - Q_MOVABLE_TYPE = 0x2, - Q_DUMMY_TYPE = 0x4 -}; - -#define Q_DECLARE_TYPEINFO_BODY(TYPE, FLAGS) \ -class QTypeInfo \ -{ \ -public: \ - enum { \ - isComplex = (((FLAGS) & Q_PRIMITIVE_TYPE) == 0), \ - isStatic = (((FLAGS) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), \ - isLarge = (sizeof(TYPE)>sizeof(void*)), \ - isPointer = false, \ - isDummy = (((FLAGS) & Q_DUMMY_TYPE) != 0), \ - sizeOf = sizeof(TYPE) \ - }; \ - static inline const char *name() { return #TYPE; } \ -} - -#define Q_DECLARE_TYPEINFO(TYPE, FLAGS) \ -template<> \ -Q_DECLARE_TYPEINFO_BODY(TYPE, FLAGS) - - template inline void qSwap(T &value1, T &value2) { @@ -2062,54 +1279,6 @@ inline void qSwap(T &value1, T &value2) #endif } -/* - Specialize a shared type with: - - Q_DECLARE_SHARED(type); - - where 'type' is the name of the type to specialize. NOTE: shared - types must declare a 'bool isDetached(void) const;' member for this - to work. -*/ -#ifdef QT_NO_STL -#define Q_DECLARE_SHARED_STL(TYPE) -#else -#define Q_DECLARE_SHARED_STL(TYPE) \ -QT_END_NAMESPACE \ -namespace std { \ - template<> inline void swap(QT_PREPEND_NAMESPACE(TYPE) &value1, QT_PREPEND_NAMESPACE(TYPE) &value2) \ - { swap(value1.data_ptr(), value2.data_ptr()); } \ -} \ -QT_BEGIN_NAMESPACE -#endif - -#define Q_DECLARE_SHARED(TYPE) \ -template <> inline bool qIsDetached(TYPE &t) { return t.isDetached(); } \ -template <> inline void qSwap(TYPE &value1, TYPE &value2) \ -{ qSwap(value1.data_ptr(), value2.data_ptr()); } \ -Q_DECLARE_SHARED_STL(TYPE) - -/* - QTypeInfo primitive specializations -*/ -Q_DECLARE_TYPEINFO(bool, Q_PRIMITIVE_TYPE); -Q_DECLARE_TYPEINFO(char, Q_PRIMITIVE_TYPE); -Q_DECLARE_TYPEINFO(signed char, Q_PRIMITIVE_TYPE); -Q_DECLARE_TYPEINFO(uchar, Q_PRIMITIVE_TYPE); -Q_DECLARE_TYPEINFO(short, Q_PRIMITIVE_TYPE); -Q_DECLARE_TYPEINFO(ushort, Q_PRIMITIVE_TYPE); -Q_DECLARE_TYPEINFO(int, Q_PRIMITIVE_TYPE); -Q_DECLARE_TYPEINFO(uint, Q_PRIMITIVE_TYPE); -Q_DECLARE_TYPEINFO(long, Q_PRIMITIVE_TYPE); -Q_DECLARE_TYPEINFO(ulong, Q_PRIMITIVE_TYPE); -Q_DECLARE_TYPEINFO(qint64, Q_PRIMITIVE_TYPE); -Q_DECLARE_TYPEINFO(quint64, Q_PRIMITIVE_TYPE); -Q_DECLARE_TYPEINFO(float, Q_PRIMITIVE_TYPE); -Q_DECLARE_TYPEINFO(double, Q_PRIMITIVE_TYPE); -#ifndef Q_OS_DARWIN -Q_DECLARE_TYPEINFO(long double, Q_PRIMITIVE_TYPE); -#endif - /* These functions make it possible to use standard C++ functions with a similar name from Qt header files (especially template classes). @@ -2411,17 +1580,6 @@ Q_CORE_EXPORT int qrand(); #define QT_MODULE(x) -#ifdef QT_NO_CONCURRENT -# define QT_NO_QFUTURE -#endif - -// gcc 3 version has problems with some of the -// map/filter overloads. -#if defined(Q_CC_GNU) && (__GNUC__ < 4) -# define QT_NO_CONCURRENT_MAP -# define QT_NO_CONCURRENT_FILTER -#endif - #ifdef Q_OS_QNX // QNX doesn't have SYSV style shared memory. Multiprocess QWS apps, // shared fonts and QSystemSemaphore + QSharedMemory are not available @@ -2429,8 +1587,6 @@ Q_CORE_EXPORT int qrand(); # define QT_NO_QWS_SHARE_FONTS # define QT_NO_SYSTEMSEMAPHORE # define QT_NO_SHAREDMEMORY -// QNX currently doesn't support forking in a thread, so disable QProcess -# define QT_NO_PROCESS #endif #if defined (__ELF__) @@ -2439,6 +1595,11 @@ Q_CORE_EXPORT int qrand(); # endif #endif +#if !defined(QT_BOOTSTRAPPED) && defined(QT_REDUCE_RELOCATIONS) && defined(__ELF__) && !defined(__PIC__) +# error "You must build your code with position independent code if Qt was built with -reduce-relocations. "\ + "Compile your code with -fPIC or -fPIE." +#endif + namespace QtPrivate { //like std::enable_if template struct QEnableIf; @@ -2449,7 +1610,9 @@ QT_END_NAMESPACE QT_END_HEADER // qDebug and friends -#include "qlogging.h" +#include + +#include #endif /* __cplusplus */ diff --git a/src/corelib/global/qlogging.cpp b/src/corelib/global/qlogging.cpp index bc26c9b6b7e..badccc947da 100644 --- a/src/corelib/global/qlogging.cpp +++ b/src/corelib/global/qlogging.cpp @@ -39,7 +39,21 @@ ** ****************************************************************************/ -#include +#include "qlogging.h" +#include "qlist.h" +#include "qbytearray.h" +#include "qstring.h" +#include "qvarlengtharray.h" +#include "qdebug.h" +#ifndef QT_BOOTSTRAPPED +#include "qcoreapplication.h" +#include "qthread.h" +#endif +#ifdef Q_OS_WINCE +#include +#endif + +#include QT_BEGIN_NAMESPACE @@ -73,4 +87,793 @@ QT_BEGIN_NAMESPACE \sa QMessageLogContext, qDebug(), qWarning(), qCritical(), qFatal() */ +#if !defined(QT_NO_EXCEPTIONS) +/*! + \internal + Uses a local buffer to output the message. Not locale safe + cuts off + everything after character 255, but will work in out of memory situations. +*/ +static void qEmergencyOut(QtMsgType msgType, const char *msg, va_list ap) +{ + char emergency_buf[256] = { '\0' }; + emergency_buf[255] = '\0'; + if (msg) + qvsnprintf(emergency_buf, 255, msg, ap); + QMessageLogContext context; + qt_message_output(msgType, context, emergency_buf); +} +#endif + +/*! + \internal +*/ +static void qt_message(QtMsgType msgType, const QMessageLogContext &context, const char *msg, + va_list ap) +{ +#if !defined(QT_NO_EXCEPTIONS) + if (std::uncaught_exception()) { + qEmergencyOut(msgType, msg, ap); + return; + } +#endif + QByteArray buf; + if (msg) { + QT_TRY { + buf = QString().vsprintf(msg, ap).toLocal8Bit(); + } QT_CATCH(const std::bad_alloc &) { +#if !defined(QT_NO_EXCEPTIONS) + qEmergencyOut(msgType, msg, ap); + // don't rethrow - we use qWarning and friends in destructors. + return; +#endif + } + } + qt_message_output(msgType, context, buf.constData()); +} + +#undef qDebug +/*! + \fn qDebug(const char *message, ...) + \relates + + Calls the message handler with the debug message \a msg. If no + message handler has been installed, the message is printed to + stderr. Under Windows, the message is sent to the console, if it is a + console application; otherwise, it is sent to the debugger. This + function does nothing if \c QT_NO_DEBUG_OUTPUT was defined + during compilation. + + If you pass the function a format string and a list of arguments, + it works in similar way to the C printf() function. The format + should be a Latin-1 string. + + Example: + + \snippet doc/src/snippets/code/src_corelib_global_qglobal.cpp 24 + + If you include \c , a more convenient syntax is also + available: + + \snippet doc/src/snippets/code/src_corelib_global_qglobal.cpp 25 + + With this syntax, the function returns a QDebug object that is + configured to use the QtDebugMsg message type. It automatically + puts a single space between each item, and outputs a newline at + the end. It supports many C++ and Qt types. + + To suppress the output at run-time, install your own message handler + with qInstallMessageHandler(). + + \sa qWarning(), qCritical(), qFatal(), qInstallMessageHandler(), + {Debugging Techniques} +*/ + +void QMessageLogger::debug(const char *msg, ...) +{ + va_list ap; + va_start(ap, msg); // use variable arg list + qt_message(QtDebugMsg, context, msg, ap); + va_end(ap); +} + +#ifndef QT_NO_DEBUG_STREAM + +QDebug QMessageLogger::debug() +{ + QDebug dbg = QDebug(QtDebugMsg); + QMessageLogContext &ctxt = dbg.stream->context; + ctxt.file = context.file; + ctxt.line = context.line; + ctxt.function = context.function; + return dbg; +} + +QNoDebug QMessageLogger::noDebug() +{ + return QNoDebug(); +} + +#endif + +#undef qWarning +/*! + \fn qWarning(const char *message, ...) + \relates + + Calls the message handler with the warning message \a msg. If no + message handler has been installed, the message is printed to + stderr. Under Windows, the message is sent to the debugger. This + function does nothing if \c QT_NO_WARNING_OUTPUT was defined + during compilation; it exits if the environment variable \c + QT_FATAL_WARNINGS is defined. + + This function takes a format string and a list of arguments, + similar to the C printf() function. The format should be a Latin-1 + string. + + Example: + \snippet doc/src/snippets/code/src_corelib_global_qglobal.cpp 26 + + If you include , a more convenient syntax is + also available: + + \snippet doc/src/snippets/code/src_corelib_global_qglobal.cpp 27 + + This syntax inserts a space between each item, and + appends a newline at the end. + + To suppress the output at runtime, install your own message handler + with qInstallMessageHandler(). + + \sa qDebug(), qCritical(), qFatal(), qInstallMessageHandler(), + {Debugging Techniques} +*/ + +void QMessageLogger::warning(const char *msg, ...) +{ + va_list ap; + va_start(ap, msg); // use variable arg list + qt_message(QtWarningMsg, context, msg, ap); + va_end(ap); +} + +#ifndef QT_NO_DEBUG_STREAM +QDebug QMessageLogger::warning() +{ + QDebug dbg = QDebug(QtWarningMsg); + QMessageLogContext &ctxt = dbg.stream->context; + ctxt.file = context.file; + ctxt.line = context.line; + ctxt.function = context.function; + return dbg; +} +#endif + +#undef qCritical +/*! + \fn qCritical(const char *message, ...) + \relates + + Calls the message handler with the critical message \a msg. If no + message handler has been installed, the message is printed to + stderr. Under Windows, the message is sent to the debugger. + + This function takes a format string and a list of arguments, + similar to the C printf() function. The format should be a Latin-1 + string. + + Example: + \snippet doc/src/snippets/code/src_corelib_global_qglobal.cpp 28 + + If you include , a more convenient syntax is + also available: + + \snippet doc/src/snippets/code/src_corelib_global_qglobal.cpp 29 + + A space is inserted between the items, and a newline is + appended at the end. + + To suppress the output at runtime, install your own message handler + with qInstallMessageHandler(). + + \sa qDebug(), qWarning(), qFatal(), qInstallMessageHandler(), + {Debugging Techniques} +*/ + +void QMessageLogger::critical(const char *msg, ...) +{ + va_list ap; + va_start(ap, msg); // use variable arg list + qt_message(QtCriticalMsg, context, msg, ap); + va_end(ap); +} + +#ifndef QT_NO_DEBUG_STREAM +QDebug QMessageLogger::critical() +{ + QDebug dbg = QDebug(QtCriticalMsg); + QMessageLogContext &ctxt = dbg.stream->context; + ctxt.file = context.file; + ctxt.line = context.line; + ctxt.function = context.function; + return dbg; +} +#endif + +#undef qFatal +/*! + \fn qFatal(const char *message, ...) + \relates + + Calls the message handler with the fatal message \a msg. If no + message handler has been installed, the message is printed to + stderr. Under Windows, the message is sent to the debugger. + + If you are using the \bold{default message handler} this function will + abort on Unix systems to create a core dump. On Windows, for debug builds, + this function will report a _CRT_ERROR enabling you to connect a debugger + to the application. + + This function takes a format string and a list of arguments, + similar to the C printf() function. + + Example: + \snippet doc/src/snippets/code/src_corelib_global_qglobal.cpp 30 + + To suppress the output at runtime, install your own message handler + with qInstallMessageHandler(). + + \sa qDebug(), qCritical(), qWarning(), qInstallMessageHandler(), + {Debugging Techniques} +*/ + +void QMessageLogger::fatal(const char *msg, ...) +{ + va_list ap; + va_start(ap, msg); // use variable arg list + qt_message(QtFatalMsg, context, msg, ap); + va_end(ap); +} + +/*! + \internal +*/ +Q_AUTOTEST_EXPORT QByteArray qCleanupFuncinfo(QByteArray info) +{ + // Strip the function info down to the base function name + // note that this throws away the template definitions, + // the parameter types (overloads) and any const/volatile qualifiers. + + if (info.isEmpty()) + return info; + + int pos; + + // skip trailing [with XXX] for templates (gcc) + pos = info.size() - 1; + if (info.endsWith(']')) { + while (--pos) { + if (info.at(pos) == '[') + info.truncate(pos); + } + } + + // operator names with '(', ')', '<', '>' in it + static const char operator_call[] = "operator()"; + static const char operator_lessThan[] = "operator<"; + static const char operator_greaterThan[] = "operator>"; + static const char operator_lessThanEqual[] = "operator<="; + static const char operator_greaterThanEqual[] = "operator>="; + + // canonize operator names + info.replace("operator ", "operator"); + + // remove argument list + forever { + int parencount = 0; + pos = info.lastIndexOf(')'); + if (pos == -1) { + // Don't know how to parse this function name + return info; + } + + // find the beginning of the argument list + --pos; + ++parencount; + while (pos && parencount) { + if (info.at(pos) == ')') + ++parencount; + else if (info.at(pos) == '(') + --parencount; + --pos; + } + if (parencount != 0) + return info; + + info.truncate(++pos); + + if (info.at(pos - 1) == ')') { + if (info.indexOf(operator_call) == pos - (int)strlen(operator_call)) + break; + + // this function returns a pointer to a function + // and we matched the arguments of the return type's parameter list + // try again + info.remove(0, info.indexOf('(')); + info.chop(1); + continue; + } else { + break; + } + } + + // find the beginning of the function name + int parencount = 0; + int templatecount = 0; + --pos; + + // make sure special characters in operator names are kept + if (pos > -1) { + switch (info.at(pos)) { + case ')': + if (info.indexOf(operator_call) == pos - (int)strlen(operator_call) + 1) + pos -= 2; + break; + case '<': + if (info.indexOf(operator_lessThan) == pos - (int)strlen(operator_lessThan) + 1) + --pos; + break; + case '>': + if (info.indexOf(operator_greaterThan) == pos - (int)strlen(operator_greaterThan) + 1) + --pos; + break; + case '=': { + int operatorLength = (int)strlen(operator_lessThanEqual); + if (info.indexOf(operator_lessThanEqual) == pos - operatorLength + 1) + pos -= 2; + else if (info.indexOf(operator_greaterThanEqual) == pos - operatorLength + 1) + pos -= 2; + break; + } + default: + break; + } + } + + while (pos > -1) { + if (parencount < 0 || templatecount < 0) + return info; + + char c = info.at(pos); + if (c == ')') + ++parencount; + else if (c == '(') + --parencount; + else if (c == '>') + ++templatecount; + else if (c == '<') + --templatecount; + else if (c == ' ' && templatecount == 0 && parencount == 0) + break; + + --pos; + } + info = info.mid(pos + 1); + + // remove trailing '*', '&' that are part of the return argument + while ((info.at(0) == '*') + || (info.at(0) == '&')) + info = info.mid(1); + + // we have the full function name now. + // clean up the templates + while ((pos = info.lastIndexOf('>')) != -1) { + if (!info.contains('<')) + break; + + // find the matching close + int end = pos; + templatecount = 1; + --pos; + while (pos && templatecount) { + register char c = info.at(pos); + if (c == '>') + ++templatecount; + else if (c == '<') + --templatecount; + --pos; + } + ++pos; + info.remove(pos, end - pos + 1); + } + + return info; +} + +// tokens as recognized in QT_MESSAGE_PATTERN +static const char typeTokenC[] = "%{type}"; +static const char messageTokenC[] = "%{message}"; +static const char fileTokenC[] = "%{file}"; +static const char lineTokenC[] = "%{line}"; +static const char functionTokenC[] = "%{function}"; +static const char pidTokenC[] = "%{pid}"; +static const char appnameTokenC[] = "%{appname}"; +static const char threadidTokenC[] = "%{threadid}"; +static const char emptyTokenC[] = ""; + +struct QMessagePattern { + QMessagePattern(); + ~QMessagePattern(); + + // 0 terminated arrays of literal tokens / literal or placeholder tokens + const char **literals; + const char **tokens; +}; + +QMessagePattern::QMessagePattern() +{ + QString pattern = QString::fromLocal8Bit(qgetenv("QT_MESSAGE_PATTERN")); + if (pattern.isEmpty()) { + pattern = QLatin1String("%{message}"); + } + + // scanner + QList lexemes; + QString lexeme; + bool inPlaceholder = false; + for (int i = 0; i < pattern.size(); ++i) { + const QChar c = pattern.at(i); + if ((c == QLatin1Char('%')) + && !inPlaceholder) { + if ((i + 1 < pattern.size()) + && pattern.at(i + 1) == QLatin1Char('{')) { + // beginning of placeholder + if (!lexeme.isEmpty()) { + lexemes.append(lexeme); + lexeme.clear(); + } + inPlaceholder = true; + } + } + + lexeme.append(c); + + if ((c == QLatin1Char('}') && inPlaceholder)) { + // end of placeholder + lexemes.append(lexeme); + lexeme.clear(); + inPlaceholder = false; + } + } + if (!lexeme.isEmpty()) + lexemes.append(lexeme); + + // tokenizer + QVarLengthArray literalsVar; + tokens = new const char*[lexemes.size() + 1]; + tokens[lexemes.size()] = 0; + + for (int i = 0; i < lexemes.size(); ++i) { + const QString lexeme = lexemes.at(i); + if (lexeme.startsWith(QLatin1String("%{")) + && lexeme.endsWith(QLatin1Char('}'))) { + // placeholder + if (lexeme == QLatin1String(typeTokenC)) { + tokens[i] = typeTokenC; + } else if (lexeme == QLatin1String(messageTokenC)) + tokens[i] = messageTokenC; + else if (lexeme == QLatin1String(fileTokenC)) + tokens[i] = fileTokenC; + else if (lexeme == QLatin1String(lineTokenC)) + tokens[i] = lineTokenC; + else if (lexeme == QLatin1String(functionTokenC)) + tokens[i] = functionTokenC; + else if (lexeme == QLatin1String(pidTokenC)) + tokens[i] = pidTokenC; + else if (lexeme == QLatin1String(appnameTokenC)) + tokens[i] = appnameTokenC; + else if (lexeme == QLatin1String(threadidTokenC)) + tokens[i] = threadidTokenC; + else { + fprintf(stderr, "%s\n", + QString::fromLatin1("QT_MESSAGE_PATTERN: Unknown placeholder %1\n" + ).arg(lexeme).toLocal8Bit().constData()); + fflush(stderr); + tokens[i] = emptyTokenC; + } + } else { + char *literal = new char[lexeme.size() + 1]; + strncpy(literal, lexeme.toLocal8Bit().constData(), lexeme.size()); + literal[lexeme.size()] = '\0'; + literalsVar.append(literal); + tokens[i] = literal; + } + } + literals = new const char*[literalsVar.size() + 1]; + literals[literalsVar.size()] = 0; + memcpy(literals, literalsVar.constData(), literalsVar.size() * sizeof(const char*)); +} + +QMessagePattern::~QMessagePattern() +{ + for (int i = 0; literals[i] != 0; ++i) + delete [] literals[i]; + delete [] literals; + literals = 0; + delete [] tokens; + tokens = 0; +} + +Q_GLOBAL_STATIC(QMessagePattern, qMessagePattern) + +/*! + \internal +*/ +Q_CORE_EXPORT QByteArray qMessageFormatString(QtMsgType type, const QMessageLogContext &context, + const char *str) +{ + QByteArray message; + + QMessagePattern *pattern = qMessagePattern(); + if (!pattern) { + // after destruction of static QMessagePattern instance + message.append(str); + message.append('\n'); + return message; + } + + // we do not convert file, function, line literals to local encoding due to overhead + for (int i = 0; pattern->tokens[i] != 0; ++i) { + const char *token = pattern->tokens[i]; + if (token == messageTokenC) { + message.append(str); + } else if (token == typeTokenC) { + switch (type) { + case QtDebugMsg: message.append("debug"); break; + case QtWarningMsg: message.append("warning"); break; + case QtCriticalMsg:message.append("critical"); break; + case QtFatalMsg: message.append("fatal"); break; + } + } else if (token == fileTokenC) { + if (context.file) + message.append(context.file); + else + message.append("unknown"); + } else if (token == lineTokenC) { + message.append(QByteArray::number(context.line)); + } else if (token == functionTokenC) { + if (context.function) + message.append(qCleanupFuncinfo(context.function)); + else + message.append("unknown"); +#ifndef QT_BOOTSTRAPPED + } else if (token == pidTokenC) { + message.append(QByteArray::number(QCoreApplication::applicationPid())); + } else if (token == appnameTokenC) { + message.append(QCoreApplication::applicationName().toUtf8().constData()); + } else if (token == threadidTokenC) { + message.append("0x" + QByteArray::number(qlonglong(QThread::currentThread()->currentThread()), 16)); +#endif + } else { + message.append(token); + } + } + message.append('\n'); + return message; +} + +static QtMsgHandler msgHandler = 0; // pointer to debug handler (without context) +static QMessageHandler messageHandler = 0; // pointer to debug handler (with context) + +/*! + \internal +*/ +static void qDefaultMessageHandler(QtMsgType type, const QMessageLogContext &context, + const char *buf) +{ + QByteArray logMessage = qMessageFormatString(type, context, buf); +#if defined(Q_OS_WINCE) + QString fstr = QString::fromLocal8Bit(logMessage); + OutputDebugString(reinterpret_cast (fstr.utf16())); +#else + fprintf(stderr, "%s", logMessage.constData()); + fflush(stderr); +#endif +} + +/*! + \internal +*/ +static void qDefaultMsgHandler(QtMsgType type, const char *buf) +{ + QMessageLogContext emptyContext; + qDefaultMessageHandler(type, emptyContext, buf); +} + +/*! + \internal +*/ +void qt_message_output(QtMsgType msgType, const QMessageLogContext &context, const char *buf) +{ + if (!msgHandler) + msgHandler = qDefaultMsgHandler; + if (!messageHandler) + messageHandler = qDefaultMessageHandler; + + // prefer new message handler over the old one + if (msgHandler == qDefaultMsgHandler + || messageHandler != qDefaultMessageHandler) { + (*messageHandler)(msgType, context, buf); + } else { + (*msgHandler)(msgType, buf); + } + + if (msgType == QtFatalMsg + || (msgType == QtWarningMsg + && (!qgetenv("QT_FATAL_WARNINGS").isNull())) ) { + +#if defined(Q_CC_MSVC) && defined(QT_DEBUG) && defined(_DEBUG) && defined(_CRT_ERROR) + // get the current report mode + int reportMode = _CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_WNDW); + _CrtSetReportMode(_CRT_ERROR, reportMode); +#if !defined(Q_OS_WINCE) + int ret = _CrtDbgReport(_CRT_ERROR, __FILE__, __LINE__, QT_VERSION_STR, buf); +#else + int ret = _CrtDbgReportW(_CRT_ERROR, _CRT_WIDE(__FILE__), + __LINE__, _CRT_WIDE(QT_VERSION_STR), + reinterpret_cast ( + QString::fromLatin1(buf).utf16())); +#endif + if (ret == 0 && reportMode & _CRTDBG_MODE_WNDW) + return; // ignore + else if (ret == 1) + _CrtDbgBreak(); +#endif + +#if (defined(Q_OS_UNIX) || defined(Q_CC_MINGW)) + abort(); // trap; generates core dump +#else + exit(1); // goodbye cruel world +#endif + } +} + +void qErrnoWarning(const char *msg, ...) +{ + // qt_error_string() will allocate anyway, so we don't have + // to be careful here (like we do in plain qWarning()) + QString buf; + va_list ap; + va_start(ap, msg); + if (msg) + buf.vsprintf(msg, ap); + va_end(ap); + + QMessageLogger().critical("%s (%s)", buf.toLocal8Bit().constData(), + qt_error_string(-1).toLocal8Bit().constData()); +} + +void qErrnoWarning(int code, const char *msg, ...) +{ + // qt_error_string() will allocate anyway, so we don't have + // to be careful here (like we do in plain qWarning()) + QString buf; + va_list ap; + va_start(ap, msg); + if (msg) + buf.vsprintf(msg, ap); + va_end(ap); + + QMessageLogger().critical("%s (%s)", buf.toLocal8Bit().constData(), + qt_error_string(code).toLocal8Bit().constData()); +} + +#if defined(Q_OS_WIN) && defined(QT_BUILD_CORE_LIB) +extern bool usingWinMain; +extern Q_CORE_EXPORT void qWinMsgHandler(QtMsgType t, const char *str); +extern Q_CORE_EXPORT void qWinMessageHandler(QtMsgType t, const QMessageLogContext &context, + const char *str); +#endif + +/*! + \typedef QtMsgHandler + \relates + \deprecated + + This is a typedef for a pointer to a function with the following + signature: + + \snippet doc/src/snippets/code/src_corelib_global_qglobal.cpp 7 + + This typedef is deprecated, you should use QMessageHandler instead. + \sa QtMsgType, QMessageHandler, qInstallMsgHandler(), qInstallMessageHandler() +*/ + +/*! + \typedef QMessageHandler + \relates + \since 5.0 + + This is a typedef for a pointer to a function with the following + signature: + + \snippet doc/src/snippets/code/src_corelib_global_qglobal.cpp 49 + + \sa QtMsgType, qInstallMessageHandler() +*/ + +/*! + \fn QMessageHandler qInstallMessageHandler(QMessageHandler handler) + \relates + \since 5.0 + + Installs a Qt message \a handler which has been defined + previously. Returns a pointer to the previous message handler + (which may be 0). + + The message handler is a function that prints out debug messages, + warnings, critical and fatal error messages. The Qt library (debug + mode) contains hundreds of warning messages that are printed + when internal errors (usually invalid function arguments) + occur. Qt built in release mode also contains such warnings unless + QT_NO_WARNING_OUTPUT and/or QT_NO_DEBUG_OUTPUT have been set during + compilation. If you implement your own message handler, you get total + control of these messages. + + The default message handler prints the message to the standard + output under X11 or to the debugger under Windows. If it is a + fatal message, the application aborts immediately. + + Only one message handler can be defined, since this is usually + done on an application-wide basis to control debug output. + + To restore the message handler, call \c qInstallMessageHandler(0). + + Example: + + \snippet doc/src/snippets/code/src_corelib_global_qglobal.cpp 23 + + \sa qDebug(), qWarning(), qCritical(), qFatal(), QtMsgType, + {Debugging Techniques} +*/ + +QMessageHandler qInstallMessageHandler(QMessageHandler h) +{ + if (!messageHandler) + messageHandler = qDefaultMessageHandler; + QMessageHandler old = messageHandler; + messageHandler = h; +#if defined(Q_OS_WIN) && defined(QT_BUILD_CORE_LIB) + if (!messageHandler && usingWinMain) + messageHandler = qWinMessageHandler; +#endif + return old; +} + +/*! + \fn QtMsgHandler qInstallMsgHandler(QtMsgHandler handler) + \relates + \deprecated + + Installs a Qt message \a handler which has been defined + previously. This method is deprecated, use qInstallMessageHandler + instead. + \sa QtMsgHandler, qInstallMessageHandler +*/ + +QtMsgHandler qInstallMsgHandler(QtMsgHandler h) +{ + //if handler is 0, set it to the + //default message handler + if (!msgHandler) + msgHandler = qDefaultMsgHandler; + QtMsgHandler old = msgHandler; + msgHandler = h; +#if defined(Q_OS_WIN) && defined(QT_BUILD_CORE_LIB) + if (!msgHandler && usingWinMain) + msgHandler = qWinMsgHandler; +#endif + return old; +} + QT_END_NAMESPACE diff --git a/src/corelib/global/qlogging.h b/src/corelib/global/qlogging.h index c6edc7bc480..4de04bdc330 100644 --- a/src/corelib/global/qlogging.h +++ b/src/corelib/global/qlogging.h @@ -67,8 +67,9 @@ class QMessageLogContext Q_DISABLE_COPY(QMessageLogContext) public: QMessageLogContext() : version(1), line(0), file(0), function(0) {} - Q_DECL_CONSTEXPR QMessageLogContext(const char *file, int line, const char *function) - : version(1), line(line), file(file), function(function) {} + Q_DECL_CONSTEXPR QMessageLogContext(const char *fileName, int lineNumber, + const char *functionName) + : version(1), line(lineNumber), file(fileName), function(functionName) {} int version; int line; @@ -126,8 +127,6 @@ private: QMessageLogContext context; }; -Q_CORE_EXPORT void qt_message_output(QtMsgType, const QMessageLogContext &context, const char *buf); - /* qDebug, qWarning, qCritical, qFatal are redefined to automatically include context information */ @@ -139,15 +138,20 @@ Q_CORE_EXPORT void qt_message_output(QtMsgType, const QMessageLogContext &contex #define QT_NO_QDEBUG_MACRO while (false) QMessageLogger().noDebug #define QT_NO_QWARNING_MACRO while (false) QMessageLogger().noDebug -#ifdef QT_NO_DEBUG_OUTPUT +#if defined(QT_NO_DEBUG_OUTPUT) # undef qDebug # define qDebug QT_NO_QDEBUG_MACRO #endif -#ifdef QT_NO_WARNING_OUTPUT +#if defined(QT_NO_WARNING_OUTPUT) # undef qWarning # define qWarning QT_NO_QWARNING_MACRO #endif +Q_CORE_EXPORT void qt_message_output(QtMsgType, const QMessageLogContext &context, const char *buf); + +Q_CORE_EXPORT void qErrnoWarning(int code, const char *msg, ...); +Q_CORE_EXPORT void qErrnoWarning(const char *msg, ...); + // deprecated. Use qInstallMessageHandler instead! typedef void (*QtMsgHandler)(QtMsgType, const char *); Q_CORE_EXPORT QtMsgHandler qInstallMsgHandler(QtMsgHandler); diff --git a/src/corelib/global/qnamespace.h b/src/corelib/global/qnamespace.h index efb49856454..2087d763ded 100644 --- a/src/corelib/global/qnamespace.h +++ b/src/corelib/global/qnamespace.h @@ -184,6 +184,7 @@ public: ExtraButton22 = 0x01000000, ExtraButton23 = 0x02000000, ExtraButton24 = 0x04000000, + AllButtons = 0x07ffffff, MaxMouseButton = ExtraButton24, // 4 high-order bits remain available for future use (0x08000000 through 0x40000000). MouseButtonMask = 0xffffffff diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc index ae395a2dfa5..d50960f68b4 100644 --- a/src/corelib/global/qnamespace.qdoc +++ b/src/corelib/global/qnamespace.qdoc @@ -172,18 +172,64 @@ This enum type describes the different mouse buttons. \value NoButton The button state does not refer to any - button (see QMouseEvent::button()). + button (see QMouseEvent::button()). + + \value AllButtons This value corresponds to a mask of all + possible mouse buttons. Use to set the 'acceptedButtons' + property of a mouseArea to accept ALL mouse buttons. + \value LeftButton The left button is pressed, or an event refers - to the left button. (The left button may be the right button on - left-handed mice.) + to the left button. (The left button may be the right button on + left-handed mice.) \value RightButton The right button. \value MidButton The middle button. \value MiddleButton The middle button. - \value XButton1 The first X button. - \value XButton2 The second X button. + \value BackButton The 'Back' button. (Typically present on + the 'thumb' side of a mouse with extra buttons. This is NOT + the tilt wheel.) + \value XButton1 The 'Back' Button. + \value ExtraButton1 The 'Back' Button. + + \value ForwardButton The 'Forward' Button. (Typically present + beside the 'Back' button, and also pressed by the thumb.) + \value XButton2 The 'Forward Button. + \value ExtraButton2 The 'Forward' Button. + + \value TaskButton The 'Task' Button. + \value ExtraButton3 The 'Task' Button. + + \value ExtraButton4 The 7th non-wheel Mouse Button. + \value ExtraButton5 The 8th non-wheel Mouse Button. + \value ExtraButton6 The 9th non-wheel Mouse Button. + \value ExtraButton7 The 10th non-wheel Mouse Button. + \value ExtraButton8 The 11th non-wheel Mouse Button. + \value ExtraButton9 The 12th non-wheel Mouse Button. + \value ExtraButton10 The 13th non-wheel Mouse Button. + \value ExtraButton11 The 14th non-wheel Mouse Button. + \value ExtraButton12 The 15th non-wheel Mouse Button. + \value ExtraButton13 The 16th non-wheel Mouse Button. + \value ExtraButton14 The 17th non-wheel Mouse Button. + \value ExtraButton15 The 18th non-wheel Mouse Button. + \value ExtraButton16 The 19th non-wheel Mouse Button. + \value ExtraButton17 The 20th non-wheel Mouse Button. + \value ExtraButton18 The 21st non-wheel Mouse Button. + \value ExtraButton19 The 22nd non-wheel Mouse Button. + \value ExtraButton20 The 23rd non-wheel Mouse Button. + \value ExtraButton21 The 24th non-wheel Mouse Button. + \value ExtraButton22 The 25th non-wheel Mouse Button. + \value ExtraButton23 The 26th non-wheel Mouse Button. + \value ExtraButton44 The 27th non-wheel Mouse Button. + + \omitvalue MaxMouseButton \omitvalue MouseButtonMask + \note Some models of multi-button mice are pre-configured with + high-numbered Buttons emulating keyboard sequences, for use in + specific games. In order for these Buttons to be seen as + actual 'Mouse Buttons', the device must be re-configured (using + the vendor's configuration tool). + \sa KeyboardModifier Modifier */ @@ -462,20 +508,20 @@ delivery at a later time. \value AutoConnection - (default) If the signal is emitted from a different thread than the - receiving object, the signal is queued, behaving as - Qt::QueuedConnection. Otherwise, the slot is invoked directly, - behaving as Qt::DirectConnection. The type of connection is - determined when the signal is emitted. + (default) If the signal is emitted from a different thread than the + receiving object, the signal is queued, behaving as + Qt::QueuedConnection. Otherwise, the slot is invoked directly, + behaving as Qt::DirectConnection. The type of connection is + determined when the signal is emitted. \value DirectConnection - The slot is invoked immediately, when the signal is - emitted. + The slot is invoked immediately, when the signal is + emitted. \value QueuedConnection - The slot is invoked when control returns to the event loop - of the receiver's thread. The slot is executed in the - receiver's thread. + The slot is invoked when control returns to the event loop + of the receiver's thread. The slot is executed in the + receiver's thread. \value BlockingQueuedConnection Same as QueuedConnection, except the current thread blocks @@ -486,17 +532,17 @@ \value UniqueConnection Same as AutoConnection, but the connection is made only if - it does not duplicate an existing connection. i.e., if the - same signal is already connected to the same slot for the - same pair of objects, then the connection will fail. This - connection type was introduced in Qt 4.6. + it does not duplicate an existing connection. i.e., if the + same signal is already connected to the same slot for the + same pair of objects, then the connection will fail. This + connection type was introduced in Qt 4.6. \value AutoCompatConnection - The default type when Qt 3 support is enabled. Same as - AutoConnection but will also cause warnings to be output in - certain situations. See \l{Porting to Qt 4#Compatibility - Signals and Slots}{Compatibility Signals and Slots} for - further information. + The default type when Qt 3 support is enabled. Same as + AutoConnection but will also cause warnings to be output in + certain situations. See \l{Porting to Qt 4#Compatibility + Signals and Slots}{Compatibility Signals and Slots} for + further information. With queued connections, the parameters must be of types that are known to Qt's meta-object system, because Qt needs to copy the @@ -510,7 +556,7 @@ When using signals and slots with multiple threads, see \l{Signals and Slots Across Threads}. - \sa {Thread Support in Qt}, QObject::connect(), qRegisterMetaType() + \sa {Thread Support in Qt}, QObject::connect(), qRegisterMetaType(), Q_DECLARE_METATYPE() */ /*! @@ -2137,9 +2183,9 @@ should be taken over by the target application, i.e., the source application should not delete the data. - \br - On X11 this value is used to do a move. - \br + \br + On X11 this value is used to do a move. + \br TargetMoveAction is not used on the Mac. */ diff --git a/src/corelib/global/qprocessordetection.h b/src/corelib/global/qprocessordetection.h new file mode 100644 index 00000000000..fd02f0e4c52 --- /dev/null +++ b/src/corelib/global/qprocessordetection.h @@ -0,0 +1,193 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the QtCore module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QPROCESSORDETECTION_H +#define QPROCESSORDETECTION_H + +/* + This file uses preprocessor #defines to set various Q_PROCESSOR_* #defines + based on the following patterns: + + Q_PROCESSOR_{FAMILY} + Q_PROCESSOR_{FAMILY}_{VARIANT} + Q_PROCESSOR_{FAMILY}_{REVISION} + + The first is always defined. Defines for the various revisions/variants are + optional and usually dependent on how the compiler was invoked. Variants + that are a superset of another should have a define for the superset. +*/ + +/* + Alpha family, no revisions or variants +*/ +// #elif defined(__alpha__) || defined(_M_ALPHA) +// # define Q_PROCESSOR_ALPHA + +/* + ARM family, known revisions: V5, V6, and V7 +*/ +#if defined(__arm__) || defined(__TARGET_ARCH_ARM) +# define Q_PROCESSOR_ARM +# if defined(__ARM_ARCH_7__) \ + || defined(__ARM_ARCH_7A__) \ + || defined(__ARM_ARCH_7R__) \ + || defined(__ARM_ARCH_7M__) \ + || (__TARGET_ARCH_ARM-0 >= 7) +# define Q_PROCESSOR_ARM_V7 +# define Q_PROCESSOR_ARM_V6 +# define Q_PROCESSOR_ARM_V5 +# elif defined(__ARM_ARCH_6__) \ + || defined(__ARM_ARCH_6J__) \ + || defined(__ARM_ARCH_6T2__) \ + || defined(__ARM_ARCH_6Z__) \ + || defined(__ARM_ARCH_6K__) \ + || defined(__ARM_ARCH_6ZK__) \ + || defined(__ARM_ARCH_6M__) \ + || (__TARGET_ARCH_ARM-0 >= 6) +# define Q_PROCESSOR_ARM_V6 +# define Q_PROCESSOR_ARM_V5 +# elif defined(__ARM_ARCH_5TEJ__) \ + || (__TARGET_ARCH_ARM-0 >= 5) +# define Q_PROCESSOR_ARM_V5 +# endif + +/* + AVR32 family, no revisions or variants +*/ +// #elif defined(__avr32__) +// # define Q_PROCESSOR_AVR32 + +/* + Blackfin family, no revisions or variants +*/ +// #elif defined(__bfin__) +// # define Q_PROCESSOR_BLACKFIN + +/* + X86 family, known variants: 32- and 64-bit +*/ +#elif defined(__i386) || defined(__i386__) || defined(_M_IX86) +# define Q_PROCESSOR_X86 +# define Q_PROCESSOR_X86_32 +#elif defined(__x86_64) || defined(__x86_64__) || defined(__amd64) || defined(_M_X64) +# define Q_PROCESSOR_X86 +# define Q_PROCESSOR_X86_64 + +/* + Itanium (IA-64) family, no revisions or variants +*/ +#elif defined(__ia64) || defined(__ia64__) || defined(_M_IA64) +# define Q_PROCESSOR_IA64 + +/* + MIPS family, known revisions: I, II, III, IV, 32, 64 +*/ +#elif defined(__mips) || defined(__mips__) || defined(_M_MRX000) +# define Q_PROCESSOR_MIPS +# if defined(_MIPS_ARCH_MIPS1) || (defined(__mips) && __mips - 0 >= 1) +# define Q_PROCESSOR_MIPS_I +# endif +# if defined(_MIPS_ARCH_MIPS2) || (defined(__mips) && __mips - 0 >= 2) +# define Q_PROCESSOR_MIPS_II +# endif +# if defined(_MIPS_ARCH_MIPS32) || defined(__mips32) +# define Q_PROCESSOR_MIPS_32 +# endif +# if defined(_MIPS_ARCH_MIPS3) || (defined(__mips) && __mips - 0 >= 3) +# define Q_PROCESSOR_MIPS_III +# endif +# if defined(_MIPS_ARCH_MIPS4) || (defined(__mips) && __mips - 0 >= 4) +# define Q_PROCESSOR_MIPS_IV +# endif +# if defined(_MIPS_ARCH_MIPS5) || (defined(__mips) && __mips - 0 >= 5) +# define Q_PROCESSOR_MIPS_V +# endif +# if defined(_MIPS_ARCH_MIPS64) || defined(__mips64) +# define Q_PROCESSOR_MIPS_64 +# endif + +/* + Power family, known variants: 32- and 64-bit + + There are many more known variants/revisions that we do not handle/detect. + See http://en.wikipedia.org/wiki/Power_Architecture + and http://en.wikipedia.org/wiki/File:PowerISA-evolution.svg +*/ +#elif defined(__ppc__) || defined(__ppc) || defined(__powerpc__) \ + || defined(_ARCH_COM) || defined(_ARCH_PWR) || defined(_ARCH_PPC) \ + || defined(_M_MPPC) || defined(_M_PPC) +# define Q_PROCESSOR_POWER +# if defined(__ppc64__) || defined(__powerpc64__) || defined(__64BIT__) +# define Q_PROCESSOR_POWER_64 +# else +# define Q_PROCESSOR_POWER_32 +# endif + +/* + S390 family, known variant: S390X (64-bit) +*/ +// #elif defined(__s390__) +// # define Q_PROCESSOR_S390 +// # if defined(__s390x__) +// # define Q_PROCESSOR_S390_X +// # endif + +/* + SuperH family, optional revision: SH-4A +*/ +// #elif defined(__sh__) +// # define Q_PROCESSOR_SH +// # if defined(__sh4a__) +// # define Q_PROCESSOR_SH_4A +// # endif + +/* + SPARC family, optional revision: V9 +*/ +// #elif defined(__sparc__) +// # define Q_PROCESSOR_SPARC +// # if defined(__sparc_v9__) +// # define Q_PROCESSOR_SPARC_V9 +// # endif + +#endif + +#endif // QPROCESSORDETECTION_H diff --git a/src/corelib/global/qsystemdetection.h b/src/corelib/global/qsystemdetection.h new file mode 100644 index 00000000000..0228bc9404a --- /dev/null +++ b/src/corelib/global/qsystemdetection.h @@ -0,0 +1,208 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the QtCore module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QSYSTEMDETECTION_H +#define QSYSTEMDETECTION_H + +/* + The operating system, must be one of: (Q_OS_x) + + DARWIN - Darwin OS (synonym for Q_OS_MAC) + MSDOS - MS-DOS and Windows + OS2 - OS/2 + OS2EMX - XFree86 on OS/2 (not PM) + WIN32 - Win32 (Windows 2000/XP/Vista/7 and Windows Server 2003/2008) + WINCE - WinCE (Windows CE 5.0) + CYGWIN - Cygwin + SOLARIS - Sun Solaris + HPUX - HP-UX + ULTRIX - DEC Ultrix + LINUX - Linux + FREEBSD - FreeBSD + NETBSD - NetBSD + OPENBSD - OpenBSD + BSDI - BSD/OS + IRIX - SGI Irix + OSF - HP Tru64 UNIX + SCO - SCO OpenServer 5 + UNIXWARE - UnixWare 7, Open UNIX 8 + AIX - AIX + HURD - GNU Hurd + DGUX - DG/UX + RELIANT - Reliant UNIX + DYNIX - DYNIX/ptx + QNX - QNX + QNX6 - QNX RTP 6.1 + LYNX - LynxOS + BSD4 - Any BSD 4.4 system + UNIX - Any UNIX BSD/SYSV system +*/ + +#if defined(__APPLE__) && (defined(__GNUC__) || defined(__xlC__) || defined(__xlc__)) +# define Q_OS_DARWIN +# define Q_OS_BSD4 +# ifdef __LP64__ +# define Q_OS_DARWIN64 +# else +# define Q_OS_DARWIN32 +# endif +#elif defined(__CYGWIN__) +# define Q_OS_CYGWIN +#elif !defined(SAG_COM) && (defined(WIN64) || defined(_WIN64) || defined(__WIN64__)) +# define Q_OS_WIN32 +# define Q_OS_WIN64 +#elif !defined(SAG_COM) && (defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__)) +# if defined(WINCE) || defined(_WIN32_WCE) +# define Q_OS_WINCE +# else +# define Q_OS_WIN32 +# endif +#elif defined(__sun) || defined(sun) +# define Q_OS_SOLARIS +#elif defined(hpux) || defined(__hpux) +# define Q_OS_HPUX +#elif defined(__ultrix) || defined(ultrix) +# define Q_OS_ULTRIX +#elif defined(sinix) +# define Q_OS_RELIANT +#elif defined(__native_client__) +# define Q_OS_NACL +#elif defined(__linux__) || defined(__linux) +# define Q_OS_LINUX +#elif defined(__FreeBSD__) || defined(__DragonFly__) +# define Q_OS_FREEBSD +# define Q_OS_BSD4 +#elif defined(__NetBSD__) +# define Q_OS_NETBSD +# define Q_OS_BSD4 +#elif defined(__OpenBSD__) +# define Q_OS_OPENBSD +# define Q_OS_BSD4 +#elif defined(__bsdi__) +# define Q_OS_BSDI +# define Q_OS_BSD4 +#elif defined(__sgi) +# define Q_OS_IRIX +#elif defined(__osf__) +# define Q_OS_OSF +#elif defined(_AIX) +# define Q_OS_AIX +#elif defined(__Lynx__) +# define Q_OS_LYNX +#elif defined(__GNU__) +# define Q_OS_HURD +#elif defined(__DGUX__) +# define Q_OS_DGUX +#elif defined(__QNXNTO__) +# define Q_OS_QNX +#elif defined(_SEQUENT_) +# define Q_OS_DYNIX +#elif defined(_SCO_DS) /* SCO OpenServer 5 + GCC */ +# define Q_OS_SCO +#elif defined(__USLC__) /* all SCO platforms + UDK or OUDK */ +# define Q_OS_UNIXWARE +#elif defined(__svr4__) && defined(i386) /* Open UNIX 8 + GCC */ +# define Q_OS_UNIXWARE +#elif defined(__INTEGRITY) +# define Q_OS_INTEGRITY +#elif defined(VXWORKS) /* there is no "real" VxWorks define - this has to be set in the mkspec! */ +# define Q_OS_VXWORKS +#elif defined(__MAKEDEPEND__) +#else +# error "Qt has not been ported to this OS - see http://www.qt-project.org/" +#endif + +#if defined(Q_OS_WIN32) || defined(Q_OS_WIN64) || defined(Q_OS_WINCE) +# define Q_OS_WIN +#endif + +#if defined(Q_OS_DARWIN) +# define Q_OS_MAC +# define Q_OS_MACX /* Q_OS_MACX is only for compatibility.*/ +# if defined(Q_OS_DARWIN64) +# define Q_OS_MAC64 +# elif defined(Q_OS_DARWIN32) +# define Q_OS_MAC32 +# endif +#endif + +#if defined(Q_OS_WIN) +# undef Q_OS_UNIX +#elif !defined(Q_OS_UNIX) +# define Q_OS_UNIX +#endif + +#ifdef Q_OS_DARWIN +# ifdef MAC_OS_X_VERSION_MIN_REQUIRED +# undef MAC_OS_X_VERSION_MIN_REQUIRED +# endif +# define MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_4 +# include +# if !defined(MAC_OS_X_VERSION_10_3) +# define MAC_OS_X_VERSION_10_3 MAC_OS_X_VERSION_10_2 + 1 +# endif +# if !defined(MAC_OS_X_VERSION_10_4) +# define MAC_OS_X_VERSION_10_4 MAC_OS_X_VERSION_10_3 + 1 +# endif +# if !defined(MAC_OS_X_VERSION_10_5) +# define MAC_OS_X_VERSION_10_5 MAC_OS_X_VERSION_10_4 + 1 +# endif +# if !defined(MAC_OS_X_VERSION_10_6) +# define MAC_OS_X_VERSION_10_6 MAC_OS_X_VERSION_10_5 + 1 +# endif +# if !defined(MAC_OS_X_VERSION_10_7) +# define MAC_OS_X_VERSION_10_7 MAC_OS_X_VERSION_10_6 + 1 +# endif +# if (MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_7) +# warning "This version of Mac OS X is unsupported" +# endif +#endif + +#ifdef __LSB_VERSION__ +# if __LSB_VERSION__ < 40 +# error "This version of the Linux Standard Base is unsupported" +# endif +#ifndef QT_LINUXBASE +# define QT_LINUXBASE +#endif +#endif + +#endif // QSYSTEMDETECTION_H diff --git a/src/corelib/global/qt_windows.h b/src/corelib/global/qt_windows.h index e4af46d939d..a63185b5a50 100644 --- a/src/corelib/global/qt_windows.h +++ b/src/corelib/global/qt_windows.h @@ -149,6 +149,6 @@ #ifndef LR_SHARED #define LR_SHARED 0 #endif -#endif // Q_WS_WINCE +#endif // Q_OS_WINCE #endif // QT_WINDOWS_H diff --git a/src/corelib/global/qtypeinfo.h b/src/corelib/global/qtypeinfo.h new file mode 100644 index 00000000000..6297b35b9ce --- /dev/null +++ b/src/corelib/global/qtypeinfo.h @@ -0,0 +1,216 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the QtCore module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QTYPEINFO_H +#define QTYPEINFO_H + +#include + +QT_BEGIN_HEADER +QT_BEGIN_NAMESPACE + +/* + QTypeInfo - type trait functionality + qIsDetached - data sharing functionality +*/ + +/* + The catch-all template. +*/ + +template inline bool qIsDetached(T &) { return true; } + +template +class QTypeInfo +{ +public: + enum { + isPointer = false, + isComplex = true, + isStatic = true, + isLarge = (sizeof(T)>sizeof(void*)), + isDummy = false, + sizeOf = sizeof(T) + }; +}; + +template<> +class QTypeInfo +{ +public: + enum { + isPointer = false, + isComplex = false, + isStatic = false, + isLarge = false, + isDummy = false, + sizeOf = 0 + }; +}; + +template +class QTypeInfo +{ +public: + enum { + isPointer = true, + isComplex = false, + isStatic = false, + isLarge = false, + isDummy = false, + sizeOf = sizeof(T*) + }; +}; + + +#define Q_DECLARE_MOVABLE_CONTAINER(CONTAINER) \ +template class CONTAINER; \ +template \ +class QTypeInfo< CONTAINER > \ +{ \ +public: \ + enum { \ + isPointer = false, \ + isComplex = true, \ + isStatic = false, \ + isLarge = (sizeof(CONTAINER) > sizeof(void*)), \ + isDummy = false, \ + sizeOf = sizeof(CONTAINER) \ + }; \ +}; + +Q_DECLARE_MOVABLE_CONTAINER(QList) +Q_DECLARE_MOVABLE_CONTAINER(QVector) +Q_DECLARE_MOVABLE_CONTAINER(QQueue) +Q_DECLARE_MOVABLE_CONTAINER(QStack) +Q_DECLARE_MOVABLE_CONTAINER(QLinkedList) +Q_DECLARE_MOVABLE_CONTAINER(QSet) + +#undef Q_DECLARE_MOVABLE_CONTAINER + +/* + Specialize a specific type with: + + Q_DECLARE_TYPEINFO(type, flags); + + where 'type' is the name of the type to specialize and 'flags' is + logically-OR'ed combination of the flags below. +*/ +enum { /* TYPEINFO flags */ + Q_COMPLEX_TYPE = 0, + Q_PRIMITIVE_TYPE = 0x1, + Q_STATIC_TYPE = 0, + Q_MOVABLE_TYPE = 0x2, + Q_DUMMY_TYPE = 0x4 +}; + +#define Q_DECLARE_TYPEINFO_BODY(TYPE, FLAGS) \ +class QTypeInfo \ +{ \ +public: \ + enum { \ + isComplex = (((FLAGS) & Q_PRIMITIVE_TYPE) == 0), \ + isStatic = (((FLAGS) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), \ + isLarge = (sizeof(TYPE)>sizeof(void*)), \ + isPointer = false, \ + isDummy = (((FLAGS) & Q_DUMMY_TYPE) != 0), \ + sizeOf = sizeof(TYPE) \ + }; \ + static inline const char *name() { return #TYPE; } \ +} + +#define Q_DECLARE_TYPEINFO(TYPE, FLAGS) \ +template<> \ +Q_DECLARE_TYPEINFO_BODY(TYPE, FLAGS) + + +/* + Specialize a shared type with: + + Q_DECLARE_SHARED(type); + + where 'type' is the name of the type to specialize. NOTE: shared + types must declare a 'bool isDetached(void) const;' member for this + to work. +*/ +#ifdef QT_NO_STL +#define Q_DECLARE_SHARED_STL(TYPE) +#else +#define Q_DECLARE_SHARED_STL(TYPE) \ +QT_END_NAMESPACE \ +namespace std { \ + template<> inline void swap(QT_PREPEND_NAMESPACE(TYPE) &value1, QT_PREPEND_NAMESPACE(TYPE) &value2) \ + { swap(value1.data_ptr(), value2.data_ptr()); } \ +} \ +QT_BEGIN_NAMESPACE +#endif + +#define Q_DECLARE_SHARED(TYPE) \ +template <> inline bool qIsDetached(TYPE &t) { return t.isDetached(); } \ +template <> inline void qSwap(TYPE &value1, TYPE &value2) \ +{ qSwap(value1.data_ptr(), value2.data_ptr()); } \ +Q_DECLARE_SHARED_STL(TYPE) + +/* + QTypeInfo primitive specializations +*/ +Q_DECLARE_TYPEINFO(bool, Q_PRIMITIVE_TYPE); +Q_DECLARE_TYPEINFO(char, Q_PRIMITIVE_TYPE); +Q_DECLARE_TYPEINFO(signed char, Q_PRIMITIVE_TYPE); +Q_DECLARE_TYPEINFO(uchar, Q_PRIMITIVE_TYPE); +Q_DECLARE_TYPEINFO(short, Q_PRIMITIVE_TYPE); +Q_DECLARE_TYPEINFO(ushort, Q_PRIMITIVE_TYPE); +Q_DECLARE_TYPEINFO(int, Q_PRIMITIVE_TYPE); +Q_DECLARE_TYPEINFO(uint, Q_PRIMITIVE_TYPE); +Q_DECLARE_TYPEINFO(long, Q_PRIMITIVE_TYPE); +Q_DECLARE_TYPEINFO(ulong, Q_PRIMITIVE_TYPE); +Q_DECLARE_TYPEINFO(qint64, Q_PRIMITIVE_TYPE); +Q_DECLARE_TYPEINFO(quint64, Q_PRIMITIVE_TYPE); +Q_DECLARE_TYPEINFO(float, Q_PRIMITIVE_TYPE); +Q_DECLARE_TYPEINFO(double, Q_PRIMITIVE_TYPE); +#ifndef Q_OS_DARWIN +Q_DECLARE_TYPEINFO(long double, Q_PRIMITIVE_TYPE); +#endif + +QT_END_NAMESPACE +QT_END_HEADER + +#endif // QTYPEINFO_H diff --git a/src/corelib/io/io.pri b/src/corelib/io/io.pri index e8a41b2d765..2df862e360a 100644 --- a/src/corelib/io/io.pri +++ b/src/corelib/io/io.pri @@ -76,8 +76,6 @@ win32 { SOURCES += io/qfilesystemwatcher_win.cpp HEADERS += io/qfilesystemwatcher_win_p.h - HEADERS += io/qwindowspipereader_p.h - SOURCES += io/qwindowspipereader.cpp HEADERS += io/qwindowspipewriter_p.h SOURCES += io/qwindowspipewriter.cpp SOURCES += io/qfilesystemengine_win.cpp @@ -88,10 +86,12 @@ win32 { SOURCES += io/qprocess_wince.cpp } else { HEADERS += \ - io/qwinoverlappedionotifier_p.h + io/qwinoverlappedionotifier_p.h \ + io/qwindowspipereader_p.h SOURCES += \ io/qprocess_win.cpp \ - io/qwinoverlappedionotifier.cpp + io/qwinoverlappedionotifier.cpp \ + io/qwindowspipereader.cpp } } else:unix|integrity { SOURCES += \ @@ -106,6 +106,8 @@ win32 { } macx-*: { SOURCES += io/qstandardpaths_mac.cpp + } else:standardpathsjson { + SOURCES += io/qstandardpaths_json.cpp } else { SOURCES += io/qstandardpaths_unix.cpp } diff --git a/src/corelib/io/qdir.cpp b/src/corelib/io/qdir.cpp index afd6620e654..220fc43b92f 100644 --- a/src/corelib/io/qdir.cpp +++ b/src/corelib/io/qdir.cpp @@ -861,19 +861,28 @@ bool QDir::cd(const QString &dirName) if (isAbsolutePath(dirName)) { newPath = cleanPath(dirName); } else { - if (isRoot()) { - if (dirName == QLatin1String("..")) - return false; + if (isRoot()) newPath = d->dirEntry.filePath(); - } else { + else newPath = d->dirEntry.filePath() % QLatin1Char('/'); - } - newPath += dirName; if (dirName.indexOf(QLatin1Char('/')) >= 0 || dirName == QLatin1String("..") || d->dirEntry.filePath() == QLatin1String(".")) { newPath = cleanPath(newPath); +#if defined (Q_OS_UNIX) + //After cleanPath() if path is "/.." or starts with "/../" it means trying to cd above root. + if (newPath.startsWith(QLatin1String("/../")) || newPath == QLatin1String("/..")) +#else + /* + cleanPath() already took care of replacing '\' with '/'. + We can't use startsWith here because the letter of the drive is unknown. + After cleanPath() if path is "[A-Z]:/.." or starts with "[A-Z]:/../" it means trying to cd above root. + */ + + if (newPath.midRef(1, 4) == QLatin1String(":/..") && (newPath.length() == 5 || newPath.at(5) == QLatin1Char('/'))) +#endif + return false; /* If newPath starts with .., we convert it to absolute to avoid infinite looping on diff --git a/src/corelib/io/qfile.cpp b/src/corelib/io/qfile.cpp index d7308c710df..58935fad3ba 100644 --- a/src/corelib/io/qfile.cpp +++ b/src/corelib/io/qfile.cpp @@ -130,6 +130,13 @@ QFilePrivate::openExternalFile(int flags, FILE *fh, QFile::FileHandleFlags handl #endif } +QAbstractFileEngine *QFilePrivate::engine() const +{ + if (!fileEngine) + fileEngine = QAbstractFileEngine::create(fileName); + return fileEngine; +} + inline bool QFilePrivate::ensureFlushed() const { // This function ensures that the write buffer has been flushed (const @@ -424,7 +431,8 @@ QFile::~QFile() */ QString QFile::fileName() const { - return fileEngine()->fileName(QAbstractFileEngine::DefaultName); + Q_D(const QFile); + return d->engine()->fileName(QAbstractFileEngine::DefaultName); } /*! @@ -569,8 +577,9 @@ QFile::setDecodingFunction(DecoderFn f) bool QFile::exists() const { + Q_D(const QFile); // 0x1000000 = QAbstractFileEngine::Refresh, forcing an update - return (fileEngine()->fileFlags(QAbstractFileEngine::FlagsMask + return (d->engine()->fileFlags(QAbstractFileEngine::FlagsMask | QAbstractFileEngine::FileFlag(0x1000000)) & QAbstractFileEngine::ExistsFlag); } @@ -608,7 +617,8 @@ QFile::exists(const QString &fileName) QString QFile::readLink() const { - return fileEngine()->fileName(QAbstractFileEngine::LinkName); + Q_D(const QFile); + return d->engine()->fileName(QAbstractFileEngine::LinkName); } /*! @@ -654,7 +664,7 @@ QFile::remove() unsetError(); close(); if(error() == QFile::NoError) { - if(fileEngine()->remove()) { + if (d->engine()->remove()) { unsetError(); return true; } @@ -709,7 +719,7 @@ QFile::rename(const QString &newName) unsetError(); close(); if(error() == QFile::NoError) { - if (fileEngine()->rename(newName)) { + if (d->engine()->rename(newName)) { unsetError(); // engine was able to handle the new name so we just reset it d->fileEngine->setFileName(newName); @@ -806,7 +816,7 @@ QFile::link(const QString &linkName) return false; } QFileInfo fi(linkName); - if(fileEngine()->link(fi.absoluteFilePath())) { + if (d->engine()->link(fi.absoluteFilePath())) { unsetError(); return true; } @@ -861,7 +871,7 @@ QFile::copy(const QString &newName) unsetError(); close(); if(error() == QFile::NoError) { - if(fileEngine()->copy(newName)) { + if (d->engine()->copy(newName)) { unsetError(); return true; } else { @@ -996,7 +1006,7 @@ bool QFile::open(OpenMode mode) } // QIODevice provides the buffering, so there's no need to request it from the file engine. - if (fileEngine()->open(mode | QIODevice::Unbuffered)) { + if (d->engine()->open(mode | QIODevice::Unbuffered)) { QIODevice::open(mode); if (mode & Append) seek(size()); @@ -1271,7 +1281,7 @@ QFile::handle() const uchar *QFile::map(qint64 offset, qint64 size, MemoryMapFlags flags) { Q_D(QFile); - if (fileEngine() + if (d->engine() && d->fileEngine->supportsExtension(QAbstractFileEngine::MapExtension)) { unsetError(); uchar *address = d->fileEngine->map(offset, size, flags); @@ -1293,7 +1303,7 @@ uchar *QFile::map(qint64 offset, qint64 size, MemoryMapFlags flags) bool QFile::unmap(uchar *address) { Q_D(QFile); - if (fileEngine() + if (d->engine() && d->fileEngine->supportsExtension(QAbstractFileEngine::UnMapExtension)) { unsetError(); bool success = d->fileEngine->unmap(address); @@ -1320,7 +1330,7 @@ QFile::resize(qint64 sz) Q_D(QFile); if (!d->ensureFlushed()) return false; - fileEngine(); + d->engine(); if (isOpen() && d->fileEngine->pos() > sz) seek(sz); if(d->fileEngine->setSize(sz)) { @@ -1360,7 +1370,8 @@ QFile::resize(const QString &fileName, qint64 sz) QFile::Permissions QFile::permissions() const { - QAbstractFileEngine::FileFlags perms = fileEngine()->fileFlags(QAbstractFileEngine::PermsMask) & QAbstractFileEngine::PermsMask; + Q_D(const QFile); + QAbstractFileEngine::FileFlags perms = d->engine()->fileFlags(QAbstractFileEngine::PermsMask) & QAbstractFileEngine::PermsMask; return QFile::Permissions((int)perms); //ewww } @@ -1389,7 +1400,7 @@ bool QFile::setPermissions(Permissions permissions) { Q_D(QFile); - if(fileEngine()->setPermissions(permissions)) { + if (d->engine()->setPermissions(permissions)) { unsetError(); return true; } @@ -1490,7 +1501,7 @@ qint64 QFile::size() const Q_D(const QFile); if (!d->ensureFlushed()) return 0; - d->cachedSize = fileEngine()->size(); + d->cachedSize = d->engine()->size(); return d->cachedSize; } @@ -1730,18 +1741,6 @@ QFile::writeData(const char *data, qint64 len) return len; } -/*! - \internal - Returns the QIOEngine for this QFile object. -*/ -QAbstractFileEngine *QFile::fileEngine() const -{ - Q_D(const QFile); - if(!d->fileEngine) - d->fileEngine = QAbstractFileEngine::create(d->fileName); - return d->fileEngine; -} - /*! Returns the file error status. diff --git a/src/corelib/io/qfile.h b/src/corelib/io/qfile.h index bc278cf6000..bf7290dda21 100644 --- a/src/corelib/io/qfile.h +++ b/src/corelib/io/qfile.h @@ -54,8 +54,7 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE - -class QAbstractFileEngine; +class QTemporaryFile; class QFilePrivate; class Q_CORE_EXPORT QFile : public QIODevice @@ -174,8 +173,6 @@ public: uchar *map(qint64 offset, qint64 size, MemoryMapFlags flags = NoOptions); bool unmap(uchar *address); - virtual QAbstractFileEngine *fileEngine() const; - protected: #ifdef QT_NO_QOBJECT QFile(QFilePrivate &dd); @@ -188,6 +185,7 @@ protected: qint64 readLineData(char *data, qint64 maxlen); private: + friend class QTemporaryFile; Q_DISABLE_COPY(QFile) }; diff --git a/src/corelib/io/qfile_p.h b/src/corelib/io/qfile_p.h index b932627ec06..4a637d44a89 100644 --- a/src/corelib/io/qfile_p.h +++ b/src/corelib/io/qfile_p.h @@ -59,9 +59,12 @@ QT_BEGIN_NAMESPACE +class QTemporaryFile; + class QFilePrivate : public QIODevicePrivate { Q_DECLARE_PUBLIC(QFile) + friend class QTemporaryFile; protected: QFilePrivate(); @@ -70,6 +73,8 @@ protected: bool openExternalFile(int flags, int fd, QFile::FileHandleFlags handleFlags); bool openExternalFile(int flags, FILE *fh, QFile::FileHandleFlags handleFlags); + virtual QAbstractFileEngine *engine() const; + QString fileName; mutable QAbstractFileEngine *fileEngine; diff --git a/src/corelib/io/qfileinfo.cpp b/src/corelib/io/qfileinfo.cpp index 7277a7a0e4f..a7fb0fb6c7b 100644 --- a/src/corelib/io/qfileinfo.cpp +++ b/src/corelib/io/qfileinfo.cpp @@ -917,6 +917,29 @@ bool QFileInfo::isHidden() const return d->getFileFlags(QAbstractFileEngine::HiddenFlag); } +/*! + \since 5.0 + Returns true if the file path can be used directly with native APIs. + Returns false if the file is otherwise supported by a virtual file system + inside Qt, such as \l{the Qt Resource System}. + + \bold{Note:} Native paths may still require conversion of path separators + and character encoding, depending on platform and input requirements of the + native API. + + \sa QDir::toNativeSeparators(), QFile::encodeName(), filePath(), + absoluteFilePath(), canonicalFilePath() +*/ +bool QFileInfo::isNativePath() const +{ + Q_D(const QFileInfo); + if (d->isDefaultConstructed) + return false; + if (d->fileEngine == 0) + return true; + return d->getFileFlags(QAbstractFileEngine::LocalDiskFlag); +} + /*! Returns true if this object points to a file or to a symbolic link to a file. Returns false if the diff --git a/src/corelib/io/qfileinfo.h b/src/corelib/io/qfileinfo.h index bc9b057fb53..0f43ebd4394 100644 --- a/src/corelib/io/qfileinfo.h +++ b/src/corelib/io/qfileinfo.h @@ -103,6 +103,7 @@ public: bool isWritable() const; bool isExecutable() const; bool isHidden() const; + bool isNativePath() const; bool isRelative() const; inline bool isAbsolute() const { return !isRelative(); } diff --git a/src/corelib/io/qfilesystemengine_p.h b/src/corelib/io/qfilesystemengine_p.h index 6d60d77c337..17413d9c76b 100644 --- a/src/corelib/io/qfilesystemengine_p.h +++ b/src/corelib/io/qfilesystemengine_p.h @@ -63,7 +63,14 @@ QT_BEGIN_NAMESPACE class QFileSystemEngine { public: - static bool isCaseSensitive(); + static bool isCaseSensitive() + { +#ifndef Q_OS_WIN + return true; +#else + return false; +#endif + } static QFileSystemEntry getLinkTarget(const QFileSystemEntry &link, QFileSystemMetaData &data); static QFileSystemEntry canonicalName(const QFileSystemEntry &entry, QFileSystemMetaData &data); diff --git a/src/corelib/io/qfilesystemengine_unix.cpp b/src/corelib/io/qfilesystemengine_unix.cpp index 52621eb23ff..8d08bb59441 100644 --- a/src/corelib/io/qfilesystemengine_unix.cpp +++ b/src/corelib/io/qfilesystemengine_unix.cpp @@ -87,11 +87,6 @@ static inline bool _q_isMacHidden(const char *nativePath) } #endif -bool QFileSystemEngine::isCaseSensitive() -{ - return true; -} - //static QFileSystemEntry QFileSystemEngine::getLinkTarget(const QFileSystemEntry &link, QFileSystemMetaData &data) { @@ -174,7 +169,7 @@ QFileSystemEntry QFileSystemEngine::canonicalName(const QFileSystemEntry &entry, if (entry.isEmpty() || entry.isRoot()) return entry; -#if !defined(Q_OS_MAC) && _POSIX_VERSION < 200809L +#if !defined(Q_OS_MAC) && !defined(Q_OS_QNX) && _POSIX_VERSION < 200809L // realpath(X,0) is not supported Q_UNUSED(data); return QFileSystemEntry(slowCanonicalized(absoluteName(entry).filePath())); diff --git a/src/corelib/io/qfilesystemengine_win.cpp b/src/corelib/io/qfilesystemengine_win.cpp index 6ebaadad7ed..b04018ca0ff 100644 --- a/src/corelib/io/qfilesystemengine_win.cpp +++ b/src/corelib/io/qfilesystemengine_win.cpp @@ -472,11 +472,6 @@ void QFileSystemEngine::clearWinStatData(QFileSystemMetaData &data) data.lastWriteTime_ = FILETIME(); } -bool QFileSystemEngine::isCaseSensitive() -{ - return false; -} - //static QFileSystemEntry QFileSystemEngine::getLinkTarget(const QFileSystemEntry &link, QFileSystemMetaData &data) diff --git a/src/corelib/io/qiodevice.cpp b/src/corelib/io/qiodevice.cpp index 0ad1a91d6c3..3d9391ebaa7 100644 --- a/src/corelib/io/qiodevice.cpp +++ b/src/corelib/io/qiodevice.cpp @@ -118,7 +118,7 @@ void debugBinaryString(const char *data, qint64 maxlen) */ QIODevicePrivate::QIODevicePrivate() : openMode(QIODevice::NotOpen), buffer(QIODEVICE_BUFFERSIZE), - pos(0), devicePos(0) + pos(0), devicePos(0), seqDumpPos(0) , pPos(&pos), pDevicePos(&devicePos) , baseReadLineDataCalled(false) , firstRead(true) @@ -562,6 +562,7 @@ void QIODevice::close() d->openMode = NotOpen; d->errorString.clear(); d->pos = 0; + d->seqDumpPos = 0; d->buffer.clear(); d->firstRead = true; } diff --git a/src/corelib/io/qprocess.cpp b/src/corelib/io/qprocess.cpp index 0a0097c8877..7a81313fa06 100644 --- a/src/corelib/io/qprocess.cpp +++ b/src/corelib/io/qprocess.cpp @@ -520,6 +520,11 @@ void QProcessPrivate::Channel::clear() setWorkingDirectory(). By default, processes are run in the current working directory of the calling process. + \note On QNX, setting the working directory may cause all + application threads, with the exception of the QProcess caller + thread, to temporarily freeze during the spawning process, + owing to a limitation in the operating system. + \section1 Synchronous Process API QProcess provides a set of functions which allow it to be used @@ -1433,6 +1438,9 @@ QString QProcess::workingDirectory() const process in this directory. The default behavior is to start the process in the working directory of the calling process. + \note On QNX, this may cause all application threads to + temporarily freeze. + \sa workingDirectory(), start() */ void QProcess::setWorkingDirectory(const QString &dir) @@ -1755,7 +1763,7 @@ void QProcess::setProcessState(ProcessState state) exit(). \warning This function is called by QProcess on Unix and Mac OS X - only. On Windows, it is not called. + only. On Windows and QNX, it is not called. */ void QProcess::setupChildProcess() { @@ -2149,6 +2157,9 @@ int QProcess::execute(const QString &program) The process will be started in the directory \a workingDirectory. + \note On QNX, this may cause all application threads to + temporarily freeze. + If the function is successful then *\a pid is set to the process identifier of the started process. */ diff --git a/src/corelib/io/qprocess_p.h b/src/corelib/io/qprocess_p.h index 236e716b340..311b5ce8458 100644 --- a/src/corelib/io/qprocess_p.h +++ b/src/corelib/io/qprocess_p.h @@ -304,8 +304,10 @@ public: #endif void startProcess(); -#if defined(Q_OS_UNIX) +#if defined(Q_OS_UNIX) && !defined(Q_OS_QNX) void execChild(const char *workingDirectory, char **path, char **argv, char **envp); +#elif defined(Q_OS_QNX) + pid_t spawnChild(const char *workingDirectory, char **argv, char **envp); #endif bool processStarted(); void terminateProcess(); diff --git a/src/corelib/io/qprocess_unix.cpp b/src/corelib/io/qprocess_unix.cpp index 9e35978c772..2da2913c6f3 100644 --- a/src/corelib/io/qprocess_unix.cpp +++ b/src/corelib/io/qprocess_unix.cpp @@ -48,6 +48,7 @@ #include "qstring.h" #include + /* Returns a human readable representation of the first \a len characters in \a data. @@ -105,6 +106,10 @@ QT_END_NAMESPACE #include #include #include +#ifdef Q_OS_QNX +#include +#include +#endif QT_BEGIN_NAMESPACE @@ -538,16 +543,6 @@ static char **_q_dupEnvironment(const QProcessEnvironmentPrivate::Hash &environm return envp; } -// under QNX RTOS we have to use vfork() when multithreading -inline pid_t qt_fork() -{ -#if defined(Q_OS_QNX) - return vfork(); -#else - return fork(); -#endif -} - void QProcessPrivate::startProcess() { Q_Q(QProcess); @@ -664,8 +659,12 @@ void QProcessPrivate::startProcess() // Start the process manager, and fork off the child process. processManager()->lock(); - pid_t childPid = qt_fork(); +#if defined(Q_OS_QNX) + pid_t childPid = spawnChild(workingDirPtr, argv, envp); +#else + pid_t childPid = fork(); int lastForkErrno = errno; +#endif if (childPid != 0) { // Clean up duplicated memory. free(dupProgramName); @@ -679,10 +678,22 @@ void QProcessPrivate::startProcess() delete [] envp; delete [] path; } + + // This is not a valid check under QNX, because the semantics are + // different. While under other platforms where fork() may succeed and exec() can still fail, + // causing the childPid to hold a valid value (and thus evaluating the + // following if to false), and then signaling the error via + // childStartedPipe, under QNX on the other hand, spawn() return value will be assigned + // to childPid (which will be -1 in case of failure). This will force + // QProcess to cleanup, instead of signaling the error via + // childStartedPipe. Since it will invalidade the pipes, functions like + // QProcess::waitForStarted() will fail, for childStartedPipe will be + // '-1' and mess with the select() calls. +#if !defined(Q_OS_QNX) if (childPid < 0) { // Cleanup, report error and return #if defined (QPROCESS_DEBUG) - qDebug("qt_fork failed: %s", qPrintable(qt_error_string(lastForkErrno))); + qDebug("fork failed: %s", qPrintable(qt_error_string(lastForkErrno))); #endif processManager()->unlock(); q->setProcessState(QProcess::NotRunning); @@ -698,6 +709,7 @@ void QProcessPrivate::startProcess() execChild(workingDirPtr, path, argv, envp); ::_exit(-1); } +#endif // Register the child. In the mean time, we can get a SIGCHLD, so we need // to keep the lock held to avoid a race to catch the child. @@ -735,6 +747,87 @@ void QProcessPrivate::startProcess() ::fcntl(stderrChannel.pipe[0], F_SETFL, ::fcntl(stderrChannel.pipe[0], F_GETFL) | O_NONBLOCK); } +#if defined(Q_OS_QNX) +static pid_t doSpawn(int fd_count, int fd_map[], char **argv, char **envp, + const char *workingDir, bool spawn_detached) +{ + // A multi threaded QNX Process can't fork so we call spawn() instead. + + struct inheritance inherit; + memset(&inherit, 0, sizeof(inherit)); + inherit.flags |= SPAWN_SETSID; + inherit.flags |= SPAWN_CHECK_SCRIPT; + if (spawn_detached) + inherit.flags |= SPAWN_NOZOMBIE; + inherit.flags |= SPAWN_SETSIGDEF; + sigaddset(&inherit.sigdefault, SIGPIPE); // reset the signal that we ignored + + // enter the working directory + const char *oldWorkingDir = 0; + char buff[PATH_MAX + 1]; + + if (workingDir) { + //we need to freeze everyone in order to avoid race conditions with //chdir(). + if (ThreadCtl(_NTO_TCTL_THREADS_HOLD, 0) == -1) + qWarning("ThreadCtl(): cannot hold threads: %s", qPrintable(qt_error_string(errno))); + + oldWorkingDir = QT_GETCWD(buff, PATH_MAX + 1); + QT_CHDIR(workingDir); + } + + pid_t childPid; + EINTR_LOOP(childPid, ::spawn(argv[0], fd_count, fd_map, &inherit, argv, envp)); + if (childPid == -1) { + inherit.flags |= SPAWN_SEARCH_PATH; + EINTR_LOOP(childPid, ::spawn(argv[0], fd_count, fd_map, &inherit, argv, envp)); + } + + if (oldWorkingDir) { + QT_CHDIR(oldWorkingDir); + + if (ThreadCtl(_NTO_TCTL_THREADS_CONT, 0) == -1) + qFatal("ThreadCtl(): cannot resume threads: %s", qPrintable(qt_error_string(errno))); + } + + return childPid; +} + +pid_t QProcessPrivate::spawnChild(const char *workingDir, char **argv, char **envp) +{ + const int fd_count = 3; + int fd_map[fd_count]; + switch (processChannelMode) { + case QProcess::ForwardedChannels: + fd_map[0] = stdinChannel.pipe[0]; + fd_map[1] = QT_FILENO(stdout); + fd_map[2] = QT_FILENO(stderr); + break; + case QProcess::MergedChannels: + fd_map[0] = stdinChannel.pipe[0]; + fd_map[1] = stdoutChannel.pipe[1]; + fd_map[2] = stdoutChannel.pipe[1]; + break; + case QProcess::SeparateChannels: + fd_map[0] = stdinChannel.pipe[0]; + fd_map[1] = stdoutChannel.pipe[1]; + fd_map[2] = stderrChannel.pipe[1]; + break; + } + + pid_t childPid = doSpawn(fd_count, fd_map, argv, envp, workingDir, false); + + if (childPid == -1) { + QString error = qt_error_string(errno); + qt_safe_write(childStartedPipe[1], error.data(), error.length() * sizeof(QChar)); + qt_safe_close(childStartedPipe[1]); + childStartedPipe[1] = -1; + } + + return childPid; +} + +#else + void QProcessPrivate::execChild(const char *workingDir, char **path, char **argv, char **envp) { ::signal(SIGPIPE, SIG_DFL); // reset the signal that we ignored @@ -797,6 +890,7 @@ void QProcessPrivate::execChild(const char *workingDir, char **path, char **argv qt_safe_close(childStartedPipe[1]); childStartedPipe[1] = -1; } +#endif bool QProcessPrivate::processStarted() { @@ -1213,6 +1307,42 @@ void QProcessPrivate::_q_notified() { } +#if defined(Q_OS_QNX) +bool QProcessPrivate::startDetached(const QString &program, const QStringList &arguments, const QString &workingDirectory, qint64 *pid) +{ + const int fd_count = 3; + int fd_map[fd_count] = { QT_FILENO(stdin), QT_FILENO(stdout), QT_FILENO(stderr) }; + + QList enc_args; + enc_args.append(QFile::encodeName(program)); + for (int i = 0; i < arguments.size(); ++i) + enc_args.append(arguments.at(i).toLocal8Bit()); + + const int argc = enc_args.size(); + QScopedArrayPointer raw_argv(new char*[argc + 1]); + for (int i = 0; i < argc; ++i) + raw_argv[i] = const_cast(enc_args.at(i).data()); + raw_argv[argc] = 0; + + char **envp = 0; // inherit environment + + // Encode the working directory if it's non-empty, otherwise just pass 0. + const char *workingDirPtr = 0; + QByteArray encodedWorkingDirectory; + if (!workingDirectory.isEmpty()) { + encodedWorkingDirectory = QFile::encodeName(workingDirectory); + workingDirPtr = encodedWorkingDirectory.constData(); + } + + pid_t childPid = doSpawn(fd_count, fd_map, raw_argv.data(), envp, workingDirPtr, true); + if (pid && childPid != -1) + *pid = childPid; + + return childPid != -1; +} + +#else + bool QProcessPrivate::startDetached(const QString &program, const QStringList &arguments, const QString &workingDirectory, qint64 *pid) { processManager()->start(); @@ -1226,7 +1356,7 @@ bool QProcessPrivate::startDetached(const QString &program, const QStringList &a int pidPipe[2]; qt_safe_pipe(pidPipe); - pid_t childPid = qt_fork(); + pid_t childPid = fork(); if (childPid == 0) { struct sigaction noaction; memset(&noaction, 0, sizeof(noaction)); @@ -1238,7 +1368,7 @@ bool QProcessPrivate::startDetached(const QString &program, const QStringList &a qt_safe_close(startedPipe[0]); qt_safe_close(pidPipe[0]); - pid_t doubleForkPid = qt_fork(); + pid_t doubleForkPid = fork(); if (doubleForkPid == 0) { qt_safe_close(pidPipe[1]); @@ -1326,6 +1456,7 @@ bool QProcessPrivate::startDetached(const QString &program, const QStringList &a qt_safe_close(pidPipe[0]); return success; } +#endif void QProcessPrivate::initializeProcessManager() { diff --git a/src/corelib/io/qprocess_win.cpp b/src/corelib/io/qprocess_win.cpp index 51f34a61a6d..a52fd46c97f 100644 --- a/src/corelib/io/qprocess_win.cpp +++ b/src/corelib/io/qprocess_win.cpp @@ -85,10 +85,13 @@ static void qt_create_pipe(Q_PIPE *pipe, bool isInputPipe) // ### Replace the call to qrand() with a secure version, once we have it in Qt. swprintf(pipeName, L"\\\\.\\pipe\\qt-%X", qrand()); + DWORD dwPipeFlags = PIPE_TYPE_BYTE | PIPE_WAIT; + if (QSysInfo::windowsVersion() >= QSysInfo::WV_VISTA) + dwPipeFlags |= PIPE_REJECT_REMOTE_CLIENTS; const DWORD dwPipeBufferSize = 1024 * 1024; hRead = CreateNamedPipe(pipeName, PIPE_ACCESS_INBOUND | FILE_FLAG_OVERLAPPED, - PIPE_TYPE_BYTE | PIPE_WAIT | PIPE_REJECT_REMOTE_CLIENTS, + dwPipeFlags, 1, // only one pipe instance 0, // output buffer size dwPipeBufferSize, // input buffer size diff --git a/src/corelib/io/qprocess_wince.cpp b/src/corelib/io/qprocess_wince.cpp index 8ae1d11c80a..88d5a716575 100644 --- a/src/corelib/io/qprocess_wince.cpp +++ b/src/corelib/io/qprocess_wince.cpp @@ -41,6 +41,7 @@ #include "qprocess.h" #include "qprocess_p.h" +#include "qwindowspipewriter_p.h" #include #include @@ -48,6 +49,7 @@ #include #include #include +#include #ifndef QT_NO_PROCESS diff --git a/src/corelib/io/qstandardpaths_json.cpp b/src/corelib/io/qstandardpaths_json.cpp new file mode 100644 index 00000000000..52b194bea82 --- /dev/null +++ b/src/corelib/io/qstandardpaths_json.cpp @@ -0,0 +1,184 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the QtGui module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +#include "qstandardpaths.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +#ifndef QT_NO_STANDARDPATHS + +QT_BEGIN_NAMESPACE + +class QStandardPathsPrivate { +public: + QStandardPathsPrivate() : object(0){} + ~QStandardPathsPrivate() { delete object.load(); } + QAtomicPointer object; +}; + +Q_GLOBAL_STATIC(QStandardPathsPrivate, configCache); + +QString QStandardPaths::writableLocation(StandardLocation type) +{ + switch (type) { + case HomeLocation: + return QDir::homePath(); // set $HOME + case TempLocation: + return QDir::tempPath(); // set $TMPDIR + default: + break; + } + + QJsonObject * localConfigObject = configCache()->object.loadAcquire(); + if (localConfigObject == 0) { + QString configHome = QFile::decodeName(qgetenv("PATH_CONFIG_HOME")); + if (configHome.isEmpty()) + configHome = QLatin1String("/etc/user-dirs.json"); + QFile file(configHome); + if (file.open(QIODevice::ReadOnly)) { + QJsonDocument configDoc = QJsonDocument::fromJson(file.readAll()); + if (configDoc.isNull()) + return QString(); + + QJsonObject myConfigObject = configDoc.object(); + localConfigObject = new QJsonObject(myConfigObject); + if (!configCache()->object.testAndSetRelease(0, localConfigObject)) { + delete localConfigObject; + localConfigObject = configCache()->object.loadAcquire(); + } + } else { + return QString(); + } + } + + QLatin1String key(""); + + switch (type) { + case DocumentsLocation: + key = QLatin1String("DOCUMENTS"); + break; + case PicturesLocation: + key = QLatin1String("PICTURES"); + break; + case MusicLocation: + key = QLatin1String("MUSIC"); + break; + case MoviesLocation: + key = QLatin1String("VIDEOS"); + break; + case DownloadLocation: + key = QLatin1String("DOWNLOAD"); + break; + case ApplicationsLocation: + key = QLatin1String("APPLICATIONS"); + break; + case CacheLocation: + key = QLatin1String("CACHE"); + break; + case GenericCacheLocation: + key = QLatin1String("GENERIC_CACHE"); + break; + case DataLocation: + key = QLatin1String("DATA"); + break; + case GenericDataLocation: + key = QLatin1String("GENERIC_DATA"); + break; + case ConfigLocation: + key = QLatin1String("CONFIG"); + break; + case RuntimeLocation: + key = QLatin1String("RUNTIME"); + break; + case DesktopLocation: + key = QLatin1String("DESKTOP"); + break; + case FontsLocation: + key = QLatin1String("FONTS"); + break; + + default: + return QString(); + } + + QJsonObject::const_iterator iter = localConfigObject->constFind(key); + if (iter == localConfigObject->constEnd() || ! iter.value().isString()) + return QString(); + QString value = iter.value().toString(); + + // optimize for a common case + value.replace(QLatin1String("${HOME}"), QFile::decodeName(qgetenv("HOME"))); + + // Do ${} format environment variable substitution if necessary + if (!value.isEmpty() && value.contains(QLatin1String("${"))) { + QRegExp varRegExp(QLatin1String("\\$\\{([^\\}]*)\\}")); + while (value.contains(varRegExp)) { + QString replacement = + QFile::decodeName(qgetenv(varRegExp.cap(1).toAscii().data())); + value.replace(varRegExp.cap(0), replacement); + } + } + return value; +} + +QStringList QStandardPaths::standardLocations(StandardLocation type) +{ + QStringList dirs; + const QString localDir = writableLocation(type); + dirs.prepend(localDir); + return dirs; +} + +QString QStandardPaths::displayName(StandardLocation type) +{ + Q_UNUSED(type); + return QString(); +} + +QT_END_NAMESPACE + +#endif // QT_NO_STANDARDPATHS diff --git a/src/corelib/io/qstandardpaths_unix.cpp b/src/corelib/io/qstandardpaths_unix.cpp index 6057c26e0d9..62c846738e2 100644 --- a/src/corelib/io/qstandardpaths_unix.cpp +++ b/src/corelib/io/qstandardpaths_unix.cpp @@ -137,7 +137,7 @@ QString QStandardPaths::writableLocation(StandardLocation type) if (xdgConfigHome.isEmpty()) xdgConfigHome = QDir::homePath() + QLatin1String("/.config"); QFile file(xdgConfigHome + QLatin1String("/user-dirs.dirs")); - if (file.exists() && file.open(QIODevice::ReadOnly)) { + if (file.open(QIODevice::ReadOnly)) { QHash lines; QTextStream stream(&file); // Only look for lines like: XDG_DESKTOP_DIR="$HOME/Desktop" diff --git a/src/corelib/io/qstandardpaths_win.cpp b/src/corelib/io/qstandardpaths_win.cpp index 310b1eb40d9..848dd448eb9 100644 --- a/src/corelib/io/qstandardpaths_win.cpp +++ b/src/corelib/io/qstandardpaths_win.cpp @@ -51,7 +51,6 @@ #if !defined(Q_OS_WINCE) # include #else -# include # if !defined(STANDARDSHELL_UI_MODEL) # include # endif @@ -177,7 +176,7 @@ QStringList QStandardPaths::standardLocations(StandardLocation type) // type-specific handling goes here -#ifndef Q_WS_WINCE +#ifndef Q_OS_WINCE static GetSpecialFolderPath SHGetSpecialFolderPath = resolveGetSpecialFolderPath(); if (SHGetSpecialFolderPath) { wchar_t path[MAX_PATH]; diff --git a/src/corelib/io/qtemporarydir.cpp b/src/corelib/io/qtemporarydir.cpp index 53a48609e59..f8cd2e780e8 100644 --- a/src/corelib/io/qtemporarydir.cpp +++ b/src/corelib/io/qtemporarydir.cpp @@ -52,9 +52,8 @@ #endif #include // mkdtemp -#ifdef Q_OS_WIN -#include -#include +#if defined(Q_OS_QNX) || defined(Q_OS_WIN) +#include #endif QT_BEGIN_NAMESPACE @@ -95,7 +94,7 @@ static QString defaultTemplateName() return QDir::tempPath() + QLatin1Char('/') + baseName + QLatin1String("-XXXXXX"); } -#ifdef Q_OS_QNX +#if defined(Q_OS_QNX ) || defined(Q_OS_WIN) static char *mkdtemp(char *templateName) { static const char letters[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; @@ -123,33 +122,26 @@ static char *mkdtemp(char *templateName) v /= 62; XXXXXX[5] = letters[v % 62]; - if (!mkdir(templateName, 0700)) - return templateName; - } + QString templateNameStr = QFile::decodeName(templateName); + QFileSystemEntry fileSystemEntry(templateNameStr); + if (QFileSystemEngine::createDirectory(fileSystemEntry, false)) { + QSystemError error; + QFileSystemEngine::setPermissions(fileSystemEntry, + QFile::ReadOwner | + QFile::WriteOwner | + QFile::ExeOwner, error); + if (error.error() != 0) + continue; + return templateName; + } + } return 0; } #endif void QTemporaryDirPrivate::create(const QString &templateName) { -#ifdef Q_OS_WIN - QString buffer = templateName; - // Windows' mktemp believes 26 temp files per process ought to be enough for everyone (!) - // Let's add a few random chars then, before the XXXXXX template. - for (int i = 0 ; i < 4 ; ++i) - buffer += QChar((qrand() & 0xffff) % (26) + 'A'); - if (!buffer.endsWith(QLatin1String("XXXXXX"))) - buffer += QLatin1String("XXXXXX"); - QFileSystemEntry baseEntry(buffer); - QFileSystemEntry::NativePath basePath = baseEntry.nativeFilePath(); - wchar_t* array = (wchar_t*)basePath.utf16(); - if (_wmktemp(array) && ::CreateDirectory(array, 0)) { - success = true; - QFileSystemEntry entry(QString::fromWCharArray(array), QFileSystemEntry::FromNativePath()); - path = entry.filePath(); - } -#else QByteArray buffer = QFile::encodeName(templateName); if (!buffer.endsWith("XXXXXX")) buffer += "XXXXXX"; @@ -157,7 +149,6 @@ void QTemporaryDirPrivate::create(const QString &templateName) success = true; path = QFile::decodeName(buffer.constData()); } -#endif } //************* QTemporaryDir diff --git a/src/corelib/io/qtemporaryfile.cpp b/src/corelib/io/qtemporaryfile.cpp index b80ba6eee15..75681dadffd 100644 --- a/src/corelib/io/qtemporaryfile.cpp +++ b/src/corelib/io/qtemporaryfile.cpp @@ -407,6 +407,8 @@ protected: QTemporaryFilePrivate(); ~QTemporaryFilePrivate(); + QAbstractFileEngine *engine() const; + bool autoRemove; QString templateName; }; @@ -419,6 +421,17 @@ QTemporaryFilePrivate::~QTemporaryFilePrivate() { } +QAbstractFileEngine *QTemporaryFilePrivate::engine() const +{ + if (!fileEngine) { + if (fileName.isEmpty()) + fileEngine = new QTemporaryFileEngine(templateName); + else + fileEngine = new QTemporaryFileEngine(fileName, false); + } + return fileEngine; +} + static QString defaultTemplateName() { QString baseName; @@ -640,7 +653,7 @@ QString QTemporaryFile::fileName() const Q_D(const QTemporaryFile); if(d->fileName.isEmpty()) return QString(); - return fileEngine()->fileName(QAbstractFileEngine::DefaultName); + return d->engine()->fileName(QAbstractFileEngine::DefaultName); } /*! @@ -692,7 +705,7 @@ void QTemporaryFile::setFileTemplate(const QString &name) */ QTemporaryFile *QTemporaryFile::createLocalFile(QFile &file) { - if (QAbstractFileEngine *engine = file.fileEngine()) { + if (QAbstractFileEngine *engine = file.d_func()->engine()) { if(engine->fileFlags(QAbstractFileEngine::FlagsMask) & QAbstractFileEngine::LocalDiskFlag) return 0; //local already //cache @@ -725,22 +738,6 @@ QTemporaryFile *QTemporaryFile::createLocalFile(QFile &file) return 0; } -/*! - \internal -*/ - -QAbstractFileEngine *QTemporaryFile::fileEngine() const -{ - Q_D(const QTemporaryFile); - if(!d->fileEngine) { - if (d->fileName.isEmpty()) - d->fileEngine = new QTemporaryFileEngine(d->templateName); - else - d->fileEngine = new QTemporaryFileEngine(d->fileName, false); - } - return d->fileEngine; -} - /*! \reimp @@ -752,7 +749,7 @@ bool QTemporaryFile::open(OpenMode flags) { Q_D(QTemporaryFile); if (!d->fileName.isEmpty()) { - if (static_cast(fileEngine())->isReallyOpen()) { + if (static_cast(d->engine())->isReallyOpen()) { setOpenMode(flags); return true; } diff --git a/src/corelib/io/qtemporaryfile.h b/src/corelib/io/qtemporaryfile.h index 8b14e5a14a2..e7665692933 100644 --- a/src/corelib/io/qtemporaryfile.h +++ b/src/corelib/io/qtemporaryfile.h @@ -88,8 +88,6 @@ public: { QFile file(fileName); return createLocalFile(file); } static QTemporaryFile *createLocalFile(QFile &file); - virtual QAbstractFileEngine *fileEngine() const; - protected: bool open(OpenMode flags); diff --git a/src/corelib/io/qtextstream.cpp b/src/corelib/io/qtextstream.cpp index 7f378662262..a6d58c760f5 100644 --- a/src/corelib/io/qtextstream.cpp +++ b/src/corelib/io/qtextstream.cpp @@ -66,11 +66,6 @@ static const int QTEXTSTREAM_BUFFERSIZE = 16384; \snippet doc/src/snippets/code/src_corelib_io_qtextstream.cpp 1 - Note that you cannot use QTextStream::atEnd(), which returns true when you - have reached the end of the data stream, with stdin. The reason for this is - that as long as stdin doesn't give any input to the QTextStream, \c atEnd() - will return true even if the stdin is open and waiting for more characters. - Besides using QTextStream's constructors, you can also set the device or string QTextStream operates on by calling setDevice() or setString(). You can seek to a position by calling seek(), and diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp index d74e7b81214..eeeca1bf77f 100644 --- a/src/corelib/io/qurl.cpp +++ b/src/corelib/io/qurl.cpp @@ -4176,6 +4176,7 @@ QString QUrlPrivate::createErrorString() Constructs a URL by parsing \a url. \a url is assumed to be in human readable representation, with no percent encoding. QUrl will automatically percent encode all characters that are not allowed in a URL. + The default parsing mode is TolerantMode. The parsing mode \a parsingMode is used for parsing \a url. @@ -5678,9 +5679,8 @@ static QString toPrettyPercentEncoding(const QString &input, bool forFragment) } /*! - Returns the human-displayable string representation of the - URL. The output can be customized by passing flags with \a - options. + Returns a string representation of the URL. + The output can be customized by passing flags with \a options. The resulting QString can be passed back to a QUrl later on. @@ -5733,9 +5733,8 @@ QString QUrl::toString(FormattingOptions options) const } /*! - Returns the human-displayable string representation of the - URL. The output can be customized by passing flags with \a - options. + Returns a string representation of the URL. + The output can be customized by passing flags with \a options. The resulting QString can be passed back to a QUrl later on. @@ -5748,6 +5747,23 @@ QString QUrl::url(FormattingOptions options) const return toString(options); } +/*! + Returns a human-displayable string representation of the URL. + The output can be customized by passing flags with \a options. + The option RemovePassword is always enabled, since passwords + should never be shown back to users. + + The resulting QString can be passed back to a QUrl later on, + but any password that was present initially will be lost. + + \sa FormattingOptions, toEncoded(), toString() +*/ + +QString QUrl::toDisplayString(FormattingOptions options) const +{ + return toString(options | RemovePassword); +} + /*! Returns the encoded representation of the URL if it's valid; otherwise an empty QByteArray is returned. The output can be @@ -6237,7 +6253,7 @@ QDataStream &operator>>(QDataStream &in, QUrl &url) #ifndef QT_NO_DEBUG_STREAM QDebug operator<<(QDebug d, const QUrl &url) { - d.maybeSpace() << "QUrl(" << url.toString() << ')'; + d.maybeSpace() << "QUrl(" << url.toDisplayString() << ')'; return d.space(); } #endif diff --git a/src/corelib/io/qurl.h b/src/corelib/io/qurl.h index c301d92dfb4..3e5c62cd7c7 100644 --- a/src/corelib/io/qurl.h +++ b/src/corelib/io/qurl.h @@ -102,6 +102,7 @@ public: void setUrl(const QString &url, ParsingMode mode = TolerantMode); QString url(FormattingOptions options = None) const; QString toString(FormattingOptions options = None) const; + QString toDisplayString(FormattingOptions options = None) const; bool isValid() const; @@ -211,10 +212,10 @@ public: QString errorString() const; #if QT_DEPRECATED_SINCE(5,0) - QT_DEPRECATED void setEncodedUrl(const QByteArray &url, ParsingMode mode = TolerantMode) - { setUrl(QString::fromUtf8(url.constData(), url.size()), mode); } - QT_DEPRECATED static QUrl fromEncoded(const QByteArray &url, ParsingMode mode = TolerantMode) - { return QUrl(QString::fromUtf8(url.constData(), url.size()), mode); } + QT_DEPRECATED void setEncodedUrl(const QByteArray &u, ParsingMode mode = TolerantMode) + { setUrl(QString::fromUtf8(u.constData(), u.size()), mode); } + QT_DEPRECATED static QUrl fromEncoded(const QByteArray &u, ParsingMode mode = TolerantMode) + { return QUrl(QString::fromUtf8(u.constData(), u.size()), mode); } #endif private: diff --git a/src/corelib/json/qjsonarray.h b/src/corelib/json/qjsonarray.h index 8bb1ac0b512..83b07e33c94 100644 --- a/src/corelib/json/qjsonarray.h +++ b/src/corelib/json/qjsonarray.h @@ -43,6 +43,7 @@ #define QJSONARRAY_H #include +#include QT_BEGIN_HEADER diff --git a/src/corelib/json/qjsondocument.cpp b/src/corelib/json/qjsondocument.cpp index 98a0b8c3d33..8a7fa760ae9 100644 --- a/src/corelib/json/qjsondocument.cpp +++ b/src/corelib/json/qjsondocument.cpp @@ -179,8 +179,8 @@ QJsonDocument &QJsonDocument::operator =(const QJsonDocument &other) */ QJsonDocument QJsonDocument::fromRawData(const char *data, int size, DataValidation validation) { - if (!(((quintptr)validation) & ~3)) { - qWarning() <<"QJsonDocumnt::fromRawData: data has to have 4 byte alignment"; + if (quintptr(data) & 3) { + qWarning() <<"QJsonDocument::fromRawData: data has to have 4 byte alignment"; return QJsonDocument(); } @@ -317,10 +317,10 @@ QByteArray QJsonDocument::toJson() const \sa toJson */ -QJsonDocument QJsonDocument::fromJson(const QByteArray &json) +QJsonDocument QJsonDocument::fromJson(const QByteArray &json, QJsonParseError *error) { QJsonPrivate::Parser parser(json.constData(), json.length()); - return parser.parse(); + return parser.parse(error); } /*! diff --git a/src/corelib/json/qjsondocument.h b/src/corelib/json/qjsondocument.h index 39db830726c..7eca0302db6 100644 --- a/src/corelib/json/qjsondocument.h +++ b/src/corelib/json/qjsondocument.h @@ -54,6 +54,26 @@ namespace QJsonPrivate { class Parser; } +struct Q_CORE_EXPORT QJsonParseError +{ + enum ParseError { + NoError = 0, + UnterminatedObject, + MissingNameSeparator, + UnterminatedArray, + MissingValueSeparator, + IllegalValue, + EndOfNumber, + IllegalNumber, + StringEscapeSequence, + StringUTF8Scan, + EndOfString + }; + + int offset; + ParseError error; +}; + class Q_CORE_EXPORT QJsonDocument { public: @@ -85,7 +105,7 @@ public: static QJsonDocument fromVariant(const QVariant &variant); QVariant toVariant() const; - static QJsonDocument fromJson(const QByteArray &json); + static QJsonDocument fromJson(const QByteArray &json, QJsonParseError *error = 0); QByteArray toJson() const; bool isEmpty() const; diff --git a/src/corelib/json/qjsonobject.h b/src/corelib/json/qjsonobject.h index d2831a3cea7..973a01585bd 100644 --- a/src/corelib/json/qjsonobject.h +++ b/src/corelib/json/qjsonobject.h @@ -43,6 +43,7 @@ #define QJSONOBJECT_H #include +#include QT_BEGIN_HEADER diff --git a/src/corelib/json/qjsonparser.cpp b/src/corelib/json/qjsonparser.cpp index 75ed7de48fa..16eedadf1ae 100644 --- a/src/corelib/json/qjsonparser.cpp +++ b/src/corelib/json/qjsonparser.cpp @@ -60,7 +60,7 @@ QT_BEGIN_NAMESPACE using namespace QJsonPrivate; Parser::Parser(const char *json, int length) - : json(json), data(0), dataLength(0), current(0) + : head(json), json(json), data(0), dataLength(0), current(0), lastError(QJsonParseError::NoError) { end = json + length; } @@ -134,8 +134,6 @@ char Parser::nextToken() case BeginObject: case NameSeparator: case ValueSeparator: - if (!eatSpace()) - return 0; case EndArray: case EndObject: eatSpace(); @@ -151,7 +149,7 @@ char Parser::nextToken() /* JSON-text = object / array */ -QJsonDocument Parser::parse() +QJsonDocument Parser::parse(QJsonParseError *error) { #ifdef PARSER_DEBUG indent = 0; @@ -182,6 +180,10 @@ QJsonDocument Parser::parse() END; { + if (error) { + error->offset = 0; + error->error = QJsonParseError::NoError; + } QJsonPrivate::Data *d = new QJsonPrivate::Data(data, current); return QJsonDocument(d); } @@ -190,6 +192,10 @@ error: #ifdef PARSER_DEBUG qDebug() << ">>>>> parser error"; #endif + if (error) { + error->offset = json - head; + error->error = lastError; + } free(data); return QJsonDocument(); } @@ -241,8 +247,10 @@ bool Parser::parseObject() } DEBUG << "end token=" << token; - if (token != EndObject) + if (token != EndObject) { + lastError = QJsonParseError::UnterminatedObject; return false; + } DEBUG << "numEntries" << parsedObject.offsets.size(); int table = objectOffset; @@ -283,8 +291,10 @@ bool Parser::parseMember(int baseOffset) if (!parseString(&latin1)) return false; char token = nextToken(); - if (token != NameSeparator) + if (token != NameSeparator) { + lastError = QJsonParseError::MissingNameSeparator; return false; + } QJsonPrivate::Value val; if (!parseValue(&val, baseOffset)) return false; @@ -308,8 +318,10 @@ bool Parser::parseArray() QVarLengthArray values; - if (!eatSpace()) + if (!eatSpace()) { + lastError = QJsonParseError::UnterminatedArray; return false; + } if (*json == EndArray) { nextToken(); } else { @@ -321,8 +333,13 @@ bool Parser::parseArray() char token = nextToken(); if (token == EndArray) break; - else if (token != ValueSeparator) + else if (token != ValueSeparator) { + if (!eatSpace()) + lastError = QJsonParseError::UnterminatedArray; + else + lastError = QJsonParseError::MissingValueSeparator; return false; + } } } @@ -358,8 +375,10 @@ bool Parser::parseValue(QJsonPrivate::Value *val, int baseOffset) switch (*json++) { case 'n': - if (end - json < 4) + if (end - json < 4) { + lastError = QJsonParseError::IllegalValue; return false; + } if (*json++ == 'u' && *json++ == 'l' && *json++ == 'l') { @@ -368,10 +387,13 @@ bool Parser::parseValue(QJsonPrivate::Value *val, int baseOffset) END; return true; } + lastError = QJsonParseError::IllegalValue; return false; case 't': - if (end - json < 4) + if (end - json < 4) { + lastError = QJsonParseError::IllegalValue; return false; + } if (*json++ == 'r' && *json++ == 'u' && *json++ == 'e') { @@ -381,10 +403,13 @@ bool Parser::parseValue(QJsonPrivate::Value *val, int baseOffset) END; return true; } + lastError = QJsonParseError::IllegalValue; return false; case 'f': - if (end - json < 5) + if (end - json < 5) { + lastError = QJsonParseError::IllegalValue; return false; + } if (*json++ == 'a' && *json++ == 'l' && *json++ == 's' && @@ -395,6 +420,7 @@ bool Parser::parseValue(QJsonPrivate::Value *val, int baseOffset) END; return true; } + lastError = QJsonParseError::IllegalValue; return false; case Quote: { val->type = QJsonValue::String; @@ -490,8 +516,10 @@ bool Parser::parseNumber(QJsonPrivate::Value *val, int baseOffset) ++json; } - if (json >= end) + if (json >= end) { + lastError = QJsonParseError::EndOfNumber; return false; + } QByteArray number(start, json - start); DEBUG << "numberstring" << number; @@ -514,8 +542,10 @@ bool Parser::parseNumber(QJsonPrivate::Value *val, int baseOffset) }; d = number.toDouble(&ok); - if (!ok) + if (!ok) { + lastError = QJsonParseError::IllegalNumber; return false; + } int pos = reserveSpace(sizeof(double)); *(quint64 *)(data + pos) = qToLittleEndian(ui); @@ -679,11 +709,15 @@ bool Parser::parseString(bool *latin1) if (*json == '"') break; else if (*json == '\\') { - if (!scanEscapeSequence(json, end, &ch)) + if (!scanEscapeSequence(json, end, &ch)) { + lastError = QJsonParseError::StringEscapeSequence; return false; + } } else { - if (!scanUtf8Char(json, end, &ch)) + if (!scanUtf8Char(json, end, &ch)) { + lastError = QJsonParseError::StringUTF8Scan; return false; + } } if (ch > 0xff) { *latin1 = false; @@ -695,8 +729,10 @@ bool Parser::parseString(bool *latin1) } ++json; DEBUG << "end of string"; - if (json >= end) + if (json >= end) { + lastError = QJsonParseError::EndOfString; return false; + } // no unicode string, we are done if (*latin1) { @@ -720,11 +756,15 @@ bool Parser::parseString(bool *latin1) if (*json == '"') break; else if (*json == '\\') { - if (!scanEscapeSequence(json, end, &ch)) + if (!scanEscapeSequence(json, end, &ch)) { + lastError = QJsonParseError::StringEscapeSequence; return false; + } } else { - if (!scanUtf8Char(json, end, &ch)) + if (!scanUtf8Char(json, end, &ch)) { + lastError = QJsonParseError::StringUTF8Scan; return false; + } } if (ch > 0xffff) { int pos = reserveSpace(4); @@ -737,8 +777,10 @@ bool Parser::parseString(bool *latin1) } ++json; - if (json >= end) + if (json >= end) { + lastError = QJsonParseError::EndOfString; return false; + } // write string length *(QJsonPrivate::qle_int *)(data + stringPos) = (current - outStart - sizeof(int))/2; diff --git a/src/corelib/json/qjsonparser_p.h b/src/corelib/json/qjsonparser_p.h index eae6c08718f..20e57dcf26d 100644 --- a/src/corelib/json/qjsonparser_p.h +++ b/src/corelib/json/qjsonparser_p.h @@ -65,7 +65,7 @@ class Parser public: Parser(const char *json, int length); - QJsonDocument parse(); + QJsonDocument parse(QJsonParseError *error); class ParsedObject { @@ -93,12 +93,14 @@ private: bool parseString(bool *latin1); bool parseValue(QJsonPrivate::Value *val, int baseOffset); bool parseNumber(QJsonPrivate::Value *val, int baseOffset); + const char *head; const char *json; const char *end; char *data; int dataLength; int current; + QJsonParseError::ParseError lastError; inline int reserveSpace(int space) { if (current + space >= dataLength) { diff --git a/src/corelib/kernel/kernel.pri b/src/corelib/kernel/kernel.pri index 6ebc62614bc..4b81087e2f4 100644 --- a/src/corelib/kernel/kernel.pri +++ b/src/corelib/kernel/kernel.pri @@ -12,6 +12,7 @@ HEADERS += \ kernel/qmetatype.h \ kernel/qmimedata.h \ kernel/qobject.h \ + kernel/qobject_impl.h \ kernel/qobjectdefs.h \ kernel/qsignalmapper.h \ kernel/qsocketnotifier.h \ diff --git a/src/corelib/kernel/qabstracteventdispatcher.cpp b/src/corelib/kernel/qabstracteventdispatcher.cpp index 31a46ad7446..3075eab7530 100644 --- a/src/corelib/kernel/qabstracteventdispatcher.cpp +++ b/src/corelib/kernel/qabstracteventdispatcher.cpp @@ -135,8 +135,8 @@ void QAbstractEventDispatcherPrivate::releaseTimerId(int timerId) QAbstractEventDispatcher also allows the integration of an external event loop with the Qt event loop. For example, the - \l{Qt Solutions}{Motif Extension Qt Solution} includes a - reimplementation of QAbstractEventDispatcher that merges Qt and + \l{Motif Extension} + includes a reimplementation of QAbstractEventDispatcher that merges Qt and Motif events together. \sa QEventLoop, QCoreApplication, QThread @@ -413,8 +413,12 @@ QAbstractEventDispatcher::EventFilter QAbstractEventDispatcher::setEventFilter(E bool QAbstractEventDispatcher::filterEvent(void *message) { Q_D(QAbstractEventDispatcher); - if (d->event_filter) + if (d->event_filter) { + // Raise the loopLevel so that deleteLater() calls in or triggered + // by event_filter() will be processed from the main event loop. + QScopedLoopLevelCounter loopLevelCounter(d->threadData); return d->event_filter(message); + } return false; } diff --git a/src/corelib/kernel/qcore_mac_objc.mm b/src/corelib/kernel/qcore_mac_objc.mm index 76705f1c8c2..35e3bb27d94 100644 --- a/src/corelib/kernel/qcore_mac_objc.mm +++ b/src/corelib/kernel/qcore_mac_objc.mm @@ -41,6 +41,8 @@ #include +QT_BEGIN_NAMESPACE + NSString *QCFString::toNSString(const QString &string) { // The const cast below is safe: CfStringRef is immutable and so is NSString. @@ -52,3 +54,5 @@ QString QCFString::toQString(const NSString *nsstr) return toQString(reinterpret_cast(nsstr)); } +QT_END_NAMESPACE + diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp index cf3ae1b7c5f..2d49b271ce3 100644 --- a/src/corelib/kernel/qcoreapplication.cpp +++ b/src/corelib/kernel/qcoreapplication.cpp @@ -1011,35 +1011,6 @@ void QCoreApplication::exit(int returnCode) */ /*! - Adds the event \a event, with the object \a receiver as the - receiver of the event, to an event queue and returns immediately. - - The event must be allocated on the heap since the post event queue - will take ownership of the event and delete it once it has been - posted. It is \e {not safe} to access the event after - it has been posted. - - When control returns to the main event loop, all events that are - stored in the queue will be sent using the notify() function. - - Events are processed in the order posted. For more control over - the processing order, use the postEvent() overload below, which - takes a priority argument. This function posts all event with a - Qt::NormalEventPriority. - - \threadsafe - - \sa sendEvent(), notify(), sendPostedEvents() -*/ - -void QCoreApplication::postEvent(QObject *receiver, QEvent *event) -{ - postEvent(receiver, event, Qt::NormalEventPriority); -} - - -/*! - \overload postEvent() \since 4.3 Adds the event \a event, with the object \a receiver as the @@ -1166,13 +1137,6 @@ bool QCoreApplication::compressEvent(QEvent *event, QObject *receiver, QPostEven return false; } -/*! - \fn void QCoreApplication::sendPostedEvents() - \overload sendPostedEvents() - - Dispatches all posted events, i.e. empties the event queue. -*/ - /*! Immediately dispatches all events which have been previously queued with QCoreApplication::postEvent() and which are for the object \a receiver @@ -1188,7 +1152,6 @@ bool QCoreApplication::compressEvent(QEvent *event, QObject *receiver, QPostEven \sa flush(), postEvent() */ - void QCoreApplication::sendPostedEvents(QObject *receiver, int event_type) { QThreadData *data = QThreadData::current(); @@ -1343,23 +1306,6 @@ void QCoreApplicationPrivate::sendPostedEvents(QObject *receiver, int event_type } /*! - Removes all events posted using postEvent() for \a receiver. - - The events are \e not dispatched, instead they are removed from the - queue. You should never need to call this function. If you do call it, - be aware that killing events may cause \a receiver to break one or - more invariants. - - \threadsafe -*/ - -void QCoreApplication::removePostedEvents(QObject *receiver) -{ - removePostedEvents(receiver, 0); -} - -/*! - \overload removePostedEvents() \since 4.3 Removes all events of the given \a eventType that were posted @@ -1372,7 +1318,9 @@ void QCoreApplication::removePostedEvents(QObject *receiver) If \a receiver is null, the events of \a eventType are removed for all objects. If \a eventType is 0, all the events are removed for - \a receiver. + \a receiver. You should never call this function with \a eventType + of 0. If you do call it in this way, be aware that killing events + may cause \a receiver to break one or more invariants. \threadsafe */ @@ -1506,8 +1454,14 @@ void QCoreApplicationPrivate::ref() void QCoreApplicationPrivate::deref() { - if (!quitLockRef.deref() && in_exec && quitLockRefEnabled) - QCoreApplication::postEvent(qApp, new QEvent(QEvent::Quit)); + if (!quitLockRef.deref()) + maybeQuit(); +} + +void QCoreApplicationPrivate::maybeQuit() +{ + if (quitLockRef.load() == 0 && in_exec && quitLockRefEnabled && shouldQuit()) + QCoreApplication::postEvent(QCoreApplication::instance(), new QEvent(QEvent::Quit)); } /*! diff --git a/src/corelib/kernel/qcoreapplication.h b/src/corelib/kernel/qcoreapplication.h index d1fba3b63cf..18266a9a2c8 100644 --- a/src/corelib/kernel/qcoreapplication.h +++ b/src/corelib/kernel/qcoreapplication.h @@ -110,12 +110,9 @@ public: static void exit(int retcode=0); static bool sendEvent(QObject *receiver, QEvent *event); - static void postEvent(QObject *receiver, QEvent *event); - static void postEvent(QObject *receiver, QEvent *event, int priority); - static void sendPostedEvents(QObject *receiver, int event_type); - static void sendPostedEvents(); - static void removePostedEvents(QObject *receiver); - static void removePostedEvents(QObject *receiver, int eventType); + static void postEvent(QObject *receiver, QEvent *event, int priority = Qt::NormalEventPriority); + static void sendPostedEvents(QObject *receiver = 0, int event_type = 0); + static void removePostedEvents(QObject *receiver, int eventType = 0); static bool hasPendingEvents(); static QAbstractEventDispatcher *eventDispatcher(); static void setEventDispatcher(QAbstractEventDispatcher *eventDispatcher); @@ -211,8 +208,6 @@ inline bool QCoreApplication::sendEvent(QObject *receiver, QEvent *event) inline bool QCoreApplication::sendSpontaneousEvent(QObject *receiver, QEvent *event) { if (event) event->spont = true; return self ? self->notifyInternal(receiver, event) : false; } -inline void QCoreApplication::sendPostedEvents() { sendPostedEvents(0, 0); } - #ifdef QT_NO_TRANSLATION // Simple versions inline QString QCoreApplication::translate(const char *, const char *sourceText, diff --git a/src/corelib/kernel/qcoreapplication_p.h b/src/corelib/kernel/qcoreapplication_p.h index 861a046f16f..112b3131297 100644 --- a/src/corelib/kernel/qcoreapplication_p.h +++ b/src/corelib/kernel/qcoreapplication_p.h @@ -92,6 +92,10 @@ public: QAtomicInt quitLockRef; void ref(); void deref(); + virtual bool shouldQuit() { + return true; + } + void maybeQuit(); static QThread *theMainThread; static QThread *mainThread(); diff --git a/src/corelib/kernel/qcoreapplication_win.cpp b/src/corelib/kernel/qcoreapplication_win.cpp index 9a45f28f16f..c1f7c8ab25b 100644 --- a/src/corelib/kernel/qcoreapplication_win.cpp +++ b/src/corelib/kernel/qcoreapplication_win.cpp @@ -140,30 +140,30 @@ public: { LeaveCriticalSection(&cs); } }; -Q_CORE_EXPORT void qWinMsgHandler(QtMsgType t, const char* str) -{ - Q_UNUSED(t); - // OutputDebugString is not threadsafe. +// defined in qlogging.cpp +extern Q_CORE_EXPORT QByteArray qMessageFormatString(QtMsgType type, + const QMessageLogContext &context, + const char *str); +Q_CORE_EXPORT void qWinMessageHandler(QtMsgType t, const QMessageLogContext &context, const char *str) +{ // cannot use QMutex here, because qWarning()s in the QMutex // implementation may cause this function to recurse static QWinMsgHandlerCriticalSection staticCriticalSection; - if (!str) - str = "(null)"; + QByteArray message = qMessageFormatString(t, context, str); + QString s(QString::fromLocal8Bit(message)); + // OutputDebugString is not threadsafe. staticCriticalSection.lock(); - - QString s(QString::fromLocal8Bit(str)); - s += QLatin1Char('\n'); OutputDebugString((wchar_t*)s.utf16()); - staticCriticalSection.unlock(); } -Q_CORE_EXPORT void qWinMessageHandler(QtMsgType t, const QMessageLogContext &, const char* str) +Q_CORE_EXPORT void qWinMsgHandler(QtMsgType t, const char *str) { - qWinMsgHandler(t, str); + QMessageLogContext emptyContext; + qWinMessageHandler(t, emptyContext, str); } /***************************************************************************** diff --git a/src/corelib/kernel/qcoreevent.cpp b/src/corelib/kernel/qcoreevent.cpp index 9ed696539a9..032590fa7f7 100644 --- a/src/corelib/kernel/qcoreevent.cpp +++ b/src/corelib/kernel/qcoreevent.cpp @@ -228,6 +228,7 @@ QT_BEGIN_NAMESPACE \value TouchBegin Beginning of a sequence of touch-screen and/or track-pad events (QTouchEvent) \value TouchUpdate Touch-screen event (QTouchEvent) \value TouchEnd End of touch-event sequence (QTouchEvent) + \value TouchCancel Cancellation of touch-event sequence (QTouchEvent) \value WinIdChange The window system identifer for this native widget has changed \value Gesture A gesture was triggered (QGestureEvent) \value GestureOverride A gesture override was triggered (QGestureEvent) diff --git a/src/corelib/kernel/qcoreevent.h b/src/corelib/kernel/qcoreevent.h index 8910763daf0..1f36f9c9c8c 100644 --- a/src/corelib/kernel/qcoreevent.h +++ b/src/corelib/kernel/qcoreevent.h @@ -277,6 +277,10 @@ public: InputMethodQuery = 209, OrientationChange = 210, // Screen orientation has changed + TouchCancel = 211, + + ThemeChange = 212, + // 512 reserved for Qt Jambi's MetaCall event // 513 reserved for Qt Jambi's DeleteOnMainThread event diff --git a/src/corelib/kernel/qfunctions_wince.h b/src/corelib/kernel/qfunctions_wince.h index f83dad0dde6..7cd8ea66a22 100644 --- a/src/corelib/kernel/qfunctions_wince.h +++ b/src/corelib/kernel/qfunctions_wince.h @@ -182,6 +182,16 @@ void qt_wince_rewind( FILE *stream ); int qt_wince___fileno(FILE *); FILE *qt_wince_tmpfile( void ); +//For zlib we need these helper functions, but they break the build when +//set globally, so just set them for zlib use +#ifdef ZLIB_H +#define open qt_wince_open +#define close qt_wince__close +#define lseek qt_wince__lseek +#define read qt_wince__read +#define write qt_wince__write +#endif + int qt_wince__mkdir(const char *dirname); int qt_wince__rmdir(const char *dirname); int qt_wince__access( const char *path, int pmode ); diff --git a/src/corelib/kernel/qmetaobject.cpp b/src/corelib/kernel/qmetaobject.cpp index 400fe54c7fa..d53ba707f7d 100644 --- a/src/corelib/kernel/qmetaobject.cpp +++ b/src/corelib/kernel/qmetaobject.cpp @@ -1151,18 +1151,19 @@ bool QMetaObject::invokeMethod(QObject *obj, sig[sig.size() - 1] = ')'; sig.append('\0'); - int idx = obj->metaObject()->indexOfMethod(sig.constData()); + const QMetaObject *meta = obj->metaObject(); + int idx = meta->indexOfMethod(sig.constData()); if (idx < 0) { QByteArray norm = QMetaObject::normalizedSignature(sig.constData()); - idx = obj->metaObject()->indexOfMethod(norm.constData()); + idx = meta->indexOfMethod(norm.constData()); } - if (idx < 0 || idx >= obj->metaObject()->methodCount()) { + if (idx < 0 || idx >= meta->methodCount()) { qWarning("QMetaObject::invokeMethod: No such method %s::%s", - obj->metaObject()->className(), sig.constData()); + meta->className(), sig.constData()); return false; } - QMetaMethod method = obj->metaObject()->method(idx); + QMetaMethod method = meta->method(idx); return method.invoke(obj, type, ret, val0, val1, val2, val3, val4, val5, val6, val7, val8, val9); } @@ -1247,6 +1248,14 @@ bool QMetaObject::invokeMethod(QObject *obj, \value Scriptable */ +/*! + \fn bool QMetaMethod::isValid() const + \since 5.0 + + Returns true if this method is valid (can be introspected and + invoked), otherwise returns false. +*/ + /*! \fn const QMetaObject *QMetaMethod::enclosingMetaObject() const \internal @@ -1286,25 +1295,10 @@ const char *QMetaMethod::signature() const */ QList QMetaMethod::parameterTypes() const { - QList list; if (!mobj) - return list; - const char *signature = mobj->d.stringdata + mobj->d.data[handle]; - while (*signature && *signature != '(') - ++signature; - while (*signature && *signature != ')' && *++signature != ')') { - const char *begin = signature; - int level = 0; - while (*signature && (level > 0 || *signature != ',') && *signature != ')') { - if (*signature == '<') - ++level; - else if (*signature == '>') - --level; - ++signature; - } - list += QByteArray(begin, signature - begin); - } - return list; + return QList(); + return QMetaObjectPrivate::parameterTypeNamesFromSignature( + mobj->d.stringdata + mobj->d.data[handle]); } /*! @@ -1353,7 +1347,30 @@ const char *QMetaMethod::typeName() const Returns the tag associated with this method. Tags are special macros recognized by \c moc that make it - possible to add extra information about a method. For the moment, + possible to add extra information about a method. + + Tag information can be added in the following + way in the function declaration: + + \code + #define THISISTESTTAG // tag text + ... + private slots: + THISISTESTTAG void testFunc(); + \endcode + + and the information can be accessed by using: + + \code + MainWindow win; + win.show(); + + int functionIndex = win.metaObject()->indexOfSlot("testFunc()"); + QMetaMethod mm = metaObject()->method(functionIndex); + qDebug() << mm.tag(); // prints THISISTESTTAG + \endcode + + For the moment, \c moc doesn't support any special tags. */ const char *QMetaMethod::tag() const @@ -2243,9 +2260,8 @@ QVariant QMetaProperty::read(const QObject *object) const t = QMetaType::type(typeName); if (t == QVariant::Invalid) t = QVariant::nameToType(typeName); - if (t == QVariant::Invalid || t == QVariant::UserType) { - if (t == QVariant::Invalid) - qWarning("QMetaProperty::read: Unable to handle unregistered datatype '%s' for property '%s::%s'", typeName, mobj->className(), name()); + if (t == QVariant::Invalid) { + qWarning("QMetaProperty::read: Unable to handle unregistered datatype '%s' for property '%s::%s'", typeName, mobj->className(), name()); return QVariant(); } } @@ -2778,4 +2794,29 @@ int QMetaObjectPrivate::originalClone(const QMetaObject *mobj, int local_method_ return local_method_index; } +/*! + \internal + + Returns the parameter type names extracted from the given \a signature. +*/ +QList QMetaObjectPrivate::parameterTypeNamesFromSignature(const char *signature) +{ + QList list; + while (*signature && *signature != '(') + ++signature; + while (*signature && *signature != ')' && *++signature != ')') { + const char *begin = signature; + int level = 0; + while (*signature && (level > 0 || *signature != ',') && *signature != ')') { + if (*signature == '<') + ++level; + else if (*signature == '>') + --level; + ++signature; + } + list += QByteArray(begin, signature - begin); + } + return list; +} + QT_END_NAMESPACE diff --git a/src/corelib/kernel/qmetaobject.h b/src/corelib/kernel/qmetaobject.h index 650369164c6..9e51af7556f 100644 --- a/src/corelib/kernel/qmetaobject.h +++ b/src/corelib/kernel/qmetaobject.h @@ -134,6 +134,8 @@ public: val0, val1, val2, val3, val4, val5, val6, val7, val8, val9); } + inline bool isValid() const { return mobj != 0; } + private: const QMetaObject *mobj; uint handle; diff --git a/src/corelib/kernel/qmetaobject_p.h b/src/corelib/kernel/qmetaobject_p.h index 5fc0555fb5f..59a5c5f2806 100644 --- a/src/corelib/kernel/qmetaobject_p.h +++ b/src/corelib/kernel/qmetaobject_p.h @@ -134,6 +134,8 @@ struct QMetaObjectPrivate bool normalizeStringData); static int originalClone(const QMetaObject *obj, int local_method_index); + static QList parameterTypeNamesFromSignature(const char *signature); + #ifndef QT_NO_QOBJECT //defined in qobject.cpp enum DisconnectType { DisconnectAll, DisconnectOne }; @@ -152,6 +154,10 @@ struct QMetaObjectPrivate #endif }; +// For meta-object generators + +enum { MetaObjectPrivateFieldCount = sizeof(QMetaObjectPrivate) / sizeof(int) }; + #ifndef UTILS_H // mirrored in moc's utils.h static inline bool is_ident_char(char s) diff --git a/src/corelib/kernel/qmetaobjectbuilder.cpp b/src/corelib/kernel/qmetaobjectbuilder.cpp index 529ca22107a..8bece6636bb 100644 --- a/src/corelib/kernel/qmetaobjectbuilder.cpp +++ b/src/corelib/kernel/qmetaobjectbuilder.cpp @@ -106,10 +106,12 @@ public: (QMetaMethod::MethodType _methodType, const QByteArray& _signature, const QByteArray& _returnType = QByteArray(), - QMetaMethod::Access _access = QMetaMethod::Public) + QMetaMethod::Access _access = QMetaMethod::Public, + int _revision = 0) : signature(QMetaObject::normalizedSignature(_signature.constData())), returnType(QMetaObject::normalizedType(_returnType)), - attributes(((int)_access) | (((int)_methodType) << 2)) + attributes(((int)_access) | (((int)_methodType) << 2)), + revision(_revision) { } @@ -118,6 +120,7 @@ public: QList parameterNames; QByteArray tag; int attributes; + int revision; QMetaMethod::MethodType methodType() const { @@ -139,10 +142,12 @@ class QMetaPropertyBuilderPrivate { public: QMetaPropertyBuilderPrivate - (const QByteArray& _name, const QByteArray& _type, int notifierIdx=-1) + (const QByteArray& _name, const QByteArray& _type, int notifierIdx=-1, + int _revision = 0) : name(_name), type(QMetaObject::normalizedType(_type.constData())), - flags(Readable | Writable | Scriptable), notifySignal(-1) + flags(Readable | Writable | Scriptable), notifySignal(-1), + revision(_revision) { if (notifierIdx >= 0) { flags |= Notify; @@ -154,6 +159,7 @@ public: QByteArray type; int flags; int notifySignal; + int revision; bool flag(int f) const { @@ -193,6 +199,9 @@ public: staticMetacallFunction = 0; } + bool hasRevisionedProperties() const; + bool hasRevisionedMethods() const; + QByteArray className; const QMetaObject *superClass; QMetaObjectBuilder::StaticMetacallFunction staticMetacallFunction; @@ -206,6 +215,24 @@ public: int flags; }; +bool QMetaObjectBuilderPrivate::hasRevisionedProperties() const +{ + for (int i = 0; i < properties.size(); ++i) { + if (properties.at(i).revision) + return true; + } + return false; +} + +bool QMetaObjectBuilderPrivate::hasRevisionedMethods() const +{ + for (int i = 0; i < methods.size(); ++i) { + if (methods.at(i).revision) + return true; + } + return false; +} + /*! Constructs a new QMetaObjectBuilder. */ @@ -443,6 +470,7 @@ QMetaMethodBuilder QMetaObjectBuilder::addMethod(const QMetaMethod& prototype) method.setTag(prototype.tag()); method.setAccess(prototype.access()); method.setAttributes(prototype.attributes()); + method.setRevision(prototype.revision()); return method; } @@ -556,6 +584,7 @@ QMetaPropertyBuilder QMetaObjectBuilder::addProperty(const QMetaProperty& protot property.setEnumOrFlag(prototype.isEnumType()); property.setConstant(prototype.isConstant()); property.setFinal(prototype.isFinal()); + property.setRevision(prototype.revision()); if (prototype.hasNotifySignal()) { // Find an existing method for the notify signal, or add a new one. QMetaMethod method = prototype.notifySignal(); @@ -1041,21 +1070,35 @@ int QMetaObjectBuilder::indexOfClassInfo(const QByteArray& name) #define ALIGN(size,type) \ (size) = ((size) + sizeof(type) - 1) & ~(sizeof(type) - 1) -// Build a string into a QMetaObject representation. Returns the -// position in the string table where the string was placed. -static int buildString - (char *buf, char *str, int *offset, const QByteArray& value, int empty) +class MetaStringTable { - if (value.size() == 0 && empty >= 0) - return empty; - if (buf) { - memcpy(str + *offset, value.constData(), value.size()); - str[*offset + value.size()] = '\0'; +public: + typedef QHash Entries; // string --> offset mapping + typedef Entries::const_iterator const_iterator; + Entries::const_iterator constBegin() const + { return m_entries.constBegin(); } + Entries::const_iterator constEnd() const + { return m_entries.constEnd(); } + + MetaStringTable() : m_offset(0) {} + + int enter(const QByteArray &value) + { + Entries::iterator it = m_entries.find(value); + if (it != m_entries.end()) + return it.value(); + int pos = m_offset; + m_entries.insert(value, pos); + m_offset += value.size() + 1; + return pos; } - int posn = *offset; - *offset += value.size() + 1; - return posn; -} + + int arraySize() const { return m_offset; } + +private: + Entries m_entries; + int m_offset; +}; // Build the parameter array string for a method. static QByteArray buildParameterNames @@ -1103,12 +1146,15 @@ static QByteArray buildParameterNames // build the QMetaObject. Returns -1 if the metaobject if // relocatable is set, but the metaobject contains extradata. static int buildMetaObject(QMetaObjectBuilderPrivate *d, char *buf, - bool relocatable) + int expectedSize, bool relocatable) { + Q_UNUSED(expectedSize); // Avoid warning in release mode int size = 0; int dataIndex; int enumIndex; int index; + bool hasRevisionedMethods = d->hasRevisionedMethods(); + bool hasRevisionedProperties = d->hasRevisionedProperties(); bool hasNotifySignals = false; if (relocatable && @@ -1128,7 +1174,7 @@ static int buildMetaObject(QMetaObjectBuilderPrivate *d, char *buf, QMetaObjectPrivate *pmeta = reinterpret_cast(buf + size); int pmetaSize = size; - dataIndex = 14; // Number of fields in the QMetaObjectPrivate. + dataIndex = MetaObjectPrivateFieldCount; for (index = 0; index < d->properties.size(); ++index) { if (d->properties[index].notifySignal != -1) { hasNotifySignals = true; @@ -1149,12 +1195,16 @@ static int buildMetaObject(QMetaObjectBuilderPrivate *d, char *buf, pmeta->methodCount = d->methods.size(); pmeta->methodData = dataIndex; dataIndex += 5 * d->methods.size(); + if (hasRevisionedMethods) + dataIndex += d->methods.size(); pmeta->propertyCount = d->properties.size(); pmeta->propertyData = dataIndex; dataIndex += 3 * d->properties.size(); if (hasNotifySignals) dataIndex += d->properties.size(); + if (hasRevisionedProperties) + dataIndex += d->properties.size(); pmeta->enumeratorCount = d->enumerators.size(); pmeta->enumeratorData = dataIndex; @@ -1166,9 +1216,13 @@ static int buildMetaObject(QMetaObjectBuilderPrivate *d, char *buf, } else { dataIndex += 2 * d->classInfoNames.size(); dataIndex += 5 * d->methods.size(); + if (hasRevisionedMethods) + dataIndex += d->methods.size(); dataIndex += 3 * d->properties.size(); if (hasNotifySignals) dataIndex += d->properties.size(); + if (hasRevisionedProperties) + dataIndex += d->properties.size(); dataIndex += 4 * d->enumerators.size(); dataIndex += 5 * d->constructors.size(); } @@ -1198,20 +1252,16 @@ static int buildMetaObject(QMetaObjectBuilderPrivate *d, char *buf, } // Reset the current data position to just past the QMetaObjectPrivate. - dataIndex = 14; + dataIndex = MetaObjectPrivateFieldCount; - // Add the class name to the string table. - int offset = 0; - buildString(buf, str, &offset, d->className, -1); - - // Add a common empty string, which is used to indicate "void" - // method returns, empty tag strings, etc. - int empty = buildString(buf, str, &offset, QByteArray(), -1); + MetaStringTable strings; + strings.enter(d->className); // Output the class infos, + Q_ASSERT(!buf || dataIndex == pmeta->classInfoData); for (index = 0; index < d->classInfoNames.size(); ++index) { - int name = buildString(buf, str, &offset, d->classInfoNames[index], empty); - int value = buildString(buf, str, &offset, d->classInfoValues[index], empty); + int name = strings.enter(d->classInfoNames[index]); + int value = strings.enter(d->classInfoValues[index]); if (buf) { data[dataIndex] = name; data[dataIndex + 1] = value; @@ -1220,15 +1270,16 @@ static int buildMetaObject(QMetaObjectBuilderPrivate *d, char *buf, } // Output the methods in the class. + Q_ASSERT(!buf || dataIndex == pmeta->methodData); for (index = 0; index < d->methods.size(); ++index) { QMetaMethodBuilderPrivate *method = &(d->methods[index]); - int sig = buildString(buf, str, &offset, method->signature, empty); + int sig = strings.enter(method->signature); int params; QByteArray names = buildParameterNames (method->signature, method->parameterNames); - params = buildString(buf, str, &offset, names, empty); - int ret = buildString(buf, str, &offset, method->returnType, empty); - int tag = buildString(buf, str, &offset, method->tag, empty); + params = strings.enter(names); + int ret = strings.enter(method->returnType); + int tag = strings.enter(method->tag); int attrs = method->attributes; if (buf) { data[dataIndex] = sig; @@ -1241,12 +1292,21 @@ static int buildMetaObject(QMetaObjectBuilderPrivate *d, char *buf, } dataIndex += 5; } + if (hasRevisionedMethods) { + for (index = 0; index < d->methods.size(); ++index) { + QMetaMethodBuilderPrivate *method = &(d->methods[index]); + if (buf) + data[dataIndex] = method->revision; + ++dataIndex; + } + } // Output the properties in the class. + Q_ASSERT(!buf || dataIndex == pmeta->propertyData); for (index = 0; index < d->properties.size(); ++index) { QMetaPropertyBuilderPrivate *prop = &(d->properties[index]); - int name = buildString(buf, str, &offset, prop->name, empty); - int type = buildString(buf, str, &offset, prop->type, empty); + int name = strings.enter(prop->name); + int type = strings.enter(prop->type); int flags = prop->flags; if (!isVariantType(prop->type)) { @@ -1274,11 +1334,20 @@ static int buildMetaObject(QMetaObjectBuilderPrivate *d, char *buf, ++dataIndex; } } + if (hasRevisionedProperties) { + for (index = 0; index < d->properties.size(); ++index) { + QMetaPropertyBuilderPrivate *prop = &(d->properties[index]); + if (buf) + data[dataIndex] = prop->revision; + ++dataIndex; + } + } // Output the enumerators in the class. + Q_ASSERT(!buf || dataIndex == pmeta->enumeratorData); for (index = 0; index < d->enumerators.size(); ++index) { QMetaEnumBuilderPrivate *enumerator = &(d->enumerators[index]); - int name = buildString(buf, str, &offset, enumerator->name, empty); + int name = strings.enter(enumerator->name); int isFlag = (int)(enumerator->isFlag); int count = enumerator->keys.size(); int enumOffset = enumIndex; @@ -1289,7 +1358,7 @@ static int buildMetaObject(QMetaObjectBuilderPrivate *d, char *buf, data[dataIndex + 3] = enumOffset; } for (int key = 0; key < count; ++key) { - int keyIndex = buildString(buf, str, &offset, enumerator->keys[key], empty); + int keyIndex = strings.enter(enumerator->keys[key]); if (buf) { data[enumOffset++] = keyIndex; data[enumOffset++] = enumerator->values[key]; @@ -1300,15 +1369,16 @@ static int buildMetaObject(QMetaObjectBuilderPrivate *d, char *buf, } // Output the constructors in the class. + Q_ASSERT(!buf || dataIndex == pmeta->constructorData); for (index = 0; index < d->constructors.size(); ++index) { QMetaMethodBuilderPrivate *method = &(d->constructors[index]); - int sig = buildString(buf, str, &offset, method->signature, empty); + int sig = strings.enter(method->signature); int params; QByteArray names = buildParameterNames (method->signature, method->parameterNames); - params = buildString(buf, str, &offset, names, empty); - int ret = buildString(buf, str, &offset, method->returnType, empty); - int tag = buildString(buf, str, &offset, method->tag, empty); + params = strings.enter(names); + int ret = strings.enter(method->returnType); + int tag = strings.enter(method->tag); int attrs = method->attributes; if (buf) { data[dataIndex] = sig; @@ -1320,9 +1390,16 @@ static int buildMetaObject(QMetaObjectBuilderPrivate *d, char *buf, dataIndex += 5; } - // One more empty string to act as a terminator. - buildString(buf, str, &offset, QByteArray(), -1); - size += offset; + size += strings.arraySize(); + + if (buf) { + // Write strings to string data array. + MetaStringTable::const_iterator it; + for (it = strings.constBegin(); it != strings.constEnd(); ++it) { + memcpy(str + it.value(), it.key().constData(), it.key().size()); + str[it.value() + it.key().size()] = '\0'; + } + } // Output the zero terminator in the data array. if (buf) @@ -1356,6 +1433,7 @@ static int buildMetaObject(QMetaObjectBuilderPrivate *d, char *buf, // Align the final size and return it. ALIGN(size, void *); + Q_ASSERT(!buf || size == expectedSize); return size; } @@ -1371,10 +1449,10 @@ static int buildMetaObject(QMetaObjectBuilderPrivate *d, char *buf, */ QMetaObject *QMetaObjectBuilder::toMetaObject() const { - int size = buildMetaObject(d, 0, false); + int size = buildMetaObject(d, 0, 0, false); char *buf = reinterpret_cast(malloc(size)); memset(buf, 0, size); - buildMetaObject(d, buf, false); + buildMetaObject(d, buf, size, false); return reinterpret_cast(buf); } @@ -1394,7 +1472,7 @@ QMetaObject *QMetaObjectBuilder::toMetaObject() const */ QByteArray QMetaObjectBuilder::toRelocatableData(bool *ok) const { - int size = buildMetaObject(d, 0, true); + int size = buildMetaObject(d, 0, 0, true); if (size == -1) { if (ok) *ok = false; return QByteArray(); @@ -1404,7 +1482,7 @@ QByteArray QMetaObjectBuilder::toRelocatableData(bool *ok) const data.resize(size); char *buf = data.data(); memset(buf, 0, size); - buildMetaObject(d, buf, true); + buildMetaObject(d, buf, size, true); if (ok) *ok = true; return data; } @@ -1432,6 +1510,7 @@ void QMetaObjectBuilder::fromRelocatableData(QMetaObject *output, output->d.superdata = superclass; output->d.stringdata = buf + stringdataOffset; output->d.data = reinterpret_cast(buf + dataOffset); + output->d.extradata = 0; } /*! @@ -1505,6 +1584,8 @@ void QMetaObjectBuilder::serialize(QDataStream& stream) const stream << method->parameterNames; stream << method->tag; stream << method->attributes; + if (method->revision) + stream << method->revision; } // Write the properties. @@ -1514,6 +1595,8 @@ void QMetaObjectBuilder::serialize(QDataStream& stream) const stream << property->type; stream << property->flags; stream << property->notifySignal; + if (property->revision) + stream << property->revision; } // Write the enumerators. @@ -1644,6 +1727,8 @@ void QMetaObjectBuilder::deserialize stream >> method->parameterNames; stream >> method->tag; stream >> method->attributes; + if (method->attributes & MethodRevisioned) + stream >> method->revision; if (method->methodType() == QMetaMethod::Constructor) { // Cannot add a constructor in this set of methods. stream.setStatus(QDataStream::ReadCorruptData); @@ -1674,6 +1759,8 @@ void QMetaObjectBuilder::deserialize stream.setStatus(QDataStream::ReadCorruptData); return; } + if (property->flags & Revisioned) + stream >> property->revision; } // Read the enumerators. @@ -1927,6 +2014,37 @@ void QMetaMethodBuilder::setAttributes(int value) d->attributes = ((d->attributes & 0x0f) | (value << 4)); } +/*! + Returns the revision of this method. + + \sa setRevision() +*/ +int QMetaMethodBuilder::revision() const +{ + QMetaMethodBuilderPrivate *d = d_func(); + if (d) + return d->revision; + return 0; + +} + +/*! + Sets the \a revision of this method. + + \sa revision() +*/ +void QMetaMethodBuilder::setRevision(int revision) +{ + QMetaMethodBuilderPrivate *d = d_func(); + if (d) { + d->revision = revision; + if (revision) + d->attributes |= MethodRevisioned; + else + d->attributes &= ~MethodRevisioned; + } +} + /*! \class QMetaPropertyBuilder \internal @@ -2369,6 +2487,34 @@ void QMetaPropertyBuilder::setFinal(bool value) d->setFlag(Final, value); } +/*! + Returns the revision of this property. + + \sa setRevision() +*/ +int QMetaPropertyBuilder::revision() const +{ + QMetaPropertyBuilderPrivate *d = d_func(); + if (d) + return d->revision; + return 0; + +} + +/*! + Sets the \a revision of this property. + + \sa revision() +*/ +void QMetaPropertyBuilder::setRevision(int revision) +{ + QMetaPropertyBuilderPrivate *d = d_func(); + if (d) { + d->revision = revision; + d->setFlag(Revisioned, revision != 0); + } +} + /*! \class QMetaEnumBuilder diff --git a/src/corelib/kernel/qmetaobjectbuilder_p.h b/src/corelib/kernel/qmetaobjectbuilder_p.h index 17b7af0c770..86bc354164d 100644 --- a/src/corelib/kernel/qmetaobjectbuilder_p.h +++ b/src/corelib/kernel/qmetaobjectbuilder_p.h @@ -215,6 +215,9 @@ public: int attributes() const; void setAttributes(int value); + int revision() const; + void setRevision(int revision); + private: const QMetaObjectBuilder *_mobj; int _index; @@ -269,6 +272,9 @@ public: void setConstant(bool value); void setFinal(bool value); + int revision() const; + void setRevision(int revision); + private: const QMetaObjectBuilder *_mobj; int _index; diff --git a/src/corelib/kernel/qmetatype.cpp b/src/corelib/kernel/qmetatype.cpp index 50b11e0e983..a1baf28f107 100644 --- a/src/corelib/kernel/qmetatype.cpp +++ b/src/corelib/kernel/qmetatype.cpp @@ -116,6 +116,16 @@ template<> struct TypeDefinition { static const bool IsAvailable = fals #endif } // namespace +/*! + \macro Q_DECLARE_OPAQUE_POINTER(Pointer) + \relates QMetaType + + This macro enables pointers to forward-declared types to be registered with + QMetaType using either Q_DECLARE_METATYPE() or qRegisterMetaType(). + + \sa Q_DECLARE_METATYPE(), qRegisterMetaType() + +*/ /*! \macro Q_DECLARE_METATYPE(Type) @@ -126,6 +136,11 @@ template<> struct TypeDefinition { static const bool IsAvailable = fals a public destructor. It is needed to use the type \a Type as a custom type in QVariant. + This macro requires that \a Type is a fully defined type at the point where + it is used. For pointer types, it also requires that the pointed to type is + fully defined. Use in conjunction with Q_DECLARE_OPAQUE_POINTER() to + register pointers to forward declared types. + Ideally, this macro should be placed below the declaration of the class or struct. If that is not possible, it can be put in a private header file which has to be included every time that @@ -305,6 +320,12 @@ Q_CORE_EXPORT const QMetaTypeInterface *qMetaTypeWidgetsHelper = 0; class QCustomTypeInfo : public QMetaTypeInterface { public: + QCustomTypeInfo() + : alias(-1) + { + QMetaTypeInterface empty = QT_METATYPE_INTERFACE_INIT(void); + *static_cast(this) = empty; + } QByteArray typeName; int alias; }; @@ -465,6 +486,8 @@ int QMetaType::registerType(const char *typeName, Deleter deleter, int idx = qMetaTypeStaticType(normalizedTypeName.constData(), normalizedTypeName.size()); + int previousSize = 0; + int previousFlags = 0; if (!idx) { QWriteLocker locker(customTypesLock()); idx = qMetaTypeCustomType_unlocked(normalizedTypeName.constData(), @@ -485,8 +508,33 @@ int QMetaType::registerType(const char *typeName, Deleter deleter, inf.flags = flags; idx = ct->size() + User; ct->append(inf); + return idx; + } + + if (idx >= User) { + previousSize = ct->at(idx - User).size; + previousFlags = ct->at(idx - User).flags; } } + + if (idx < User) { + previousSize = QMetaType::sizeOf(idx); + previousFlags = QMetaType::typeFlags(idx); + } + + if (previousSize != size) { + qFatal("QMetaType::registerType: Binary compatibility break " + "-- Size mismatch for type '%s' [%i]. Previously registered " + "size %i, now registering size %i.", + normalizedTypeName.constData(), idx, previousSize, size); + } + if (previousFlags != flags) { + qFatal("QMetaType::registerType: Binary compatibility break " + "-- Type flags for type '%s' [%i] don't match. Previously " + "registered TypeFlags(0x%x), now registering TypeFlags(0x%x).", + normalizedTypeName.constData(), idx, previousFlags, int(flags)); + } + return idx; } @@ -510,55 +558,30 @@ int QMetaType::registerTypedef(const char* typeName, int aliasId) int idx = qMetaTypeStaticType(normalizedTypeName.constData(), normalizedTypeName.size()); - if (idx) { - Q_ASSERT(idx == aliasId); - return idx; - } + if (!idx) { + QWriteLocker locker(customTypesLock()); + idx = qMetaTypeCustomType_unlocked(normalizedTypeName.constData(), + normalizedTypeName.size()); - QWriteLocker locker(customTypesLock()); - idx = qMetaTypeCustomType_unlocked(normalizedTypeName.constData(), - normalizedTypeName.size()); - - if (idx) - return idx; - - QCustomTypeInfo inf; - inf.typeName = normalizedTypeName; - inf.alias = aliasId; - inf.creator = 0; - inf.deleter = 0; - ct->append(inf); - return aliasId; -} - -/*! - \since 4.4 - - Unregisters a user type, with \a typeName. - - \sa type(), typeName() - */ -void QMetaType::unregisterType(const char *typeName) -{ - QVector *ct = customTypes(); - if (!ct || !typeName) - return; - -#ifdef QT_NO_QOBJECT - NS(QByteArray) normalizedTypeName = typeName; -#else - NS(QByteArray) normalizedTypeName = QMetaObject::normalizedType(typeName); -#endif - QWriteLocker locker(customTypesLock()); - for (int v = 0; v < ct->count(); ++v) { - if (ct->at(v).typeName == typeName) { - QCustomTypeInfo &inf = (*ct)[v]; - inf.typeName.clear(); + if (!idx) { + QCustomTypeInfo inf; + inf.typeName = normalizedTypeName; + inf.alias = aliasId; inf.creator = 0; inf.deleter = 0; - inf.alias = -1; + ct->append(inf); + return aliasId; } } + + if (idx != aliasId) { + qFatal("QMetaType::registerTypedef: Binary compatibility break " + "-- Type name '%s' previously registered as typedef of '%s' [%i], " + "now registering as typedef of '%s' [%i].", + normalizedTypeName.constData(), QMetaType::typeName(idx), idx, + QMetaType::typeName(aliasId), aliasId); + } + return idx; } /*! @@ -1274,12 +1297,12 @@ class TypeDestroyer { static void Destroy(const int type, void *where) { if (QTypeModuleInfo::IsGui) { - if (qMetaTypeGuiHelper) + if (Q_LIKELY(qMetaTypeGuiHelper)) qMetaTypeGuiHelper[type - QMetaType::FirstGuiType].deleter(where); return; } if (QTypeModuleInfo::IsWidget) { - if (qMetaTypeWidgetsHelper) + if (Q_LIKELY(qMetaTypeWidgetsHelper)) qMetaTypeWidgetsHelper[type - QMetaType::FirstWidgetsType].deleter(where); return; } @@ -1308,8 +1331,7 @@ private: return; deleter = ct->at(type - QMetaType::User).deleter; } - if (Q_LIKELY(deleter)) - deleter(where); + deleter(where); } const int m_type; @@ -1338,19 +1360,15 @@ class TypeConstructor { struct ConstructorImpl { static void *Construct(const int type, void *where, const T *copy) { - QMetaType::Constructor ctor = 0; - if (QTypeModuleInfo::IsGui) { - if (!qMetaTypeGuiHelper) - return 0; - ctor = qMetaTypeGuiHelper[type - QMetaType::FirstGuiType].constructor; - } else if (QTypeModuleInfo::IsWidget) { - if (!qMetaTypeWidgetsHelper) - return 0; - ctor = qMetaTypeWidgetsHelper[type - QMetaType::FirstWidgetsType].constructor; - } else - return customTypeConstructor(type, where, copy); + if (QTypeModuleInfo::IsGui) + return Q_LIKELY(qMetaTypeGuiHelper) ? qMetaTypeGuiHelper[type - QMetaType::FirstGuiType].constructor(where, copy) : 0; - return ctor(where, copy); + if (QTypeModuleInfo::IsWidget) + return Q_LIKELY(qMetaTypeWidgetsHelper) ? qMetaTypeWidgetsHelper[type - QMetaType::FirstWidgetsType].constructor(where, copy) : 0; + + // This point can be reached only for known types that definition is not available, for example + // in bootstrap mode. We have no other choice then ignore it. + return 0; } }; public: @@ -1367,15 +1385,15 @@ public: private: static void *customTypeConstructor(const int type, void *where, const void *copy) { - QMetaType::Constructor ctor = 0; + QMetaType::Constructor ctor; const QVector * const ct = customTypes(); { QReadLocker locker(customTypesLock()); - if (type < QMetaType::User || !ct || ct->count() <= type - QMetaType::User) + if (Q_UNLIKELY(type < QMetaType::User || !ct || ct->count() <= type - QMetaType::User)) return 0; ctor = ct->at(type - QMetaType::User).constructor; } - return ctor ? ctor(where, copy) : 0; + return ctor(where, copy); } const int m_type; @@ -1428,20 +1446,18 @@ class TypeDestructor { struct DestructorImpl { static void Destruct(const int type, void *where) { - QMetaType::Destructor dtor = 0; if (QTypeModuleInfo::IsGui) { - if (!qMetaTypeGuiHelper) - return; - dtor = qMetaTypeGuiHelper[type - QMetaType::FirstGuiType].destructor; - } else if (QTypeModuleInfo::IsWidget) { - if (!qMetaTypeWidgetsHelper) - return; - dtor = qMetaTypeWidgetsHelper[type - QMetaType::FirstWidgetsType].destructor; - } else { - customTypeDestructor(type, where); + if (Q_LIKELY(qMetaTypeGuiHelper)) + qMetaTypeGuiHelper[type - QMetaType::FirstGuiType].destructor(where); return; } - dtor(where); + if (QTypeModuleInfo::IsWidget) { + if (Q_LIKELY(qMetaTypeWidgetsHelper)) + qMetaTypeWidgetsHelper[type - QMetaType::FirstWidgetsType].destructor(where); + return; + } + // This point can be reached only for known types that definition is not available, for example + // in bootstrap mode. We have no other choice then ignore it. } }; public: @@ -1457,16 +1473,14 @@ public: private: static void customTypeDestructor(const int type, void *where) { - QMetaType::Destructor dtor = 0; + QMetaType::Destructor dtor; const QVector * const ct = customTypes(); { QReadLocker locker(customTypesLock()); - if (type < QMetaType::User || !ct || ct->count() <= type - QMetaType::User) + if (Q_UNLIKELY(type < QMetaType::User || !ct || ct->count() <= type - QMetaType::User)) return; dtor = ct->at(type - QMetaType::User).destructor; } - if (!dtor) - return; dtor(where); } @@ -1503,16 +1517,15 @@ class SizeOf { struct SizeOfImpl { static int Size(const int type) { - if (QTypeModuleInfo::IsGui) { - if (!qMetaTypeGuiHelper) - return 0; - return qMetaTypeGuiHelper[type - QMetaType::FirstGuiType].size; - } else if (QTypeModuleInfo::IsWidget) { - if (!qMetaTypeWidgetsHelper) - return 0; - return qMetaTypeWidgetsHelper[type - QMetaType::FirstWidgetsType].size; - } - return customTypeSizeOf(type); + if (QTypeModuleInfo::IsGui) + return Q_LIKELY(qMetaTypeGuiHelper) ? qMetaTypeGuiHelper[type - QMetaType::FirstGuiType].size : 0; + + if (QTypeModuleInfo::IsWidget) + return Q_LIKELY(qMetaTypeWidgetsHelper) ? qMetaTypeWidgetsHelper[type - QMetaType::FirstWidgetsType].size : 0; + + // This point can be reached only for known types that definition is not available, for example + // in bootstrap mode. We have no other choice then ignore it. + return 0; } }; @@ -1529,7 +1542,7 @@ private: { const QVector * const ct = customTypes(); QReadLocker locker(customTypesLock()); - if (type < QMetaType::User || !ct || ct->count() <= type - QMetaType::User) + if (Q_UNLIKELY(type < QMetaType::User || !ct || ct->count() <= type - QMetaType::User)) return 0; return ct->at(type - QMetaType::User).size; } @@ -1575,7 +1588,15 @@ class Flags { static quint32 Flags(const int type) { - return Flags::undefinedTypeFlags(type); + if (QTypeModuleInfo::IsGui) + return Q_LIKELY(qMetaTypeGuiHelper) ? qMetaTypeGuiHelper[type - QMetaType::FirstGuiType].flags : 0; + + if (QTypeModuleInfo::IsWidget) + return Q_LIKELY(qMetaTypeWidgetsHelper) ? qMetaTypeWidgetsHelper[type - QMetaType::FirstWidgetsType].flags : 0; + + // This point can be reached only for known types that definition is not available, for example + // in bootstrap mode. We have no other choice then ignore it. + return 0; } }; public: @@ -1584,31 +1605,21 @@ public: {} template quint32 delegate(const T*) { return FlagsImpl::Flags(m_type); } + quint32 delegate(const void*) { return 0; } quint32 delegate(const QMetaTypeSwitcher::UnknownType*) { return customTypeFlags(m_type); } private: const int m_type; static quint32 customTypeFlags(const int type) { const QVector * const ct = customTypes(); - if (!ct) + if (Q_UNLIKELY(!ct)) return 0; QReadLocker locker(customTypesLock()); - if (ct->count() <= type - QMetaType::User) + if (Q_UNLIKELY(ct->count() <= type - QMetaType::User)) return 0; return ct->at(type - QMetaType::User).flags; } - static quint32 undefinedTypeFlags(const int type); }; - -quint32 Flags::undefinedTypeFlags(const int type) -{ - if (type >= QMetaType::FirstGuiType && type <= QMetaType::LastGuiType) - return qMetaTypeGuiHelper ? qMetaTypeGuiHelper[type - QMetaType::FirstGuiType].flags : 0; - else if (type >= QMetaType::FirstWidgetsType && type <= QMetaType::LastWidgetsType) - return qMetaTypeWidgetsHelper ? qMetaTypeWidgetsHelper[type - QMetaType::FirstWidgetsType].flags : 0; - return customTypeFlags(type); -} - } // namespace /*! @@ -1634,6 +1645,11 @@ QMetaType::TypeFlags QMetaType::typeFlags(int type) public default constructor, a public copy constructor and a public destructor can be registered. + This function requires that \c{T} is a fully defined type at the point + where the function is called. For pointer types, it also requires that the + pointed to type is fully defined. Use Q_DECLARE_OPAQUE_POINTER() to be able + to register pointers to forward declared types. + After a type has been registered, you can create and destroy objects of that type dynamically at run-time. @@ -1737,4 +1753,174 @@ QMetaType::TypeFlags QMetaType::typeFlags(int type) \sa Q_DECLARE_METATYPE(), QMetaType::type() */ +namespace { +class TypeInfo { + template::IsAccepted> + struct TypeInfoImpl + { + TypeInfoImpl(const uint /* type */, QMetaTypeInterface &info) + { + QMetaTypeInterface tmp = QT_METATYPE_INTERFACE_INIT_NO_DATASTREAM(T); + info = tmp; + } + }; + + template + struct TypeInfoImpl + { + TypeInfoImpl(const uint type, QMetaTypeInterface &info) + { + if (QTypeModuleInfo::IsGui) { + if (Q_LIKELY(qMetaTypeGuiHelper)) + info = qMetaTypeGuiHelper[type - QMetaType::FirstGuiType]; + return; + } + if (QTypeModuleInfo::IsWidget) { + if (Q_LIKELY(qMetaTypeWidgetsHelper)) + info = qMetaTypeWidgetsHelper[type - QMetaType::FirstWidgetsType]; + return; + } + } + }; +public: + QMetaTypeInterface info; + TypeInfo(const uint type) + : m_type(type) + { + QMetaTypeInterface tmp = QT_METATYPE_INTERFACE_INIT_EMPTY(); + info = tmp; + } + template + void delegate(const T*) { TypeInfoImpl(m_type, info); } + void delegate(const void*) {} + void delegate(const QMetaTypeSwitcher::UnknownType*) { customTypeInfo(m_type); } +private: + void customTypeInfo(const uint type) + { + const QVector * const ct = customTypes(); + if (Q_UNLIKELY(!ct)) + return; + QReadLocker locker(customTypesLock()); + if (Q_LIKELY(uint(ct->count()) > type - QMetaType::User)) + info = ct->at(type - QMetaType::User); + } + + const uint m_type; +}; +} // namespace + +QMetaType QMetaType::typeInfo(const int type) +{ + TypeInfo typeInfo(type); + QMetaTypeSwitcher::switcher(typeInfo, type, 0); + return typeInfo.info.creator || !type ? QMetaType(QMetaType::NoExtensionFlags + , static_cast(0) // typeInfo::info is a temporary variable, we can't return address of it. + , typeInfo.info.creator + , typeInfo.info.deleter + , typeInfo.info.saveOp + , typeInfo.info.loadOp + , typeInfo.info.constructor + , typeInfo.info.destructor + , typeInfo.info.size + , typeInfo.info.flags + , type) + : QMetaType(-1); +} + +QMetaType::QMetaType(const int typeId) + : m_typeId(typeId) +{ + if (Q_UNLIKELY(typeId == -1)) { + // Constructs invalid QMetaType instance. + m_extensionFlags = 0xffffffff; + Q_ASSERT(!isValid()); + } else { + // TODO it can be better. + *this = QMetaType::typeInfo(typeId); + if (m_typeId > 0 && !m_creator) { + m_extensionFlags = 0xffffffff; + m_typeId = -1; + } + if (m_typeId == QMetaType::Void) { + m_extensionFlags = CreateEx | DestroyEx | ConstructEx | DestructEx; + } + } +} + +QMetaType::QMetaType(const QMetaType &other) + : m_creator(other.m_creator) + , m_deleter(other.m_deleter) + , m_saveOp(other.m_saveOp) + , m_loadOp(other.m_loadOp) + , m_constructor(other.m_constructor) + , m_destructor(other.m_destructor) + , m_extension(other.m_extension) // space reserved for future use + , m_size(other.m_size) + , m_typeFlags(other.m_typeFlags) + , m_extensionFlags(other.m_extensionFlags) + , m_typeId(other.m_typeId) +{} + +QMetaType &QMetaType::operator =(const QMetaType &other) +{ + m_creator = other.m_creator; + m_deleter = other.m_deleter; + m_saveOp = other.m_saveOp; + m_loadOp = other.m_loadOp; + m_constructor = other.m_constructor; + m_destructor = other.m_destructor; + m_size = other.m_size; + m_typeFlags = other.m_typeFlags; + m_extensionFlags = other.m_extensionFlags; + m_extension = other.m_extension; // space reserved for future use + m_typeId = other.m_typeId; + return *this; +} + +void QMetaType::ctor(const QMetaTypeInterface *info) +{ + // Special case for Void type, the type is valid but not constructible. + // In future we may consider to remove this assert and extend this function to initialize + // differently m_extensionFlags for different types. Currently it is not needed. + Q_ASSERT(m_typeId == QMetaType::Void); + Q_UNUSED(info); + m_extensionFlags = CreateEx | DestroyEx | ConstructEx | DestructEx; +} + +void QMetaType::dtor() +{} + +void *QMetaType::createExtended(const void *copy) const +{ + Q_UNUSED(copy); + return 0; +} + +void QMetaType::destroyExtended(void *data) const +{ + Q_UNUSED(data); +} + +void *QMetaType::constructExtended(void *where, const void *copy) const +{ + Q_UNUSED(where); + Q_UNUSED(copy); + return 0; +} + +void QMetaType::destructExtended(void *data) const +{ + Q_UNUSED(data); +} + +uint QMetaType::sizeExtended() const +{ + return 0; +} + +QMetaType::TypeFlags QMetaType::flagsExtended() const +{ + return 0; +} + QT_END_NAMESPACE diff --git a/src/corelib/kernel/qmetatype.h b/src/corelib/kernel/qmetatype.h index 0ea9d26394c..4af77fcedc7 100644 --- a/src/corelib/kernel/qmetatype.h +++ b/src/corelib/kernel/qmetatype.h @@ -177,13 +177,22 @@ QT_BEGIN_NAMESPACE TypeName = Id, class QDataStream; +class QMetaTypeInterface; class Q_CORE_EXPORT QMetaType { + enum ExtensionFlag { NoExtensionFlags, + CreateEx = 0x1, DestroyEx = 0x2, + ConstructEx = 0x4, DestructEx = 0x8, + NameEx = 0x10, SizeEx = 0x20, + CtorEx = 0x40, DtorEx = 0x80, + FlagsEx = 0x100 + }; public: enum Type { // these are merged with QVariant QT_FOR_EACH_STATIC_TYPE(QT_DEFINE_METATYPE_ID) + FirstCoreType = Void, LastCoreType = QModelIndex, FirstGuiType = QFont, LastGuiType = QPolygonF, @@ -194,7 +203,7 @@ public: // This logic must match the one in qglobal.h #if defined(QT_COORD_TYPE) QReal = 0, -#elif defined(QT_NO_FPU) || defined(QT_ARCH_ARM) || defined(QT_ARCH_WINDOWSCE) +#elif defined(QT_NO_FPU) || defined(Q_PROCESSOR_ARM) || defined(Q_OS_WINCE) QReal = Float, #else QReal = Double, @@ -217,9 +226,9 @@ public: typedef void (*Destructor)(void *); typedef void *(*Constructor)(void *, const void *); -#ifndef QT_NO_DATASTREAM typedef void (*SaveOperator)(QDataStream &, const void *); typedef void (*LoadOperator)(QDataStream &, void *); +#ifndef QT_NO_DATASTREAM static void registerStreamOperators(const char *typeName, SaveOperator saveOp, LoadOperator loadOp); static void registerStreamOperators(int type, SaveOperator saveOp, @@ -247,12 +256,61 @@ public: static void destroy(int type, void *data); static void *construct(int type, void *where, const void *copy); static void destruct(int type, void *where); - static void unregisterType(const char *typeName); #ifndef QT_NO_DATASTREAM static bool save(QDataStream &stream, int type, const void *data); static bool load(QDataStream &stream, int type, void *data); #endif + + QMetaType(const int type); + inline ~QMetaType(); + + inline bool isValid() const; + inline bool isRegistered() const; + inline int sizeOf() const; + inline TypeFlags flags() const; + + inline void *create(const void *copy = 0) const; + inline void destroy(void *data) const; + inline void *construct(void *where, const void *copy = 0) const; + inline void destruct(void *data) const; +private: + static QMetaType typeInfo(const int type); + inline QMetaType(const ExtensionFlag extensionFlags, const QMetaTypeInterface *info, + Creator creator, + Deleter deleter, + SaveOperator saveOp, + LoadOperator loadOp, + Constructor constructor, + Destructor destructor, + uint sizeOf, + uint theTypeFlags, + int typeId); + QMetaType(const QMetaType &other); + QMetaType &operator =(const QMetaType &); + inline bool isExtended(const ExtensionFlag flag) const { return m_extensionFlags & flag; } + + // Methods used for future binary compatibile extensions + void ctor(const QMetaTypeInterface *info); + void dtor(); + uint sizeExtended() const; + QMetaType::TypeFlags flagsExtended() const; + void *createExtended(const void *copy = 0) const; + void destroyExtended(void *data) const; + void *constructExtended(void *where, const void *copy = 0) const; + void destructExtended(void *data) const; + + Creator m_creator; + Deleter m_deleter; + SaveOperator m_saveOp; + LoadOperator m_loadOp; + Constructor m_constructor; + Destructor m_destructor; + void *m_extension; // space reserved for future use + uint m_size; + uint m_typeFlags; + uint m_extensionFlags; + int m_typeId; }; #undef QT_DEFINE_METATYPE_ID @@ -472,6 +530,16 @@ inline int qRegisterMetaTypeStreamOperators() } #endif +#define Q_DECLARE_OPAQUE_POINTER(POINTER) \ + QT_BEGIN_NAMESPACE namespace QtPrivate { \ + template <> \ + struct IsPointerToTypeDerivedFromQObject \ + { \ + enum { Value = false }; \ + }; \ + } QT_END_NAMESPACE \ + /**/ + #define Q_DECLARE_METATYPE(TYPE) \ QT_BEGIN_NAMESPACE \ template <> \ @@ -531,7 +599,7 @@ struct QMetaTypeId< SINGLE_ARG_TEMPLATE > \ { \ static QBasicAtomicInt metatype_id = Q_BASIC_ATOMIC_INITIALIZER(0); \ if (!metatype_id.load()) \ - metatype_id.storeRelease(qRegisterMetaType< SINGLE_ARG_TEMPLATE >( QByteArray(QByteArray(#SINGLE_ARG_TEMPLATE "<") + QMetaType::typeName(qMetaTypeId()) + ">"), \ + metatype_id.storeRelease(qRegisterMetaType< SINGLE_ARG_TEMPLATE >( QByteArray(QByteArray(#SINGLE_ARG_TEMPLATE "<") + QMetaType::typeName(qMetaTypeId()) + ">").constData(), \ reinterpret_cast< SINGLE_ARG_TEMPLATE *>(quintptr(-1)))); \ return metatype_id.loadAcquire(); \ } \ @@ -545,6 +613,91 @@ Q_DECLARE_METATYPE_TEMPLATE_1ARG(QSet) Q_DECLARE_METATYPE_TEMPLATE_1ARG(QSharedPointer) Q_DECLARE_METATYPE_TEMPLATE_1ARG(QLinkedList) +inline QMetaType::QMetaType(const ExtensionFlag extensionFlags, const QMetaTypeInterface *info, + Creator creator, + Deleter deleter, + SaveOperator saveOp, + LoadOperator loadOp, + Constructor constructor, + Destructor destructor, + uint size, + uint theTypeFlags, + int typeId) + : m_creator(creator) + , m_deleter(deleter) + , m_saveOp(saveOp) + , m_loadOp(loadOp) + , m_constructor(constructor) + , m_destructor(destructor) + , m_size(size) + , m_typeFlags(theTypeFlags) + , m_extensionFlags(extensionFlags) + , m_typeId(typeId) +{ + if (Q_UNLIKELY(isExtended(CtorEx) || typeId == QMetaType::Void)) + ctor(info); +} + +inline QMetaType::~QMetaType() +{ + if (Q_UNLIKELY(isExtended(DtorEx))) + dtor(); +} + +inline bool QMetaType::isValid() const +{ + return m_typeId >= 0; +} + +inline bool QMetaType::isRegistered() const +{ + return isValid(); +} + +inline void *QMetaType::create(const void *copy) const +{ + if (Q_UNLIKELY(isExtended(CreateEx))) + return createExtended(copy); + return m_creator(copy); +} + +inline void QMetaType::destroy(void *data) const +{ + if (Q_UNLIKELY(isExtended(DestroyEx))) + return destroyExtended(data); + m_deleter(data); +} + +inline void *QMetaType::construct(void *where, const void *copy) const +{ + if (Q_UNLIKELY(isExtended(ConstructEx))) + return constructExtended(where, copy); + return m_constructor(where, copy); +} + +inline void QMetaType::destruct(void *data) const +{ + if (Q_UNLIKELY(isExtended(DestructEx))) + return destructExtended(data); + if (Q_UNLIKELY(!data)) + return; + m_destructor(data); +} + +inline int QMetaType::sizeOf() const +{ + if (Q_UNLIKELY(isExtended(SizeEx))) + return sizeExtended(); + return m_size; +} + +inline QMetaType::TypeFlags QMetaType::flags() const +{ + if (Q_UNLIKELY(isExtended(FlagsEx))) + return flagsExtended(); + return QMetaType::TypeFlags(m_typeFlags); +} + QT_END_NAMESPACE diff --git a/src/corelib/kernel/qmetatype_p.h b/src/corelib/kernel/qmetatype_p.h index c292f117648..e48c5d3033d 100644 --- a/src/corelib/kernel/qmetatype_p.h +++ b/src/corelib/kernel/qmetatype_p.h @@ -132,10 +132,8 @@ public: } static void deleter(T *t) { delete t; } - #ifndef QT_NO_DATASTREAM static void saver(QDataStream &stream, const T *t) { stream << *t; } static void loader(QDataStream &stream, T *t) { stream >> *t; } - #endif // QT_NO_DATASTREAM static void destructor(T *t) { Q_UNUSED(t) // Silence MSVC that warns for POD types. @@ -151,37 +149,76 @@ public: QMetaType::Creator creator; QMetaType::Deleter deleter; -#ifndef QT_NO_DATASTREAM QMetaType::SaveOperator saveOp; QMetaType::LoadOperator loadOp; -#endif QMetaType::Constructor constructor; QMetaType::Destructor destructor; int size; quint32 flags; // same as QMetaType::TypeFlags }; +template<> +struct QMetaTypeInterface::Impl { + static void *creator(const void *) { return 0; } + static void deleter(void *) {} + static void saver(QDataStream &, const void *) {} + static void loader(QDataStream &, void *) {} + static void destructor(void *){} + static void *constructor(void *, const void *) { return 0; } +}; + #ifndef QT_NO_DATASTREAM # define QT_METATYPE_INTERFACE_INIT_DATASTREAM_IMPL(Type) \ /*saveOp*/(reinterpret_cast(QMetaTypeInterface::Impl::saver)), \ /*loadOp*/(reinterpret_cast(QMetaTypeInterface::Impl::loader)), +# define QT_METATYPE_INTERFACE_INIT_EMPTY_DATASTREAM_IMPL(Type) \ + /*saveOp*/ 0, \ + /*loadOp*/ 0, #else -# define QT_METATYPE_INTERFACE_INIT_DATASTREAM_IMPL(Type) +# define QT_METATYPE_INTERFACE_INIT_EMPTY_DATASTREAM_IMPL(Type) \ + /*saveOp*/ 0, \ + /*loadOp*/ 0, +# define QT_METATYPE_INTERFACE_INIT_DATASTREAM_IMPL(Type) \ + QT_METATYPE_INTERFACE_INIT_EMPTY_DATASTREAM_IMPL(Type) #endif -#define QT_METATYPE_INTERFACE_INIT(Type) \ +#define QT_METATYPE_INTERFACE_INIT_IMPL(Type, DATASTREAM_DELEGATE) \ { \ /*creator*/(reinterpret_cast(QMetaTypeInterface::Impl::creator)), \ /*deleter*/(reinterpret_cast(QMetaTypeInterface::Impl::deleter)), \ - QT_METATYPE_INTERFACE_INIT_DATASTREAM_IMPL(Type) \ + DATASTREAM_DELEGATE(Type) \ /*constructor*/(reinterpret_cast(QMetaTypeInterface::Impl::constructor)), \ /*destructor*/(reinterpret_cast(QMetaTypeInterface::Impl::destructor)), \ - /*size*/(sizeof(Type)), \ + /*size*/(QTypeInfo::sizeOf), \ /*flags*/(!QTypeInfo::isStatic * QMetaType::MovableType) \ | (QTypeInfo::isComplex * QMetaType::NeedsConstruction) \ | (QTypeInfo::isComplex * QMetaType::NeedsDestruction) \ } + +/* These QT_METATYPE_INTERFACE_INIT* macros are used to initialize QMetaTypeInterface instance. + + - QT_METATYPE_INTERFACE_INIT(Type) -> It takes Type argument and creates all necessary wrapper functions for the Type, + it detects if QT_NO_DATASTREAM was defined. Probably it is the macro that you want to use. + + - QT_METATYPE_INTERFACE_INIT_EMPTY() -> It initializes an empty QMetaTypeInterface instance. + + - QT_METATYPE_INTERFACE_INIT_NO_DATASTREAM(Type) -> Temporary workaround for missing auto-detection of data stream + operators. It creates same instance as QT_METATYPE_INTERFACE_INIT(Type) but with null stream operators callbacks. + */ +#define QT_METATYPE_INTERFACE_INIT(Type) QT_METATYPE_INTERFACE_INIT_IMPL(Type, QT_METATYPE_INTERFACE_INIT_DATASTREAM_IMPL) +#define QT_METATYPE_INTERFACE_INIT_NO_DATASTREAM(Type) QT_METATYPE_INTERFACE_INIT_IMPL(Type, QT_METATYPE_INTERFACE_INIT_EMPTY_DATASTREAM_IMPL) +#define QT_METATYPE_INTERFACE_INIT_EMPTY() \ +{ \ + /*creator*/ 0, \ + /*deleter*/ 0, \ + QT_METATYPE_INTERFACE_INIT_EMPTY_DATASTREAM_IMPL() \ + /*constructor*/ 0, \ + /*destructor*/ 0, \ + /*size*/ 0, \ + /*flags*/ 0 \ +} + QT_END_NAMESPACE #endif // QMETATYPE_P_H diff --git a/src/corelib/kernel/qmimedata.cpp b/src/corelib/kernel/qmimedata.cpp index 25e2b3532b8..cfe985da26e 100644 --- a/src/corelib/kernel/qmimedata.cpp +++ b/src/corelib/kernel/qmimedata.cpp @@ -105,6 +105,28 @@ QVariant QMimeDataPrivate::retrieveTypedData(const QString &format, QVariant::Ty Q_Q(const QMimeData); QVariant data = q->retrieveData(format, type); + + // Text data requested: fallback to URL data if available + if (format == QLatin1String("text/plain") && !data.isValid()) { + data = retrieveTypedData(QLatin1String("text/uri-list"), QVariant::List); + if (data.type() == QVariant::Url) { + data = QVariant(data.toUrl().toDisplayString()); + } else if (data.type() == QVariant::List) { + QString text; + int numUrls = 0; + const QList list = data.toList(); + for (int i = 0; i < list.size(); ++i) { + if (list.at(i).type() == QVariant::Url) { + text.append(list.at(i).toUrl().toDisplayString() + QLatin1Char('\n')); + ++numUrls; + } + } + if (numUrls == 1) + text.chop(1); // no final '\n' if there's only one URL + data = QVariant(text); + } + } + if (data.type() == type || !data.isValid()) return data; @@ -326,6 +348,10 @@ QList QMimeData::urls() const URLs correspond to the MIME type \c text/uri-list. + Since Qt 5.0, setUrls also exports the urls as plain text, if setText + was not called before, to make it possible to drop them into any lineedit + and text editor. + \sa hasUrls(), setData() */ void QMimeData::setUrls(const QList &urls) @@ -385,7 +411,7 @@ void QMimeData::setText(const QString &text) */ bool QMimeData::hasText() const { - return hasFormat(QLatin1String("text/plain")); + return hasFormat(QLatin1String("text/plain")) || hasUrls(); } /*! diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp index 43773554863..252a7138726 100644 --- a/src/corelib/kernel/qobject.cpp +++ b/src/corelib/kernel/qobject.cpp @@ -2247,7 +2247,7 @@ static inline void check_and_warn_compat(const QMetaObject *sender, const QMetaM call qRegisterMetaType() to register the data type before you establish the connection. - \sa disconnect(), sender(), qRegisterMetaType() + \sa disconnect(), sender(), qRegisterMetaType(), Q_DECLARE_METATYPE() */ QMetaObject::Connection QObject::connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, diff --git a/src/corelib/kernel/qobjectdefs.h b/src/corelib/kernel/qobjectdefs.h index 315619761c0..0b1fa8839f8 100644 --- a/src/corelib/kernel/qobjectdefs.h +++ b/src/corelib/kernel/qobjectdefs.h @@ -76,6 +76,7 @@ class QString; # define emit #endif #define Q_CLASSINFO(name, value) +#define Q_PLUGIN_METADATA(x) #define Q_INTERFACES(x) #define Q_PROPERTY(text) #define Q_PRIVATE_PROPERTY(d, text) diff --git a/src/corelib/kernel/qvariant.cpp b/src/corelib/kernel/qvariant.cpp index cfaf22c1464..d0470ff796a 100644 --- a/src/corelib/kernel/qvariant.cpp +++ b/src/corelib/kernel/qvariant.cpp @@ -787,7 +787,8 @@ const QVariant::Handler qt_dummy_variant_handler = { static void customConstruct(QVariant::Private *d, const void *copy) { - const uint size = QMetaType::sizeOf(d->type); + const QMetaType type(d->type); + const uint size = type.sizeOf(); if (!size) { d->type = QVariant::Invalid; return; @@ -795,11 +796,11 @@ static void customConstruct(QVariant::Private *d, const void *copy) // this logic should match with QVariantIntegrator::CanUseInternalSpace if (size <= sizeof(QVariant::Private::Data) - && (QMetaType::typeFlags(d->type) & QMetaType::MovableType)) { - QMetaType::construct(d->type, &d->data.ptr, copy); + && (type.flags() & QMetaType::MovableType)) { + type.construct(&d->data.ptr, copy); d->is_shared = false; } else { - void *ptr = QMetaType::create(d->type, copy); + void *ptr = type.create(copy); d->is_shared = true; d->data.shared = new QVariant::PrivateShared(ptr); } @@ -1608,7 +1609,7 @@ QVariant::Type QVariant::nameToType(const char *name) return Invalid; int metaType = QMetaType::type(name); - return metaType <= int(LastGuiType) ? QVariant::Type(metaType) : UserType; + return metaType <= int(UserType) ? QVariant::Type(metaType) : UserType; } #ifndef QT_NO_DATASTREAM @@ -1670,7 +1671,9 @@ void QVariant::load(QDataStream &s) return; typeId = mapIdFromQt3ToCurrent[typeId]; } else if (s.version() < QDataStream::Qt_5_0) { - if (typeId >= 128 && typeId != QVariant::UserType) { + if (typeId == 127 /* QVariant::UserType */) { + typeId = QMetaType::User; + } else if (typeId >= 128 && typeId != QVariant::UserType) { // In Qt4 id == 128 was FirstExtCoreType. In Qt5 ExtCoreTypes set was merged to CoreTypes // by moving all ids down by 97. typeId -= 97; @@ -1741,7 +1744,9 @@ void QVariant::save(QDataStream &s) const return; } } else if (s.version() < QDataStream::Qt_5_0) { - if (typeId >= 128 - 97 && typeId <= LastCoreType) { + if (typeId == QMetaType::User) { + typeId = 127; // QVariant::UserType had this value in Qt4 + } else if (typeId >= 128 - 97 && typeId <= LastCoreType) { // In Qt4 id == 128 was FirstExtCoreType. In Qt5 ExtCoreTypes set was merged to CoreTypes // by moving all ids down by 97. typeId += 97; @@ -1762,7 +1767,7 @@ void QVariant::save(QDataStream &s) const s << typeId; if (s.version() >= QDataStream::Qt_4_2) s << qint8(d.is_null); - if (typeId == QVariant::UserType) { + if (d.type >= QVariant::UserType) { s << QMetaType::typeName(userType()); } diff --git a/src/corelib/kernel/qvariant.h b/src/corelib/kernel/qvariant.h index 07ef4dc41ed..089d0d643b1 100644 --- a/src/corelib/kernel/qvariant.h +++ b/src/corelib/kernel/qvariant.h @@ -49,6 +49,7 @@ #include #include #include +#include QT_BEGIN_HEADER @@ -88,6 +89,39 @@ inline QVariant qVariantFromValue(const T &); template inline T qvariant_cast(const QVariant &); +namespace QtPrivate { + + template + struct ObjectInvoker + { + static ReturnType invoke(Argument a) + { + return Derived::object(a); + } + }; + + template + struct MetaTypeInvoker + { + static ReturnType invoke(Argument a) + { + return Derived::metaType(a); + } + }; + + template ::Value> + struct TreatAsQObjectBeforeMetaType : ObjectInvoker + { + }; + + template + struct TreatAsQObjectBeforeMetaType : MetaTypeInvoker + { + }; + + template struct QVariantValueHelper; +} + class Q_CORE_EXPORT QVariant { public: @@ -153,7 +187,7 @@ class Q_CORE_EXPORT QVariant Icon = QMetaType::QIcon, SizePolicy = QMetaType::QSizePolicy, - UserType = 127, + UserType = QMetaType::User, LastType = 0xffffffff // need this so that gcc >= 3.4 allocates 32 bits for Type }; @@ -375,14 +409,15 @@ protected: #ifndef QT_NO_DEBUG_STREAM friend Q_CORE_EXPORT QDebug operator<<(QDebug, const QVariant &); #endif - Private d; #ifndef Q_NO_TEMPLATE_FRIENDS template friend inline T qvariant_cast(const QVariant &); + template friend struct QtPrivate::QVariantValueHelper; protected: #else public: #endif + Private d; void create(int type, const void *copy); bool cmp(const QVariant &other) const; bool convert(const int t, void *ptr) const; @@ -481,18 +516,35 @@ inline bool operator!=(const QVariant &v1, const QVariantComparisonHelper &v2) } #endif +namespace QtPrivate { + template + struct QVariantValueHelper : TreatAsQObjectBeforeMetaType, T, const QVariant &, T> + { + static T metaType(const QVariant &v) + { + const int vid = qMetaTypeId(static_cast(0)); + if (vid == v.userType()) + return *reinterpret_cast(v.constData()); + if (vid < int(QMetaType::User)) { + T t; + if (v.convert(QVariant::Type(vid), &t)) + return t; + } + return T(); + } +#ifndef QT_NO_QOBJECT + static T object(const QVariant &v) + { + return qobject_cast(QMetaType::typeFlags(v.userType()) & QMetaType::PointerToQObject ? v.d.data.o : 0); + } +#endif + }; +} + #ifndef QT_MOC template inline T qvariant_cast(const QVariant &v) { - const int vid = qMetaTypeId(static_cast(0)); - if (vid == v.userType()) - return *reinterpret_cast(v.constData()); - if (vid < int(QMetaType::User)) { - T t; - if (v.convert(vid, &t)) - return t; - } - return T(); + return QtPrivate::QVariantValueHelper::invoke(v); } template<> inline QVariant qvariant_cast(const QVariant &v) diff --git a/src/corelib/kernel/qvariant_p.h b/src/corelib/kernel/qvariant_p.h index 7065bcfd6b2..cdae8997a7a 100644 --- a/src/corelib/kernel/qvariant_p.h +++ b/src/corelib/kernel/qvariant_p.h @@ -53,9 +53,6 @@ // We mean it. // -// takes a type, returns the internal void* pointer cast -// to a pointer of the input type - #include #include #include @@ -79,6 +76,8 @@ Q_STATIC_ASSERT(QVariantIntegrator::CanUseInternalSpace); #ifdef Q_CC_SUN // Sun CC picks the wrong overload, so introduce awful hack +// takes a type, returns the internal void* pointer cast +// to a pointer of the input type template inline T *v_cast(const QVariant::Private *nd, T * = 0) { @@ -348,14 +347,6 @@ public: void delegate(const QMetaTypeSwitcher::UnknownType*) { - if (m_x->type == QVariant::UserType) { - // TODO get rid of it - // And yes! we can support historical magic, unkonwn/unconstructed user type isn't that - // awesome? this QVariant::isValid will be true! - m_x->is_null = !m_copy; - m_x->is_shared = false; - return; - } qWarning("Trying to construct an instance of an invalid type, type id: %i", m_x->type); m_x->type = QVariant::Invalid; } @@ -406,8 +397,6 @@ public: void delegate(const QMetaTypeSwitcher::UnknownType*) { - if (m_d->type == QVariant::UserType) - return; qWarning("Trying to destruct an instance of an invalid type, type id: %i", m_d->type); } // Ignore nonconstructible type @@ -454,10 +443,7 @@ public: void delegate(const QMetaTypeSwitcher::UnknownType*) { - if (m_d->type == QVariant::UserType) - m_debugStream.nospace() << "QVariant::UserType"; - else - qWarning("Trying to stream an instance of an invalid type, type id: %i", m_d->type); + qWarning("Trying to stream an instance of an invalid type, type id: %i", m_d->type); } void delegate(const void*) { diff --git a/src/corelib/mimetypes/mime/packages/freedesktop.org.xml b/src/corelib/mimetypes/mime/packages/freedesktop.org.xml new file mode 100644 index 00000000000..f607f1d3ff9 --- /dev/null +++ b/src/corelib/mimetypes/mime/packages/freedesktop.org.xml @@ -0,0 +1,31966 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +]> + + + ATK inset + شكل ATK + Ustaŭka ATK + Сбор — ATK + inset ATK + Vložka ATK + ATK-indsættelse + ATK-Inset + ATK inset + inserción ATK + ATK sartzapena + ATK-osio + ATK innskot + encart ATK + intlis ATK + conxunto ATK + תוספת ATK + ATK betét + Inset ATK + Inset ATK + ATK インセット + ATK беті + ATK inset + ATK inset + ATK ielaidums + ATK-innsats + ATK-invoegsel + ATK-innskot + Wstawka ATK + Conjunto de entrada do ATK + Inset ATK + вкладка ATK + Vložka ATK + Vložka ATK + Inset ATK + ATK-inlägg + вкладка ATK + Bộ dát ATK + ATK 嵌入对象 + ATK + Andrew Toolkit + + + + + electronic book document + مستند كتاب إلكتروني + elektronnaja kniha + Документ — електронна книга + document de llibre electrònic + Dokument elektronické knihy + elektronisk bogdokument + Elektronisches Buch + documento de libro electrónico + liburu elektronikoaren dokumentua + elektroninen kirja + elektroniskbóka skjal + document livre électronique + leabhar leictreonach + documento de libro electrónico + מסמך מסוג ספר אלקטרוני + elektronikus könyvdokumentum + dokumen buku elektronik + Documento libro elettronico + 電子ブックドキュメント + электронды кітабы + 전자책 문서 + elektroninės knygos dokumentas + elektroniskās grāmatas dokuments + elektronisch boek + elektronisk bok-dokument + Dokument książki elektronicznej + documento de livro eletrônico + document carte electronică + электронная книга + Dokument elektronickej knihy + dokument elektronske knjige + Dokument libri elektronik + elektroniskt bokdokument + документ електронної книги + tài liệu cuốn sách điện tử + 电子书文档 + 電子書文件 + + + + + + + + + + + + + Adobe Illustrator document + مستند أدوبي المصور + Dakument Adobe Illustrator + Документ — Adobe Illustrator + document d'Adobe Illustrator + Dokument Adobe Illustrator + Adobe Illustrator-dokument + Adobe-Illustrator-Dokument + έγγραφο Adobe Illustrator + Adobe Illustrator document + dokumento de Adobe Illustrator + documento de Adobe Illustrator + Adobe Illustrator dokumentua + Adobe Illustrator -asiakirja + Adobe Illustrator skjal + document Adobe Illustrator + cáipéis Adobe Illustrator + documento de Adobe Ilustrator + מסמך Adobe Ill + Adobe Illustrator-dokumentum + Dokumen Adobe Illustrator + Documento Adobe Illustrator + Adobe Illustrator ドキュメント + Adobe Illustrator құжаты + 어도비 일러스트레이터 문서 + Adobe Illustrator dokumentas + Adobe Illustrator dokuments + Dokumen Adobe Illustrator + Adobe Illustrator-dokument + Adobe Illustrator-document + Adobe Illustrator-dokument + Dokument Adobe Illustrator + documento Adobe Illustrator + Documento do Adobe Illustrator + Document Adobe Illustrator + документ Adobe Illustrator + Dokument Adobe Illustrator + Dokument Adobe Illustrator + Dokument Adobe Illustrator + Адоуби Илустратор документ + Adobe Illustrator-dokument + документ Adobe Illustrator + Tài liệu Adobe Illustrator + Adobe Illustrator 文档 + Adobe Illustrator 文件 + + + + + Macintosh BinHex-encoded file + ملف Macintosh BinHex مشفر + Macintosh BinHex-kodlanmış fayl + Fajł Macintosh, BinHex-zakadavany + Файл — кодиран във формат BinHex за Macintosh + fitxer codificat BinHex de Macintosh + Soubor kódovaný pomocí Macintosh BinHex + Ffeil BinHex-amgodwyd Macintosh + Macintosh BinHex-kodet fil + Macintosh-Datei (BinHex-kodiert) + αρχείο Macintosh κωδικοποίησης BinHex + Macintosh BinHex-encoded file + dosiero kodigita laŭ Macintosh BinHex + archivo Macintosh codificado con BinHex + Macintosh BinHex-ekin kodetutako fitxategia + Macintosh BinHex -koodattu tiedosto + Macintosh BinHex-bronglað fíla + fichier codé Macintosh BinHex + comhad ionchódaithe le Macintosh BinHex + ficheiro de Macintosh codificado con BinHex + קובץ מסוג Macintosh BinHex-encoded + Macintosh BinHex kódolású fájl + Berkas tersandi Macintosh BinHex + File Macintosh codificato BinHex + Macintosh BinHex エンコードファイル + Macintosh BinHex кодталған файлы + 맥킨토시 BinHex 인코딩된 압축 파일 + Macintosh BinHex-encoded failas + Macintosh BinHex-kodēts fails + Fail terenkod-BinHex Macintosh + Macintosh BinHe-kodet arkiv + Macintosh BinHex-gecodeerd bestand + Macintosh BinHex-koda fil + Zakodowany w BinHex plik Macintosh + ficheiro codificado em BinHex de Macintosh + Arquivo Macintosh codificado com BinHex + Fișier codat Macintosh BinHex + файл (закодированный Macintosh BinHex) + Súbor kódovaný pomocou Macintosh BinHex + Kodirana datoteka Macintosh (BinHex) + File Macintosh i kodifikuar BinHex + Мекинтош BinHex-encoded датотека + Macintosh BinHex-kodad fil + файл закодований Macintosh BinHex + Tập tin đã mã hoá BinHex của Macintosh + Macintosh BinHex 编码的文件 + Macintosh BinHex 編碼檔 + + + + + + + Mathematica Notebook + مذكرة رياضيات + Natatnik Mathematica + Тетрадка — Mathematica + llibreta de notes de Mathematica + Sešit Mathematica + Mathematica Notebook + Mathematica-Dokument + Mathematica Notebook + notebook de Mathematica + Mathematica Notebook + Mathematica-muistilehtiö + Mathematica skriviblokkur + carnet de notes Mathematica + leabhar nótaí Mathematica + notebook de Mathematica + מחברת מתמטיקה + Mathematica notesz + Mathematica Notebook + Notebook Mathematica + Mathematica ノートブック + Mathematica Notebook + Mathematica 노트북 + Mathematica užrašinė + Mathematica bloknots + Mathematica notisblokk + Mathematica-notitieboek + Mathematica-notatbok + Notatnik Mathematica + Caderno do Mathematica + Carnețel Mathematica + Mathematica Notebook + Zošit Mathematica + Datoteka dokumenta Mathematica + Notebook matematike + Mathematica Notebook-dokument + математичний записник + Cuốn vở Mathematica + Mathematica 记事 + Mathematica Notebook + + + + + + + + + + + + MathML document + مستند MathML + MathML sənədi + Dakument MathML + Документ — MathML + document de MathML + Dokument MathML + Dogfen MathML + MathML-dokument + MathML-Dokument + έγγραφο MathML + MathML document + MathML-dokumento + documento MathML + MathML dokumentua + MathML-asiakirja + MathML skjal + document MathML + cáipéis MathML + documento de MathML + מסמך MathML + MathML-dokumentum + Dokumen MathML + Documento MathML + MathML ドキュメント + MathML құжаты + MathML 문서 + MathML dokumentas + MathML dokuments + Dokumen MathML + MathML-dokument + MathML-document + MathML-dokument + Dokument MathML + documento MathML + Documento do MathML + Document MathML + документ MathML + Dokument MathML + Dokument MathML + Dokument MathML + MathML документ + MathML-dokument + документ MathML + Tài liệu MathML + MathML 文档 + MathML 文件 + MathML + Mathematical Markup Language + + + + + + + mailbox file + ملف صندوق البريد + fajł paštovaj skryni + Файл — Mailbox + fitxer mailbox + Soubor mailbox + postkassefil + Mailbox-Datei + archivo de buzón de correo + mailbox fitxategia + mailbox-tiedosto + postkassafíla + fichier boîte aux lettres + comhad bhosca poist + ficheiro de caixa de correo + קובץ תיבת-דואר + mailbox fájl + berkas kotak surat + File mailbox + メールボックスファイル + пошта жәшігінің файлы + 메일함 파일 + pašto dėžutės failas + pastkastītes fails + postboksfil + mailbox-bestand + mailbox-fil + Plik poczty (Mailbox) + Arquivo de caixa de correio + fișier căsuță poștală + файл почтового ящика + Súbor mailbox + datoteka poštnega predala + File mailbox + brevlådefil + файл поштової скриньки + tập tin hộp thư + mailbox 文件 + 郵箱檔 + + + + + + + + + Metalink file + ملف ميتالنك + Изтегляне — Metalink + fitxer Metalink + Soubor metalink + Metahenvisningsfil + Metalink-Datei + Metalink-dosiero + archivo de metaenlace + Metaestekaren fitxategia + Metalink-tiedosto + Metalink fíla + fichier metalink + comhad Metalink + ficheiro Metalink + קובץ Metalink + Metalink fájl + Berkas Metalink + File Metalink + Metalink ファイル + Metalink файлы + Metalink 파일 + Metalink failas + Metalink fails + Plik Metalink + Fișier Metalink + файл Metalink + Súbor Metalink + Datoteka povezave Metalink + Metalink-fil + файл метапосилання + 元链接文件 + Metalink 檔案 + + + + + + + + + Metalink file + ملف ميتالنك + Изтегляне — Metalink + fitxer Metalink + Soubor metalink + Metahenvisningsfil + Metalink-Datei + Metalink-dosiero + archivo de metaenlace + Metaestekaren fitxategia + Metalink-tiedosto + Metalink fíla + fichier metalink + comhad Metalink + ficheiro Metalink + קובץ Metalink + Metalink fájl + Berkas Metalink + File Metalink + Metalink ファイル + Metalink файлы + Metalink 파일 + Metalink failas + Metalink fails + Plik Metalink + Fișier Metalink + файл Metalink + Súbor Metalink + Datoteka povezave Metalink + Metalink-fil + файл метапосилання + 元链接文件 + Metalink 檔案 + + + + + + + + + unknown + مجهول + nieviadomy + Неизвестен тип + desconegut + Neznámý + ukendt + Unbekannt + αγνωστο + unknown + nekonate + desconocido + ezezaguna + tuntematon + ókent + inconnu + anaithnid + descoñecido + לא ידוע + ismeretlen + tak diketahui + Sconosciuto + 不明 + белгісіз + 알 수 없음 + nežinoma + nezināms + Entah + ukjent + onbekend + ukjend + Nieznany typ + desconhecido + desconhecido + necunoscut + неизвестно + Neznámy + neznano + Nuk njihet + непознато + okänd + невідомо + không rõ + 未知 + 不明 + + + + ODA document + مستند ODA + ODA sənədi + Dakument ODA + Документ — ODA + document ODA + Dokument ODA + Dogfen ODA + ODA-dokument + ODA-Dokument + έγγραφο ODA + ODA document + ODA-dokumento + documento ODA + ODA dokumentua + ODA-asiakirja + ODA skjal + document ODA + cáipéis ODA + documento ODA + מסמך ODA + ODA-dokumentum + Dokumen ODA + Documento ODA + ODA ドキュメント + ODA құжаты + ODA 문서 + ODA dokumentas + ODA dokuments + Dokumen ODA + ODA-dokument + ODA-document + ODA-dokument + Dokument ODA + documento ODA + Documento ODA + Document ODA + документ ODA + Dokument ODA + Dokument ODA + Dokument ODA + ODA документ + ODA-dokument + документ ODA + Tài liệu ODA + ODA 文档 + ODA 文件 + ODA + Office Document Architecture + + + + + WWF document + Документ — WWF + document WWF + Dokument WWF + WWF-Dokument + WWF-dokumento + Documento de WWF + WWF-asiakirja + document WWF + documento de WWF + מסמך WWF + WWF dokumentum + Dokumen WWF + Documento WWF + WWF 文書 + WWF құжаты + WWF 문서 + WWF dokuments + Dokument WWF + документ WWF + Dokument WWF + WWF-dokument + документ WWF + WWF + WWF 文件 + + + + + + + PDF document + مستند PDF + Dakument PDF + Документ — PDF + document PDF + Dokument PDF + Dogfen PDF + PDF-dokument + PDF-Dokument + έγγραφο PDF + PDF document + PDF-dokumento + documento PDF + PDF dokumentua + PDF-asiakirja + PDF skjal + document PDF + cáipéis PDF + documento PDF + מסמך PDF + PDF-dokumentum + Dokumen PDF + Documento PDF + PDF ドキュメント + PDF құжаты + PDF 문서 + PDF dokumentas + PDF dokuments + Dokumen PDF + PDF-dokument + PDF-document + PDF-dokument + Dokument PDF + documento PDF + Documento PDF + Document PDF + документ PDF + Dokument PDF + Dokument PDF + Dokument PDF + PDF документ + PDF-dokument + документ PDF + Tài liệu PDF + PDF 文档 + PDF 文件 + PDF + Portable Document Format + + + + + + + + + + + XSPF playlist + قائمة تشغيل XSPF + Śpis piesień XSPF + Списък за изпълнение — XSPF + llista de reproducció XSPF + Seznam skladeb XSPF + XSPF-afspilningsliste + XSPF-Wiedergabeliste + XSPF-ludlisto + lista de reproducción XSPF + XSPF erreprodukzio-zerrenda + XSPF-soittolista + XSPF avspælingarlisti + liste de lecture XSPF + seinmliosta XSPF + lista de reprodución XSPF + רשימת השמעה XSPF + XSPF-lejátszólista + Senarai pular XSPF + Scaletta XSPF + XSPF 再生リスト + XSPF ойнау тізімі + XSPF 재생 목록 + XSPF grojaraštis + XSPF repertuārs + XSPF-spilleliste + XSPF-afspeellijst + XSPF-speleliste + Lista odtwarzania XSPF + Lista de reprodução XSPF + Listă XSPF + список воспроизведения XSPF + Zoznam skladieb XSPF + Seznam predvajanja XSPF + Listë titujsh XSPF + XSPF-spellista + список програвання XSPF + Danh mục nhạc XSPF + XSPF 播放列表 + XSPF 播放清單 + XSPF + XML Shareable Playlist Format + + + + + + + + + + + + Microsoft Windows theme pack + حزمة سمات Microsoft Works + Пакет с тема — Microsoft Windows + paquet de temes Windows de Microsoft + Balík motivů Microsoft Windows + Microsoft Windows-temapakke + Themenpaket für Microsoft Windows + paquete de tema para Microsoft Windows + Microsoft Windows-en gaiaren paketea + Microsoft Windows -teemapaketti + Microsoft Windows tema pakki + paquet de thèmes Microsoft Windows + paca téamaí Microsoft Windows + paquete de tema de Microsoft Windows + חבילת ערכות נושא של Microsoft Windows + Microsoft Windows témacsomag + Pak tema Microsoft Windows + Pacchetto temi Microsoft Windows + Microsoft Windows テーマパック + Microsoft Windows тема дестесі + 마이크로소프트 윈도우 테마 패키지 + Microsoft Windows temų paketas + Microsoft Windows tēmas paka + Pakiet motywu Microsoft Windows + Pachet de teme Microsoft Windows + пакет темы Microsoft Windows + Balík tém Microsoft Windows + Datoteka teme Microsoft Windows + Microsoft Windows-temapaket + пакунок з темою Microsoft Windows + Microsoft Windows 主题包 + 微軟視窗佈景主題包 + + + + + + GSM 06.10 audio + GSM 06.10 سمعي + Аудио — GSM 06.10 + àudio GSM 06.10 + Zvuk GSM 06.10 + GSM 06.10-lyd + GSM-06.10-Audio + sonido GSM 06.10 + GSM 06.10 audioa + GSM 06.10 -ääni + GSM 06.10 ljóður + audio GSM 06.10 + fuaim GSM 06.10 + son de GSM 06.10 + שמע GSM 06.10 + GSM 06.10 hang + Audio GSM 06.10 + Audio GSM 06.10 + GSM 06.10 オーディオ + GSM 06.10 аудиосы + GSM 06.10 오디오 + GSM 06.10 garso įrašas + GSM 06.10 audio + GSM 06.10 audio + Plik dźwiękowy GSM 06.10 + Áudio GSM 06.10 + GSM 06.10 audio + аудио GSM 06.10 + Zvuk GSM 06.10 + Zvočna datoteka GSM 06.10 + GSM 06.10-ljud + звук GSM 06.10 + Âm thanh GSM 06.10 + GSM 06.10 音频 + GSM 06.10 音訊 + GSM + Global System for Mobile communications + + + + iRiver Playlist + قائمة تشغيل iRiver + Śpis piesień iRiver + Списък за изпълнение — iRiver + llista de reproducció iRiver + Seznam skladeb iRiver + iRiver-afspilningsliste + iRiver-Wiedergabeliste + iRiver-ludlisto + lista de reproducción de iRiver + iRiver erreprodukzio-zerrenda + iRiver-soittolista + iRiver avspælingarlisti + liste de lecture iRiver + seinmliosta iRiver + lista de reprodución de iRiver + רשימת השמעה של iRiver + iRiver lejátszólista + iRiver Playlist + Scaletta iRiver + iRiver 再生リスト + iRiver ойнау тізімі + iRiver 재생 목록 + iRiver grojaraštis + iRiver repertuārs + iRiver-spilleliste + iRiver-afspeellijst + iRiver speleliste + Lista odtwarzania iRiver + Lista de reprodução do iRiver + Listă iRiver + список воспроизведения iRiver + Zoznam skladieb iRiver + Seznam predvajanja iRiver + Listë titujsh iRiver + iRiver-spellista + список програвання iRiver + danh mục nhạc iRiver + iRiver 播放列表 + iRiver 播放清單 + + + + + + + PGP/MIME-encrypted message header + ترويسة رسالة PGP/MIME-مشفرة + Zahałovak paviedamleńnia, zašyfravany ŭ PGP/MIME + Заглавна част на шифрирано съобщение — PGP/MIME + capçalera de missatge xifrat amb PGP/MIME + Záhlaví zprávy zašifrované pomocí PGP/MIME + PGP-/MIME-krypteret meddelelseshoved + PGP/MIME-verschlüsselter Nachrichtenkopf + κεφαλίδα μηνύματος κρυπτογραφημένου κατά PGP/MIME + PGP/MIME-encrypted message header + PGP/MIME-ĉifrita ĉapo de mesaĝo + cabecera de mensaje cifrado PGP/MIME + PGP/MIME enkriptatutako mezu-goiburua + PGP/MIME-salattu viestiotsikko + PGP/MIME-encrypted boð tekshøvd + en-tête de message codé PGP/MIME + ceanntásc teachtaireachta ionchódaithe le PGP/MIME + cabeceira de mensaxe cifrado PGP/MIME + כותר של קובץ מוצפן מסוג PGP/MIME + PGP/MIME titkosított üzenetfejléc + Tajuk pesan terenkripsi PGP/MIME + Intestazione messaggio PGP/MIME-encrypted + PGP/MIME 暗号化メッセージヘッダー + PGP/MIME-шифрленген мәлімдеме тақырыптамасы + PGP/MIME으로 암호화된 메시지 헤더 + PGP/MIME užšifruota žinutės antraštė + PGP/MIME-šifrēta ziņas galvene + Pengepala mesej terenkripsi PGP/MIME + PGP/MIME-kryptert meldingshode + PGP/MIME-versleutelde berichtkopregels + PGP/MIME-kryptert meldingshovud + Nagłówek listu zaszyfrowanego PGP/MIME + cabeçalho de mensagem cifrada com PGP/MIME + Cabeçalho de mensagem criptografada PGP/MIME + Antet de mesaj encriptat PGP/MIME + заголовок сообщения, зашифрованный PGP/MIME + Hlavičke správy zašifrovaná pomocou PGP/MIME + Datoteka glave šifriranega sporočila PGP/MIME + Header mesazhi të kriptuar PGP/MIME + ПГП/МИМЕ шифровано заглавље поруке + PGP/MIME-krypterat meddelandehuvud + заголовок шифрованого PGP/MIME повідомлення + Phần đầu thông điệp đã mật mã bằng PGP/MIME + PGP/MIME 加密的信件头 + PGP/MIME 加密訊息標頭 + + + + + + + + + + + PGP keys + مفاتيح PGP + PGP açarları + Klučy PGP + Ключове — PGP + claus PGP + Klíče PGP + Allweddi PGP + PGP-nøgler + PGP-Schlüssel + κλειδιά PGP + PGP keys + PGP-ŝlosiloj + claves PGP + PGP giltzak + PGP-avainrengas + PGP lyklar + clés PGP + eochracha PGP + Chaves PGP + מפתח PGP + PGP-kulcs + Kunci PGP + Chiavi PGP + PGP 鍵 + PGP кілттері + PGP 키 + PGP raktai + PGP atslēgas + Kekunci PGP + PGP-nøkler + PGP-sleutels + PGP-nøkler + Klucze PGP + chaves PGP + Chaves PGP + Chei PGP + ключи PGP + Kľúče PGP + Datoteka ključa PGP + Kyçe PGP + PGP кључ + PGP-nycklar + ключі PGP + Khoá PGP + PGP 密钥 + PGP 鑰匙 + PGP + Pretty Good Privacy + + + + + + + + + + + + + + + + detached OpenPGP signature + إمضاء OpenPGP مفصول + adłučany podpis OpenPGP + Отделен подпис — OpenPGP + signatura OpenPGP separada + Oddělený podpis OpenPGP + frigjort OpenPGP-signatur + Isolierte OpenPGP-Signatur + αποκομμένη υπογραφή OpenPGP + detached OpenPGP signature + dekroĉa OpenPGP-subskribo + firma OpenPGP separada + desuzturtako OpenPGP sinadura + erillinen OpenPGP-allekirjoitus + skild OpenPGP undirskrift + signature OpenPGP détachée + síniú OpenPGP scartha + sinatura de OpenPGP independente + חתימת OpenPGP מנותקת + leválasztott OpenPGP-aláírás + tanda tangan OpenPGP yang terlepas + Firma staccata OpenPGP + 分離 OpenPGP 署名 + бөлінген OpenPGP қолтаңбасы + 분리된 OpenPGP 서명 + neprisegtas OpenPGP parašas + atvienots OpenPGP paraksts + Tandatangan OpenPGP terlerai + frakoblet OpenPGP-signatur + losse OpenPGP-ondertekening + fråkopla OpenPGP-signatur + Oddzielony podpis OpenPGP + assinatura OpenPGP solta + assinatura OpenPGP destacada + semnătură OpenPGP detașată + отсоединённая подпись OpenPGP + Oddelený podpis OpenPGP + odpet podpis OpenPGP + Firmë e shkëputur OpenPGP + одвојени ОпенПГП потпис + frikopplad OpenPGP-signatur + відокремлений OpenPGP підпис + chữ ký OpenPGP tách rời + 分离的 OpenPGP 签名 + 分離的 OpenPGP 簽章 + + + + + + + + + S/MIME file + ملف S/MIME + S/MIME faylı + Fajł S/MIME + Файл — S/MIME + fitxer S/MIME + Soubor S/MIME + Ffeil S/MIME + S/MIME-fil + S/MIME-Datei + αρχείο S/MIME + S/MIME file + S/MIME-dosiero + archivo S/MIME + S/MIME fitxategia + S/MIME-tiedosto + S/MIME fíla + fichier S/MIME + comhad S/MIME + ficheiro S/MIME + קובץ S/MIME + S/MIME-fájl + Berkas S/MIME + File S/MIME + S/MIME ファイル + S/MIME файлы + S/MIME 파일 + S/MIME failas + S/MIME fails + Fail S/MIME + S/MIME-fil + S/MIME-bestand + S/MIME-fil + Plik S/MIME + ficheiro S/MIME + Arquivo S/MIME + Fișier S/MIME + файл S/MIME + Súbor S/MIME + Datoteka S/MIME + File S/MIME + S/MIME датотека + S/MIME-fil + файл S/MIME + Tập tin S/MIME + S/MIME 文件 + S/MIME 檔 + S/MIME + Secure/Multipurpose Internet Mail Extensions + + + + detached S/MIME signature + إمضاء S/MIME مفصول + adłučany podpis S/MIME + Отделен подпис — S/MIME + signatura S/MIME separada + Oddělený podpis S/MIME + frigjort S/MIME-signatur + Isolierte S/MIME-Signatur + αποκομμένη υπογραφή S/MIME + detached S/MIME signature + dekroĉa S/MIME-subskribo + firma S/MIME separada + desuzturtako S/MIME sinadura + erillinen S/MIME-allekirjoitus + skild S/MIME undirskrift + signature S/MIME détachée + síniú S/MIME scartha + sinatura S/MIME independente + חתימת S/MIME מנותקת + leválasztott S/MIME-aláírás + tanda tangan S/MIME yang terlepas + Firma staccata S/MIME + 分離 S/MIME 署名 + бөлінген S/MIME қолтаңбасы + 분리된 S/MIME 서명 + neprisegtas S/MIME parašas + atvienots S/MIME paraksts + Tandatangan S/MIME terlerai + frakoblet S/MIME-signatur + losse S/MIME-ondertekening + fråkopla S/MIME-signatur + Oddzielony podpis S/MIME + assinatura S/MIME solta + assinatura S/MIME destacada + semnătură S/MIME detașată + отсоединённая подпись S/MIME + Oddelený podpis S/MIME + odpet podpis S/MIME + Firmë e shkëputur S/MIME + одвојени S/MIME потпис + frikopplad S/MIME-signatur + відокремлений S/MIME підпис + chữ ký S/MIME tách rời + 分离的 S/MIME 签名 + 分離的 S/MIME 簽章 + S/MIME + Secure/Multipurpose Internet Mail Extensions + + + + + + PKCS#8 private key + رزمة الشهادة PKCS#8 + Ключ, частен — PKCS#8 + clau privada PKCS#8 + Soukromý klíč PKCS#8 + PKCS#8-privat nøgle + PKCS#8 Geheimer Schlüssel + clave privada PCKS#8 + PKCS#8 yksityinen avain + PKCS#8 privatur lykil + clé privée PKCS#8 + eochair phríobháideach PKCS#8 + Chave privada PKCS#8 + מפתח פרטי של PKCS#8 + PKCS#8 személyes kulcs + Kunci privat PKCS#8 + Chiave privata PKCS#8 + PKCS#8 秘密鍵 + PKCS#8 меншік кілті + PKCS#8 개인 키 + PKCS#8 asmeninis raktas + PKCS#8 privātā atslēga + Klucz prywatny PKCS#8 + Cheie privată PKCS#8 + личный ключ PKCS#8 + Súkromný kľúč PKCS#8 + Datoteka osebnega ključa PKCS#8 + Privat PKCS#8-nyckel + закритий ключ PKCS#8 + PKCS#8 私钥 + PKCS#8 私人金鑰 + PKCS + Public-Key Cryptography Standards + + + + PKCS#10 certification request + طلب شهادة PKCS#10 + Zapyt sertyfikacyi PKCS#10 + Заявка за сертификат — PKCS#10 + sol·licitud de certificació PKCS#10 + Požadavek na certifikát PKCS#10 + PKCS#10-certifikatanmodning + PKCS#10-Zertifikatanfrage + petición de certificados PKCS#10 + PKCS#10 ziurtagirien eskaera + PKCS#10-varmennepyyntö + PKCS#10 váttanarumbøn + requête de certification PKCS#10 + iarratas dheimhniúchán PKCS#10 + Solicitude de certificado PKCS#10 + בקשה מוסמכת PLCS#10 + PKCS#10-tanúsítványkérés + Permintaan sertifikasi PKCS#10 + Richiesta certificazione PKCS#10 + PKCS#10 証明書署名要求 + PKCS#10 сертификацияға сұранымы + PKCS#10 인증서 요청 + PKCS#10 liudijimų užklausa + PKCS#10 sertifikācijas pieprasījums + PKCS#10-sertifikatforespørsel + PKCS#10-certificatieverzoek + PKCS#10-sertifiseringsførespurnad + Żądanie certyfikatu PKCS#10 + Pedido de certificação PKCS#12 + Cerere de certificat PKCS#10 + запрос сертификации PKCS#10 + Požiadavka na certifikát PKCS#10 + Datoteka potrdila PKCS#10 + Kërkesë çertifikimi PKCS#10 + PKCS#10-certifikatbegäran + комплект сертифікатів PKCS#10 + Yêu cầu chứng nhận PKCS#10 + PKCS#10 认证请求 + PKCS#10 憑證請求 + PKCS + Public-Key Cryptography Standards + + + + + X.509 certificate + شهادة X.509 + Сертификат — X.509 + certificat X.509 + Certifikát X.509 + X.509-certifikat + X.509-Zertifikat + certificado X.509 + X.509 ziurtagiria + X.509-varmenne + X.509 prógv + certificat X.509 + teastas X.509 + Certificado X.509 + אישור X.509 + X.509 tanúsítvány + Sertifikat X.509 + Certificato X.509 + X.509 証明書 + X.509 сертификаты + X.509 인증서 + X.509 liudijimas + X.509 sertifikāts + Certyfikat X.509 + Certificat X.509 + сертификат X.509 + Certifikát X.509 + Datoteka potrdila X.509 + X.509-certifikat + сертифікат X.509 + X.509 证书 + X.509 憑證 + + + + Certificate revocation list + قائمة إبطال الشهادات + Списък с отхвърлени сертификати + llista de revocació de certificats + Seznam odvolaných certifikátů + Certifikattilbagekaldelsesliste + Liste widerrufener Zertifikate + lista de revocación de certificados + Ziurtagiri-errebokatzeen zerrenda + Varmenteiden sulkulista + Prógv afturtøkulisti + liste de révocation de certificat + liosta teastas cúlghairmthe + lista de certificados de revogación + רשימת אישורים מבוטלים + Tanúsítvány-visszavonási lista + Daftar pencabutan sertificat (CRL) + Elenco certificati di revoca + 証明書失効リスト + Сертификатты қайта шақыру тізімі + 인증서 철회 목록 + Panaikintų liudijimų sąrašas + Sertifikātu atsaukšanu saraksts + Lista unieważnień certyfikatów + Listă de revocare a certificatelor + Список аннулирования сертификатов + Zoznam zrušených certifikátov + Datoteka seznama preklica potrdil + Spärrlista för certifikat + список відкликання сертифікатів + 证书吊销列表 + 憑證撤銷清單 + + + + PkiPath certification path + مسار شهادة PkiPath + Сертификационна верига — PkiPath + ruta de certificació PkiPath + Cesta k certifikátu PkiPath + PkiPath-certifikationssti + PkiPath-Zertifikatspfad + ruta de certificación PkiPath + PkiPath ziurtagirien bide-izena + PkiPath-varmennepolku + PkiPath váttanleið + chemin de certification PkiPath + conair dheimhniúcháin PkiPath + Ruta de certificación PkiPath + נתיב מאושר של PkiPath + PkiPath tanúsítványútvonal + Alamat sertifikasi PkiPath + Percorso certificazione PkiPath + PkiPath 証明書パス + PkiPath сертификаттау жолы + PkiPath 인증서 요청 + PkiPath liudijimų maršrutas + PkiPath sertifikāta ceļš + PkiPath-certificatiepad + Ścieżka certyfikacji PkiPath + Pedido de certificação PkiPath + Cale certificare PkiPath + путь сертификации PkiPath + Cesta k certifikátu PkiPath + Datoteka poti potrdila PkiPath + PkiPath-certifikatsekvens + шлях сертифікації PkiPath + Đường dẫn cấp chứng nhận PkiPath + PkiPath 证书目录 + PkiPath 憑證路徑 + + + + PS document + مستند PS + Dakument PS + Документ — PS + document PS + Dokument PS + PS-dokument + PS-Dokument + PS document + PS-dokumento + documento PS + PS dokumentua + PS-asiakirja + PS skjal + document PS + cáipéis PS + documento PS + מסמך PS + PS dokumentum + Dokumen PS + Documento PS + PS ドキュメント + PS құжаты + PS 문서 + PS dokumentas + PS dokuments + PS-dokument + PS-document + PS-dokument + Dokument PS + Documento PS + Document PS + документ PS + Dokument PS + Dokument PS + Dokument PS + PS-dokument + документ PS + Tài liệu PS + PS 文档 + Ps 文件 + PS + PostScript + + + + + + + + + + Plucker document + مستند Plucker + Dakument Plucker + Документ — Plucker + document Plucker + Dokument Plucker + Pluckerdokument + Plucker-Dokument + Plucker-dokumento + documento de Plucker + Plucker dokumentua + Plucker-asiakirja + Plucker skjal + document Plucker + cáipéis Plucker + documento de Plucker + מסמך של Plucker + Plucker dokumentum + Dokumen Plucker + Documento Plucker + Plucker ドキュメント + Plucker құжаты + Plucker 문서 + Plucker dokumentas + Plucker dokuments + Plucker-dokument + Plucker-document + Plucker-dokument + Dokument Plucker + Documento do Plucker + Document Plucker + документ Plucker + Dokument Plucker + Dokument Plucker + Dokument Plucker + Plucker-dokument + документ Plucker + Tài liệu Plucker + Plucker 文档 + Plucker 文件 + + + + + + + RELAX NG XML schema + مخطط RELAX NG XML + Схема за XML — RELAX NG + esquema XML RELAX NG + Schéma RELAX NG XML + RELAX NG XML-skema + RELAX NG XML-Schema + Esquema XML RELAX NG + RELAX NG XML-skeema + schéma XML RELAX NG + scéimre XML RELAX NG + Esquema XML RELAX NG + סכנת RELAX NG XML + RELAX NG XML-séma + Skema XML RELAX NG + Schema XML RELAX NG + RELAX NG XML スキーマ + RELAX NG XML сұлбасы + RELAX NG XML 스키마 + RELAX NG XML schema + RELAX NG XML shēma + Schemat XML RELAX NG + Schemă RELAX NG XML + XML-схема RELAX NG + XML schéma RELAX NG + Datoteka shema RELAX NG XML + RELAX NG XML-schema + XML-схема RELAX NG + RELAX NG XML 模式 + RELAX NG + REgular LAnguage for XML Next Generation + + + + + + + RTF document + مستند RTF + Dakument RTF + Документ — RTF + document RTF + Dokument RTF + RTF-dokument + RTF-Dokument + RTF document + RTF-dokumento + documento RTF + RTF dokumentua + RTF-asiakirja + RTF skjal + document RTF + cáipéis RTF + documento RTF + מסמך RTF + RTF dokumentum + Dokumen RTF + Documento RTF + RTF ドキュメント + RTF құжаты + RTF 문서 + RTF dokumentas + RTF dokuments + RTF-dokument + RTF-document + TRF-dokument + Dokument RTF + Documento RTF + Document RTF + документ RTF + Dokument RTF + Dokument RTF + Dokument RTF + RTF-dokument + документ RTF + Tài liệu RTF + RTF 文档 + RTF 文件 + RTF + Rich Text Format + + + + + + + + + + Sieve mail filter script + سكربت مرشح بريد Sieve + Skrypt filtravańnia pošty Sieve + Скрипт-филтър за пресяване на поща + script de filtre de correu Sieve + Skript poštovního filtru Sieve + Sieve e-post-filterprogram + Sieve-E-Mail-Filterskript + script de filtro de correo Sieve + Sieve posta-iragazki script-a + Sieve-postinsuodatuskomentotiedosto + script de filtrage de courriel Sieve + script scagaire phost Sieve + Script de filtro de correo Sieve + תסריט סינון דואר של Sieve + Sieve levélszűrő parancsfájl + Skrip filter surat Sieve + Script filtro posta Sieve + Sieve メールフィルタスクリプト + Sieve пошталық фильтр сценарийі + Sieve 메일 필터 스크립트 + Sieve pašto filtro scenarijus + Sieve pasta filtra skripts + Sieve e-postfilter skript + Sieve mailfilter-script + Sieve e-postfilterskript + Skrypt filtra poczty Sieve + Script de filtro de mensagens do Sieve + Script filtrare email Sieve + сценарий почтового фильтра Sieve + Skript poštového filtra Sieve + Skriptna datoteka Sieve poštnega filtra + Script filtrim poste Sieve + Sieve-epostfilterskript + скрипт поштового фільтру Sieve + Văn lệnh lọc thư Sieve + Sieve 邮件过滤脚本 + Sieve 郵件過濾指令稿 + + + + + + SMIL document + مستند SMIL + Dakument SMIL + Документ — SMIL + document SMIL + Dokument SMIL + SMIL-dokument + SMIL-Dokument + SMIL document + SMIL-dokumento + documento SMIL + SMIL dokumentua + SMIL-asiakirja + SMIL skjal + document SMIL + cáipéis SMIL + documento SMIL + מסמך SMIL + SMIL dokumentum + Dokumen SMIL + Documento SMIL + SMIL ドキュメント + SMIL құжаты + SMIL 문서 + SMIL dokumentas + SMIL dokuments + SMIL-dokument + SMIL-document + SMIL-dokument + Dokument SMIL + Documento SMIL + Document SMIL + документ SMIL + Dokument SMIL + Dokument SMIL + Dokument SMIL + SMIL-dokument + документ SMIL + Tài liệu SMIL + SMIL 文档 + SMIL 文件 + SMIL + Synchronized Multimedia Integration Language + + + + + + + + + + + + + + + + WPL playlist + قائمة تشغيل WPL + Списък за изпълнение — WPL + llista de reproducció WPL + Seznam skladeb WPL + WPL-afspilningsliste + WPL-Wiedergabeliste + WPL-ludlisto + lista de reproducción WPL + WPL erreprodukzio-zerrenda + WPL-soittolista + WPL avspælingarlisti + liste de lecture WPL + seinmliosta WPL + lista de reprodución WPL + רשימת השמעה WPL + WPL-lejátszólista + Senarai putar WPL + Scaletta WPL + WPL 再生リスト + WPL ойнау тізімі + WPL 재생 목록 + WPL grojaraštis + WPL repertuārs + WPL-afspeellijst + Lista odtwarzania WPL + Lista de reprodução do WPL + Listă redare WPL + список воспроизведения WPL + Zoznam skladieb WPL + Seznam predvajanja WPL + WPL-spellista + список відтворення WPL + Danh mục nhạc WPL + WPL 播放列表 + WPL 播放清單 + WPL + Windows Media Player Playlist + + + + + + + + SQLite2 database + قاعدة بيانات SQLite2 + Baza źviestak SQLite2 + База от данни — SQLite2 + base de dades SQLite2 + Databáze SQLite2 + SQLite2-database + SQLite2-Datenbank + SQLite2 database + SQLite2-datumbazo + base de datos SQLite2 + SQLite2 datu-basea + SQLite2-tietokanta + SQLite2 dátustovnur + base de données SQLite2 + bunachar sonraí SQLite2 + base de datos SQLite2 + בסיס מידע של SQLite2 + SQLite2 adatbázis + Basis data SQLite2 + Database SQLite2 + SQLite2 データベース + SQLite2 дерекқоры + SQLite2 데이터베이스 + SQLite2 duomenų bazė + SQLite2 datubāze + SQLite2-database + SQLite2-gegevensbank + SQLite2-database + Baza danych SQLite2 + Banco de dados do SQLite2 + Bază de date SQLite2 + база данных SQLite2 + Databáza SQLite2 + Podatkovna zbirka SQLite2 + Bazë me të dhëna SQLite2 + SQLite2-databas + База даних SQLite2 + Cơ sở dữ liệu SQLite2 + SQLite2 数据库 + SQLite2 資料庫 + + + + + + SQLite3 database + قاعدة بيانات SQLite3 + Baza źviestak SQLite3 + База от данни — SQLite3 + base de dades SQLite3 + Databáze SQLite3 + SQLite3-database + SQLite3-Datenbank + SQLite3 database + SQLite3-datumbazo + base de datos SQLite3 + SQLite3 datu-basea + SQLite3-tietokanta + SQLite3 dátustovnur + base de données SQLite3 + bunachar sonraí SQLite3 + base de datos SQLite3 + בסיס מידע של SQLite3 + SQLite3 adatbázis + Basis data SQLite3 + Database SQLite3 + SQLite3 データベース + SQLite3 дерекқоры + SQLite3 데이터베이스 + SQLite3 duomenų bazė + SQLite3 datubāze + SQLite3-database + SQLite3-gegevensbank + SQLite3-database + Baza danych SQLite3 + Banco de dados do SQLite3 + Bază de date SQLite3 + база данных SQLite3 + Databáza SQLite3 + Podatkovna zbirka SQLite3 + Bazë me të dhëna SQLite3 + SQLite3-databas + база даних SQLite3 + Cơ sở dữ liệu SQLite3 + SQLite3 数据库 + SQLite3 資料庫 + + + + + + GEDCOM family history + تاريخ عائلة GEDCOM + Siamiejnaja historyja GEDCOM + Родословно дърво — GEDCOM + història familiar GEDCOM + Rodokmen GEDCOM + GEDCOM-familiehistorie + GEDCOM-Stammbaum + GEDCOM family history + historia familiar GEDCOM + GEDCOM famili historia + GEDCOM-sukuhistoria + GEDCOM familjusøga + généalogie GEDCOM + stair theaghlach GEDCOM + historial de familia GEDCOM + היסטוריה משפחתית של GEDCOM + GEDCOM családtörténet + Sejarah keluarga GEDCOM + Cronologia famiglia GEDCOM + GEDCOM 家系図データ + GEDCOM отбасы тарихы + GEDCOM family history + GEDCOM šeimos istorija + GEDCOM ģimenes vēsture + GEDCOM-familiehistorikk + GEDCOM-stamboom + GEDCOM-familehistorie + Plik historii rodziny GEDCOM + Histórico familiar do GEDCOM + Tablou genealogic GEDCOM + история семьи GEDCOM + Rodokmeň GEDCOM + Datoteka družinske zgodovine GEDCOM + Kronollogji familje GEDCOM + GEDCOM-släktträd + історія родини GEDCOM + Lịch sử gia đình GEDCOM + GEDCOM 家谱 + GEDCOM 家族史 + GEDCOM + GEnealogical Data COMmunication + + + + + + + + + + Flash video + Flash مرئي + Videa Flash + Видео — Flash + vídeo de Flash + Video Flash + Flashvideo + Flash-Video + Flash video + Flash-video + vídeo Flash + Flash bideoa + Flash-video + Flash video + vidéo Flash + físeán Flash + vídeo Flash + וידאו של פלאש + Flash videó + Video Flash + Video Flash + Flash 動画 + Flash видеосы + Flash 비디오 + Flash vaizdo įrašas + Flash video + Flash-film + Flash-video + Flash-video + Plik wideo Flash + Vídeo Flash + Video Flash + видео Flash + Video Flash + Video datoteka Flash + Video Flash + Flash-video + відеокліп Flash + Ảnh động Flash + Flash 影片 + Flash 視訊 + + + + + + + + + + + JavaFX video + Видео — JavaFX + vídeo JavaFX + Video JavaFX + JavaFX-video + JavaFX-Video + JavaFX-video + vídeo JavaFX + JavaFX-video + JavaFX video + vidéo JavaFX + físeán JavaFX + vídeo JavaFX + וידאו JavaFX + JavaFX videó + Video JavaFX + Video JavaFX + JavaFX 動画 + JavaFX аудиосы + 자바FX 비디오 + JavaFX video + Plik wideo JavaFX + Video JavaFX + видео JavaFX + Video JavaFX + Video JavaFX + JavaFX-video + відеокліп JavaFX + JavaFX 视频 + JavaFX 視訊 + + + + + + + + + + SGF record + تسجيلة SGF + Zapisanaja hulnia SGF + Запис — SGF + registre SGF + Záznam SGF + SGF-optagelse + SGF-Aufzeichnung + grabación SGF + SGF erregistroa + SGF-nauhoitus + SGF met + partie SGF + taifead SGF + Grabación SGF + הקלטת SGF + SGF pontszám + Catatan SGF + Registrazione SGF + SGF レコード + SGF жазбасы + SGF 기록파일 + SGF įrašas + SGF ieraksts + SGF-oppføring + SGF-record + SGF-logg + Zapis gry SGF + Gravação do SGF + Înregistrare SGF + запись SGF + Záznam SGF + Datoteka shranjene igre SGF + Regjistrim SGF + SGF-protokoll + запис SGF + Mục ghi SGF + SGF 记录 + SGF 紀錄 + SGF + Smart Game Format + + + + + + + + + + XLIFF translation file + ملف ترجمة XLIFF + Fajł pierakładu XLIFF + Превод — XLIFF + fitxer traducció XLIFF + Soubor překladu XLIFF + XLIFF-oversættelsesfil + XLIFF-Übersetzung + archivo de traducción XLIFF + XLIFF itzulpen-fitxategia + XLIFF-käännöstiedosto + XLIFF týðingarfíla + fichier de traduction XLIFF + comhad aistrithe XLIFF + ficheiro de tradución XLIFF + קובץ תרגום CLIFF + XLIFF fordítási fájl + Berkas terjemahan XLIFF + File traduzione XLIFF + XLIFF 翻訳ファイル + XLIFF аударма файлы + XLIFF 번역 파일 + XLIFF vertimo failas + XLIFF tulkošanas fails + XLIFF-oversettelsesfil + XLIFF-vertalingsbestand + XLIFF-omsetjingsfil + Plik tłumaczenia XLIFF + Arquivo de tradução XLIFF + Fișier de traducere XLIFF + файл перевода XLIFF + Súbor prekladu XLIFF + Datoteka prevoda XLIFF + File përkthimesh XLIFF + XLIFF-översättningsfil + файл перекладу XLIFF + Tập tin dịch XLIFF + XLIFF 消息翻译文件 + XLIFF 翻譯檔 + XLIFF + XML Localization Interchange File Format + + + + + + + + + + + YAML document + مستند YAML + Документ — YAML + document YAML + Dokument YAML + YAML-dokument + YAML-Dokument + YAML-dokumento + documento YAML + YAML-asiakirja + YAML skjal + document YAML + cáipéis YAML + documento YAML + מסמך YAML + YAML-dokumentum + Dokumen YAML + Documento YAML + YAML ドキュメント + YAML құжаты + YAML 문서 + YAML dokumentas + YAML dokuments + Dokument YAML + Document YAML + документ YAML + Dokument YAML + Dokument YAML + YAML-dokument + документ YAML + YAML 文档 + YAML 文件 + YAML + YAML Ain't Markup Language + + + + + + + + + + + + Corel Draw drawing + تصميم Corel Draw + Corel Draw çəkimi + Rysunak Corel Draw + Чертеж — Corel Draw + dibuix de Corel Draw + Kresba Corel Draw + Darlun Corel Draw + Corel Draw-tegning + Corel-Draw-Zeichnung + σχέδιο Corel Draw + Corel Draw drawing + grafikaĵo de Corel Draw + dibujo de Corel Draw + Corel Draw-eko marrazkia + Corel Draw -piirros + Corel Draw tekning + dessin Corel Draw + líníocht Corel Draw + debuxo de Corel Draw + ציור של Corel Draw + Corel Draw-rajz + Gambar Corel Draw + Disegno Corel Draw + Corel Draw ドロー + Corel Draw суреті + 코렐 드로우 드로잉 + Corel Draw piešinys + Corel Draw zīmējums + Lukisan Corel Draw + Corel Draw-tegning + Corel Draw-tekening + Corel Draw-teikning + Rysunek Corel Draw + desenho Corel Draw + Desenho do Corel Draw + Desen Corel Draw + изображение Corel Draw + Kresba Corel Draw + Datoteka risbe Corel Draw + Vizatim Corel Draw + Corel Draw цртеж + Corel Draw-teckning + малюнок Corel Draw + Bản vẽ Corel Draw + Corel Draw 图形 + Corel Draw 繪圖 + + + + + + + + + + + + + + + HPGL file + ملف HPGL + Fajł HPGL + Файл — HPGL + fitxer HPGL + Soubor HPGL + HPGL-fil + HPGL-Datei + HPGL file + HPGL-dosiero + archivo HPGL + HPGL fitxategia + HPGL-tiedosto + HPGL fíla + fichier HPGL + comhad HPGL + ficheiro HPGL + קובץ HGPL + HPGL fájl + Berkas HPGL + File HPGL + HPGL ファイル + HPGL файлы + HPGL 파일 + HPGL failas + HPGL fails + HPGL-fil + HPGL-bestand + HPGL-fil + Plik HPGL + Arquivo HPGL + Fișier HPGL + файл HPGL + Súbor HPGL + Datoteka HPGL + File HPGL + HPGL-fil + файл HPGL + Tập tin HPGL + HPGL 文件 + HPGL 檔案 + HPGL + HP Graphics Language + + + + + PCL file + ملف PCL + Fajł PCL + Файл — PCL + fitxer PCL + Soubor PCL + PCL-fil + PCL-Datei + PCL file + PCL-dosiero + archivo PCL + PCL fitxategia + PCL-tiedosto + PCL fíla + fichier PCL + comhad PCL + ficheiro PCL + קובץ PCL + PCL fájl + Berkas PCL + File PCL + PCL ファイル + PCL файлы + PCL 파일 + PCL failas + PCL fails + PCL-fil + PCL-bestand + PCL-fil + Plik PCL + Arquivo PCL + Fișier PCL + файл PCL + Súbor PCL + Datoteka PCL + File PCL + PCL-fil + файл PCL + Tập tin PCL + PCL 文件 + PCL 檔 + PCL + HP Printer Control Language + + + + + Lotus 1-2-3 spreadsheet + جدول Lotus 1-2-3 + Lotus 1-2-3 hesab cədvəli + Raźlikovy arkuš Lotus 1-2-3 + Таблица — Lotus 1-2-3 + full de càlcul de Lotus 1-2-3 + Sešit Lotus 1-2-3 + Taenlen Lotus 1-2-3 + Lotus 1-2-3-regneark + Lotus-1-2-3-Tabelle + λογιστικό φύλλο Lotus 1-2-3 + Lotus 1-2-3 spreadsheet + Kalkultabelo de Lotus 1-2-3 + hoja de cálculo de Lotus 1-2-3 + Lotus 1-2-3 kalkulu-orria + Lotus 1-2-3 -taulukko + Lotus 1-2-3 rokniark + feuille de calcul Lotus 1-2-3 + scarbhileog Lotus 1-2-3 + folla de cálculo de Lotus 1-2-3 + גליון נתונים של Lotus 1-2-3 + Lotus 1-2-3-munkafüzet + Lembar sebar Lotus 1-2-3 + Foglio di calcolo Lotus 1-2-3 + Lotus 1-2-3 スプレッドシート + Lotus 1-2-3 электрондық кестесі + Lotus 1-2-3 스프레드시트 + Lotus 1-2-3 skaičialentė + Lotus 1-2-3 izklājlapa + Hamparan Lotus 1-2-3 + Lotus 1-2-3 regneark + Lotus 1-2-3-rekenblad + Lotus 1-2-3 rekneark + Arkusz Lotus 1-2-3 + folha de cálculo Lotus 1-2-3 + Planilha do Lotus 1-2-3 + Foaie de calcul Lotus 1-2-3 + электронная таблица Lotus 1-2-3 + Zošit Lotus 1-2-3 + Razpredelnica Lotus 1-2-3 + Fletë llogaritjesh Lotus 1-2-3 + Lotus 1-2-3 табеларни прорачун + Lotus 1-2-3-kalkylblad + ел. таблиця Lotus 1-2-3 + Bảng tính Lotus 1-2-3 + Lotus 1-2-3 工作簿 + Lotus 1-2-3 試算表 + + + + + + + + + + + + + + + + JET database + قاعدة بيانات JET + Baza źviestak JET + База от данни — JET + base de dades JET + Databáze JET + JET-database + JET-Datenbank + JET database + JET-datumbazo + base de datos JET + JET datu-basea + JET-tietokanta + JET dátustovnur + base de données JET + bunachar sonraí JET + base de datos JET + מסד נתונים JET + JET adatbázis + Basis data JET + Database JET + JET データベース + JET дерекқоры + JET 데이터베이스 + JET duomenų bazė + JET datubāze + JET-database + JET-gegevensbank + JET-database + Baza Danych JET + Banco de dados JET + Bază de date JET + база данных JET + Databáza JET + Podatkovna zbirka JET + Bazë me të dhëna JET + JET-databas + База даних JET + Cơ sở dữ liệu JET + JET 数据库 + JET 資料庫 + JET + Joint Engine Technology + + + + + + + + + + + + + + Microsoft Cabinet archive + أرشيف Microsoft Cabinet + Архив — Microsoft Cabinet + arxiu Cabinet de Microsoft + Archiv Microsoft Cabinet + Microsoft Cabinet-arkiv + Microsoft-Cabinet-Archiv + archivador Microsoft Cabinet + Microsoft Cabinet artxiboa + Microsoft Cabinet -arkisto + Microsoft Cabinet skjalasavn + archive Cab Microsoft + cartlann Microsoft Cabinet + arquivo de Microsoft Cabinet + ארכיון CAB (מיקרוסופט) + Microsoft Cabinet archívum + Arsip Microsoft Cabinet + Archivio Microsoft Cabinet + Microsoft Cabinet アーカイブ + Microsoft Cabinet архиві + 마이크로소프트 캐비넛 묶음 + Microsoft Cabinet archyvas + Microsoft kabineta arhīvs + Microsoft Cabinet-archief + Archiwum Microsoft Cabinet + Pacote do Microsoft Cabinet + Arhivă Microsoft Cabinet + архив Microsoft Cabinet + Archív Microsoft Cabinet + Datoteka arhiva Microsoft Cabinet + Microsoft Cabinet-arkiv + архів Cabinet Microsoft + Kho lưu Cabinet Microsoft + Microsoft CAB 归档文件 + 微軟 Cabinet 封存檔 + + + + + + + + Excel spreadsheet + جدول Excel + Raźlikovy akruš Excel + Таблица — Excel + full de càlcul d'Excel + Sešit Excel + Excelregneark + Excel-Tabelle + Excel spreadsheet + Excel-kalkultabelo + hoja de cálculo de Excel + Excel kalkulu-orria + Excel-taulukko + Excel rokniark + feuille de calcul Excel + scarbhileog Excel + folla de cálculo de Excel + גליון נתונים של אקסל + Excel táblázat + Lembar sebar Excel + Foglio di calcolo Excel + Excel スプレッドシート + Excel электрондық кестесі + 엑셀 스프레드시트 + Excel skaičialentė + Excel izklājlapa + Excel regneark + Excel-rekenblad + Excel-rekneark + Arkusz Excel + Planilha do Excel + Foaie de calcul Excel + электронная таблица Excel + Zošit Excel + Razpredelnica Microsoft Excel + Fletë llogaritje Excel + Excel-kalkylblad + ел. таблиця Excel + Bảng tính Excel + Microsoft Excel 工作簿 + Excel 試算表 + + + + + + + + + + + + + + + + + Excel add-in + Приставка — Excel + complement d'Excel + Doplněk aplikace Excel + Excel Add-in + Complemento de Excel + complément Excel + complemento de Excel + תוסף של Excel + Excel bővítmény + Add-in Excel + Add-in Excel + Excel アドイン + Excel қосымшасы + 엑셀 추가 기능 + Excel pievienojumprogramma + Dodatek Excel + дополнение Excel + Vstavek Excel + додаток Excel + Excel 增益集 + + + + + + Excel 2007 binary spreadsheet + Таблица — Excel 2007, двоична + full de càlcul binari d'Excel 2007 + Binární formát sešitu Excel 2007 + Excel 2007-Tabelle (binär) + Hoja de cálculo de Excel 2007 + feuille de calcul binaire Excel 2007 + ficheiro binario de folla de cálculo Excel 2007 + גיליון נתונים בינרי של Excel 2007 + Excel 2007 bináris táblázat + Lembar kerja biner Excel 2007 + Foglio di calcolo binario Excel 2007 + Excel 2007 バイナリスプレッドシート + Excel 2007 бинарды кестесі + 엑셀 2007 바이너리 스프레드시트 + Excel 2007 binārā izklājlapa + Binarny arkusz Excel 2007 + двоичная электронная таблица Excel 2007 + Binarna preglednica Excel 2007 + бінарна електронна таблиця Excel 2007 + Excel 2007 二進位試算表 + + + + + + Excel macro-enabled spreadsheet + Таблица — Excel, с макроси + full de càlcul amb macros d'Excel + Sešit Excel s podporou maker + Excel-Tabelle mit aktivierten Makros + Hoja de cálculo con macros activados de Excel + feuille de calcul Excel avec macros + folla de cálculo de Excel con macros activadas + גיליון נתונים עם תכונות מקרו פעילות של Excel + Excel makrókat tartalmazó táblázat + Lembar kerja Excel dengan makro + Foglio di calcolo Excel con macro abilitate + Excel マクロ有効スプレッドシート + макростары іске қосылған Excel кестесі + 엑셀 매크로 사용 스프레드시트 + Excel izklājlapa ar makrosiem + Arkusz z włączonymi makrami Excel + электронная таблица Excel с включёнными макросами + Preglednica Excel z omogočenimi makri + електронна таблиця Excel з увімкненими макросами + Excel 巨集啟用試算表 + + + + + + Excel macro-enabled spreadsheet template + Шаблон за таблици — Excel, с макроси + plantilla de full de càlcul amb macros d'Excel + Šablona sešitu Excel s podporou maker + Excel-Tabellenvorlage mit aktivierten Makros + Plantilla de hoja de cálculo con macros activados de Excel + modèle de feuille de calcul Excel avec macros + modelo de folla de cálculo de Excel con macros activadas + תבנית של גיליון נתונים עם תכונות מקרו פעילות של Excel + Excel makrókat tartalmazó táblázatsablon + Templat lembar kerja Excel dengan makro + Modello foglio di calcolo Excel con macro abilitate + Excel マクロ有効スプレッドシートテンプレート + макростары іске қосылған Excel кестесінің үлгісі + 엑셀 매크로 사용 스프레드시트 서식 + Excel izklājlapas ar makrosiem veidne + Szablon arkusza z włączonymi makrami Excel + шаблон электронной таблицы Excel с включёнными макросами + Predloga preglednice Excel z omogočenimi makri + шаблон електронної таблиці Excel з увімкненими макросами + Excel 巨集啟用試算表範本 + + + + + + PowerPoint presentation + عرض تقديمي PowerPoint + Prezentacyja PowerPoint + Презентация — PowerPoint + presentació de PowerPoint + Prezentace PowerPoint + PowerPoint-præsentation + PowerPoint-Präsentation + PowerPoint presentation + PowerPoint-prezentaĵo + presentación de PowerPoint + PowerPoint aurkezpena + PowerPoint-esitys + PowerPoint framløga + présentation PowerPoint + láithreoireacht PowerPoint + presentación de PowerPoint + מצגת PowerPoint + PowerPoint prezentáció + Presentasi PowerPoint + Presentazione PowerPoint + PowerPoint プレゼンテーション + PowerPoint презентациясы + 파워포인트 프리젠테이션 + PowerPoint pateiktis + PowerPoint prezentācija + PowerPoint-presentasjon + PowerPoint-presentatie + PowerPoint-presentasjon + Prezentacja PowerPoint + Apresentação do PowerPoint + Prezentare PowerPoint + презентация PowerPoint + Prezentácia PowerPoint + Predstavitev Microsoft PowerPoint + Prezantim PowerPoint + PowerPoint-presentation + презентація PowerPoint + Trình diễn PowerPoint + Microsoft PowerPoint 演示文稿 + PowerPoint 簡報 + + + + + + + + + + + PowerPoint add-in + Приставка — PowerPoint + complement de + Doplněk PowerPoint + PowerPoint Add-in + Complemento de PowerPoint + complément PowerPoint + complemento de PowerPoint + תוסף של PowerPoint + PowerPoint bővítmény + Add-in PowerPoint + Add-in PowerPoint + PowerPoint アドイン + PowerPoint қосымшасы + 파워포인트 기능 추가 + PowerPoint pievienojumprogramma + Dodatek PowerPoint + дополнение PowerPoint + Vstavek PowerPoint + додаток PowerPoint + PowerPoint 增益集 + + + + + PowerPoint macro-enabled presentation + Презентация — PowerPoint, с макроси + presentació amb macros + Prezentace PowerPoint s podporou maker + PowerPoint-Präsentation mit aktivierten Makros + Presentación con macros activadas de PowerPoint + présentation PowerPoint avec macros + presentación con macros activadas de PowerPoint + מצגת של PowerPoint בעלת תכונות מקרו פעילות + PowerPoint makrókat tartalmazó bemutató + Presentasi PowerPoint dengan makro + Presentazione PowerPoint con macro abilitate + PowerPoint マクロ有効プレゼンテーション + макростары іске қосылған PowerPoint презентациясы + 파워포인트 매크로 사용 프리젠테이션 + PowerPoint prezentācija ar makrosiem + Prezentacja z włączonymi makrami PowerPoint + презентация PowerPoint с включёнными макросами + Predstavitev PowerPoint z omogočenimi makri + презентація PowerPoint з увімкненими макросами + PowerPoint 巨集啟用簡報 + + + + + + PowerPoint macro-enabled slide + Кадър — PowerPoint, с макроси + dispositiva amb macros + Snímek PowerPoint s podporou maker + PowerPoint-Folie mit aktivierten Makros + Diapositiva con macros activadas de PowerPoint + diapositive PowerPoint avec macros + Diapositiva con macros activadas de Powerpoint + שקופית של PowerPoint בעלת תכונות מקרו פעילות + PowerPoint makrókat tartalmazó dia + Slide PowerPoint dengan makro + Diapositiva PowerPoint con macro abilitate + PowerPoint マクロ有効スライド + макростары іске қосылған PowerPoint слайды + 파워포인트 매크로 사용 슬라이드 + PowerPoint slaids ar makrosiem + Slajd z włączonymi makrami PowerPoint + слайд PowerPoint с включёнными макросами + Prosojnica PowerPoint z omogočenimi makri + слайд PowerPoint з увімкненими макросами + PowerPoint 巨集啟用投影片 + + + + + + PowerPoint macro-enabled presentation + Презентация — PowerPoint, с макроси + presentació amb macros + Prezentace PowerPoint s podporou maker + PowerPoint-Präsentation mit aktivierten Makros + Presentación con macros activadas de PowerPoint + présentation PowerPoint avec macros + presentación con macros activadas de PowerPoint + מצגת של PowerPoint בעלת תכונות מקרו פעילות + PowerPoint makrókat tartalmazó bemutató + Presentasi PowerPoint dengan makro + Presentazione PowerPoint con macro abilitate + PowerPoint マクロ有効プレゼンテーション + макростары іске қосылған PowerPoint презентациясы + 파워포인트 매크로 사용 프리젠테이션 + PowerPoint prezentācija ar makrosiem + Prezentacja z włączonymi makrami PowerPoint + презентация PowerPoint с включёнными макросами + Predstavitev PowerPoint z omogočenimi makri + презентація PowerPoint з увімкненими макросами + PowerPoint 巨集啟用簡報 + + + + + + PowerPoint macro-enabled presentation template + Шаблон за презентации — PowerPoint, с макроси + plantilla de presentació amb macros + Šablona prezentace PowerPoint s podporou maker + PowerPoint-Präsentationsvorlage mit aktivierten Makros + Plantilla de presentación con macros activadas de PowerPoint + modèle de présentation PowerPoint avec macros + modelo de presentación con macros activadas de PowerPoint + תבנית של מצגת של PowerPoint בעלת תכונות מקרו פעילות + PowerPoint makrókat tartalmazó bemutatósablon + Templat presentasi PowerPoint dengan makro + Modello presentazione PowerPoint con macro abilitate + PowerPoint マクロ有効プレゼンテーションテンプレート + макростары іске қосылған PowerPoint презентациясының үлгісі + 파워포인트 매크로 사용 프리젠테이션 서식 + PowerPoint prezentācijas ar makrosiem veidne + Szablon prezentacji z włączonymi makrami PowerPoint + шаблон презентации PowerPoint с включёнными макросами + Predloga predstavitve PowerPoint z omogočenimi makri + шаблон презентації PowerPoint з увімкненими макросами + PowerPoint 巨集啟用簡報範本 + + + + + + Word macro-enabled document + Документ — Word, с макроси + document amb macros de Word + Dokument Word s podporou maker + Word-Dokument mit aktivierten Makros + Documento con macros activadas de Word + document Word avec macros + documento con macros activadas de Word + מסמך של Word בעל תכונות מקרו פעילות + Word makrókat tartalmazó dokumentum + Dokumen Word dengan makro + Documento Word con macro abilitate + Word マクロ有効文書 + макростары іске қосылған Word құжаты + 워드 매크로 사용 문서 + Word dokuments ar makrosiem + Dokument z włączonymi makrami Word + документ Word с включёнными макросами + Dokument Word z omogočenimi makri + документ Word з увімкненими макросами + Word 巨集啟用文件 + + + + + + Word macro-enabled document template + Шаблон за документи — Word, с макроси + plantilla de document amb macros de Word + Šablona dokumentu Word s podporou maker + Word-Dokumentvorlage mit aktivierten Makros + Plantilla de documento con macros activadas de Word + modèle de document Word avec macros + Plantilla de documento con macros activadas de Word + תבנית של מסמך של Word בעל תכונות מקרו פעילות + Word makrókat tartalmazó dokumentumsablon + Templat dokumen Word dengan makro + Modello documento Word con macro abilitate + Word マクロ有効文書テンプレート + макростары іске қосылған Word құжатының үлгісі + 워드 매크로 사용 문서 서식 + Word dokumenta ar makrosiem veidne + Szablon dokumentu z włączonymi makrami Word + шаблон документа Word с включёнными макросами + Predloga dokumenta Word z omogočenimi makri + шаблон документа Word з увімкненими макросами + Word 巨集啟用文件範本 + + + + + + XPS document + مستند XPS + Dakument XPS + Документ — XPS + document XPS + Dokument XPS + XPS-dokument + XPS-Dokument + XPS-dokumento + documento XPS + XPS dokumentua + XPS-asiakirja + XPS skjal + document XPS + cáipéis XPS + documento XPS + מסמך XPS + XPS dokumentum + Dokumen XPS + Documento XPS + XPS ドキュメント + XPS құжаты + XPS 문서 + XPS dokumentas + XPS dokuments + XPS-dokument + XPS-document + XPS-dokument + Dokument XPS + Documento XPS + Document XPS + документ XPS + Dokument XPS + Dokument XPS + Dokument XPS + XPS-dokument + документ XPS + Tài liệu XPS + XPS 文档 + XPS 文件 + XPS + Open XML Paper Specification + + + + + + + + Microsoft Works document + مستند Microsoft Works + Dakument Microsoft Works + Документ — Microsoft Works + document Works de Microsoft + Dokument Microsoft Works + Microsoft Works-dokument + Microsoft-Works-Dokument + documento de Microsoft Works + Microsoft Works dokumentua + Microsoft Works -asiakirja + Microsoft Works skjal + document Microsoft Works + cáipéis Microsoft Works + documento de Microsoft Works + מסמך Microsoft Works + Microsoft Works dokumentum + Dokumen Microsoft Works + Documento Microsoft Works + Microsoft Works ドキュメント + Microsoft Works құжаты + 마이크로소프트 웍스 문서 + Microsoft Works dokumentas + Microsoft Works dokuments + Microsoft Works-dokument + Microsoft Works-document + Microsoft Works-dokument + Dokument Microsoft Works + Documento do Microsoft Works + Document Microsoft Works + документ Microsoft Works + Dokument Microsoft Works + Dokument Microsoft Works + Dokument Microsoft Works + Microsoft Works-dokument + документ Microsoft Works + Tài liệu Microsoft Works + Microsoft Works 文档 + 微軟 Works 文件 + + + + + + + + + Microsoft Visio document + + + + + + + + + Word document + مستند Word + Dakument Word + Документ — Word + document de Word + Dokument Word + Worddokument + Word-Dokument + Word document + Word-dokumento + documento de Word + Word dokumentua + Word-asiakirja + Word skjal + document Word + cáipéis Word + documento de Word + מסמך Word + Word dokumentum + Dokumen Word + Documento Word + Word ドキュメント + Word құжаты + 워드 문서 + Word dokumentas + Word dokuments + Word-dokument + Word-document + Word-dokument + Dokument Word + Documento do Word + Document Word + документ Word + Dokument Word + Dokument Word + Dokument Word + Word-dokument + документ Word + Tài liệu Word + Microsoft Word 文档 + Word 文件 + + + + + + + + + + + + + + + + + + + Word template + قالب Word + Šablon Word + Шаблон за документи — Word + plantilla de Word + Šablona Word + Wordskabelon + Word-Vorlage + Word-ŝablono + plantilla de Word + Word txantiloia + Word-malli + Word formur + modèle Word + teimpléad Word + Plantilla de Word + תבנית Word + Word sablon + Templat Word + Modello Word + Word テンプレート + Word үлгісі + 워드 서식 + Word šablonas + Word veidne + Word-mal + Word-sjabloon + Word-mal + Szablon Word + Modelo do Word + Șablon Word + шаблон Word + Šablóna Word + Predloga dokumenta Microsoft Word + Model Word + Word-mall + шаблон Word + Mẫu Word + Word 模板 + Word 範本 + + + + + + GNUnet search file + ملف بحث GNUnet + fajł pošuku GNUnet + Указател за търсене — GNUnet + fitxer de cerca GNUnet + Vyhledávací soubor GNUnet + GNunet-søgefil + GNUnet-Suchdatei + archivo de búsqueda GNUnet + GNUnet bilaketako fitxategia + GNUnet-hakutiedosto + GNUnet leitifíla + fichier de recherche GNUnet + comhad cuardaigh GNUnet + ficheiro de busca de GNUnet + קובץ חיפוש של GNUnet + GNUnet keresési fájl + Berkas telusur GNUnet + File ricerca GNUnet + GNUnet 検索ファイル + GNUnet іздеу файлы + GNUnet 검색 파일 + GNUnet paieškos failas + GNUnet meklēšanas fails + GNUnet søkefil + GNUnet-zoekbestand + GNUnet-søkjefil + Plik wyszukiwania GNUnet + Arquivo de pesquisa do GNUnet + Fișier căutare GNUnet + файл поиска GNUnet + Vyhľadávací súbor GNUnet + Iskalna datoteka GNUnet + File kërkimi GNUnet + GNUnet-sökfil + файл пошуку GNUnet + Tập tin tìm kiếm GNUnet + GNUnet 搜索文件 + GNUnet 搜尋檔案 + + + + + + + TNEF message + رسالة TNEF + List TNEF + Съобщение — TNEF + missatge TNEF + Zpráva TNEF + TNEF-meddelelse + TNEF-Nachricht + mensaje TNEF + TNEF mezua + TNEF-viesti + TNEF boð + message TNEF + teachtaireacht TNEF + mensaxe TNEF + הודעת TNEF + TNEF üzenet + Pesan TNEF + Messaggio TNEF + TNEF メッセージ + TNEF мәлімдемесі + TNEF 메시지 + TNEF žinutė + TNEF ziņojums + TNEF-melding + TNEF-bericht + TNEF-melding + Wiadomość TNEF + Mensagem TNEF + Mesaj TNEF + сообщение TNEF + Správa TNEF + Datoteka sporočila TNEF + Mesazh TNEF + TNEF-meddelande + повідомлення TNEF + Thông điệp TNEF + TNEF 信件 + TNEF 訊息 + TNEF + Transport Neutral Encapsulation Format + + + + + + + + + + StarCalc spreadsheet + جدول StarCalc + StarCalc hesab cədvəli + Raźlikovy arkuš StarCalc + Таблица — StarCalc + full de càlcul de StarCalc + Sešit StarCalc + Taenlen StarCalc + StarCalc-regneark + StarCalc-Tabelle + λογιστικό φύλλο StarCalc + StarCalc spreadsheet + StarCalc-kalkultabelo + hoja de cálculo de StarCalc + StarCalc kalkulu-orria + StarCalc-taulukko + StarCalc rokniark + feuille de calcul StarCalc + scarbhileog StarCalc + folla de cálculo de StarCalc + גליון נתונים של StarCalc + StarCalc-munkafüzet + Lembar sebar StarCalc + Foglio di calcolo StarCalc + StarCalc スプレッドシート + StarCalc электрондық кестесі + StarCalc 스프레드시트 + StarCalc skaičialentė + StarCalc izklājlapa + Hamparan StarCalc + StarCalc-regneark + StarCalc-rekenblad + StarCalc-rekneark + Arkusz StarCalc + folha de cálculo do StarCalc + Planilha do StarCalc + Foaie de calcul StarCalc + электронная таблица StarCalc + Zošit StarCalc + Razpredelnica StarCalc + Fletë llogaritjesh StarCalc + StarCalc табеларни прорачун + StarCalc-kalkylblad + ел. таблиця StarCalc + Bảng tính StarCalc + STarCalc 工作簿 + StarCalc 試算表 + + + + + StarChart chart + مخطط StarChart + StarChart cədvəli + Dyjahrama StarChart + Диаграма — StarChart + diagrama de StarChart + Graf StarChart + Siart StarChart + StarChart-diagram + StarChart-Diagramm + γράφημα StarChart + StarChart chart + StarChart-diagramo + gráfica de StarChart + StarChart diagrama + StarChart-kaavio + StarChart strikumynd + graphique StarChart + cairt StarChart + gráfica de StarChart + טבלה של StarChart + StarChart-grafikon + Bagan StarChart + Grafico StarChart + StarChart チャート + StarChart диаграммасы + StarCalc 표 + StarChart diagrama + StarChart diagramma + Carta StarChart + StarChart graf + StarChart-kaart + StarChart-graf + Wykres StarChart + gráfico do StarChart + Gráfico StarChart + Diagramă StarChart + диаграмма StarChart + Graf StarChart + Datoteka grafikona StarChart + Grafik StarChart + StarChart графикон + StarChart-diagram + діаграма StarChart + Đồ thị StarChart + STarChart 图表 + StarChart 圖表 + + + + + StarDraw drawing + تصميم StarDraw + StarDraw çəkimi + Rysunak StarDraw + Чертеж — StarDraw + dibuix de StarDraw + Kresba StarDraw + Darlun StarDraw + StarDraw-tegning + StarDraw-Zeichnung + σχέδιο StarDraw + StarDraw drawing + StarDraw-grafikaĵo + dibujo de StarDraw + StarDraw marrazkia + StarDraw-piirros + StarDraw tekning + dessin StarDraw + líníocht StarDraw + debuxo de StarDraw + ציור של StarDrawing + StarDraw-rajz + Gambar StarDraw + Disegno StarDraw + StarDraw ドロー + StarDraw суреті + StarCalc 드로잉 + StarDraw piešinys + StarDraw zīmējums + Lukisan StarDraw + StarDraw tegning + StarDraw-tekening + StarDraw-teikning + Rysunek StarDraw + desenho do StarDraw + Desenho do StarDraw + Desen StarDraw + изображение StarDraw + Kresba StarDraw + Datoteka risbe StarDraw + Vizatim StarDraw + StarDraw drawing + StarDraw-teckning + малюнок StarDraw + Bản vẽ StarDraw + STarDraw 绘图 + StarDraw 繪圖 + + + + + StarImpress presentation + عرض تقديمي StarImpress + StarImpress təqdimatı + Prezentacyja StarImpress + Презентация — StarImpress + presentació de StarImpress + Prezentace StarImpress + Cyflwyniad StarImpress + StarImpress-præsentation + StarImpress-Präsentation + παρουσίαση StarImpress + StarImpress presentation + StarImpress-prezentaĵo + presentación de StarImpress + StarImpress aurkezpena + StarImpress-esitys + StarImpress framløga + présentation StarImpress + láithreoireacht StarImpress + presentación de StarImpress + מצגת של StarImpress + StarImpress-bemutató + Presentasi StarImpress + Presentazione StarImpress + StarImpress プレゼンテーション + StarImpress презентациясы + StarImpress 프리젠테이션 + StarImpress pateiktis + StarImpress prezentācija + Persembahan StarImpress + StarImpress-presentasjon + StarImpress-presentatie + StarImpress-presentasjon + Prezentacja StarImpress + apresentação do StarImpress + Apresentação do StarImpress + Prezentare StarImpress + презентация StarImpress + Prezentácia StarImpress + Predstavitev StarImpress + Prezantim StarImpress + StarImpress презентација + StarImpress-presentation + презентація StarImpress + Trình diễn StarImpress + STarImpress 演示文稿 + StarImpress 簡報檔 + + + + + + StarMail email + بريد StarMail الإلكتروني + Email StarMail + Електронно писмо — StarMail + correu electrònic de StarMail + E-mail StarMail + StarMail-e-brev + StarMail-E-Mail + ηλ. μήνυμα StarMail + StarMail email + StarMail-retpoŝto + correo electrónico de StarMail + StarMail helb.el. + StarMail-sähköposti + StarMail t-postur + courriel StarMail + ríomhphost StarMail + Correo electrónico de StarMail + דוא"ל של StarMail + StarMail e-mail + Email StarMail + Email StarMail + StarMail メール + StarMail электрондық хаты + StarMail 전자우편 + StarMail el. laiškas + StarMail epasts + Emel StarMail + StarMail-melding + StarMail-e-mail + StarMail-fil + E-Mail StarMail + e-mail do StarMail + E-mail do StarMail + Email StarEmail + электронное письмо StarMail + E-mail StarMail + Datoteka pošte StarMail + Mesazh StarMail + StarMail пошта + StarMail-e-post + поштове повідомлення StarMail + Thư điện tử StarMail + STarMail 电子邮件 + StarMail 郵件 + + + + StarMath formula + صيغة StarMath + Formuła StarMath + Формула — StarMath + fórmula de StarMath + Vzorec StarMath + StarMath-formel + StarMath-Formel + μαθηματικός τύπος StarMath + StarMath formula + StarMath-formulo + fórmula de StarMath + StarMath formula + StarMath-kaava + StarMath frymil + formule StarMath + foirmle StarMath + fórmula de StarMath + נוסחה של StarMath + StarMath-képlet + Formula StarMath + Formula StarMath + StarMath 計算式 + StarMath формуласы + StarMath 수식 + StarMath formulė + StarMath formula + Formula StarMath + StarMath-formel + StarMath-formule + StarMath-formel + Formuła StarMath + fórmula do StarMath + Fórmula do StarMath + Formulă StarMath + формула StarMath + Vzorec StarMath + Datoteka formule StarMath + Formulë StarMath + StarMath формула + StarMath-formel + формула StarMath + Công thức StarMath + STarMath 公式 + StarMath 公式 + + + + + StarWriter document + مستند StarWriter + StarWriter sənədi + Dakument StarWriter + Документ — StarWriter + document de StarWriter + Dokument StarWriter + Dogfen StarWriter + StarWriter-dokument + StarWriter-Dokument + έγγραφο StarWriter + StarWriter document + StarWriter-dokumento + documento de StarWriter + StarWriter dokumentua + StarWriter-asiakirja + StarWriter skjal + document StarWriter + cáipéis StarWriter + documento de StarWriter + מסמך של StarWriter + StarWriter-dokumentum + Dokumen StarWriter + Documento StrarWriter + StarWriter ドキュメント + StarWriter құжаты + StarWriter 문서 + StarWriter dokumentas + StarWriter dokuments + Dokumen StarWriter + StarWriter-dokument + StarWriter-document + StarWriter document + Dokument StarWriter + documento do StarWriter + Documento do StarWriter + Document StarWriter + документ StarWriter + Dokument StarWriter + Dokument StarWriter + Dokument StarWriter + StarWriter документ + StarWriter-dokument + документ StarWriter + Tài liệu StarWriter + STarWriter 文档 + StarWriter 文件 + + + + + + + + + + OpenOffice Calc spreadsheet + جدول Calc المكتب المفتوح + Raźlikovy arkuš OpenOffice Calc + Таблица — OpenOffice Calc + full de càlcul d'OpenOffice Calc + Sešit OpenOffice Calc + OpenOffice Calc-regneark + OpenOffice-Calc-Tabelle + hoja de cálculo de OpenOffice Calc + OpenOffice.org Calc kalkulu-orria + OpenOffice Calc -taulukko + OpenOffice Calc rokniark + feuille de calcul OpenOffice Calc + scarbhileog OpenOffice Calc + folla de cálculo de OpenOffice Calc + גליון נתונים של OpenOffice Calc + OpenOffice Calc táblázat + Lembar sebar OpenOffice Calc + Foglio di calcolo OpenOffice Calc + OpenOffice Calc スプレッドシート + OpenOffice Calc электрондық кестесі + OpenOffice Calc 스프레드시트 + OpenOffice Calc skaičialentė + OpenOffice Calc izklājlapa + OpenOffice Calc-regneark + OpenOffice.org Calc-rekenblad + OpenOffice Calc-rekneark + Arkusz kalkulacyjny OpenOffice.org Calc + Planilha do OpenOffice Calc + Foaie de calcul OpenOffice Calc + электронная таблица OpenOffice Calc + Zošit OpenOffice Calc + Razpredelnica OpenOffice.org Calc + Fletë llogaritjesh OpenOffice Calc + OpenOffice Calc-kalkylblad + ел. таблиця OpenOffice Calc + Bảng tính Calc của OpenOffice.org + OpenOffice.org Calc 工作簿 + OpenOffice Calc 試算表 + + + + + + + + + + + + + OpenOffice Calc template + قالب Calc المكتب المفتوح + Šablon OpenOffice Calc + Шаблон за таблици — OpenOffice Calc + plantilla d'OpenOffice Calc + Šablona OpenOffice Calc + OpenOffice Calc-skabelon + OpenOffice-Calc-Vorlage + OpenOffice Calc template + plantilla de OpenOffice Calc + OpenOffice Calc txantiloia + OpenOffice Calc -malli + OpenOffice Calc formur + modèle OpenOffice Calc + teimpléad OpenOffice Calc + modelo de OpenOffice Calc + תבנית של OpenOffice Calc + OpenOffice Calc sablon + Templat OpenOffice Calc + Modello OpenOffice Calc + OpenOffice Calc テンプレート + OpenOffice Calc үлгісі + OpenOffice Calc 스프레드시트 문서 서식 + OpenOffice Calc šablonas + OpenOffice Calc veidne + OpenOffice Calc-mal + OpenOffice.org Calc-sjabloon + OpenOffice Calc-mal + Szablon arkusza OpenOffice.org Calc + Modelo do OpenOffice Calc + Șablon OpenOffice Calc + шаблон OpenOffice Calc + Šablóna OpenOffice Calc + Predloga OpenOffice.org Calc + Model OpenOffice Calc + OpenOffice Calc-mall + шаблон ел.таблиці OpenOffice Calc + Mẫu bảng tính Calc của OpenOffice.org + OpenOffice.org Calc 工作簿模板 + OpenOffice Calc 範本 + + + + + + + + + + + + + OpenOffice Draw drawing + تصميم Draw المكتب المفتوح + Rysunak OpenOffice Draw + Чертеж — OpenOffice Draw + dibuix d'OpenOffice Draw + Kresba OpenOffice Draw + OpenOffice Draw-tegning + OpenOffice-Draw-Zeichnung + dibujo de OpenOffice Draw + OpenOffice.org Draw marrazkia + OpenOffice Draw -piirros + OpenOffice Draw tekning + dessin OpenOffice Draw + líníocht OpenOffice Draw + debuxo de OpenOffice Draw + ציור של OpenOffice Draw + OpenOffice Draw rajz + Gambar OpenOffice Draw + Disegno OpenOffice Draw + OpenOffice Draw ドロー + OpenOffice Draw суреті + OpenOffice Draw 그림 + OpenOffice Draw piešinys + OpenOffice Draw zīmējums + OpenOffice Draw-tegning + OpenOffice.org Draw-tekening + OpenOffice Draw-teikning + Rysunek OpenOffice.org Draw + Desenho do OpenOffice Draw + Desen OpenOffice Draw + изображение OpenOffice Draw + Kresba OpenOffice Draw + Datoteka risbe OpenOffice.org Draw + Vizatim OpenOffice Draw + OpenOffice Draw-teckning + малюнок OpenOffice Draw + Bản vẽ Draw của OpenOffice.org + OpenOffice.org Draw 绘图 + OpenOffice Draw 繪圖 + + + + + + + + + + + + + OpenOffice Draw template + قالب Draw المكتب المفتوح + Šablon OpenOffice Draw + Шаблон за чертежи — OpenOffice Draw + plantilla d'OpenOffice Draw + Šablona OpenOffice Draw + OpenOffice Draw-skabelon + OpenOffice-Draw-Vorlage + OpenOffice Draw template + plantilla de OpenOffice.org Draw + OpenOffice Draw txantiloia + OpenOffice Draw -malli + OpenOffice Draw formur + modèle OpenOffice Draw + teimpléad OpenOffice Draw + modelo de OpenOffice Draw + תבנית של OpenOffice Draw + OpenOffice Draw sablon + Templat OpenOffice Draw + Modello OpenOffice Draw + OpenOffice Draw テンプレート + OpenOffice Draw үлгісі + OpenOffice Draw 그림 문서 서식 + OpenOffice Draw šablonas + OpenOffice Draw veidne + OpenOffice Draw-mal + OpenOffice.org Draw-sjabloon + OpenOffice Draw-mal + Szablon rysunku OpenOffice.org Draw + Modelo do OpenOffice Draw + Șablon OpenOffice Draw + шаблон OpenOffice Draw + Šablóna OpenOffice Draw + Predloga OpenOffice.org Draw + Model OpenOffice Draw + OpenOffice Draw-mall + шаблон малюнку OpenOffice Draw + Mẫu bản vẽ Draw của OpenOffice.org + OpenOffice.org Draw 绘图模板 + OpenOffice Draw 範本 + + + + + + + + + + + + + OpenOffice Impress presentation + عرض تقديمي Impress المكتب المفتوح + OpenOffice Impress sənədi + Prezentacyja OpenOffice Impress + Презентация — OpenOffice Impress + presentació d'OpenOffice Impress + Prezentace OpenOffice Impress + Cyflwyniad OpenOffice (Impress) + OpenOffice Impress-præsentation + OpenOffice-Impress-Vorlage + presentación de OpenOffice Impress + OpenOffice.org Impress aurkezpena + OpenOffice Impress -esitys + OpenOffice Impress framløga + présentation OpenOffice Impress + láithreoireacht OpenOffice Impress + presentación de de OpenOffice Impress + מצגת של OpenOffice Impress + OpenOffice Impress bemutató + Presentasi OpenOffice Impress + Presentazione OpenOffice Impress + OpenOffice Impress プレゼンテーション + OpenOffice Impress презентациясы + OpenOffice Impress 프리젠테이션 + OpenOffice Impress pateiktis + OpenOffice Impress prezentācija + OpenOffice Impress-presentasjon + OpenOffice.org Impress-presentatie + OpenOffice Impress-presentasjon + Prezentacja OpenOffice.org Impress + Apresentação do OpenOffice Impress + Prezentare OpenOffice Impress + презентация OpenOffice Impress + Prezentácia OpenOffice Impress + Predstavitev OpenOffice.org Impress + Prezantim OpenOffice Impress + OpenOffice Impress-presentation + презентація OpenOffice Impress + Trình diễn Impress của OpenOffice.org + OpenOffice.org Impress 演示文稿 + OpenOffice Impress 簡報 + + + + + + + + + + + + + OpenOffice Impress template + قالب Impress المكتب المفتوح + Šablon OpenOffice Impress + Шаблон за презентации — OpenOffice Impress + plantilla d'OpenOffice Impress + Šablona OpenOffice Impress + OpenOffice Impress-skabelon + OpenOffice-Impress-Vorlage + OpenOffice Impress template + plantilla de OpenOffice Impress + OpenOffice Impress txantiloia + OpenOffice Impress -malli + OpenOffice Impress formur + modèle OpenOffice Impress + teimpléad OpenOffice Impress + modelo de OpenOffice Impress + תבנית של OpenOffice Impress + OpenOffice Impress sablon + Templat OpenOffice Impress + Modello OpenOffice Impress + OpenOffice Impress テンプレート + OpenOffice Impress үлгісі + OpenOffice Impress 프리젠테이션 문서 서식 + OpenOffice Impress šablonas + OpenOffice Impress veidne + OpenOffice Impress-mal + OpenOffice.org Impress-sjabloon + OpenOffice Impress-mal + Szablon prezentacji OpenOffice.org Impress + Modelo do OpenOffice Impress + Șablon OpenOffice Impress + шаблон OpenOffice Impress + Šablóna OpenOffice Impress + Predloga OpenOffice.org Impress + Model OpenOffice Impress + OpenOffice Impress-mall + шаблон презентації OpenOffice Impress + Mẫu trình diễn Impress của OpenOffice.org + OpenOffice.org Impress 演示文稿模板 + OpenOffice Impress 範本 + + + + + + + + + + + + + OpenOffice Math formula + صيغة Math المكتب المفتوح + Formuła OpenOffice Math + Формула — OpenOffice Math + fórmula d'OpenOffice Math + Vzorec OpenOffice Math + OpenOffice Math-formel + OpenOffice-Math-Formel + fórmula de OpenOffice Math + OpenOffice.org Math formula + OpenOffice Math -kaava + OpenOffice Math frymil + formule OpenOffice Math + foirmle OpenOffice Math + fórmula de OpenOffice Math + נוסחה של OpenOffice Math + OpenOffice Math képlet + Formula OpenOffice Math + Formula OpenOffice Math + OpenOffice Math 計算式 + OpenOffice Math формуласы + OpenOffice Math 수식 + OpenOffice Math formulė + OpenOffice Math formula + OpenOffice Math-formel + OpenOffice.org Math-formule + OpenOffice Math-formel + Formuła OpenOffice.org Math + Fórmula do OpenOffice Math + Formulă OpenOffice Math + формула OpenOffice Math + Vzorec OpenOffice Math + Dokument formule OpenOffice.org Math + Formulë OpenOffice Math + OpenOffice Math-formel + формула OpenOffice Math + Công thức Math của OpenOffice.org + OpenOffice.org Math 公式 + OpenOffice Math 公式 + + + + + + + + + + + + + OpenOffice Writer document + مستند Writer المكتب المفتوح + OpenOffice Writer sənədi + Dakument OpenOffice Writer + Документ — OpenOffice Writer + document d'OpenOffice Writer + Dokument OpenOffice Writer + Dogfen OpenOffice (Writer) + OpenOffice Writer-dokument + OpenOffice-Writer-Dokument + documento de OpenOffice Writer + OpenOffice.org Writer dokumentua + OpenOffice Writer -asiakirja + OpenOffice Writer skjal + document OpenOffice Writer + cáipéis OpenOffice Writer + documento de OpenOffice Writer + מסמך של OpenOffice Writer + OpenOffice Writer dokumentum + Dokumen OpenOffice Writer + Documento OpenOffice Writer + OpenOffice Writer ドキュメント + OpenOffice Writer құжаты + OpenOffice Writer 문서 + OpenOffice Writer dokumentas + OpenOffice Writer dokuments + OpenOffice Writer-dokument + OpenOffice.org Writer-document + OpenOffice Writer-dokument + Dokument OpenOffice.org Writer + Documento do OpenOffice Writer + Document OpenOffice Writer + документ OpenOffice Writer + Dokument OpenOffice Writer + Dokument OpenOffice.org Writer + Dokument OpenOffice Writer + OpenOffice Writer-dokument + документ OpenOffice Writer + Tài liệu Writer của OpenOffice.org + OpenOffice.org Writer 文档 + OpenOffice Writer 文件 + + + + + + + + + + + + + OpenOffice Writer global document + مستند المكتب المفتوح Writer العالمي + OpenOffice Writer qlobal sənədi + Hlabalny dakument OpenOffice Writer + Документ - глобален — OpenOffice Writer + document global d'OpenOffice Writer + Globální dokument OpenOffice Writer + Dogfen eang OpenOffice (Writer) + OpenOffice Writer-globalt dokument + OpenOffice-Writer-Globaldokument + documento global de OpenOffice Writer + OpenOffice.org Writer dokumentu globala + OpenOffice Writer - yleinen asiakirja + OpenOffice Writer heiltøkt skjal + document global OpenOffice Writer + cáipéis chomhchoiteann OpenOffice Writer + documento global de OpenOffice Writer + מסמך גלובלי של OpenOffice Writer + OpenOffice Writer globális dokumentum + Dokumen global OpenOffice Writer + Documento globale OpenOffice Writer + OpenOffice Writer グローバルドキュメント + OpenOffice Writer негізгі құжаты + OpenOffice Writer 글로벌 문서 + OpenOffice Writer bendrinis dokumentas + OpenOffice Writer globālais dokuments + Global OpenOffice Writer globalt dokument + OpenOffice.org Writer-globaal-document + OpenOffice Writer globalt dokument + Globalny dokument OpenOffice.org Writer + Documento global do OpenOffice Writer + Document global OpenOffice Writer + основной документ OpenOffice Writer + Globálny dokument OpenOffice Writer + Splošni dokument OpenOffice.org Writer + Dokument i përgjithshëm OpenOffice Writer + OpenOffice Writer-globaldokument + загальний документ OpenOffice Writer + Tài liệu toàn cục Writer của OpenOffice.org + OpenOffice.org Writer 全局文档 + OpenOffice Writer 主控文件 + + + + + + + + + + + + + OpenOffice Writer template + قالب Writer المكتب المفتوح + OpenOffice Writer şablonu + Šablon OpenOffice Writer + Шаблон за документи — OpenOffice Writer + plantilla d'OpenOffice Writer + Šablona OpenOffice Writer + Templed OpenOffice (Writer) + OpenOffice Writer-skabelon + OpenOffice-Writer-Vorlage + OpenOffice Writer template + plantilla de OpenOffice Writer + OpenOffice Writer txantiloia + OpenOffice Writer -malli + OpenOffice Writer formur + modèle OpenOffice Writer + teimpléad OpenOffice Writer + modelo de OpenOffice Writer + תסנית של OpenOffice Writer + OpenOffice Writer sablon + Templat OpenOffice Writer + Modello OpenOffice Writer + OpenOffice Writer ドキュメントテンプレート + OpenOffice Writer үлгісі + OpenOffice Writer 문서 서식 + OpenOffice Writer šablonas + OpenOffice Writer veidne + Templat OpenOffice Writer + OpenOffice Writer-mal + OpenOffice.org Writer-sjabloon + OpenOffice Writer-mal + Szablon dokumentu OpenOffice.org Writer + Modelo do OpenOffice Writer + Șablon OpenOffice Writer + шаблон OpenOffice Writer + Šablóna OpenOffice Writer + Predloga OpenOffice.org Writer + Model OpenOffice Writer + OpenOffice Writer-mall + шаблон документа OpenOffice Writer + Mẫu tài liệu Writer của OpenOffice.org + OpenOffice.org Writer 文档模板 + OpenOffice Writer 範本 + + + + + + + + + + + + + ODT document + مستند ODT + Dakument ODT + Документ — ODT + document ODT + Dokument ODT + ODT-dokument + ODT-Dokument + ODT document + ODT-dokumento + documento ODT + ODT dokumentua + ODT-asiakirja + ODT skjal + document ODT + cáipéis ODT + documento ODT + מסמך ODT + ODT-dokumentum + Dokumen ODT + Documento ODT + ODT ドキュメント + ODT құжаты + ODT 문서 + ODT dokumentas + ODT dokuments + ODT-dokument + ODT-document + ODT-dokument + Dokument ODT + Documento ODT + Document ODT + документ ODT + Dokument ODT + Dokument ODT + Dokument ODT + ODT-dokument + документ ODT + Tài liệu ODT + ODT 文档 + ODT 文件 + ODT + OpenDocument Text + + + + + + + + + + + + + ODT document (Flat XML) + مستند ODT (Flat XML) + Документ — ODT (само XML) + document ODT (XML pla) + Dokument ODT (Flat XML) + ODT-dokument (flad XML) + ODT-Dokument (Unkomprimiertes XML) + documento ODT (XML plano) + ODT dokumentua (XML soila) + ODT skjal (Flat XML) + document ODT (XML plat) + cáipéis ODT (XML cothrom) + documento ODT (XML plano) + מסמך ODT‏ (Flat XML) + ODT-dokumentum (egyszerű XML) + Dokumen ODT (Flat XML) + Documento ODT (XML semplice) + ODT ドキュメント (Flat XML) + ODT құжаты (Тек XML) + ODT 문서 (단일 XML) + ODT dokumentas (Flat XML) + ODT dokuments (plakans XML) + Dokument ODT (prosty XML) + Document ODT (XML simplu) + документ ODT (простой XML) + Dokument ODT (čisté XML) + Datoteka dokumenta ODT (nepovezan XML) + ODT-dokument (platt XML) + документ ODT (Flat XML) + ODT 文档(Flat XML) + ODT 文件 (Flat XML) + FODT + OpenDocument Text (Flat XML) + + + + + + ODT template + قالب ODT + Šablon ODT + Шаблон за документи — ODT + plantilla ODT + Šablona ODT + ODT-skabelon + ODT-Vorlage + ODT template + ODT-ŝablono + plantilla ODT + ODT txantiloia + ODT-malli + ODT formur + modèle ODT + teimpléad ODT + modelo ODT + תבנית ODT + ODT-sablon + Templat ODT + Modello ODT + ODT テンプレート + ODT үлгісі + ODT 문서 서식 + ODT šablonas + ODT veidne + ODT-mal + ODT-sjabloon + ODT-mal + Szablon ODT + Modelo ODT + Șablon ODT + шаблон ODT + Šablóna ODT + Predloga dokumenta ODT + Model ODT + ODT-mall + шаблон ODT + Mẫu ODT + ODT 模板 + ODT 範本 + ODT + OpenDocument Text + + + + + + + + + + + + + OTH template + قالب OTH + Šablon OTH + Шаблон за страници — OTH + plantilla OTH + Šablona OTH + OTH-skabelon + OTH-Vorlage + OTH template + OTH-ŝablono + plantilla OTH + OTH txantiloia + OTH-malli + OTH formur + modèle OTH + teimpléad OTH + modelo OTH + תבנית OTH + OTH-sablon + Templat OTH + Modello OTH + OTH テンプレート + OTH үлгісі + OTH 문서 서식 + OTH šablonas + OTH veidne + OTH-mal + OTH-sjabloon + OTH-mal + Szablon OTH + Modelo OTH + Șablon OTH + шаблон OTH + Šablóna OTH + Predloga OTH + Model OTH + OTH-mall + шаблон OTH + Mẫu ODH + OTH 模板 + OTH 範本 + OTH + OpenDocument HTML + + + + + + + + + + + + + ODM document + مستند ODM + Dakument ODM + Документ — ODM + document ODM + Dokument ODM + ODM-dokument + ODM-Dokument + ODM document + ODM-dokumento + documento ODM + ODM dokumentua + ODM-asiakirja + ODM skjal + document ODM + cáipéis ODM + documento ODM + מסמך ODM + ODM-dokumentum + Dokumen ODM + Documento ODM + ODM ドキュメント + ODM құжаты + ODM 문서 + ODM dokumentas + ODM dokuments + ODM-dokument + ODM-document + ODM-dokument + Dokument ODM + Documento ODM + Document ODM + документ ODM + Dokument ODM + Dokument ODM + Dokument ODM + ODM-dokument + документ ODM + Tài liệu ODM + ODM 文档 + ODM 文件 + ODM + OpenDocument Master + + + + + + + + + + + + + ODG drawing + تصميم ODG + Rysunak ODG + Чертеж — ODG + dibuix ODG + Kresba ODG + ODG-tegning + ODG-Zeichnung + ODG drawing + ODG-desegnaĵo + dibujo ODG + ODG marrazkia + ODG-piirros + ODG tekning + dessin ODG + líníocht ODG + debuxo ODG + ציור ODG + ODG-rajz + Gambar ODG + Disegno ODG + ODG ドロー + ODG суреті + ODG 드로잉 + ODG piešinys + ODG zīmējums + ODG-tegning + ODG-tekening + ODG-teikning + Rysunek ODG + Desenho ODG + Desen ODG + изображение ODG + Kresba ODG + Datoteka risbe ODG + Vizatim ODG + ODG-teckning + малюнок ODG + Bản vẽ ODG + ODG 绘图 + ODG 繪圖 + ODG + OpenDocument Drawing + + + + + + + + + + + + + ODG drawing (Flat XML) + رسمة ODG (Flat XML) + Чертеж — ODG (само XML) + dibuix ODG (XML pla) + Kresba ODG (Flat XML) + ODG-tegning (flad XML) + ODG-Zeichnung (Unkomprimiertes XML) + dibujo ODG (XML plano) + ODG marrazkia (XML soila) + ODG tekning (Flat XML) + dessin ODG (XML plat) + líníocht ODG (XML cothrom) + debuxo ODB (XML plano) + ציור ODG (Flat XML( + ODG-rajz (egyszerű XML) + Gambar ODG (FLAT XML) + Disegno ODG (XML semplice) + ODG ドロー (Flat XML) + ODG сызбасы (Тек XML) + ODG 드로잉 (단일 XML) + ODG piešinys (Flat XML) + ODG zīmējums (plakans XML) + Rysunek ODG (prosty XML) + Desen ODG (XML simplu) + изображение ODG (простой XML) + Kresba ODG (čisté XML) + Datoteka risbe ODG (nepovezan XML) + ODG-teckning (platt XML) + малюнок ODG (Flat XML) + ODG 绘图(Flat XML) + ODG 繪圖 (Flat XML) + FODG + OpenDocument Drawing (Flat XML) + + + + + + ODG template + قالب ODG + Šablon ODG + Шаблон за чертежи — ODG + plantilla ODG + Šablona ODG + ODG-skabelon + ODG-Vorlage + ODG template + ODG-ŝablono + plantilla ODG + ODG txantiloia + ODG-malli + ODG formur + modèle ODG + teimpléad ODG + modelo ODG + תבנית ODG + ODG-sablon + Templat ODG + Modello ODG + ODG テンプレート + ODG үлгісі + ODG 문서 서식 + ODG šablonas + ODG veidne + ODG-mal + ODG-sjabloon + ODG-mal + Szablon ODG + Modelo ODG + Șablon ODG + шаблон ODG + Šablóna ODG + Predloga dokumenta ODG + Model ODG + ODG-mall + шаблон ODG + Mẫu ODG + ODG 模板 + ODG 範本 + ODG + OpenDocument Drawing + + + + + + + + + + + + + ODP presentation + عرض تقديمي ODP + Prezentacyja ODP + Презентация — ODP + presentació ODP + Prezentace ODP + ODP-præsentation + ODP-Präsentation + ODP presentation + ODP-prezentaĵo + presentación ODP + ODP aurkezpena + ODP-esitys + ODP framløga + présentation ODP + láithreoireacht ODP + presentación ODP + מצגת ODP + ODP-prezentáció + Presentasi ODP + Presentazione ODP + ODP プレゼンテーション + ODP презентациясы + ODP 프리젠테이션 + ODP pateiktis + ODP prezentācija + ODP-presentasjon + ODP-presentatie + ODP-presentasjon + Prezentacja ODP + Apresentação ODP + Prezentare ODP + презентация ODP + Prezentácia ODP + Predstavitev ODP + Prezantim ODP + ODP-presentation + презентація ODP + Trình diễn ODM + ODP 演示文稿 + ODP 簡報 + ODP + OpenDocument Presentation + + + + + + + + + + + + + ODP presentation (Flat XML) + عرض ODP (Flat XML) + Презентация — ODP (само XML) + presentació ODP (XML pla) + Prezentace ODP (Flat XML) + ODP-præsentation (flad XML) + ODP-Präsentation (Unkomprimiertes XML) + presentación ODP (XML plano) + ODP aurkezpena (XML soila) + ODP framløga (Flat XML) + présentation ODP (XML plat) + láithreoireacht ODP (XML cothrom) + presentación ODP (XML plano) + מצגת ODP‏ (Flat XML) + ODP-prezentáció (egyszerű XML) + Presentasi ODP (Flat XML) + Presentazione ODP (XML semplice) + ODP プレゼンテーション (Flat XML) + ODP презентациясы (Тек XML) + ODP 프리젠테이션 (단일 XML) + ODP pateiktis (Flat XML) + ODP prezentācija (plakans XML) + Prezentacja ODP (prosty XML) + Prezentare ODP (XML simplu) + презентация ODP (простой XML) + Prezentácia ODP (čisté XML) + Predstavitev ODP (nepovezan XML) + ODP-presentation (platt XML) + презентація ODP (Flat XML) + ODP 演示文稿(Flat XML) + ODP 範本 (Flat XML) + FODP + OpenDocument Presentation (Flat XML) + + + + + + ODP template + قالب ODP + Šablon ODP + Шаблон за презентации — ODP + plantilla ODP + Šablona ODP + ODP-skabelon + ODP-Vorlage + ODP template + ODP-ŝablono + plantilla ODP + ODP txantiloia + ODP-malli + ODP formur + modèle ODP + teimpléad ODP + modelo ODP + תבנית ODP + ODP-sablon + Templat ODP + Modello ODP + ODP テンプレート + ODP үлгісі + ODP 문서 서식 + ODP šablonas + ODP veidne + ODP-mal + ODP-sjabloon + ODP-mal + Szablon ODP + Modelo ODP + Șablon ODP + шаблон ODP + Šablóna ODP + Predloga dokumenta ODP + Model ODP + ODP-mall + шаблон ODP + Mẫu ODP + ODP 模板 + ODP 範本 + ODP + OpenDocument Presentation + + + + + + + + + + + + + ODS spreadsheet + جدول ODS + Raźlikovy arkuš ODS + Таблица — ODS + full de càlcul ODS + Sešit ODS + ODS-regneark + ODS-Tabelle + ODS spreadsheet + ODS-kalkultabelo + hoja de cálculo ODS + ODS kalkulu-orria + ODS-taulukko + ODS rokniark + feuille de calcul ODS + scarbhileog ODS + folla de cálculo ODS + גליון נתונים ODS + ODS-táblázat + Lembar sebar ODS + Foglio di calcolo ODS + ODS スプレッドシート + ODS электрондық кестесі + ODS 스프레드시트 + ODS skaičialentė + ODS izklājlapa + ODS-regneark + ODS-rekenblad + ODS-rekneark + Arkusz ODS + Planilha ODS + Foaie de calcul ODS + электронная таблица ODS + Zošit ODS + Razpredelnica ODS + Fletë llogaritjesh ODS + ODS-kalkylblad + ел. таблиця ODS + Bảng tính ODS + ODS 工作簿 + ODS 試算表 + ODS + OpenDocument Spreadsheet + + + + + + + + + + + + + ODS spreadsheet (Flat XML) + جدول ODS (Flat XML) + Таблица — ODS (само XML) + full de càlcul ODS (XML pla) + Sešit ODS (Flat XML) + ODS-regneark (flad XML) + ODS-Tabelle (Unkomprimiertes XML) + hoja de cálculo ODS (XML plano) + ODS kalkulu-orria (XML soila) + ODS rokniark (Flat XML) + feuille de calcul ODS (XML plat) + scarbhileog ODS (XML cothrom) + folla de cálculo ODS (XML plano) + גליון נתונים ODS‏ (XML פשוט) + ODS-táblázat (egyszerű XML) + Lembar sebar ODS (Flat XML) + Foglio di calcolo ODS (XML semplice) + ODS スプレッドシート (Flat XML) + ODS электрондық кестесі (Тек XML) + ODS 스프레드시트 (단일 XML) + ODS skaičialentė (Flat XML) + ODS izklājlapa (plakans XML) + Arkusz ODS (prosty XML) + Foaie de calcul ODS (XML simplu) + электронная таблица ODS (простой XML) + Zošit ODS (čisté XML) + Razpredelnica ODS (nepovezan XML) + ODS-kalkylblad (platt XML) + ел. таблиця ODS (Flat XML) + ODS 工作簿(Flat XML) + ODS 試算表 (Flat XML) + FODS + OpenDocument Spreadsheet (Flat XML) + + + + + + ODS template + قالب ODS + Šablon ODS + Шаблон за таблици — ODS + plantilla ODS + Šablona ODS + ODS-skabelon + ODS-Vorlage + ODS template + ODS-ŝablono + plantilla ODS + ODS txantiloia + ODS-malli + ODS formur + modèle ODS + teimpléad ODS + modelo ODS + תבנית ODS + ODS-sablon + Templat ODS + Modello ODS + ODS テンプレート + ODS үлгісі + ODS 문서 서식 + ODS šablonas + ODS veidne + ODS-mal + ODS-sjabloon + ODS-mal + Szablon ODS + Modelo ODS + Șablon ODS + шаблон ODS + Šablóna ODS + Predloga dokumenta ODS + Model ODS + ODS-mall + шаблон ODS + Mẫu ODS + ODS 模板 + ODS 範本 + ODS + OpenDocument Spreadsheet + + + + + + + + + + + + + ODC chart + مخطط ODC + Dyjahrama ODC + Диаграма — ODC + diagrama ODC + Graf ODC + ODC-diagram + ODC-Diagramm + ODC chart + ODC-diagramo + gráfica ODC + ODC diagrama + ODC-kaavio + ODC strikumynd + graphique ODC + cairt ODC + gráfica ODC + תו ODC + ODC-táblázat + Bagan ODC + Grafico ODC + ODC チャート + ODC диаграммасы + ODC 차트 + ODC diagrama + ODC diagramma + ODC-graf + ODC-grafiek + ODC-diagram + Wykres ODC + Gráfico ODC + Diagramă ODC + диаграмма ODC + Graf ODC + Datoteka grafikona ODC + Grafik ODC + ODC-diagram + діаграма ODC + Sơ đồ ODC + ODC 图表 + ODC 圖表 + ODC + OpenDocument Chart + + + + + + + + + + + + + ODC template + قالب ODC + Шаблон за диаграми — ODC + plantilla ODC + Šablona ODC + ODC-skabelon + ODC-Vorlage + ODC-ŝablono + plantilla ODC + ODC txantiloia + ODC-malli + ODC formur + modèle ODC + teimpléad ODC + modelo ODC + תבנית ODC + ODC-sablon + Templat ODC + Modello ODC + ODC テンプレート + ODC үлгісі + ODC 문서 서식 + ODC šablonas + ODC veidne + ODC-sjabloon + Szablon ODC + Modelo ODC + Șablon ODC + шаблон ODC + Šablóna ODC + Predloga ODC + ODC-mall + шаблон ODC + Mẫu ODC + ODC 模板 + ODC 範本 + ODC + OpenDocument Chart + + + + + + + + + + + + + ODF formula + صيغة ODF + Formuła ODF + Формула — ODF + fórmula ODF + Vzorec ODF + ODF-formel + ODF-Formel + ODF formula + ODF-formulo + fórmula ODF + ODF formula + ODF-kaava + ODF frymil + formule ODF + foirmle ODF + Fórula ODF + נוסחת ODF + ODF-képlet + Formula ODF + Formula ODF + ODF 計算式 + ODF формуласы + ODF 수식 + ODF formulė + ODF formula + ODF-formel + ODF-formule + ODF-formel + Formuła ODF + Fórmula ODF + Formulă ODF + формула ODF + Vzorec ODF + Dokument formule ODF + Formulë ODF + ODF-formel + формула ODF + Công thức ODF + ODF 公式 + ODF 公式 + ODF + OpenDocument Formula + + + + + + + + + + + + + ODF template + قالب ODF + Шаблон за формули — ODF + plantilla ODF + Šablona ODF + ODF-skabelon + ODF-Vorlage + ODF-ŝablono + plantilla ODF + ODF txantiloia + ODF-malli + ODF formur + modèle ODF + teimpléad ODF + modelo ODF + תבנית ODF + ODG-sablon + Templat ODF + Modello ODF + ODF テンプレート + ODF үлгісі + ODF 문서 서식 + ODF šablonas + ODF veidne + ODF-sjabloon + Szablon ODF + Modelo ODF + Șablon ODF + шаблон ODF + Šablóna ODF + Predloga dokumenta ODF + ODF-mall + шаблон ODF + Mẫu ODF + ODF 模板 + ODF 範本 + ODF + OpenDocument Formula + + + + + + + + + + + + + ODB database + قاعدة بيانات ODB + Baza źviestak ODB + База от данни — ODB + base de dades ODB + Databáze ODB + ODB-database + ODB-Datenbank + ODB database + ODB-datumbazo + base de datos ODB + ODB datu-basea + ODB-tietokanta + ODB dátustovnur + base de données ODB + bunachar sonraí ODB + base de datos ODB + בסיס נתונים ODB + ODB-adatbázis + Basis data ODB + Database ODB + ODB データベース + ODB дерекқоры + ODB 데이터베이스 + ODB duomenų bazė + ODB datubāze + ODB-database + ODB-gegevensbank + ODB-database + Baza danych ODB + Banco de dados ODB + Bază de date ODB + база данных ODB + Databáza ODB + Podatkovna zbirka ODB + Bazë me të dhëna ODB + ODB-databas + база даних ODB + Cơ sở dữ liệu ODB + ODB 数据库 + ODB 資料庫 + ODB + OpenDocument Database + + + + + + ODI image + صورة ODI + Vyjava ODI + Изображение — ODI + imatge ODI + Obrázek ODI + ODI-billede + ODI-Bild + ODI image + ODI-bildo + imagen ODI + ODI irudia + ODI-kuva + ODI mynd + image ODI + íomhá ODI + imaxe ODI + תמונת ODI + ODI-kép + Citra ODI + Immagine ODI + ODI 画像 + ODI суреті + ODI 그림 + ODI paveikslėlis + ODI attēls + ODI-bilde + ODI-afbeelding + ODI-bilete + Obraz ODI + Imagem ODI + Imagine ODI + изображение ODI + Obrázok ODI + Slikovna datoteka ODI + Figurë ODI + ODI-bild + зображення ODI + Ảnh ODI + ODI 图像 + ODI 影像 + ODI + OpenDocument Image + + + + + + + + + + + + + OpenOffice.org extension + امتداد OpenOffice.org + Pašyreńnie OpenOffice.org + Разширение — OpenOffice + extensió d'OpenOffice.org + Rozšíření OpenOffice.org + OpenOffice.org-udvidelse + OpenOffice.org-Erweiterung + extensión de OpenOffice + OpenOffice.org luzapena + OpenOffice.org-laajennus + OpenOffice.org víðkan + extension OpenOffice.org + eisínteacht OpenOffice.org + Extensión de OpenOffice.org + הרחבה של OpenOffice.org + OpenOffice.org kiterjesztés + Ekstensi OpenOffice.org + Estensione OpenOffice.org + OpenOffice.org 拡張機能 + OpenOffice.org кеңейтуі + OpenOffice.org 확장 + OpenOffice.org plėtinys + OpenOffice.org paplašinājums + OpenOffice.org-uitbreiding + OpenOffice Writer-utviding + Rozszerzenie OpenOffice.org + Extensão do OpenOffice + Extensie OpenOffice.org + расширение OpenOffice.org + Rozšírenie OpenOffice.org + Razširitev OpenOffice.org + Shtojcë për OpenOffice.org + OpenOffice.org-tillägg + розширення OpenOffice.org + Phần mở rộng của OpenOffice.org + OpenOffice.org 扩展 + OpenOffice.org 擴充套件 + + + + + + Android package + Пакет — Android + paquet d'Android + Balíčky systému Android + Android-Paket + Android-pakaĵo + Paquete de Android + Android-paketti + paquet Android + paquete de Android + חבילת אנדרויד + Android csomag + Paket Android + Pacchetto Android + Android パッケージ + Android дестесі + 안드로이드 패키지 + Android pakotne + Pakiet Androida + пакет Android + Paket Android + Android-paket + пакунок Android + Android + Android 套件 + + + + + SIS package + حزمة SIS + Pakunak SIS + Пакет — SIS + paquet SIS + Balíček SIS + SIS-pakke + SIS-Paket + SIS-pakaĵo + paquete SIS + SIS paketea + SIS-paketti + SIS pakki + paquet SIS + pacáiste SIS + paquete SIS + חבילת SIS + SIS csomag + Paket SIS + Pacchetto SIS + SIS パッケージ + SIS дестесі + SIS 패키지 + SIS paketas + SIS pakotne + SIS-pakke + SIS-pakket + SIS-pakke + Pakiet SIS + Pacote SIS + Pachet SIS + пакет SIS + Balíček SIS + Datoteka paketa SIS + Paketë SIS + SIS-paket + пакунок SIS + Gói SIS + SIS 软件包 + SIS 套件 + SIS + Symbian Installation File + + + + + + + + SISX package + حزمة SISX + Pakunak SISX + Пакет — SISX + paquet SISX + Balíček SISX + SISX-pakke + SISX-Paket + SISX-pakaĵo + paquete SISX + SISX paketea + SISX-paketti + SISX pakki + paquet SISX + pacáiste SISX + paquete SISX + חבילת SISX + SISX csomag + Paket SISX + Pacchetto SISX + SISX パッケージ + SISX дестесі + SISX 패키지 + SISX paketas + SISX pakotne + SISX-pakke + SISX-pakket + SISX-pakke + Pakiet SISX + Pacote SISX + Pachet SISX + пакет SISX + Balíček SISX + Datoteka paketa SISX + Paketë SISX + SISX-paket + пакунок SISX + Gói SISX + SISX 软件包 + SISX 套件 + SIS + Symbian Installation File + + + + + + + + Network Packet Capture + Прихванати пакети по мрежата + captura de paquets de xarxa + Network Packet Capture + Netzwerk-Paketmitschnitt + Caputra de paquete de red + capture de paquet réseau + Captura de Network Packet + לכידה של מנות נתונים ברשת + Hálózati csomagelfogás + Tangkapan Paket Jaringan + Cattura pacchetti rete + ネットワークパケットキャプチャー + ұсталған желілік пакеттер + 네트워크 패킷 캡처 + Network Packet Capture + Przechwycenie pakietu sieciowego + захваченные сетевые пакеты + Zajem omrežnih paketov + перехоплені дані мережевих пакетів + 網路封包捕捉 + + + + + + + + + + + + WordPerfect document + مستند WordPerfect + WordPerfect sənədi + Dakument WordPerfect + Документ — WordPerfect + document de WordPerfect + Dokument WordPerfect + Dogfen WordPerfect + WordPerfect-dokument + WordPerfect-Dokument + έγγραφο WordPerfect + WordPerfect document + WordPerfect-dokumento + documento de WordPerfect + WordPerfect dokumentua + WordPerfect-asiakirja + WordPerfect skjal + document WordPerfect + cáipéis WordPerfect + documento de WordPerfect + מסמך WordPerfect + WordPerfect-dokumentum + Dokumen WordPerfect + Documento WordPerfect + WordPerfect ドキュメント + WordPerfect құжаты + 워드퍼펙트 문서 + WordPerfect dokumentas + WordPerfect dokuments + Dokumen WordPerfect + WordPerfect-dokument + WordPerfect-document + WordPerfect-dokument + Dokument WordPerfect + documento do WordPerfect + Documento do WordPerfect + Document WordPerfect + документ WordPerfect + Dokument WordPerfect + Dokument WordPerfect + Dokument WordPerfect + WordPerfect документ + WordPerfect-dokument + документ WordPerfect + Tài liệu WordPerfect + WordPerfect 文档 + WordPerfect 文件 + + + + + + + + + + + + + + + + SPSS Portable Data File + ملف بيانات SPSS متنقلة + Данни — SPSS, преносими + fitxer de dades portables SPSS + Soubor přenositelných dat SPSS + Portabel SPSS-datafil + SPSS portable Datendatei + archivo de datos portable SPSS + SPSS datuen fitxategi eramangarria + SPSS flytifør dátufíla + fichier portable de données SPSS + comhad iniompartha sonraí SPSS + ficheiro de datos portábel SPSS + קובץ מידע נייד SPSS + SPSS hordozható adatfájl + Berkas Data Portabel SPSS + File dati SPSS Portable + SPSS ポータブルデータファイル + SPSS тасымалы ақпарат файлы + SPSS 이동식 데이터 파일 + SPSS perkeliamų duomenų failas + SPSS pārvietojamu datu fails + Plik przenośnych danych SPSS + Fișier portabil de date SPSS + файл переносимых данных SPSS + Súbor prenosných dát SPSS + Prenosna podatkovna datoteka SPSS + Portabel SPSS-datafil + файл даних SPSS Portable + SPSS 便携式数据文件 + SPSS 可攜式資料檔 + + + + + + + SPSS Data File + ملف بيانات SPSS + Данни — SPSS + fitxer de dades SPSS + Datový soubor SPSS + SPSS-datafil + SPSS-Datendatei + archivo de datos SPSS + SPSS datuen fitxategia + SPSS dátufíla + fichier de données SPSS + comhad sonraí SPSS + ficheiro de datos SPSS + קובץ מידע SPSS + SPSS adatfájl + Berkas Data SPSS + File dati SPSS + SPSS データファイル + SPSS ақпарат файлы + SPSS 데이터 파일 + SPSS duomenų failas + SPSS datu fails + Plik danych SPSS + Fișier date SPSS + файл данных SPSS + Dátový súbor SPSS + Podatkovna datoteka SPSS + SPSS-datafil + файл даних SPSS + SPSS 数据文件 + SPSS 資料檔 + + + + + + + + XBEL bookmarks + علامات XBEL + Zakładki XBEL + Отметки — XBEL + llista d'adreces d'interès XBEL + Záložky XBEL + XBEL-bogmærker + XBEL-Lesezeichen + σελιδοδείκτες XBEL + XBEL bookmarks + XBEL-legosignoj + marcadores XBEL + XBEL laster-markak + XBEL-kirjanmerkit + XBEL bókamerki + marque-pages XBEL + leabharmharcanna XBEL + Marcadores XBEL + סמניית XBEL + XBEL-könyvjelzők + Bookmark XBEL + Segnalibri XBEL + XBEL ブックマーク + XBEL бетбелгілері + XBEL 책갈피 + XBEL žymelės + XBEL grāmatzīmes + Tandabuku XBEL + XBEL-bokmerker + XBEL-bladwijzers + XBEL-bokmerker + Zakładki XBEL + marcadores XBEL + Marcadores do XBEL + Semne de carte XBEL + закладки XBEL + Záložky XBEL + Datoteka zaznamkov XBEL + Libërshënues XBEL + XBEL обележивачи + XBEL-bokmärken + закладки XBEL + Liên kết đã lưu XBEL + XBEL 书签 + XBEL 格式書籤 + XBEL + XML Bookmark Exchange Language + + + + + + + + + 7-zip archive + أرشيف 7-zip + Archiŭ 7-zip + Архив — 7-zip + arxiu 7-zip + Archiv 7-zip + 7-zip-arkiv + 7zip-Archiv + 7z-arkivo + archivador 7-zip + 7-zip artxiboa + 7-zip-arkisto + 7-zip skjalasavn + archive 7-zip + cartlann 7-zip + arquivo 7-zip + ארכיון 7-zip + 7-zip archívum + Arsip 7-zip + Archivio 7-zip + 7-zip アーカイブ + 7-zip архиві + 7-ZIP 압축 파일 + 7-zip archyvas + 7-zip arhīvs + 7-zip-arkiv + 7-zip-archief + 7-zip-arkiv + Archiwum 7-zip + Pacote 7-zip + Arhivă 7-zip + архив 7-zip + Archív 7-zip + Datoteka arhiva 7-zip + Arkiv 7-zip + 7-zip-arkiv + архів 7-zip + Kho nén 7-zip + 7-zip 归档文件 + 7-zip 封存檔 + + + + + + + + AbiWord document + مستند آبي وورد + Dakument AbiWord + Документ — AbiWord + document d'AbiWord + Dokument AbiWord + AbiWord-dokument + AbiWord-Dokument + έγγραφο AbiWord + AbiWord document + AbiWord-dokumento + documento de Abiword + AbiWord dokumentua + AbiWord-asiakirja + AbiWord skjal + document AbiWord + cáipéis AbiWord + documento de AbiWord + מסמך AbiWord + AbiWord-dokumentum + Dokumen AbiWord + Documento AbiWord + AbiWord ドキュメント + AbiWord құжаты + AbiWord 문서 + AbiWord dokumentas + AbiWord dokuments + Dokumen AbiWord + AbiWord-dokument + AbiWord-document + AbiWord-dokument + Dokument AbiWord + documento AbiWord + Documento do AbiWord + Document AbiWord + документ AbiWord + Dokument AbiWord + Dokument AbiWord + Dokument AbiWord + Абиворд документ + AbiWord-dokument + документ AbiWord + Tài liệu AbiWord + AbiWord 文档 + AbiWord 文件 + + + + + + + + + + + + + + CD image cuesheet + صفيحة صورة الـCD جديلة + Infarmacyjny arkuš vyjavy CD + Описание на изображение на CD + «cuesheet» d'imatge de CD + Rozvržení stop obrazu CD + Cd-aftrykscuesheet + CD-Abbild-Cuesheet + CD image cuesheet + cue sheet de una imagen de CD + CD irudiaren CUE orria + CD-vedos cuesheet + index de pistes de CD + bileog chiúáil íomhá CD + cue sheet dunha imaxe de CD + גליון נתונים לתמונת דיסק + CD kép cuesheet + Citra cuesheet CD + Cuesheet immagine CD + CD イメージキューシート + CD бейнесінің құрама кестесі + CD 이미지 큐시트 + CD atvaizdžio aprašas + CD attēla rindulapa + Filliste for CD-avtrykk + CD-inhoudsopgave + CD-bilete-indeksfil + Obraz cuesheet płyty CD + Índice de Imagem de CD + Imagine CD cuesheet + таблица содержания образа CD + Rozvrhnutie stôp obrazu CD + Datoteka razpredelnice odtisa CD cue + Cuesheet imazhi CD + Indexblad för cd-avbild + таблиця CUE образу CD + Tờ tín hiệu báo ảnh CD + CD 映像标记文件 + CD 映像指示表 + + + + + + Lotus AmiPro document + مستند Lotus AmiPro + Lotus AmiPro sənədi + Dakument Lotus AmiPro + Документ — Lotus AmiPro + document de Lotus AmiPro + Dokument Lotus AmiPro + Dogfen Lotus AmiPro + Lotus AmiPro-dokument + Lotus-AmiPro-Dokument + έγγραφο Lotus AmiPro + Lotus AmiPro document + dokumento de Lotus AmiPro + documento de Lotus AmiPro + Lotus AmiPro dokumentua + Lotus AmiPro -asiakirja + Lotus AmiPro skjal + document Lotus AmiPro + cáipéis Lotus AmiPro + documento de Lotus AmiPro + מסמך של Lotus AmiPro + Lotus AmiPro-dokumentum + Dokumen Lotus AmiPro + Documento Lotus AmiPro + Lotus AmiPro ドキュメント + Lotus AmiPro құжаты + Lotus AmiPro 문서 + Lotus AmiPro dokumentas + Lotus AmiPro dokuments + Dokumen Lotus AmiPro + Lotus AmiPro-dokument + Lotus AmiPro-document + Lotus AmiPro-dokument + Dokument Lotus AmiPro + documento Lotus AmiPro + Documento do Lotus AmiPro + Document Lotus AmiPro + документ Lotus AmiPro + Dokument Lotus AmiPro + Dokument Lotus AmiPro + Dokument Lotus AmiPro + Лотус АмиПро документ + Lotus AmiPro-dokument + документ Lotus AmiPro + Tài liệu Lotus AmiPro + Lotus AmiPro 文档 + Lotus AmiPro 文件 + + + + + AportisDoc document + مستند AportisDoc + Документ — AportisDoc + document AportisDoc + Dokument AportisDoc + AportisDoc-dokument + AportisDoc-Dokument + AportisDoc-dokumento + documento AportisDoc + AportisDoc dokumentua + AportisDoc-asiakirja + AportisDoc skjal + document AportisDoc + cáipéis AportisDoc + documento de AportiDoc + מסמך AportisDoc + AportisDoc-dokumentum + Dokumen AportisDoc + Documento AportisDoc + AportisDoc ドキュメント + AportisDoc құжаты + AportisDoc 문서 + AportisDoc dokumentas + AportisDoc dokuments + AportisDoc-document + Dokument AportisDoc + Documento do AportisDoc + Document AportisDoc + документ AportisDoc + Dokument AportisDoc + Dokument AportisDoc + AportisDoc-dokument + документ AportisDoc + Tài liệu AportisDoc + AportisDoc 文档 + AportisDoc 文件 + + + + + + + + + + + Applix Spreadsheets spreadsheet + جداول بيانات Applix + Raźlikovy arkuš Applix Spreadsheets + Таблица — Applix Spreadsheets + full de càlcul d'Applix Spreadsheets + Sešit Applix Spreadsheets + Applix Spreadsheets-regneark + Applix-Spreadsheets-Tabelle + λογιστικό φύλλο Applix Spreadsheets + Applix Spreadsheets spreadsheet + sterntabelo de Applix Spreadsheets + hoja de cálculo de Applix Spreadsheets + Applix Spreadsheets kalkulu-orria + Applix Spreadsheets -taulukko + Applix Spreadsheets rokniark + feuille de calcul Applix + scarbhileog Applix Spreadsheets + folla de cálculo de Applix + גליון נתונים של Applix Spreadsheets + Applix Spreadsheets-munkafüzet + Lembar sebar Applix Spreadsheets + Foglio di calcolo Applix Spreadsheets + Applix Spreadsheets スプレッドシート + Applix Spreadsheets электрондық кестесі + Applix 스프레드시트 + Applix Spreadsheets skaičialentė + Applix Spreadsheets izklājlapa + Hamparan Applix Spreadsheets + Applix Spreadsheets-regneark + Applix Spreadsheets-rekenblad + Applix Spreadsheets-dokument + Arkusz Applix Spreadsheets + folha de cálculo Applix Spreadsheets + Planilha do Applix Spreadsheets + Foaie de calcul Applix + электронная таблица Applix Spreadsheets + Zošit Applix Spreadsheets + Razpredelnica Applix Spreadsheets + Fletë llogaritjesh Applix Spreadsheets + Applix табеларни документ + Applix Spreadsheets-kalkylblad + ел. таблиця Applix Spreadsheets + Bảng tính Applix Spreadsheets + Applix Spreadsheets 工作簿 + Applix Spreadsheets 試算表 + + + + + + + + + + + Applix Words document + مستند كلمات Applix + Applix Words sənədi + Dakument Applix Words + Документ — Applix Words + document d'Applix Words + Dokument Applix Words + Dogfen Applix Words + Applix Words-dokument + Applix-Words-Dokument + έγγραφο Applix Words + Applix Words document + dokumento de Applix Words + documento de Applix Words + Applix Words dokumentua + Applix Words -asiakirja + Applix Words skjal + document Applix Words + cáipéis Applix Words + documento de Applix Words + מסמך של Applix Words + Applix Words-dokumentum + Dokumen Applix Words + Documento Applix Words + Applix Words ドキュメント + Applix Words құжаты + Applix Words 문서 + Applix Words dokumentas + Applix Words dokuments + Dokumen Perkataan Applix + Applix Words-dokument + Applix Words-document + Applix Words dokument + Dokument Applix Words + documento Applix Words + Documento do Applix Words + Document Applix Words + документ Applix Words + Dokument Applix Words + Dokument Applix Words + Dokument Applix Words + Applix Words документ + Applix Words-dokument + документ Applix Words + Tài liệu Applix Words + Applix Words 文档 + Applix Words 文件 + + + + + + + + + + ARC archive + أرشيف ARC + Archiŭ ARC + Архив — ARC + arxiu ARC + Archiv ARC + ARC-arkiv + ARC-Archiv + ARC-arkivo + archivador ARC + ARC artxiboa + ARC-arkisto + ARC skjalasavn + archive ARC + cartlann ARC + arquivo ARC + ארכיון ARC + ARC-archívum + Arsip ARC + Archivio ARC + ARC アーカイブ + ARC архиві + ARC 압축 파일 + ARC archyvas + ARC arhīvs + ARC-arkiv + ARC-archief + ARC-arkiv + Archiwum ARC + Pacote ARC + Arhivă ARC + архив ARC + Archív ARC + Datoteka arhiva ARC + Arkiv ARC + ARC-arkiv + архів ARC + Kho nén ARC + ARC 归档文件 + ARC 封存檔 + + + + + + + + + + + + AR archive + أرشيف AR + Archiŭ AR + Архив — AR + arxiu AR + Archiv AR + AR-arkiv + AR-Archiv + σρχείο AR + AR archive + AR-arkivo + archivador AR + AR artxiboa + AR-arkisto + AR skjalasavn + archive AR + cartlann AR + arquivo AR + ארכיון AR + AR-archívum + Arsip AR + Archivio AR + AR アーカイブ + AR архиві + AR 묶음 파일 + AR archyvas + AR arhīvs + Arkib AR + AR-arkiv + AR-archief + AR-arkiv + Archiwum AR + arquivo AR + Pacote AR + Arhivă AR + архив AR + Archív AR + Datoteka arhiva AR + Arkiv AR + АР архива + AR-arkiv + архів AR + Kho nén AR + AR 归档文件 + AR 封存檔 + + + + + + + + + ARJ archive + أرشيف ARJ + ARJ arxivi + Archiŭ ARJ + Архив — ARJ + arxiu ARJ + Archiv ARJ + Archif ARJ + ARJ-arkiv + ARJ-Archiv + αρχείο ARJ + ARJ archive + ARJ-arkivo + archivador ARJ + ARJ artxiboa + ARJ-arkisto + ARJ skjalasavn + archive ARJ + cartlann ARJ + arquivo ARJ + ארכיון ARJ + ARJ-archívum + Arsip ARJ + Archivio ARJ + ARJ アーカイブ + ARJ архиві + ARJ 압축 파일 + ARJ archyvas + ARJ arhīvs + Arkib ARJ + ARJ-arkiv + ARJ-archief + ARJ-arkiv + Archiwum ARJ + arquivo ARJ + Pacote ARJ + Arhivă ARJ + архив ARJ + Archív ARJ + Datoteka arhiva ARJ + Arkiv ARJ + ARJ архива + ARJ-arkiv + архів ARJ + Kho nén ARJ + ARJ 归档文件 + ARJ 封存檔 + ARJ + Archived by Robert Jung + + + + + + + + ASP page + صفحة ASP + Staronka ASP + Страница — ASP + pàgina ASP + Stránka ASP + ASP-side + ASP-Seite + ASP page + ASP-paĝo + página ASP + ASP orria + ASP-sivu + ASP síða + page ASP + leathanach ASP + páxina ASP + עמוד ASP + ASP oldal + Halaman ASP + Pagina ASP + ASP ページ + ASP парағы + ASP 페이지 + ASP puslapis + ASP lapa + ASP-side + ASP-pagina + ASP-side + Strona ASP + Página ASP + Pagină ASP + страница ASP + Stránka ASP + Datoteka spletne strani ASP + Faqe ASP + ASP-sida + сторінка ASP + Trang ASP + ASP 页面 + ASP 頁面 + ASP + Active Server Page + + + + + + AWK script + سكربت AWK + AWK skripti + Skrypt AWK + Скрипт — AWK + script AWK + Skript AWK + Sgript AWK + AWK-program + AWK-Skript + πρόγραμμα εντολών AWK + AWK script + AWK-skripto + script en AWK + AWK script-a + AWK-komentotiedosto + AWK boðrøð + script AWK + script AWK + script de AWK + תסריט AWK + AWK-parancsfájl + Skrip AWK + Script AWK + AWK スクリプト + AWK сценарийі + AWK 스크립트 + AWK scenarijus + AWK skripts + Skrip AWK + AWK-skript + AWK-script + WAK-skript + Skrypt AWK + 'script' AWK + Script AWK + Script AWK + сценарий AWK + Skript AWK + Skriptna datoteka AWK + Script AWK + AWK скрипта + AWK-skript + скрипт AWK + Văn lệnh AWK + AWK 脚本 + AWK 指令稿 + + + + + + + + + + + + + + + + + + + BCPIO document + مستند BCPIO + BCPIO sənədi + Dakument BCPIO + Документ — BCPIO + document BCPIO + Dokument BCPIO + Dogfen BCPIO + BCPIO-dokument + BCPIO-Dokument + έγγραφο BCPIO + BCPIO document + BCPIO-dokumento + documento BCPIO + BCPIO dokumentua + BCPIO-asiakirja + BCPIO skjal + document BCPIO + cáipéis BCPIO + documento BCPIO + מסמך של BCPO + BCPIO-dokumentum + Dokumen BCPIO + Documento BCPIO + BCPIO ドキュメント + BCPIO құжаты + BCPIO 문서 + BCPIO dokumentas + BCPIO dokuments + Dokumen BCPIO + BCPIO-dokument + BCPIO-document + BCPIO-dokument + Dokument BCPIO + documento BCPIO + Documento BCPIO + Document BCPIO + документ BCPIO + Dokument BCPIO + Dokument BCPIO + Dokument BCPIO + BCPIO документ + BCPIO-dokument + документ BCPIO + Tài liệu BCPIO + BCPIO 文档 + BCPIO 文件 + BCPIO + Binary CPIO + + + + + BitTorrent seed file + ملف باذر البت تورنت + BitTorrent seed faylı + Fajł krynicy BitTorrent + Файл-източник — BitTorrent + fitxer llavor de BitTorrent + Soubor BitTorrent + Ffeil hadu BitTorrent + BitTorrent-frøfil + BitTorrent-Seed-Datei + αρχείο BitTorrent seed + BitTorrent seed file + BitTorrent-semdosiero + archivo semilla de BitTorrent + BitTorrent hazi-fitxategia + BitTorrent-siementiedosto + BitTorrent seed fíla + fichier graine BitTorrent + comhad síl BitTorrent + ficheiro de orixe BitTorrent + קובץ זריעה של BitTorrent + BitTorrent-magfájl + Berkas benih BitTorrent + File seed BitTorrent + BitTorrent シードファイル + BitTorrent көз файлы + 비트토렌트 시드 파일 + BitTorrent šaltinio failas + BitTorrent avota fails + Fail seed BitTorrent + Fil med utgangsverdi for BitTorrent + BitTorrent-bestand + Nedlastingsfil for BitTorrent + Plik ziarna BitTorrent + ficheiro de origem BitTorrent + Arquivo semente BitTorrent + Fișier sursă-completă BitTorrent + файл источника BitTorrent + Súbor BitTorrent + Datoteka sejanja BitTorrent + File bazë BitTorrent + Датотека са БитТорентовим полазиштима + BitTorrent-distributionsfil + файл поширення BitTorrent + Tải tập hạt BitTorrent + BitTorrent 种子文件 + BitTorrent 種子檔 + + + + + + + Blender scene + مشهد بلندر + Scena Blender + Сцена — Blender + escena Blender + Scéna Blender + Blenderscene + Blender-Szene + σκηνή Blender + Blender scene + Blender-sceno + escena de Blender + Blender-eko fitxategia + Blender-näkymä + Blender leikmynd + scène Blender + radharc Blender + escena de Blender + סצנת Blender + Blender-jelenet + Scene Blender + Scena Blender + Blender シーン + Blender сахнасы + Blender 장면 + Blender scena + Blender aina + Babak Blender + Blender-scene + Blender-scène + Blender-scene + Scena programu Blender + cenário Blender + Cena do Blender + Scenă Blender + сцена Blender + Scéna Blender + Datoteka scene Blender + Skenë Blender + Блендер сцена + Blender-scen + сцена Blender + Cảnh Blender + Blender 场景 + Blender 場景 + + + + + + + + + + TeX DVI document (bzip-compressed) + مستند TeX DVI (مضغوط-bzip) + Dakument TeX DVI (bzip-skampresavany) + Документ — TeX DVI, компресиран с bzip + document TeX DVI (comprimit amb bzip) + Dokument TeX DVI (komprimovaný pomocí bzip) + TeX DVI-dokument (bzip-komprimeret) + TeX-DVI-Dokument (bzip-komprimiert) + documento DVI de TeX (comprimido con bzip) + TeX DVI dokumentua (bzip-ekin konprimitua) + TeX DVI -asiakirja (bzip-pakattu) + TeX DVI skjal (bzip-stappað) + document DVI TeX (compressé bzip) + cáipéis DVI TeX (comhbhrúite le bzip) + documento DVI de TeX (comprimido con bzip) + מסמך מסוג TeX DVI (מכווץ ע"י bzip) + TeX DVI dokumentum (bzip-pel tömörítve) + Dokumen TeX DVI (terkompresi bzip) + Documento TeX DVI (compresso con bzip) + Tex DVI ドキュメント (bzip 圧縮) + TeX DVI құжаты (bzip-пен сығылған) + TeX DVI 문서 (BZIP 압축) + TeX DVI dokumentas (suglaudintas su bzip) + TeX DVI dokuments (saspiests ar bzip) + TeX DVI-dokument (bzip-komprimert) + TeX DVI-document (ingepakt met bzip) + TeX DVI-dokument (pakka med bzip) + Dokument TeX DVI (kompresja bzip) + Documento DVI TeX (compactado com bzip) + Document TeX DVI (comprimat bzip) + документ TeX DVI (сжатый bzip) + Dokument TeX DVI (komprimovaný pomocou bzip) + Dokument TeX DVI (stisnjen z bzip) + Dokument Tex DVI (i kompresuar me bzip) + TeX DVI-dokument (bzip-komprimerat) + документ TeX DVI (стиснений bzip) + Tài liệu DVI TeX (đã nén bzip) + TeX DVI 文档(gzip 压缩) + TeX DVI 文件 (bzip 格式壓縮) + + + + + Bzip archive + أرشيف Bzip + Archiŭ bzip + Архив — bzip + arxiu bzip + Archiv bzip + Bzip-arkiv + Bzip-Archiv + Bzip-arkivo + archivador Bzip + Bzip artxiboa + Bzip-arkisto + Bzip skjalasavn + archive bzip + cartlann Bzip + arquivo Bzip + ארכיון Bzip + Bzip archívum + Arsip Bzip + Archivio bzip + Bzip アーカイブ + Bzip архиві + BZIP 압축 파일 + Bzip archyvas + Bzip arhīvs + Bzip-arkiv + Bzip-archief + Bzip-arkiv + Archiwum bzip + Pacote Bzip + Arhivă Bzip + архив BZIP + Archív bzip + Datoteka arhiva Bzip + Arkiv bzip + Bzip-arkiv + архів bzip + Kho nén bzip + bzip 归档文件 + Bzip 封存檔 + + + + + + + + + + Tar archive (bzip-compressed) + أرشيف Tar (مضغوط-bzip) + Archiŭ tar (bzip-skampresavany) + Архив — tar, компресиран с bzip + arxiu tar (comprimit amb bzip) + Archiv tar (komprimovaný pomocí bzip) + Tar-arkiv (bzip-komprimeret) + Tar-Archiv (bzip-komprimiert) + archivador Tar (comprimido con bzip) + Tar artxiboa (bzip-ekin konprimitua) + Tar-arkisto (bzip-pakattu) + Tar skjalasavn (bzip-stappað) + archive tar (compressée bzip) + cartlann Tar (comhbhrúite le bzip) + arquivo Tar (comprimido con bzip) + ארכיון Tar (מכווץ ע"י bzip) + Tar archívum (bzip-pel tömörítve) + Arsip Tar (terkompresi bzip) + Archivio tar (compresso con bzip) + Tar アーカイブ (bzip 圧縮) + Tar архиві (bzip-пен сығылған) + TAR 묶음 파일 (BZIP 압축) + Tar archyvas (suglaudintas su bzip) + Tar arhīvs (saspiests ar bzip) + Tar-arkiv (bzip-komprimert) + Tar-archief (ingepakt met bzip) + Tar-arkiv (pakka med bzip) + Archiwum tar (kompresja bzip) + Pacote tar (compactado com bzip) + Arhivă Tar (comprimată bzip) + архив TAR (сжатый BZIP) + Archív tar (komprimovaný pomocou bzip) + Datoteka arhiva Tar (stisnjen z bzip) + Arkiv tar (i kompresuar me bzip) + Tar-arkiv (bzip-komprimerat) + архів tar (стиснений bzip) + Kho nén tar (đã nén bzip) + Tar 归档文件(bzip 压缩) + Tar 封存檔 (bzip 格式壓縮) + + + + + + + + + PDF document (bzip-compressed) + مستند PDF (مضغوط-bzip) + Dakument PDF (bzip-skampresavany) + Документ — PDF, компресиран с bzip + document PDF (comprimit amb bzip) + Dokument PDF (komprimovaný pomocí bzip) + PDF-dokument (bzip-komprimeret) + PDF-Dokument (bzip-komprimiert) + documento PDF (comprimido con bzip) + PostScript dokumentua (bzip-ekin konprimitua) + PDF-asiakirja (bzip-pakattu) + PDF skjal (bzip-stappað) + document PDF (compressé bzip) + cáipéis PDF (comhbhrúite le bzip) + documento PDF (comprimido en bzip) + מסמך PDF (מכווץ ע"י bzip) + PDF dokumentum (bzip-tömörítésű) + Dokumen PDF (terkompresi bzip) + Documento PDF (compresso con bzip) + PDF ドキュメント (bzip 圧縮) + PDF құжаты (bzip-пен сығылған) + PDF 문서 (BZIP 압축) + PDF dokumentas (suglaudintas su bzip) + PDF dokuments (saspiests ar bzip) + PDF-dokument (bzip-komprimert) + PDF-document (ingepakt met bzip) + PDF-dokument (pakka med bzip) + Dokument PDF (kompresja bzip) + Documento PDF (compactado com bzip) + Document PDF (comprimat bzip) + документ PDF (сжатый bzip) + Dokument PDF (komprimovaný pomocou bzip) + Dokument PDF (stisnjen z bzip) + Dokument PDF (i kompresuar me bzip) + PDF-dokument (bzip-komprimerat) + документ PDF (стиснений bzip) + Tài liệu PDF (đã nén bzip) + PDF 文档(bzip 压缩) + PDF 文件 (bzip 格式壓縮) + + + + + PostScript document (bzip-compressed) + مستند PostScript (مضغوط-bzip) + Dakument PostScript (bzip-skampresavany) + Документ — PostScript, компресиран с bzip + document PostScript (comprimit amb bzip) + Dokument PostScript (komprimovaný pomocí bzip) + PostScript-dokument (bzip-komprimeret) + PostScript-Dokument (bzip-komprimiert) + documento PostScript (comprimido con bzip) + PostScript dokumentua (bzip-ekin konprimitua) + PostScript-asiakirja (bzip-pakattu) + PostScript skjal (bzip-stappað) + document PostScript (compressé bzip) + cáipéis PostScript (comhbhrúite le bzip) + documento PostScript (comprimido con bzip) + מסמך PostDcript (מכווץ ע"י bzip) + PostScript dokumentum (bzip-tömörítésű) + Dokumen PostScript (terkompresi bzip) + Documento PostScript (compresso con bzip) + PostScript ドキュメント (bzip 圧縮) + PostScript құжаты (bzip-пен сығылған) + 포스트스크립트 문서 (BZIP 압축) + PostScript dokumentas (suglaudintas su bzip) + PostScript dokuments (saspiests ar bzip) + PostScript-dokument (bzip-komprimert) + PostScript-document (ingepakt met bzip) + PostScript-dokument (pakka med bzip) + Dokument Postscript (kompresja bzip) + Documento PostScript (compactado com bzip) + Document PostScript (comprimat bzip) + документ PostScript (сжатый bzip) + Dokument PostScript (komprimovaný pomocou bzip) + Dokument PostScript (stisnjen z bzip) + Dokument PostScript (i kompresuar me bzip) + Postscript-dokument (bzip-komprimerat) + документ PostScript (стиснене bzip) + Tài liệu PostScript (đã nén bzip) + PostScript 文档(bzip 压缩) + PostScript 文件 (bzip 格式壓縮) + + + + + comic book archive + أرشيف comic book + archiŭ komiksaŭ + Архив — комикси + arxiu comic book + Archiv knihy komiksů + comic book-arkiv + Comic-Book-Archiv + archivador de libro de cómic + komiki artxiboa + sarjakuva-arkisto + teknisøgubóka skjalasavn + archive Comic Book + cartlann chartúin + ficheiro de libro de banda deseñada + ארכיון ספר קומי + képregényarchívum + arsip buku komik + Archivio comic book + コミックブックアーカイブ + комикстар архиві + 코믹북 묶음 파일 + komiksų knygos archyvas + komiksu grāmatas arhīvs + Tegneseriearkiv + stripboek-archief + teikneseriearkiv + Archiwum komiksu + Pacote de livro de revista em quadrinhos + arhivă benzi desenate + архив комиксов + Archív knihy komiksov + Datoteka arhiva stripov + Arkiv comic book + serietidningsarkiv + архів коміксів + Kho nén sách tranh chuyện vui + Comic Book 归档文件 + 漫畫書封存檔 + + + + + + comic book archive + أرشيف comic book + archiŭ komiksaŭ + Архив — комикси + arxiu comic book + Archiv knihy komiksů + comic book-arkiv + Comic-Book-Archiv + archivador de libro de cómic + komiki artxiboa + sarjakuva-arkisto + teknisøgubóka skjalasavn + archive Comic Book + cartlann chartúin + ficheiro de libro de banda deseñada + ארכיון ספר קומי + képregényarchívum + arsip buku komik + Archivio comic book + コミックブックアーカイブ + комикстар архиві + 코믹북 묶음 파일 + komiksų knygos archyvas + komiksu grāmatas arhīvs + Tegneseriearkiv + stripboek-archief + teikneseriearkiv + Archiwum komiksu + Pacote de livro de revista em quadrinhos + arhivă benzi desenate + архив комиксов + Archív knihy komiksov + Datoteka arhiva stripov + Arkiv comic book + serietidningsarkiv + архів коміксів + Kho nén sách tranh chuyện vui + Comic Book 归档文件 + 漫畫書封存檔 + + + + + + comic book archive + أرشيف comic book + archiŭ komiksaŭ + Архив — комикси + arxiu comic book + Archiv knihy komiksů + comic book-arkiv + Comic-Book-Archiv + archivador de libro de cómic + komiki artxiboa + sarjakuva-arkisto + teknisøgubóka skjalasavn + archive Comic Book + cartlann chartúin + ficheiro de libro de banda deseñada + ארכיון ספר קומי + képregényarchívum + arsip buku komik + Archivio comic book + コミックブックアーカイブ + комикстар архиві + 코믹북 묶음 파일 + komiksų knygos archyvas + komiksu grāmatas arhīvs + Tegneseriearkiv + stripboek-archief + teikneseriearkiv + Archiwum komiksu + Pacote de livro de revista em quadrinhos + arhivă benzi desenate + архив комиксов + Archív knihy komiksov + Datoteka arhiva stripov + Arkiv comic book + serietidningsarkiv + архів коміксів + Kho nén sách tranh chuyện vui + Comic Book 归档文件 + 漫畫書封存檔 + + + + + + comic book archive + أرشيف comic book + archiŭ komiksaŭ + Архив — комикси + arxiu comic book + Archiv knihy komiksů + comic book-arkiv + Comic-Book-Archiv + archivador de libro de cómic + komiki artxiboa + sarjakuva-arkisto + teknisøgubóka skjalasavn + archive Comic Book + cartlann chartúin + ficheiro de libro de banda deseñada + ארכיון ספר קומי + képregényarchívum + arsip buku komik + Archivio comic book + コミックブックアーカイブ + комикстар архиві + 코믹북 묶음 파일 + komiksų knygos archyvas + komiksu grāmatas arhīvs + Tegneseriearkiv + stripboek-archief + teikneseriearkiv + Archiwum komiksu + Pacote de livro de revista em quadrinhos + arhivă benzi desenate + архив комиксов + Archív knihy komiksov + Datoteka arhiva stripov + Arkiv comic book + serietidningsarkiv + архів коміксів + Kho nén sách tranh chuyện vui + Comic Book 归档文件 + 漫畫書封存檔 + + + + + + Lrzip archive + أرشيف Lrzip + Архив — lrzip + arxiu lrzip + Archiv Lrzip + Lrzip-arkiv + Lrzip-Archiv + Lrzip-arkivo + archivador Lrzip + Lrzip-arkisto + Lrzip skjalasavn + archive lrzip + cartlann Lrzip + arquivo Lrzip + ארכיון Lrzip + Lrzip archívum + Arsip Lrzip + Archivio Lrzip + Lrzip アーカイブ + Lrzip архиві + LRZIP 압축 파일 + Lrzip archyvas + Lrzip arhīvs + Archiwum lrzip + Arhivă Lrzip + архив LRZIP + Archív Lrzip + Datoteka arhiva Lrzip + Lrzip-arkiv + архів lrzip + Lrzip 归档文件 + Lrzip 封存檔 + + + + + + + + Tar archive (lrzip-compressed) + أرشيف Tar (مضغوط-lrzip) + Архив — tar, компресиран с lrzip + arxiu tar (comprimit amb lrzip) + Archiv tar (komprimovaný pomocí lrzip) + Tar-arkiv (lrzip-komprimeret) + Tar-Archiv (lrzip-komprimiert) + archivador Tar (comprimido con lrzip) + Tar-arkisto (lrzip-pakattu) + Tar skjalasavn (lrzip-stappað) + archive tar (compressée lrzip) + cartlann Tar (comhbhrúite le lrzip) + arquivo Tar (comprimido con lrzip) + ארכיון Tar (מכווץ ע"י lrzip) + Tar archívum (lrzip-pel tömörítve) + Arsip Tar (terkompresi lrzip) + Archivio tar (compresso con lrzip) + Tar アーカイブ (lrzip 圧縮) + Tar архиві (lrzip-пен сығылған) + TAR 묶음 파일 (LRZIP 압축) + Tar archyvas (suglaudintas su lrzip) + Tar arhīvs (saspiests ar lrzip) + Archiwum tar (kompresja lrzip) + Arhivă Tar (comprimată lrzip) + архив TAR (сжатый LRZIP) + Archív tar (komprimovaný pomocou lrzip) + Datoteka arhiva Tar (stisnjen z lrzip) + Tar-arkiv (lrzip-komprimerat) + архів tar (стиснений lrzip) + Tar 归档文件 (lrzip 压缩) + Tar 封存檔 (lrzip 格式壓縮) + + + + + + + Apple disk image + Диск — Apple + imatge de disc d'Apple + Obraz disku Apple + Apple-diskaftryk + Apple-Datenträgerabbild + imagen de disco de Apple + Apple-levytiedosto + image disque Apple + imaxe de disco de Appl + תמונת כונן Apple + Apple lemezkép + Image disk Apple + Immagine disco Apple + Apple ディスクイメージ + Apple диск бейнесі + 애플 디스크 이미지 + Apple diska attēls + Obraz dysku Apple + образ диска Apple Mac OS X + Obraz disku Apple + Odtis diska Apple + Apple-skivavbild + образ диска Apple + Apple 磁盘镜像 + Apple 磁碟映像 + + + + raw CD image + صورة CD خامة + suvoraja vyjava CD + Изображение — raw CD + imatge de CD en cru + Surový obraz CD + rå cd-aftryk + CD-Roh-Abbild + εικόνα περιεχομένου ψηφιακού δίσκου + raw CD image + kruda lumdiskbildo + imagen de CD en bruto + CD gordinaren irudia + raaka CD-vedos + rá CD mynd + image CD brute + amhíomhá dhlúthdhiosca + imaxe de CD en bruto + תמונת דיסק גולמית + nyers CD-lemezkép + citra CD mentah + Immagine raw CD + 生 CD イメージ + өңделмеген CD бейнесі + CD 이미지 + raw CD atvaizdis + CD jēlattēls + Imej CD mentah + rått CD-bilde + ruw CD-beeldbestand + rått CD-bilete + Surowy obraz CD + imagem em bruto de CD + imagem bruta de CD + imagine de CD brută + образ компакт-диска + Surový obraz CD + surovi CD odtis + Imazh raw CD + сирови отисак ЦД-а + rå cd-avbild + образ raw CD + ảnh đĩa CD thô + 原始 CD 映像 + 原生 CD 映像 + + + + + + CD Table Of Contents + جدول محتويات الـ CD + Źmieściva CD + Съдържание на CD + taula de continguts de CD + Obsah CD + Cd-indholdsfotegnelse + CD-Inhaltsverzeichnis + Índice de contenidos de CD + CDaren edukien aurkibidea + CD-sisällysluettelo + CD innihaldsyvurlit + table des matières de CD + clár ábhar dlúthdhiosca + táboa de contidos de CD + תוכן עניינים של דיסק + CD tartalomjegyzék + Tabel Isi CD + Indice CD + CD Table Of Contents + CD құрама кестесі + CD 내용 목록 + CD turinys + CD satura rādītājs + Innholdsfortegnelse for CD + CD-inhoudsopgave + CD innhaldsliste + Plik zawartości płyty CD + Sumário de CD + Tabel conținut CD + таблица содержания CD + Obsah CD + Kazalo vsebine CD nosilca + Tregues CD + Cd-innehållsförteckning + зміст CD + Mục Lục của đĩa CD + CD 索引 + CD 內容目錄 + + + + + + + + + + + + + + + PGN chess game notation + تدوينة لعبة الشطرنج PGN + Zaciem ab šachmatnaj partyi PGN + Игра шах — PGN + notació de joc d'escacs PGN + Šachová notace PGN + PGN-skakspilsnotation + PGN-Schachspielnotation + notación para juegos de ajedrez PGN + PGN xake jokoaren notazioa + PGN-šakkipelinotaatio + PGN talv teknskipan + notation de jeu d'échecs PGN + nodaireacht chluiche ficheall PGN + Notación de xogo de xadrez PGN + סימון משחק שח PGN + PGN sakkfeljegyzés + Notasi permainan catur PGN + Notazione partita a scacchi PGN + PGN チェスゲーム記録 + PGN шахмат ойыны + PGN 체스게임 기보 + PGN šachmatų žaidimo žymėjimas + PGN šaha spēles notācija + PGN sjakkspillnotasjon + PGN-schaakspelnotatie + PGN-sjakkspelnotasjon + Plik PGN notacji gry w szachy + Notação de jogo de xadrez PGN + Notație joc șah PGN + шахматная партия PGN + Šachová notácia PGN + Datoteka opomb šahovske igre PGN + Njoftim loje shahu PGN + PGN-schackpartinotation + запис гри у шахи PGN + Cách ghi lượt chơi cờ PGN + PGN 象棋游戏注记 + PGN 國際象棋棋譜 + + + + + + + + + CHM document + مستند CHM + Dakument CHM + Документ — CHM + document CHM + Dokument CHM + CHM-dokument + CHM-Dokument + CHM-dokumento + documento CHM + CHM dokumentua + CHM-asiakirja + CHM skjal + document CHM + cáipéis CHM + documento CHM + מסמך CHM + CHM dokumentum + Dokumen CHM + Documento CHM + CHM ドキュメント + CHM құжаты + CHM 문서 + CHM dokumentas + CHM dokuments + CHM-dokument + CHM-document + CHM-dokument + Dokument CHM + Documento CHM + Document CHM + документ CHM + Dokument CHM + Dokument CHM + Dokument CHM + CHM-dokument + документ CHM + Tài liệu CHM + CHM 文档 + CHM 文件 + CHM + Compiled Help Modules + + + + + + Java byte code + رمز بايت الـJava + Java bayt kodu + Bajtavy kod Java + Байт код за Java + codi byte de Java + Bajtový kód Java + Côd beit Java + Javabytekode + Java-Bytecode + συμβολοκώδικας Java + Java byte code + Java-bajtkodo + bytecode Java + Java byte-kodea + Java-tavukoodi + Java býtkota + code Java binaire + beartchód Java + byte code de Java + קוד Java byte + Java-bájtkód + Kode bita Java + Bytecode Java + Java バイトコード + Java байт коды + 자바 바이트코드 + Java baitinis kodas + Java bitu kods + Kod bait Java + Java-bytekode + Java-bytecode + Jave byte-kode + Kod bajtowy Java + 'byte-code' Java + Código compilado Java + Bytecode Java + байт-код Java + Bajtový kód Java + Datoteka bitne kode Java + Byte code Java + Јава бајтни ко̂д + Java-bytekod + Байт-код Java + Mã byte Java + Java 字节码 + Java 位元碼 + + + UNIX-compressed file + ملف يونكس-مضغوط + Skampresavany UNIX-fajł + Файл — компресиран за UNIX + fitxer comprimit UNIX + Soubor komprimovaný v Unixu + UNIX-komprimeret fil + UNIX-komprimierte Datei + αρχείο συμπιεσμένο με compress + UNIX-compressed file + UNIX-kunpremita dosiero + archivo comprimido de Unix + UNIX-en konprimitutako fitxategia + UNIX-pakattu tiedosto + UNIX-stappað fíla + fichier compressé UNIX + comhad UNIX-comhbhrúite + ficheiro comprimido de UNIX + קובץ מכווץ של UNIX + Tömörített UNIX-fájl + Berkas terkompresi UNIX + File compresso-UNIX + UNIX-compress ファイル + файл (UNIX-сығылған) + 유닉스 압축 파일 + UNIX suglaudintas failas + UNIX saspiests fails + Fail termampat-UNIX + UNIX-komprimert fil + UNIX-ingepakt bestand + UNIX-komprimert fil + Skompresowany plik systemu UNIX + ficheiro comprimido UNIX + Arquivo compactado do UNIX + Fișier comprimat UNIX + файл (UNIX-сжатый) + Súbor komprimovaný v Unixe + Skrčena Unix datoteka + File i kompresuar UNIX + UNIX-компресована датотека + UNIX-komprimerad fil + стиснений файл UNIX + Tập tin đã nén UNIX + UNIX 压缩文件 + UNIX 格式壓縮檔 + + + + + + + + Tar archive (gzip-compressed) + أرشيف Tar (مضغوط-gzip) + Archiŭ tar (gzip-skampresavany) + Архив — tar, компресиран с gzip + arxiu tar (comprimit amb gzip) + Archiv tar (komprimovaný pomocí gzip) + Tar-arkiv (gzip-komprimeret) + Tar-Archiv (gzip-komprimiert) + archivador Tar (comprimido con gzip) + Tar artxiboa (gzip-ekin konprimitua) + Tar-arkisto (gzip-pakattu) + Tar skjalasavn (gzip-stappað) + archive tar (compressée gzip) + cartlann Tar (comhbhrúite le gzip) + arquivo Tar (comprimido con gzip) + ארכיון Tar (מכווץ ע"י gzip) + Tar archívum (gzip-pel tömörítve) + Arsip Tar (terkompresi gzip) + Archivio tar (compresso con gzip) + Tar アーカイブ (gzip 圧縮) + Tar архиві (gzip-пен сығылған) + TAR 묶음 파일 (GZIP 압축) + Tar archyvas (suglaudintas su gzip) + Tar arhīvs (saspiests ar gzip) + Tar-arkiv (gzip-komprimert) + Tar-archief (ingepakt met gzip) + Tar-arkiv (pakka med gzip) + Archiwum tar (kompresja gzip) + Pacote tar (compactado com gzip) + Arhivă Tar (comprimată gzip) + архив TAR (сжатый GZIP) + Archív tar (komprimovaný pomocou gzip) + Datoteka arhiva Tar (stisnjen z gzip) + Arkiv tar (i kompresuar me gzip) + Tar-arkiv (gzip-komprimerat) + архів tar (стиснений gzip) + Kho nén tar (đã nén gzip) + Tar 归档文件(gzip 压缩) + Tar 封存檔 (gzip 格式壓縮) + + + + + + + program crash data + معلومات انهيار البرنامج + źviestki złamanaj prahramy + Данни от забиване на програма + dades de fallada de programa + Data o pádu programu + programnedbrudsdata + Daten zu Programmabsturz + δεδομένα από την κατάρρευση προγράμματος + program crash data + datumo pri kraŝo de programo + datos de cuelgue de programa + programaren kraskaduraren datuak + ohjelman kaatumistiedot + forrits sordáta + données de plantage de programme + sonraí thuairt ríomhchláir + datos de colgue do programa + מידע מקריסת תוכנה + összeomlott program adatai + data program macet + Dati crash di applicazione + プログラムクラッシュデータ + апатты аяқтаудың мәліметтері + 프로그램 비정상 종료 데이터 + programos nulūžimo duomenys + programmas avārijas dati + Data program musnah + krasjdata fra program + programma-crashgegevens + data om programkrasj + Dane awarii programu + dados de estoiro de aplicação + dados de travamento de programa + date eroare program + данные аварийного завершения + Údaje o páde programu + podatki sesutja programa + Të dhëna nga programi i bllokuar + подаци о кркљавини програма + programkraschdata + аварійні дані про програму + dữ liệu sụp đổ chương trình + 程序崩溃数据 + 程式當掉資料 + + + + + + + + + + + + + + + + + + + CPIO archive + أرشيف CPIO + CPIO arxivi + Archiŭ CPIO + Архив — CPIO + arxiu CPIO + Archiv CPIO + Archif CPIO + CPIO-arkiv + CPIO-Archiv + αρχείο CPIO + CPIO archive + CPIO-arkivo + archivador CPIO + CPIO artxiboa + CPIO-arkisto + CPIO skjalasavn + archive CPIO + cartlann CPIO + arquivo CPIO + ארכיון CPIO + CPIO-archívum + Arsip CPIO + Archivio CPIO + CPIO アーカイブ + CPIO архиві + CPIO 묶음 파일 + CPIO archyvas + CPIO arhīvs + Arkib CPIO + CPIO-arkiv + CPIO-archief + CPIO-arkiv + Archiwum CPIO + arquivo CPIO + Pacote CPIO + Arhivă CPIO + архив CPIO + Archív CPIO + Datoteka arhiva CPIO + Arkiv CPIO + CPIO архива + CPIO-arkiv + архів CPIO + Kho nén CPIO + CPIO 归档文件 + CPIO 封存檔 + + + + + + + + + + + CPIO archive (gzip-compressed) + أرشيف CPIO (مضغوط-gzip) + CPIO arxivi (gzip ilə sıxışdırılmış) + Archiŭ CPIO (gzip-skampresavany) + Архив — CPIO, компресиран с gzip + arxiu CPIO (comprimit amb gzip) + Archiv CPIO (komprimovaný pomocí gzip) + Archif CPIO (gywasgwyd drwy gzip) + CPIO-arkiv (gzip-komprimeret) + CPIO-Archiv (gzip-komprimiert) + αρχείο CPIO (συμπιεσμένο με gzip) + CPIO archive (gzip-compressed) + CPIO-arkivo (kunpremita per gzip) + archivador CPIO (comprimido con gzip) + CPIO artxiboa (gzip-ekin konprimitua) + CPIO-arkisto (gzip-pakattu) + CPIO skjalasavn (gzip-stappað) + archive CPIO (compressé gzip) + cartlann CPIO (comhbhrúite le gzip) + arquivo CPIO (comprimido con gzip) + ארכיון CPIO (מכווץ ע"י gzip) + CPIO-archívum (gzip-pel tömörítve) + Arsip CPIO (terkompresi gzip) + Archivio CPIO (compresso con gzip) + CPIO (gzip 圧縮) アーカイブ + CPIO архиві (gzip-пен сығылған) + CPIO 묶음 파일 (GZIP 압축) + CPIO archyvas (suglaudintas su gzip) + CPIO arhīvs (saspiests ar gzip) + Arkib CPIO (dimampatkan-gzip) + CPIO-arkiv (gzip-komprimert) + CPIO-archief (ingepakt met gzip) + CPIO-arkiv (gzip-pakka) + Archiwum CPIO (kompresja gzip) + arquivo CPIO (comprimido com gzip) + Pacote CPIO (compactado com gzip) + Arhivă CPIO (compresie gzip) + архив CPIO (сжатый GZIP) + Archív CPIO (komprimovaný pomocou gzip) + Datoteka arhiva CPIO (skrčena z gzip) + Arkiv CPIO (kompresuar me gzip) + CPIO архива (компресована gzip-ом) + CPIO-arkiv (gzip-komprimerat) + архів CPIO (стиснений gzip) + Kho nén CPIO (đã nén gzip) + CPIO 归档文件(gzip 压缩) + CPIO 封存檔 (gzip 格式壓縮) + + + + + C shell script + سكربت شِل سي + C qabıq skripti + Skrypt abałonki C + Скрипт — обвивка C + script en C + Skript shellu C + Sgript plisgyn C + C-skalprogram + C-Shell-Skript + πρόγραμμα εντολών φλοιού C + C shell script + skripto de C-ŝelo + script en C shell + C shell script-a + Csh-komentotiedosto + C skel boðrøð + script C shell + script bhlaosc C + script de C shell + תסריט מעטפת C + C héj-parancsfájl + Skrip shell C + Script C shell + C シェルスクリプト + C shell сценарийі + C쉘 스크립트 + C shell scenarijus + C čaulas skripts + Skrip shell C + C-skallskript + C-shellscript + C-skalskript + Skrypt powłoki C + 'script' de consola C + Script de shell C + Script C shell + сценарий C shell + Skript shellu C + Skriptna datoteka lupine C + Script shell C + C скрипта окружења + Skalskript (csh) + скрипт оболонки C + Văn lệnh trình bao C + C shell 脚本 + C shell 指令稿 + + + + + + + + + + + + + Xbase document + مستند Xbase + Dakument Xbase + Документ — Xbase + document Xbase + Dokument Xbase + Xbasedokument + Xbase-Dokument + Xbase document + Xbase-dokumento + documento Xbase + Xbase dokumentua + Xbase-asiakirja + Xbase skjal + document Xbase + cáipéis Xbase + documento Xbase + מסמך Xbase + Xbase dokumentum + Dokumen Xbase + Documento Xbase + Xbase ドキュメント + Xbase құжаты + Xbase 문서 + Xbase dokumentas + Xbase dokuments + Xbase-dokument + Xbase-document + Xbase-dokument + Dokument Xbase + Documento do Xbase + Document Xbase + документ Xbase + Dokument Xbase + Dokument Xbase + Dokument Xbase + Xbase-dokument + документ Xbase + Tài liệu Xbase + Xbase 文档 + Xbase 文件 + + + + + + + + ECMAScript program + برنامج ECMAScript + Prahrama ECMAScript + Програма — ECMAScript + programa ECMAScript + Program ECMAScript + ECMA-program + ECMAScript-Programm + programa en ECMAScript + ECMAScript programa + ECMAScript-ohjelma + ECMAScript forrit + programme ECMAScript + ríomhchlár ECMAScript + programa en ECMAScript + תכנית EMCAScript + ECMAScript program + Program ECMAScript + Programma ECMAScript + ECMAScript プログラム + ECMAScript программасы + ECMA스크립트 프로그램 + ECMAScript programa + ECMAScript programma + ECMAScript-program + ECMAScript-programma + ECMAScript-program + Pogram ECMAScript + Programa ECMAScript + Program ECMAScript + программа ECMAScript + Program ECMAScript + Programska datoteka ECMAScript + Program ECMAScript + ECMAScript-program + програма мовою ECMAScript + Chương trình ECMAScript + ECMAScript 程序 + ECMAScript 程式 + + + + + + + Dreamcast ROM + Dreamcast ROM + Dreamcast ROM + ROM — Dreamcast + ROM de Dreamcast + ROM pro Dreamcast + Dreamcast-rom + Dreamcast-ROM + εικόνα μνήμης ROM Dreamcast + Dreamcast ROM + Dreamcast-NLM + ROM de Dreamcast + Dreamcast-en ROM + Dreamcast-ROM + Dreamcast ROM + ROM Dreamcast + ROM Dreamcast + ROM de Dreamcast + ROM של Dreamcast + Dreamcast ROM + Memori baca-saja Dreamcast + ROM Dreamcast + Dreamcast ROM + Dreamcast ROM + 드림캐스트 롬 + Dreamcast ROM + Dreamcast ROM + ROM Dreamcast + Dreamcast-ROM + Dreamcast-ROM + Dreamcast-ROM + Plik ROM konsoli Dreamcast + ROM Dreamcast + ROM do Dreamcast + ROM Dreamcast + Dreamcast ROM + ROM pre Dreamcast + Bralni pomnilnik Dreamcast + ROM Dreamcast + Dreamcast ROM + Dreamcast-rom + ППП Dreamcast + ROM Dreamcast + Dreamcast ROM + Dreamcast ROM + + + + + Nintendo DS ROM + Nintendo DS ROM + Nintendo DS ROM + ROM — Nintendo DS + ROM de Nintendo DS + ROM pro Nintendo DS + Nintendo DS-rom + Nintendo-DS-ROM + ROM de Nintendo DS + Nintendo DS-ko ROMa + Nintendo DS-ROM + Nintendo DS ROM + ROM Nintendo DS + ROM Nintendo DS + ROM de Nintendo DS + ROM של Nintendo + Nintendo DS ROM + Memori baca-saja Nintendo DS + ROM Nintendo DS + Nintendo DS ROM + Nintendo DS ROM + 닌텐도 DS 롬 + Nintendo DS ROM + Nintendo DS ROM + Nintendo DS-ROM + Nintendo-DS-ROM + Nintendo DS-ROM + Plik ROM konsoli Nintendo DS + ROM do Nintendo DS + ROM Nintendo DS + Nintendo DS ROM + ROM pre Nintendo DS + Bralni pomnilnik Nintendo DS + ROM Nintendo DS + Nintendo DS-rom + ППП Nintendo + ROM DS Nintendo + Nintendo DS ROM + 任天堂 DS ROM + + + + + Debian package + حزمة ديبيان + Debian paketi + Pakunak Debian + Пакет — Debian + paquet Debian + Balíček Debianu + Pecyn Debian + Debianpakke + Debian-Paket + πακέτο Debian + Debian package + Debian-pakaĵo + paquete Debian + Debian paketea + Debian-paketti + Debian pakki + paquet Debian + pacáiste Debian + paquete de Debian + חבילת דביאן + Debian-csomag + Paket Debian + Pacchetto Debian + Debian パッケージ + Debian дестесі + 데비안 패키지 + Debian paketas + Debian pakotne + Pakej Debian + Debian pakke + Debian-pakket + Debian pakke + Pakiet Debiana + pacote Debian + Pacote Debian + Pachet Debian + пакет Debian + Balíček Debianu + Datoteka paketa Debian + Paketë Debian + Debian пакет + Debianpaket + пакунок Debian + Gói Debian + Debian 软件包 + Debian 套件 + + + + + + + + + + + Qt Designer file + ملف Qt Designer + Fajł Qt Designer + Файл — Qt Designer + fitxer de Qt Designer + Soubor Qt Designer + Qt Designer-fil + Qt-Designer-Datei + αρχείο Qt Designer + Qt Designer file + dosiero de Qt Designer + archivo de Qt Designer + Qt Designer Fitxategia + Qt Designer -tiedosto + Qt Designer fíla + fichier Qt Designer + comhad Qt Designer + ficheiro de Qt Designer + קובץ של Qt Designer + Qt Designer-fájl + Berkas Qt Designer + File Qt Designer + Qt Designer ファイル + Qt Designer файлы + Qt 디자이너 파일 + Qt Designer failas + Qt Designer fails + Fail Qt Designer + Qt Designer-fil + Qt Designer-bestand + Qt Designer-fil + Plik Qt Designer + ficheiro do Qt Designer + Arquivo do Qt Designer + Fișier Qt Designer + файл Qt Designer + Súbor Qt Designer + Datoteka Qt Designer + File Qt Designer + Qt Designer датотека + Qt Designer-fil + файл програми Qt-дизайнер + Tập tin thiết kế Qt Designer + Qt Designer 文件 + Qt Designer 檔案 + + + + + + + + + + Qt Markup Language file + Файл — Qt Markup + fitxer de llenguatge de marcadors Qt + Soubor Qt Markup Language + Qt-Auszeichnungssprachendatei + Archivo de lenguaje de marcado Qt + fichier Qt Markup Language + ficheiro de linguaxe de marcado Qt + קובץ שפת סימון של Qt + Qt jelölőnyelvű fájl + Berkas Bahasa Markup Qt + File Qt Markup Language + Qt マークアップ言語ファイル + Qt Markup Language файлы + Qt 마크업 언어 파일 + Qt marķēšanas valodas fails + Plik języka znaczników Qt + файл Qt Markup Language + Datoteka označevalnega jezika Qt + файл мови розмітки Qt + Qt + Qt 標記語言檔 + + + + + + + desktop configuration file + ملف تضبيط سطح المكتب + kanfihuracyjny fajł asiarodździa + Файл с информация за работния плот + fitxer de configuració d'escriptori + Soubor nastavení pracovní plochy + skrivebordskonfigurationsfil + Desktop-Konfigurationsdatei + ρυθμίσεις επιφάνεια εργασίας + desktop configuration file + dosiero de agordoj de labortablo + archivo de configuración del escritorio + Mahaigainaren konfigurazio-fitxategia + työpöydän asetustiedosto + skriviborðssamansetingarfíla + fichier de configuration desktop + comhad chumraíocht deisce + ficheiro de configuración de escritorio + קובץ הגדרות של שולחן העבודה + asztalbeállító fájl + berkas konfigurasi destop + File configurazione desktop + デスクトップ設定ファイル + жұмыс үстел баптаулар файлы + 데스크톱 설정 파일 + darbastalio konfigūracijos failas + darbvirsmas konfigurācijas fails + Fail konfigurasi desktop + konfigurasjonsfil for skrivebordet + bureaublad-configuratiebestand + skrivebordsoppsettfil + Plik konfiguracji środowiska + ficheiro de configuração de área de trabalho + arquivo de configuração de área de trabalho + fișier de configurare al desktopului + файл настроек рабочего стола + Súbor nastavení pracovnej plochy + nastavitvena datoteka namizja + File konfigurimi desktop + датотека за подешавања радне површи + skrivbordskonfigurationsfil + файл конфігурації стільниці + tập tin cấu hình môi trường + 桌面配置文件 + 桌面組態檔 + + + + + + + + + + + + + + + FictionBook document + مستند FictionBook + Документ — FictionBook + document FictionBook + Dokument FictionBook + FictionBook-dokument + FictionBook-Dokument + FictionBook-dokumento + documento FictionBook + FictionBook dokumentua + FictionBook-asiakirja + FictionBook skjal + document FictionBook + cáipéis FictionBook + documento de FictionBook + מסמך FictionBook + FictionBook-dokumentum + Dokumen FictionBook + Documento FictionBook + FictionBook ドキュメント + FictionBook құжаты + FictionBook 문서 + FictionBook dokumentas + FictionBook dokuments + FictionBook-document + Dokument FictionBook + Documento FictionBook + Document FictionBook + документ FictionBook + Dokument FictionBook + Dokument FictionBook + FictionBook-dokument + документ FictionBook + Tài liệu FictionBook + FictionBook 文档 + FictionBook 文件 + + + + + + + + + + Dia diagram + خطاطة Dia + Dia diaqramı + Dyjahrama Dia + Диаграма — Dia + diagrama de Dia + Diagram Dia + Diagram Dia + Dia-diagram + Dia-Diagramm + διάγραμμα Dia + Dia diagram + Dia-diagramo + diagrama de Dia + Dia diagrama + Dia-kaavio + Dia ritmynd + diagramme Dia + léaráid Dia + diagrama de Dia + גרף של Dia + Dia-diagram + Diagram Dia + Diagramma Dia + Dia ダイアグラム + Dia диаграммасы + Dia 도표 + Dia diagrama + Dia diagramma + Diagram Dia + Dia-diagram + Dia-diagram + Dia diagram + Diagram Dia + diagrama Dia + Diagrama do Dia + Diagramă Dia + диаграмма Dia + Diagram Dia + Datoteka diagrama Dia + Diagramë Dia + Диа дијаграм + Dia-diagram + діаграма Dia + Biểu đồ Dia + Dia 图表 + Dia 圖表 + + + + + + + + + + Dia shape + شكل Dia + Фигура — Dia + forma del Dia + Tvary Dia + Dia-figur + Dia-Form + forma de Dia + Dia-ren forma + Dia skapur + forme Dia + cruth Dia + forma de Dia + צורה של Dia + Dia alakzat + Shape Dia + Sagoma Dia + Dia 図形 + Dia сызбасы + Dia 그림 + Dia forma + Dia forma + Kształt Dia + Figură Dia + фигура Dia + Datoteka oblik Dia + Dia-figur + форма Dia + Dia 形状 + Dia 形狀 + + + + + + + + + + TeX DVI document + مستند TeX DVI + Dakument TeX DVI + Документ — TeX DVI + document TeX DVI + Dokument TeX DVI + TeX DVI-dokument + TeX-DVI-Dokument + έγγραφο TeX DVI + TeX DVI document + DVI-dokumento de TeX + documento TeX DVI + TeX DVI dokumentua + TeX DVI -asiakirja + TeX DVI skjal + document TeX DVI + cáipéis DVI TeX + documento TeX DVI + מסמך מסוג TeX DVI + TeX DVI-dokumentum + Dokumen TeX DVI + Documento TeX DVI + TeX DVI ドキュメント + TeX DVI құжаты + TeX DVI 문서 + TeX DVI dokumentas + TeX DVI dokuments + Dokumen TeX DVI + TeX DVI-dokument + TeX DVI-document + TeX DVI-dokument + Dokument TeX DVI + documento TeX DVI + Documento TeX DVI + Document Tex DVI + документ TeX DVI + Dokument TeX DVI + Dokument TeX DVI + Dokument TeX DVI + ТеХ ДВИ документ + TeX DVI-dokument + документ TeX DVI + Tài liệu DVI Tex + TeX DVI 文档 + TeX DVI 文件 + DVI + Device independent file format + + + + + + + + Enlightenment theme + سمة Enlightenment + Enlightenment örtüyü + Matyŭ Enlightenment + Тема — Enlightenment + tema d'Enlightenment + Motiv Enlightenment + Thema Enlightenment + Enlightenmenttema + Enlightenment-Thema + Θέμα Enlightenment + Enlightenment theme + etoso de Enlightenment + tema de Enlightenment + Enlightenment gaia + Enlightenment-teema + Enlightenment tema + thème Enlightenment + téama Enlightenment + tema de Enlightenment + ערכת נושא של Enlightenment + Enlightenment-téma + Tema Enlightenment + Tema Enlightenment + Enlightenment テーマ + Enlightenment темасы + 인라이트먼트 테마 + Enlightenment tema + Enlightenment tēma + Tema Enlightenment + Enlightenment tema + Enlightenment-thema + Enlightenment-tema + Motyw Enlightenment + tema Enlightenment + Tema do Enlightenment + Temă Enlightenment + тема Enlightenment + Motív Enlightenment + Datoteka teme Enlightenment + Tema Enlightenment + Enlightenment тема + Enlightenment-tema + тема Enlightenment + Sắc thái Enlightenment + Enlightenment 主题 + Enlightenment 佈景主題 + + + + Egon Animator animation + تحريكة محرك Egon + Animacyja Egon Animator + Анимация — Egon Animator + animació d'Egon Animator + Animace Egon Animator + Egon Animator-animation + Egon-Animator-Animation + κινούμενα σχέδια Egon Animator + Egon Animator animation + animacio de Egon Animator + animación de Egon Animator + Egon Animator-eko animazioa + Egon Animator -animaatio + Egon Animator teknimyndagerð + animation Egon Animator + beochan Egon Animator + animación de Egon Animator + אנימצייה של Egon Animator + Egon Animator-animáció + Animasi Egon Animator + Animazione Egon Animator + Egon Animator アニメーション + Egon Animator анимациясы + Egon 애니메이터 + Egon Animator animacija + Egon Animator animācija + Animasi Egon Animator + Egon animator-animasjon + Egon Animator-animatie + Egon Animator-animasjon + Animacja Egon Animator + animação Egon Animator + Animação do Egon Animator + Animație Egon Animator + анимация Egon Animator + Animácia Egon Animator + Datoteka animacije Egon Animator + Animim Egon Animator + Егон аниматор анимација + Egon Animator-animering + анімація Egon Animator + Hoạt ảnh Egon Animator + Egon Animator 动画 + Egon Animator 動畫 + + + + + executable + تنفيذي + vykonvalny fajł + Изпълним файл + executable + Spustitelný soubor + kørbar + Programm + εκτελέσιμο + executable + plenumebla + ejecutable + exekutagarria + suoritettava ohjelma + inningarfør + exécutable + comhad inrite + executábel + קובץ הרצה + futtatható + dapat dieksekusi + Eseguibile + 実行ファイル + орындалатын + 실행파일 + vykdomasis failas + izpildāmais + Bolehlaksana + kjørbar + uitvoerbaar bestand + køyrbar + Program + executável + executável + executabil + исполняемый + Spustiteľný súbor + izvedljiva datoteka + I ekzekutueshëm + извршна + körbar fil + виконуваний файл + thực hiện được + 可执行文件 + 可執行檔 + + + + + + + + + + + + + + + + + + + + + FLTK Fluid file + ملف FLTK Fluid + Fajł FLTK Fluid + Интерфейс — FLTK Fluid + fitxer Fluid FLTK + Soubor FLTK Fluid + FLTK Fluid-fil + FLTK-Fluid-Datei + archivo FLTK Fluid + FLTK Fluid fitxategia + FLTK Fluid -tiedosto + FLTK Fluid fíla + fichier Fluid FLTK + comhad FLTK Fluid + ficheiro FLTK Fluid + קובץ FLTK Fluid + FLTK Fluid fájl + Berkas FLTK Fluid + File FLTK Fluid + FLTK Fluid ファイル + FLTK Fluid файлы + FLTK 파일 + FLTK Fluid failas + FLTK Fluid fails + FLTK Fluid-fil + FLTK FLUID-bestand + FLTK Fluid-fil + Plik Fluid FLTK + Arquivo Fluid do FLTK + Fișier FLTK Fluid + файл FLTK Fluid + Súbor FLTK Fluid + Datoteka FLTK Fluid + File FLTK Fluid + FLTK Fluid-fil + файл FLTK Fluid + Tập tin Fluid FLTK + FLTK 流体文档 + FLTK Fluid 檔 + + + + + + + + + Postscript type-1 font + خط Postscript type-1 + Šryft Postscript type-1 + Шрифт — Postscript Type 1 + tipus de lletra Postscript type-1 + Písmo Postscript type-1 + PostScript type-1-skrifttype + Postscript-Typ-1-Schrift + tipografía PostScript tipo-1 + PostScript type-1 letra-tipoa + PostScript tyyppi-1 -asiakirja + Postscript type-1 stavasnið + police Postscript Type 1 + cló Postscript type-1 + tipo de letra PostScript tipo-1 + גופן של Postscript type-1 + Postscript type-1 betűkészlet + Fonta tipe-1 Postscript + Tipo carattere Postscript type-1 + PostScript type-1 フォント + Postscript type-1 қарібі + 포스트스크립트 Type-1 글꼴 + Postscript type-1 šriftas + Postscript 1-tipa fonts + Postscript type-1 skrift + PostScript type-1-lettertype + PostScript type 1-skrifttype + Czcionka PostScript Type-1 + Fonte PostScript tipo-1 + Font Postscript type-1 + шрифт PostScript Type-1 + Písmo Postscript type-1 + Datoteka pisave Postscript vrste-1 + Lloj gërmash Postscript type-1 + Postscript type-1-typsnitt + шрифт Postscript type-1 + Phông kiểu 1 PostScript + Postscript type-1 字体 + Postscript type-1 字型 + + + + + + + + + + + + + + + + Adobe font metrics + مقاييس خط أدوبي + Adobe yazı növü metrikləri + Metryka šryftu Adobe + Шрифтова метрика — Adobe + mètrica de tipus de lletra Adobe + Metrika písma Adobe + Metrigau Ffont Adobe + Adobe skrifttypefil + Adobe-Schriftmetriken + μετρικά γραμματοσειράς Adobe + Adobe font metrics + metrikoj de Adobe-tiparo + métricas de tipografía Adobe + Adobe letra-tipoen neurriak + Adobe-kirjasinmitat + métriques de police Adobe + meadarachtaí cló Adobe + métricas de fonte de Adobe + מדדי גופן של Adobe + Adobe-betűmetrika + Metrik fonta Adobe + Metriche tipo carattere Adobe + Adobe フォントメトリック + Adobe қаріп метрикалары + 어도비 글꼴 메트릭스 + Adobe šriftų metrika + Adobe fonta metrika + Metrik font Adobe + Adobe skrifttypefil + Adobe-lettertype-metrieken + Adobe skrifttypemetrikk + Metryka czcionki Adobe + métrica de tipos de letra Adobe + Métricas de fonte Adobe + Dimensiuni font Adobe + метрика шрифта Adobe + Metrika písma Adobe + Matrika pisave Adobe + Metrik lloj gërmash Adobe + Adobe метрика фонта + Adobe-typsnittsmetrik + метрики шрифту Adobe + Cách đo phông chữ Adobe + Adobe 字体参数 + Adobe 字型描述檔 + + + + + BDF font + خط BDF + BDF yazı növü + Šryft BDF + Шрифт — BDF + tipus de lletra BDF + Písmo BDF + Ffont BDF + BDF-skrifttype + BDF-Schrift + γραμματοσειρά BDF + BDF font + BDF-tiparo + tipografía BDF + BDF letra-tipoa + BDF-kirjasin + BDF stavasnið + police BDF + cló BDF + tipo de fonte BDF + גופן BDF + BDF-betűkészlet + Fonta BDF + Tipo carattere BDF + BDF フォント + BDF қарібі + BDF 글꼴 + BDF šriftas + BDF fonts + Font BDF + BDF-skrifttype + BDF-lettertype + BDF-skrifttype + Czcionka BDF + tipo de letra BDF + Fonte BDF + Font BDF + шрифт BDF + Písmo BDF + Datoteka pisave BDF + Lloj gërme BDF + BDF фонт + BDF-typsnitt + шрифт BDF + Phông chữ BDF + BDF 字体 + BDF 字型 + + + + + + + + DOS font + خط DOS + DOS yazı növü + Šryft DOS + Шрифт — DOS + tipus de lletra DOS + Písmo pro DOS + Ffont DOS + DOS-skrifttype + DOS-Schrift + γραμματοσειρά DOS + DOS font + DOS-tiparo + tipografía DOS + DOS letra-tipoa + DOS-kirjasin + DOS stavasnið + police DOS + cló DOS + tipo de fonte de DOS + גופן DOS + DOS-betűkészlet + Fonta DOS + Tipo carattere DOS + DOS フォント + DOS қарібі + 도스 글꼴 + DOS šriftas + DOS fonts + Font DOS + DOS-skrifttype + DOS-lettertype + DOS-skrifttype + Czcionka DOS + tipo de letra DOS + Fonte do DOS + Font DOS + шрифт DOS + Písmo pre DOS + Datoteka pisave DOS + Gërmë DOS + DOS фонт + DOS-typsnitt + шрифт DOS + Phông chữ DOS + DOS 字体 + DOS 字型 + + + + + + + + + Adobe FrameMaker font + خط أدوبي الصانع للإطارات + Adobe FrameMaker yazı növü + Šryft Adobe FrameMaker + Шрифт — Adobe FrameMaker + tipus de lletra d'Adobe FrameMaker + Písmo Adobe FrameMaker + Ffont Adobe FrameMaker + Adobe FrameMaker-skrifttype + Adobe-FrameMaker-Schrift + γραμματοσειρά Adobe FrameMaker + Adobe FrameMaker font + Tiparo de Adobe FrameMaker + tipografía de Adobe FrameMaker + Adobe FrameMaker-en letra-tipoa + Adobe FrameMaker -kirjasin + Adobe FrameMaker stavasnið + police Adobe FrameMaker + cló Adobe FrameMaker + tipo de fonte de Adobe FrameMaker + גופן של Adobe FrameMaker + Adobe FrameMaker-betűkészlet + Fonta Adobe FrameMaker + Tipo carattere Adobe FrameMaker + Adobe FrameMaker フォント + Adobe FrameMaker қарібі + 어도비 프레임메이커 글꼴 + Adobe FrameMaker šriftas + Adobe FrameMaker fonts + Font Adobe FrameMaker + Adobe FrameMaker skrifttype + Adobe FrameMaker-lettertype + Adobe FrameMaker-skrifttype + Czcionka Adobe FrameMaker + tipo de letra Adobe FrameMaker + Fonte do Adobe FrameMaker + Font Adobe FrameMaker + шрифт Adobe FrameMaker + Písmo Adobe FrameMaker + Datoteka pisave Adobe FrameMaker + Gërma Adobe FrameMaker + Adobe FrameMaker фонт + Adobe FrameMaker-typsnitt + шрифт Adobe FrameMaker + Phông chữ Adobe FrameMaker + Adobe FrameMaker 字体 + Adobe FrameMaker 字型 + + + + + + + LIBGRX font + خط LIBGRX + LIBGRX yazı növü + Šryft LIBGRX + Шрифт — LIBGRX + tipus de lletra LIBGRX + Písmo LIBGRX + Ffont LIBGRX + LIBGRX-skrifttype + LIBGRX-Schrift + γραμματοσειρά LIBGRX + LIBGRX font + LIBGRX-tiparo + tipografía LIBGRX + LIBGRX letra-tipoa + LIBGRX-kirjasin + LIBGRX stavasnið + police LIBGRX + cló LIBGRX + tipo de fonte en LIBGRX + גופן LIBGRX + LIBGRX-betűkészlet + Fonta LIBGRX + Tipo carattere LIBGRX + LIBGRX フォーマット + LIBGRX қарібі + LIBGRX 글꼴 + LIBGRX šriftas + LIBGRX fonts + Font LIBGRX + LIBGRX-skrifttype + LIBGRX-lettertype + LIBGRX skrifttype + Czcionka LIBGRX + tipo de letra LIBGRX + Fonte LIBGRX + Font LIBGRX + шрифт LIBGRX + Písmo LIBGRX + Datoteka pisave LIBGRX + Lloj gërme LIBGRX + LIBGRX фонт + LIBGRX-typsnitt + шрифт LIBGRX + Phông chữ LIBGRX + LIBGRX 字体 + LIBGRX 字型 + + + + + + + Linux PSF console font + خط كونسول PSF لينكس + Linux PSF konsol yazı növü + Kansolny šryft PSF dla Linuksa + Шрифт — PSF, за конзолата на Линукс + tipus de lletra de consola Linux PSF + Písmo PSF pro konzolu Linuxu + Ffont Linux PSF + Linux PSF-konsolskrifttype + Linux-PSF-Konsolenschrift + γραμματοσειρά κονσόλας PSF Linux + Linux PSF console font + PSF-tiparo de Linux-konzolo + tipografía de consola Linux PSF + Linux PSF kontsolako letra-tipoa + Linux PSF -konsolikirjasin + Linux PSF stýristøðs stavasnið + police console Linux PSF + cló chonsól Linux PSF + tipo de fonte de consola Linux PSF + גופן לקונסול מסוג Linux PSF + Linux PSF konzolos betűkészlet + Fonta konsol Linux PSF + Tipo carattere console Linux PSF + Linux PSF コンソールフォント + Linux PSF консольдік қарібі + 리눅스 PSF 콘솔 글꼴 + Linux PSF konsolės šriftas + Linux PSF konsoles fonts + Font konsol PSF Linux + Linux PSF konsollskrifttype + Linux PSF-console-lettertype + Linux PSF konsoll-skrifttype + Czcionka konsoli PSF Linux + tipo de letra de consola Linux PSF + Fonte de console Linux PSF + Font consolă Linux PSF + консольный шрифт Linux PSF + Písmo PSF pre konzolu Linuxu + Datoteka pisave konzole Linux PSF + Lloj gërme për konsolë Linux PSF + Линукс PSF конзолни фонт + Linux PSF-konsolltypsnitt + консольний шрифт Linux PSF + Phông chữ bàn giao tiếp PSF Linux + Linux PSF 控制台字体 + Linux PSF console 字型 + + + + + + + + Linux PSF console font (gzip-compressed) + خط كونسول PSF لينكس (مضغوط-gzip) + Kansolny šryft PSF dla Linuksa (gzip-skampresavany) + Шрифт — Linux PSF, компресиран с gzip + tipus de lletra de consola Linux PSF (comprimida amb gzip) + Písmo PSF pro konzolu Linuxu (komprimované pomocí gzip) + Linux PSF-konsolskrifttype (gzip-komprimeret) + Linux-PSF-Konsolenschrift (gzip-komprimiert) + tipografía de consola Linux PSF (comprimida con gzip) + Linux PSF kontsolako letra-tipoa (gzip-ekin konprimitua) + Linux PSF -konsolikirjasin (gzip-pakattu) + Linux PSF stýristøðs stavasnið (gzip-stappað) + police console Linux PSF (compressée gzip) + cló chonsól Linux PSF (comhbhrúite le gzip) + tipo de fonte de consola Linux PSF (comprimida con gzip) + גופן לקונסול מסוג Linux PSF (מכווץ ע"י gzip) + Linux PSF konzolos betűkészlet (gzip-tömörítésű) + Fonta konsol Linux PSF (terkompresi gzip) + Tipo carattere console Linux PSF (compresso con gzip) + Linux PSF コンソールフォント (gzip 圧縮) + Linux PSF консольдік қарібі (gzip-пен сығылған) + 리눅스 PSF 콘솔 글꼴 (GZIP 압축) + Linux PSF konsolės šriftas (suglaudintas su gzip) + Linux PSF konsoles fonts (saspiests ar gzip) + Linux PSF konsollskrifttype (gzip-komprimert) + Linux PSF-console-lettertype (ingepakt met gzip) + Linux PSF konsoll-skrifttype (gzip-pakka) + Czcionka konsoli PSF Linux (kompresja gzip) + Fonte de console Linux PSF (compactada com gzip) + Font consolă Linux PSF (compresie gzip) + консольный шрифт Linux PSF (сжатый gzip) + Písmo PSF pre konzolu Linuxu (komprimované pomocou gzip) + Datoteka pisave konzole Linux PSF (skrčena z gzip) + Lloj gërme për konsolë Linux PSF (komresuar me gzip) + Linux PSF-konsolltypsnitt (gzip-komprimerat) + консольний шрифт Linux PSF (стиснений gzip) + Phông chữ bàn giao tiếp PSF Linux (đã nén gzip) + Linux PSF 控制台字体(gzip 压缩) + Linux PSF console 字型 (gzip 格式壓縮) + + + + + + PCF font + خط PCF + PCF yazı növü + Šryft PCF + Шрифт — PCF + tipus de lletra PCF + Písmo PCF + Ffont PCF + PCF-skrifttype + PCF-Schrift + γραμματοσειρά PCF + PCF font + PCF-tiparo + tipografía PCF + PCF letra-tipoa + PCF-kirjasin + PCF stavasnið + police PCF + cló PCF + tipo de letra PCF + פונט PCF + PCF-betűkészlet + Fonta PCF + Tipo carattere PCF + PCF フォント + PCF қарібі + PCF 글꼴 + PCF šriftas + PCF fonts + Font PCF + PCF-skrifttype + PCF-lettertype + PCF-skrifttype + Czcionka PCF + tipo de letra PCF + Fonte PCF + Font PCF + шрифт PCF + Písmo PCF + Datoteka pisave PCF + Gërma PCF + PCF фонт + PCF-typsnitt + шрифт PCF + Phông chữ PCF + PCF 字体 + PCF 字型 + + + + + + + + + + OpenType font + خط OpenType + OpenType yazı növü + Šryft OpenType + Шрифт — OpenType + tipus de lletra OpenType + Písmo OpenType + Ffont OpenType + OpenType-skrifttype + OpenType-Schrift + γραμματοσειρά OpenType + OpenType font + OpenType-tiparo + tipografía de OpenType + OpenType letra-tipoa + OpenType-kirjasin + OpenType stavasnið + police OpenType + cló OpenType + tipo de fonte OpenType + גופן של OpenType + OpenType-betűkészlet + Fonta OpenType + Tipo carattere OpenType + OpenType フォント + OpenType қарібі + 오픈타입 글꼴 + OpenType šriftas + OpenType fonts + Font OpenType + OpenType-skrifttype + OpenType-lettertype + OpenType-skrifttype + Czcionka OpenType + tipo de letra OpenType + Fonte OpenType + Font OpenType + шрифт OpenType + Písmo OpenType + Datoteka pisave OpenType + Gërma OpenType + OpenType фонт + OpenType-typsnitt + шрифт OpenType + Phông chữ OpenType + OpenType 字体 + OpenType 字型 + + + + + + + + Speedo font + خط Speedo + Speedo yazı növü + Šryft Speedo + Шрифт — Speedo + tipus de lletra Speedo + Písmo Speedo + Ffont Speedo + Speedoskrifttype + Speedo-Schrift + γραμματοσειρά Speedo + Speedo font + Speedo-tiparo + tipografía Speedo + Speedo letra-tipoa + Speedo-kirjasin + Speedo stavasnið + police Speedo + cló Speedo + tipo de letra Speedo + גופן של Speedo + Speedo-betűkészlet + Fonta Speedo + Tipo carattere Speedo + Speedo フォント + Speedo қарібі + Speedo 글꼴 + Speedo šriftas + Speedo fonts + Font Speedo + Speedo-skrifttype + Speedo-lettertype + Speedo-skrifttype + Czcionka Speedo + tipo de letra Speedo + Fonte Speedo + Font Speedo + шрифт Speedo + Písmo Speedo + Datoteka pisave Speedo + Gërma Speedo + Speedo фонт + Speedo-typsnitt + шрифт Speedo + Phông chữ Speedo + Speedo 字体 + Speedo 字型 + + + + + + + + SunOS News font + خط SunOS News + SunOS News yazı növü + Šryft SunOS News + Шрифт — SunOS News + tipus de lletra SunOS News + Písmo SunOS News + Ffont SunOS News + SunOS News-skrifttype + SunOS-News-Schrift + γραμματοσειρά SunOS News + SunOS News font + tiparo de SunOS News + tipografía SunOS News + SunOs News letra-tipoa + SunOS News -kirjasin + SunOS News stavasnið + police SunOS News + cló SunOS News + tipo de letra SunOS News + גופן של SunOS News + SunOS News-betűkészlet + Fonta SunOS News + Tipo carattere SunOS News + SunOS News フォント + SunOS News қарібі + SunOS News 글꼴 + SunOS News šriftas + SunOS News fonts + Font News SunOS + SunOS News-skrifttype + SunOS News-lettertype + SunOS NEWS-skrifttype + Czcionka SunOS News + tipo de letra SunOS News + Fonte SunOS News + Font SunOS News + шрифт SunOS News + Písmo SunOS News + Datoteka pisave SunOS News + Gërma SunOS News + SunOS News фонт + SunOS News-typsnitt + шрифт SunOS News + Phông chữ SunOS News + SunOS News 字体 + SunOS News 字型 + + + + + + + + + TeX font + خط TeX + TeX yazı növü + Šryft TeX + Шрифт — TeX + tipus de lletra TeX + Písmo TeX + Ffont TeX + TeX-skrifttype + TeX-Schrift + γραμματοσειρά TeX + TeX font + TeX-tiparo + tipografía de TeX + TeX letra-tipoa + TeX-kirjasin + TeX stavasnið + police TeX + cló TeX + tipo de letra de TeX + גופן TeX + TeX-betűkészlet + Fonta TeX + Tipo carattere TeX + TeX フォント + TeX қарібі + TeX 글꼴 + TeX šriftas + TeX fonts + Font TeX + TeX-skrift + TeX-lettertype + TeX-skrifttype + Czcionka TeX + tipo de letra TeX + Fonte TeX + Font TeX + шрифт TeX + Písmo TeX + Datoteka pisave TeX + Gërma TeX + ТеХ фонт + TeX-typsnitt + шрифт TeX + Phông chữ TeX + TeX 字体 + TeX 字型 + + + + + + + + + TeX font metrics + مقاييس خط TeX + TeX yazı növü metrikləri + Metryka šryftu TeX + Шрифтова метрика — TeX + mètrica de tipus de lletra TeX + Metrika písma TeX + Metrigau Ffont TeX + TeX-skrifttypeinformation + TeX-Schriftmetriken + μετρικά γραμματοσειράς TeX + TeX font metrics + metrikoj de TeX-tiparo + métricas de tipografía de TeX + TeX letra-tipoen neurriak + TeX-kirjasinmitat + métriques de police TeX + meadarachtaí cló TeX + Métricas de tipo de letra de TeX + גופן מטריקס של TeX + TeX-betűmetrika + Fonta metrik TeX + Metriche tipo carattere TeX + TeX フォントメトリック + TeX қаріп метрикалары + Tex 글꼴 메트릭스 + TeX šriftų metrika + TeX fonta metrikas + Metrik font TeX + TeX skrifttypemetrikk + TeX-lettertype-metrieken + TeX skrifttypemetrikk + Metryki czcionki TeX + métricas de tipo de letra TeX + Métrica de fonte TeX + Dimensiuni font TeX + метрика шрифта TeX + Metrika písma TeX + Matrika pisave Tex + Gërma TeX metrics + ТеХ метрика фонта + TeX-typsnittsmetrik + метрики шрифту TeX + Cách đo phông chữ TeX + TeX 字体参数 + TeX 字型描述檔 + + + + + + + + TrueType font + خط TrueType + Šryft TrueType + Шрифт — TrueType + tipus de lletra TrueType + Písmo TrueType + TrueType-skrifttype + TrueType-Schrift + γραμματοσειρά TrueType + TrueType font + TrueType-tiparo + tipografía TrueType + TrueType letra-tipoa + TrueType-kirjasin + TrueType stavasnið + police Truetype + cló TrueType + tipo de letra TrueType + גופן מסוג TrueType + TrueType-betűkészlet + Fonta TrueType + Tipo carattere TrueType + TrueType フォント + TrueType қарібі + 트루타입 글꼴 + TrueType šriftas + TrueType fonts + Font TrueType + TrueType-skrift + TrueType-lettertype + TrueType-skrifttype + Czcionka TrueType + tipo de letra TrueType + Fonte TrueType + Font TrueType + шрифт TrueType + Písmo TrueType + Datoteka pisave TrueType + Lloj gërme TrueType + Трутајп фонт + Truetype-typsnitt + шрифт TrueType + Phông chữ TrueType + TrueType 字体 + TrueType 字型 + + + + + + + + + + + TrueType XML font + خط TrueType XML + Šryft TrueType XML + Шрифт — TrueType XML + tipus de lletra TrueType XML + Písmo TrueType XML + TrueType XML-skrifttype + TrueType-XML-Schrift + tipografía TrueType XML + TrueType XML letra-tipoa + TrueType-XML-kirjasin + TrueType XML stavasnið + police Truetype XML + cló XML TrueType + tipo de letra TrueType XML + גופן XML מסוג TrueType + TrueType XML betűkészlet + Fonta TrueType XML + Tipo carattere TrueType XML + TrueType XML フォント + TrueType XML қарібі + 트루타입 XML 글꼴 + TrueType XML šriftas + TrueType XML fonts + TrueType XML-skrift + TrueType XML-lettertype + TrueType XML-skrifttype + Czcionka TrueType XML + Fonte TrueType XML + Font XML TrueType + шрифт TrueType XML + Písmo TrueType XML + Datoteka pisave TrueType XML + Lloj gërme TrueType XML + Truetype XML-typsnitt + шрифт TrueType XML + Phông chữ XML TrueType + TrueType XML 字体 + TrueType XML 字型 + + + + + + + + + V font + خط V + V yazı növü + Šryft V + Шрифт — V + tipus de lletra V + Písmo V + Ffont V + V-skrifttype + V-Schrift + γραμματοσειρά V + V font + V-tiparo + tipografía V + V letra-tipoa + V-kirjasin + V stavasnið + police V + cló V + tipo de letra V + גופן של V + V-betűkészlet + Fonta V + Tipo carattere V + V フォント + V font қарібі + V 글꼴 + V šriftas + V fonts + Font V + V-skrift + V-lettertype + V-skrifttype + Czcionka V + tipo de letra V + Fonte V + Font V + шрифт V font + Písmo V + Datoteka pisave V + Gërmë V + V фонт + V-typsnitt + V-шрифт + Phông chữ V + V 字体 + V 字型 + + + + + + + Adobe FrameMaker document + مستند أدوبي الصانع للإطارات + Dakument Adobe FrameMaker + Документ — Adobe FrameMaker + document FrameMaker d'Adobe + Dokument Adobe FrameMaker + Adobe FrameMaker-dokument + Adobe-FrameMaker-Dokument + Dokumento de Adobe FrameMaker + documento de Adobe FrameMaker + Adobe FrameMaker-en dokumentua + Adobe FrameMaker -asiakirja + Adobe FrameMaker skjal + document Adobe FrameMaker + cáipéis Adobe FrameMaker + documento de Adobe FrameMaker + מסמך Adobe FrameMaker + Adobe FrameMaker-dokumentum + Dokumen Adobe FrameMaker + Documento Adobe FrameMaker + Adobe FrameMaker ドキュメント + Adobe FrameMaker құжаты + 어도비 프레임메이커 문서 + Adobe FrameMaker dokumentas + Adobe FrameMaker dokuments + Adobe FrameMaker-dokument + Adobe FrameMaker-document + Adobe FrameMaker-dokument + Dokument Adobe FrameMaker + Documento do Adobe FrameMaker + Document Adobe FrameMaker + документ Adobe FrameMaker + Dokument Adobe FrameMaker + Dokument Adobe FrameMaker + Dokument Adobe FrameMaker + Adobe FrameMaker-dokument + документ Adobe FrameMaker + Tài liệu Adobe FrameMaker + Adobe FrameMaker 文档 + Adobe FrameMaker 文件 + + + + + + + + + + + + + Game Boy ROM + Game Boy ROM + Game Boy ROM + ROM — Game Boy + ROM de Game Boy + ROM pro Game Boy + Game Boy-rom + Game-Boy-ROM + εικόνα μνήμης ROM GameBoy + Game Boy ROM + NLM de Game Boy + ROM de Game Boy + Game Boy-eko ROMa + Game Boy -ROM + Game Boy ROM + ROM Game Boy + ROM Game Boy + ROM de Game Boy + ROM של Game Boy + Game Boy ROM + Memori baca-saja Game Boy + ROM Game Boy + ゲームボーイ ROM + Game Boy ROM + 게임보이 롬 + Game Boy ROM + Game Boy ROM + ROM Game Boy + Game Boy-ROM + Game Boy-ROM + Game Boy-ROM + Plik ROM konsoli Game Boy + ROM Game Boy + ROM do Game Boy + ROM Game Boy + Game Boy ROM + ROM pre Game Boy + Bralni pomnilnik Game Boy + ROM Game Boy + Гејмбој РОМ + Game Boy-rom + ППП Game Boy + ROM Game Boy + Game Boy ROM + Game Boy ROM + + + + + Game Boy Advance ROM + Game Boy Advance ROM + Game Boy Advance ROM + ROM — Game Boy Advance + ROM de Game Boy Advance + ROM pro Game Boy Advance + Game Boy Advance-rom + Game-Boy-Advance-ROM + ROM de Game Boy Advance + Game Boy Advance-ko ROMa + Game Boy Advance -ROM + Game Boy Advance ROM + ROM Game Boy Advance + ROM Game Boy Advance + ROM de Game Boy Advance + ROM של Game Boy Advance + Game Boy Advance ROM + Memori baca-saja Game Boy Advance + ROM Game Boy Advance + ゲームボーイアドバンス ROM + Game Boy Advance ROM + 게임보이 어드밴스 롬 + Game Boy Advance ROM + Game Boy Advance ROM + Game Boy Advance-ROM + Game Boy Advance-ROM + Game Boy Advance-ROM + Plik ROM konsoli Game Boy Advance + ROM do Game Boy Advance + ROM Game Boy Advance + Game Boy Advance ROM + ROM pre Game Boy Advance + Bralni pomnilnik Game Boy Advance + ROM Game Boy Advance + Game Boy Advance-rom + розширений ППП Game Boy + ROM Game Boy Advance + Game Boy Advance ROM + Game Boy Advance ROM + + + + + GDBM database + قاعدة بيانات GDBM + Baza źviestak GDBM + База от данни — GDBM + base de dades GDBM + Databáze GDBM + GDBM-database + GDBM-Datenbank + GDBM-datumbazo + base de datos GDBM + GDBM datu-basea + GDBM-tietokanta + GDBM dátustovnur + base de données GDBM + bunachar sonraí GDBM + base de datos GDBM + בסיס נתונים GDBM + GDBM adatbázis + Basis data GDBM + Database GDBM + GDBM データベース + GDBM дерекқоры + GDBM 데이터베이스 + GDBM duomenų bazė + GDBM datubāze + GDBM-database + GDBM-gegevensbank + GDBM-database + Baza danych GDBM + Banco de dados GDBM + Bază de date GDBM + база данных GDBM + Databáza GDBM + Podatkovna zbirka GDBM + Bazë me të dhëna GDBM + GDBM-databas + база даних GDBM + Cơ sở dữ liệu GDBM + GDBM 数据库 + GDBM 資料庫 + GDBM + GNU Database Manager + + + + + + + + + Genesis ROM + Genesis ROM + Genesis ROM + ROM — Genesis + ROM de Genesis + ROM pro Genesis + Genesis-rom + Genesis-ROM + εικόνα μνήμης ROM Genesis + Genesis ROM + Genesis-NLM + ROM de Genesis (Mega Drive) + Genesis-eko ROMa + Genesis-ROM + Genesis ROM + ROM Mega Drive/Genesis + ROM Genesis + ROM xenérica + ROM של Genesis + Genesis ROM + Memori baca-saja Genesis + ROM Megadrive + メガドライブ ROM + Genesis ROM + 제네시스 롬 + Genesis ROM + Genesis ROM + ROM Genesis + Genesis-ROM + Mega Drive + Genesis-ROM + Plik ROM konsoli Mega Drive + ROM Genesis + ROM do Gênesis (Mega Drive) + ROM Genesis + Genesis ROM + ROM pre Megadrive + Bralni pomnilnik Genesis + ROM Genesis + Genesis РОМ + Genesis-rom + ППП Genesis + ROM Genesis + Genesis ROM + Genesis ROM + + + + + + + + + + translated messages (machine-readable) + رسائل مترجمة (مقروءة آليا) + pierakładzienyja paviedamleńni (dla čytańnia kamputaram) + Преведени съобщения — машинен формат + missatges traduïts (llegible per màquina) + Přeložené zprávy (strojově čitelné) + oversatte meddelelser (maskinlæsbare) + Übersetzte Meldungen (maschinenlesbar) + μεταφρασμένα μηνύματα (για μηχανική ανάγνωση) + translated messages (machine-readable) + tradukitaj mesaĝoj (maŝinlegebla) + mensajes traducidos (legibles por máquinas) + itzulitako mezuak (ordenagailuek irakurtzeko) + käännetyt viestit (koneluettava) + týdd boð (maskin-lesifør) + messages traduits (lisibles par machine) + teachtaireachtaí aistrithe (inléite ag meaisín) + mensaxes traducidos (lexíbeis por máquinas) + מסר מתורגם (מובן ע"י מכונה) + lefordított üzenetek (gépi kód) + pesan diterjemahkan (dapat dibaca mesin) + Messaggi tradotti (leggibili da macchina) + 翻訳メッセージ (マシン用) + аударылған хабарламалар (машиналық түрде) + 번역 메시지 (컴퓨터 사용 형식) + išversti užrašai (kompiuteriniu formatu) + pārtulkotie ziņojumi (mašīnlasāms) + Mesej diterjemah (bolehdibaca-mesin) + oversatte meldinger (maskinlesbar) + vertaalde berichten (machine-leesbaar) + oversette meldingar (maskinlesbare) + Przetłumaczone komunikaty (czytelne dla komputera) + mensagens traduzidas (leitura pelo computador) + mensagens traduzidas (legível por máquinas) + mesaje traduse (citite de calculator) + переводы сообщений (откомпилированые) + Preložené správy (strojovo čitateľné) + prevedena sporočila (strojni zapis) + Mesazhe të përkthyer (të lexueshëm nga makina) + преведене поруке (машинама читљиво) + översatta meddelanden (maskinläsbara) + перекладені повідомлення (у машинній формі) + thông điệp đã dịch (máy đọc được) + 消息翻译(机读) + 翻譯訊息 (程式讀取格式) + + + + + Glade project + مشروع Glade + Glade layihəsi + Prajekt Glade + Проект — Glade + projecte de Glade + Projekt Glade + Prosiect Glade + Gladeprojekt + Glade-Projekt + έργο Glade + Glade project + Glade-projekto + proyecto de Glade + Glade proiektua + Glade-projekti + Glade verkætlan + projet Glade + tionscadal Glade + proxecto de Glade + מיזם Glade + Glade-projekt + Proyek Glade + Progetto Glade + Glade プロジェクト + Glade жобасы + Glade 프로젝트 + Glade projektas + Glade projekts + Projek Glade + Glade prosjekt + Glade-project + Glade prosjekt + Projekt Glade + projecto Glade + Projeto do Glade + Proiect Glade + проект Glade + Projekt Glade + Datoteka projekta Glade + Projekt Glade + Глејд пројекат + Glade-projekt + проект Glade + Dự án Glade + Glade 工程 + Glade 專案 + + + + + + + + + GMC link + وصلة GMC + GMC körpüsü + Spasyłka GMC + Връзка — GMC + enllaç GMC + Odkaz GMC + Cyswllt GMC + GMC-henvisning + GMC-Verweis + σύνδεσμος GMC + GMC link + GMC-ligilo + enlace GMC + GMC esteka + GMC-linkki + GMC leinkja + lien GMC + nasc GMC + ligazón GMC + קישור GMC + GMC-link + Taut GMC + Collegamento GMC + GMC リンク + GMC сілтемесі + GMC 연결 + GMC nuoroda + GMC saite + Pautan GMC + GMC-lenke + GMC-verwijzing + GMC-lenkje + Odnośnik GMC + 'link' GMC + Link GMC + Legătură GMC + ссылка GMC + Odkaz GMC + Datoteka povezave GMC + Lidhje GMC + GMC веза + GMC-länk + посилання GMC + Liên kết GMC + GMC 链接 + GMC 鏈結 + + + + + + + GnuCash financial data + معلومات GnuCash المالية + Финансови данни — GnuCash + dades financeres del GnuCash + Finanční data GnuCash + Finansielle data til GnuCash + GnuCash-Finanzdaten + datos financieros GnuCash + GnuCash finantzako datuak + GnuCash-taloustiedot + GnuCash fíggjarligar dátur + données financières GnuCash + sonraí airgeadúla GnuCash + datos financeiros de GNUCash + מידע כלכלי של GnuCash + GnuCash pénzügyi adatok + Data keuangan GnuCash + Dati finanziari GnuCash + GnuCash 会計データ + GnuCash қаржы ақпараты + GnuCash 재정 자료 + GnuCash finansiniai duomenys + GnuCash finanšu dati + GnuCash financiële gegevens + Dane finansowe GnuCash + Dados financeiros do GnuCash + Date financiare GnuCash + финансовые данные GnuCash + Finančné údaje GnuCash + Datoteka finančnih podatkov GnuCash + GnuCash-finansdata + фінансові дані GnuCash + Dữ liệu tài chính GnuCash + GnuCash 财务数据 + GnuCash 財務資料 + + + + + + + Gnumeric spreadsheet + جدول Gnumeric + Raźlikovy arkuš Gnumeric + Таблица — Gnumeric + full de càlcul de Gnumeric + Sešit Gnumeric + Gnumeric-regneark + Gnumeric-Tabelle + Λογιστικό φύλλο Gnumeric + Gnumeric spreadsheet + Gnumeric-kalkultabelo + hoja de cálculo de Gnumeric + Gnumeric kalkulu-orria + Gnumeric-taulukko + Gnumeric rokniark + feuille de calcul Gnumeric + scarbhileog Gnumeric + folla de cálculo de Gnumeric + גליון עבודה Gnumeric + Gnumeric-munkafüzet + Lembar sebar Gnumeric + Foglio di calcolo Gnumeric + Gnumeric スプレッドシート + Gnumeric электрондық кестесі + Gnumeric 스프레드시트 + Gnumeric skaičialentė + Gnumeric izklājlapa + Hamparan Gnumeric + Gnumeric-regneark + Gnumeric-rekenblad + Gnumeric-rekneark + Arkusz Gnumeric + folha de cálculo Gnumeric + Planilha do Gnumeric + Foaie de calcul Gnumeric + электронная таблица Gnumeric + Zošit Gnumeric + Razpredelnica Gnumeric + Fletë llogaritjesh Gnumeric + Гнумерик табеларни рачун + Gnumeric-kalkylblad + ел. таблиця Gnumeric + Bảng tính Gnumeric. + Gnumeric 工作簿 + Gnumeric 試算表 + + + + + + + + + Gnuplot document + مستند Gnuplot + Dakument Gnuplot + Документ — Gnuplot + document gnuplot + Dokument Gnuplot + Gnuplotdokument + Gnuplot-Dokument + Gnuplot document + Gnuplot-dokumento + documento de Gnuplot + Gnuplot dokumentua + Gnuplot-asiakirja + Gnuplot skjal + document Gnuplot + cáipéis Gnuplot + documento de Gnuplot + מסמך Gnuplot + Gnuplot dokumentum + Dokumen Gnuplot + Documento Gnuplot + Gnuplot ドキュメント + Gnuplot құжаты + Gnuplot 문서 + Gnuplot dokumentas + Gnuplot dokuments + Gnuplot-dokument + Gnuplot-document + Gnuplot-dokument + Dokument Gnuplot + Documento do Gnuplot + Document Gnuplot + документ Gnuplot + Dokument Gnuplot + Dokument Gnuplot + Dokument Gnuplot + Gnuplot-dokument + документ Gnuplot + Tài liệu Gnuplot + Gnuplot 文档 + Gnuplot 文件 + + + + + + + + Graphite scientific graph + مبيان الجرافيت العلمي + Navukovy hrafik Graphite + Графика — Graphite + gràfic científic Graphite + Vědecký graf Graphite + Graphite videnskabelig graf + Wissenschaftlicher Graphite-Graph + επιστημονικό γράφημα Graphite + Graphite scientific graph + scienca grafikaĵo de Graphite + gráfica científica de Graphite + Graphite - grafiko zientifikoak + Graphite- tieteellinen graafi + Grapite vísindarlig ritmynd + graphe Graphite scientific + graf eolaíoch Graphite + gráfica científica de Graphite + גרך מדעי של Graphite + Graphite tudományos grafikon + Grafik sains Graphite + Grafico scientifico Graphite + Graphite scientific グラフ + Graphite ғылыми кескіні + Graphite 공학 그래프 + Graphite mokslinė diagrama + Graphite zinātniskais grafiks + Graf saintifik Graphite + Vitenskapelig graf fra Graphite + Graphite wetenschappelijke grafiek + Graphite vitskaplege graf + Wykres naukowy Graphite + gráfico científico Graphite + Gráfico científico do Graphite + Grafic științific Graphite + научная диаграмма Graphite + Vedecký graf Graphite + Datoteka znanstvenega grafa Graphite + Grafik shkencor Graphite + Graphite научни графикони + Vetenskaplig Graphite-grafer + наукова графіка Graphite + Biểu đồ khoa học Graphite + Graphite 科学图形 + Graphite 科學圖表 + + + + + GTKtalog catalog + كتالوج GTKtalog + Kataloh GTKtalog + Каталог — Gtktalog + catàleg de GTKtalog + Katalog GTKtalog + GTKtalog-katalog + GTKtalog-Katalog + Κατάλογος GTKtalog + GTKtalog catalogue + katalogo de GTKtalog + catálogo de GTKtalog + Gtktalog katalogoa + GTKtalog-luettelo + GTKtalog skrá + catalogue Gtktalog + catalóg GTKtalog + catálogo de GTKtalog + קטלוג GTKtalog + GTKtalog-katalógus + Katalog GTKtalog + Catalogo GTKtalog + GTKtalog カタログ + GTKtalog каталогы + GTKtalog 카탈로그 + GTKtalog katalogas + GTKtalog katalogs + Katalog GTKtalog + GTKtalog-katalog + GTKtalog-catalogus + GTKtalog-katalog + Katalog programu GTKtalog + catálogo GTKtalog + Catálogo GTKtalog + Catalog GTKalog + каталог GTKtalog + Katalóg GTKtalog + Datoteka kataloga GTKtalog + Katallog GTKtalog + Гткталог каталог + GTKtalog-katalog + каталог GTKtalog + Phân loại GTKtalog + GTKtalog 目录 + GTKtalog 光碟目錄 + + + + + + + TeX DVI document (gzip-compressed) + مستند TeX DVI (مضغوط-gzip) + Dakument TeX DVI (gzip-skampresavany) + Документ — TeX DVI, компресиран с gzip + document TeX DVI (comprimit amb gzip) + Dokument TeX DVI (komprimovaný pomocí gzip) + TeX DVI-dokument (gzip-komprimeret) + TeX-DVI-Dokument (gzip-komprimiert) + documento DVI de TeX (comprimido con gzip) + TeX DVI dokumentua (gzip-ekin konprimitua) + TeX DVI -asiakirja (gzip-pakattu) + TeX DVI skjal (gzip-stappað) + document DVI TeX (compressé gzip) + cáipéis DVI TeX (comhbhrúite le gzip) + documento DVI de TeX (comprimido con gzip) + מסמך מסוג TeX DVI (מכווץ ע"י gzip) + TeX DVI dokumentum (gzip-pel tömörítve) + Dokumen TeX DVI (terkompresi gzip) + Documento Tex DVI (compresso con gzip) + Tex DVI ドキュメント (gzip 圧縮) + TeX DVI құжаты (gzip-пен сығылған) + TeX DVI 문서 (GZIP 압축) + TeX DVI dokumentas (suglaudintas su gzip) + TeX DVI dokuments (saspiests ar gzip) + TeX DVI-dokument (gzip-komprimert) + TeX DVI-document (ingepakt met gzip) + TeX DVI-dokument (pakka med gzip) + Dokument TeX DVI (kompresja gzip) + Documento DVI TeX (compactado com gzip) + Document TeX DVI (comprimat gzip) + документ TeX DVI (сжатый gzip) + Dokument TeX DVI (komprimovaný pomocou gzip) + Dokument TeX DVI (stisnjen z gzip) + Dokument TeX DVI (i kompresuar me gzip) + TeX DVI-dokument (gzip-komprimerat) + документ TeX DVI (стиснений gzip) + Tài liệu DVI TeX (đã nén gzip) + TeX DVI 文档(gzip 压缩) + TeX DVI 文件 (gzip 格式壓縮) + + + + + + Gzip archive + أرشيف Gzip + Archiŭ gzip + Архив — gzip + arxiu gzip + Archiv gzip + Gzip-arkiv + Gzip-Archiv + Gzip-arkivo + archivador Gzip + Gzip artxiboa + Gzip-arkisto + Gzip skjalasavn + archive gzip + cartlann Gzip + arquivo Gzip + ארכיון Gzip + Gzip archívum + Arsip Gzip + Archivio gzip + Gzip アーカイブ + Gzip архиві + GZIP 압축 파일 + Gzip archyvas + Gzip arhīvs + Gzip-arkiv + Gzip-archief + Gzip-arkiv + Archiwum gzip + Pacote Gzip + Arhivă Gzip + архив GZIP + Archív gzip + Datoteka arhiva Gzip + Arkiv gzip + Gzip-arkiv + архів gzip + Kho nén gzip + Gzip 归档文件 + Gzip 封存檔 + + + + + + + + PDF document (gzip-compressed) + مستند PDF (مضغوط-gzip) + Dakument PDF (gzip-skampresavany) + Документ — PDF, компресиран с gzip + document PDF (comprimit amb gzip) + Dokument PDF (komprimovaný pomocí gzip) + PDF-dokument (gzip-komprimeret) + PDF-Dokument (gzip-komprimiert) + documento PDF (comprimido con gzip) + PDF dokumentua (gzip-ekin konprimitua) + PDF-asiakirja (gzip-pakattu) + PDF skjal (gzip-stappað) + document PDF (compressé gzip) + cáipéis PDF (comhbhrúite le gzip) + documento PDF (comprimido en gzip) + מסמך PDF (מכווץ ע"י gzip) + PDF dokumentum (gzip-tömörítésű) + Dokumen PDF (terkompresi gzip) + Documento PDF (compresso con gzip) + PDF ドキュメント (gzip 圧縮) + PDF құжаты (gzip-пен сығылған) + PDF 문서 (GZIP 압축) + PDF dokumentas (suglaudintas su gzip) + PDF dokuments (saspiests ar gzip) + PDF-dokument (gzip-komprimert) + PDF-document (ingepakt met gzip) + PDF-dokument (pakka med gzip) + Dokument PDF (kompresja gzip) + Documento PDF (compactado com gzip) + Document PDF (comprimat gzip) + документ PDF (сжатый gzip) + Dokument PDF (komprimovaný pomocou gzip) + Dokument PDF (stisnjen z gzip) + Dokument PDF (i kompresuar me gzip) + PDF-dokument (gzip-komprimerat) + документ PDF (стиснений gzip) + Tài liệu PDF (đã nén gzip) + PDF 文档(gzip 压缩) + PDF 文件 (gzip 格式壓縮) + + + + + + PostScript document (gzip-compressed) + مستند PostScript (مضغوط-gzip) + Dakument PostScript (gzip-skampresavany) + Документ — PostScript, компресиран с gzip + document PostScript (comprimit amb gzip) + Dokument PostScript (komprimovaný pomocí gzip) + PostScript-dokument (gzip-komprimeret) + PostScript-Dokument (gzip-komprimiert) + έγγραφο PostScript (συμπιεσμένο με gzip) + PostScript document (gzip-compressed) + PostScript-dokumento (kunpremita per gzip) + documento PostScript (comprimido con gzip) + PostScript dokumentua (gzip-konprimitua) + PostScript-asiakirja (gzip-pakattu) + PostScript skjal (gzip-stappað) + document PostScript (compressé gzip) + cáipéis PostScript (comhbhrúite le gzip) + documento PostScript (comprimido con gzip) + מסמך PostScript (מכוות ע"י gzip) + PostScript-dokumentum (gzip-pel tömörítve) + Dokumen PostScript (terkompresi gzip) + Documento PostScript (compresso con gzip) + PostScript ドキュメント (gzip 圧縮) + PostScript құжаты (gzip-пен сығылған) + 포스트스크립트 문서 (GZIP 압축) + PostScript dokumentas (suglaudintas su gzip) + PostScript dokuments (saspiests ar gzip) + Dokumen PostScript (dimampatkan-gzip) + PostScript-dokument (gzip-komprimert) + PostScript-document (ingepakt met gzip) + PostScript-dokument (pakka med gzip) + Dokument Postscript (kompresja gzip) + documento PostScript (comprimido com gzip) + Documento PostScript (compactado com gzip) + Document PostScript (comprimat gzip) + документ PostScript (сжатый gzip) + Dokument PostScript (komprimovaný pomocou gzip) + Dokument PostScript (stisnjen z gzip) + Dokument PostScript (i kompresuar me gzip) + Постскрипт документ (компресована gzip-ом) + Postscript-dokument (gzip-komprimerat) + документ PostScript (стиснене gzip) + Tài liệu PostScript (đã nén gzip) + PostScript 文档(gzip 压缩) + PostScript 文件 (gzip 格式壓縮) + + + + + + HDF document + مستند HDF + HDF sənədi + Dakument HDF + Документ — HDF + document HDF + Dokument HDF + Dogfen HDF + HDF-dokument + HDF-Dokument + έγγραφο HDF + HDF document + HDF-dokumento + documento HDF + HDF dokumentua + HDF-asiakirja + HDF skjal + document HDF + cáipéis HDF + documento HDF + מסמך HDF + HDF-dokumentum + Dokumen HDF + Documento HDF + HDF ドキュメント + HDF құжаты + HDF 문서 + HDF dokumentas + HDF dokuments + Dokumen HDF + HDF-dokument + HDF-document + HDF-dokument + Dokument HDF + documento HDF + Documento HDF + Document HDF + документ HDF + Dokument HDF + Dokument HDF + Dokument HDF + HDF документ + HDF-dokument + документ HDF + Tài liệu HDF + HDF 文档 + HDF 文件 + HDF + Hierarchical Data Format + + + + + + + + + + + + + iPod firmware + برنامج عتاد الـiPod + Firmware iPod + Фърмуер за iPod + microprogramari d'iPod + Firmware iPod + iPod-styreprogram + iPod-Firmware + εικόνα μνήμης firmware iPod + iPod firmware + iPod-mikroprogramaro + firmware de iPod + iPod firmwarea + iPod-laiteohjelmisto + iPod fastbúnaður + firmware iPod + dochtearraí iPod + firmware de iPod + קושחת ipod + iPod-firmware + peranti tegar iPod + Firmware iPod + iPod ファームウェア + iPod микробағдарламасы + iPod 펌웨어 + iPod programinė įranga + iPod aparātprogrammatūra + Firmware iPod + iPod-firmware + iPod-firmware + iPod-firmvare + Oprogramowanie wewnętrzne iPod + 'firmware' iPod + Firmware do iPod + Firmware iPod + микропрограмма iPod + Firmware iPod + Programska strojna oprema iPod + Firmware iPod + iPod програм + fast iPod-program + мікропрограма iPod + phần vững iPod + iPod 固件 + iPod 韌體 + + + + + + Java archive + أرشيف Java + Archiŭ Java + Архив — Java + arxiu Java + Archiv Java + Javaarkiv + Java-Archiv + αρχείο Java + Java archive + Java-arkivo + archivador Java + Java artxiboa + Java-arkisto + Java skjalasavn + archive Java + cartlann Java + arquivo Java + ארכיון Java + Java-archívum + Arsip Java + Archivio Java + Java アーカイブ + Java архиві + 자바 묶음 파일 + Java archyvas + Java arhīvs + Arkib Java + Java-arkiv + Java-archief + Java-arkiv + Archiwum Java + arquivo Java + Pacote Java + Arhivă Java + архив Java + Archív Java + Datoteka arhiva Java + Arkiv Java + Јава архива + Java-arkiv + архів Java + Kho nén Java + Java 归档文件 + Java 封存檔 + + + + + + + + Java class + صنف java + Klasa Java + Клас на Java + classe Java + Třída Java + Javaklasse + Java-Klasse + κλάση Java + Java class + Java-klaso + clase Java + Java-ko klasea + Java-luokka + Java flokkur + classe Java + aicme Java + clase de Java + מחלקת Java + Java-osztály + Kelas Java + Classe Java + Java クラス + Java класы + 자바 클래스 + Java klasė + Java klase + Kelas Java + Java-klasse + Java-klasse + Java-klasse + Klasa Java + classe Java + Classe Java + Clasă Java + класс Java + Trieda Java + Datoteka razreda Java + Klasë Java + Јава класа + Java-klass + клас Java + Hạng Java + Java 类 + Java class + + + + + + + + + + + + JNLP file + ملف JNLP + Fajł JNLP + Файл — JNLP + fitxer JNLP + Soubor JNLP + JNPL-fil + JNLP-Datei + JNLP file + JNLP-dosiero + archivo JNPL + JNLP fitxategia + JNLP-tiedosto + JNLP fíla + fichier JNLP + comhad JNLP + ficheiro JNLP + קובץ JNLP + JNLP fájl + Berkas JNLP + File JNPL + JNLP ファイル + JNLP файлы + JNLP 파일 + JNLP failas + JNLP fails + JNLP-fil + JNLP-bestand + JNLP-fil + Plik JNLP + Arquivo JNLP + Fișier JNLP + файл JNLP + Súbor JNLP + Datoteka JNLP + File JNLP + JNLP-fil + файл JNLP + Tập tin JNLP + JNLP 文件 + JNLP 檔案 + JNLP + Java Network Launching Protocol + + + + + + + + + Java keystore + مخزن مفاتيح جافا + Ключодържател — Java + magatzem de claus Java + Java keystore + Javanøglelager + Java-Schlüsselbund + almacén de claves de Java + Java-ren gako-biltegia + Java-avainvarasto + Java lyklagoymsla + stockage de clés Java + eochairstór Java + almacén de chaves de Java + הקשת מקלדת של Java + Java kulcstároló + Penyimpanan kunci Java + Keystore Java + Java キーストア + Java сақталымы + 자바 키스토어 + Java raktų saugykla + Java keystore + Baza kluczy Java + Stocare chei Java + хранилище ключей Java + Úložisko kľúčov Java + Datoteka tipkovne razporeditve Java + Java-nyckellager + сховище ключів Java + Java 密钥库 + Java 金鑰儲存 + + + + + + + + + Java JCE keystore + مخزن مفاتيح Java JCE + Ключодържател — Java JCE + magatzem de claus JCE Java + Java JCE keystore + Java JCE-nøglelager + Java JCE-Schlüsselbund + almacén de claves JCE de Java + Java JCE-ren gako-biltegia + Java JCE -avainvarasto + Java JCE lyklagoymsla + stockage de clés Java JCE + eochairstór Java JCE + almacén de chves JCE de Java + הקשה מסוג Java JCE + Java JCE kulcstároló + Penyimpanan kunci Java JCE + Keystore Java JCE + Java JCE キーストア + Java JCE сақталымы + wkqk JCE 키스토어 + Java JCE raktų saugykla + Java JCE keystore + Baza kluczy Java JCE + Stocare chei Java JCE + хранилище ключей Java JCE + Úložisko kľúčov Java JCE + Datoteka tipkovne razporeditve Java JCE + Java JCE-nyckellager + сховище ключів JCE Java + Java JCE 密钥库 + Java JCE 金鑰儲存 + JCE + Java Cryptography Extension + + + + + + + Pack200 Java archive + أرشيف Pack200 Java + Archiŭ Pack200 Java + Архив — Java Pack200 + arxiu Java Pack200 + Archiv Java Pack200 + Pack200 Java-arkiv + Pack200-Java-Archiv + archivador Pack200 Java + Pack2000 Java artxiboa + Pack200-Java-arkisto + Pack200 Java skjalasavn + archive Java Pack200 + cartlann Java Pack200 + arquivo Pack200 Java + ארכיון מסוג Pack200 Java + Pack200 Java-archívum + Arsip Pack200 Java + Archivio Pack200 Java + Pack200 Java アーカイブ + Pack200 Java архиві + Pack200 자바 묶음 파일 + Pack200 Java archyvas + Pack200 Java arhīvs + Pack200 Java-arkiv + Pack200 Java-archief + Pack200 Java-arkiv + Archiwum Java Pack200 + Pacote Java Pack200 + Arhivă Java Pack2000 + архив Java Pack200 + Archív Java Pack200 + Datoteka arhiva Pack200 Java + Arkiv Java Pack200 + Pack200 Java-arkiv + архів Java Pack200 + Kho nén Java Pack200 + Pack200 Java 归档文件 + Pack200 Java 封存檔 + + + + + + + + JavaScript program + برنامج جافاسكربت + Prahrama JavaScript + Програма на JavaScript + programa JavaScript + Program v JavaScriptu + JavaScript-program + JavaScript-Programm + πρόγραμμα JavaScript + JavaScript-programo + programa en JavaScript + JavaScript programa + JavaScript-ohjelma + JavaScript forrit + programme JavaScript + ríomhchlár JavaScript + programa JavaScript + תכנית JavaScript + JavaScript-program + Program JavaScript + Programma JavaScript + JavaScript プログラム + JavaScript бағдарламасы + 자바스크립트 프로그램 + JavaScript programa + JavaScript programma + Program JavaScript + JavaScript-program + JavaScript-programma + JavaScript-program + Pogram JavaScript + Programa JavaScript + Program JavaScript + сценарий JavaScript + Program jazyka JavaScript + Programska datoteka JavaScript + Program JavaScript + JavaScript-program + програма мовою JavaScript + Chương trình JavaScript + Javascript 程序 + JavaScript 程式 + + + + + + + + JBuilder project + مشروع JBuilder + Prajekt JBuilder + Проект — JBuilder + projecte de JBuilder + Projekt JBuilder + JBuilder-projekt + JBuilder-Projekt + έργο JBuilder + JBuilder project + JBuilder-projekto + proyecto JBuilder + JBuilder proiektua + JBuilder-projekti + JBuilder verkætlan + projet JBuilder + tionscadal JBuilder + proxecto de JBuilder + מיזם JBuilder + JBuilder-projekt + Proyek JBuilder + Progetto JBuilder + JBuilder プロジェクト + JBuilder жобасы + JBuilder 프로젝트 + JBuilder projektas + JBuilder projekts + Projek JBuilder + JBuilder-prosjekt + JBuilder-project + JBuilder-prosjekt + Projekt JBuilder + projecto JBuilder + Projeto do JBuilder + Proiect JBuilder + проект JBuilder + Projekt JBuilder + Datoteka projekta JBuilder + Projekt JBuilder + JBuilder пројекат + JBuilder-projekt + проект JBuilder + Dự án JBuilder + JBuilder 工程 + JBuilder 專案 + + + + + + Karbon14 drawing + تصميم Karbon14 + Rysunak Karbon14 + Чертеж — Karbon14 + dibuix de Karbon14 + Kresba Karbon14 + Karbon14-tegning + Karbon14-Zeichnung + σχέδιο Karbon14 + Karbon14 drawing + Karbon14-grafikaĵo + dibujo de Karbon14 + Karbon14 marrazkia + Karbon14-piirros + Karbon14 tekning + dessin Karbon14 + líníocht Karbon14 + debuxo de Karbon14 + ציור Karbon14 + Karbon14-rajz + Gambar Karbon14 + Disegno Karbon14 + Karbon14 ドロー + Karbon14 суреті + Karbon14 그림 + Karbon14 piešinys + Karbon14 zīmējums + Lukisan Karbon14 + Karbon14-tegning + Karbon14-tekening + Karbon14-teikning + Rysunek Karbon14 + desenho Karbon14 + Desenho do Karbon14 + Desen Karbon14 + изображение Karbon14 + Kresba Karbon14 + Datoteka risbe Karbon14 + Vizatim Karbon14 + Karbon14 цртеж + Karbon14-teckning + малюнок Karbon14 + Bản vẽ Karbon14 + Karbon14 绘图 + Karbon14 繪圖 + + + + + + + + + + + + + + + + + KChart chart + رسم بياني KChart + Hrafik KChart + Диаграма — KChart + diagrama de KChart + Graf Chart + KChart-diagram + KChart-Diagramm + γράφημα KChart + KChart chart + KChart-diagramo + gráfica de KChart + KChart diagrama + KChart-kaavio + KChart strikumynd + graphique KChart + cairt KChart + gráfica de KChart + תרשים KChart + KChart-grafikon + Bagan KChart + Grafico KChart + KChart チャート + KChart диаграммасы + KChart 차트 + KChart diagrama + KChart diagramma + Carta KChart + KChart-graf + KChart-grafiek + KChart-diagram + Wykres KChart + gráfico KChart + Gráfico do KChart + Diagramă KChart + диаграмма KChart + Graf KChart + Datoteka grafikona KChart + Grafik KChart + KChart графикон + KChart-diagram + діаграма KChart + Sơ đồ KChart + KChart 图表 + KChart 圖表 + + + + + + + + + + + + + + + + + Kexi settings for database server connection + إعدادات Kexi للإتصال بخادم قاعدة البيانات + Връзка към база от данни — Kexi + configuració del Kexi per a la connexió al servidor de bases de dades + Nastavení Kexi ke spojení s databázovým serverem + Kexiopsætning til forbindelsen for databaseserveren + Kexi-Einstellungen für Verbindung zum Datenbankserver + configuración de Kexi para la conexión con el servidor de bases de datos + Kexi-ren ezarpenak datu-basearen zerbitzariarekin konektatzeko + Kexi-tietokantayhteysasetukset + Kexi stillingar fyri dátustovnsambætara sambinding + paramètres Kexi pour connexion au serveur de base de données + socruithe Kexi do cheangal le freastalaí bunachair sonraí + configuración de Kexi para conexión con servidor de base de datos + הגדרות של Kexi עבור חיבור שרת לבסיס נתונים + Kexi beállítások adatbáziskiszolgáló-kapcsolathoz + Tatanan Kexi bagi koneksi server basis data + Impostazioni Kexi per connessione a server di database + データベースサーバ接続用の Kexi 設定 + Дерекқор серверге байланыс Kexi баптаулары + Kexi 데이터베이스 서버 연결 설정 + Kexi duomenų bazės ryšio su serveriu parametrai + Kexi iestatījumi datubāzes servera savienojumam + Ustawienia Kexi dla połączenia serwera bazy danych + Configurări Kexi pentru conexiunea la serverul de baze de date + параметры Kexi для подключения к серверу БД + Nastavenia Kexi pre pripojenie k databázovému serveru + Strežniška povezava do nastavitvene datoteke Kexi. + Kexi-inställningar för anslutning till databasserver + параметри Kexi для встановлення з’єднання з сервером бази даних + Kexi 数据库服务器连接设置 + Kexi 設定值 (資料庫伺服器連線用) + + + + shortcut to Kexi project on database server + اختصار لمشروع Kexi على خادم قاعدة بيانات + Връзка към проект — Kexi + drecera a projecte del Kexi en un servidor de base de dades + Zástupce projektu Kexi na databázovém serveru + genvej til Kexiprojekt på databaseserver + Schnellzugriff zum Kexi-Projekt auf dem Datenbankserver + acceso directo a proyecto Kexi en el servidor de bases de datos + lasterbidea datu-basearen zerbitzariko Kexi proiekturako + snarvegur til Kexi verkætlan á dátustovnsambætara + raccourci vers projet Kexi sur serveur de base de données + aicearra go tionscadal Kexi ar fhreastalaí bunachair sonraí + acceso directo a proxecto Kexi no servidor de bases de datos + קיצור דרך לפרוירט Kexi בשרת נתונים + indítóikon adatbázis-kiszolgálón lévő Kexi projektre + pintasan ke projek Kexi pada server basis data + Scorciatoia a progetto Kexi su server di database + データベースサーバの Kexi プロジェクトへのショートカット + дерекқор серверіндегі Kexi жобасына сілтеме + Kexi 데이터베이스 서버 사용 프로젝트 바로 가기 + nuoroda į Kexi projektą duomenų bazės serveryje + īsceļš uz Kexi projektu datubāzes serverī + Skrót do projektu Kexi na serwerze bazy danych + scurtătură către un proiect Kexi pe un server de baze de date + ссылка на проект Kexi на сервере БД + bližnjica do Kexi projekta na podatkovnem strežniku + genväg till Kexi-projekt på databasserver + скорочення для проекту Kexi на сервері бази даних + 数据库服务器上 Kexi 项目的快捷方式 + 資料庫伺服器上 Kexi 專案的捷徑 + + + + Kexi database file-based project + مشروع قاعدة بيانات Kexi يعتمد على ملفات + Проект с база от данни — Kexi + projecte basat en fitxer de base de dades del Kexi + Projekt založený na souboru databáze Kexi + Filbaseret projekt for Kexidatabase + Dateibasiertes Kexi-Datenbankprojekt + proyecto basado en el archivo-base de datos Kexi + Kexi datu-baseko fitxategian oinarritutako proiektua + Kexi dátustovns fílugrundað verkætlan + projet de base de données Kexi en mode fichier + tionscadal bunachair sonraí Kexi bunaithe ar chomhaid + proxecto baseado no ficheiro-base de datos Kexi + פרויקט בסיס נתונים מבוסס-קובץ של Kexi + Kexi adatbázisfájl-alapú projekt + Projek berbasis berkas basis data Kexi + Progetto su file di database Kexi + Kexi データベース ファイルベースプロジェクト + Файл негізінде жоба үшін Kexi дерекқоры + Kexi 데이터베이스 파일 사용 프로젝트 + Kexi duomenų bazės failo tipo projektas + Kexi datubāzes faila balstīts projekts + Projekt bazy danych Kexi oparty na pliku + Proiect bazat pe fișiere al bazei de date Kexi + файловый проект базы данных Kexi + Datoteka projekta podatkovne zbirke Kexi + Kexi-databas för filbaserat projekt + проект файлової бази даних Kexi + Kexi 基于文件的数据库项目 + Kexi 資料庫檔案基礎專案 + + + + + Kexi database file-based project + مشروع قاعدة بيانات Kexi يعتمد على ملفات + Проект с база от данни — Kexi + projecte basat en fitxer de base de dades del Kexi + Projekt založený na souboru databáze Kexi + Filbaseret projekt for Kexidatabase + Dateibasiertes Kexi-Datenbankprojekt + proyecto basado en el archivo-base de datos Kexi + Kexi datu-baseko fitxategian oinarritutako proiektua + Kexi dátustovns fílugrundað verkætlan + projet de base de données Kexi en mode fichier + tionscadal bunachair sonraí Kexi bunaithe ar chomhaid + proxecto baseado no ficheiro-base de datos Kexi + פרויקט בסיס נתונים מבוסס-קובץ של Kexi + Kexi adatbázisfájl-alapú projekt + Projek berbasis berkas basis data Kexi + Progetto su file di database Kexi + Kexi データベース ファイルベースプロジェクト + Файл негізінде жоба үшін Kexi дерекқоры + Kexi 데이터베이스 파일 사용 프로젝트 + Kexi duomenų bazės failo tipo projektas + Kexi datubāzes faila balstīts projekts + Projekt bazy danych Kexi oparty na pliku + Proiect bazat pe fișiere al bazei de date Kexi + файловый проект базы данных Kexi + Datoteka projekta podatkovne zbirke Kexi + Kexi-databas för filbaserat projekt + проект файлової бази даних Kexi + Kexi 基于文件的数据库项目 + Kexi 資料庫檔案基礎專案 + + + + + + + KFormula formula + صيغة KFormula + Formuła KFormula + Формула — KFormula + fórmula de KFormula + Vzorec KFormula + KFormula-formel + KFormula-Formel + μαθηματικός τύπος KFormula + KFormula formula + KFormula-formulo + fórmula de KFormula + KFormula formula + KFormula-kaava + KFormula frymil + formule KFormula + foirmle KFormula + fórmula de KFormula + נוסחת KFormula + KFormula-képlet + Formula KFormula + Formula KFormula + KFormula 計算式 + KFormula формуласы + KFormula 수식 + KFormula formulė + KFormula formula + Formula KFormula + KFormula-formel + KFormula-formule + KFormula-formel + Formuła KFormula + fórmula KFormula + Fórmula do KFormula + Formulă KFormula + формула KFormula + Vzorec KFormula + Datoteka formule KFormula + Formulë KFormula + KFormula формула + KFormula-formel + формула KFormula + Công thức KFormula + KFormula 公式 + KFormula 公式 + + + + + + + + + + + + + + + + + KIllustrator drawing + تصميم KIllustrator + Rysunak KIllustrator + Чертеж — KIllustrator + dibuix de KIllustrator + Kresba KIllustrator + KIllustrator-tegning + KIllustrator-Zeichnung + σχέδιο KIllustrator + KIllustrator drawing + KIllustrator-grafikaĵo + dibujo de KIllustrator + KIllustrator marrazkia + KIllustrator-piirros + KIllustrator tekning + dessin KIllustrator + líníocht KIllustrator + debuxo de KIllustrator + ציור KIllustrator + KIllustrator-rajz + Gambar KIllustrator + Disegno KIllustrator + KIllustrator ドロー + KIllustrator суреті + KIllustrator 그림 + KIllustrator piešinys + KIllustrator zīmējums + Lukisan KIllustrator + KIllustrator-tegning + KIllustrator-tekening + KIllustrator-teikning + Rysunek KIllustrator + desenho KIllustrator + Desenho do KIllustrator + Desen KIllustrator + изображение KIllustrator + Kresba KIllustrator + Datoteka risbe KIllustrator + Vizatim KIllustrator + KIllustrator цртеж + KIllustrator-teckning + малюнок KIllustrator + Bản vẽ KIllustrator + KIllustrator 绘图 + KIllustrator 繪圖 + + + + + + + + + + + + Kivio flowchart + قائمة تدفق Kivio + Blok-schiema Kivio + Диаграма — Kivio + diagrama de flux de Kivio + Vývojový diagram Kivio + Kiviorutediagram + Kivio-Flussdiagramm + διάγραμμα ροής Kivio + Kivio flowchart + Kivo-fluskemo + diagrama de flujo de Kivio + Kivio diagrama + Kivio-vuokaavio + Kivio leiðarit + diagramme de flux Kivio + sreabhchairt Kivio + gráfica de fluxo de Kivio + תרשים זרימה של Kivio + Kivio-folyamatábra + Bagan Kivio + Diagramma di flusso Kivio + Kivio フローチャート + Kivio диаграммасы + Kivio 흐름도 + Kivio eigos diagrama + Kivio blokshēma + Cartalir Kivio + Kivio-flytdiagram + Kivio-stroomschema + Kivio-flytdiagram + Diagram przepływów Kivio + gráfico de fluxo Kivio + Fluxograma do Kivio + Diagramă Kivio + диаграмма Kivio + Vývojový diagram Kivio + Datoteka grafikona Kivio + Diagramë fluksi Kivio + Kivio дијаграм + Kivio-flödesschema + блок-схема Kivio + Lược đồ Kivio + Kivio 流程图 + Kivio 圖表 + + + + + + + + + + + + + + + + + Kontour drawing + تصميم Kontour + Rysunak Kontour + Чертеж — Kontour + dibuix de Kontour + Kresba Kontour + Kontourtegning + Kontour-Zeichnung + σχέδιο Kontour + Kontour drawing + Kontour-grafikaĵo + dibujo de Kontour + Kontour marrazkia + Kontour-piirros + Kontour tekning + dessin Kontour + líníocht Kontour + debuxo de Kontour + ציור Kontour + Kontour-rajz + Gambar Kontour + Disegno Kontour + Kontour ドロー + Kontour суреті + Kontour 그림 + Kontour piešinys + Kontour zīmējums + Lukisan Kontour + Kontour-tegning + Kontour-tekening + Kontour-teikning + Rysunek Kontour + desenho Kontour + Desenho do Kontour + Desen Kontour + изображение Kontour + Kresba Kontour + Datoteka risbe Kontour + Vizatim Kontour + Kontour цртеж + Kontour-teckning + малюнок Kontour + Bản vẽ Kontour + Kontour 绘图 + Kontour 繪圖 + + + + + + + + + + + + + + + + + KPovModeler scene + مشهد KPovModeler + Scena KPovModeler + Сцена — KPovModeler + escena de KPovModeler + Scéna KPovModeler + KPovModeler-scene + KPovModeler-Szene + σκηνή KPovModeler + KPovModeler scene + KPovModeler-sceno + escena de KPovModeler + KPovModeler eszena + KPovModeler-näkymä + KPovModeler leikmynd + scène KPovModeler + radharc KPovModeler + escena de KPovModeler + סצנת KPovModeler + KPovModeler-jelenet + Scene KPovModeler + Scena KPovModeler + KPovModeler シーン + KPovModeler сахнасы + KPovModeler 장면 + KPovModeler scena + KPovModeler aina + Babak KPovModeler + KPovModeler-scene + KPovModeler-scène + KPovModeler-scene + Scena KPovModeler + cenário KPovModeler + Cena do KPovModeler + Scenă KPovModeler + сцена KPovModeler + Scéna KPovModeler + Datoteka scene KPovModeler + Skenë KPovModeler + KPovModeler сцена + KPovModeler-scen + сцена KPovModeler + Cảnh KPovModeler + KPovModeler 场景 + KPovModeler 場景 + + + + + KPresenter presentation + عرض تقديمي KPresenter + Prezentacyja KPresenter + Презентация — KPresenter + presentació de KPresenter + Prezentace KPresenter + KPresenter-præsentation + KPresenter-Präsentation + παρουσίαση KPresenter + KPresenter presentation + KPresenter-prezentaĵo + presentación de KPresenter + Kpresenter aurkezpena + KPresenter-esitys + KPresenter framløga + présentation KPresenter + láithreoireacht KPresenter + presentación de KPresenter + מצגת KPresenter + KPresenter-bemutató + Presentasi KPresenter + Presentazione KPresenter + KPresenter プレゼンテーション + KPresenter презентациясы + KPresenter 프리젠테이션 + KPresenter pateiktis + KPresenter prezentācija + Persembahan Kpresenter + KPresenter-presentasjon + KPresenter-presentatie + KPresenter-presentasjon + Prezentacja KPresenter + apresentação KPresenter + Apresentação do KPresenter + Prezentare KPresenter + презентация KPresenter + Prezentácia KPresenter + Predstavitev KPresenter + Prezantim i KPresenter + KPresenter презентација + KPresenter-presentation + презентація KPresenter + Trình diễn KPresenter + KPresenter 演示文稿 + KPresenter 簡報檔 + + + + + + + + + + + + + + + + + + Krita document + مستند Krita + Dakument Krita + Документ — Krita + document de Krita + Dokument Krita + Kritadokument + Krita-Dokument + έγγραφο Krita + Krita document + Krita-dokumento + documento de Krita + Krita dokumentua + Krita-asiakirja + Krita skjal + document Krita + cáipéis Krita + documento de Krita + מסמך Krita + Krita-dokumentum + Dokumen Krita + Documento Krita + Krita ドキュメント + Krita құжаты + Krita 문서 + Krita dokumentas + Krita dokuments + Dokumen Krita + Krita-dokument + Krita-document + Krita-dokument + Dokument Krita + documento Krita + Documento do Krita + Document Krita + документ Krita + Dokument Krita + Dokument Krita + Dokument Krita + Krita документ + Krita-dokument + документ Krita + Tài liệu Krita + Krita 文档 + Krita 文件 + + + + + + + + + + + + + + + + + KSpread spreadsheet + جدول KSpread + Raźlikovy arkuš KSpread + Таблица — KSpread + full de càlcul de KSpread + Sešit KSpread + KSpread-regneark + KSpread-Tabelle + λογιστικό φύλλο KSpread + KSpread spreadsheet + KSpread-kalkultabelo + hoja de cálculo de KSpread + KSpread kalkulu-orria + KSpread-taulukko + KSpread rokniark + feuille de calcul KSpread + scarbhileog KSpread + folla de cálculo de KSpread + גליון נתונים של Kspread + KSpread-munkafüzet + Lembar sebar KSpread + Foglio di calcolo KSpread + KSpread スプレッドシート + KSpread электрондық кестесі + KSpread 스프레드시트 + KSpread skaičialentė + KSpread izklājlapa + Hamparan KSpread + KSpread-regneark + KSpread-rekenblad + KSpread-rekneark + Arkusz KSpread + folha de cálculo KSpread + Planilha do KSpread + Foaie de calcul KSpread + электронная таблица KSpread + Zošit KSpread + Razpredelnica KSpread + Fletë llogaritjesh KSpread + KSpread табеларни прорачун + KSpread-kalkylblad + ел. таблиця KSpread + Bảng tính KSpread + KSpread 工作簿 + KSpread 試算表 + + + + + + + + + + + + + + + + + KSpread spreadsheet (encrypted) + جدول KSpread (مشفر) + Raźlikovy arkuš KSpread (zašyfravany) + Таблица — KSpread, шифрирана + full de càlcul de KSpread (xifrat) + Sešit KSpread (šifrovaný) + KSpread-regneark (krypteret) + KSpread-Tabelle (verschlüsselt) + λογιστικό φύλλο KSpread (κρυπτογραφημένο) + KSpread spreadsheet (encrypted) + KSpread-kalkultabelo (ĉifrita) + hoja de cálculo de KSpread (cifrada) + KSpread kalkulu-orria (enkriptatua) + KSpread-taulukko (salattu) + KSpread rokniark (bronglað) + feuille de calcul KSpread (chiffrée) + scarbhileog KSpread (criptithe) + folla de cálculo de KSpread (cifrada) + גליון נתונים של KSpread (מוצפן) + KSpread-munkafüzet (titkosított) + Lembar sebar KSpread (terenkripsi) + Foglio di calcolo KSpread (cifrato) + KSpread (暗号化) スプレッドシート + KSpread электрондық кестесі (шифрленген) + 암호화된 KSpread 스프레드시트 + KSpread skaičialentė (užšifruota) + KSpread izklājlapa (šifrēta) + Hampatan KSpread (terenkripsi) + KSpread-regneark (kryptert) + KSpread-rekenblad (versleuteld) + Kryptert KSpread-rekneark + Arkusz KSpread (zaszyfrowany) + folha de cálculo KSpread (cifrada) + Planilha do KSpread (criptografada) + Foaie de calcul KSpread (criptat) + электронная таблица KSpread (зашифрованная) + Zošit KSpread (šifrovaný) + Razpredelnica KSpread (šifrirana) + Fletë llogaritjesh KSpread (e kriptuar) + KSpread табеларни прорачун (шифровани) + KSpread-kalkylblad (krypterat) + ел. таблиця KSpread (зашифрована) + Bảng tính KSpread (đã mật mã) + KSpread 加密工作簿 + KSpread 試算表 (已加密) + + + + + + + KSysV init package + حزمة KSysV init + Inicyjalny pakunak KSysV + Пакет — KSysV init + paquet d'inici KSysV + Balíček init KSysV + KSsV init-pakke + KSysV-Init-Paket + paquete de configuración de init para KSysV + KSysV hasieratzeko paketea + KSysV init -paketti + KSysV init pakki + paquet d'initialisation KSysV + pacáiste thosú KSysV + paquete de KsysV init + חבילת KSysV init + KSysV init csomag + Paket init KSysV + Pacchetto init KSysV + KSysV init パッケージ + KSysV инициализация дестесі + KSysV init 패키지 + KSysV init paketas + KSysV inicializācijas pakotne + KSysV init-pakke + KSysV-init-pakket + KSysV init-pakke + Pakiet KSysV init + Pacote init do KSysV + Pachet KSysV init + пакет инициализации KSysV + Balíček KSysV init + Datoteka paketa KSysV init + Paketë init KSysV + KSysV init-paket + пакунок KSysV init + Gói sở khởi KSysV + KSysV init 软件包 + KSysV init 套件 + + + + + + + + + Kugar document + مستند Kugar + Dakument Kugar + Документ — Kugar + document de Kugar + Dokument Kugar + Kugardokument + Kugar-Dokument + έγγραφο Kugar + Kugar document + Kugar-dokumento + documento de Kugar + Kugar dokumentua + Kugar-asiakirja + Kugar skjal + document Kugar + cáipéis Kugar + documento de Kugar + מסמך Kugar + Kugar-dokumentum + Dokumen Kugar + Documento Kugar + KuKrita ドキュメント + Kugar құжаты + Kugar 문서 + Kugar dokumentas + Kugar dokuments + Dokumen Kugar + Kugar-dokument + Kugar-document + Kugar-dokument + Dokument Kuguar + documento Kugar + Documento do Kugar + Document Kugar + документ Kugar + Dokument Kugar + Dokument Kugar + Dokument Kugar + Kugar документ + Kugar-dokument + документ Kugar + Tài liệu Kugar + Kugar 文档 + Kugar 文件 + + + + + KWord document + مستند KWord + Dakument KWord + Документ — KWord + document de KWord + Dokument KWord + Dogfen KWord + KWord-dokument + KWord-Dokument + έγγραφο KWord + KWord document + KWord-dokumento + documento de KWord + KWord dokumentua + KWord-asiakirja + KWord skjal + document KWord + cáipéis KWord + documento de KWord + מסמך KWord + KWord-dokumentum + Dokumen KWord + Documento KWord + KWord ドキュメント + KWord құжаты + KWord 문서 + KWord dokumentas + KWord dokuments + Dokumen KWord + KWord-dokument + KWord-document + KWord-dokument + Dokument KWord + documento KWord + Documento do KWord + Document KWord + документ KWord + Dokument KWord + Dokument KWord + Dokument KWord + KWord документ + KWord-dokument + документ KWord + Tài liệu KWord + KWord 文档 + KWord 文件 + + + + + + + + + + + + + + + + + + KWord document (encrypted) + مستند KWord (مشفر) + Dakument KWord (zašyfravany) + Документ — KWord, шифриран + document de KWord (xifrat) + Dokument KWord (šifrovaný) + KWord-dokument (krypteret) + KWord-Dokument (verschlüsselt) + έγγραφο KWord (κρυπτογραφημένο) + KWord document (encrypted) + KWord-dokumento (ĉifrita) + documento de KWord (cifrado) + KWord dokumentua (enkriptatua) + KWord-asiakirja (salattu) + KWord skjal (bronglað) + document KWord (chiffré) + cáipéis KWord (criptithe) + documento de KWord (cifrado) + מסמך KWord (מוצפן) + KWord-dokumentum (titkosított) + Dokumen KWord (terenkripsi) + Documento KWord (cifrato) + KWord (暗号化) ドキュメント + KWord құжаты (шифрленген) + 암호화된 KWord 문서 + KWord dokumentas (užšifruotas) + KWord dokuments (šifrēts) + Dokumen Kword (terenkripsi) + KWord-dokument (kryptert) + KWord-document (versleuteld) + Kryptert KWord-dokument + Dokument KWord (zaszyfrowany) + documento KWord (cifrado) + Documento do KWord (criptografado) + Document KWord (criptat) + документ KWord (зашифрованный) + Dokument KWord (šifrovaný) + Dokument KWord (šifriran) + Dokument KWord (i kriptuar) + KWord документ (шифровани) + KWord-dokument (krypterat) + документ KWord (зашифрований) + Tài liệu KWord (đã mật mã) + KWord 加密文档 + KWord 文件 (已加密) + + + + + + + LHA archive + أرشيف LHA + LHA arxivi + Archiŭ LHA + Архив — LHA + arxiu LHA + Archiv LHA + Archif LHA + LHA-arkiv + LHA-Archiv + αρχείο LHA + LHA archive + LHA-arkivo + archivador LHA + LHA artxiboa + LHA-arkisto + LHA skjalasavn + archive LHA + cartlann LHA + arquivo LHA + ארכיון LHA + LHA-archívum + Arsip LHA + Archivio LHA + LHA アーカイブ + LHA архиві + LHA 압축 파일 + LHA archyvas + LHA arhīvs + Arkib LHA + LHA-arkiv + LHA-archief + LHA-arkiv + Archiwum LHA + arquivo LHA + Pacote LHA + Arhivă LHA + архив LHA + Archív LHA + Datoteka arhiva LHA + Arkiv LHA + LHA архива + LHA-arkiv + архів LHA + Kho nén LHA + LHA 归档文件 + LHA 封存檔 + + + + + + + + + + + + + + + + + + + + LHZ archive + أرشيف LHZ + Archiŭ LHZ + Архив — LHZ + arxiu LHZ + Archiv LHZ + LHZ-arkiv + LHZ-Archiv + αρχείο LHZ + LHZ archive + LHZ-arkivo + archivador LHZ + LHZ artxiboa + LHZ-arkisto + LHZ skjalasavn + archive LHZ + cartlann LHZ + arquivo LHZ + ארכיון LHZ + LHZ-archívum + Arsip LHZ + Archivio LHZ + LHZ アーカイブ + LHZ архиві + LHZ 압축 파일 + LHZ archyvas + LHZ arhīvs + Arkib LHZ + LHZ-arkiv + LHZ-archief + LHZ-arkiv + Archiwum LHZ + arquivo LHZ + Pacote LZH + Arhivă LHZ + архив LHZ + Archív LHZ + Datoteka arhiva LHZ + Arkiv LHZ + LHZ архива + LHZ-arkiv + архів LHZ + Kho nén LHZ (LHA đã nén) + LHZ 归档文件 + LHZ 封存檔 + + + + + message catalog + كتالوج الرسالة + kataloh paviedamleńniaŭ + Каталог със съобщения + catàleg de missatges + Katalog zpráv + meddelelseskatalog + Nachrichtenkatalog + κατάλογος μηνυμάτων + message catalogue + katalogo de mesaĝoj + catálogo de mensajes + mezuen katalogoa + viestiluettelo + boðskrá + catalogue de messages + catalóg theachtaireachtaí + catálogo de mensaxes + קטלוג הודעות + üzenetkatalógus + katalog pesan + Catalogo di messaggi + メッセージカタログ + мәлімдемелер каталогы + 메시지 카탈로그 + laiškų katalogas + ziņojumu katalogs + Katalog mesej + meldingskatalog + berichtencatalogus + meldingskatalog + Katalog wiadomości + catálogo de mensagens + católogo de mensagens + catalog de mesaje + каталог сообщений + Katalóg správ + katalogov sporočil + Katallog mesazhesh + каталог порука + meddelandekatalog + каталог повідомлень + phân loại thông điệp + 消息库 + 訊息目錄 + + + + + + + + + LyX document + مستند LyX + Dakument LyX + Документ — LyX + document de LyX + Dokument LyX + LyX-dokument + LyX-Dokument + έγγραφο LyX + LyX document + LyX-dokumento + documento de LyX + LyX dokumentua + LyX-asiakirja + LyX skjal + document LyX + cáipéis LyX + documento LyX + מסמך Lyx + LyX-dokumentum + Dokumen LyX + Documento LyX + LyX ドキュメント + LyX құжаты + LyX 문서 + LyX dokumentas + LyX dokuments + Dokumen LyX + LyX-dokument + LyX-document + LyX-dokument + Dokument LyX + documento LyX + Documento LyX + Document LyX + документ LyX + Dokument LyX + Dokument LyX + Dokument LyX + LyX документ + LyX-dokument + документ LyX + Tài liệu LyX + LyX 文档 + LyX 文件 + + + + + + + + + + Lzip archive + أرشيف Lzip + Архив — lzip + arxiu lzip + Archiv Lzip + Lzip-arkiv + Lzip-Archiv + Lzip-arkivo + archivador Lzip + Lzip artxiboa + Lzip-arkisto + Lzip skjalasavn + archive lzip + cartlann Lzip + arquivo Lzip + ארכיון Lzip + Lzip archívum + Arsip Lzip + Archivio Lzip + Lzip アーカイブ + Lzip архиві + LZIP 압축 파일 + Lzip archyvas + Lzip arhīvs + Archiwum lzip + Arhivă Lzip + архив LZIP + Archív Lzip + Datoteka arhiva Lzip + Lzip-arkiv + архів lzip + Lzip 归档文件 + Lzip 封存檔 + + + + + + + + LZMA archive + أرشيف LZMA + Archiŭ LZMA + Архив — LZMA + arxiu LZMA + Archiv LZMA + LZHA-arkiv + LZMA-Archiv + LZMA-arkivo + archivador LZMA + LZMA artxiboa + LZMA-arkisto + LZMA skjalasavn + archive LZMA + cartlann LZMA + arquivo LZMA + ארכיון LZMA + LZMA-archívum + Arsip LZMA + Archivio LZMA + LZMA アーカイブ + LZMA архиві + LZMA 압축 파일 + LZMA archyvas + LZMA arhīvs + LZMA-arkiv + LZMA-archief + LZMA-arkiv + Archiwum LZMA + Pacote LZMA + Arhivă LZMA + архив LZMA + Archív LZMA + Datoteka arhiva LZMA + Arkiv LZMA + LZMA-arkiv + архів LZMA + Kho nén LZMA + LZMA 归档文件 + LZMA 封存檔 + LZMA + Lempel-Ziv-Markov chain-Algorithm + + + + + Tar archive (LZMA-compressed) + أرشيف Tar (مضغوط-LZMA) + Archiŭ tar (LZMA-skampresavany) + Архив — tar, компресиран с LZMA + arxiu tar (comprimit amb LZMA) + Archiv tar (komprimovaný pomocí LZMA) + Tar-arkiv (LZMA-komprimeret) + Tar-Archiv (LZMA-komprimiert) + archivador Tar (comprimido con LZMA) + Tar artxiboa (LZMA-rekin konprimitua) + Tar-arkisto (LZMA-pakattu) + Tar skjalasavn (LZMA-stappað) + archive tar (compression LZMA) + cartlann Tar (comhbhrúite le LZMA) + arquivo Tar (comprimido con LZMA) + ארכיון Tar (מכווץ ע"י LZMA) + Tar archívum (LZMA-val tömörítve) + Arsip Tar (terkompresi LZMA) + Archivio tar (compresso con LZMA) + Tar アーカイブ (LZMA 圧縮) + Tar архиві (LZMA-мен сығылған) + TAR 묶음 파일 (LZMA 압축) + Tar archyvas (suglaudintas su LZMA) + Tar arhīvs (saspiests ar LZMA) + Tar-arkiv (LZMA-komprimert) + Tar-archief (ingepakt met LZMA) + Tar-arkiv (pakka med LZMA) + Archiwum tar (kompresja LZMA) + Pacote tar (compactado com LZO) + Arhivă Tar (comprimată LZMA) + архив TAR (сжатый LZMA) + Archív tar (komprimovaný pomocou LZMA) + Datoteka arhiva Tar (stisnjen z LZMA) + Arkiv tar (i kompresuar me LZMA) + Tar-arkiv (LZMA-komprimerat) + архів tar (стиснений LZMA) + Kho nén tar (đã nén LZMA) + Tar 归档文件 (LZMA 压缩) + Tar 封存檔 (LZMA 格式壓縮) + + + + + + LZO archive + أرشيف LZO + Archiŭ LZO + Архив — LZO + arxiu LZO + Archiv LZO + LZO-arkiv + LZO-Archiv + αρχείο LZO + LZO archive + LZO-arkivo + archivador LZO + LZO artxiboa + LZO-arkisto + LZO skjalasavn + archive LZO + cartlann LZO + arquivo LZO + ארכיון LZO + LZO-archívum + Arsip LZO + Archivio LZO + LZO アーカイブ + LZO архиві + LZO 압축 파일 + LZO archyvas + LZO arhīvs + Arkib LZO + LZO-arkiv + LZO-archief + LZO-arkiv + Archiwum LZO + arquivo LZO + Pacote LZO + Arhivă LZO + архив LZO + Archív LZO + Datoteka arhiva LZO + Arkiv LZO + LZO архива + LZO-arkiv + архів LZO + Kho nén LZO + LZO 归档文件 + LZO 封存檔 + LZO + Lempel-Ziv-Oberhumer + + + + + + + + MagicPoint presentation + عرض تقديمي MagicPoint + Prezentacyja MagicPoint + Презентация — MagicPoint + presentació de MagicPoint + Prezentace MagicPoint + Cyflwyniad MagicPoint + MagicPoint-præsentation + MagicPoint-Präsentation + παρουσίαση MagicPoint + MagicPoint presentation + MagicPoint-prezentaĵo + presentación de MagicPoint + MagicPoint aurkezpena + MagicPoint-esitys + MagicPoint framløga + présentation MagicPoint + láithreoireacht MagicPoint + presentación de MagicPoint + מצגת MagicPoint + MagicPoint-bemutató + Presentasi MagicPoint + Presentazione MagicPoint + MagicPoint プレゼンテーション + MagicPoint презентациясы + MagicPoint 프리젠테이션 + MagicPoint pateiktis + MagicPoint prezentācija + Persembahan MagicPoint + MagicPoint-presentasjon + MagicPoint-presentatie + MagicPoint-presentasjon + Prezentacja programu MagicPoint + apresentação MagicPoint + Apresentação do MagicPoint + Prezentare MagicPoint + презентация MagicPoint + Prezentácia MagicPoint + Predstavitev MagicPoint + Prezantim MagicPoint + MagicPoint презентација + MagicPoint-presentation + презентація MagicPoint + Trình diễn MagicPoint + MagicPoint 演示文稿 + MagicPoint 簡報檔 + + + + + + Macintosh MacBinary file + ملف Macintosh MacBinary + Fajł Macintosh MacBinary + Файл — MacBinary + fitxer MacBinary de Macintosh + Soubor MacBinary pro Macintosh + Macintosh MacBinary-fil + Macintosh-MacBinary-Datei + εκτελέσιμο Macintosh MacBinary + Macintosh MacBinary file + MacBinary-dosiero de Macintosh + archivo de Macintosh MacBinary + Macintosh MacBinary fitxategia + Macintosh MacBinary -tiedosto + Macintosh MacBinary fíla + fichier Macintosh MacBinary + comhad Macintosh MacBinary + ficheiro MacBinary de Macintosh + קובץ בינארי של מקינטוש + Macintosh MacBinary-fájl + Berkas Macintosh MacBinary + File Macintosh MacBinary + MacBinary MacBinary ファイル + Macintosh MacBinary файлы + MacBinary 파일 + Macintosh MacBinary failas + Macintosh MacBinary fails + Fail MacBinary Macintosh + Macintosh MacBinary-fil + Macintosh MacBinary-bestand + Macintosh MacBinary-fil + Plik MacBinary Macintosh + ficheiro MacBinary de Macintosh + Arquivo do Macintosh MacBinary + Fișier Macintosh MacBinary + файл Macintosh MacBinary + Súbor pre Macintosh MacBinary + Izvedljiva dvojiška datoteka Macintosh MacBinary + File MacBinary Macintosh + Мекинтош MacBinary датотека + Macintosh MacBinary-fil + файл Macintosh MacBinary + Tập tin nhị phân MacBinary của Macintosh + Macintosh MacBinary 文件 + Macintosh MacBinary 檔 + + + + + + + Matroska stream + دفق Matroska + Płyń Matroska + Поток — Matroska + flux Matroska + Proud Matroska + Matroskastrøm + Matroska-Datenstrom + flujo Matroska + Matroska korrontea + Matroska-virta + Matroska streymur + flux Matroska + sruth Matroska + fluxo de Matroska + זרימת Matroska + Matroska adatfolyam + Stream Matroska + Stream Matroska + Matroska ストリーム + Matroska ағымы + 매트로스카 스트림 + Matroska srautas + Matroska straume + Matroska-stream + Matroska-straum + Strumień Matroska + Transmissão do Matroska + Flux Matroska + поток Matroska + Stream Matroska + Pretočni vir Matroska + Stream Matroska + Matroska-ström + потік даних Matroska + Luồng Matroska + Matroska 流 + Matroska 串流 + + + + + + + + + + + + + + Matroska video + Matroska مرئي + Videa Matroska + Видео — Matroska + vídeo Matroska + Video Matroska + Matroskavideo + Matroska-Video + βίντεο Matroska + Matroska video + Matroska-video + vídeo Matroska + Matroska bideoa + Matroska-video + Matroska video + vidéo Matroska + físeán Matroska + vídeo de Matroska + וידאו Matroska + Matroska-videó + Video Matroska + Video Matroska + Matroska 動画 + Matroska видеосы + 매트로스카 비디오 + Matroska vaizdo įrašas + Matroska video + Video Matroska + Matroska-film + Matroska-video + Matroska-video + Plik wideo Matroska + vídeo Matroska + Vídeo Matroska + Video Matroska + видео Matroska + Video Matroska + Video datoteka Matroska + Video Matroska + Матрошка видео + Matroska-video + відеокліп Matroska + Ảnh động Matroska + Matroska 视频 + Matroska 視訊 + + + + + Matroska audio + سمعي Matroska + Aŭdyjo Matroska + Аудио — Matroska + àudio Matroska + Zvuk Matroska + Matroskalyd + Matroska-Audio + Matroska-sondosiero + sonido Matroska + Matroska audioa + Matroska-ääni + Matroska ljóður + audio Matroska + fuaim Matroska + son de Matroska + שמע Matroska + Matroska hang + Audio Matroska + Audio Matroska + Matroska オーディオ + Matroska аудиосы + 매트로스카 오디오 + Matroska garso įrašas + Matroska audio + Matroska-lyd + Matroska-audio + Matroska-lyd + Plik dźwiękowy Matroska + Áudio do Matroska + Audio Matroska + аудио Matroska + Zvuk Matroska + Zvočna datoteka Matroska + Audio Matroska + Matroska-ljud + звук Matroska + Âm thanh Matroska + Matroska 音频 + Matroska 音訊 + + + + + WebM video + WebM مرئي + Видео — WebM + vídeo WebM + Video WebM + WebM-video + WebM-Video + WebM-video + vídeo WebM + WebM-video + WebM video + vidéo WebM + físeán WebM + vídeo WebM + וידאו WebM + WebM videó + Video WebM + Video WebM + WebM 動画 + WebM видеосы + WebM 비디오 + WebM vaizdo įrašas + WebM video + Plik wideo WebM + Video WebM + видео WebM + Video WebM + Video datoteka WebM + WebM-video + відео WebM + WebM 视频 + WebM 視訊 + + + + + + + + + + + + + + WebM audio + WebM سمعي + Аудио — WebM + àudio WebM + Zvuk WebM + WebM-lyd + WebM-Audio + WebM-sondosiero + sonido WebM + WebM-ääni + WebM ljóður + audio WebM + fuaim WebM + son WebM + שמע WebM + WebM hang + Audio WebM + Audio WebM + WebM オーディオ + WebM аудиосы + WebM 오디오 + WebM garso įrašas + WebM audio + Plik dźwiękowy WebM + Audio WebM + аудио WebM + Zvuk WebM + Zvočna datoteka WebM + WebM-ljud + звук WebM + WebM 音频 + WebM 音訊 + + + + MXF video + MXF مرئي + Видео — MXF + vídeo MXF + Video MXF + MXF-video + MXF-Video + MXF-video + vídeo MXF + MXF bideoa + MXF-video + MXF video + vidéo MXF + físeán MXF + vídeo MXF + וידאו MXF + MXF videó + Video MXF + Video MXF + MXF 動画 + MXF видеосы + MXF 비디오 + MXF vaizdo įrašas + MXF video + Plik wideo MXF + Video MXF + видео MXF + Video MXF + Video datoteka MXF + MXF-video + відеокліп MXF + MXF 视频 + MXF 視訊 + MXF + Material Exchange Format + + + + + + + + OCL file + ملف OCL + Fajł OCL + Файл — OCL + fitxer OCL + Soubor OCL + OCL-fil + OCL-Datei + OCL-dosiero + archivo OCL + OCL fitxategia + OCL-tiedosto + OCL fíla + fichier OCL + comhad OCL + ficheiro OCL + קובץ OCL + OCL fájl + Berkas OCL + File OCL + OCL ファイル + OCL файлы + OCL 파일 + OCL failas + OCL fails + OCL-fil + OCL-bestand + OCL-fil + Plik OCL + Arquivo OCL + Fișier OCL + файл OCL + Súbor OCL + Datoteka OCL + File OCL + OCL-fil + файл OCL + Tập tin OCL + OCL 文件 + OCL 檔 + OCL + Object Constraint Language + + + + + COBOL source file + Изходен код — COBOL + codi font en COBOL + Zdrojový soubor COBOL + COBOL-Quelldatei + COBOL-fontdosiero + Archivo fuente de COBOL + COBOL-lähdekoodi + fichier source COBOL + ficheiro fonte de COBOL + קובץ מקור של COBOL + COBOL forrásfájl + Berkas sumber COBOL + File sorgente COBOL + COBOL ソースファイル + COBOL бастапқы коды + COBOL 소스 파일 + COBOL pirmkods + Plik źródłowy COBOL + файл исходного кода на COBOL + Izvorna koda COBOL + COBOL-källkodsfil + вихідний код мовою COBOL + COBOL 源 + COBOL 源檔 + COBOL + COmmon Business Oriented Language + + + + + + Mobipocket e-book + Е-книга — Mobipocket + llibre electrònic Mobipocket + Elektronická kniha Mobipocket + Mobipocket E-Book + Libro electrónico Mobipocket + Mobipocket e-kirja + livre numérique Mobipocket + E-book Mobipocket + ספר אלקטרוני של Mobipocket + Mobipocket e-könyv + e-book Mobipocket + E-book Mobipocket + Mobipocket 電子書籍 + Mobipocket эл. кітабы + Mobipocket 이북 + Mobipocket e-grāmata + E-book Mobipocket + электронная книга Mobipocket + e-knjiga Mobipocket + електронна книга Mobipocket + Mobipocket e-book + + + + + + + + + + + + + + Adobe FrameMaker MIF document + مستند أدوبي الصانع للإطارات MIF + Dakument Adobe FrameMaker MIF + Документ — Adobe FrameMaker MIF + document de FrameMaker MIF d'Adobe + Dokument Adobe FrameMaker MIF + Adobe FrameMaker MIF-dokument + Adobe-FrameMaker-MIF-Dokument + MIF-dokumento de Adobe FrameMaker + documento MIF de Adobe FrameMaker + Adobe FrameMaker-en MIF dokumentua + Adobe FrameMaker MIF -asiakirja + Adobe FrameMaker MIF skjal + document MIF Adobe FrameMaker + cáipéis MIF Adobe FrameMaker + documento MIF de Adobe FrameMaker + מסמך MIF של Adobe FrameMaker + Adobe FrameMaker MIF-dokumentum + Dokumen Adobe FrameMaker MIF + Documento MIF Adobe FrameMaker + Adobe FrameMaker MIF ドキュメント + Adobe FrameMaker MIF құжаты + 어도비 프레임메이커 MIF 문서 + Adobe FrameMaker MIF dokumentas + Adobe FrameMaker MIF dokuments + Adobe FrameMaker MIF-dokument + Adobe FrameMaker MIF-document + Adobe FrameMaker MIF-dokument + Dokument MIF Adobe FrameMaker + Documento MIF do Adobe FrameMaker + Document Adobe FrameMaker MIF + документ Adobe FrameMaker MIF + Dokument Adobe FrameMaker MIF + Dokument Adobe FrameMaker MIF + Dokument MIF Adobe FrameMaker + Adobe FrameMaker MIF-dokument + документ Adobe FrameMaker MIF + Tài liệu Adobe FrameMaker MIF + Adobe FrameMaker MIF 文档 + Adobe FrameMaker MIF 文件 + + + + Mozilla bookmarks + علامات موزيلا + Zakładki Mozilla + Отметки — Mozilla + llista d'adreces d'interès de Mozilla + Záložky Mozilla + Mozillabogmærker + Mozilla-Lesezeichen + σελιδοδείκτες Mozilla + Mozilla bookmarks + Mozilla-legosignoj + marcadores de Mozilla + Mozillako laster-markak + Mozilla-kirjanmerkit + Mozilla bókamerki + marque-pages Mozilla + leabharmharcanna Mozilla + Marcadores de Mozilla + סמניה של Mozilla + Mozilla-könyvjelzők + Bookmark Mozilla + Segnalibri Mozilla + Mozilla ブックマーク + Mozilla бетбелгілері + 모질라 책갈피 + Mozilla žymelės + Mozilla grāmatzīmes + Tandabuku Mozilla + Mozilla-bokmerker + Mozilla-bladwijzers + Mozilla-bokmerker + Zakładki Mozilla + marcadores do Mozilla + Marcadores do Mozilla + Semne de carte Mozilla + закладки Mozilla + Záložky Mozilla + Datoteka zaznamkov Mozilla + Libërshënues Mozilla + Mozilla обележивачи + Mozilla-bokmärken + закладки Mozilla + Liên kết đã lưu Mozilla + Mozilla 书签 + Mozilla 書籤 + + + + + + + + + DOS/Windows executable + تنفيذي DOS/Windows + Vykonvalny fajł DOS/Windows + Изпълним файл — DOS/Windows + executable de DOS/Windows + Spustitelný soubor pro DOS/Windows + DOS-/Windowskørbar + DOS/Windows-Programm + εκτελέσιμο DOS/Windows + DOS/Windows executable + DOS/Windows-plenumebla + ejecutable de DOS/Windows + DOS/Windows-eko exekutagarria + DOS/Windows-ohjelma + DOS/Windows inningarfør + exécutable DOS/Windows + comhad inrite DOS/Windows + executábel de DOS/Windows + קובץ בר־הרצה של DOS/חלונות + DOS/Windows futtatható + DOS/Windows dapat dieksekusi + Eseguibile DOS/Windows + DOS/Windows 実行ファイル + DOS/Windows орындалатын файлы + DOS/윈도우 실행파일 + DOS/Windows vykdomasis failas + DOS/Windows izpildāmais + Bolehlaksana DOS/Windows + Kjørbar fil for DOS/Windows + DOS/Windows-uitvoerbaar bestand + DOS/Windows køyrbar fil + Program DOS/Windows + executável DOS/Windows + Executável do DOS/Windows + Executabil DOS/Windows + исполняемый файл DOS/Windows + Spustiteľný súbor pre DOS/Windows + Izvedljiva datoteka DOS/Windows + I ekzekutueshëm DOS/Windows + ДОС/Виндоуз извршна датотека + Körbar DOS/Windows-fil + виконуваний файл DOS/Windows + Tập tin có thực hiện được DOS/Windows + DOS/Windows 可执行文件 + DOS/Windows 可執行檔 + + + + + + + + Internet shortcut + اختصار الإنترنت + Sieciŭnaja spasyłka + Адрес в Интернет + drecera d'Internet + Odkaz do Internetu + Internetgenvej + Internet-Verweis + acceso directo a Internet + Interneteko lasterbidea + Internet-pikakuvake + Alnetssnarvegur + raccourci Internet + aicearra Idirlín + atallo de Internet + קיצור דרך של האינטרנט + Internetes indítóikon + Jalan pintas Internet + Scorciatoia Internet + インターネットショートカット + Интернет сілтемесі + 인터넷 단축아이콘 + Interneto nuoroda + Interneta īsceļš + Internettsnarvei + internetkoppeling + Internett-snarveg + Skrót internetowy + Atalho da internet + Scurtătură Internet + Интернет-ссылка + Internetový odkaz + Internetna bližnjica + Shkurtim internet + Internetgenväg + інтернет-посилання + Lối tắt Internet + Internet 快捷方式 + 網際網路捷徑 + + + + + + + + + + WRI document + مستند WRI + Dakument WRI + Документ — WRI + document WRI + Dokument WRI + WRI-dokument + WRI-Dokument + WRI document + WRI-dokumento + documento WRI + WRI dokumentua + WRI-asiakirja + WRI skjal + document WRI + cáipéis WRI + documento WRI + מסמך WRI + WRI dokumentum + Dokumen WRI + Documento WRI + WRI ドキュメント + WRI құжаты + WRI 문서 + WRI dokumentas + WRI dokuments + WRI-dokument + WRI-document + WRI-dokument + Dokument WRI + Documento WRI + Document WRI + документ WRI + Dokument WRI + Dokument WRI + Dokument WRI + WRI-dokument + документ WRI + Tài liệu WRI + WRI 文档 + WRI 文件 + + + + + MSX ROM + MSX ROM + MSX ROM + ROM — MSX + ROM de MSX + ROM pro MSX + ROM MSX + MSX-rom + MSX-ROM + εικόνα μνήμης ROM MSX + MSX ROM + MSX-NLM + ROM de MSX + MSX-ko ROMa + MSX-ROM + MSX ROM + ROM MSX + ROM MSX + ROM de MSX + MSX ROM + MSX ROM + Memori baca-saja MSX + ROM MSX + MSX ROM + MSX ROM + MSX 롬 + MSX ROM + MSX ROM + ROM MSX + MSX-ROM + MSX-ROM + MSX-ROM + Plik ROM konsoli MSX + ROM MSX + ROM do MSX + ROM MSX + MSX ROM + ROM pre MSX + Bralni pomnilnik MSX + ROM MSX + MSX ром + MSX-rom + ППП MSX + ROM MSX + MSX ROM + MSX ROM + + + + + M4 macro + M4 macro + Makras M4 + Макроси — M4 + macro M4 + Makro M4 + M4-makro + M4-Makro + M4 macro + macro M4 + M4 makroa + M4-makro + M4 fjølvi + macro M4 + macra M4 + macro M4 + מאקרו M4 + M4 makró + Makro M4 + Macro M4 + M4 マクロ + M4 макросы + M4 매크로 + M4 macro + M4 makross + M4-makro + M4-macro + M4-makro + Makro M4 + Macro M4 + Macro M4 + макрос M4 + Makro M4 + Makro datoteka M4 + Macro M4 + M4-makro + макрос M4 + Vĩ lệnh M4 + M4 宏 + M4 巨集 + + + + + + Nintendo64 ROM + Nintendo64 ROM + Nintendo64 ROM + ROM — Nintendo64 + ROM de Nintendo64 + ROM pro Nintendo64 + Nintendo64-rom + Nintendo64-ROM + εικόνα μνήμης ROM Nintendo64 + Nintendo64 ROM + Nintendo64-NLM + ROM de Nintendo64 + Nintendo64-ko ROMa + Nintendo64-ROM + Nintendo64 ROM + ROM Nintendo64 + ROM Nintendo64 + ROM de Nintendo64 + ROM של Nןמאקמגם64 + Nintendo64 ROM + Memori baca-saja Nintendo64 + ROM Nintendo64 + Nintendo64 ROM + Nintendo64 ROM + 닌텐도 64 롬 + Nintendo64 ROM + Nintendo64 ROM + ROM Nintendo64 + Nintendo64-ROM + Nintendo64-ROM + Nintendo64-ROM + Plik ROM konsoli Nintendo64 + ROM Nintendo64 + ROM do Nintendo64 + ROM Nintendo64 + Nintendo64 ROM + ROM pre Nintendo64 + Bralni pomnilnik Nintendo64 + ROM Nintendo64 + Нинтендо64 РОМ + Nintendo64-rom + ППП Nintendo64 + ROM Nintendo64 + Nintendo64 ROM + Nintendo64 ROM + + + + + Nautilus link + وصلة Nautilus + Nautilus körpüsü + Spasyłka Nautilus + Връзка — Nautilus + enllaç de Nautilus + Odkaz Nautilus + Cyswllt Nautilus + Nautilus-henvisning + Nautilus-Verknüpfung + σύνδεσμος Nautilus + Nautilus link + Nautilus-ligilo + enlace de Nautilus + Nautilus esteka + Nautilus-linkki + Nautilus leinkja + lien Nautilus + nasc Nautilus + ligazón de nautilus + קישור של Nautilus + Nautilus-link + Taut Nautilus + Collegamento Nautilus + Nautilus リンク + Nautilus сілтемесі + 노틸러스 링크 + Nautilus nuoroda + Nautilus saite + Pautan Nautilus + Nautilus-lenke + Nautilus-verwijzing + Nautilus-lenke + Odnośnik Nautilus + atalho Nautilus + Link do Nautilus + Legătură Nautilus + ссылка Nautilus + Odkaz Nautilus + Datoteka povezave Nautilus + Lidhje Nautilus + Наутилус веза + Nautiluslänk + посилання Nautilus + Liên kết Nautilus + Nautilus 链接 + Nautilus 鏈結 + + + + + + + + + NES ROM + NES ROM + NES ROM + ROM — NES + ROM de NES + ROM pro NES + ROM NES + NES-rom + NES-ROM + εικόνα μνήμης ROM NES + NES ROM + NES-NLM + ROM de NES + NES-eko ROMa + NES-ROM + NES ROM + ROM NES + ROM NES + ROM de NES + ROM של NES + NES ROM + Memori baca-saja NES + ROM NES + ファミコン ROM + NES ROM + NES 롬 + NES ROM + NES ROM + ROM NES + NES ROM + Nintendo + NES-ROM + Plik ROM konsoli NES + ROM NES + ROM do NES + ROM NES + NES ROM + ROM pre NES + Bralni pomnilnik NES + ROM NES + NES ром + NES-rom + ППП NES + ROM NES + NES ROM + 任天堂 ROM + + + + + Unidata NetCDF document + مستند Unidata NetCDF + Dakument Unidata NetCDF + Документ — Unidata NetCDF + document Unidata NetCDF + Dokument Unidata NetCDF + Unidata NetCDF-dokument + Unidata-NetCDF-Dokument + έγγραφο Unidata NetCDF + Unidata NetCDF document + dokumento en NetCDF-formato de Unidata + documento de Unidata NetCDF + Unidata NetCDF dokumentua + Unidata NetCDF -asiakirja + Unidata NetCDF skjal + document Unidata NetCDF + cáipéis Unidata NetCDF + Documentno de Unixdata NetCDF + מסמך של Unidata NetCDF + Unidata NetCDF-dokumentum + Dokumen Unidata NetCDF + Documento Unidata NetCDF + Unidata NetCDF ドキュメント + Unidata NetCDF құжаты + Unidata NetCDF 문서 + Unidata NetCDF dokumentas + Unidata NetCDF dokuments + Dokumen Unidata NetCDF + Unidata NetCDF-dokument + Unidata NetCDF-document + Unidata netCDF-dokument + Dokument Unidata NetCDF + documento Unidata NetCDF + Documento do Unidata NetCDF + Document Unidata NetCDF + документ Unidata NetCDF + Dokument Unidata NetCDF + Dokument Unidata NetCDF + Dokument Unidata NetCDF + Unidata NetCDF документ + Unidata NetCDF-dokument + документ Unidata NetCDF + Tài liệu NetCDF Unidata + Unidata NetCDF 文档 + Unidata NetCDF 文件 + NetCDF + Network Common Data Form + + + + + + NewzBin usenet index + Индекс — Usenet, NewzBin + índex d'Usenet NewzBin + Index NewzBin diskuzních skupin Usenet + Índice NewzBin de usenet + index usenet + Índice de usenet NEwzBin + אינדקס שרתי חדשות NewzBin + Indeks usenet NewzBin + Indice Usenet NewzBiz + NewzBin Usenet インデックス + NewzBin usenet индексі + NewzBin usenet rādītājs + Indeks grup dyskusyjnych NewzBin + индекс usenet NewzBin + Kazalo usenet NewzBin + покажчик usenet NewzBin + + + + + + + + object code + رمز الكائن + abjektny kod + Обектен код + codi objecte + Objektový kód + objektkode + Objekt-Code + μεταφρασμένος κώδικας + object code + celkodo + código objeto + objektu kodea + objektikoodi + code objet + cód réada + código obxecto + קוד אובייקט + tárgykód + kode object + Codice oggetto + オブジェクトコード + объектті коды + 개체 코드 + objektinis kodas + objekta kods + Kod objek + objektkode + objectcode + objektkode + Kod obiektowy + código de objecto + código objeto + cod sursă obiect + объектный код + Objektový kód + predmetna koda + Kod objekti + објектни ко̂д + objektkod + об'єктний код + mã đối tượng + 目标代码 + 目的碼 + + + + + + + + + + + + + + + + + Annodex exchange format + صيغة Annodex البديلة + Формат за обмяна — Annodex + format d'intercanvi Annodex + Výměnný formát Annodex + Udvekslingsformat for Annodex + Annodex-Wechselformat + formato de intercambio Annodex + Annodex trukatze-formatua + Annodex-siirtomuoto + Annodex umbýtingarsnið + format d'échange Annodex + formáid mhalairte Annodex + formato intercambiábel de Annodex + פורמט החלפת Annodex + Annodex csereformátum + Format pertukaran Annodex + Formato di scambio Annodex + Annodex 交換フォーマット + Annodex алмасу пішімі + Annodex 교환 형식 + Annodex mainų formatas + Annodex apmaiņas formāts + Annodex-exchange + Format wymiany Annodex + Formato de troca Annodex + Format schimb Annodex + формат обмена Annodex + Formát pre výmenu Annodex + Izmenjalna datoteka Annodex + Annodex-utväxlingsformat + формат обміну даними Annodex + Định dạng trao đổi Annodex + Annodex 交换格式 + Annodex 交換格式 + + + + + + + + + + + + + Annodex Video + Annodex مرئي + Видео — Annodex + Annodex Video + Annodex Video + Annodexvideo + Annodex-Video + Annodex-video + vídeo Annodex + Annodex bideoa + Annodex-video + Annodex video + vidéo Annodex + físeán Annodex + vídeo de Annodex + וידאו Annodex + Annodex videó + Video Annodex + Video Annodex + Annodex 動画 + Annodex видеосы + Annodex 비디오 + Annodex vaizdo įrašas + Annodex video + Annodex Video + Plik wideo Annodex + Vídeo Annodex + Video Annodex + видео Annodex + Video Annodex + Video datoteka Annodex + Annodex-video + відеокліп Annodex + Ảnh động Annodex + Annodex 视频 + Annodex 視訊 + + + + + + + + + + + + + Annodex Audio + Annodex سمعي + Аудио — Annodex + Annodex Audio + Annodex Audio + Annodexlyd + Annodex-Audio + Annodex-sondosiero + sonido Annodex + Annodex audioa + Annodex-ääni + Annodex ljóður + audio Annodex + fuaim Annodex + son de Annodex + שמע Annodex + Annodex hang + Audio Annodex + Audio Annodex + Annodex オーディオ + Annodex аудиосы + Annodex 오디오 + Annodex garso įrašas + Annodex audio + Annodex Audio + Plik dźwiękowy Annodex + Áudio Annodex + Audio Annodex + аудио Annodex + Zvuk Annodex + Zvočna datoteka Annodex + Annodex-ljud + звук Annodex + Âm thanh Annodex + Annodex 音频 + Annodex 音訊 + + + + + + + + + + + + + Ogg multimedia file + ملف وسائط متعددة Ogg + Multymedyjny fajł Ogg + Мултимедия — Ogg + fitxer Ogg multimèdia + Soubor multimédií Ogg + Ogg multimedie-fil + Ogg-Multimediadatei + archivo multimedia Ogg + Ogg multimediako fitxategia + Ogg-multimediatiedosto + Ogg margmiðlafíla + fichier multimédia Ogg + comhad ilmheán Ogg + ficheiro multimedia Ogg + קובץ מולטימדיה Ogg + Ogg multimédiafájl + Berkas multimedia Ogg + File multimediale Ogg + Ogg マルチメディアファイル + Ogg мультимедиа файлы + Ogg 멀티미디어 파일 + Ogg multimedijos failas + Ogg multimediju fails + Ogg-multimediafil + Ogg-multimediabestand + Ogg multimediafil + Plik multimedialny Ogg + Arquivo multimídia Ogg + Fișier multimedia Ogg + мультимедийный файл Ogg + Súbor multimédií Ogg + Večpredstavnostna datoteka Ogg + File multimedial Ogg + Ogg-multimediafil + мультимедійний файл Ogg + Tập tin đa phương tiện Ogg + Ogg 多媒体文件 + Ogg 多媒體檔案 + + + + + + + + + Ogg Audio + Ogg سمعي + Aŭdyjo Ogg + Аудио — Ogg + àudio Ogg + Zvuk Ogg + Ogg-lyd + Ogg-Audio + sonido Ogg + Ogg audioa + Ogg-ääni + Ogg ljóður + audio Ogg + fuaim Ogg + son Ogg + שמע Ogg + Ogg hang + Audio Ogg + Audio Ogg + Ogg オーディオ + Ogg аудиосы + Ogg 오디오 + Ogg garso įrašas + Ogg audio + Ogg lyd + Ogg-audio + Ogg-lyd + Plik dźwiękowy Ogg + Áudio Ogg + Audio Ogg + аудио Ogg + Zvuk Ogg + Zvočna datoteka Ogg + Audio Ogg + Ogg-ljud + звук ogg + Âm thanh Ogg + Ogg 音频 + Ogg 音訊 + + + + + + + + + + + Ogg Video + Ogg مرئي + Videa Ogg + Видео — Ogg + vídeo Ogg + Video Ogg + Ogg-video + Ogg-Video + vídeo Ogg + Ogg bideoa + Ogg-video + Ogg Video + vidéo Ogg + físeán Ogg + vídeo Ogg + וידאו Ogg + Ogg videó + Video Ogg + Video Ogg + Ogg 動画 + Ogg видеосы + Ogg 비디오 + Ogg vaizdo įrašas + Ogg video + Ogg video + Ogg-video + Ogg-video + Plik wideo Ogg + Vídeo Ogg + Video Ogg + видео Ogg + Video Ogg + Video datoteka Ogg + Video Ogg + Ogg-video + відеокліп ogg + Ảnh động Ogg + Ogg 视频 + Ogg 視訊 + + + + + + + + + Ogg Vorbis audio + Ogg Vorbis سمعي + Ogg Vorbis audio faylı + Aŭdyjo Ogg Vorbis + Аудио — Ogg Vorbis + àudio Ogg Vorbis + Zvuk Ogg Vorbis + Sain Ogg Vorbis + Ogg Vorbis-lyd + Ogg-Vorbis-Audio + ήχος Ogg Vobris + Ogg-Vorbis-sondosiero + sonido Ogg Vorbis + Ogg Vorbis audioa + Ogg Vorbis -ääni + Ogg Vorbis ljóður + audio Ogg Vorbis + fuaim Ogg Vorbis + son Ogg Vorbis + שמע Ogg Vorbis + Ogg Vorbis hang + Audio Ogg Vorbis + Audio Ogg Vorbis + Ogg Vorbis オーディオ + Ogg Vorbis аудиосы + Ogg Vorbis 오디오 + Ogg Vorbis garso įrašas + Ogg Vorbis audio + Audio Ogg Vorbis + Ogg Vorbis lyd + Ogg Vorbis-audio + Ogg Vorbis-lyd + Plik dźwiękowy Ogg Vorbis + áudio Ogg Vorbis + Áudio do Ogg Vorbis + Audio Ogg Vorbis + аудио Ogg Vorbis + Zvuk Ogg Vorbis + Zvočna datoteka Ogg Vorbis + Audio Ogg Vorbis + Ог-ворбис звучни запис + Ogg Vorbis-ljud + звук ogg Vorbis + Âm thanh Vorbis Ogg + Ogg Vorbis 音频 + Ogg Vorbis 音訊 + + + + + + + + + + + + Ogg FLAC audio + Ogg FLAC سمعي + Aŭdyjo Ogg FLAC + Аудио — Ogg FLAC + àudio Ogg FLAC + Zvuk Ogg FLAC + Ogg FLAC-lyd + Ogg-FLAC-Audio + sonido Ogg FLAC + Ogg FLAC audioa + Ogg FLAC -ääni + Ogg FLAC ljóður + audio Ogg FLAC + fuaim Ogg FLAC + son Ogg FLAC + שמע Ogg FLAC + Ogg FLAC hang + Audio Ogg FLAC + Audio Ogg FLAC + Ogg FLAC オーディオ + Ogg FLAC аудиосы + Ogg FLAC 오디오 + Ogg FLAC garso įrašas + Ogg FLAC audio + Ogg FLAC-lyd + Ogg FLAC-audio + Ogg FLAC-lyd + Plik dźwiękowy Ogg FLAC + Áudio FLAC Ogg + Audio Ogg FLAC + аудио Ogg FLAC + Zvuk Ogg FLAC + Zvočna datoteka Ogg FLAC + Audio Ogg FLAC + Ogg FLAC-ljud + звук ogg FLAC + Âm thanh FLAC Ogg + Ogg FLAC 音频 + Ogg FLAC 音訊 + + + + + + + + + + + + + + Ogg Speex audio + Ogg Speex سمعي + Aŭdyjo Ogg Speex + Аудио — Ogg Speex + àudio Ogg Speex + Zvuk Ogg Speex + Ogg Speex-lyd + Ogg-Speex-Audio + sonido Ogg Speex + Ogg Speex audioa + Ogg Speex -ääni + Ogg Speex ljóður + audio Ogg Speex + fuaim Ogg Speex + son Ogg Speex + שמע Ogg Speex + Ogg Speex hang + Audio Ogg Speex + Audio Ogg Speex + Ogg Speex オーディオ + Ogg Speex аудиосы + Ogg Speex 오디오 + Ogg Speex garso įrašas + Ogg Speex audio + Ogg Speex lyd + Ogg Speex-audio + Ogg Speex-lyd + Plik dźwiękowy Ogg Speex + Áudio Speex Ogg + Audio Ogg Speex + аудио Ogg Speex + Zvuk Ogg Speex + Zvočna datoteka Ogg Speex + Audio Ogg Speex + Ogg Speex-ljud + звук ogg Speex + Âm thanh Speex Ogg + Ogg Speex 音频 + Ogg Speex 音訊 + + + + + + + + + + Speex audio + Speex سمعي + Aŭdyjo Speex + Аудио — Speex + àudio Speex + Zvuk Speex + Speexlyd + Speex-Audio + sonido Speex + Speex audioa + Speex-ääni + Speex ljóður + audio Speex + fuaim Speex + son Speex + שמע של Speex + Speex hang + Audio Speex + Audio Speex + Speex オーディオ + Speex аудиосы + Speex 오디오 + Speex garso įrašas + Speex audio + Speex lyd + Speex-audio + Speex-lyd + Plik dźwiękowy Speex + Áudio Speex + Audio Speex + аудио Speex + Zvuk Speex + Zvočna datoteka Speex + Audio Speex + Speex-ljud + звук Speex + Âm thanh Speex + Speex 音频 + Speex 音訊 + + + + + + + Ogg Theora video + Ogg Theora مرئي + Videa Ogg Theora + Видео — Ogg Theora + vídeo Ogg Theora + Video Ogg Theora + Ogg Theora-video + Ogg-Theora-Video + vídeo Ogg Theora + Ogg Theora bideoa + Ogg Theora -video + Ogg Theora video + vidéo Ogg Theora + físeán Ogg Theora + vídeo Ogg Theora + שמע Ogg Theora + Ogg Theora videó + Video Ogg Theora + Video Ogg Theora + Ogg Theora 動画 + Ogg Theora видеосы + Ogg Theora 비디오 + Ogg Theora vaizdo įrašas + Ogg Theora video + Ogg Theora video + Ogg Theora-video + Ogg Theora-video + Plik wideo Ogg Theora + Vídeo do Ogg Theora + Video Ogg Theora + видео Ogg Theora + Video Ogg Theora + Video datoteka Ogg Theora + Video Ogg Theora + Ogg Theora-video + відеокліп ogg Theora + Ảnh động Theora Ogg + Ogg Theora 视频 + Ogg Theora 視訊 + + + + + + + + + + + OGM video + OGM مرئي + Videa OGM + Видео — OGM + vídeo OGM + Video OGM + OGM-video + OGM-Video + OGM-video + vídeo OGM + OGM bideoa + OGM-video + OGM video + vidéo OGM + físeán OGM + vídeo OGM + וידאו OGM + OGM-videó + Video OGM + Video OGM + OGM 動画 + OGM видеосы + OGM 비디오 + OGM vaizdo įrašas + OGM video + OGM-film + OGM-video + OGM-video + Plik wideo OGM + Vídeo OGM + Video OGM + видео OGM + Video OGM + Video datoteka OGM + Video OGM + OGM-video + відеокліп OGM + Ảnh động OGM + OGM 视频 + OGM 視訊 + + + + + + + + + + + + OLE2 compound document storage + تخزين مجمع مستند OLE2 + Schovišča dla kampanentaŭ dakumentu OLE2 + Съставен документ-хранилище — OLE2 + emmagatzematge de documents composats OLE2 + Úložiště složeného dokumentu OLE2 + OLE2-sammensat dokumentlager + OLE2-Verbunddokumentenspeicher + αρχείο συμπαγούς αποθήκευσης εγγράφων OLE2 + OLE2 compound document storage + OLE2-deponejo de parentezaj dokumentoj + almacenamiento de documentos compuestos OLE2 + OLE2 konposatutako dokumentu-bilduma + OLE2-yhdisteasiakirjatallenne + OLE2 samansett skjalagoymsla + document de stockage composé OLE2 + stóras cháipéisí comhshuite OLE2 + almacenamento de documento composto OLE2 + אחסון מסמך משותף OLE2 + OLE2 összetett dokumentumtároló + penyimpan dokumen kompon OLE2 + Memorizzazione documento composto OLE2 + OLE2 複合ドキュメントストレージ + OLE2 құрама құжаттар қоймасы + OLE2 복합 문서 + OLE2 sudėtinių dokumentų laikmena + OLE2 savienoto dokumentu glabātuve + Storan dokumen halaman OLE2 + OLE-lager for sammensatte dokumenter + OLE2-samengestelde documentopslag + OLE2 lager for samansett dokument + Magazyn dokumentu złożonego OLE2 + armazenamento de documento composto OLE2 + Armazenamento de documento composto OLE2 + Document de stocare compus OLE2 + хранилище составных документов OLE2 + Úložisko zloženého dokumentu OLE2 + Združeni dokument OLE2 + Arkiv dokumenti i përbërë OLE2 + ОЛЕ2 сједињени документ + Sammansatt OLE2-dokumentlager + сховище складних документів OLE2 + Kho lưu tài liệu ghép OLE2 + OLE2 组合文档存储 + OLE2 複合文件儲存 + + + + + + + + Windows Installer package + حزمة مثبّت ويندوز + Pakunak Windows Installer + Пакет — инсталация за Windows + paquet de Windows Installer + Balíček Windows Installer + Windows Installer-pakke + Windows Installationspaket + paquete de instalación de Windows + Windows-eko pakete instalatzailea + Windows-asennuspaketti + Windows innleggingarpakki + paquet d'installation Windows + pacáiste Windows Installer + paquete de instalación de Windows + חבילה של Windows Installer + Windows Installer csomag + Paket Windows Installer + Pacchetto Windows Installer + Windodws インストーラパッケージ + Windows Installer дестесі + 윈도우 설치 패키지 + Windows Installer paketas + Windows Installer pakotne + Windows-installatiepakket + Windows Installer-pakke + Pakiet instalatora Windows + Pacote do instalador do Windows + Pachet instalator Windows + пакет Windows Installer + Balík Windows Installer + Datoteka paketa Windows namestilnika + Paketë Windows Installer + Windows Installer-paket + пакунок Windows Installer + Gói cài đặt Windows + Windows 程序安装包 + Windows Installer 套件 + + + + + GNU Oleo spreadsheet + جدول جنو Oleo + Raźlikovy arkuš GNU Oleo + Таблица — GNU Oleo + full de càlcul de GNU Oleo + Sešit GNU Oleo + GNU Oleo-regneark + GNU-Oleo-Tabelle + λογιστικό φύλλο GNU Oleo + GNU Oleo spreadsheet + Kalkultabelo de GNU Oleo + hoja de cálculo de GNU Oleo + GNU Oleo kalkulu-orria + GNU Oleo -taulukko + GNU Oleo rokniark + feuille de calcul GNU Oleo + scarbhileog GNU Oleo + folla de cálculo de Oleo GNU + גליון נתונים של GNU Oleo + GNU Oleo-munkafüzet + Lembar sebar GNU Oleo + Foglio di calcolo GNU Oleo + GNU Oleo スプレッドシート + GNU Oleo электрондық кестесі + GNU Oleo 스프레드시트 + GNU Oleo skaičialentė + GNU Oleo izklājlapa + Hamparan GNU Oleo + GNU Oleo regneark + GNU Oleo-rekenblad + GNU Oleo-rekneark + Arkusz GNU Oleo + folha de cálculo GNU Oleo + Planilha do GNU Oleo + Foaie de calcul GNU Oleo + электронная таблица GNU Oleo + Zošit GNU Oleo + Razpredelnica GNU Oleo + Fletë llogaritje GNU Oleo + ГНУ Oleo табеларни прорачун + GNU Oleo-kalkylblad + ел. таблиця GNU Oleo + Bảng tính Oleo của GNU + GNU Oleo 工作簿 + GNU Oleo 試算表 + + + + + + + + PAK archive + أرشيف PAK + Archiŭ PAK + Архив — PAK + arxiu PAK + Archiv PAK + PAK-arkiv + PAK-Archiv + PAK-arkivo + archivador PAK + PAK artxiboa + PAK-arkisto + PAK skjalasavn + archive PAK + cartlann PAK + arquivo PAK + ארכיון PAK + PAK-archívum + Arsip PAK + Archivio PAK + PAK アーカイブ + PAK архиві + PAK 묶음 파일 + PAK archyvas + PAK arhīvs + PAK-arkiv + PAK-archief + PAK-arkiv + Archiwum PAK + Pacote PAK + Arhivă PAK + архив PAK + Archív PAK + Datoteka arhiva PAK + Arkiv PAK + PAK-arkiv + архів PAK + Kho nén PAK + AR 归档文件 + PAK 封存檔 + + + + + + + + Palm OS database + قاعدة بيانات Palm OS + Palm OS mə'lumat bazası + Baza źviestak Palm OS + База от данни — Palm OS + base de dades Palm OS + Databáze Palm OS + Cronfa Ddata Palm OS + Palm OS-database + Palm-OS-Datenbank + βάση δεδομένων Palm OS + Palm OS database + datumbazo de Palm OS + base de datos de Palm OS + Palm OS datu-basea + Palm OS -tietokanta + Palm OS dátustovnur + base de données Palm OS + bunachar sonraí Palm OS + base de datos de Palm OS + מסד נתונים של Palm OS + Palm OS-adatbázis + Basis data Palm OS + Database Palm OS + Palm OS データベース + Palm OS дерекқоры + 팜OS 데이터베이스 + Palm OS duomenų bazė + Palm OS datubāze + Pangkalandata PalmOS + Palm OS-database + Palm OS-gegevensbank + Palm OS-database + Baza danych Palm OS + base de dados do Palm OS + Banco de dados do Palm OS + Bază de date Palm OS + база данных Palm OS + Databáza Palm OS + Podatkovna zbirka Palm OS + Bankë me të dhëna Palm OS + Palm OS база података + Palm OS-databas + база даних Palm OS + Cơ sở dữ liệu PalmOS + Palm OS 数据库 + Palm OS 資料庫 + + + + + + Parchive archive + أرشيف Parchive + Archiŭ Parchive + Архив — parchive + arxiu Parchive + Archiv Parchive + Parchive-arkiv + Parchive-Archiv + archivador Parchive + Parchive artxiboa + Parchive-arkisto + Parchive skjalasavn + archive Parchive + cartlann Parchive + arquivo Parchive + ארכיון של Parchive + Parchive archívum + Arsip Parchive + Archivio Parchive + Parchive アーカイブ + Parchive архиві + Parchive 묶음 파일 + Parchive archyvas + Parchive arhīvs + Parchive-arkiv + Parchive-archief + Parchive-arkiv + Archiwum parchive + Pacote Parchive + Arhivă Parchive + архив Parchive + Archív Parchive + Datoteka arhiva Parchive + Arkiv Parchive + Parchive-arkiv + архів Parchive + Kho nén Parchive + Parchive 归档文件 + Parchive 封存檔 + Parchive + Parity Volume Set Archive + + + + + + + + + PEF executable + PEF تنفيذي + Vykonvalny fajł PEF + Изпълним файл — PEF + executable PEF + Spustitelný soubor PEF + PEF-kørbar + PEF-Programm + εκτελέσιμο PEF + PEF executable + PEF-plenumebla + ejecutable PEF + PEF exekutagarria + PEF-ohjelma + PEF inningarfør + exécutable PEF + comhad inrite PEF + Executábel PEF + קובץ הרצה PEF + PEF futtatható + PEF dapat dieksekusi + Eseguibile PEF + PEF 実行ファイル + PEF орындалатын файлы + PEF 실행파일 + PEF vykdomasis failas + PEF izpildāmais + Bolehlaksana PEF + PEF-kjørbar + PEF-uitvoerbaar bestand + Køyrbar PEF-fil + Program PEF + executável PEF + Executável PEF + Executabil PEF + исполняемый файл PEF + Spustiteľný súbor PEF + Izvedljiva datoteka PEF + E ekzekutueshme PEF + PEF извршна + Körbar PEF-fil + виконуваний файл PEF + Tập tin thực hiện được PEF + PEF 可执行文件 + PEF 可執行檔 + + + + + + + Perl script + سكربت بيرل + Skrypt Perl + Скрипт — Perl + script Perl + Skript v Perlu + Sgript Perl + Perlprogram + Perl-Skript + πρόγραμμα εντολών Perl + Perl script + Perl-skripto + script en Perl + Perl script-a + Perl-komentotiedosto + Perl boðrøð + script Perl + script Perl + Script de Perl + תסריט מעטפת של Perl + Perl-parancsfájl + Skrip Perl + Script Perl + Perl スクリプト + Perl сценарийі + 펄 스크립트 + Perl scenarijus + Perl skripts + Skrip Perl + Perl skript + Perl-script + Perl-skript + Skrypt Perl + 'script' Perl + Script Perl + Script Perl + сценарий Perl + Skript jazyka Perl + Skriptna datoteka Perl + Script Perl + Перл скрипта + Perlskript + скрипт на Perl + Văn lệnh Perl + Perl 脚本 + Perl 指令稿 + + + + + + + + + + + + + + + PHP script + سكربت PHP + PHP skripti + Skrypt PHP + Скрипт — PHP + script PHP + Skript PHP + Sgript PHP + PHP-program + PHP-Skript + πρόγραμμα εντολών PHP + PHP script + PHP-skripto + script en PHP + PHP script-a + PHP-komentotiedosto + PHP boðrøð + script PHP + script PHP + Script de PHP + תסריט מעטפת של PHP + PHP-parancsfájl + Skrip PHP + Script PHP + PHP スクリプト + PHP сценарийі + PHP 스크립트 + PHP scenarijus + PHP skripts + Skrip PHP + PHP-skript + PHP-script + PHP-skript + Skrypt PHP + 'script' PHP + Script PHP + Script PHP + сценарий PHP + Skript PHP + Skriptna datoteka PHP + Script PHP + PHP скрипта + PHP-skript + скрипт PHP + Văn lệnh PHP + PHP 脚本 + PHP 指令稿 + + + + + + + + + + + + + PKCS#7 certificate bundle + رزمة الشهادة PKCS#7 + Сбор със сертификати — PKCS#7 + conjunt de certificats PKCS#7 + Svazek certifikátů PKCS#7 + PKCS#7-certifikatbundt + PKCS#7-Zertifikatspaket + lote de certificados PCKS#7 + PKCS#7 zertifikazio sorta + PKCS#7-varmennenippu + PKCS#7 váttanar bundi + lot de certificats PKCS#7 + cuach theastas PKCS#7 + paquete de certificado PKCS#7 + בקשה מוסמכת PKCS#7 + PKCS#7-tanúsítványcsomag + Bundel sertifikat PKCS#7 + Bundle certificato PKCS#7 + PKCS#7 証明書 + PKCS#7 сертификаттар дестесі + PKCS#7 인증서 묶음 + PKCS#7 liudijimų ryšulys + PKCS#7 sertifikātu saišķis + PKCS#7-certificaatbundel + Pakiet certyfikatu PKCS#7 + Pacote de certificados PKCS#7 + Pachet certificat PKCS#7 + пакет сертификатов PKCS#7 + Zväzok certifikátov PKCS#7 + Datoteka potrdila PKCS#7 + PKCS#7-certifikatsamling + комплект сертифікатів PKCS#7 + Bó chứng nhận PKCS#7 + PKCS#7 证书束 + PKCS#7 憑證綁包 + PKCS + Public-Key Cryptography Standards + + + + + PKCS#12 certificate bundle + رزمة الشهادة PKCS#12 + Viazka sertyfikataŭ PKCS#12 + Сбор със сертификати — PKCS#12 + conjunt de certificats PKCS#12 + Svazek certifikátů PKCS#12 + PKCS#12-certifikatbundt + PKCS#12-Zertifikatspaket + πακέτο ψηφιακών πιστοποιητικών PKCS#12 + PKCS#12 certificate bundle + ligaĵo de PKCS#12-certigiloj + lote de certificados PCKS#12 + PKCS#12 zertifikazio sorta + PKCS#12-varmennenippu + PKCS#12 váttanar bundi + lot de certificats PKCS#12 + cuach theastas PKCS#12 + paquete de certificado PKCS#12 + בקשה מוסמכת PKCS#12 + PKCS#12-tanúsítványcsomag + Bundel sertifikat PKCS#12 + Bundle certificato PKCS#12 + PKCS#12 証明書 + PKCS#12 сертификаттар дестесі + PKCS#12 인증서 묶음 + PKCS#12 liudijimų ryšulys + PKCS#12 sertifikātu saišķis + Sijil PKCS#12 + PKCS#12 sertifikathaug + PKCS#12-certificaatbundel + PKCS#12-sertifikatbunt + Pakiet certyfikatu PKCS#12 + conjunto de certificados PKCS#12 + Pacote de certificados PKCS#12 + Certificat împachetat PKCS#12 + пакет сертификатов PKCS#12 + Zväzok certifikátov PKCS#12 + Datoteka potrdila PKCS#12 + Bundle çertifikate PKCS#12 + PKCS#12 пакет сертификата + PKCS#12-certifikatsamling + комплект сертифікатів PKCS#12 + Bó chứng nhận PKCS#12 + PKCS#12 证书束 + PKCS#12 憑證檔 + PKCS + Public-Key Cryptography Standards + + + + + PlanPerfect spreadsheet + جدول PlanPerfect + Raźlikovy arkuš PlanPerfect + Таблица — PlanPerfect + full de càlcul de PlanPerfect + Sešit PlanPerfect + PlanPerfect-regneark + PlanPerfect-Tabelle + PlanPerfect spreadsheet + hoja de cálculo de PlanPerfect + PlanPerfect kalkulu-orria + PlanPerfect-taulukko + PlanPerfect rokniark + feuille de calcul PlanPerfect + scarbhileog PlanPerfect + folla de cálculo de PlanPerfect + גליון נתונים של PlanPerfect + PlanPerfect táblázat + Lembar sebar PlanPerfect + Foglio di calcolo PlanPerfect + PlanPerfect スプレッドシート + PlanPerfect электрондық кестесі + PlanPerfect 스프레드시트 + PlanPerfect skaičialentė + PlanPerfect izklājlapa + PlanPerfect-regneark + PlanPerfect-rekenblad + PlanPerfect-rekneark + Arkusz PlanPerfect + Planilha do PlanPerfect + Foaie de calcul PlanPerfect + электронная таблица PlanPerfect + Zošit PlanPerfect + Razpredelnica PlanPerfect + Fletë llogaritjesh PlanPerfect + PlanPerfect-kalkylblad + ел. таблиця PlanPerfect + Bảng tính PlanPerfect + PlanPerfect 工作簿 + PlanPerfect 試算表 + + + + + Pocket Word document + مستند Pocket Word + Документ — Pocket Word + document Pocket Word + Dokument Pocket Word + Pocket Word-dokument + Pocket-Word-Dokument + documento de Pocket Word + Pocket Word dokumentua + Pocket Word -asiakirja + Pocket Word skjal + document Pocket Word + cáipéis Pocket Word + documento de Pocket Word + מסמך של Pocket Word + Pocket Word dokumentum + Dokumen Pocket Word + Documento Pocket Word + Pocket Word ドキュメント + Pocket Word құжаты + Pocket Word 문서 + Pocket Word dokumentas + Pocket Word dokuments + Pocket Word-document + Dokument Pocket Word + Documento do Pocket Word + Document Pocket Word + документ Pocket Word + Dokument Pocket Word + Dokument Pocket Word + Pocket Word-dokument + документ Pocket Word + Tài liệu Pocket Word + Pocket Word 文档 + Pocket Word 文件 + + + + + + + + profiler results + نتائج المحلل + profiler nəticələri + vyniki profilera + Резултати от анализатора + resultats del perfilador + Výsledky profiler + canlyniadau proffeilio + profileringsresultater + Profiler-Ergebnisse + αποτελέσματα μετρήσεων για την εκτέλεση προγράμματος + profiler results + resultoj de profililo + resultados del perfilador + profiler-aren emaitzak + profilointitulokset + résultats de profileur + torthaí próifíleora + resultados do perfilador + תוצאות מאבחן + profilírozó-eredmények + hasil profiler + Risultati profiler + プロファイラー結果 + прифильдеу нәтижелері + 프로파일러 결과 + profiliklio rezultatai + profilētāja rezultāti + Hasil pemprofil + profileingsresultat + profiler-resultaten + profileringsresultat + Wyniki profilowania + resultados do 'profiler' + resultados do profiler + rezultate profiler + результаты профилирования + Výsledky profilera + rezultati profilirnika + Rezultate të profiluesit + резултати профилатора + profilerarresultat + результати профілювання + kết quả nét hiện trạng + profiler 结果 + 硬體資訊產生器成果 + + + + + + Pathetic Writer document + مستند Pathetic Writer + Dakument Pathetic Writer + Документ — Pathetic Writer + document de Pathetic Writer + Dokument Pathetic Writer + Pathetic Writer-dokument + Pathetic-Writer-Dokument + έγγραφο Pathetic Writer + Pathetic Writer document + dokumento de Pathetic Writer + documento de Pathetic Writer + Pathetic Writer dokumentua + Pathetic Writer -asiakirja + Pathetic Writer skjal + document Pathetic Writer + cáipéis Pathetic Writer + documento de Pathetic Writer + מסמך של Pathetic Writer + Pathetic Writer-dokumentum + Dokumen Pathetic Writer + Documento Pathetic Writer + Pathetic Writer ドキュメント + Pathetic Writer құжаты + Pathetic Writer 문서 + Pathetic Writer dokumentas + Pathetic Writer dokuments + Dokumen Pathetic Writer + Pathetic Writer-dokument + Pathetic Writer-document + Pathetic Writer-dokument + Dokument Pathetic Writer + documento do Pathetic Writer + Documento do Pathetic Writer + Document Pathetic Writer + документ Pathetic Writer + Dokument Pathetic Writer + Dokument Pathetic Writer + Dokument Pathetic Writer + Документ Патетичног писца + Pathetic Writer-dokument + документ Pathetic Writer + Tài liệu Pathetic Writer + Pathetic Writer 文档 + Pathetic Writer 文件 + + + + + Python bytecode + Python bytecode + Python bayt kodu + Bajtavy kod Python + Байт код — Python + bytecode de Python + Bajtový kód Python + Côd beit Python + Pythonbytekode + Python-Bytecode + συμβολοκώδικας Python + Python bytecode + Python-bajtkodo + bytecode Python + Python byte-kodea + Python-tavukoodi + Python býtkota + bytecode Python + beartchód Python + bytecode de Python + Bytecode של Python + Python-bájtkód + Kode bita Python + Bytecode Python + Python バイトコード + Python байткоды + 파이썬 바이트코드 + Python baitinis kodas + Python bitkods + Kodbait Python + Python-bytekode + Python-bytecode + Python-bytekode + Kod bajtowy Python + código binário Python + Código compilado Python + Bytecode Python + байт-код Python + Bajtový kód Python + Datoteka bitne kode Python + Bytecode Python + Питонов бајт ко̂д + Python-bytekod + байт-код Python + Mã byte Python + Python 字节码 + Python 位元碼 + + + + + + + + Quattro Pro spreadsheet + جدول Quattro Pro + Raźlikovy arkuš Quattro Pro + Таблица — Quattro Pro + full de càlcul de Quattro Pro + Sešit Quattro Pro + Quattro Pro-regneark + Quattro-Pro-Tabelle + λογιστικό φύλλο Quattro Pro + Quattro Pro spreadsheet + sterntabelo de Quattro Pro + hoja de cálculo Quattro Pro + Quattro Pro kalkulu-orria + Quattro Pro -taulukko + Quattro Pro rokniark + feuille de calcul Quattro Pro + scarbhileog Quattro Pro + folla de cálculo Quattro Pro + גליון נתונים של Quattro Pro + Quattro Pro-munkafüzet + Lembar sebar Quattro Pro + Foglio di calcolo Quattro Pro + Quattro Pro スプレッドシート + Quattro Pro электрондық кестесі + Quattro Pro 스프레드시트 + Quattro Pro skaičialentė + Quattro Pro izklājlapa + Hamparan Quatro Pro + Quattro Pro-regneark + Quattro Pro-rekenblad + Quattro Pro-rekneark + Arkusz Quattro Pro + folha de cálculo Quattro Pro + Planilha do Quattro Pro + Foaie de calcul Quattro Pro + электронная таблица Quattro Pro + Zošit Quattro Pro + Razpredelnica Quattro Pro + Fletë llogaritjesh Quattro Pro + Quattro Pro табеларни рачун + Quattro Pro-kalkylblad + ел. таблиця Quattro Pro + Bảng tính Quattro Pro + Quattro Pro 工作簿 + Quattro Pro 試算表 + + + + + + + QuickTime metalink playlist + قائمة تشغيل QuickTime metalink + śpis metaspasyłak na pieśni QuickTime + Списък за изпълнение — QuickTime + llista de reproducció de metaenllaços QuickTime + Seznam skladeb metalink QuickTime + QuickTime metalink-afspilningsliste + QuickTime-Metalink-Wiedergabeliste + lista de reproducción de metaenlaces QuickTime + QuickTime meta-esteken erreprodukzio-zerrenda + QuickTime metalink -soittolista + QuickTime metaleinkju avspælingarlisti + liste de lecture metalink QuickTime + seinmliosta meiteanasc QuickTime + lista de reprodución de metaligazóns QuickTime + רשימת השמעה מקושרת של QuickTime + QuickTime metalink lejátszólista + Senarai berkas taut meta QuickTime + Scaletta metalink QuickTime + QuickTime メタリンク再生リスト + QuickTime метасілтемелер ойнау тізімі + 퀵타임 metalink 재생 목록 + QuickTime metanuorodos grojaraštis + QuickTime metasaites repertuārs + QuickTime metalink-spilleliste + QuickTime metalink-afspeellijst + QuickTime metalink-speleliste + Lista odtwarzania metaodnośników QuickTime + Lista de reprodução metalink do QuickTime + Listă cu metalegături QuickTime + список воспроизведения мета-ссылок QuickTime + Zoznam skladieb metalink QuickTime + Seznam predvajanja QuickTime + Listë titujsh metalink QuickTime + QuickTime-metalänkspellista + список відтворення QuickTime metalink + Danh mục nhạc siêu liên kết Quicktime + QuickTime 元链接播放列表 + QuickTime metalink 播放清單 + + + + + + + + + + + + + + + Quicken document + مستند Quicken + Quicken sənədi + Dakument Quicken + Документ — Quicken + document de Quicken + Dokument Quicken + Dogfen Quicken + Quickendokument + Quicken-Dokument + έγγραφο Quicken + Quicken document + Quicken-dokumento + documento de Quicken + Quicken dokumentua + Quicken-asiakirja + Quicken skjal + document Quicken + cáipéis Quicken + documento de Quicken + מסמך של Quicken + Quicken-dokumentum + Dokumen Quicken + Documento Quicken + Quicken ドキュメント + Quicken құжаты + Quicken 문서 + Quicken dokumentas + Quicken dokuments + Dokumen Quicken + Quicken-dokument + Quicken-document + Quicken-dokument + Dokument Quicken + documento Quicken + Documento do Quicken + Document Quicken + документ Quicken + Dokument Quicken + Dokument Quicken + Dokument Quicken + Quicken документ + Quicken-dokument + документ Quicken + Tài liệu Quicken + Quicken 文档 + Quicken 文件 + + + + + RAR archive + أرشيف RAR + Archiŭ RAR + Архив — RAR + arxiu RAR + Archiv RAR + Archif RAR + RAR-arkiv + RAR-Archiv + αρχείο RAR + RAR archive + RAR-arkivo + archivador RAR + RAR artxiboa + RAR-arkisto + RAR skjalasavn + archive RAR + cartlann RAR + ficheiro RAR + ארכיון RAR + RAR-archívum + Arsip RAR + Archivio RAR + RAR アーカイブ + RAR архиві + RAR 압축 파일 + RAR archyvas + RAR arhīvs + Arkib RAR + RAR-arkiv + RAR-archief + RAR-arkiv + Archiwum RAR + arquivo RAR + Pacote RAR + Arhivă RAR + архив RAR + Archív RAR + Datoteka arhiva RAR + Arkiv RAR + РАР архива + RAR-arkiv + архів RAR + Kho nén RAR + RAR 归档文件 + RAR 封存檔 + + + + + + + + + DAR archive + أرشيف DAR + Archiŭ DAR + Архив — DAR + arxiu DAR + Archiv DAR + DAR-arkiv + DAR-Archiv + DAR-arkivo + archivador DAR + DAR artxiboa + DAR-arkisto + DAR skjalasavn + archive DAR + cartlann DAR + arquivo DAR + ארכיון DAR + DAR archívum + Arsip DAR + Archivio DAR + DAR アーカイブ + DAR архиві + DAR 묶음 파일 + DAR archyvas + DAR arhīvs + DAR-arkiv + DAR-archief + DAR-arkiv + Archiwum DAR + Pacote DAR + Arhivă DAR + архив DAR + Archív DAR + Datoteka arhiva DAR + Arkiv DAR + DAR-arkiv + архів DAR + Kho nén DAR + DAR 归档文件 + DAR 封存檔 + + + + + + + + Alzip archive + أرشيف Alzip + Archiŭ Alzip + Архив — alzip + arxiu Alzip + Archiv Alzip + Alziparkiv + Alzip-Archiv + Alzip-arkivo + archivador Alzip + Alzip artxiboa + Alzip-arkisto + Alsip skjalasavn + archive alzip + cartlann Alzip + arquivo Alzip + ארכיון Alzip + Alzip archívum + Arsip Alzip + Archivio Alzip + Alzip アーカイブ + Alzip архиві + 알집 압축 파일 + Alzip archyvas + Alzip arhīvs + Alzip-arkiv + Alzip-archief + Alzip-arkiv + Archiwum alzip + Pacote Alzip + Arhivă Alzip + архив ALZIP + Archív Alzip + Datoteka arhiva Alzip + Arkiv Alzip + Alzip-arkiv + архів Alzip + Kho nén Alzip + Alzip 归档文件 + Alzip 封存檔 + + + + + + + + rejected patch + رقعة مرفوضة + niepryniaty patch + Отхвърлен файл с кръпка + pedaç rebutjat + Odmítnutá záplata + afvist tekstlap + Abgelehnter Patch + μπάλωμα που απορρίφθηκε + rejected patch + reĵeta flikaĵo + parche rechazado + baztertutako bide-izena + hylättyjen muutosten tiedosto + vrakað rætting + correctif rejeté + paiste diúltaithe + parche rexeitado + תלאי שנדחה + visszautasított folt + patch ditolak + Patch rifiutata + 拒否されたパッチ + алынбаған патч + 거부된 패치 파일 + atmestas lopas + noraidītais ceļš + Tampungan ditolak + avvist patchfil + verworpen patch + avvist programfiks + Odrzucona łata + ficheiro de patch rejeitado + arquivo de patch rejeitado + petec respsins + отвергнутый патч + Odmietnutá záplata + zavrnjen popravek + Patch i kthyer mbrapsht + одбијена закрпа + avvisad programfix + відхилена латка + đắp vá bị từ chối + 拒绝的补丁 + 回絕的修補 + + + + + + + RPM package + حزمة RPM + Pakunak RPM + Пакет — RPM + paquet RPM + Balíček RPM + RPM-pakke + RPM-Paket + πακέτο RPM + RPM package + RPM-pakaĵo + paquete RPM + RPM paketea + RPM-paketti + RPM pakki + paquet RPM + pacáiste RPM + paquete RFM + חבילת RPM + RPM-csomag + Paket RPM + Pacchetto RPM + RPM パッケージ + RPM дестесі + RPM 패키지 + RPM paketas + RPM pakotne + Pakej RPM + RPM-pakke + RPM-pakket + RPM-pakke + Pakiet RPM + pacote RPM + Pacote RPM + Pachet RPM + пакет RPM + Balík RPM + Datoteka paketa RPM + Paketë RPM + RPM пакет + RPM-paket + пакунок RPM + Gói RPM + RPM 软件包 + RPM 套件 + + + + + + + + + Ruby script + سكربت روبي + Skrypt Ruby + Скрипт — Ruby + script Ruby + Skript v Ruby + Rubyprogram + Ruby-Skript + πρόγραμμα εντολών Ruby + Ruby script + Ruby-skripto + script en Ruby + Ruby script-a + Ruby-komentotiedosto + Ruby boðrøð + script Ruby + script Ruby + Script de Ruby + תסריט Ruby + Ruby-parancsfájl + Skrip Ruby + Script Ruby + Ruby スクリプト + Ruby сценарийі + 루비 스크립트 + Ruby scenarijus + Ruby skripts + Skrip Ruby + Ruby-skript + Ruby-script + Ruby-skript + Skrypt Ruby + 'script' Ruby + Script Ruby + Script Ruby + сценарий Ruby + Skript Ruby + Skriptna datoteka Ruby + Script Ruby + Руби скрипта + Ruby-skript + скрипт Ruby + Văn lệnh Ruby + Ruby 脚本 + Ruby 指令稿 + + + + + + + + + + + Markaby script + سكربت Markaby + Skrypt Markaby + Скрипт — Markaby + script Markaby + Skript Markaby + Markabyprogram + Markaby-Skript + Markaby-skripto + script en Markaby + Markaby script-a + Markaby-komentotiedosto + Markaby boðrøð + script Markaby + script Markaby + Script de Markaby + תסריט Markby + Markaby parancsfájl + Skrip Markaby + Script Markaby + Markaby スクリプト + Markaby сценарийі + Markaby 스크립트 + Markaby scenarijus + Markaby skripts + Markaby-skript + Markaby-script + Markaby-skript + Skrypt Markaby + Script Markaby + Script Markaby + сценарий Markaby + Skript Markaby + Skriptna datoteka Markaby + Script Markaby + Markaby-skript + скрипт Markaby + Văn lệnh Markaby + RMarkaby 脚本 + Markaby 指令稿 + + + + + + SC/Xspread spreadsheet + جدول SC/Xspread + Raźlikovy arkuš SC/Xspread + Таблица — SC/Xspread + full de càlcul de SC/Xspread + Sešit SC/Xspread + SC/Xspread-regneark + SX/Xspread-Tabelle + SC/Xspread spreadsheet + SC/Xspread-kalkultabelo + hoja de cálculo SC/Xspread + SC/Xspread kalkulu-orria + SC/Xspread-taulukko + SC/Xspread rokniark + feuille de calcul SC/Xspread + scarbhileog SC/Xspread + folla de cálculo SC/Xspread + גליון נתונית של SC/Xspread + SC/Xspread táblázat + Lembar sebar SC/Xspread + Foglio di calcolo SC/Xspread + SC/Xspread スプレッドシート + SC/Xspread электрондық кестесі + SC/Xspread 스프레드시트 + SC/Xspread skaičialentė + SC/Xspread izklājlapa + SC/Xspread-regneark + SC/Xspread-rekenblad + SC/Xspread-rekneark + Arkusz SC/Xspread + Planilha do SC/Xspread + Foaie de calcul SC/Xspread + электронная таблица SC/Xspread + Zošit SC/Xspread + Razpredelnica SC/Xspread + Fletë llogaritjesh SC/Xspread + SC/Xspread-kalkylblad + ел. таблиця SC/Xspread + Bảng tính SC/Xspread + SC/Xspread 工作簿 + SC/Xspread 試算表 + + + + + + + shell archive + أرشيف شِل + qabıq arxivi + archiŭ abałonki + Архив на обвивката + arxiu d'intèrpret d'ordres + Archiv shellu + archif plisgyn + skalarkiv + Shell-Archiv + αρχείο φλοιού (SHAR) + shell archive + ŝel-arkivo + archivador shell + shell artxiboa + komentotulkkiarkisto + skel savn + archive shell + cartlann bhlaoisce + ficheiro shell + ארכיון מעטפת + héjarchívum + arsip shell + Archivio shell + シェルアーカイブ + қоршам архиві + 쉘 묶음 파일 + shell archyvas + čaulas arhīvs + Arkib shell + skallarkiv + shell-archief + skal-arkiv + Archiwum powłoki + arquivo de consola + Pacote shell + arhivă shell + архив оболочки UNIX + Archív shellu + lupinski arhiv + Arkiv shell + Архива љуске (SHAR) + skalarkiv + архів оболонки + kho trình bao + shell 归档文件 + shell 封存檔 + + + + + libtool shared library + مكتبة libtool المشتركة + supolnaja biblijateka libtool + Споделена библиотека — libtool + biblioteca compartida libtool + Sdílená knihovna libtool + libtool delt bibliotek + Gemeinsame libtool-Bibliothek + biblioteca compartida de libtool + libtool partekatutako liburutegia + jaettu libtool-kirjasto + libtool felagssavn + bibliothèque partagée libtool + comhleabharlann libtool + biblioteca compartida de libtool + ספריה משותפת של libtool + libtool osztott programkönyvtár + pustaka bersama libtool + Libreria condivisa libtool + libtool 共有ライブラリ + libtool ортақ жинағы + libtool 공유 라이브러리 + libtool bendroji biblioteka + libtool koplietotā bibliotēka + libtool delt bibliotek + gedeelde libtool-bibliotheek + libtool delt bibliotek + Biblioteka współdzielona libtool + biblioteca compartilhada libtool + bibliotecă partajată libtool + разделяемая библиотека libtool + Zdieľaná knižnica libtool + Souporabna knjižnica libtool + Librari e përbashkët libtool + delat libtool-bibliotek + спільна бібліотека libtool + thư viện dùng chung libtool + libtool 共享库 + libtool 共享函式庫 + + + + + + shared library + مكتبة مشتركة + bölüşülmüş kitabxana + supolnaja biblijateka + Споделена библиотека + biblioteca compartida + Sdílená knihovna + llyfrgell wedi ei rhannu + delt bibliotek + Gemeinsame Bibliothek + αρχείο κοινόχρηστης βιβλιοθήκης + shared library + dinamike bindebla biblioteko + biblioteca compartida + partekatutako liburutegia + jaettu kirjasto + felagssavn + bibliothèque partagée + comhleabharlann + biblioteca compartida + ספרייה משותפת + osztott programkönyvtár + pustaka bersama + Libreria condivisa + 共有ライブラリ + бөлісетін библиотека + 공유 라이브러리 + bendroji biblioteka + koplietotā bibliotēka + Pustaka terkongsi + delt bibliotek + gedeelde bibliotheek + delt bibliotek + Biblioteka współdzielona + biblioteca partilhada + biblioteca compartilhada + bibliotecă partajată + разделяемая библиотека + Zdieľaná knižnica + souporabljena knjižnica + Librari e përbashkët + дељена библиотека + delat bibliotek + спільна бібліотека + thư viện dùng chung + 共享库 + 共享函式庫 + + + + + + + + + + + + + + + + + + + + shell script + سكربت شِل + qabıq skripti + skrypt abałonki + Скрипт на обвивката + script d'intèrpret d'ordres + Skript shellu + sgript plisgyn + skalprogram + Shell-Skript + αρχείο εντολών φλοιού + shell script + ŝelskripto + script en shell + shell script-a + komentotulkin komentotiedosto + skel boðrøð + script shell + script bhlaoisce + script de shell + תסריט מעטפת + héj-parancsfájl + skrip shell + Script shell + シェルスクリプト + қоршам сценарийі + 쉘 스크립트 + shell scenarijus + čaulas skripts + Skrip shell + skallskript + shellscript + skalskript + Skrypt powłoki + 'script' de consola + script shell + script shell + сценарий оболочки UNIX + Skript shellu + lupinski skript + Script shell + скрипта љуске + skalskript + скрипт оболонки + văn lệnh trình bao + shell 脚本 + shell 指令稿 + + + + + + + + + + + + + + + + + + + + + Shockwave Flash file + ملف Shockwave Flash + Fajł Shockwave Flash + Файл — Shockwave Flash + fitxer Shockwave Flash + Soubor Shockwave Flash + Shockwave Flash-fil + Shockwave-Flash-Datei + αρχείο Shockwave Flash + Shockwave Flash file + dosiero de Shockwave Flash + archivo Shockwave Flash + Shockwave Flash fitxategia + Shockwave Flash -tiedosto + Shockwave Flash fíla + fichier Shockwave Flash + comhad Shockwave Flash + ficheiro sockwave Flash + קובץ של Shockwave Flash + Shockwave Flash-fájl + Berkas Shockwave Flash + File Shockwave Flash + Shockwave Flash ファイル + Shockwave Flash файлы + Shockwave 플래시 파일 + Shockwave Flash failas + Shockwave Flash fails + Fail Shockwave Flash + Shockwave Flash-fil + Shockwave Flash-bestand + Shockwave Flash-fil + Plik Shockwave Flash + ficheiro Shockwave Flash + Arquivo Shockwave Flash + Fișier Shockwave Flash + файл Shockwave Flash + Súbor Shockwave Flash + Datoteka Shockwave Flash + File Flash Shockwave + Шоквејв Флеш датотека + Shockwave Flash-fil + файл Shockwave Flash + Tập tin Flash Shockwave + Shockwave Flash 文件 + Shockwave Flash 檔 + + + + + + + + + + + + Shorten audio + Shorten سمعي + Aŭdyjo Shorten + Аудио — Shorten + àudio Shorten + Zvuk Shorten + Shortenlyd + Shorten-Audio + Shorten audio + Shorten-sondosiero + sonido Shorten + Shorten audioa + Shorten-ääni + Shorten ljóður + audio Shorten + fuaim Shorten + son Shorten + שמע של Shorten + Shorten hang + Audio Shorten + Audio Shorten + Shorten オーディオ + Shorten аудиосы + Shorten 오디오 + Shorten garso įrašas + Shorten audio + Shorten lyd + Shorten-audio + Shorten-lyd + Plik dźwiękowy Shorten + Áudio Shorten + Audio Shorten + аудио Shorten + Zvuk Shorten + Zvočna datoteka Shorten + Audio Shorten + Shorten-ljud + звук Shorten + Âm thanh Shorten + Shorten 音频 + Shorten 音訊 + + + + + + + + Siag spreadsheet + جدول Siag + Raźlikovy arkuš Siag + Таблица — Siag + full de càlcul Siag + Sešit Siag + Siagregneark + Siag-Tabelle + λογιστικό φύλλο Siag + Siag spreadsheet + Siag-kalkultabelo + hoja de cálculo de Siag + Siag kalkulu-orria + Siag-taulukko + Siag rokniark + feuille de calcul Siag + scarbhileog Siag + folla de cálculo de Siag + גליון נתונים של Siag + Siag-munkafüzet + Lembar sebar Siag + Foglio di calcolo Siag + Siag スプレッドシート + Siag электрондық кестесі + Siag 스프레드시트 + Siag skaičialentė + Siag izklājlapa + Hamparan Siag + Siag-regneark + Siag-rekenblad + Siag-rekneark + Arkusz Siag + folha de cálculo Siag + Planilha do Siag + Foaie de calcul Siag + электронная таблица Siag + Zošit Siag + Razpredelnica Siag + Fletë llogaritjesh Siag + Siag табеларни прорачун + Siag-kalkylblad + ел. таблиця Siag + Bảng tính Slag + Siag 工作簿 + Siag 試算表 + + + + + Skencil document + مستند Skencil + Dakument Skencil + Документ — Skencil + document Skencil + Dokument Skencil + Skencildokument + Skencil-Dokument + Skencil-dokumento + documento Skencil + Skencil dokumentua + Skencil-asiakirja + Skencil skjal + document Skencil + cáipéis Skencil + documento Skencil + מסמך Skencil + Skencil-dokumentum + Dokumen Skencil + Documento Skencil + Skencil ドキュメント + Skencil құжаты + Skencil 문서 + Skencil dokumentas + Skencil dokuments + Skencil-document + Skencil-dokument + Dokument Skencil + Documento do Skencil + Document Skencil + документ Skencil + Dokument Skencil + Dokument Skencil + Dokument Skencil + Skencil-dokument + документ Skencil + Tài liệu Skencil + Skencil 文档 + Skencil 文件 + + + + + + + + Stampede package + حزمة Stampede + Stampede paketi + Pakunak Stampede + Пакет — Stampede + paquet Stampede + Balíček Stampede + Pecyn Stampede + Stampedepakke + Stampede-Paket + πακέτο Stampede + Stampede package + Stampede-pakaĵo + paquete Stampede + Stampede paketea + Stampede-paketti + Stampede pakki + paquet Stampede + pacáiste Stampede + paquete Stampede + חבילה של Stampede + Stampede-csomag + Paket Stampede + Pacchetto Stampede + Stampede パッケージ + Stampede дестесі + 스탬피드 패키지 + Stampede paketas + Stampede pakotne + Pakej Stampede + Stampede-pakke + Stampede-pakket + Stampede-pakke + Pakiet Stampede + pacote Stampede + Pacote Stampede + Pachet Stampede + пакет Stampede + Balíček Stampede + Datoteka paketa Stampede + Paketë Stampede + Stampede пакет + Stampede-paket + пакунок Stampede + Gói Stampede + Stampede 软件包 + Stampede 套件 + + + + Sega Master System/Game Gear ROM + ROM الخاص بدولاب لعبة/نظام سيجا ماستر + Sega Master System/Game Gear ROM + ROM — Sega Master System/Game Gear + ROM de Sega Master System/Game Gear + ROM pro Sega Master System/Game Gear + Sega Master System/Game Gear-rom + Sega-Master-System/Game-Gear-ROM + ROM de Sega Master System/Game Gear + Sega Master System/Game Gear-eko ROMa + Sega Master System/Game Gear -ROM + Sega Master System/Game Gear ROM + ROM Sega Master System/Game Gear + ROM Sega Master System/Game Gear + ROM de Sega Master System/Game Gear + Sega Master System/Game Gear של ROM + Sega Master System/Game Gear ROM + Memori baca-saja Sega Master System/Game Gear + ROM Sega Master System/Game Gear + セガ マスターシステム/ゲームギア ROM + Sega Master System/Game Gear ROM + Sega Master System/Game Gear 롬 + Sega Master System/Game Gear ROM + Sega Master System/Game Gear ROM + Sega Master System/Game Gear-ROM + Sega Master System/Game Gear-ROM + Sega Master System/Game Gear-ROM + Plik ROM konsoli SMS/Game Gear + ROM do Master System/Game Gear + ROM Sega Master System/Game Gear + Sega Master System/Game Gear ROM + ROM pre Sega Master System/Game Gear + Bralni pomnilnik Sega Master System/Game Gear + ROM Sega Master System/Game Gear + Sega Master System/Game Gear-rom + ППП Sega Master System/Game Gear + ROM Sega Master System/Game Gear + Sega Master System/Game Gear ROM + Sega Master System/Game Gear ROM + + + + + + + Super NES ROM + Super NES ROM + Super Nintendo ROM + ROM — Super NES + ROM de Super NES + ROM pro Super Nintendo + Super NES-rom + Super-NES-ROM + ROM de Super NES + Super Nintendo-ko ROMa + Super Nintendo -ROM + Super NES ROM + ROM Super Nintendo + ROM Super NES + ROM de Super NES + ROM של Super NES + Super NES ROM + Memori baca-saja Super Nintendo + ROM Super Nintendo + スーパーファミコン ROM + Super NES ROM + 슈퍼 NES 롬 + Super NES ROM + Super NES ROM + Super Nintendo ROM + Super Nintendo + Super NES-ROM + Plik ROM konsoli SNES + ROM do Super Nintendo + ROM Super Nintendo + Super NES ROM + ROM pre Super Nintendo + Bralni pomnilnik Super NES + ROM Super NES + Super NES-rom + ППП Super NES + ROM Super Nintendo + Super NES ROM + 超級任天堂 ROM + + + + + StuffIt archive + أرشيف StuffIt + Archiŭ StuffIt + Архив — StuffIt + arxiu StuffIt + Archiv StuffIt + StuffIt-arkiv + StuffIt-Archiv + StuffIt archive + StuffIt-arkivo + archivador StuffIt + StuffIt artxiboa + StuffIt-arkisto + StuffIt skjalasavn + archive StuffIt + cartlann StuffIt + arquivo StuffIt + ארכיון של Sאוככןא + StuffIt-archívum + Arsip StuffIt + Archivio StuffIt + StuffIt アーカイブ + StuffIt архиві + StuffIt 압축 파일 + StuffIt archyvas + StuffIt arhīvs + StuffIt arkiv + StuffIt-archief + StuffIt-arkiv + Archiwum StuffIt + Pacote StuffIt + Arhivă StuffIt + архив StuffIt + Archív StuffIt + Datoteka arhiva StuffIt + Arkiv StuffIt + StuffIt архива + StuffIt-arkiv + архів StuffIt + Kho nén Stuffit + Macintosh StuffIt 归档文件 + StuffIt 封存檔 + + + + + + + + + + + SubRip subtitles + ترجمات SubRip + Subtytry SubRip + Субтитри — SubRip + subtítols SubRip + Titulky SubRip + SubRip-undertekster + SubRip-Untertitel + SubRip-subtekstoj + subtítulos SubRip + SubRip azpitituluak + SubRip-tekstitykset + SubRip undirtekstir + sous-titres SubRip + fotheidil SubRip + subtítulos SubRip + כתוביות של SubRip + SubRip feliratok + Subjudul SubRip + Sottotitoli SubRip + SubRip 字幕 + SubRip субтитрлары + SubRip 자막 파일 + SubRip subtitrai + SubRip subtitri + SubRip undertekst + SubRip-ondertitels + SubRip-teksting + Napisy SubRip + Legendas SubRip + Subtitrare SubRip + субтитры SubRip + Titulky SubRip + Datoteka podnapisov SubRip + Nëntituj SubRip + SubRip-undertexter + субтитри SubRip + Phụ đề SubRip + SubRip 字幕 + SubRip 字幕 + + + + + + + + + + + + WebVTT subtitles + Субтитри — WebVTT + subtítols WebVTT + Titulky WebVTT + Subtítulos WebVTT + WebVTT-tekstitykset + sous-titres WebVTT + subtítulos WebVTT + כתוביות WebVTT + Subtitel WebVTT + Sottotitoli WebVTT + WebVTT サブタイトル + WebVTT субтитрлары + WebVTT subtitri + Napisy WebVTT + субтитры WebVTT + Podnapisi WebVVT + WebVTT-undertexter + субтитри WebVTT + VTT + Video Text Tracks + + + + + + + + + SAMI subtitles + ترجمات SAMI + Subtytry SAMI + Субтитри — SAMI + subtítols SAMI + Titulky SAMI + SAMI-undertekster + SAMI-Untertitel + SAMI-subtekstoj + subtítulos SAMI + SAMI azpitituluak + SAMI-tekstitykset + SAMI undirtekstir + sous-titres SAMI + fotheidil SAMI + subtítulos SAMI + כתוביות SAMI + SAMI feliratok + Subjudul SAMI + Sottotitoli SAMI + SAMI 字幕 + SAMI субтитрлары + SAMI 자막 파일 + SAMI subtitrai + SAMI subtitri + SAMI undertekst + SAMI-ondertitels + SAMI teksting + Napisy SAMI + SAMI subtitles + Subtitrări SAMI + субтитры SAMI + Titulky SAMI + Datoteka podnapisov SAMI + Nëntituj SAMI + SAMI-undertexter + субтитри SAMI + Phụ đề SAMI + SAMI 字幕 + SAMI 字幕 + SAMI + Synchronized Accessible Media Interchange + + + + + + + + + + MicroDVD subtitles + ترجمات MicroDVD + Subtytry MicroDVD + Субтитри — MicroDVD + subtítols MicroDVD + Titulky MicroDVD + MicroDVD-undertekster + MicroDVD-Untertitel + MicroDVD-subtekstoj + subtítulos MicroDVD + MicroDVD azpitituluak + MicroDVD-tekstitykset + MicroDVD undirtekstir + sous-titres MicroDVD + fotheidil MicroDVD + subtítulos de MicroDVD + כתוביות של MicroDVD + MicroDVD feliratok + Subjudul MicroDVD + Sottotitoli MicroDVD + MicroDVD 字幕 + MicroDVD субтитрлары + MicroDVD 자막 파일 + MicroDVD subtitrai + MicroDVD subtitri + MicroDVD undertekst + MicroDVD-ondertitels + MicroDVD-teksting + Napisy MicroDVD + Legendas MicroDVD + Subtitrări MicroDVD + субтитры MicroDVD + Titulky MicroDVD + Datoteka podnapisov MicroDVD + Nëntituj MicroDVD + MicroDVD-undertexter + субтитри MicroDVD + Phụ đề MicroDVD + MicroDVD 字幕 + MicroDVD 字幕 + + + + + + + + + + MPSub subtitles + ترجمات MPSub + Subtytry MPSub + Субтитри — MPSub + subtítols MPSub + Titulky MPSub + MPSub-undertekster + MPSub-Untertitel + MPSub-subtekstoj + subtítulos MPSub + MPSub azpitituluak + MPSub-tekstitykset + MPSub undirtekstir + sous-titres MPSub + fotheidil MPSub + subtítulos MPSub + כתוביות MPSub + MPSub feliratok + Subjudul MPSub + Sottotitoli MPSub + MPSub サブタイトル + MPSub субтитрлары + MPSub 자막 파일 + MPSub subtitrai + MPSub subtitri + MPSub undertekst + MPSub-ondertitels + MPSub-undertekstar + Napisy MPSub + Legendas MPSub + Subtitrări MPSub + субтитры MPSub + Titulky MPSub + Datoteka podnapisov MPSub + Nëntituj MPSub + MPSub-undertexter + субтитри MPSub + Phụ đề MPSub + MPSub 字幕 + MPSub 字幕 + MPSub + MPlayer Subtitle + + + + + + + + SSA subtitles + ترجمات SSA + Subtytry SSA + Субтитри — SSA + subtítols SSA + Titulky SSA + SSA-undertekster + SSA-Untertitel + SSA-subtekstoj + subtítulos SSA + SSA azpitituluak + SSA-tekstitykset + SSA undirtekstir + sous-titres SSA + fotheidil SSA + Subtitulos SSA + כתובית SSA + SSA feliratok + Subjudul SSA + Sottotitoli SSA + SSA 字幕 + SSA субтитрлары + SSA 자막 파일 + SSA subtitrai + SSA subtitri + SSA undertekst + SSA-ondertitels + SSA-teksting + Napisy SSA + Legenda SSA + Subtitrări SSA + субтитры SSA + Titulky SSA + Datoteka podnapisov SSA + Nëntituj SSA + SSA-undertexter + субтитри SSA + Phụ đề SSA + SSA 字幕 + SSA 字幕 + SSA + SubStation Alpha + + + + + + + + + + SubViewer subtitles + ترجمات SubViewer + Subtytry SubViewer + Субтитри — SubViewer + subtítols SubViewer + Titulky SubViewer + SubViewer-undertekster + SubViewer-Untertitel + SubViewer-subtekstoj + subtítulos SubViewer + SubViewer azpitituluak + SubViewer-tekstitykset + SubViewer undirtekstir + sous-titres SubViewer + fotheidil SubViewer + subtítulos SubViewer + כתוביות של SubViewe + SubViewer feliratok + Subjudul SubViewer + Sottotitoli SubViewer + SubViewer 字幕 + SubViewer субтитрлары + SubViewer 자막 파일 + SubViewer subtitrai + SubViewer subtitri + SubViewer undertekst + SubViewer-ondertitels + SubViewer-teksting + Napisy SubViewer + Legendas SubViewer + Subtitrare SubViewer + субтитры SubViewer + Titulky SubViewer + Datoteka podnapisov SubViewer + Nëntituj SubViewer + SubViewer-undertexter + субтитри SubViewer + Phụ đề SubViewer + SubViewer 字幕 + SubViewer 字幕 + + + + + + + + iMelody ringtone + نغمة iMelody + Rington iMelody + Аудио — iMelody + to de trucada iMelody + Vyzváněcí melodie iMelody + iMelody-ringetone + iMelody-Klingelton + tono de llamada iMelody + iMelody doinua + iMelody-soittoääni + iMelody ringitóni + sonnerie iMelody + ton buailte iMelody + Melodía de iMelody + רינגטון של iMelody + iMelody csengőhang + nada dering iMelody + Suoneria iMelody + iMelody リングトーン + iMelody әуені + iMelody 벨소리 + iMelody skambučio melodija + iMelody melodija + iMelody ringetone + iMelody-beltoon + iMelody-ringetone + Dzwonek iMelody + Toque de celular do iMelody + Sonerie iMelody + мелодия iMelody + Vyzváňacie melódie iMelody + Zvonjenje iMelody + Zile iMelody + iMelody-ringsignal + рінгтон iMelody + tiếng réo iMelody + iMelody 铃声 + iMelody 鈴聲 + + + + + + + + + + SMAF audio + SMAF سمعي + Aŭdyjo SMAF + Аудио — SMAF + àudio SMAF + Zvuk SMAF + SMAF-lyd + SMAF-Audio + SMAF-sondosiero + sonido SMAF + SMAF audioa + SMAF-ääni + SMAF ljóður + audio SMAF + fuaim SMAF + son SMAF + שמע SMAF + SMAF hang + Audio SMAF + Audio SMAF + SMAF オーディオ + SMAF аудиосы + SMAF 오디오 + SMAF garso įrašas + SMAF audio + SMAF-lyd + SMAF-audio + SMAF-lyd + Plik dźwiękowy SMAF + Áudio SMAF + Audio SMAF + аудио SMAF + Zvuk SMAF + Zvočna datoteka SMAF + Audio SMAF + SMAF-ljud + звук SMAF + Âm thanh SMAF + SMAF 音频 + SMAF 音訊 + SMAF + Synthetic music Mobile Application Format + + + + + + + + + + MRML playlist + قائمة تشغيل MRML + Śpis piesień MRML + Списък за изпълнение — MRML + llista de reproducció MRML + Seznam skladeb MRML + MRML-afspilningsliste + MRML-Wiedergabeliste + MRML-ludlisto + lista de reproducción MRML + MRML erreprodukzio-zerrenda + MRML-soittolista + MRML avspælingarlisti + liste de lecture MRML + seinmliosta MRML + lista de reprodución MRML + רשימת השמעה MRML + MRML-lejátszólista + Senarai putar MRML + Scaletta MRML + MPML 再生リスト + MRML ойнау тізімі + MRML 재생 목록 + MRML grojaraštis + MRML repertuārs + MRML-spilleliste + MRML-afspeellijst + MRML-speleliste + Lista odtwarzania MRML + Lista de reprodução do MRML + Listă redare MRML + список воспроизведения MRML + Zoznam skladieb MRML + Seznam predvajanja MRML + Listë titujsh MRML + MRML-spellista + список відтворення MRML + Danh mục nhạc MRML + MRML 播放列表 + MRML 播放清單 + MRML + Multimedia Retrieval Markup Language + + + + + + + + XMF audio + XMF سمعي + Aŭdyjo XMF + Аудио — XMF + àudio XMF + Zvuk XMF + XMF-lyd + XMF-Audio + XMF-sondosiero + sonido XMF + XMF audioa + XMF-ääni + XMF ljóður + audio XMF + fuaim XMF + son XMF + שמע XMF + XMF hang + Audio XMF + Audio XMF + XMF オーディオ + XMF аудиосы + XMF 오디오 + XMF garso įrašas + XMF audio + XMF-lyd + XMF-audio + XMF-lyd + Plik dźwiękowy XMF + Áudio XMF + Audio XMF + аудио XMF + Zvuk XMF + Zvočna datoteka XMF + Audio XMF + XMF-ljud + звук XMF + Âm thanh XMF + XMF 音频 + XMF 音訊 + XMF + eXtensible Music Format + + + + + + + + + + SV4 CPIO archive + أرشيف SV4 CPIO + SV4 CPIO arxivi + Archiŭ SV4 CPIO + Архив — SV4 CPIO + arxiu CPIO SV4 + Archiv SV4 CPIO + Archif CPIO SV4 + SV4 CPIO-arkiv + SV4-CPIO-Archiv + αρχείο SV4 CPIO + SV4 CPIO archive + SV4-CPIO-arkivo + archivador SV4 CPIO + SV4 CPIO artxiboa + SV4 CPIO -arkisto + SV4 CPIO skjalasavn + archive SV4 CPIO + cartlann SV4 CPIO + arquivo SV4 CPIO + ארכיון של SV4 SPIO + SV4 CPIO-archívum + Arsip SV4 CPIO + Archivio SV4 CPIO + SV4 CPIO アーカイブ + SV4 CPIO архиві + SV4 CPIO 묶음 파일 + SV4 CPIO archyvas + SV4 CPIO arhīvs + Arkib CPIO SV4 + SV4 CPIO-arkiv + SV4 CPIO-archief + SV4 CPIO-arkiv + Archiwum SV4 CPIO + ficheiro SV4 CPIO + Pacote SV4 CPIO + Arhivă SV4 CPIO + архив SV4 CPIO + Archív SV4 CPIO + Datoteka arhiva SV4 CPIO + Arkiv SV4 CPIO + SV4 CPIO архива + SV4 CPIO-arkiv + архів SV4 CPIO + Kho nén CPIO SV4 + SV4 CPIO 归档文件 + SV4 CPIO 封存檔 + + + + + SV4 CPIO archive (with CRC) + أرشيف SV4 CPIO (مع CRC) + Archiŭ SV4 CPIO (z CRC) + Архив — SV4 CPIO, проверка за грешки CRC + arxiu CPIO SV4 (amb CRC) + Archiv SV4 CPIO (s CRC) + SV4 CPIO-arkiv (med CRC) + SV4-CPIO-Archiv (mit CRC) + αρχείο SV4 CPIO (με CRC) + SV4-CPIO-arkivo (kun CRC) + archivador SV4 CPIO (con CRC) + SV4 CPIO artxiboa (CRC-rekin) + SV4 CPIO -arkisto (CRC:llä) + SV4 CPIO skjalasavn (við CRC) + archive SV4 CPIO (avec CRC) + cartlann SV4 CPIO (le CRC) + Arquivador SV4 CPIO (con CRC) + ארכיון של SV4 SPIO (עם CRC) + SV4 CPIO-archívum (CRC-vel) + Arsip SV4 CPIO (dengan CRC) + Archivio SV4 CPIO (con CRC) + SV4 CPIO アーカイブ (CRC 有り) + SV4 CPIO архиві (CRC бар) + SV4 CPIO 묶음 파일 (CRC 포함) + SV4 CPII archyvas (su CRC) + SV4 CPIO arhīvs (ar CRC) + Arkib CPIO SV4 (dengan CRC) + SV4 CPIO-arkiv (med CRC) + SV4 CPIO-archief (met CRC) + SV4 CPIO arkiv (med CRC) + Archiwum SV4 CPIO (z sumą kontrolną) + Pacote SV4 CPIO (com CRC) + Arhivă SV4 CPIO (cu CRC) + архив SV4 CPIP (с CRC) + Archív SV4 CPIO (s CRC) + Datoteka arhiva SV4 CPIO (z razpršilom CRC) + Arkiv SV4 CPIO (me CRC) + SV4 CPIO-arkiv (med CRC) + архів SV4 CPIO (з CRC) + Kho nén CPIO SV4 (với CRC) + SV4 CPIP 归档文件(带有 CRC) + SV4 CPIO 封存檔 (具有 CRC) + + + + + Tar archive + أرشيف Tar + Tar arxivi + Archiŭ tar + Архив — tar + arxiu tar + Archiv tar + Archif tar + Tar-arkiv + Tar-Archiv + archivador Tar + Tar artxiboa + Tar-arkisto + Tar skjalasavn + archive tar + cartlann Tar + arquivo Tar + ארכיון Tar + Tar archívum + Arsip Tar + Archivio tar + Tar アーカイブ + Tar архиві + TAR 묶음 파일 + Tar archyvas + Tar arhīvs + Arkib Tar + Tar-arkiv + Tar-archief + Tar-arkiv + Archiwum tar + Pacote tar + Arhivă Tar + архив TAR + Archív tar + Datoteka arhiva Tar + Arkiv tar + Тар архива + Tar-arkiv + архів tar + Kho nén tar + Tar 归档文件 + Tar 封存檔 + + + + + + + + + + + + Tar archive (compressed) + أرشيف Tar (مضغوط) + Archiŭ tar (skampresavany) + Архив — tar, компресиран + arxiu tar (comprimit) + Archiv tar (komprimovaný) + Tar-arkiv (komprimeret) + Tar-Archiv (komprimiert) + archivador Tar (comprimido) + Tar artxiboa (konprimitua) + Tar-arkisto (pakattu) + Tar skjalasavn (stappað) + archive tar (compressée) + cartlann Tar (comhbhrúite) + arquivo Tar (comprimido) + ארכיון Tar (מכווץ) + Tar archívum (tömörített) + Arsip Tar (terkompresi) + Archivio tar (compresso) + Tar アーカイブ (compress 圧縮) + Tar архиві (сығылған) + TAR 묶음 파일 (압축) + Tar archyvas (suglaudintas) + Tar arhīvs (saspiests) + Tar-arkiv (komprimert) + Tar-archief (ingepakt) + Tar-arkiv (pakka) + Archiwum tar (skompresowane) + Pacote tar (compactado) + Arhivă Tar (comprimată) + архив TAR (сжатый) + Archív tar (komprimovaný) + Datoteka arhiva Tar (stisnjen) + Arkiv tar (i kompresuar) + Tar-arkiv (komprimerat) + архів tar (стиснений) + Kho nén tar (đã nén) + Tar 归档文件(压缩) + Tar 封存檔 (UNIX 格式壓縮) + + + + + generic font file + ملف الخط العام + zvyčajny fajł šryftu + Шрифт + fitxer genèric de tipus de lletra + Obecný soubor písma + general skrifttypefil + Allgemeine Schriftdatei + γενικό αρχείο γραμματοσειράς + generic font file + genera tipara dosiero + tipografía genérico + letra-tipo orokorra + yleinen kirjasintiedosto + felagsstavasniðsfíla + fichier de polices générique + comhad cló ginearálta + ficheiro de tipo de fonte xenérica + קובץ גופן גנרי + általános betűkészletfájl + berkas fonta generik + File tipo carattere generico + 一般フォントファイル + қаріп файлы + 일반 글꼴 파일 + bendras šrifto failas + vispārējs fonta fails + Fail font generik + vanlig skriftfil + algemeen lettertypebestand + vanleg skrifttypefil + Zwykły plik czcionki + ficheiro genérico de tipo de letra + arquivo de fonte genérico + fișier de font generic + файл шрифта + Obyčajný súbor písma + izvorna datoteka pisave + File lloj gërme i përgjithshëm + општа датотека фонта + allmän typsnittsfil + загальний файл шрифту + tập tin phông giống loài + 通用字体文件 + 通用字型檔 + + + + + packed font file + ملف الخط المرزم + zapakavany fajł šryftu + Шрифт — компресиран + fitxer empaquetat de tipus de lletra + Komprimovaný soubor písma + pakket skrifttypefil + Gepackte Schriftdatei + αρχείο συμπιεσμένης γραμματοσειράς + packed font file + pakigita tipara dosiero + archivo de tipografía empaquetada + Letra-tipo fitxategi paketatua + pakattu kirjasintiedosto + pakkað stavasniðsfíla + fichier de polices empaquetées + comhad cló pacáilte + ficheiro de fonte empaquetada + קובץ גופן ארוז + packed font-fájl + berkas fonta terkemas + File tipo carattere condensato + パックされたフォントファイル + қаріп файлы (дестеленген) + 글꼴 묶음 파일 + supakuotas šrifto failas + sapakots fonta fails + Fail font dipek + pakket skriftfil + ingepakt lettertypebestand + pakka skrifttypefil + Plik ze spakowaną czcionką + ficheiro de fontes empacotadas + arquivo de fonte empacotado + fișier font împachetat + сжатый файл шрифта + Komprimovaný súbor písma + pakirana datoteka pisave + File lloj gërmash i kondensuar + пакована датотека са фонтом + packad typsnittsfil + запакований файл шрифту + tập tin phông chữ đã đóng gói + 打包的字体文件 + 包裝字型檔 + + + + + TGIF document + مستند TGIF + Dakument TGIF + Документ — TGIF + document TGIF + Dokument TGIF + TGIF-dokument + TGIF-Dokument + Σχέδιο TGIF + TGIF document + TGIF-dokumento + documento TGIF + TGIF dokumentua + TGIF-asiakirja + TGIF skjal + document TGIF + cáipéis TGIF + documento TGIF + מסמך TGIF + TGIF-dokumentum + Dokumen TGIF + Documento TGIF + TGIF ドキュメント + TGIF құжаты + TGIF 문서 + TGIF dokumentas + TGIF dokuments + Dokumen TGIF + TGIF-dokument + TGIF-document + TGIF-dokument + Dokument TGIF + documento TGIF + Documento TGIF + Document TGIF + документ TGIF + Dokument TGIF + Dokument TGIF + Dokument TGIF + TGIF документ + TGIF-dokument + документ TGIF + Tài liệu TGIF + TGIF 文档 + TGIF 文件 + + + + + + + + theme + سمة + örtük + matyŭ + Тема + tema + Motiv + thema + tema + Thema + Θέμα + theme + etoso + tema + gaia + teema + tema + thème + téama + tema + ערכת נושא + téma + tema + Tema + テーマ + тема + 테마 + tema + tēma + Tema + tema + thema + drakt + Motyw + tema + tema + temă + тема + Motív + tema + Temë + тема + tema + тема + sắc thái + 主题 + 佈景主題 + + + + + + ToutDoux document + مستند ToutDoux + ToutDoux sənədi + Dakument ToutDoux + Документ — ToutDoux + document ToutDoux + Dokument ToutDoux + Dogfen ToutDoux + ToutDoux-dokument + ToutDoux-Dokument + έγγραφο ToutDoux + ToutDoux document + ToutDoux-dokumento + documento de ToutDoux + ToutDoux dokumentua + ToutDoux-asiakirja + ToutDoux skjal + document ToutDoux + cáipéis ToutDoux + documento de ToutDoux + משמך של ToutDoux + ToutDoux-dokumentum + Dokumen ToutDoux + Documento ToutDoux + ToutDoux ドキュメント + ToutDoux құжаты + ToutDoux 문서 + ToutDoux dokumentas + ToutDoux dokuments + Dokumen ToutDoux + ToutDoux-dokument + ToutDoux-document + ToutDoux-dokument + Dokument ToutDoux + documento ToutDoux + Documento do ToutDoux + Document ToutDoux + документ ToutDoux + Dokument ToutDoux + Dokument ToutDoux + Dokument ToutDoux + ToutDoux документ + ToutDoux-dokument + документ ToutDoux + Tài liệu ToutDoux + ToutDoux 文档 + ToutDoux 文件 + + + + backup file + ملف النسخ الاحتياطي + zapasny fajł + Резервно копие + fitxer de còpia de seguretat + Záložní soubor + sikkerhedskopi + Sicherungsdatei + αντίγραφο ασφαλείας + backup file + restaŭrkopio + archivo de respaldo + babes-kopiako fitxategia + varmuuskopio + trygdarritsfíla + fichier de sauvegarde + comhad cúltaca + ficheiro de copia de seguridade + קובץ גיבוי + biztonsági mentés + berkas cadangan + File di backup + バックアップファイル + резервті көшірмесі + 백업 파일 + atsarginis failas + rezerves fails + Fail backup + sikkerhetskopi + reservekopiebestand + tryggleikskopi + Plik zapasowy + cópia de segurança + Arquivo de backup + fișier de backup + резервная копия + Záložný súbor + varnostna kopija datoteke + File backup + резервна копија + säkerhetskopia + резервна копія + tập tin sao lưu + 备份文件 + 備份檔 + + + + + + + + Troff document + مستند Troff + Troff sənədi + Dakument Troff + Документ — Troff + document Troff + Dokument troff + Dogfen troff + Troffdokument + Troff-Dokument + έγγραφο troff + Troff document + Troff-dokumento + documento troff + Troff dokumentua + Troff-asiakirja + Troff skjal + document Troff + cáipéis Troff + documento Troff + מסמך Troff + Troff-dokumentum + Dokumen Troff + Documento Troff + Troff 入力ドキュメント + Troff құжаты + Troff 문서 + Troff dokumentas + Troff dokuments + Dokumen Troff + Troff-dokument + Troff-document + Troff-dokument + Dokument Troff + documento Troff + Documento troff + Document Troff + документ Troff + Dokument troff + Dokument Troff + Dokument Troff + Troff документ + Troff-dokument + документ Troff + Tài liệu Troff + Troff 文档 + Troff 文件 + + + + + + + + + + + + + + + Troff document (with manpage macros) + مستند Troff (مع اختصارات صفحة المساعدة) + Dakument Troff (z makrasam man-staronak) + Документ — Troff, с макроси за справочни страници + document Troff (amb macros de pàgines de manual) + Dokument troff (s makry pro manuálové stránky) + Troffdokument (med manualsidemakroer) + Troff-Dokument (mit man-Seitenmakros) + έγγραφο troff (με μακροεντολές manpage) + Troff document (with manpage macros) + Troff-dokumento (kun manpaĝaj makrooj) + documento troff (con macros de páginas de manual) + Troff dokumentua (manpage makroekin) + Troff-asiakirja (man-sivu-makroilla) + Troff skjal (við manpage fjølvi) + document Troff (avec macros manpage) + cáipéis Troff (le macraí manpage) + documento Troff (con macros de páxinas de manual) + מסמך של Troff (עם מאקרו בmanpage) + Troff-dokumentum (manpage-makrókkal) + Dokumen Troff (dengan makro halaman manual) + Documento Troff (con macro per manpage) + Troff 入力ドキュメント (man ページマクロ有り) + Troff құжаты (әдістемелік парақтар макростарымен) + Troff 문서 (맨페이지 매크로 포함) + Troff dokumentas (su žin. puslapių makrokomandomis) + Troff dokuments (ar manpage makrosiem) + Dokumen Troff (dengan macros halaman man) + Troff-dokument (med manualsidemakroer) + Troff-document (met man-macro's) + Troff-dokument med manualside-makroar + Dokument Troff (z makrami stron pomocy) + documento Troff (com macros manpage) + Documento troff (com macros de páginas de manual) + Document Troff (cu macro-uri manpage) + документ Troff (с макросами страниц руководства) + Dokument troff (s makrami pre manuálové stránky) + Dokument Troff (z makroji manpage) + Dokumet Troff (me makro për manpage) + Troff документ (са макроима за ман странице) + Troff-dokument (med manualsidemakron) + документ Troff (з макросами manpage) + Tài liệu Troff (có vĩ lệnh trang hướng dẫn) + Troff 文档(带 Man 手册宏) + Troff 文件 (含有手冊頁面巨集) + + + + + + manual page (compressed) + صفحة المساعدة (مضغوطة) + man səhifəsi (sıxışdırılmış) + staronka dapamohi (skampresavanaja) + Страница от справочника, компресирана + pàgina de manual (comprimida) + Manuálová stránka (komprimovaná) + tudalen llawlyfr (wedi ei gywasgu) + manualside (komprimeret) + Handbuchseite (komprimiert) + σελίδα οδηγιών (συμπιεσμένη) + manual page (compressed) + manpaĝo (kunpremita) + página de manual (comprimida) + eskuliburu orria (konprimitua) + manuaalisivu (pakattu) + handbókasíða (stappað) + page de manuel (compressée) + leathanach lámhleabhair (comhbhrúite) + páxina de manual (comprimida) + דף עזר (מכווץ) + kézikönyvoldal (tömörített) + halaman manual (terkompresi) + Pagina di manuale (compressa) + (圧縮) man ページ + әдістемелік парағы (сығылған) + 설명서 페이지 (압축) + žinyno puslapis (suglaudintas) + rokasgrāmatas lapa (saspiesta) + Halaman manual (termampat) + manualside (komprimert) + handleidingspagina (ingepakt) + manualside (pakka) + Strona podręcznika (skompresowana) + página de manual (comprimida) + página de manual (compactada) + pagină de manual (comprimată) + страница руководства (сжатая) + Manuálová stránka (komprimovaná) + stran priročnika (stisnjena) + Faqe manuali (e kompresuar) + страна упутства (компресована) + manualsida (komprimerad) + сторінка посібника (стиснена) + trang hướng dẫn (đã nén) + 手册页 (压缩) + 手冊頁面 (壓縮版) + + + + Tar archive (LZO-compressed) + أرشيف Tar (مضغوط-LZO) + Archiŭ tar (LZO-skampresavany) + Архив — tar, компресиран с LZO + arxiu tar (comprimit amb LZO) + Archiv tar (komprimovaný pomocí LZO) + Tar-arkiv (LZO-komprimeret) + Tar-Archiv (LZO-komprimiert) + archivador Tar (comprimido con LZO) + Tar artxiboa (LZO-rekin konprimitua) + Tar-arkisto (LZO-pakattu) + Tar skjalasavn (LZO-stappað) + archive tar (compression LZO) + cartlann Tar (comhbhrúite le LZO) + arquivo Tar (comprimido con LZO) + ארכיון Tar (מכווץ ע"י LZO) + Tar archívum (LZO-val tömörítve) + Arsip Tar (terkompresi LZO) + Archivio tar (compresso con LZO) + Tar アーカイブ (LZO 圧縮) + Tar архиві (LZO-мен сығылған) + TAR 묶음 파일 (LZO 압축) + Tar archyvas (suglaudintas su LZO) + Tar arhīvs (saspiests ar LZO) + Tar-arkiv (LZO-komprimert) + Tar-archief (ingepakt met LZO) + Tar-arkiv (pakka med LZO) + Archiwum tar (kompresja LZO) + Pacote tar (compactado com LZO) + Arhivă Tar (comprimată LZO) + архив TAR (сжатый LZO) + Archív tar (komprimovaný pomocou LZO) + Datoteka arhiva Tar (stisnjen z LZO) + Arkiv tar (i kompresuar me LZO) + Tar-arkiv (LZO-komprimerat) + архів tar (стиснений LZO) + Kho nén tar (đã nén LZO) + Tar 归档文件(LZO 压缩) + Tar 封存檔 (LZO 格式壓縮) + + + + + + XZ archive + أرشيف XZ + Архив — XZ + arxiu XZ + Archiv XZ + XZ-arkiv + XZ-Archiv + XZ-arkivo + archivador XZ + XZ artxiboa + XZ-arkisto + XZ skjalasavn + archive XZ + cartlann XZ + ficheiro XZ + ארכיון XZ + XZ-archívum + Arsip XZ + Archivio XZ + XZ アーカイブ + XZ архиві + XZ 압축 파일 + XZ archyvas + XZ arhīvs + Archiwum XZ + Arhivă XZ + архив XZ + Archív XZ + Datoteka arhiva XZ + XZ-arkiv + архів XZ + XZ 归档文件 + XZ 封存檔 + + + + + + + + Tar archive (XZ-compressed) + أرشيف Tar (مضغوط-XZ) + Архив — tar, компресиран с XZ + arxiu tar (comprimit amb XZ) + Archiv tar (komprimovaný pomocí XZ) + Tar-arkiv (XZ-komprimeret) + Tar-Archiv (XZ-komprimiert) + archivador Tar (comprimido con XZ) + Tar artxiboa (XZ-rekin konprimitua) + Tar-arkisto (XZ-pakattu) + Tar skjalasavn(XZ-stappað) + archive tar (compression XZ) + cartlann Tar (comhbhrúite le XZ) + arquivo Tar (comprimido con XZ) + ארכיון Tar (מכווץ ע"י XZ) + Tar archívum (XZ-vel tömörítve) + Arsip Tar (terkompresi XZ) + Archivio tar (compresso con XZ) + Tar アーカイブ (XZ 圧縮) + Tar архиві (XZ-мен сығылған) + TAR 묶음 파일 (XZ 압축) + Tar archyvas (suglaudintas su XZ) + Tar arhīvs (saspiests ar XZ) + Archiwum tar (kompresja XZ) + Arhivă Tar (comprimată XZ) + архив TAR (сжатый XZ) + Archív tar (komprimovaný pomocou XZ) + Datoteka arhiva Tar (stisnjen z XZ) + Tar-arkiv (XZ-komprimerat) + архів tar (стиснений XZ) + Tar 归档文件(XZ 压缩) + Tar 封存檔 (XZ 格式壓縮) + + + + + + PDF document (XZ-compressed) + Документ — PDF, компресиран с XZ + document PDF (comprimit amb XZ) + Dokument PDF (komprimovaný pomocí XZ) + PDF-Dokument (XZ-komprimiert) + Documento PDF (comprimido en XZ) + PDF-asiakirja (XZ-pakattu) + document PDF (compressé XZ) + documento PDF (comprimido en XZ) + מסמך PDF (בדחיסת XZ) + PDF dokumentum (XZ-vel tömörített) + Dokumen PDF (terkompresi XZ) + Documento PDF (compresso con XZ) + PDF 文書(XZ 圧縮) + PDF құжаты (XZ-мен сығылған) + PDF 문서 (XZ 압축) + PDF dokuments (saspiests ar XZ) + Dokument PDF (kompresja XZ) + документ PDF (сжатый XZ) + Dokument PDF (XZ-stisnjen) + PDF-dokument (XZ-komprimerad) + документ PDF (стиснений xz) + PDF 文档(XZ) + PDF 文件 (XZ 格式壓縮) + + + + + + Ustar archive + أرشيف Ustar + Archiŭ ustar + Архив — ustar + arxiu ustar + Archiv ustar + Ustararkiv + Ustar-Archiv + Ustar-arkivo + archivador Ustar + Ustar artxiboa + Ustar-arkisto + Ustar skjalasavn + archive Ustar + cartlann Ustar + arquivo Ustar + ארכיון Ustar + Ustar archívum + Arsip Ustar + Archivio ustar + Ustar アーカイブ + Ustar архиві + Ustar 묶음 파일 + Ustar archyvas + Ustar arhīvs + Ustar-arkiv + Ustar-archief + Ustar-arkiv + Archiwum ustar + Pacote Ustar + Arhivă Ustar + архив Ustar + Archív ustar + Datoteka arhiva Ustar + Arkiv Ustar + Ustar-arkiv + архів ustar + Kho nén ustar + Ustar 归档文件 + Ustar 封存檔 + + + + + WAIS source code + شفرة مصدر WAIS + WAIS mənbə faylı + Kryničny kod WAIS + Изходен код — WAIS + codi font en WAIS + Zdrojový kód WAIS + Ffynhonnell Rhaglen WAIS + WAIS-kildekode + WAIS-Quelltext + πηγαίος κώδικας WAIS + WAIS source code + WAIS-fontkodo + código fuente WAIS + WAIS iturburu-kodea + WAIS-lähdekoodi + WAIS keldukota + code source WAIS + cód foinseach WAIS + código fonte WAIS + קוד מקור של WAIS + WAIS-forráskód + Kode program WAIS + Codice sorgente WAIS + WAIS ソースコード + WAIS бастапқы коды + WAIS 소스 코드 + WAIS pradinis kodas + WAIS pirmkods + Kod sumber WAIS + WAIS-kildekode + WAIS-broncode + WAIS-kjeldekode + Plik źródłowy WAIS + código fonte WAIS + Código fonte WAIS + Cod sursă WAIS + исходный код WAIS + Zdrojový kód WAIS + Datoteka izvorne kode WAIS + Kod burues WAIS + WAIS изворни ко̂д + WAIS-källkod + вихідний код мовою WAIS + Mã nguồn WAIS + WAIS 源代码 + WAIS 源代碼 + + + + + WordPerfect/Drawperfect image + صورة WordPerfect/Drawperfect + Vyjava WordPerfect/Drawperfect + Изображение — WordPerfect/Drawperfect + imatge de WordPerfect/Drawperfect + Obrázek WordPerfect/Drawperfect + WordPerfect/Drawperfect-billede + WordPerfect/DrawPerfect-Bild + εικόνα WordPerfect/Drawperfect + WordPerfect/Drawperfect image + WordPerfect/Drawperfect-bildo + imagen de WordPerfect/Drawperfect + WordPerfect/Drawperfect irudia + WordPerfect/Drawperfect-kuva + WordPerfect/Drawperfect mynd + image WordPerfect/DrawPerfect + íomhá WordPerfect/Drawperfect + imaxe de WordPerfect/DrawPerfect + תמונה של WordPerfect/Drawperfect + WordPerfect/Drawperfect-kép + Gambar WordPerfect/Drawperfect + Immagine WordPerfect/Drawperfect + WordPerfect/Drawperfect 画像 + WordPerfect/Drawperfect суреті + 워드퍼펙트/드로우퍼펙트 그림 + WordPerfect/Drawperfect paveikslėlis + WordPerfect/Drawperfect attēls + Imej WordPerfect/Drawperfect + WordPerfect-/Drawperfect-bilde + WordPerfect/Drawperfect-afbeelding + WordPerfect/DrawPerfect-bilete + Obraz WordPerfect/DrawPerfect + imagem do WordPerfect/Drawperfect + Imagem do WordPerfect/Drawperfect + Imagine WordPerfect/Drawperfect + изображение WordPerfect/Drawperfect + Obrázok WordPerfect/Drawperfect + Slikovna datoteka Drawperfect + Figurë WordPerfect/Drawperfect + WordPerfect/Drawperfect слика + WordPerfect/Drawperfect-bild + зображення WordPerfect/Drawperfect + Ảnh WordPerfect/Drawperfect + WordPerfect/Drawperfect 图像 + WordPerfect/Drawperfect 影像 + + + + + DER/PEM/Netscape-encoded X.509 certificate + شهادة DER/PEM/Netscape-encoded X.509 + Sertyfikat X.509, zakadavany ŭ DER/PEM/Netscape + Сертификат — DER/PEM/Netscape X.509 + certificat X.509 codificat com DER/PEM/Netscape + Certifikát X.509 kódovaný jako DER/PEM/Netscape + DER-/PEM-/Netscapekodet X.509-certifikat + DER/PEM/Netscape-kodiertes X.509-Zertifikat + ψηφιακό πιστοποιητικό X.509 κωδικοποιημένο κατά DER/PEM/Netscape + DER/PEM/Netscape-encoded X.509 certificate + DER/PEM/Netscape-kodigita X.509-certigilo + certificado X.509 codificado con DER/PEM/Netscape + X.509rekin kodetutako DER, PEM edo Netscape zertifikatua + DER/PEM/Netscape-koodattu X.509-varmenne + DER/PEM/Netscape-encoded X.509 váttan + certificat X.509 codé DER/PEM/Netscape + teastas X.509 ionchódaithe le DER/PEM/Netscape + certificado X.509 codificado con DER/PEM/Netscape + אישור מסוג X.509 של DER/PEM/Netscape-encoded + DER/PEM/Netscape formátumú X.509-tanúsítvány + Sertifikat DER/PEM/Netscape-tersandi X.509 + Certificato DER/PEM/Netscape-encoded X.509 + DER/PEM/Netscape エンコード X.509 証明書 + X.509 сертификаты (DER/PEM/Netscape кодталған) + DER/PEM/X.509로 인코드된 넷스케이프 인증서 + DER/PEM/Netscape-encoded X.509 liudijimas + DER/PEM/Netscape-encoded X.509 sertifikāts + Sijil X.509 dienkod /DER/PEM/Netscape + DER/PEM/Netscape-kodet X.509-sertifikat + DER/PEM/Netscape-gecodeerd X.509-certificaat + DER/PEM/Netscape-koda X.509-sertifikat + Zakodowany w DER/PEM/Netscape certyfikat X.509 + certificado X.509 codificado com DER/PEM/Netscape + Certificado X.509 codificado com DER/PEM/Netscape + Certificat DER/PEM/Netscape-codat X.509 + сертификат X.509 (DER/PEM/Netscape-закодированный) + Certifikát X.509 kódovaný ako DER/PEM/Netscape + Datoteka potrdila DER/PEM/Netscape X.509 + Çertifikatë DER/PEM/Netscape-encoded X.509 + DER, PEM или Нетскејп кодирани сертификат X.509 + DER/PEM/Netscape-kodat X.509-certifikat + сертифікат X.509 у форматі DER/PEM/Netscape + Chứng nhận X.509 mã hoá bằng Netscape/PEM/DER + DER/PEM/Netscape-encoded X.509 证书 + DER/PEM/Netscape 編碼的 X.509 憑證 + + + + + + + + empty document + مستند فارغ + pusty dakument + Празен документ + document buit + Prázdný dokument + tomt dokument + Leeres Dokument + κενό έγγραφο + empty document + malplena dokumento + documento vacío + dokumentu hutsa + tyhjä asiakirja + tómt skjal + document vide + cáipéis fholamh + documeto baleiro + מסמך ריק + üres dokumentum + dokumen kosong + Documento vuoto + 空のドキュメント + бос құжат + 빈 문서 + tuščias dokumentas + tukšs dokuments + Dokumen kosong + tomt dokument + leeg document + tomt dokument + Pusty dokument + documento vazio + documento vazio + document gol + пустой документ + Prázdny dokument + prazen dokument + Dokument bosh + празан документ + tomt dokument + порожній документ + tài liệu rỗng + 空文档 + 空白文件 + + + Zoo archive + أرشيف Zoo + Zoo arxivi + Archiŭ zoo + Архив — zoo + arxiu zoo + Archiv zoo + Archif zoo + Zooarkiv + Zoo-Archiv + Zoo-arkivo + archivador Zoo + Zoo artxiboa + Zoo-arkisto + Zoo skjalasavn + archive zoo + cartlann Zoo + ficheiro Zoo + ארכיון Zoo + Zoo archívum + Arsip Zoo + Archivio zoo + Zoo アーカイブ + Zoo архиві + ZOO 압축 파일 + Zoo archyvas + Zoo arhīvs + Zoo-arkiv + Zoo-archief + Zoo-arkiv + Archiwum zoo + Pacote Zoo + Arhivă Zoo + архив ZOO + Archív zoo + Datoteka arhiva ZOO + Arkiv zoo + Zoo-arkiv + архів zoo + Kho nén zoo + Zoo 归档文件 + Zoo 封存檔 + + + + + + + + XHTML page + صفحة XHTML + Staronka XHTML + Страница — XHTML + pàgina XHTML + Stránka XHTML + XHTML-side + XHTML-Seite + σελίδα XHTML + XHTML page + XHTML-paĝo + página XHTML + XHTML orria + XHTML-sivu + XHTML síða + page XHTML + leathanach XHTML + Páxina XHTML + דף XHTML + XHTML-oldal + Halaman XHTML + Pagina XHTML + XHTML ページ + XHTML парағы + XHTML 페이지 + XHTML puslapis + XHTML lapa + Laman XHTML + XHTML-side + XHTML-pagina + XHTML-side + Strona XHTML + página XHTML + Página XHTML + Pagină XHTML + страница XHTML + Stránka XHTML + Datoteka spletne strani XHTML + Faqe XHTML + XHTML страна + XHTML-sida + сторінка XHTML + Trang XHTML + XHTML 页面 + XHTML 網頁 + XHTML + Extensible HyperText Markup Language + + + + + + + Zip archive + أرشيف Zip + Zip arxivi + Archiŭ zip + Архив — zip + arxiu zip + Archiv ZIP + Archif ZIP + Ziparkiv + Zip-Archiv + Zip-arkivo + archivador Zip + Zip artxiboa + Zip-arkisto + Zip skjalasavn + archive zip + cartlann Zip + ficheiro Zip + ארכיון Zip + Zip archívum + Arsip Zip + Archivio zip + Zip アーカイブ + Zip архиві + ZIP 압축 파일 + Zip archyvas + Zip arhīvs + Zip-arkiv + Zip-archief + Zip-arkiv + Archiwum ZIP + Pacote Zip + Arhivă zip + архив ZIP + Archív ZIP + Datoteka arhiva ZIP + Arkiv zip + Zip-arkiv + архів zip + Kho nén zip + Zip 归档文件 + Zip 封存檔 + + + + + + + + + + Windows Imaging Format Disk Image + Диск — Windows Imaging + imatge de disc «Windows Imaging Format» + Windows Imaging Format Disk Image + Windows Imaging Format-diskaftryk + Windows-Imaging-Format-Datenträgerabbild + imagen de disco de Windows Imaging Format + image disque Windows Imaging Format + imaxe de disco de Windows Imaging Format + מבנה תמונת כונן של Windows Imaging + Windows Imaging Format lemezkép + Image Disk Windows Imaging Format + Immagine disco formato Windows Imaging + Windows イメージング形式 ディスクイメージ + Windows Imaging Format Disk бейнесі + 윈도우 이미지 포맷 디스크 이미지 + Windows Imaging Format diska attēls + Obraz dysku Windows Imaging Format + Imagine de disc „Windows Imaging Format” + образ диска Windows + Odtis slike Windows Imaging + Windows Imaging Format Disk-avbild + формат образів дисків Windows Imaging + Windows Imaging 格式磁盘镜像 + Windows Imaging Format Disk 映像 + + + + + + + + Dolby Digital audio + Dolby Digital سمعي + Dolby Digital audio + Aŭdyjo Dolby Digital + Аудио — Dolby Digital + àudio Dolby Digital + Zvuk Dolby Digital + Sain Dolby Digital + Dolby Ditital-lyd + Dolby-Digital-Audio + ψηφιακός Ήχος Dolby + Dolby Digital audio + Sondosiero en Dolby Digital + sonido Dolby Digital + Dolby audio digitala + Dolby Digital -ääni + Dolby Digital ljóður + audio Dolby Digital + fuaim Dolby Digital + son Dolby Digital + שמע Dolby Digital + Dolby Digital hang + Audio Dolby Digital + Audio Dolby Digital + ドルビーデジタルオーディオ + Dolby Digital аудиосы + 돌비 디지털 오디오 + Dolby Digital garso įrašas + Dolby Digital audio + Audio Digital Dolby + Dolby digital lyd + Dolby Digital-audio + Dolby Digital lyd + Plik dźwiękowy Dolby Digital + áudio Dolby Digital + Áudio Dolby Digital + Audio Dolby Digital + аудио Dolby Digital + Zvuk Dolby Digital + Zvočna datoteka Dolby Digital + Audio Dolby Digital + Дигитални Dolby звучни запис + Dolby Digital-ljud + звук Dolby Digital + Âm thanh Dolby Digital + 杜比数字音频 + 杜比數位音訊 + + + + + + + AMR audio + AMR سمعي + Aŭdyjo AMR + Аудио — AMR + àudio AMR + Zvuk AMR + AMR-lyd + AMR-Audio + AMR-sondosiero + sonido AMR + AMR audioa + AMR-ääni + AMR ljóður + audio AMR + fuaim AMR + son AMR + שמע AMR + AMR hang + Audio AMR + Audio AMR + AMR オーディオ + AMR аудиосы + AMR 오디오 + AMR garso įrašas + AMR audio + AMR-lyd + AMR-audio + AMR-lyd + Plik dźwiękowy AMR + Áudio AMR + Audio AMR + аудио AMR + Zvuk AMR + Zvočna datoteka AMR + Audio AMR + AMR-ljud + звук AMR + Âm thanh AMR + AMR 音频 + AMR 音訊 + AMR + Adaptive Multi-Rate + + + + + + + + AMR-WB audio + AMR-WB سمعي + Aŭdyjo AMR-WB + Аудио — AMR-WB + àudio AMR-WB + Zvuk AMR-WB + AMR-WB-lyd + AMR-WB-Audio + AMR-WB-sondosiero + sonido AMR-WB + AMR-WB audioa + AMR-WB-ääni + AMR-WB ljóður + audio AMR-WB + fuaim AMR-WB + son AMR-WB + שמע AMR-WN + AMR-WB hang + Audio AMR-WB + Audio AMR-WB + AMR-WB オーディオ + AMR-WB аудиосы + AMR-WB 오디오 + AMR-WB garso įrašas + AMR-WB audio + AMR-WB-lyd + AMR-WB-audio + AMR-WB-lyd + Plik dźwiękowy AMR-WB + Áudio AMR-WB + Audio AMR-WB + аудио AMR-WB + Zvuk AMR-WB + Zvočna datoteka AMR-WB + Audio AMR-WB + AMR-WB-ljud + звук AMR-WB + Âm thanh AMR-WB + AMR-WB 音频 + AMR-WB 音訊 + AMR-WB + Adaptive Multi-Rate Wideband + + + + + + + + ULAW (Sun) audio + ULAW (صن) سمعي + ULAW (Sun) audio faylı + Aŭdyjo ULAW (Sun) + Аудио — ULAW, Sun + àudio ULAW (Sun) + Zvuk ULAW (Sun) + Sain ULAW (Sun) + ULAW-lyd (Sun) + ULAW-Audio (Sun) + ήχος ULAW (Sun) + ULAW (Sun) audio + ULAW-sondosiero (Sun) + sonido ULAW (Sun) + ULAW (sun) audioa + ULAW (Sun) -ääni + ULAW (Sun) ljóður + audio ULAW (Sun) + fuaim ULAW (Sun) + son ULAW (Sun) + שמע ULAW (של Sun) + ULAW (Sun) hang + Audio ULAW (Sun) + Audio ULAW (Sun) + ULAW (Sun) オーディオ + ULAW (Sun) аудиосы + ULAW (Sun) 오디오 + ULAW (Sun) garso įrašas + ULAW (Sun) audio + Audio ULAW (Sun) + ULAW-lyd (Sun) + (Sun) ULAW-audio + ULAW (Sun)-lyd + Plik dźwiękowy ULAW (Sun) + áudio ULAW (Sun) + Áudio ULAW (Sun) + Fișier audio ULAW (Sun) + аудио ULAW (Sun) + Zvuk ULAW (Sun) + Zvočna datoteka ULAW (Sun) + Audio ULAW (Sun) + ULAW (Sun) звучни запис + ULAW-ljud (Sun) + звук ULAW (Sun) + Âm thanh ULAW (Sun) + ULAW (Sun) 音频 + ULAW (Sun) 音訊 + + + + + + + + Commodore 64 audio + Commodore 64 سمعي + Aŭdyjo Commodore 64 + Аудио — Commodore 64 + àudio Commodore 64 + Zvuk Commodore 64 + Commodore 64-lyd + Commodore-64-Audio + ήχος Commodore 64 + Commodore 64 audio + Sondosiero de Commodore 64 + sonido de Commodore 64 + Commodore 64 Audioa + Commodore 64 -ääni + Commodore 64 ljóð + audio Commodore 64 + fuaim Commodore 64 + son de Commodore 64 + שמע של Commodore 64 + Commodore 64 hang + Audio Commodore 64 + Audio Commodore 64 + Commodore 64 オーディオ + Commodore 64 аудиосы + Commodore 64 오디오 + Commodore 64 garso įrašas + Commodore 64 audio + Audio Commodore 64 + Commodore 64-lyd + Commodore 64-audio + Commodore 64-lyd + Plik dźwiękowy Commodore 64 + áudio Commodore 64 + Áudio Commodore 64 + Audio Commodore 64 + аудио Commodore 64 + Zvuk Commodore 64 + Zvočna datoteka Commodore 64 + Audio Commodore 64 + Комодор 64 звучни запис + Commodore 64-ljud + звук Commodore 64 + Âm thanh Commodore 64 + Commodore 64 音频 + Commodore 64 音訊 + + + + + + + + PCM audio + سمعي PCM + PCM audio faylı + Aŭdyjo PCM + Аудио — PCM + àudio PCM + Zvuk PCM + Sain PCM + PCM-lyd + PCM-Audio + ήχος PCM + PCM audio + PCM-sondosiero + sonido PCM + PCM audioa + PCM-ääni + PCM ljóður + audio PCM + fuaim PCM + son PCM + שמע PCM + PCM hang + Audio PCM + Audio PCM + PCM オーディオ + PCM аудиосы + PCM 오디오 + PCM garso įrašas + PCM audio + Audio PCM + PCM-lyd + PCM-audio + PCM-lyd + Plik dźwiękowy PCM + áudio PCM + Áudio PCM + Audio PCM + аудио PCM + Zvuk PCM + Zvočna datoteka PCM + Audio PCM + PCM звучни запис + PCM-ljud + звук PCM + Âm thanh PCM + PCM 音频 + PCM 音訊 + + + + + + + + + + + + + + + + + + AIFC audio + AIFC سمعي + AIFC audio faylı + Aŭdyjo AIFC + Аудио — AIFC + àudio AIFC + Zvuk AIFC + Sain AIFC + AIFC-lyd + AIFC-Audio + ήχος AIFC + AIFC audio + AIFC-sondosiero + sonido AIFC + AIFC audioa + AIFC-ääni + AIFC ljóður + audio AIFC + fuaim AIFC + son AIFC + שמע AIFC + AIFC hang + Audio AIFC + Audio AIFC + AIFC オーディオ + AIFC аудиосы + AIFC 오디오 + AIFC garso įrašas + AIFC audio + Audio AIFC + AIFC-lyd + AIFC-audio + AIFC-lyd + Plik dźwiękowy AIFC + áudio AIFC + Áudio AIFC + Fișier audio AIFC + аудио AIFC + Zvuk AIFC + Zvočna datoteka AIFC + Audio AIFC + AIFC звучни запис + AIFC-ljud + звук AIFC + Âm thanh AIFC + AIFC 音频 + AIFC 音訊 + + + + + + AIFF/Amiga/Mac audio + AIFF/Amiga/Mac سمعي + AIFF/Amiga/Mac audio faylı + Aŭdyjo AIFF/Amiga/Mac + Аудио — AIFF/Amiga/Mac + àudio AIFF/Amiga/Mac + Zvuk AIFF/Amiga/Mac + Sain AIFF/Amiga/Mac + AIFF-/Amiga-/Maclyd + AIFF/Amiga/Mac-Audio + ήχος AIFF/Amiga/Mac + AIFF/Amiga/Mac audio + AIFF/Amiga/Mac-sondosiero + sonido AIFF/Amiga/Mac + AIFF/Amiga/Mac audioa + AIFF/Amiga/Mac-ääni + AIFF/Amiga/Mac ljóður + audio AIFF/Amiga/Mac + fuaim AIFF/Amiga/Mac + son AIFF/Amiga/Mac + שמע AIFF/Amiga/Mac + AIFF/Amiga/Mac hang + Audio AIFF/Amiga/Mac + Audio AIFF/Amiga/Mac + AIFF/Amiga/Mac オーディオ + AIFF/Amiga/Mac аудиосы + AIFF/Amiga/Mac 오디오 + AIFF/Amiga/Mac garso įrašas + AIFF/Amiga/Mac audio + Audio AIFF/Amiga/Mac + AIFF/Amiga/Mac-lyd + AIFF/Amiga/Mac-audio + AIFF/Amiga/Mac-lyd + Plik dźwiękowy AIFF/Amiga/Mac + áudio AIFF/Amiga/Mac + Áudio AIFF/Amiga/Mac + Audio AIFF/Amiga/Mac + аудио AIFF/Amiga/Mac + Zvuk AIFF/Amiga/Mac + Zvočna datoteka AIFF/Amiga/Mac + Audio AIFF/Amiga/Mac + AIFF/Амига/Мекинтош звучни запис + AIFF/Amiga/Mac-ljud + звук AIFF/Amiga/Mac + Âm thanh AIFF/Amiga/Mac + AIFF/Amiga/Mac 音频 + AIFF/Amiga/Mac 音訊 + + + + + + + + + + + AIFF audio + AIFF سمعي + AIFF audio faylı + Aŭdyjo AIFF + Аудио — AIFF + àudio AIFF + Zvuk AIFF + Sain AIFF + AIFF-lyd + AIFF-Audio + Ήχος AIFF + AIFF audio + AIFF-sondosiero + sonido AIFF + AIFF audioa + AIFF-ääni + AIFF ljóður + audio AIFF + fuaim AIFF + son AIFF + שמע AIFF + AIFF hang + Audio AIFF + Audio AIFF + AIFF オーディオ + AIFF аудиосы + AIFF 오디오 + AIFF garso įrašas + AIFF audio + Audio AIFF + AIFF-lyd + AIFF-audio + AIFF-lyd + Plik dźwiękowy AIFF + áudio AIFF + Áudio AIFF + Audio AIFF + аудио AIFF + Zvuk AIFF + Zvočna datoteka AIFF + Audio AIFF + AIFF звучни запис + AIFF-ljud + звук AIFF + Âm thanh AIFF + AIFF 音频 + AIFF 音訊 + + + Monkey's audio + Monkey سمعي + Aŭdyjo Monkey's + Аудио — Monkey + àudio Monkey + Zvuk Monkey's + Monkeys lyd + Monkey's-Audio + sonido Monkey + Monkey audioa + Monkey's Audio -ääni + Monkey's ljóður + audio Monkey + fuaim Monkey's + son de Monkey + שמע של Monkey's + Monkey hang + Audio Monkey + Audio Monkey's + Monkey's オーディオ + Monkey аудиосы + Monkey's 오디오 + Monkey garso įrašas + Monkey's audio + Monkey's-lyd + Monkey's-audio + Monkey's Audio-lyd + Plik dźwiękowy Monkey's Audio + Áudio Monkey's + Audio Monkey's + аудио Monkey's + Zvuk Monkey's + Zvočna datoteka Monkey + Audio Monkey's + Monkey's audio + звук Monkey's + Âm thanh cua Monkey + Monkey's audio 音频 + Monkey's 音訊 + + + + + + + Impulse Tracker audio + Impulse Tracker سمعي + Impulse Tracker audio faylı + Aŭdyjo Impulse Tracker + Аудио — Impulse Tracker + àudio d'Impulse Tracker + Zvuk Impulse Tracker + Sain Impulse Tracker + Impulse Tracker-lyd + Impulse-Tracker-Audio + ήχος Impulse Tracker + Impulse Tracker audio + Sondosiero de Impulse Tracker + sonido Impulse Tracker + Impulse Tracker audioa + Impulse Tracker -ääni + Impulse Tracker ljóður + audio Impulse Tracker + fuaim Impulse Tracker + son de Impulse Tracker + שמע של Impulse Tracker + Impulse Tracker hang + Audio Impulse Tracker + Audio Impulse Tracker + Impulse Tracker オーディオ + Impulse Tracker аудиосы + Impulse Tracker 오디오 + Impulse Tracker garso įrašas + Impulse Tracker audio + Audio Impulse Tracker + Impulse Tracker-lyd + Impulse Tracker-audio + Impulse Tracker lyd + Plik dźwiękowy Impulse Tracker + áudio Impulse Tracker + Áudio Impulse Tracker + Audio Impulse Tracker + аудио Impulse Tracker + Zvuk Impulse Tracker + Zvočna datoteka Impulse Tracker + Audio Impulse Tracker + Impulse Tracker звучни запис + Impulse Tracker-ljud + звук Impulse Tracker + Âm thanh Impulse Tracker + Impulse Tracker 音频 + Impulse Tracker 音訊 + + + + + + + FLAC audio + FLAC سمعي + Aŭdyjo FLAC + Аудио — FLAC + àudio FLAC + Zvuk FLAC + FLAC-lyd + FLAC-Audio + Ήχος FLAC + FLAC audio + FLAC-sondosiero + sonido FLAC + FLAC audioa + FLAC-ääni + FLAC ljóður + audio FLAC + fuaim FLAC + son FLAC + קובץ שמע מסוג FLAC + FLAC hang + Audio FLAC + Audio FLAC + FLAC オーディオ + FLAC аудиосы + FLAC 오디오 + FLAC garso įrašas + FLAC audio + Audio FLAC + FLAC-lyd + FLAC-audio + FLAC-lyd + Plik dźwiękowy FLAC + áudio FLAC + Áudio FLAC + Audio FLAC + аудио FLAC + Zvuk FLAC + Zvočna datoteka Flac + Audio FLAC + FLAC звучни запис + FLAC-ljud + звук FLAC + Âm thanh FLAC + FLAC 音频 + FLAC 音訊 + + + + + + + + WavPack audio + WavPack سمعي + Aŭdyjo WavPack + Аудио — WavPack + àudio WavPack + Zvuk WavPack + WavPack-lyd + WavPack-Audio + WavPack-sondosiero + sonido WavPack + WavPack audioa + WavPack-ääni + WavPack ljóður + audio WavPack + fuaim WavPack + son WavPack + שמע WavPack + WavPack hang + Audio WavPack + Audio WavPack + WavPack オーディオ + WavPack аудиосы + WavPack 오디오 + WavPack garso įrašas + WavPack audio + WavPack-lyd + WavPack-audio + WavPack-lyd + Plik dźwiękowy WavPack + Áudio WavPack + Audio WavPack + аудио WavPack + Zvuk WavPack + Zvočna datoteka WavPack + Audio WavPack + WavPack-ljud + звук WavPack + Âm thanh WavPack + WavPack 音频 + WavPack 音訊 + + + + + + + + WavPack audio correction file + ملف تصحيح WavPack السمعي + Fajł aŭdyjokarekcyi WavPack + Файл за корекции на аудио — WavPack + fitxer de correcció d'àudio WavPack + Opravný zvukový soubor WavPack + WavPack-lydkorrektionsfil + WavPack-Audiokorrekturdatei + archivo de corrección de sonido WavPack + WavPack audio-zuzenketaren fitxategia + WavPack-äänikorjaustiedosto + WavPack ljóðrættingarfíla + fichier de correction audio WavPack + comhad cheartú fhuaim WavPack + ficheiro de corrección de son WavPack + קובץ תיקון שמע של WavPack + WavPack hangjavítási fájl + Berkas koreksi audio WavPack + File correzione audio WavPack + WavPack オーディオコレクションファイル + WavPack аудио түзету файлы + WavPack 오디오 교정 파일 + WavPack garso korekcijos failas + WavPack audio korekciju fails + WavPack lydkorrigeringsfil + WavPack-audio-correctiebestand + WawPack lydopprettingsfil + Plik korekcji dźwięku WavPack + Arquivo de correção de áudio WavPack + Fișier audio de corecție WavPack + файл коррекции аудио WavPack + Opravný zvukový súbor WavPack + popravljalna zvočna datoteka WavPack + File korrigjgimi audio WavPack + WavPack-ljudkorrigeringsfil + файл корекції звуку WavPack + Tập tin sửa chữa âm thanh WavPack + WavPack 音频校正文档 + WavPack 音訊校正檔 + + + + + + + MIDI audio + MIDI سمعي + MIDI audio faylı + Aŭdyjo MIDI + Аудио — MIDI + àudio MIDI + Zvuk MIDI + Sain MIDI + MIDI-lyd + MIDI-Audio + ήχος MIDI + MIDI audio + MIDI-sondosiero + sonido MIDI + MIDI audioa + MIDI-ääni + MIDI ljóður + audio MIDI + fuaim MIDI + son MIDI + שמע MIDI + MIDI hang + Audio MIDI + Audio MIDI + MIDI オーディオ + MIDI аудиосы + 미디 오디오 + MIDI garso įrašas + MIDI audio + Audio MIDI + MIDI-lyd + MIDI-audio + MIDI-lyd + Plik dźwiękowy MIDI + áudio MIDI + Áudio MIDI + Audio MIDI + аудио MIDI + Zvuk MIDI + Zvočna datoteka MIDI + Audio MIDI + MIDI звучни запис + MIDI-ljud + звук MIDI + Âm thanh MIDI + MIDI 音频 + MIDI 音訊 + + + + + + + + + + compressed Tracker audio + Tracker سمعي مضغوط + aŭdyjo skampresavanaha Trackera + Аудио — Tracker, компресирано + àudio Tracker comprimit + Komprimovaný zvuk Tracker + Trackerkomprimeret lyd + Komprimiertes Tracker-Audio + tracker de sonido comprimido + konprimitutako Tracker audioa + pakattu Tracker-ääni + stappað Tracker ljóður + audio Tracker compressé + fuaim chomhbhrúite Tracker + son comprimido de Tracker + שמע גשש מכווץ + tömörített Tracker hang + audio Tracker terkompresi + Audio compresso Tracker + 圧縮 Tracker オーディオ + сығылған Tracker аудиосы + 압축한 Tracker 오디오 + suglaudintas Tracker garso įrašas + saspiests Tracker audio + ingepakte Tracker-audio + komprimert Tracker-lyd + Skompresowany plik dźwiękowy Tracker + áudio Tracker compactado + Tracker audio comprimat + аудио Tracker (сжатое) + Komprimovaný zvuk Tracker + Skrčena zvočna datoteka Tracker + Audio Tracker e kompresuar + komprimerat Tracker-ljud + стиснутий звук Tracker + âm thanh Tracker đã nén + 压缩的 Tracker 音频 + 壓縮版 Tracker 音訊 + + + + + + + MPEG-4 audio + MPEG-4 سمعي + Aŭdyjo MPEG-4 + Аудио — MPEG-4 + àudio MPEG-4 + Zvuk MPEG-4 + MPEG4-lyd + MPEG-4-Audio + MPEG-4 audio + MPEG4-sondosiero + sonido MPEG-4 + MPEG-4 audioa + MPEG-4-ääni + MPEG-4 ljóður + audio MPEG-4 + fuaim MPEG-4 + son MPEG-4 + שמע MPEG-4 + MPEG-4 hang + Audio MPEG-4 + Audio MPEG-4 + MPEG-4 オーディオ + MPEG-4 аудиосы + MPEG-4 오디오 + MPEG-4 garso įrašas + MPEG-4 audio + MPEG-4-lyd + MPEG4-audio + MPEG-4-lyd + Plik dźwiękowy MPEG-4 + Áudio MPEG-4 + Audio MPEG-4 + аудио MPEG-4 + Zvuk MPEG-4 + Zvočna datoteka MPEG-4 + Audio MPEG-4 + MPEG-4-ljud + звук MPEG-4 + Âm thanh MPEG-4 + MPEG-4 音频 + MPEG-4 音訊 + + + + + + + + + + MPEG-4 video + MPEG-4 مرئي + Videa MPEG-4 + Видео — MPEG-4 + vídeo MPEG-4 + Video MPEG-4 + MPEG4-video + MPEG-4-Video + MPEG-4 video + MPEG-4-video + vídeo MPEG-4 + MPEG-4 bideoa + MPEG-4-video + MPEG-4 video + vidéo MPEG-4 + físeán MPEG-4 + vídeo MPEG-4 + וידאו MPEG-4 + MPEG-4 videó + Video MPEG-4 + Video MPEG-4 + MPEG-4 動画 + MPEG-4 видеосы + MPEG-4 비디오 + MPEG-4 vaizdo įrašas + MPEG-4 video + MPEG-4-film + MPEG4-video + MPEG-4-video + Plik wideo MPEG-4 + Vídeo MPEG-4 + Video MPEG-4 + видео MPEG-4 + Video MPEG-4 + Video datoteka MPEG-4 + Video MPEG-4 + MPEG-4-video + відеокліп MPEG-4 + Ảnh động MPEG-4 + MPEG-4 视频 + MPEG-4 視訊 + + + + + + + + + + + + + + + MPEG-4 audio book + كتاب MPEG-4 السمعي + Aŭdyjokniha MPEG-4 + Аудио книга — MPEG-4 + llibre d'àudio MPEG-4 + Zvuková kniha MPEG-4 + MPEG4-lydbog + MPEG-4-Hörbuch + MPEG-4-sonlibro + audiolibro en MPEG-4 + MPEG-4 audio-liburua + MPEG-4-äänikirja + MPEG-4 ljóðbók + livre audio MPEG-4 + leabhar fhuaim MPEG-4 + sonlibro de MPEG-4 + ספר דיגיטלי MPEG-4 + MPEG-4 hangoskönyv + Buku audio MPEG-4 + Audiolibro MPEG-4 + MPEG-4 オーディオブック + MPEG-4 аудио кітабы + MPEG-4 오디오북 + MPEG-4 garso knyga + MPEG-4 audio grāmata + MPEG-4-lydbok + MPEG4-audioboek + MPEG-4-lydbok + Książka dźwiękowa MPEG-4 + Livro de Áudio MPEG-4 + Carte audio MPEG-4 + аудиокнига MPEG-4 + Zvuková kniha MPEG-4 + Zvočna knjiga MPEG-4 + Audiolibër MPEG-4 + MPEG-4-ljudbok + аудіокнига MPEG-4 + Sách âm thanh MPEG-4 + MPEG-4 有声书 + MPEG-4 音訊書 + + + + + + + + + 3GPP multimedia file + ملف وسائط متعددة 3GPP + Multymedyjny fajł 3GPP + Мултимедия — 3GPP + fitxer multimèdia 3GPP + Soubor multimédií 3GPP + 3GPP multimedie-fil + 3GPP-Multimediadatei + archivo multimedia 3GPP + 3GPP multimediako fitxategia + 3GPP-multimediatiedosto + 3GGP margmiðlafíla + fichier multimédia 3GPP + comhad ilmheán 3GPP + ficheiro multimedia 3GPP + קובץ מולטימדיה מסוג 3GPP + 3GPP multimédiafájl + Berkas multimedia 3GPP + File multimediale 3GPP + 3GPP マルチメディアファイル + 3GPP мультимедиялық файлы + 3GPP 멀티미디어 파일 + 3GPP multimedijos failas + 3GPP multimediju fails + 3GPP-multimediafil + 3GPP-multimediabestand + 3GPP-multimediafil + Plik multimedialny 3GPP + Arquivo multimídia 3GPP + Fișier multimedia 3GPP + мультимедийный файл 3GPP + Súbor multimédií 3GPP + Večpredstavnostna datoteka 3GPP + File multimedial 3GPP + 3GPP-multimediafil + файл мультимедійних даних 3GPP + Tập tin đa phương tiện 3GPP + 3GPP 多媒体文件 + 3GPP 多媒體檔案 + 3GPP + 3rd Generation Partnership Project + + + + + + + + + + + + + + + + + + + + + + + + + 3GPP2 multimedia file + Мултимедия — 3GPP2 + fitxer multimèdia 3GPP2 + Soubor multimédií 3GPP2 + 3GPP2 multimedie-fil + 3GPP2-Multimediadatei + archivo multimedia 3GPP2 + 3GPP2-multimediatiedosto + 3GGP2 margmiðlafíla + fichier multimédia 3GPP2 + comhad ilmheán 3GPP2 + ficheiro multimedia 3GPP2 + קובץ מולטימדיה 3GPP2 + 3GPP2 multimédiafájl + Berkas multimedia 3GPP2 + File multimediale 3GPP2 + 3GPP2 マルチメディアファイル + 3GPP2 мультимедиялық файлы + 3GPP2 멀티미디어 파일 + 3GPP2 multimediju fails + Plik multimedialny 3GPP2 + Fișier multimedia 3GPP2 + мультимедийный файл 3GPP2 + Súbor multimédií 3GPP2 + Večpredstavnostna datoteka 3GPP2 + 3GPP2-multimediafil + файл мультимедійних даних 3GPP2 + 3GPP2 多媒体文件 + 3GPP2 多媒體檔案 + 3GPP2 + 3rd Generation Partnership Project 2 + + + + + + + + + + + Amiga SoundTracker audio + مقتفي صوت Amiga السمعي + Aŭdyjo Amiga SoundTracker + Аудио — Amiga SoundTracker + àudio Amiga SoundTracker + Zvuk Amiga SoundTracker + Amiga SoundTracker-lyd + Amiga-SoundTracker-Audio + ήχος Amiga SoundTracker + Amiga SoundTracker audio + Sondosiero de Amiga SoundTracker + sonido de Amiga SoundTracker + Amiga soundtracker audioa + Amiga SoundTracker -ääni + Amiga SoundTracker ljóður + audio SoundTracker Amiga + fuaim Amiga SoundTracker + son de Amiga SoundTracker + קובץ שמע של Amiga SoundTracker + Amiga SoundTracker hang + Audio Amida SoundTracker + Audio Amiga SoundTracker + Amiga SoundTracker オーディオ + Amiga SoundTracker аудиосы + Amiga SoundTracker 오디오 + Amiga SoundTracker garso įrašas + Amiga SoundTracker audio + Audio Amiga Soundtracker + Amiga SoundTracker-lyd + Amiga SoundTracker-audio + Amiga soundtracker-lyd + Plik dźwiękowy Amiga SoundTracker + áudio SoundTracker do Amiga + Áudio Amiga SoundTracker + Audio Amiga SoundTracker + аудио Amiga SoundTracker + Zvuk Amiga SoundTracker + Zvočna datoteka Amiga SoundTracker + Audio Amiga SoundTracker + Амига soundtracker звук + Amiga SoundTracker-ljud + звук Amiga SoundTracker + Âm thanh Amiga SoundTracker + Amiga SoundTracker 音频 + Amiga SoundTracker 音訊 + + + + + + + + + + MP2 audio + MP2 سمعي + Aŭdyjo MP2 + Аудио — MP2 + àudio MP2 + Zvuk MP2 + MP2-lyd + MP2-Audio + MP2-sondosiero + sonido MP2 + MP2 audioa + MP2-ääni + MP2 ljóður + audio MP2 + fuaim MP2 + son MP2 + שמע MP2 + MP2 hang + Audio MP2 + Audio MP2 + MP2 オーディオ + MP2 аудиосы + MP2 오디오 + MP2 garso įrašas + MP2 audio + MP2-lyd + MP2-audio + MP2-lyd + Plik dźwiękowy MP2 + Áudio MP2 + Audio MP2 + аудио MP2 + Zvuk MP2 + Zvočna datoteka MP2 + Audio MP2 + MP2-ljud + звук MP2 + Âm thanh MP2 + MP2 音频 + MP2 音訊 + + + + + MP3 audio + MP3 سمعي + MP3 audio faylı + Aŭdyjo MP3 + Аудио — MP3 + àudio MP3 + Zvuk MP3 + Sain MP3 + MP3-lyd + MP3-Audio + ήχος MP3 + MP3 audio + MP3-sondosiero + sonido MP3 + MP3 audioa + MP3-ääni + MP3 ljóður + audio MP3 + fuaim MP3 + son MP3 + שמע MP3 + MP3 hang + Audio MP3 + Audio MP3 + MP3 オーディオ + MP3 аудиосы + MP3 오디오 + MP3 garso įrašas + MP3 audio + Audio MP3 + MP3-lyd + MP3-audio + MP3-lyd + Plik dźwiękowy MP3 + áudio MP3 + Áudio MP3 + Audio MP3 + аудио MP3 + Zvuk MP3 + Zvočna datoteka MP3 + Audio MP3 + MP3 звучни запис + MP3-ljud + звук MP3 + Âm thanh MP3 + MP3 音频 + MP3 音訊 + + + + + + + + + + + + MP3 audio (streamed) + MP3 سمعي (تدفق) + Aŭdyjo MP3 (płyń) + Аудио — MP3, поточно + àudio MP3 (flux) + Zvuk MP3 (proud) + MP3-lyd (strøm) + MP3-Audio (Stream) + ήχος MP3 (εκπεμπόμενος) + MP3 audio (streamed) + MP3-sondosiero (fluigate) + sonido MP3 (en flujo) + MP3 audioa (korrontea) + MP3-ääni (virtaus) + MP3 ljóður (streymað) + audio MP3 (flux) + fuaim MP3 (sruthaithe) + son MP3 (en stream) + שמע MP3 (מוזרם) + MP3 hang (sugárzott) + Audio MP3 (stream) + Audio MP3 (in streaming) + MP3 オーディオ (ストリーム) + MP3 аудиосы (ағымдық) + MP3 오디오 (스트림) + MP3 garso įrašas (transliuojamas) + MP3 audio (straumēts) + Audio MP3 (aliran) + MP3-lyd (streaming) + MP3-audio (gestreamd) + Strauma MP3-lyd + Dźwięk MP3 (strumień) + áudio MP3 (em fluxo) + Áudio MP3 (em fluxo) + Audio MP3 (flux) + аудио MP3 (потоковое) + Zvuk MP3 (streamovaný) + Zvočna datoteka MP3 (pretočna) + Audio MP3 (streamed) + MP3 звучни запис (непрекидан) + MP3-ljud (flöde) + звук MP3 (потоковий) + Âm thanh MP3 (chạy luồng) + MP3 流音频 + MP3 音訊 (串流) + + + + + + + + + + + + + + + HTTP Live Streaming playlist + قائمة بث HTTP حية + Списък за изпълнение — поток по HTTP + llista de reproducció en temps real HTTP + Seznam skladeb HTTP Live Streaming + Afspilningsliste til HTTP-livestrøm + HTTP Live-Streaming-Wiedergabeliste + lista de reproducción de flujo en directo HTTP + HTTP zuzeneko korrontearen erreprodukzio-zerrenda + HTTP beinleiðis streymaður avspælingarlisti + liste de lecture de flux HTTP Live + seinmliosta sruthaithe bheo HTTP + lista de reprodución de fluxo HTTP + רשימת השמעה הזרימה של HTTP + HTTP élő lejátszólista + Daftar putar HTTP Live Streaming + Scaletta Live Steaming HTTP + HTTP ライブストリーミング再生リスト + HTTP тірі ағым ойнау тізімі + HTTP 라이브 스트리밍 재생 목록 + HTTP tiesioginio transliavimo grojaraštis + HTTP dzīvās straumēšanas repertuārs + Lista odtwarzania strumieniowego na żywo HTTP + Listă de redare difuzată ca flux HTTP + список воспроизведения HTTP-потока + Seznam predvajanja živega pretoka HTTP + HTTP Live Streaming-spellista + список відтворення HTTP Live Streaming + HTTP 直播流播放列表 + HTTP 即時串流播放清單 + + + + + + + + + + + Microsoft ASX playlist + قائمة تشغيل مايكروسوفت ASX + Śpis Microsoft ASX + Списък за изпълнение — Microsoft ASX + llista de reproducció ASX de Microsoft + Seznam skladeb Microsoft ASX + Microsoft ASX-afspilningsliste + Microsoft-ASX-Wiedergabeliste + lista de reproducción ASX de Microsoft + Microsoft ASX erreprodukzio-zerrenda + Microsoft ASX -soittolista + Microsoft ASX avspælingarlisti + liste de lecture Microsoft ASX + seinmliosta Microsoft ASX + lista de reprodución Microsoft ASX + רשימת השמעה ASX (מיקרוסופט) + Microsoft ASX lejátszólista + Senarai putar Microsoft ASX + Scaletta Microsoft ASX + Microsoft ASX 再生リスト + Microsoft ASX ойнау тізімі + 마이크로소프트 ASX 재생 목록 + Microsoft ASX grojaraštis + Microsoft ASX repertuārs + Microsoft ASX-spilleliste + Microsoft ASX-afspeellijst + Microsoft ASX-speleliste + Lista odtwarzania Microsoft ASX + Lista de execução do Microsoft ASX + Listă redare Microsoft ASX + список воспроизведения Microsoft ASX + Zoznam skladieb Microsoft ASX + Seznam predvajanja Microsoft ASX + Listë titujsh Microsoft ASF + Microsoft ASX-spellista + список відтворення ASX Microsoft + Danh mục nhạc Microsoft ASX + Microsoft ASX 播放列表 + 微軟 ASX 播放清單 + + + + + + + + + + + + + + + + + PSF audio + PSF سمعي + Aŭdyjo PSF + Аудио — PSF + àudio PSF + Zvuk PSF + PSF-lyd + PSF-Audio + PSF-sondosiero + sonido PSF + PSF audioa + PSF-ääni + PSF ljóður + audio PSF + fuaim PSF + son PSF + שמע PSF + PSF hang + Audio PSF + Audio PSF + PSF オーディオ + PSF аудиосы + PSF 오디오 + PSF garso įrašas + PSF audio + PSF-lyd + PSF-audio + PSF-lyd + Plik dźwiękowy PSF + Áudio PSF + Audio PSF + аудио PSF + Zvuk PSF + Zvočna datoteka PSF + Audio PSF + PSF-ljud + звук PSF + Âm thanh PSF + PSF 音频 + PSF 音訊 + PSF + Portable Sound Format + + + + + + + MiniPSF audio + MiniPSF سمعي + Aŭdyjo MiniPSF + Аудио — MiniPSF + àudio MiniPSF + Zvuk MiniPSF + MiniPSF-lyd + MiniPSF-Audio + MiniPSF-sondosiero + sonido MiniPSF + MiniPSF audioa + MiniPSF-ääni + MiniPSF ljóður + audio MiniPSF + fuaim MiniPSF + son MiniPSF + שמע של MiniPSP + MiniPSF hang + Audio MiniPSF + Audio MiniPSF + MiniPSF オーディオ + MiniPSF аудиосы + MiniPSF 오디오 + MiniPSF garso įrašas + MiniPSF audio + MiniPSF-lyd + MiniPSF-audio + MiniPSF-lyd + Plik dźwiękowy MiniPSF + Áudio MiniPSF + Audio MiniPSF + аудио MiniPSF + Zvuk MiniPSF + Zvočna datoteka MiniPSF + Audio MiniPSF + MiniPSF-ljud + звук MiniPSF + Âm thanh MiniPSF + MiniPSF 音频 + MiniPSF 音訊 + MiniPSF + Miniature Portable Sound Format + + + + + PSFlib audio library + مكتبة PSFlib السمعية + Aŭdyjobiblijateka PSFlib + Аудио библиотека — PSFlib + biblioteca d'àudio PSFlib + Zvuková knihovna PSFlib + PSFlib-lydbibliotek + PSFlib-Audiobibliothek + biblioteca de sonido PSFlib + PSFlib audioaren liburutegia + PSFlib-äänikirjasto + PSFlib ljóðsavn + bibliothèque audio PSFlib + leabharlann fhuaim PSFlib + Biblioteca de son PSFlib + ספריית שמע PSFlib + PSFlib hanggyűjtemény + Pustaka audio PSFlib + Libreria audio PSFlib + PSFlib オーディオライブラリ + PSFlib аудио жинағы + PSFlib 오디오 라이브러리 + PSFlib garso biblioteka + PSFlib fonotēka + PSFlib-lydbibliotek + PSFlib-audiobibliotheek + PSFlib lydbibliotek + Biblioteka dźwiękowa PSFlib + Biblioteca de áudio PSFlib + Bibliotecă audio PSFlib + фонотека PSFlib + Zvuková knižnica PSFlib + Zvočna knjižnica PSFlib + Librari audio PSFlib + PSFlib-ljudbibliotek + аудіобібліотека PSFlib + Thư viện âm thanh PSFlib + PSFlib 音频库文件 + PSFlib 音訊庫 + PSFlib + Portable Sound Format Library + + + + + Windows Media audio + Windows Media سمعي + Aŭdyjo Windows Media + Аудио — Windows Media + àudio Windows Media + Zvuk Windows Media + Windows Media-lyd + Windows-Media-Audio + sonido de Windows Media + Windows Media audioa + Windows Media -ääni + Windows Media ljóður + audio Windows Media + fuaim Windows Media + son de Windows Media + שמע של Windows Media + Windows Media hang + Audio Windows Media + Audio Windows Media + Windows Media オーディオ + Windows Media аудиосы + 윈도우 미디어 오디오 + Windows Media garso įrašas + Windows Media audio + Windows Media lyd + Windows Media-audio + Windows Media-lyd + Plik dźwiękowy Windows Media + Áudio do Windows Media + Audio Windows Media + аудио Windows Media + Zvuk Windows Media + Zvočna datoteka Windows Media + Audio Windows Media + Windows Media-ljud + звук Windows Media + Âm thanh Windows Media + Windows Media 音频 + Windows Media 音訊 + + + + + + Musepack audio + Musepack سمعي + Aŭdyjo Musepack + Аудио — Musepack + àudio Musepack + Zvuk Musepack + Musepacklyd + Musepack-Audio + sonido Musepack + Musepack audioa + Musepack-ääni + Musepack ljóður + audio Musepack + fuaim Musepack + son de Musepack + שמע של Musepack + Musepack hang + Audio Musepack + Audio Musepack + Musepack オーディオ + Musepack аудиосы + Musepack 오디오 + Musepack garso įrašas + Musepack audio + Musepack-lyd + Musepack-audio + Musepack-lyd + Plik dźwiękowy Musepack + Áudio Musepack + Audio Musepack + аудио Musepack + Zvuk Musepack + Zvočna datoteka Musepack + Audio Musepack + Musepack-ljud + звук Musepack + Âm thanh Musepack + Musepack 音频 + Musepack 音訊 + + + + + + + + + RealAudio document + مستند RealAudio + Dakument RealAudio + Документ — RealAudio + document RealAudio + Dokument RealAudio + RealAudio-dokument + RealAudio-Dokument + RealAudio document + RealAudio-dokumento + documento RealAudio + RealAudio dokumentua + RealAudio-asiakirja + RealAudio skjal + document RealAudio + cáipéis RealAudio + documento Realson + מסמך של RealAudio + RealAudio dokumentum + Dokumen RealAudio + Documento RealAudio + RealAudio ドキュメント + RealAudio құжаты + RealAudio 문서 + RealAudio dokumentas + RealAudio dokuments + RealAudio-dokument + RealAudio-document + RealAudio-dokument + Dokument RealAudio + Documento RealAudio + Document RealAudio + документ RealAudio + Dokument RealAudio + Dokument RealAudio + Dokument RealAudio + RealAudio-dokument + документ RealAudio + Tài liệu âm thanh RealAudio + RealAudio 文档 + RealAudio 文件 + + + + + + + RealMedia Metafile + ملف تعريف RealMedia + Metafajł RealMedia + Метафайл — RealMedia + metafitxer RealMedia + RealMedia Metafile + RealMedia-metafil + RealMedia-Metadatei + metarchivo RealMedia + RealMedia metafitxategia + RealMedia-metatiedosto + RealMedia metafíla + métafichier RealMedia + meiteachomhad RealMedia + Metaficheiro RealMedia + קובץ מטא של RealMedia + RealMedia metafájl + RealMedia Metafile + Metafile RealMedia + RealMedia メタファイル + RealMedia метафайлы + RealMedia 메타파일 + RealMedia metafailas + RealMedia metafails + RealMedia-metafil + RealMedia-metabestand + RealMedia-metafil + Metaplik RealMedia + Meta arquivo do RealMedia + Metafișier RealMedia + мета-файл RealMedia + RealMedia Metafile + Metadatoteka RealMedia + Metafile RealMedia + RealMedia-metafil + метафайл RealMedia + Siêu tập tin RealMedia + RealMedia 元文件 + RealMedia 中介檔 + + + + RealVideo document + مستند RealVideo + Dakument RealVideo + Документ — RealVideo + document RealVideo + Dokument RealVideo + RealAudio-dokument + RealVideo-Dokument + RealVideo document + RealVideo-dokumento + documento RealVideo + RealVideo dokumentua + RealVideo-asiakirja + RealVideo skjal + document RealVideo + cáipéis RealVideo + documento RealVideo + מסמך של RealVideo + RealVideo dokumentum + Dokumen RealVideo + Documento RealVideo + RealVideo ドキュメント + RealVideo құжаты + RealVideo 문서 + RealVideo dokumentas + RealVideo dokuments + RealAudio-dokument + RealVideo-document + RealVideo-dokument + Dokument RealVideo + Documento RealVideo + Document RealVideo + документ RealVideo + Dokument RealVideo + Video datoteka RealVideo + Dokument RealVideo + RealVideo-dokument + документ RealVideo + Tài liệu ảnh động RealVideo + RealAudio 文档 + RealVideo 文件 + + + + + + RealMedia document + مستند RealMedia + Dakument RealMedia + Документ — RealMedia + document RealMedia + Dokument RealMedia + RealMedia-dokument + RealMedia-Dokument + RealMedia document + RealMedia-dokumento + documento RealMedia + RealMedia dokumentua + RealMedia-asiakirja + RealMedia skjal + document RealMedia + cáipéis RealMedia + documento RealMedia + מסמך של RealMedia + RealMedia dokumentum + Dokumen RealMedia + Documento RealMedia + RealMedia ドキュメント + RealMedia құжаты + RealMedia 문서 + RealMedia dokumentas + RealMedia dokuments + RealMedia-dokument + RealMedia-document + RealMedia-dokument + Dokument RealMedia + Documento RealMedia + Document RealMedia + документ RealMedia + Dokument RealMedia + Dokument RealMedia + Dokument RealMedia + RealMedia-dokument + документ RealMedia + Tài liệu RealMedia + RealMedia 文档 + RealMedia 文件 + + + + + + + + + + + + + RealPix document + مستند RealPix + Dakument RealPix + Документ — RealPix + document RealPix + Dokument RealPix + RealPix-dokument + RealPix-Dokument + RealPix document + RealPix-dokumento + documento RealPix + RealPix dokumentua + RealPix-asiakirja + RealPix skjal + document RealPix + cáipéis RealPix + documento RealPix + מסמך של RealPix + RealPix dokumentum + Dokumen RealPix + Documento RealPix + RealPix ドキュメント + RealPix құжаты + RealPix 문서 + RealPix dokumentas + RealPix dokuments + RealPix-dokument + RealPix-document + RealPix-dokument + Dokument RealPix + Documento RealPix + Document RealPix + документ RealPix + Dokument RealPix + Dokument RealPix + Dokument RealPix + RealPix-dokument + документ RealPix + Tài liệu ảnh RealPix + RealPix 文档 + RealPix 文件 + + + + RealText document + مستند RealText + Dakument RealText + Документ — RealText + document RealText + Dokument RealText + RealText-dokument + RealText-Dokument + RealText document + RealText-dokumento + documento RealText + RealText dokumentua + RealText-asiakirja + RealText skjal + document RealText + cáipéis RealText + documento RealText + מסמך של RealText + RealText dokumentum + Dokumen RealText + Documento RealText + RealText ドキュメント + RealText құжаты + RealText 문서 + RealText dokumentas + RealText dokuments + RealText-dokument + RealText-document + RealText-dokument + Dokument RealText + Documento RealText + Document RealText + документ RealText + Dokument RealText + Dokument RealText + Dokument RealText + RealText-dokument + документ RealText + Tài liệu văn bản RealText + RealText 文档 + RealText 文件 + + + + RIFF audio + RIFF سمعي + RIFF audio faylı + Aŭdyjo RIFF + Аудио — RIFF + àudio RIFF + Zvuk RIFF + Sain RIFF + RIFF-lyd + RIFF-Audio + ήχος RIFF + RIFF audio + RIFF-sondosiero + sonido RIFF + RIFF audioa + RIFF-ääni + RIFF ljóð + audio RIFF + fuaim RIFF + son RIFF + שמע RIFF + RIFF-kép + Audio RIFF + Audio RIFF + RIFF オーディオ + RIFF аудиосы + RIFF 오디오 + RIFF garso įrašas + RIFF audio + Audio RIFF + RIFF-lyd + RIFF-audio + RIFF-lyd + Plik dźwiękowy RIFF + áudio RIFF + Áudio RIFF + Audio RIFF + аудио RIFF + Zvuk RIFF + Zvočna datoteka RIFF + Audio RIFF + RIFF звучни запис + RIFF-ljud + звук RIFF + Âm thanh RIFF + RIFF 音频 + RIFF 音訊 + + + + + + + Scream Tracker 3 audio + Scream Tracker 3 سمعي + Scream Tracker 3 audio faylı + Aŭdyjo Scream Tracker 3 + Аудио — Scream Tracker 3 + àudio de Scream Tracker 3 + Skladba Scream Tracker 3 + Sain Scream Tracker 3 + Scream Tracker 3-lyd + Scream-Tracker-3-Audio + ήχος Scream Tracker 3 + Scream Tracker 3 audio + Sondosiero de Scream Tracker 3 + sonido Scream Tracker 3 + Scream Tracker 3 audioa + Scream Tracker 3 -ääni + Scream Tracker 3 ljóður + audio Scream Tracker 3 + fuaim Scream Tracker 3 + son Scream Tracker 3 + שמע של Scream Tracker 3 + Scream Tracker 3 hang + Audio Scream Tracker 3 + Audio Scream Tracker 3 + Scream Tracker 3 オーディオ + Scream Tracker 3 аудиосы + Scream Tracker 3 오디오 + Scream Tracker 3 garso įrašas + Scream Tracker 3 audio + Audio Scream Tracker 3 + Scream Tracker 3-lyd + Scream Tracker 3-audio + Sream Tracker 3 lyd + Plik dźwiękowy Scream Tracker 3 + áudio Scream Tracker 3 + Áudio Scream Tracker 3 + Audio Scream Tracker 3 + аудио Scream Tracker 3 + Skladba Scream Tracker 3 + Zvočna datoteka Scream Tracker 3 + Audio Scream Tracker 3 + Scream Tracker 3 звучни запис + Scream Tracker 3-ljud + звук Scream Tracker 3 + Âm thanh Scream Tracker 3 + Scheme Tracker 3 音频 + Scream Tracker 3 音訊 + + + + + + + MP3 ShoutCast playlist + قائمة تشغيل MP3 ShoutCast + Śpis piesień dla tranślacyi MP3 + Списък за изпълнение — MP3 ShoutCast + llista de reproducció MP3 ShoutCast + Seznam skladeb MP3 ShoutCast + MP3 ShoutCast-afspilningsliste + MP3-ShoutCast-Wiedergabeliste + Λίστα αναπαραγωγής MP3 ShoutCast + MP3 ShoutCast playlist + MP3-ludlisto de ShoutCast + lista de reproducción MP3 ShoutCast + MP3 ShoutCast erreprodukzio-zerrenda + MP3 ShoutCast -soittolista + MP3 ShoutCast avspælingarlisti + liste de lecture MP3 ShoutCast + seinmliosta MP3 ShoutCast + lista de reprodución MP3 de ShoutCast + רשימת השמעה MP3 של ShoutCast + MP3 ShoutCast-lejátszólista + Senarai putar MP3 ShoutCast + Scaletta MP3 ShoutCast + MP3 ShoutCast 再生リスト + MP3 ShoutCast ойнау тізімі + MP3 ShoutCast 재생 목록 + MP3 ShoutCast grojaraštis + MP3 ShoutCast repertuārs + Senaraimain ShoutCast MP3 + MP3 ShoutCast-spilleliste + MP3 ShoutCast-afspeellijst + MP3 ShoutCast-speleliste + Lista odtwarzania MP3 ShoutCast + lista de reprodução MP3 ShoutCast + Lista de reprodução MP3 ShoutCast + Listă MP3 ShoutCast + список воспроизведения MP3 ShoutCast + Zoznam skladieb MP3 ShoutCast + Seznam predvajanja MP3 ShoutCast + Listë titujsh MP3 ShoutCast + MP3 ShoutCast списак песама + MP3 ShoutCast-spellista + список програвання MP3 ShoutCast + Danh mục nhạc MP3 ShoutCast + MP3 ShoutCast 播放列表 + MP3 ShoutCast 播放清單 + + + + + + + + + + Scream Tracker audio + Scream Tracker سمعي + Scream Tracker audio faylı + Aŭdyjo Scream Tracker + Аудио — Scream Tracker + àudio de Scream Tracker + Skladba Scream Tracker + Sain Scream Tracker + Scream Tracker-lyd + Scream-Tracker-Audio + ήχος Scream Tracker + Scream Tracker audio + Sondosiero de Scream Tracker + sonido Scream Tracker + Scream Tracker audioa + Scream Tracker -ääni + Scream Tracker ljóður + audio Scream Tracker + fuaim Scream Tracker + son Scream Tracker + שמע של Scream Tracker + Scream Tracker hang + Audio Scream Tracker + Audio Scream Tracker + Scream Tracker オーディオ + Scream Tracker аудиосы + Scream Tracker 오디오 + Scream Tracker garso įrašas + Scream Tracker audio + Audio Scream Tracker + Scream Tracker-lyd + Scream Tracker-audio + Scream Tracker lyd + Plik dźwiękowy Scream Tracker + áudio Scream Tracker + Áudio Scream Tracker + Audio Scream Tracker + аудио Scream Tracker + Skladba Scream Tracker + Zvočna datoteka Scream Tracker + Audio Scream Tracker + Scream Tracker звучни запис + Scream Tracker-ljud + звук Scream Tracker + Âm thanh Scream Tracker + Scream Tracker 音频 + Scream Tracker 音訊 + + + + + + + + + VOC audio + VOC سمعي + VOC audio faylı + Aŭdyjo VOC + Аудио — VOC + àudio VOC + Zvuk VOC + Sain VOC + VOC-lyd + VOC-Audio + ήχος VOC + VOC audio + VOC-sondosiero + sonido VOC + VOC audioa + VOC-ääni + VOC ljóður + audio VOC + fuaim VOC + son VOC + שמע VOC + VOC hang + Audio VOC + Audio VOC + VOC オーディオ + VOC аудиосы + VOC 오디오 + VOC garso įrašas + VOC audio + Audio VOC + VOC-lyd + VOC-audio + VOC-lyd + Plik dźwiękowy VOC + áudio VOC + Áudio VOC + Audio VOC + аудио VOC + Zvuk VOC + Zvočna datoteka VOC + Audio VOC + VOC звучни запис + VOC-ljud + звук VOC + Âm thanh VOC + VOC 音频 + VOC 音訊 + + + + WAV audio + WAV سمعي + WAV audio faylı + Aŭdyjo WAV + Аудио — WAV + àudio WAV + Zvuk WAV + Sain WAV + WAV-lyd + WAV-Audio + ήχος WAV + WAV audio + WAV-sonkodo + sonido WAV + WAV audioa + WAV-ääni + WAV ljóður + audio WAV + fuaim WAV + son WAV + שמע WAV + WAV hang + Audio WAV + Audio WAV + WAV オーディオ + WAV аудиосы + WAV 오디오 + WAV garso įrašas + WAV audio + Audio VOC + WAV-lyd + WAV-audio + WAV-lyd + Plik dźwiękowy WAV + áudio WAV + Áudio WAV + Audio WAV + аудио WAV + Zvuk WAV + Zvočna datoteka WAV + Audio WAV + WAV звучни запис + WAV-ljud + звук WAV + Âm thanh WAV + WAV 音频 + WAV 音訊 + + + + + + + + + + Scream Tracker instrument + آلة Scream Tracker + Scream Tracker instrumenti + Instrument Scream Tracker + Инструмент — Scream Tracker + instrument de Scream Tracker + Nástroj pro Scream Tracker + Offeryn Scream Tracker + Scream Tracker-instrument + Scream-Tracker-Instrument + μουσικό όργανο Scream Tracker + Scream Tracker instrument + instrumento de Scream Tracker + instrumento Scream Tracker + Scream Tracker instrumentua + Scream Tracker -soitin + Scream Tracker ljóðføri + instrument Scream Tracker + ionstraim Scream Tracker + Instrumento Scream Tracker + כלי של Scream Tracker + Scream Tracker hangszer + Instrumen Scream Tracker + Strumento Scream Tracker + Scream Tracker インストゥルメント + Scream Tracker сайманы + Scream Tracker 악기 + Scream Tracker instrumentas + Scream Tracker instrumenti + Instrumen Scream Tracker + Scream Tracker-instrument + Scream Tracker-instrument + Scream Tracker instrument + Instrument Scream Tracker + instrumento Scream Tracker + Instrumento Scream Tracker + Instrument Scream Tracker + инструмент Scream Tracker + Nástroj pre Scream Tracker + Datoteka zvoka glasbila Scream Tracker + Instrument Scream Tracker + Scream Tracker инструмент + Scream Tracker-instrument + інструмент Scream Tracker + Nhạc khí Scream Tracker + Scream Tracker 乐器 + Scream Tracker 樂器檔 + + + + + + + FastTracker II audio + FastTracker II سمعي + FastTracker II audio faylı + Aŭdyjo FastTracker II + Аудио — FastTracker II + àudio de FastTracker II + Zvuk FastTracker II + Sain FastTracker II + FastTracker II-lyd + FastTracker-II-Audio + ήχος FastTracker II + FastTracker II audio + Sondosiero de FastTracker II + sonido FastTracker II + FastTracker II.ren audioa + FastTracker II -ääni + FastTracker II ljóður + audio FastTracker II + fuaim FastTracker II + son de FastTracker II + שמע FastTracker II + FastTracker II hang + Audio FastTracker II + Audio FastTracker II + FastTracker II オーディオ + FastTracker II аудиосы + FastTracker II 오디오 + FastTracker II garso įrašas + FastTracker II audio + Audio FastTracker II + FastTracker II-lyd + FastTracker II-audio + FastTracker II lyd + Plik dźwiękowy FastTracker II + áudio FastTracker II + Áudio FastTracker II + Audio FastTracker II + аудио FastTracker II + Zvuk FastTracker II + Zvočna datoteka FastTracker II + Audio FastTracker II + FastTracker II аудио запис + FastTracker II-ljud + звук FastTracker II + Âm thanh FastTracker II + FastTracker II 音频 + FastTracker II 音訊 + + + + + + + TrueAudio audio + TrueAudio سمعي + Aŭdyjo TrueAudio + Аудио — TrueAudio + àudio TrueAudio + Zvuk TrueAudio + TrueAudio-lyd + TrueAudio-Audio + TrueAudio-sondosiero + sonido TrueAudio + TrueAudio audioa + TrueAudio-ääni + TrueAudio ljóður + audio TrueAudio + fuaim TrueAudio + son Trueson + שמע TrueAudio + TrueAudio hang + Audio TrueAudio + Audio TrueAudio + TrueAudio オーディオ + TrueAudio аудиосы + TrueAudio 오디오 + TrueAudio garso įrašas + TrueAudio audio + TrueAudio-lyd + TrueAudio-audio + TrueAudio-lyd + Plik dźwiękowy TrueAudio + Áudio TrueAudio + Audio TrueAudio + аудио TrueAudio + Zvuk TrueAudio + Zvočna datoteka TrueAudio + Audio TrueAudio + TrueAudio-ljud + звук TrueAudio + Âm thanh TrueAudio + TrueAudio 音频 + TrueAudio 音訊 + + + + + + + + Windows BMP image + صورة Windows BMP + Windows BMP rəsmi + Vyjava Windows BMP + Изображение — Windows BMP + imatge BMP de Windows + Obrázek Windows BMP + Delwedd BMP Windows + Windows BMP-billede + Windows-BMP-Bild + εικόνα Microsoft Windows BMP + Windows BMP image + BMP-bildo de Vindozo + imagen BMP de Windows + Windows BMP irudia + Windows BMP -kuva + Windows BMP mynd + image Windows BMP + íomhá BMP Windows + imaxe BMP de Windows + תמונת BMP של Windows + Windows BMP-kép + Citra Windows BMP + Immagine Windows BMP + Windows BMP 画像 + Windows BMP суреті + 윈도우 BMP 그림 + Windows BMP paveikslėlis + Windows BMP attēls + Imej BMP Windows + Windows BMP-bilde + Windows BMP-afbeelding + Windows BMP-bilete + Obraz BMP Windows + imagem BMP Windows + Imagem BMP do Windows + Imagine Windows BMP + изображение Windows BMP + Obrázok Windows BMP + Slikovna datoteka Windows BMP + Figurë Windows BMP + Windows BMP слика + Windows BMP-bild + зображення Windows BMP + Ảnh BMP Windows + Windows BMP 图像 + Windows BMP 影像 + + + + + + + + + + + + + + WBMP image + صورة WBMP + Vyjava WBMP + Изображение — WBMP + imatge WBMP + Obrázek WBMP + WBMP-billede + WBMP-Bild + WBMP-bildo + imagen WBMP + WBMP irudia + WBMP-kuva + WBMP mynd + image WBMP + íomhá WBMP + imaxe WBMP + תמונת WBMP + WBMP kép + Citra WBMP + Immagine WBMP + WBMP 画像 + WBMP суреті + WBMP 그림 + WBMP paveikslėlis + WBMP attēls + WBMP-bilde + WBMP-afbeelding + WBMP-bilete + Obraz WBMP + Imagem WBMP + Imagine WBMP + изображение WBMP + Obrázok WBMP + Slikovna datoteka WBMP + Figurë WBMP + WBMP-bild + зображення WBMP + Ảnh WBMP + WBMP 图像 + WBMP 影像 + WBMP + WAP bitmap + + + + Computer Graphics Metafile + ملف تعريف رسوميات الحاسوب + Kompüter Qrafikası Meta Faylı + Metafajł Computer Graphics + Метафайл — Computer Graphics + metafitxer de Computer Graphics + Computer Graphics Metafile + Delwedd ffurf CGM + Computer Graphics-metafil + CGM-Datei + αρχείο Computer Graphics Metafile + Computer Graphics Metafile + metaarchivo de Computer Graphics + Ordenagailuko grafikoen meta-fitxategia + Computer Graphics -metatiedosto + Teldugrafikk metafíla + métafichier Computer Graphics + meiteachomhad Grafaicí Ríomhaire + metaficheiro de Computer Graphics + קובץ-מטה מסוג Computer Graphics + Computer Graphics-metafájl + Computer Graphics Metafile + Computer Graphics Metafile + コンピューターグラフィックメタファイル + компьютерлік графика метафайлы + 컴퓨터 그래픽스 메타파일 + Computer Graphics metafailas + Datorgrafikas metafails + Failmeta Grafik Komputer + Computer Graphics Metafile + Computer Graphics-metabestand + Computer Graphics Metafile + Metaplik grafiki komputerowej (CGM) + Computer Graphics Metafile + Meta-arquivo do Computer Graphics + Metafișier Computer Graphics + метафайл компьютерной графики + Computer Graphics Metafile + Metadatoteka računalniške grafike (CGM) + Metafile Computer Graphics + Метадатотека са рачунарском графиком (CGM) + Computer Graphics Metafil + метафайл комп'ютерної графіки + Siêu tập tin đồ họa máy tính (CMF) + CGM 计算机图像元文件 + CGM 影像 + + + + CCITT G3 fax + فاكس CCITT G3 + Faks CCITT G3 + Факс — CCITT G3 + fax CCITT G3 + Fax CCITT G3 + CCITT G3-fax + CCITT-G3-Fax + φαξ σε μορφή CCITT G3 + CCITT G3 fax + G3-fakso de CCITT + fax de CCITT G3 + CCITT G3 faxa + CCITT G3 -faksi + CCITT G3 telefaks + télécopie G3 CCITT + facs CCITT G3 + fax de CCITT G3 + פקס של CCITT G3 + CCITT G3-fax + Faks CCITT G3 + Fax CCITT G3 + CCITT G3 FAX + CCITT G3 факсі + CCITT G3 팩스 + CCITT G3 faksas + CCITT G3 fakss + Faks g3 CCITT + CCITT G3-faks + CCITT G3-fax + CCITT G3-fax + Faks CCITT G3 + fax CCITT G3 + Fax do CCITT G3 + Fax CCITT G3 + факс CCITT G3 + Fax CCITT G3 + Datoteka faksimila CCITT G3 + Fax CCITT G3 + CCITT g3 факс + CCITT G3-fax + факс CCITT G3 + Điện thư G3 CCITT + CCITT G3 传真 + CCITT G3 傳真檔 + + + + G3 fax image + صورة فاكس G3 + G3 faks rəsmi + Faksavaja vyjava G3 + Изображение — факс G3 + imatge de fax G3 + Obrázek fax G3 + Delwedd Ffacs G3 + G3-faxbillede + G3-Faxbild + εικόνα φαξ G3 + G3 fax image + G3-faksbildo + imagen de fax G3 + G3 fax-irudia + G3-faksikuva + G3 fax mynd + image de télécopie G3 + íomhá fhacs G3 + imaxe de fax G3 + תמונת פקס של G3 + G3-faxkép + Citra faks G3 + Immagine fax G3 + G3 FAX 画像 + G3 факс суреті + G3 팩스 그림 + G3 fax paveikslėlis + G3 faksa attēls + Imej fax G3 + G3-faksbilde + G3 faxafbeelding + G3 faksbilete + Obraz faksowy G3 + imagem de fax G3 + Imagem de fax G3 + Imagine fax G3 + факсовое изображение G3 + Obrázok fax G3 + Slikovna datoteka G3 fax + Figurë Fax G3 + G3 факс слика + G3-faxbild + факс G3 + Ảnh điện thư G3 + G3 传真文档 + G3 傳真圖 + + + GIF image + صورة GIF + GIF rəsmi + Vyjava GIF + Изображение — GIF + imatge GIF + Obrázek GIF + Delwedd GIF + GIF-billede + GIF-Bild + εικόνα GIF + GIF image + GIF-bildo + imagen GIF + GIF irudia + GIF-kuva + GIF mynd + image GIF + íomhá GIF + imaxe GIF + תמונת GIF + GIF-kép + Citra GIF + Immagine GIF + GIF 画像 + GIF суреті + GIF 그림 + GIF paveikslėlis + GIF attēls + Imej GIF + GIF-bilde + GIF-afbeelding + GIF-bilete + Obraz GIF + imagem GIF + Imagem GIF + Imagine GIF + изображение GIF + Obrázok GIF + Slikovna datoteka GIF + Figurë GIF + GIF слика + GIF-bild + зображення GIF + Ảnh GIF + GIF 图像 + GIF 影像 + + + + + + + IEF image + صورة IEF + IEF rəsmi + Vyjava IEF + Изображение — IEF + imatge IEF + Obrázek IEF + Delwedd IEF + IEF-billede + IEF-Bild + εικόνα IEF + IEF image + IEF-bildo + imagen IEF + IEF irudia + IEF-kuva + IEF mynd + image IEF + íomhá IEF + imaxe IEF + תמונת IEF + IEF-kép + Citra IEF + Immagine IEF + IEF 画像 + IEF суреті + IEF 그림 + IEF paveikslėlis + IEF attēls + Imej IEF + IEF-bilde + IEF-afbeelding + IEF-bilete + Obraz IEF + imagem IEF + Imagem IEF + Imagine IEF + изображение IEF + Obrázok IEF + Slikovna datoteka IEF + Figurë IEF + IEF слика + IEF-bild + зображення IEF + Ảnh IEF + IEF 图像 + IEF 影像 + + + + JPEG image + صورة JPEG + JPEG rəsmi + Vyjava JPEG + Изображение — JPEG + imatge JPEG + Obrázek JPEG + Delwedd JPEG + JPEG-billede + JPEG-Bild + εικόνα JPEG + JPEG image + JPEG-bildo + imagen JPEG + JPEG irudia + JPEG-kuva + JPEG mynd + image JPEG + íomhá JPEG + imaxe JPEG + תמונת JPEG + JPEG-kép + Citra JPEG + Immagine JPEG + JPEG 画像 + JPEG суреті + JPEG 그림 + JPEG paveikslėlis + JPEG attēls + Imej JPEG + JPEG-bilde + JPEG-afbeelding + JPEG-bilete + Obraz JPEG + imagem JPEG + Imagem JPEG + Imagine JPEG + изображение JPEG + Obrázok JPEG + Slikovna datoteka JPEG + Figurë JPEG + JPEG слика + JPEG-bild + зображення JPEG + Ảnh JPEG + JPEG 图像 + JPEG 影像 + + + + + + + + + + + JPEG-2000 image + صورة JPEG-2000 + Vyjava JPEG-2000 + Изображение — JPEG-2000 + imatge JPEG-2000 + Obrázek JPEG-2000 + JPEG2000-billede + JPEG-2000-Bild + εικόνα JPEG-2000 + JPEG-2000 image + JPEG-2000-bildo + imagen JPEG-2000 + JPEG-2000 irudia + JPEG-2000-kuva + JPEG-2000 mynd + image JPEG-2000 + íomhá JPEG-2000 + imaxe JPEG-2000 + תמונת JPEG-2000 + JPEG-2000 kép + Citra JPEG-2000 + Immagine JPEG-2000 + JPEG-2000 画像 + JPEG-2000 суреті + JPEG-2000 그림 + JPEG-2000 paveikslėlis + JPEG-2000 attēls + Imej JPEG-2000 + JPEG-2000-bilde + JPEG-2000-afbeelding + JPEG-2000-bilete + Obraz JPEG-2000 + imagem JPEG-2000 + Imagem JPEG-2000 + Imagine JPEG-2000 + изображение JPEG-2000 + Obrázok JPEG-2000 + Slikovna datoteka JPEG-2000 + Figurë JPEG-2000 + JPEG-2000 слика + JPEG-2000-bild + зображення JPEG-2000 + Ảnh JPEG-2000 + JPEG-2000 图像 + JPEG-2000 影像 + + + + + + + + + + + + + + + OpenRaster archiving image + صورة أرشيف OpenRaster + Изображение — OpenRaster + imatge d'arxivat OpenRaster + Archivační obraz OpenRaster + OpenRaster-arkivaftryk + OpenRaster-Archivierungsbild + imagen de archivado de OpenRaster + OpenRaster artxiboaren irudia + OpenRaster goymslumynd + image d'archive OpenRaster + íomhá chartlannaithe OpenRaster + imaxe arquivada de OpenRaster + תמונת ארכיון של OpenRaster + OpenRaster archiválási kép + Gambar pengarsipan OpenRaster + Immagine archiviazione OpenRaster + OpenRaster アーカイブイメージ + OpenRaster архивтеу суреті + OpenRaster 압축 이미지 + OpenRaster archyvavimo paveikslėlis + OpenRaster arhivēšanas attēls + Archiwalny obraz OpenRaster + Arhivă imagine OpenRaster + архивное изображение OpenRaster + Odtis arhiva OpenRaster + OpenRaster-arkivbild + архівоване зображення OpenRaster + OpenRaster 归档映像 + OpenRaster 封存影像 + + + + + + + + + + + DirectDraw surface + مساحة DirectDraw + Pavierchnia DirectDraw + Изображение — повърхност на DirectDraw + superfície DirectDraw + Plocha DirectDraw + DirectDraw-overflade + DirectDraw-Oberfläche + superficie DirectDraw + DirectDraw gainazala + DirectDraw-piirtoalue + DirectDraw yvirflata + surface DirectDraw + dromchla DirectDraw + superficie de DirectDraw + משטח של DirectDraw + DirectDraw felület + Permukaan DirectDraw + Superficie DirectDraw + DirectDraw サーフェイス + DirectDraw жазықтығы + DirectDraw 서피스 + DirectDraw paviršius + DirectDraw virsma + DirectDraw-overflate + DirectDraw-oppervlak + DirectDraw-overflate + Powierzchnia DirectDraw + Superfície do DirectDraw + Suprafață DirectDraw + плоскость DirectDraw + Plocha DirectDraw + Datoteka predmeta DirectDraw + Superfaqe DirectDraw + DirectDraw-yta + поверхня DirectDraw + Mặt DirectDraw + DirectDraw 表面 + DirectDraw 表面 + + + + + + + X11 cursor + مؤشر X11 + Kursor X11 + Курсор — X11 + cursor X11 + Kurzor X11 + X11-markør + X11-Zeiger + cursor X11 + X11 kurtsorea + X11-osoitin + X11 vísi + curseur X11 + cúrsóir X11 + Cursor X11 + סמן של X11 + X11 kurzor + Kursor X11 + Cursore X11 + X11 カーソル + X11 курсоры + X11 커서 + X11 žymiklis + X11 kursors + X11-markør + X11-muisaanwijzer + X11-peikar + Kursor X11 + Cursor do X11 + Cursor X11 + курсор X11 + Kurzor X11 + Datoteka kazalke X11 + Kursor X11 + X11-muspekare + курсор X11 + Con chạy X11 + X11 指针 + X11 滑鼠游標 + + + + + + EXR image + صورة EXR + Vyjava EXR + Изображение — EXR + imatge EXR + Obrázek EXR + EXR-billede + EXR-Bild + EXR-bildo + imagen EXR + EXR irudia + EXR-kuva + EXR mynd + image EXR + íomhá EXR + imaxe EXR + תמונת EXR + EXR kép + Citra EXR + Immagine EXR + EXR 画像 + EXR суреті + EXR 그림 + EXR paveikslėlis + EXR attēls + EXR-bilde + EXR-afbeelding + EXR-bilete + Obraz EXR + Imagem EXR + Imagine EXR + изображение EXR + Obrázok EXR + Slikovna datoteka EXR + Figurë EXR + EXR-bild + зображення EXR + Ảnh EXR + EXR 图像 + EXR 影像 + + + + + + + Macintosh Quickdraw/PICT drawing + رسمة ماكنتوش Quickdraw/PICT + Rysunak Macintosh Quickdraw/PICT + Чертеж — Macintosh Quickdraw/PICT + dibuix Quickdraw/PICT de Macintosh + Kresba Macintosh Quickdraw/PICT + Macintosh Quickdraw/PICT-tegning + Macintosh-Quickdraw/PICT-Zeichnung + σχέδιο Macintosh Quickdraw/PICT + Macintosh Quickdraw/PICT drawing + Quickdraw/PICT-grafikaĵo de Macintosh + dibujo de Macintosh Quickdraw/PICT + Macintosh Quickdraw/PICT marrazkia + Macintosh Quickdraw/PICT -piirros + Macintosh Quickdraw/PICT tekning + dessin Macintosh Quickdraw/PICT + líníocht Macintosh Quickdraw/PICT + debuxo de Macintosh Quickdraw/PICT + ציור של Macintosh Quickdraw/PICT + Macintosh Quickdraw/PICT-rajz + Gambar Macintosh Quickdraw/PICT + Disegno Macintosh Quickdraw/PICT + Macintosh Quickdraw/PICT ドロー + Macintosh Quickdraw/PICT суреті + 맥킨토시 Quickdraw/PICT 그림 + Macintosh Quickdraw/PICT piešinys + Macintosh Quickdraw/PICT zīmējums + Lukisan Macintosh Quickdraw/PICT + Macintosh Quickdraw/PICT-tegning + Macintosh Quickdraw/PICT-tekening + Macintosh Quickdraw/PICT-teikning + Rysunek Quickdraw/PICT Macintosh + desenho Quickdraw/PICT de Macintosh + Desenho do Macintosh Quickdraw/PICT + Desen Macintosh Quickdraw/PICT + рисунок Macintosh Quickdraw/PICT + Kresba Macintosh QuickDraw/PICT + Datoteka risbe Macintosh Quickdraw/PICT + Vizatim Macintosh Quickdraw/PICT + Мекинтош Quickdraw/PICT цртеж + Macintosh Quickdraw/PICT-teckning + малюнок Macintosh Quickdraw/PICT + Bản vẽ Quickdraw/PICT của Macintosh + Macintosh Quickdraw/PICT 绘图 + Macintosh Quickdraw/PICT 繪圖 + + + + + + UFRaw ID image + صورة UFRaw ID + Vyjava UFRaw ID + Изображение — UFRaw ID + imatge ID UFRaw + Obrázek ID UFRaw + UFRaw ID-billede + UFRaw-Bildbeschreibungsdatei + imagen de identificación UFRaw + UFRaw ID irudia + UFRaw ID -kuva + UFRaw ID mynd + image ID UFRaw + íomhá aitheantais UFRaw + imaxe de identificación UFRaw + תמונה של UFRaw ID + UFRaw azonosítófájl + Citra UFRaw ID + Immagine UFRaw ID + UFRaw ID イメージ + UFRaw ID суреті + UFRaw ID 그림 + UFRaw ID paveikslėlis + UFRaw ID attēls + UFRaw ID-bilde + UFRaw ID-afbeelding + UFRaw ID-bilete + Obraz UFRaw ID + Imagem ID do UFRaw + ID imagine UFRaw + изображение UFRaw ID + Obrázok ID UFRaw + Slikovna datoteka UFRaw ID + Figurë UFRaw ID + UFRaw ID-bild + зображення UFRaw ID + Ảnh ID UFRaw + UFRaw ID 图像 + UFRaw ID 影像 + UFRaw + Unidentified Flying Raw + + + + + + digital raw image + صورة رقمية خامة + suvoraja ličbavaja vyjava + Изображение — digital raw + imatge digital en cru + Digitální surový obrázek + digitalt råbillede + Digitales Rohbild + imagen digital en bruto + irudi gordin digitala + digitaalinen raakakuva + talgild rámynd + image brute numérique + amhíomhá digiteach + imaxe en bruto dixital + תמונה דיגטלית גולמית + digitális nyers kép + citra mentah digital + Immagine raw digitale + デジタル raw 画像 + өңделмеген сандық суреттер + 디지털 원본 이미지 + skaitmeninis neapdorotas paveikslėlis + digitāls jēlattēls + digitalt raw-bilde + onbewerkt digitaal beeld + digitalt råbilete + Surowy obraz cyfrowy + Imagem digital bruta + imagine digitală brută + необработанные цифровые изображения + Digitálny surový obrázok + surova digitalna slika + Figurë raw dixhitale + digital råbild + зображення цифрового негатива + ảnh thô số + 数字化原始图像 + 數位原生影像 + + + Adobe DNG negative + Adobe DNG negative + Adobe DNG Negative + Изображение — Adobe DNG negative + negatiu DNG d'Adobe + Adobe Digital Negative (DNG) + Adobe DNG-negativ + Adobe Digitales Negativ + negativo digital de Adobe (ADN) + Adobe DNG negatiboa + Adobe-DNG-negatiivi + Adobe DNG negativ + négatif DNG Adobe + claonchló DNG Adobe + negativo DNG de Adobe + תשליל Adobe DNG + Adobe DNG negatív + Negatif Adobe DNG + Negativo Adobe DNG + Adobe DNG ネガ + Adobe DNG негативі + 어도비 DNG 네가티브 + Adobe DNG negatyvas + Adobe DNG negatīvs + Adobe DNG-negativ + Adobe DNG-negatief + Adobe DNG-negativ + Negatyw DNG Adobe + Negativo DNG da Adobe + Negativ Adobe DNG + негатив Adobe DNG + Adobe Digital Negative (DNG) + Datoteka negativa Adobe DNG + Negativ Adobe DNG + Adobe DNG-negativ + цифровий негатив DNG Adobe + Âm bản Adobe DNG + Adobe DNG 负片 + Adobe DNG 負片 + DNG + Digital Negative + + + + + + + + Canon CRW raw image + صورة Canon CRW خامة + Suvoraja vyjava Canon CRW + Изображение — Canon CRW raw + imatge en cru de Canon CRW + Surový obrázek Canon CRW + Canon CRW-råbillede + Canon-CRW-Rohbild + imagen en bruto CRW de Canon + Canon CRW irudi gordina + Canon-CRW-raakakuva + Canon CRW rámynd + image brute CRW Canon + amhíomhá Canon CRW + imaxe en bruto de Canon CRW + תמונה גולמית של Canon CRW + Canon CRW nyers kép + Citra mentah Canon CRW + Immagine raw Canon CRW + Canon CRW raw 画像 + Canon CRW өңделмеген суреті + 캐논 CRW 원본 이미지 + Canon CRW neapdorotas paveikslėlis + Canon CRW jēlattēls + Canon CRW raw-bilde + onbewerkt Canon CRW-beeld + Canon CRW råbilete + Surowy obraz CRW Canon + Imagem bruta CRW da Canon + Imagine brută Canon CRW + необработанное изображение Canon CRW + Surový obrázok Canon CRW + Surova slikovna datoteka Canon CRW + Figurë raw Canon CRW + Canon CRW-råbild + цифровий негатив CRW Canon + Ảnh thô Canon CRW + Canon CRW 原始图像 + Canon CRW 原生影像 + CRW + Canon RaW + + + + + + + + + Canon CR2 raw image + صورة Canon CR2 خامة + Suvoraja vyjava Canon CR2 + Изображение — Canon CR2 raw + imatge en cru de Canon CR2 + Surový obrázek Canon CR2 + Canon CR2-råbillede + Canon-CR2-Rohbild + imagen en bruto CR2 de Canon + Canon CR2 irudi gordina + Canon-CR2-raakakuva + Canon CR2 rámynd + image brute CR2 Canon + amhíomhá Canon CR2 + imaxe en bruto de Canon CR2 + תמונה גולמית של Canon CR2 + Canon CR2 nyers kép + Citra mentah Canon CR2 + Immagine raw Canon CR2 + Canon CR2 raw 画像 + Canon CR2 өңделмеген суреті + 캐논 CR2 원본 이미지 + Canon CR2 neapdorotas paveikslėlis + Canon CR2 jēlattēls + Canon CR2 raw-bilde + onbewerkt Canon CR2-beeld + Canon CR2 råbilete + Surowy obraz CR2 Canon + Imagem bruta CR2 da Canon + Imagine brută Canon CR2 + необработанное изображение Canon CR2 + Surový obrázok Canon CR2 + Surova slikovna datoteka Canon CR2 + Figurë raw Canon CR2 + Canon CR2-råbild + цифровий негатив CR2 Canon + Ảnh thô Canon CR2 + Canon CR2 原始图像 + Canon CR2 原生影像 + CR2 + Canon Raw 2 + + + + + + Fuji RAF raw image + صورة Fuji RAF خامة + Suvoraja vyjava Fuji RAF + Изображение — Fuji RAF raw + imatge en cru de Fuji RAF + Surový obrázek Fuji RAF + Fuji RAF-råbillede + Fuji-RAF-Rohbild + imagen en bruto RAF de Fuji + Fuji RAF irudi gordina + Fuji-RAF-raakakuva + Fuji RAF raw mynd + image brute RAF Fuji + amhíomhá Fuji RAF + imaxe en bruto de Fuji RAF + תמונה גולמית של Fuji RAF + Fuji RAF nyers kép + Citra mentah Fuji RAF + Immagine raw Fuji RAF + Fuji RAF raw 画像 + Fuji RAF өңделмеген суреті + 후지 RAF 원본 이미지 + Fuji RAF neapdorotas paveikslėlis + Fuji RAF jēlattēls + Fuji RAF raw-bilde + onbewerkt Fuji RAF-beeld + Fuji RAF rått bilete + Surowy obraz RAF Fuji + Imagem bruta RAF da Fuji + Imagine brută Fuji RAF + необработанное изображение Fuji RAF + Surový obrázok Fuji RAF + Surova slikovna datoteka Fuji RAF + Figurë raw Fuji RAF + Fuji RAF-råbild + Цифровий негатив RAF Fuji + Ảnh thô Fuji RAF + 富士RAF 原始图像 + Fuji RAF 原生影像 + RAF + RAw Format + + + + + + + + Kodak DCR raw image + صورة Kodak DCR خامة + Suvoraja vyjava Kodak DCR + Изображение — Kodak DCR raw + imatge en cru de Kodak DCR + Surový obrázek Kodak DCR + Kodak DCR-råbillede + Kodak-DCR-Rohbild + imagen en bruto DCR de Kodak + Kodak DCR irudi gordina + Kodak-DCR-raakakuva + Kodak DCR rámynd + image brute DCR Kodak + amhíomhá Kodak DCR + imaxe en bruto de Kodad DCR + תמונה גולמית של Kodak DCR + Kodak DCR nyers kép + Citra mentah Kodak DCR + Immagine raw Kodak DCR + Kodak DCR raw 画像 + Kodak DCR өңделмеген суреті + 코닥 DCR 원본 이미지 + Kodak DCR neapdorotas paveikslėlis + Kodak DCR jēlattēls + Kodak DCR raw-bilde + onbewerkt Kodak DCR-beeld + Kodak DCR råbilete + Surowy obraz DCR Kodak + Imagem bruta DCR da Kodak + Imagine brută Kodak DCR + необработанное изображение Kodak DCR + Surový obrázok Kodak DCR + Surova slikovna datoteka Kodak DCR + Figurë raw Kodak DCR + Kodak DCR-råbild + цифровий негатив DCR Kodak + Ảnh thô Kodak DCR + Kodak DCR 原始图像 + Kodak DCR 原生影像 + DCR + Digital Camera Raw + + + + + + Kodak K25 raw image + صورة Kodak K25 خامة + Suvoraja vyjava Kodak K25 + Изображение — Kodak K25 raw + imatge en cru de Kodak K25 + Surový obrázek Kodak K25 + Kodak K25-råbillede + Kodak-K25-Rohbild + imagen en bruto K25 de Kodak + Kodak K25 raw image + Kodak-K25-raakakuva + Kodak K25 rámynd + image brute K25 Kodak + amhíomhá Kodak K25 + imaxe en bruto de Kodad K25 + תמונה גולמית של Kodak K25 + Kodak K25 nyers kép + Citra mentah Kodak K25 + Immagine raw Kodak K25 + Kodak K25 raw 画像 + Kodak K25 өңделмеген суреті + 코닥 K25 원본 이미지 + Kodak K25 neapdorotas paveikslėlis + Kodak K25 jēlattēls + Kodak K25 raw-bilde + onbewerkt Kodak K25-beeld + Kodak K25 råbilete + Surowy obraz K25 Kodak + Imagem bruta K25 da Kodak + Imagine brută Kodak K25 + необработанное изображение Kodak K25 + Surový obrázok Kodak K25 + Surova slikovna datoteka Kodak K25 + Figurë raw Kodak K25 + Kodak K25-råbild + цифровий негатив K25 Kodak + Ảnh thô Kodak K25 + Kodak K25 原始图像 + Kodak K25 原生影像 + K25 + Kodak DC25 + + + + + + Kodak KDC raw image + صورة Kodak KDC خامة + Suvoraja vyjava Kodak KDC + Изображение — Kodak KDC raw + imatge en cru de Kodak KDC + Surový obrázek Kodak KDC + Kodak KDC-råbillede + Kodak-KDC-Rohbild + imagen en bruto KDC de Kodak + Kodak KDC irudi gordina + Kodak-KDC-raakakuva + Kodak KDC rámynd + image brute KDC Kodak + amhíomhá Kodak KDC + imaxe en bruto de Kodad KDC + תמונה גולמית של Kodak KDC + Kodak KDC nyers kép + Citra mentah Kodak KDC + Immagine raw Kodak KDC + Kodak KDC raw 画像 + Kodak KDC өңделмеген суреті + 코닥 KDC 원본 이미지 + Kodak KDC neapdorotas paveikslėlis + Kodak KDC jēlattēls + Kodak KDC raw-bilde + onbewerkt Kodak KDC-beeld + Kodak KDC råbilete + Surowy obraz KDC Kodak + Imagem bruta KDC da Kodak + Imagine brută Kodak KDC + необработанное изображение Kodak KDC + Surový obrázok Kodak KDC + Surova slikovna datoteka Kodak KDC + Figurë raw Kodak KDC + Kodak KDC-råbild + цифровий негатив KDC Kodak + Ảnh thô Kodak KDC + Kodak KDC 原始图像 + Kodak KDC 原生影像 + KDC + Kodak Digital Camera + + + + + + + + + Minolta MRW raw image + صورة Minolta MRW خامة + Suvoraja vyjava Minolta MRW + Изображение — Minolta MRW raw + imatge en cru de Minolta MRW + Surový obrázek Minolta MRW + Minolta MRW-råbillede + Minolta-MRW-Rohbild + imagen en bruto MRW de Minolta + Minolta MRW irudi gordina + Minolta-MRW-raakakuva + Minolta MRW rámynd + image brute MRW Minolta + amhíomhá Minolta MRW + imaxe RAW de Minolta MRW + תמונה גולמית של Minolta MRW + Minolta MRW nyers kép + Citra mentah Minolta MRW + Immagine raw Minolta MRW + Minolta MRW raw 画像 + Minolta MRW өңделмеген суреті + 미놀타 MRW 원본 이미지 + Minolta MRW neapdorotas paveikslėlis + Minolta MRW jēlattēls + Minolta MRW raw-bilde + onbewerkt Minolta MRW-beeld + Minolta MRW råbilete + Surowy obraz MRW Minolta + Imagem bruta MRW do Minolta + Imagine brută Minolta MRW + необработанное изображение Minolta MRW + Surový obrázok Minolta MRW + Surova slikovna datoteka Minolta MRW + Figurë raw Minolta MRW + Minolta MRW-råbild + цифровий негатив MRW Minolta + Ảnh thô Minolta MRW + Minolta MRW 原始图像 + Minolta MRW 原生影像 + MRW + Minolta RaW + + + + + + + + Nikon NEF raw image + صورة Nikon NEF خامة + Suvoraja vyjava Nikon NEF + Изображение — Nikon NEF raw + imatge en cru de Nikon NEF + Surový obrázek Nikon NEF + Nikon NEF-råbillede + Nikon-NEF-Rohbild + imagen en bruto NEF de Nikon + Nikon NEF irudi gordina + Nikon-NEF-raakakuva + Nikon NEF rámynd + image brute NEF Nikon + amhíomhá Nikon NEF + imaxe RAW NEF Nikon + תמונה גולמית של Nikon NEF + Nikon NEF nyers kép + Citra mentah Nikon NEF + Immagine raw Nikon NEF + Nikon NEF raw イメージ + Nikon NEF өңделмеген суреті + 니콘 NEF 원본 이미지 + Nikon NEF neapdorotas paveikslėlis + Nikon NEF jēlattēls + Nikon NEF raw-bilde + onbewerkt Nikon NEF-beeld + Nikon NEF råbilete + Surowy obraz NEF Nikon + Imagem bruta NEF da Nikon + Imagine brută Nikon NEF + необработанное изображение Nikon NEF + Surový obrázok Nikon NEF + Surova slikovna datoteka Nikon NEF + Figurë raw Nikon NEF + Nikon NEF-råbild + цифровий негатив NEF Nikon + Ảnh thô Nikon NEF + Nikon NEF 原始图像 + Nikon NEF 原生影像 + NEF + Nikon Electronic Format + + + + + + Olympus ORF raw image + صورة Olympus ORF خامة + Suvoraja vyjava Olympus ORF + Изображение — Olympus ORF raw + imatge en cru d'Olympus ORF + Surový obrázek Olympus ORF + Olympus ORF-råbillede + Olympus-ORF-Rohbild + imagen en bruto ORF de Olympus + Olympus ORF irudi gordina + Olympus-ORF-raakakuva + Olympus ORF rámynd + image brute ORF Olympus + amhíomhá Olympus ORF + imaxe en bruto de Olympus ORF + תמונה גולמית של Olympus ORF + Olympus ORF nyers kép + Citra mentah Olympus ORF + Immagine raw Olympus ORF + Olympus ORF raw 画像 + Olympus ORF өңделмеген суреті + 올림푸스 ORF 원본 이미지 + Olympus ORF neapdorotas paveikslėlis + Olympus ORF jēlattēls + Olympus ORF raw-bilde + onbewerkt Olympus ORF-beeld + Olympus ORF råbilete + Surowy obraz Olympus ORF + Imagem bruta ORF da Olympus + Imagine brută Olympus ORF + необработанное изображение Olympus ORF + Surový obrázok Olympus ORF + Surova slikovna datoteka Olympus ORF + Figurë raw Olympus ORF + Olympus ORF-råbild + цифровий негатив ORF Olympus + Ảnh thô Olympus ORF + Olympus ORF 原始图像 + Olympus ORF 原生影像 + ORF + Olympus Raw Format + + + + + + + + + + + + + Panasonic raw image + صورة Panasonic خامة + Suvoraja vyjava Panasonic + Изображение — Panasonic raw + imatge en cru de Panasonic + Surový obrázek Panasonic + Panasonicråbillede (raw) + Panasonic-Rohbild + imagen en bruto de Panasonic + Panasonic irudi gordina + Panasonic-raakakuva + Panasonic rámynd + image brute Panasonic + amhíomhá Panasonic + imaxe en bruto de Panasonic + תמונה גולמית של Panasonic + Panasonic nyers kép + Citra mentah Panasonic + Immagine raw Panasonic + Panasonic raw 画像 + Panasonic өңделмеген суреті + 파나소닉 원본 이미지 + Panasonic neapdorotas paveikslėlis + Panasonic jēlattēls + Panasonic raw-bilde + onbewerkt Panasonic-beeld + Panasonic råbilete + Obraz raw Panasonic + Imagem bruta da Panasonic + Imagine brută Panasonic + необработанное изображение Panasonic + Surový obrázok Panasonic + Surova slikovna datoteka Panasonic + Figurë raw Panasonic + Panasonic-råbild + цифровий негатив Panasonic + Ảnh thô Panasonic + Panasonic 原始图像 + Panasonic 原生影像 + + + + + + + + + Panasonic raw2 image + Изображение — Panasonic raw2 + imatge «RAW2» de Panasonic + Surový obrázek Panasonic raw2 + Panasonic-rå2-billede (raw) + Panasonic raw2-Bild + imagen en bruto raw2 de Panasonic + Panasonic raw2 -kuva + image raw2 Panasonic + imaxe en bruto raw2 de Panasonic + תמונת raw2 של Panasonic + Panasonic raw2 kép + Image Panasonic raw2 + Immagine raw2 Panasonic + Panasonic raw2 画像 + Panasonic raw2 суреті + 파나소닉 원본 이미지 2 + Panasonic raw2 jēlattēls + Obraz raw2 Panasonic + необработанное изображение Panasonic RAW 2 + Surový obrázok Panasonic raw2 + Slikovna datoteka Panasonic raw2 + Panasonic raw2-bild + зображення формату raw2 Panasonic + Panasonic raw2 图像 + Panasonic raw2 影像 + + + + + + + + + Pentax PEF raw image + صورة Pentax PEF خامة + Suvoraja vyjava Pentax PEF + Изображение — Pentax PEF raw + imatge en cru de Pentax PEF + Surový obrázek Pentax PEF + Pentax PEF-råbillede + Pentax-PEF-Rohbild + imagen en bruto PEF de Pentax + Pentax PEF irudi gordina + Pentax-PEF-raakakuva + Pentax PEF rámynd + image brute PEF Pentax + amhíomhá Pentax PEF + imaxe en bruto PEF de Pentax + תמונה גולמית של Pentax PEF + Pentax PEF nyers kép + Citra mentah Pentax PEF + Immagine raw Pentax PEF + Pentax PEF raw 画像 + Pentax PEF өңделмеген суреті + 펜탁스 PEF 원본 이미지 + Pentax PEF neapdorotas paveikslėlis + Pentax PEF jēlattēls + Pentax PEF raw-bilde + onbewerkt Pentax PEF-beeld + Pentax PEF råbilete + Surowy obraz Pentax PEF + Imagem bruta PEF da Pentax + Imagine brută Pentax PEF + необработанное изображение Pentax PEF + Surový obrázok Pentax PEF + Surova slikovna datoteka Pentax PEF + Figurë raw Pentax PEF + Pentax PEF-råbild + цифровий негатив PEF Pentax + Ảnh thô Pentax PEF + Pentax PEF 原始图像 + Pentax PEF 原生影像 + PEF + Pentax Electronic Format + + + + + + Sigma X3F raw image + صورة Sigma X3F خامة + Suvoraja vyjava Sigma X3F + Изображение — Sigma X3F raw + imatge en cru de Sigma X3F + Surový obrázek Sigma X3F + Sigma X3F-råbillede + Sigma-X3F-Rohbild + imagen en bruto X3F de Sigma + Sigma X3F irudi gordina + Sigma-X3F-raakakuva + Sigma X3F rámynd + image brute X3F Sigma + amhíomhá Sigma X3F + imaxe en bruto X3F de Sigma + תמונה גולמית של Sigma X3F + Sigma XF3 nyers kép + Citra mentah Sigma X3F + Immagine raw Sigma X3F + Sigma X3F raw 画像 + Sigma X3F өңделмеген суреті + 시그마 X3F 원본 이미지 + Sigma X3F neapdorotas paveikslėlis + Sigma X3F jēlattēls + Sigma X3F raw-bilde + onbewerkt Sigma X3F-beeld + Sigma X3F råbilete + Surowy obraz X3F Sigma + Imagem bruta X3F da Sigma + Imagine brută Sigma X3F + необработанное изображение Sigma X3F + Surový obrázok Sigma X3F + Surova slikovna datoteka Sigma X3F + Fifurë raw Sigma X3F + Sigma X3F-råbild + цифровий негатив X3F Sigma + Ảnh thô Sigma X3F + Sigma X3F 原始图像 + Sigma X3F 原生影像 + X3F + X3 Foveon + + + + + + + + + + + + Sony SRF raw image + صورة Sony SRF خامة + Suvoraja vyjava Sony SRF + Изображение — Sony SRF raw + imatge en cru de Sony SRF + Surový obrázek Sony SRF + Sony SRF-råbillede + Sony-SRF-Rohbild + imagen en bruto SRF de Sony + Sony SRF irudi gordina + Sony-SRF-raakakuva + Sony SRF rámynd + image brute SRF Sony + amhíomhá Sony SRF + imaxe en bruto SRF de sony + תמונה גולמית של Sony SRF + Sony SRF nyers kép + Citra mentah Sony SRF + Immagine raw Sony SRF + Sony SRF raw 画像 + Sony SRF өңделмеген суреті + 소니 SRF 원본 이미지 + Sony SRF neapdorotas paveikslėlis + Sony SRF jēlattēls + Sony SRF raw-bilde + onbewerkt Sony SRF-beeld + Sony SRF råbilete + Surowy obraz SRF Sony + Imagem bruta SRF da Sony + Imagine brută Sony SRF + необработанное изображение Sony SRF + Surový obrázok Sony SRF + Surova slikovna datoteka Sony SRF + Figurë raw Sony SRF + Sony SRF-råbild + цифровий негатив SRF Sony + Ảnh thô Sony SRF + Sony SRF 原始映像 + Sony SRF 原生影像 + SRF + Sony Raw Format + + + + + + Sony SR2 raw image + صورة Sony SR2 خامة + Suvoraja vyjava Sony SR2 + Изображение — Sony SR2 raw + imatge en cru de Sony SR2 + Surový obrázek Sony SR2 + Sony SR2-råbillede + Sony-SR2-Rohbild + imagen en bruto SR2 de Sony + Sony SR2 irudi gordina + Sony-SR2-raakakuva + Sony SR2 rámynd + image brute SR2 Sony + amhíomhá Sony SR2 + imaxe en bruto SR2 de sony + תמונה גולמית של Sony SR2 + Sony SR2 nyers kép + Citra mentah Sony SR2 + Immagine raw Sony SR2 + Sony SR2 raw 画像 + Sony SR2 өңделмеген суреті + 소니 SR2 원본 이미지 + Sony SR2 neapdorotas paveikslėlis + Sony SR2 jēlattēls + Sony SR2 raw-bilde + onbewerkt Sony SR2-beeld + Sony SR2 råbilete + Surowy obraz SR2 Sony + Imagem bruta SR2 da Sony + Imagine brută Sony SR2 + необработанное изображение Sony SR2 + Surový obrázok Sony SR2 + Surova slikovna datoteka Sony SR2 + Figurë raw Sony SR2 + Sony SR2-råbild + цифровий негатив SR2 Sony + Ảnh thô Sony SR2 + Sony SR2 原始映像 + Sony SR2 原生影像 + SR2 + Sony Raw format 2 + + + + + + Sony ARW raw image + صورة Sony ARW خامة + Suvoraja vyjava Sony ARW + Изображение — Sony ARW raw + imatge en cru de Sony ARW + Surový obrázek Sony ARW + Sony ARW-råbillede + Sony-ARW-Rohbild + imagen en bruto ARW de Sony + Sony ARW irudi gordina + Sony-ARW-raakakuva + Sony ARW rámynd + image brute ARW Sony + amhíomhá Sony ARW + imaxe en bruto ARW de sony + תמונה גולמית של Sony ARW + Sony ARW nyers kép + Citra mentah Sony ARW + Immagine raw Sony ARW + Sony ARW raw 画像 + Sony ARW өңделмеген суреті + 소니 ARW 원본 이미지 + Sony ARW neapdorotas paveikslėlis + Sony ARW jēlattēls + Sony ARW raw-bilde + onbewerkt Sony ARW-beeld + Sony ARW råbilete + Surowy obraz ARW Sony + Imagem bruta ARW da Sony + Imagine brută Sony ARW + необработанное изображение Sony ARW + Surový obrázok Sony ARW + Surova slikovna datoteka Sony ARW + Figurë raw Sony ARW + Sony ARW-råbild + цифровий негатив ARW Sony + Ảnh thô Sony ARW + Sony ARW 原始映像 + Sony ARW 原生影像 + ARW + Alpha Raw format + + + + + + PNG image + صورة PNG + PNG rəsmi + Vyjava PNG + Изображение — PNG + imatge PNG + Obrázek PNG + Delwedd PNG + PNG-billede + PNG-Bild + εικόνα PNG + PNG image + PNG-bildo + imagen PNG + PNG irudia + PNG-kuva + PNG mynd + image PNG + íomhá PNG + imaxe PNG + תמונת PNG + PNG-kép + Citra PNG + Immagine PNG + PNG 画像 + PNG суреті + PNG 그림 + PNG paveikslėlis + PNG attēls + Imej PNG + PNG-bilde + PNG-afbeelding + PNG-bilete + Obraz PNG + imagem PNG + Imagem PNG + Imagine PNG + изображение PNG + Obrázok PNG + Slikovna datoteka PNG + Figurë PNG + PNG слика + PNG-bild + зображення PNG + Ảnh PNG + PNG 图像 + PNG 影像 + + + + + + + Run Length Encoded bitmap image + تشغيل صورة نقطية طولية الترميز + Bitmapnaja vyjava, zakadavanaja ŭ Run Length + Изображение — RLE Bitmap + imatge de mapa de bits «Run Lenght Encoded» + Obrázek bitové mapy Run Length Encoded + Run Length Encoded-bitmapbillede + Lauflängenkodiertes Bitmap-Bild + mapa de bits con codificación del tamaño durante la ejecución + 'Run Lenght Encoded' bitmap irudia + RLE-koodattu bittikartta + image matricielle Run Length Encoded + íomhá mhapa giotáin Run Length Encoded + mapa de bits con codificación do tamaño durante a execución + מקודד מפת סיביות של Run Length + Run Length Encoded bitkép + Citra peta bit Run Length Encoded + Immagine bitmap RLE (Run Length Encoded) + ランレングス符号化ビットマップ画像 + RLE сығылған растрлік суреті + 실행 길이 인코딩된 비트맵 그림 + Run Length Encoded rastrinis paveikslėlis + Secīgo atkārtojumu kodēts bitkartes attēls + Run Length Encoded bitmap bilde + RLE-gecodeerde bitmap-afbeelding + Run Length Encoded punktgrafikk + Obraz bitmapy RLE + Classe de comprimento imagem bitmap codificada + Imagine bitmap codată RLE + растровое изображение (сжатое RLE) + Bitmapový obrázok Run Length Encoded + Zaporedno kodirana bitna slika (RLE) + Figurë bitmap RLE (Run Length Encoded) + Körlängdskodad bitmappbild + растрове зображення RLE + Ảnh mảng mã hóa chiều dài chạy (RLE) + 游程编码位图 + Run Length Encoded 點陣影像 + + + + SVG image + صورة SVG + Vyjava SVG + Изображение — SVG + imatge SVG + Obrázek SVG + SVG-billede + SVG-Bild + SVG image + SVG-bildo + imagen SVG + SVG irudia + SVG-kuva + SVG mynd + image SVG + íomhá SVG + imaxe SVG + תמונת SVG + SVG kép + Citra SVG + Immagine SVG + SVG 画像 + SVG суреті + SVG 그림 + SVG paveikslėlis + SVG attēls + SVG-bilde + SVG-afbeelding + SVG-bilete + Obraz SVG + Imagem SVG + Imagine SVG + изображение SVG + Obrázok SVG + Slikovna vektorska datoteka SVG + Figurë SVG + SVG-bild + зображення SVG + Ảnh SVG + SVG 图像 + SVG 影像 + SVG + Scalable Vector Graphics + + + + + + + + + + compressed SVG image + صورة SVG مضغوطة + skampresavanaja vyjava SVG + Изображение — SVG, компресирано + imatge SVG comprimida + Komprimovaný obrázek SVG + SVG-komprimeret billede + Komprimiertes SVG-Bild + imagen SVG comprimida + konprimitutako SVG irudia + pakattu SVG-kuva + stappað SVG mynd + image SVG compressée + íomhá SVG comhbhrúite + imaxe SVG comprimida + תמונת SVG מכוצת + tömörített SVG kép + Citra SVG terkompresi + Immagine SVG compressa + 圧縮 SVG 画像 + сығылған SVG суреті + 압축한 SVG 그림 + suglaudintas SVG paveikslėlis + saspiests SVG attēls + komprimert SVG-bilde + ingepakte SVG-afbeelding + komprimert SVG-bilete + Skompresowany obraz SVG + Imagem compactada SVG + imagine comprimată SVG + сжатое изображение SVG + Komprimovaný obrázok SVG + Slikovna datoteka SVG (stisnjena) + Figurë SVG e kompresuar + komprimerad SVG-bild + стиснене зображення SVG + ảnh SVG đã nén + 压缩的 SVG 图像 + 壓縮版 SVG 影像 + SVG + Scalable Vector Graphics + + + + + TIFF image + صورة TIFF + Vyjava TIFF + Изображение — TIFF + imatge TIFF + Obrázek TIFF + TIFF-billede + TIFF-Bild + εικόνα TIFF + TIFF image + TIFF-bildo + imagen TIFF + TIFF irudia + TIFF-kuva + TIFF mynd + image TIFF + íomhá TIFF + imaxe TIFF + תמונת TIFF + TIFF-kép + Citra TIFF + Immagine TIFF + TIFF 画像 + TIFF суреті + TIFF 그림 + TIFF paveikslėlis + TIFF attēls + Imej TIFF + TIFF-bilde + TIFF-afbeelding + TIFF-bilete + Obraz TIFF + imagem TIFF + Imagem TIFF + Imagine TIFF + изображение TIFF + Obrázok TIFF + Slikovna datoteka TIFF + Figurë TIFF + TIFF слика + TIFF-bild + зображення TIFF + Ảnh TIFF + TIFF 图像 + TIFF 影像 + TIFF + Tagged Image File Format + + + + + + + + + AutoCAD image + صورة AutoCAD + AutoCAD rəsmi + Vyjava AutoCAD + Изображение — AutoCAD + imatge d'AutoCAD + Obrázek AutoCAD + Delwedd AutoCAD + AutoCAD-billede + AutoCAD-Bild + εικόνα AutoCAD + AutoCAD image + AutoCAD-bildo + imagen de AutoCAD + AutoCAD-eko irudia + AutoCAD-kuva + AutoCAD mynd + image AutoCAD + íomhá AutoCAD + imaxe de AutoCAD + תמונה של AutoCAD + AutoCAD-kép + Citra AutoCAD + Immagine AutoCAD + AutoCAD 画像 + AutoCAD суреті + AutoCAD 그림 + AutoCAD paveikslėlis + AutoCAD attēls + Imej AutoCAD + AutoCAD-bilde + AutoCAD-afbeelding + AutoCAD-bilete + Obraz AutoCAD + imagem AutoCAD + Imagem do AutoCAD + Imagine AutoCAD + изображение AutoCAD + Obrázok AutoCAD + Slikovna datoteka AutoCAD + Figurë AutoCAD + AutoCAD слика + AutoCAD-bild + зображення AutoCAD + Ảnh AutoCAD + AutoCAD 图像 + AutoCAD 影像 + + + + DXF vector image + صورة DXF نقطية + Vektarnaja vyjava DXF + Изображение — DXF + imatge vectorial DXF + Vektorový obrázek DXF + DXF-vektorbillede + DXF-Vektorbild + ανυσματική εικόνα DXF + DXF vector image + vektora DXF-bildo + imagen vectorial DXF + DXF bektore-grafikoa + DXF-vektorikuva + DXF vektormynd + image vectorielle DXF + íomhá veicteoir DXF + imaxe de vector DXF + תמונת DXF וקטורית + DXF-vektorkép + Citra vektor DXF + Immagine vettoriale DXF + DXF ベクター画像 + DXF векторлық суреті + DXF 벡터 그림 + DXF vektorinis paveikslėlis + DXF vektora attēls + Imej vektor DXF + DXF-vektorgrafikk + DXF-vectorafbeelding + DXF-vektorgrafikk + Obraz wektorowy DXF + imagem de vectores DXF + Imagem vetorial DXF + Imagine vectorială DXF + векторное изображение DXF + Vektorový obrázok DXF + Slikovna vektorska datoteka DXF + Figurë vektoriale DFX + DXF векторска графика + DXF-vektorbild + векторне зображення DXF + Ảnh véc-tơ DXF + DXF 矢量图像 + DXF 向量圖 + + + + + + + + Microsoft Document Imaging format + صيغة مستند تصوير مايكروسوفت + Изображение — Microsoft Document Imaging + format Microsoft Document Imaging + Formát Microsoft Document Imaging + Microsofts dokumentbilledformat + Microsoft-Document-Imaging-Bildformat + formato de imagen de Microsoft Document + Microsoft Document Imaging formatua + Microsoft Document Imaging -muoto + Microsoft Document Imaging snið + format Document Imaging Microsoft + formáid Microsoft Document Imaging + formato de Microsoft Document Imaging + פורמט של Microsoft Document Imaging + Microsoft Document Imaging formátum + Format Microsoft Document Imaging + Formato MDI (Microsoft Document Imaging) + Microsoft ドキュメントイメージフォーマット + Microsoft Document Imaging пішімі + 마이크로소프트 문서 이미지 형식 + Microsoft Document Imaging formatas + Microsoft dokumentu attēlošanas formāts + Microsoft Document Imaging + Format Microsoft Document Imaging + Formato do Microsoft Document Imaging + Format Microsoft Document Imaging + формат Microsoft Document Imaging + Formát Microsoft Document Imaging + Zapis Microsoft Document Imaging + Microsoft Document Imaging-format + формат Microsoft Document Imaging + Định dạng tạo ảnh tài liệu Microsoft + Microsoft Document Imaging 扫描图像 + 微軟文件影像格式 + MDI + Microsoft Document Imaging + + + + + + + 3D Studio image + صورة استديو ثلاثية الأبعاد + 3D Studio rəsmi + Vyjava 3D Studio + Изображение — 3D Studio + imatge de 3D Studio + Obrázek 3D Studio + Delwedd "3D Studio" + 3D Studio-billede + 3D-Studio-Bild + εικόνα 3D Studio + 3D Studio image + bildo de 3D Studio + imagen de 3D Studio + 3D Studio-ko irudia + 3D Studio -kuva + 3D Studio mynd + image 3D Studio + íomhá 3D Studio + imaxe de 3D Studio + תמונת 3D Studio + 3D Studio-kép + Citra 3D Studio + Immagine 3D Studio + 3D Studio 画像 + 3D Studio суреті + 3D Studio 그림 + 3D Studio paveikslėlis + 3D Studio attēls + Imej 3D Studio + 3D Studio-bilde + 3D-Studio-afbeelding + 3D Studio-bilete + Obraz 3D Studio + imagem 3D Studio + Imagem do 3D Studio + Imagine 3D Studio + сцена 3D Studio + Obrázok 3D Studio + Slikovna datoteka 3D Studio + Figurë 3D Studio + 3D Studio слика + 3D Studio-bild + зображення 3D Studio + Ảnh xuởng vẽ 3D + 3D Studio 图像 + 3D Studio 影像 + + + + Applix Graphics image + صورة رسوميات Applix + Vyjava Applix Graphics + Изображение — Applix Graphics + imatge d'Applix Graphics + Obrázek Applix Graphics + Applix Graphics-billede + Applix-Graphics-Bild + εικόνα Applix Graphics + Applix Graphics image + bildo de Applix Graphics + imagen de Applix Graphics + Applix Graphics irudia + Applix Graphics -kuva + Applix Graphics mynd + image Applix Graphics + íomhá Applix Graphics + imaxe de Applix Graphics + תמונה של Applix Graphics + Applix Graphics-kép + Citra Applix Graphics + Immagine Applix Graphics + Applix Graphics 画像 + Applix Graphics суреті + Applix Graphics 그림 + Applix Graphics paveikslėlis + Applix Graphics attēls + Imej Applix Graphics + Applix Graphics-dokument + Applix Graphics-afbeelding + Applix Graphics-dokument + Obraz Applix Graphics + imagem Applix Graphics + Imagem do Applix Graphics + Imagine Applix Graphics + изображение Applix Graphics + Obrázok Applix Graphics + Slikovna datoteka Applix Graphics + Figurë Applix Graphics + Applix графички документ + Applix Graphics-bild + зображення Applix Graphics + Ảnh Applix Graphics + Applix Graphics 图像 + Applix Graphics 影像 + + + + + + + + + EPS image (bzip-compressed) + صورة EPS (مضغوط-bzip) + Vyjava EPS (bzip-skampresavanaja) + Изображение — EPS, компресирано с bzip + imatge EPS (comprimida amb bzip) + Obrázek EPS (komprimovaný pomocí bzip) + EPS-billede (bzip-komprimeret) + EPS-Bild (bzip-komprimiert) + imagen EPS (comprimida con bzip) + EPS irudia (bzip-ekin konprimitua) + EPS-kuva (bzip-pakattu) + EPS mynd (bzip-stappað) + image EPS (compressée bzip) + íomhá EPS (comhbhrúite le bzip) + imaxe EPS (comprimida con bzip) + תמונת EPS (מכווץ בbzip) + EPS kép (bzip-tömörítésű) + Citra EPS (terkompresi bzip) + Immagine EPS (compressa con bzip) + EPS 画像 (bzip 圧縮) + EPS суреті (bzip-пен сығылған) + EPS 그림 (BZIP 압축) + EPS paveikslėlis (suglaudintas su bzip) + EPS attēls (saspiests ar bzip) + EPS-bilde (bzip-komprimert) + EPS-afbeelding (ingepakt met bzip) + EPS-bilete (pakka med bzip) + Obraz EPS (kompresja bzip) + Imagem EPS (compactada com bzip) + Imagine EPS (compresie bzip) + изображение EPS (сжатое bzip) + Obrázok EPS (komprimovaný pomocou bzip) + Slikovna datoteka EPS (stisnjena z bzip) + Figurë EPS (e kompresuar me bzip) + EPS-bild (bzip-komprimerad) + зображення EPS (стиснене bzip) + Ảnh EPS (đã nén bzip) + EPS 图像(bzip 压缩) + EPS 影像 (bzip 格式壓縮) + + + + + + CMU raster image + صورة CMU نقطية + CMU raster rəsmi + Rastravaja vyjava CMU + Изображение — CMU raster + imatge ràster CMU + Rastrový obrázek CMU + Delwedd raster CMU + CMU-rasterbillede + CMU-Rasterbild + εικόνα ράστερ CMU + CMU raster image + rastruma bildo de CMU + imagen ráster CMU + CMU bilbe-irudia + CMU-rasterikuva + CMU raster mynd + image raster CMU + íomhá rastar CMU + imaxe raster CMU + תמונת סריקה CMU + CMU-raszterkép + Citra raster CMU + Immagine raster CMU + CMU ラスター画像 + CMU растрлық суреті + CMU 래스터 그림 + CMU rastrinis paveikslėlis + CMU rastra attēls + Imej raster CMU + CMU-rasterbilde + CMU-rasterafbeelding + CMU rasterbilete + Obraz rastrowy CMU + imagem rasterizada CMU + Imagem raster CMU + Imagine raster CMU + растровое изображение CMU + Rastrový obrázok CMU + Slikovna rastrska datoteka CMU + Figurë raster CMU + CMU растерска слика + CMU-rasterbild + растрове зображення CMU + Ảnh mành CMU + CMU 矢量图像 + CMU raster 影像 + + + + compressed GIMP image + صورة GIMP مضغوطة + skampresavanaja vyjava GIMP + Изображение — GIMP, компресирано + imatge GIMP comprimida + Komprimovaný obrázek GIMP + komprimeret GIMP-billede + Komprimiertes GIMP-Bild + imagen GIMP comprimida + konprimitutako GIMP irudia + pakattu GIMP-kuva + stappað GIMP mynd + image GIMP compressée + íomhá GIMP comhbhrúite + imaxe de GIMP comprimida + תמונת GIMP מכווצת + tömörített GIMP kép + Citra GIMP terkompresi + Immagine GIMP compressa + 圧縮 GIMP 画像 + сығылған GIMP суреті + 압축한 GIMP 그림 + suglaudintas GIMP paveikslėlis + saspiests GIMP attēls + komprimert GIMP-bilde + ingepakte GIMP-afbeelding + komprimert GIMP-bilete + Skompresowany obraz GIMP + Imagem compactada do GIMP + imagine comprimată GIMP + сжатое изображение GIMP + Komprimovaný obrázok GIMP + Slikovna datoteka GIMP (stisnjena) + Figurë GIMP e kompresuar + komprimerad GIMP-bild + стиснене зображення GIMP + ảnh GIMP đã nén + 压缩的 GIMP 图像 + 壓縮版 GIMP 影像 + + + + + DICOM image + صورة DICOM + Vyjava DICOM + Изображение — DICOM + imatge DICOM + Obrázek DICOM + DICOM-billede + DICOM-Bild + DICOM image + DICOM-bildo + imagen DICOM + DICOM irudia + DICOM-kuva + DICOM mynd + image DICOM + íomhá DICOM + imaxe DICOM + תמונת DICOM + DICOM kép + Citra DICOM + Immagine DICOM + DICOM 画像 + DICOM суреті + DICOM 그림 + DICOM paveikslėlis + DICOM attēls + DICOM-bilde + DICOM-afbeelding + DICOM-bilete + Obraz DICOM + Imagem DICOM + Imagine DICOM + изображение DICOM + Obrázok DICOM + Slikovna datoteka DICOM + Figurë DICOM + DICOM-bild + зображення DICOM + Ảnh DICOM + DICOM 图像 + DICOM 影像 + DICOM + Digital Imaging and Communications in Medicine + + + + + + + + DocBook document + مستند DocBook + Dakument DocBook + Документ — DocBook + document DocBook + Dokument DocBook + DocBook-dokument + DocBook-Dokument + DocBook document + DocBook-dokumento + documento DocBook + DocBook dokumentua + DocBook-asiakirja + DocBook skjal + document DocBook + cáipéis DocBook + documento de DocBook + מסמך DocBook + DocBook dokumentum + Dokumen DocBook + Documento DocBook + DocBook ドキュメント + DocBook құжаты + DocBook 문서 + DocBook dokumentas + DocBook dokuments + DocBook-dokument + DocBook-document + DocBook-dokument + Dokument DocBook + Documento DocBook + Document DocBook + документ DocBook + Dokument DocBook + Dokument DocBook + Dokument DocBook + DocBook-dokument + документ DocBook + Tài liệu DocBook + DocBook 文档 + DocBook 文件 + + + + + + + + + + + + DIB image + صورة DIB + Vyjava DIB + Изображение — DIB + imatge DIB + Obrázek DIB + DIB-billede + DIB-Bild + DIB image + DIB-bildo + imagen DIB + DIB irudia + DIB-kuva + DIB mynd + image DIB + íomhá DIB + imaxe DIB + תמונת DIB + DIB kép + Citra DIB + Immagine DIB + DIB 画像 + DIB суреті + DIB 그림 + DIB paveikslėlis + DIB attēls + DIB-bilde + DIB-afbeelding + DIB-bilete + Obraz DIB + Imagem DIB + Imagine DIB + изображение DIB + Obrázok DIB + Slikovna datoteka DIB + Figurë DIB + DIB-bild + зображення DIB + Ảnh DIB + DIB 图像 + DIB 影像 + DIB + Device Independant Bitmap + + + + + + DjVu image + صورة DjVu + Vyjava DjVu + Изображение — DjVu + imatge DjVu + Obrázek DjVu + DjVu-billede + DjVu-Bild + εικόνα DjVu + DjVu image + DjVu-bildo + imagen DjVu + DjVU-ko irudia + DjVu-kuva + DjVu mynd + image DjVu + íomhá DjVu + imaxe de DjVu + תמונת DjVu + DjVu-kép + Citra DjVu + Immagine DjVu + DjVu 画像 + DjVu суреті + DjVu 그림 + DjVu paveikslėlis + DjVu attēls + Imej DjVu + DjVu-bilde + DjVu-afbeelding + DjVu-bilete + Obraz DjVu + imagem DjVu + Imagem DjVu + Imagine DjVu + изображение DjVu + Obrázok DjVu + Slikovna datoteka DjVu + Figurë DjVu + DjVu слика + DjVu-bild + зображення DjVu + Ảnh DjVu + DjVu 图像 + DjVu 影像 + + + + + + + + + + + + + + + + + DPX image + صورة DPX + Vyjava DPX + Изображение — DPX + imatge DPX + Obrázek DPX + DPX-billede + DPX-Bild + DPX image + DPX-bildo + imagen DPX + DPX irudia + DPX-kuva + DPX mynd + image DPX + íomhá DPX + imaxe DPX + תמונת DPX + DPX kép + Citra DPX + Immagine DPX + DPX 画像 + DPX суреті + DPX 그림 + DPX paveikslėlis + DPX attēls + DPX-bilde + DPX-afbeelding + DPX-bilete + Obraz DPX + Imagem DPX + Imagine DPX + изображение DPX + Obrázok DPX + Slikovna datoteka DPX + Figurë DPX + DPX-bild + зображення DPX + Ảnh DPX + DPX 图像 + DPX 影像 + DPX + Digital Moving Picture Exchange + + + + + + EPS image + صورة EPS + Vyjava EPS + Изображение — EPS + imatge EPS + Obrázek EPS + EPS-billede + EPS-Bild + EPS image + EPS-bildo + imagen EPS + EPS irudia + EPS-kuva + EPS mynd + image EPS + íomhá EPS + imaxe EPS + תמונת EPS + EPS kép + Citra EPS + Immagine EPS + EPS 画像 + EPS суреті + EPS 그림 + EPS paveikslėlis + EPS attēls + EPS-bilde + EPS-afbeelding + EPS-bilete + Obraz EPS + Imagem EPS + Imagine EPS + изображение EPS + Obrázok EPS + Slikovna datoteka EPS + Figurë EPS + EPS-bild + зображення EPS + Ảnh EPS + EPS 图像 + EPS 影像 + EPS + Encapsulated PostScript + + + + + + + + + + + + + + + FITS document + مستند FITS + Dakument FITS + Документ — FITS + document FITS + Dokument FITS + FITS-dokument + FITS-Dokument + FITS document + FITS-dokumento + documento FITS + FITS dokumentua + FITS-asiakirja + FITS skjal + document FITS + cáipéis FITS + documento FICT + מסמך FITS + FITS dokumentum + Dokumen FITS + Documento FITS + FITS ドキュメント + FITS құжаты + FITS 문서 + FITS dokumentas + FITS dokuments + FITS-dokument + FITS-document + FITS-dokument + Dokument FITS + Documento FITS + Document FITS + документ FITS + Dokument FITS + Dokument FITS + Dokument FITS + FITS-dokument + документ FITS + Tài liệu FITS + FITS 文档 + FITS 文件 + FITS + Flexible Image Transport System + + + + + + + + FPX image + صورة FPX + Vyjava FPX + Изображение — FPX + imatge FPX + Obrázek FPX + FPX-billede + FPX-Bild + FPX image + FPX-bildo + imagen FPX + FPX irudia + FPX-kuva + FPX mynd + image FPX + íomhá FPX + imaxe FPX + תמונת FPX + FPX kép + Citra FPX + Immagine FPX + FPX 画像 + FPX суреті + FPX 그림 + FPX paveikslėlis + FPX attēls + FPX-bilde + FPX-afbeelding + FPX-bilete + Obraz FPX + Imagem FPX + Imagine FPX + изображение FPX + Obrázok FPX + Slikovna datoteka FPX + Figurë FPX + FPX-bild + зображення FPX + Ảnh FPX + FPX 图像 + FPX 影像 + FPX + FlashPiX + + + + + + EPS image (gzip-compressed) + صورة EPS (مضغوط-gzip) + Vyjava EPS (gzip-skampresavanaja) + Изображение — EPS, компресирано с gzip + imatge EPS (comprimida amb gzip) + Obrázek EPS (komprimovaný pomocí gzip) + EPS-billede (gzip-komprimeret) + EPS-Bild (gzip-komprimiert) + imagen EPS (comprimida con gzip) + EPS irudia (gzip-ekin konprimitua) + EPS-kuva (gzip-pakattu) + EPS mynd (gzip-stappað) + image EPS (compressée gzip) + íomhá EPS (comhbhrúite le gzip) + imaxe EPS (comprimida con gzip) + תמונת EPS (מכווץ בgzip) + EPS kép (gzip-tömörítésű) + Citra EPS (terkompresi gzip) + Immagine EPS (compressa con gzip) + EPS 画像 (gzip 圧縮) + EPS суреті (gzip-пен сығылған) + EPS 그림 (GZIP 압축) + EPS paveikslėlis (suglaudintas su gzip) + EPS attēls (saspiests ar gzip) + EPS-bilde (gzip-komprimert) + EPS-afbeelding (ingepakt met gzip) + EPS-bilete (pakka med gzip) + Obraz EPS (kompresja gzip) + Imagem EPS (compactada com gzip) + Imagine EPS (compresie gzip) + изображение EPS (сжатое gzip) + Obrázok EPS (komprimovaný pomocou gzip) + Slikovna datoteka EPS (stisnjena z gzip) + Figurë EPS (e kompresuar me gzip) + EPS-bild (gzip-komprimerad) + зображення EPS (стиснене gzip) + Ảnh EPS (đã nén gzip) + EPS 图像(gzip 压缩) + EPS 影像 (gzip 格式壓縮) + + + + + + Microsoft icon + أيقونة مايكروسوفت + Икона — Microsoft + icona de Microsoft + Ikona Microsoft + Microsoftikon + Microsoft-Symbol + Microsoft-piktogramo + icono de Microsoft + Microsoft ikonoa + Microsoft-kuvake + Microsoft ímynd + icône Microsoft + deilbhín Microsoft + Icona de microsoft + אייקון של Microsofr + Microsoft ikon + Ikon Microsoft + Icona Microsoft + Microsoft アイコン + Microsoft таңбашасы + 마이크로소프트 아이콘 + Microsoft piktograma + Microsoft ikona + Microsoft pictogram + Ikona Microsoft + Ícone da Microsoft + Iconiță Microsoft + значок Microsoft + Ikona Microsoft + Datoteka ikone Microsoft Windows + Microsoft-ikon + піктограма Microsoft + Biểu tượng Microsoft + Microsoft 图标 + 微軟圖示 + + + + + + + + + + + + + + + MacOS X icon + أيقونة MacOS X + Ikona MacOS X + Икона — MacOS X + icona MacOS X + Ikona MacOS X + MacOS X-ikon + MacOS-X-Symbol + MacOS-X-piktogramo + icono de MacOS X + MacOS X ikonoa + MacOS X -kuvake + MacOS X ímynd + icône MacOS X + deilbhín MacOS X + Icona de MacOS X + אייקון של MacOS X + MacOS X ikon + Ikon MacOS X + Icona MacOS X + MacOS X アイコン + MacOS X таңбашасы + MacOS X 아이콘 + MacOS X piktograma + MacOS X ikona + MacOS X-ikon + MacOS-X-pictogram + MacOS X-ikon + Ikona Mac OS X + Ícone do MacOS X + Iconiță MacOS X + значок MacOS X + Ikona MacOS X + Datoteka ikone MacOS X + Ikonë MacOS X + MacOS X-ikon + піктограма MacOS X + Biểu tượng MacOS X + MacOS X 图标 + MacOS X 圖示 + + + + + + + IFF image + صورة IFF + IFF rəsmi + Vyjava IFF + Изображение — IFF + imatge IFF + Obrázek IFF + Delwedd IFF + IFF-billede + IFF-Bild + εικόνα IFF + IFF image + IFF-bildo + imagen IFF + IFF irudia + IFF-kuva + IFF mynd + image IFF + íomhá IFF + imaxe IFF + תמונת IFF + IFF-kép + Citra IFF + Immagine IFF + IFF 画像 + IFF суреті + IFF 그림 + IFF paveikslėlis + IFF attēls + Imej IFF + IFF-bilde + IFF-afbeelding + IFF-bilete + Obraz IFF + imagem IFF + Imagem IFF + Imagine IFF + изображение IFF + Obrázok IFF + Slikovna datoteka IFF + Figurë IFF + IFF слика + IFF-bild + зображення IFF + Ảnh IFF + IFF 图像 + IFF 影像 + + + + ILBM image + صورة ILBM + ILBM rəsmi + Vyjava ILBM + Изображение — ILBM + imatge ILBM + Obrázek ILMB + Delwedd ILBM + ILBM-billede + ILBM-Bild + εικόνα ILBM + ILBM image + ILBM-bildo + imagen ILBM + ILBM irudia + ILBM-kuva + ILBM mynd + image ILBM + íomhá ILBM + imaxe ILBM + תמונת ILBM + ILBM-kép + Citra ILBM + Immagine ILBM + ILBM 画像 + ILBM суреті + ILBM 그림 + ILBM paveikslėlis + ILBM attēls + Imej ILBM + ILBM-bilde + ILBM-afbeelding + ILMB-bilete + Obraz ILBM + imagem ILBM + Imagem ILBM + Imagine ILBM + изображение ILBM + Obrázok ILMB + Slikovna datoteka ILBM + Figurë ILBM + ILBM слика + ILBM-bild + зображення ILBM + Ảnh ILBM + ILBM 图像 + ILBM 影像 + ILBM image + InterLeaved BitMap + + + + JNG image + صورة JNG + JNG rəsmi + Vyjava JNG + Изображение — JNG + imatge JNG + Obrázek JNG + Delwedd JNG + JNG-billede + JNG-Bild + εικόνα JNG + JNG image + JNG-bildo + imagen JNG + JNG irudia + JNG-kuva + JNG mynd + image JNG + íomhá JNG + imaxe JNG + תמונת JNG + JNG-kép + Citra JNG + Immagine JNG + JNG 画像 + JNG суреті + JNG 그림 + JNG paveikslėlis + JNG attēls + Imej PNG + JNG-bilde + JNG-afbeelding + JNG-bilete + Obraz JNG + imagem JNG + Imagem JNG + Imagine JNG + изображение JNG + Obrázok JNG + Slikovna datoteka JNG + Figurë JNG + JNG слика + JNG-bild + зображення JNG + Ảnh JNG + JNG 图像 + JNG 影像 + JNG + JPEG Network Graphics + + + + LightWave object + كائن LightWave + LightWave cismi + Abjekt LightWave + Обект — LightWave + objecte de LightWave + Objekt LightWave + Gwrthrych LightWave + LightWave-objekt + LightWave-Objekt + αντικείμενο LightWave + LightWave object + LightWave-objekto + objeto LightWave + LightWave objektua + LightWave-esine + LightWave lutur + objet LightWave + réad LightWave + obxecto de LightWave + עצם LightWave + LightWave-objektum + Proyek LightWave + Oggetto LightWave + LightWave オブジェクト + LightWave объекті + LightWave 개체 + LightWave objektas + LightWave objekts + Objek LightWave + LightWave-objekt + LightWave-object + LightWave-objekt + Obiekt LightWave + Objecto LightWave + Objeto LightWave + Obiect LightWave + объект LightWave + Objekt LightWave + Datoteka predmeta LightWave + Objekt LightWave + LightWave објекат + LightWave-objekt + об'єкт LightWave + Đối tượng LightWave + LightWave 对象 + LightWave 物件 + + + + + LightWave scene + مشهد LightWave + LightWave səhnəsi + Scena LightWave + Сцена — LightWave + escena de LightWave + Scéna LightWave + Golygfa LightWave + LightWave-scene + LightWave-Szene + σκηνή LightWave + LightWave scene + LightWave-sceno + escena LightWave + LightWave eszena + LightWave-maisema + LightWave leikmynd + scène LightWave + radharc LightWave + escena de LightWave + סצנה של LightWave + LightWave-jelenet + Scene LightWave + Scena LightWave + LightWave シーン + LightWave сахнасы + LightWave 장면 + LightWave scena + LightWave aina + Babak LightWave + LightWave-scene + LightWave-scène + LightWave-scene + Scena Lightwave + cenário LightWave + Cena LightWave + Scenă LightWave + сцена LightWave + Scéna LightWave + Datoteka scene LightWave + Skenë LightWave + LightWave сцена + LightWave-scen + сцена LightWave + Cảnh LightWave + LightWave 场景 + LightWave 場景 + + + + MacPaint Bitmap image + صورة MacPaint Bitmap + Bitmapnaja vyjava MacPaint + Изображение — MacPaint Bitmap + imatge de mapa de bits MacPaint + Obrázek MacPaint Bitmap + MacPaint BitMap-billede + MacPaint-Bitmap-Datei + imagen en mapa de bits de MacPaint + MacPaint Bitmap irudia + MacPaint-bittikartta + MacPaint Bitmap mynd + image matricielle MacPaint + íomhá MacPaint Bitmap + imaxe de mapa de bits MacPaint + תמונת מפת-סיביות של MacPaint + MacPaint bitkép + Citra MacPaint Bitmap + Immagine Bitmap MacPaint + MacPaint ビットマップ画像 + MacPaint растрлық суреті + 맥페인트 비트맵 그림 + MacPaint rastrinis paveikslėlis + MacPaint bitkartes attēls + MacPaint Bitmap-bilde + MacPaint-bitmap-afbeelding + MacPaint punktbilete + Obraz bitmapowy MacPaint + Imagem de bitmap do MacPaint + Imagine MacPaint Bitmap + растровое изображение MacPaint + Obrázok MacPaint Bitmap + Slikovna bitna datoteka MacPaint + Figurë BitMap MacPaint + MacPaint Bitmap-bild + растрове зображення MacPaint + Ảnh mảng MacPaint + MacPaint 位图 + MacPaint 點陣影像 + + + + Office drawing + تصميم أوفيس + Ofisny rysunak + Чертеж — Office + dibuix d'Office + Kresba Office + Officetegning + Office-Zeichnung + Office drawing + dibujo de Office + Office marrazkia + Office-piirros + Office tekning + dessin Office + líníocht Office + debuxo de Office + ציור של Office + Office rajz + Gambar Office + Disegno Office + Office ドロー + Office суреті + 오피스 드로잉 + Office piešinys + Office zīmējums + Office-tegning + Office-tekening + Office-teikning + Rysunek Office + Desenho do Office + Desen Office + изображение Office + Kresba Office + Datoteka risbe Office + Vizatim Office + Office-teckning + малюнок Office + Bản vẽ Office + Microsoft Office 绘图 + Office 繪圖 + + + + NIFF image + صورة NIFF + Vyjava NIFF + Изображение — NIFF + imatge NIFF + Obrázek NIFF + NIFF-billede + NIFF-Bild + NIFF-bildo + imagen NIFF + NIFF irudia + NIFF-kuva + NIFF mynd + image NIFF + íomhá NIFF + imaxe NIFF + תמונת NIFF + NIFF kép + Citra NIFF + Immagine NIFF + NIFF 画像 + NIFF суреті + NIFF 그림 + NIFF paveikslėlis + NIFF attēls + NIFF-bilde + NIFF-afbeelding + NIFF-bilete + Obraz NIFF + Imagem NIFF + Imagine NIF + изображение NIFF + Obrázok NIFF + Slikovna datoteka NIFF + Figurë NIFF + NIFF-bild + зображення NIFF + Ảnh NIFF + NIFF 图像 + NIFF 影像 + + + + + + PCX image + صورة PCX + Vyjava PCX + Изображение — PCX + imatge PCX + Obrázek PCX + PCX-billede + PCX-Bild + PCX image + PCX-bildo + imagen PCX + PCX irudia + PCX-kuva + PCX mynd + image PCX + íomhá PCX + imaxe PCX + תמונת PCX + PCX kép + Citra PCX + Immagine PCX + PCX 画像 + PCX суреті + PCX 그림 + PCX paveikslėlis + PCX attēls + PCX-bilde + PCX-afbeelding + PCX-bilete + Obraz PCX + Imagem PCX + Imagine PCX + изображение PCX + Obrázok PCX + Slikovna datoteka PCX + Figurë PCX + PCX-bild + зображення PCX + Ảnh PCX + PCX 图像 + PCX 影像 + PCX + PiCture eXchange + + + + + + + + + + + + PCD image + صورة PCD + Vyjava PCD + Изображение — PCD + imatge PCD + Obrázek PCD + PCD-billede + PCD-Bild + PCD image + PCD-bildo + imagen PCD + PCD irudia + PCD-kuva + PCD mynd + image PCD + íomhá PCD + imaxe PCD + תמונת PCD + PCD kép + Citra PCD + Immagine PCD + PCD 画像 + PCD суреті + PCD 그림 + PCD paveikslėlis + PCD attēls + PCD-bilde + PCD-afbeelding + PCD-bilete + Obraz PCD + Imagem PCD + Imagine PCD + изображение PCD + Obrázok PCD + Slikovna datoteka PCD + Figurë PCD + PCD-bild + зображення PCD + Ảnh PCD + PCD 图像 + PCD 影像 + PCD + PhotoCD + + + + PNM image + صورة PNM + PNM rəsmi + Vyjava PNM + Изображение — PNM + imatge PNM + Obrázek PNM + Delwedd PNM + PNM-billede + PNM-Bild + εικόνα PNM + PNM image + PNM-bildo + imagen PNM + PNM irudia + PNM-kuva + PNM mynd + image PNM + íomhá PNM + imaxe PNM + תמונת PNM + PNM-kép + Citra PNM + Immagine PNM + PNM 画像 + PNM суреті + PNM 그림 + PNM paveikslėlis + PNM attēls + Imej PNM + PNM-bilde + PNM-afbeelding + PNM-bilete + Obraz PNM + imagem PNM + Imagem PNM + Imagine PNM + изображение PNM + Obrázok PNM + Slikovna datoteka PNM + Figurë PNM + PNM слика + PNM-bild + зображення PNM + Ảnh PNM + PNM 图像 + PNM 影像 + + + + PBM image + صورة PBM + Vyjava PBM + Изображение — PBM + imatge PBM + Obrázek PBM + Delwedd PBM + PBM-billede + PBM-Bild + PBM image + PBM-bildo + imagen PBM + PBM irudia + PBM-kuva + PBM mynd + image PBM + íomhá PBM + imaxe PBM + תמונת PBM + PBM kép + Citra PBM + Immagine PBM + PBM 画像 + PBM суреті + PBM 그림 + PBM paveikslėlis + PBM attēls + PBM-bilde + PBM-afbeelding + PBM-bilete + Obraz PBM + Imagem PBM + Imagine PBM + изображение PBM + Obrázok PBM + Slikovna datoteka PBM + Figurë PBM + PBM слика + PBM-bild + зображення PBM + Ảnh PBM + PBM 图像 + PBM 影像 + PBM + Portable BitMap + + + + + + + + + + + + + + + + + + + PGM image + صورة PGM + Vyjava PGM + Изображение — PGM + imatge PGM + Obrázek PGM + Delwedd PGM + PGM-billede + PGM-Bild + PGM image + PGM-bildo + imagen PGM + PGM irudia + PGM-kuva + PGM mynd + image PGM + íomhá PGM + imaxe PGM + תמונת PGM + PGM kép + Citra PGM + Immagine PGM + PGM 画像 + PGM суреті + PGM 그림 + PGM paveikslėlis + PGM attēls + PGM-bilde + PGM-afbeelding + PGM-bilete + Obraz PGM + Imagem PGM + Imagine PGM + изображение PGM + Obrázok PGM + Slikovna datoteka PGM + Figurë PGM + PGM-bild + зображення PGM + Ảnh PGM + PGM 图像 + PGM 影像 + PGM + Portable GrayMap + + + + + + + + + + + + + + + + + + + PPM image + صورة PPM + Vyjava PPM + Изображение — PPM + imatge PPM + Obrázek PPM + Delwedd PPM + PPM-billede + PPM-Bild + PPM image + PPM-bildo + imagen PPM + PPM irudia + PPM-kuva + PPM mynd + image PPM + íomhá PPM + imaxe PPM + תמונת PPM + PPM kép + Citra PPM + Immagine PPM + PPM 画像 + PPM суреті + PPM 그림 + PPM paveikslėlis + PPM attēls + PPM-bilde + PPM-afbeelding + PPM-bilete + Obraz PPM + Imagem PPM + Imagine PPM + изображение PPM + Obrázok PPM + Slikovna datoteka PPM + Figurë PPM + PPM слика + PPM-bild + зображення PPM + Ảnh PPM + PPM 图像 + PPM 影像 + PPM + Portable PixMap + + + + + + + + + + + + + + + + + + + Photoshop image + صورة فوتوشوب + Изображение — Photoshop + imatge de Photoshop + Obrázek Photoshop + Photoshop-billede + Photoshop-Bild + εικόνα Photoshop + Photoshop-bildo + imagen de Photoshop + Photoshop irudia + Photoshop-kuva + Photoshop mynd + image Photoshop + íomhá Photoshop + imaxe de Photoshop + תמונת Photoshop + Photoshop-kép + Citra Photoshop + Immagine Photoshop + Photoshop 画像 + изображение Photoshop + 포토샵 이미지 + Photoshop paveikslėlis + Photoshop attēls + Imej Photoshop + Photoshop-afbeelding + Obraz Photoshop + imagem do Photoshop + Imagem do Photoshop + Imagine Photoshop + изображение Photoshop + Obrázok Photoshop + Slikovna datoteka Photoshop + Фотошоп слика + Photoshop-bild + зображення Photoshop + Ảnh Photoshop + Photoshop 图像 + Photoshop 影像 + + + + + + + + RGB image + صورة RGB + RGB rəsmi + Vyjava RGB + Изображение — RGB + imatge RGB + Obrázek RGB + Delwedd RGB + RGB-billede + RGB-Bild + εικόνα RGB + RGB image + RGB-bildo + imagen RGB + RGB irudia + RGB-kuva + RGB mynd + image RGB + íomhá RGB + imaxe RGB + תמונת RGB + RGB-kép + Citra RGB + Immagine RGB + RGB 画像 + RGB суреті + RGB 그림 + RGB paveikslėlis + RGB attēls + Imej RGB + RGB-bilde + RGB-afbeelding + RGB-bilete + Obraz RGB + imagem RGB + Imagem RGB + Imagine RGB + изображение RGB + Obrázok RGB + Slikovna datoteka RGB + Figurë RGB + RGB слика + RGB-bild + зображення RGB + Ảnh kiểu RGB + RGB 图像 + RGB 影像 + + + + SGI image + صورة SGI + Vyjava SGI + Изображение — SGI + imatge SGI + Obrázek SGI + SGI-billede + SGI-Bild + SGI image + SGI-bildo + imagen SGI + SGI irudia + SGI-kuva + SGI mynd + image SGI + íomhá SGI + imaxe SGI + תמונת SGI + SGI kép + Citra SGI + Immagine SGI + SGI 画像 + SGI суреті + SGI 그림 + SGI paveikslėlis + SGI attēls + SGI-bilde + SGI-afbeelding + SGI-bilete + Obraz SGI + Imagem SGI + Imagine SGI + изображение SGI + Obrázok SGI + Slikovna datoteka SGI + Figurë SGI + SGI-bild + зображення SGI + Ảnh SGI + SGI 图像 + SGI 影像 + + + + Sun raster image + صورة Sun raster + Rastravaja vyjava Sun + Изображение — Sun raster + imatge ràster Sun + Rastrový obrázek Sun + Sun rasterbillede + Sun-Rasterbild + imagen ráster de Sun + Sun raster irudia + Sun-rasterikuva + Sun raster mynd + image raster Sun + íomhá rastar Sun + imaxe ráster de Sun + תמונה סרוקה של Sun + SUN raszterkép + Citra raster Sun + Immagine raster Sun + Sun ラスタ画像 + Sun растрлық суреті + Sun 래스터 그림 + Sun rastrinis paveikslėlis + Sun rastra attēls + Sun rasterbilde + Sun-rasterafbeelding + Sun rasterbilete + Obraz rastrowy Sun + Imagem raster da Sun + Imagine rasterizată Sun + растровое изображение Sun + Rastrový obrázok Sun + Slikovna rastrska datoteka Sun + Figurë raster Sun + Sun-rasterbild + растрове зображення Sun + Ảnh mành Sun + Sun 光栅图像 + Sun raster 影像 + + + + + + + TGA image + صورة TGA + Vyjava TGA + Изображение — TGA + imatge TGA + Obrázek TGA + TGA-billede + TGA-Bild + TGA image + TGA-bildo + imagen TGA + TGA irudia + TGA-kuva + TGA mynd + image TGA + íomhá TGA + imaxe TGA + תמונת TGA + TGA kép + Citra TGA + Immagine TGA + TGA 画像 + TGA суреті + TGA 그림 + TGA paveikslėlis + TGA attēls + TGA-bilde + TGA-afbeelding + TGA-bilete + Obraz TGA + Imagem TGA + Imagine TGA + изображение TGA + Obrázok TGA + Slikovna datoteka TGA + Figurë TGA + TGA-bild + зображення TGA + Ảnh TGA + TGA 图像 + TGA 影像 + TGA + Truevision Graphics Adapter + + + + + + + + + + + + + + + + + Windows cursor + مؤشر ويندوز + Kursor Windows + Курсор — Windows + cursor de Windows + Kurzor Windows + Windowsmarkør + Windows-Cursor + δείκτης παραθυρικού περιβάλλοντος + Windows cursor + Windows-kursoro + cursor de Windows + Windows kurtsorea + Windows-osoitin + Windows vísi + curseur Windows + cúrsóir Windows + Cursor de Windows + סמן של Windows + Windows-kurzor + Kursor Windows + Cursore Windows + Windows カーソル + Windows курсоры + 윈도우 커서 + Windows žymiklis + Windows kursors + Kursor Windows + Windows-markør + Windows-muisaanwijzer + Windows-peikar + Kursor Windows + cursor Windows + Cursor do Windows + Cursor Windows + курсор Windows + Kurzor Windows + Datoteka kazalke Windows + Kursor Windows + Виндуз курзор + Windows-muspekare + курсор Windows + Con chạy Windows + Windows 光标 + Windows 滑鼠指標 + + + + + + + + + Windows animated cursor + مؤشر ويندوز المتحرك + Animavany kursor Windows + Курсор — Windows, анимиран + cursor animat de Windows + Animovaný kurzor Windows + Windowsanimeret markør + Animierter Windows-Cursor + cursor animado de Windows + Windows-eko kurtsore animatua + animoitu Windows-osoitin + Windows livindaigjørdur vísi + curseur animé Windows + cúrsóir beo Windows + Cursor animado de Windows + סמן מונפש של Windows + Windows animált kurzor + Kursor animasi Windows + Cursore animato Windows + Windows アニメーションカーソル + Windows анимациясы бар курсор + 윈도우 움직이는 커서 + Animuotas Windows žymiklis + Windows animēts kursors + geanimeerde Windows-muisaanwijzer + Windows animert peikar + Animowany kursor Windows + Cursor animado do Windows + Cursor animat Windows + анимированный курсор Windows + Animovaný kurzor Windows + Datoteka animirane kazalke Windows + Kursor i animuar Windows + Animerad Windows-muspekare + анімований курсор Windows + Con chạy hoạt họa Windows + Windows 动画光标 + Windows 滑鼠動畫游標 + + + + + + + + + EMF image + صورة EMF + Vyjava EMF + Изображение — EMF + imatge EMF + Obrázek EMF + EMF-billede + EMF-Bild + EMF-bildo + imagen EMF + EMF irudia + EMF-kuva + EMF mynd + image EMF + íomhá EMF + imaxe EMF + תמונת EMF + EMF kép + Citra EMF + Immagine EMF + EMF 画像 + EMF суреті + EMF 그림 + EMF paveikslėlis + EMF attēls + EMF-bilde + EMF-afbeelding + EMF-bilete + Obraz EMF + Imagem EMF + Imagine EMF + изображение EMF + Obrázok EMF + Slikovna datoteka EMF + Figurë EMF + EMF-bild + зображення EMF + Ảnh EMF + EMF 图像 + EMF 影像 + EMF + Enhanced MetaFile + + + + + + + + + + + + + WMF image + صورة WMF + Vyjava WMF + Изображение — WMF + imatge WMF + Obrázek WMF + WMF-billede + WMF-Bild + WMF-bildo + imagen WMF + WMF irudia + WMF-kuva + WMF mynd + image WMF + íomhá WMF + imaxe WMF + תמונת WMF + WMF kép + Citra WMF + Immagine WMF + WMF 画像 + WMF суреті + WMF 그림 + WMF paveikslėlis + WMF attēls + WMF-bilde + WMF-afbeelding + WMF-bilete + Obraz WMF + Imagem WMF + Imagine WMF + изображение WMF + Obrázok WMF + Slikovna datoteka WMF + Figurë WMF + WMF-bild + зображення WMF + Ảnh WMF + WMF 图像 + WMF 影像 + WMF + Windows Metafile + + + + + + + + + + + + + + + + + XBM image + صورة XBM + Vyjava XBM + Изображение — XBM + imatge XBM + Obrázek XBM + XBM-billede + XBM-Bild + XBM image + XBM-bildo + imagen XBM + XBM irudia + XBM-kuva + XBM mynd + image XBM + íomhá XBM + imaxe XBM + תמונת XBM + XBM-kép + Citra XBM + Immagine XBM + XBM 画像 + XBM суреті + XBM 그림 + XBM paveikslėlis + XBM attēls + XBM-bilde + XBM-afbeelding + XBM-bilete + Obraz XBM + Imagem XBM + Imagine XBM + изображение XBM + Obrázok XBM + Slikovna datoteka XBM + Figurë XBM + XBM-bild + зображення XBM + Ảnh XBM + XBM 图像 + XBM 影像 + XBM + X BitMap + + + + GIMP image + صورة GIMP + Vyjava GIMP + Изображение — GIMP + imatge del GIMP + Obrázek GIMP + GIMP-billede + GIMP-Bild + εικόνα GIMP + GIMP image + GIMP-bildo + imagen del GIMP + GIMP irudia + GIMP-kuva + GIMP mynd + image GIMP + íomhá GIMP + imaxe de GIMP + תמונת GIMP + GIMP-kép + Citra GIMP + Immagine GIMP + GIMP 画像 + GIMP суреті + GIMP 그림 + GIMP paveikslėlis + GIMP attēls + Imej GIMP + GIMP-bilde + GIMP-afbeelding + GIMP-bilete + Obraz GIMP + imagem do GIMP + Imagem do GIMP + Imagine GIMP + изображение GIMP + Obrázok GIMP + Slikovna datoteka GIMP + Figurë GIMP + Гимп слика + GIMP-bild + зображення GIMP + Ảnh GIMP + GIMP 图像 + GIMP 影像 + + + + + + + XFig image + صورة XFig + Vyjava XFig + Изображение — XFig + imatge de XFig + Obrázek XFig + XFig-billede + XFig-Bild + εικόνα XFig + XFig image + XFig-bildo + imagen de XFig + XFig irudia + XFig-kuva + XFig mynd + image XFig + íomhá XFig + imaxe de XFig + תמונת XFig + XFig-kép + Citra XFig + Immagine XFig + XFig 画像 + XFig суреті + XFig 그림 + XFig paveikslėlis + XFig attēls + Imej XFig + XFig-bilde + XFig-afbeelding + XFig-bilete + Obraz XFig + imagem XFig + Imagem do XFig + Imagine XFig + изображение XFig + Obrázok XFig + Slikovna datoteka XFig + Figurë XFig + XFig слика + XFig-bild + зображення XFig + Ảnh XFig + XFig 图像 + XFig 影像 + + + + + + + XPM image + صورة XPM + Vyjava XPM + Изображение — XPM + imatge XPM + Obrázek XPM + Delwedd XPM + XPM-billede + XPM-Bild + XPM image + XPM-bildo + imagen XPM + XPM irudia + XPM-kuva + XPM mynd + image XPM + íomhá XPM + imaxe XPM + תמונת XPM + XPM kép + Citra XPM + Immagine XPM + XPM 画像 + XPM суреті + XPM 그림 + XPM paveikslėlis + XPM attēls + XPM-bilde + XPM-afbeelding + XPM-bilete + Obraz XPM + Iimagem XPM + Imagine XPM + изображение XPM + Obrázok XPM + Slikovna datoteka XPM + Figurë XPM + XPM-bild + зображення XPM + Ảnh XPM + XPM 图像 + XPM 影像 + XPM + X PixMap + + + + + + + X window image + صورة X window + X window rəsmi + Vyjava vakna X + Изображение — X Window + imatge de X window + Obrázek X window + Delwedd ffenest X + X-billede + X-Window-Bild + εικόνα περιβάλλοντος X + X window image + bildo de X window + imagen de X window + X window irudia + X-ikkunakuva + X vindeyga mynd + image X window + íomhá fhuinneog X + imaxe de X Window + תמונת חלון של X + X window-kép + Citra X window + Immagine X window + X window 画像 + X window суреті + X 윈도우 그림 + X window paveikslėlis + X window attēls + Imej tetingkap X + X-Windows skjermbilde + X-window-afbeelding + X window bilete + Obraz X Window + imagem de janela X + Imagem de janela do X + Imagine X window + изображение X window + Obrázok X window + slika X oken + Figurë X window + X прозор слика + X-fönsterbild + зображення X window + Ảnh cửa sổ X + X window 图像 + X window 影像 + + + + block device + جهاز كتلي + blokavaja pryłada + Блоково устройство + dispositiu de blocs + Blokové zařízení + blokenhed + Blockorientiertes Gerät + συσκευή block + block device + bloka disponaĵo + dispositivo de bloques + bloke-gailua + laitetiedosto + blokka tóleind + périphérique de blocs + gléas bloc + dispositivo de bloque + התקן בלוק + blokkos eszköz + blok divais + Device a blocchi + ブロックデバイス + блоктық құрылғысы + 블럭 장치 + blokinis įrenginys + bloka ierīce + Peranti blok + blokkenhet + blok-apparaat + blokk-eining + Urządzenie blokowe + dispositivo de bloco + Dispositivo de bloco + dispozitiv bloc + блочное устройство + Blokové zariadenie + bločna naprava + device me blloqe + блок уређај + blockenhet + блоковий пристрій + thiết bị khối + 块设备 + 區塊裝置 + + + character device + جهاز حرفي + znakavaja pryłada + Символно устройство + dispositiu de caràcters + Znakové zařízení + tegnenhed + Zeichenorientiertes Gerät + συσκευή χαρακτήρων + character device + signa disponaĵo + dispositivo de caracteres + karaktereen gailua + merkkilaite + stavatóleind + périphérique de caractères + gléas carachtar + dispositivo de caracter + התקן תכונה + karakteres eszköz + karakter divais + Device a caratteri + キャラクタデバイス + символдық құрылғысы + 문자 장치 + simbolinis įrenginys + rakstzīmju ierīce + Peranti aksara + tegnenhet + byte-apparaat + teikneining + Urządzenie znakowe + dispositivo de caracteres + dispositivo de caractere + dispozitiv caracter + символьное устройство + Znakové zariadenie + znakovna naprava + device me karaktere + знаковни уређај + teckenenhet + символьний пристрій + thiết bị ký tự + 字符设备 + 字元裝置 + + + folder + مجلّد + kataloh + Папка + carpeta + Složka + mappe + Ordner + φάκελος + folder + dosierujo + carpeta + karpeta + kansio + mappa + dossier + fillteán + cartafol + תיקייה + mappa + folder + Cartella + フォルダー + бума + 폴더 + aplankas + mape + Folder + mappe + map + mappe + Katalog + pasta + pasta + dosar + папка + Priečinok + mapa + Kartelë + директоријум + mapp + тека + thư mục + 文件夹 + 資料夾 + + + + pipe + إنبوب + kanvejer + Конвейер + conducte + Roura + datakanal + Pipe + σωλήνωση + pipe + dukto + tubería + kanalizazioa + putki + rør + tube + píopa + tubería + צינור + adatcsatorna + pipa + Pipe + パイプ + арна + 파이프 + konvejeris + programmkanāls + Paip + rør + pijp + røyr + Potok + canal + pipe + canal pipe + канал + Rúra + cev + Pipe + цев + rör + канал + ống dẫn + 管道 + 管線 + + + mount point + نقطة الوصْل + punkt mantavańnia + Точка на монтиране + punt de muntatge + Místo připojení + monteringspunkt + Einhängepunkt + σημείο προσάρτησης + mount point + surmetingo + punto de montaje + muntatze-puntua + liitospiste + ísetingarpunkt + point d'accès + pointe feistithe + punto de montaxe + נקודת עיגון + csatolási pont + titik mount + Punto di mount + マウントポイント + тіркеу нүктесі + 마운트 위치 + prijungimo taškas + montēšanas punkts + Titik lekapan + monteringspunkt + aankoppelingspunt + monteringspunkt + Punkt montowania + ponto de montagem + ponto de montagem + loc montare + точка монтирования + Miesto pripojenia + priklopna točka + Pikë montimi + тачка прикључења + monteringspunkt + точка монтування + điểm lắp + 挂载点 + 掛載點 + + + + socket + مقبس + sokiet + Гнездо + sòcol + Socket + sokkel + Socket + υποδοχή + socket + kontaktoskatolo + socket + socketa + pistoke + sokkul + connecteur réseau + soicéad + socket + נקודת חיבור + illesztőpont + soket + Socket + ソケット + сокет + 소켓 + lizdas + sokets + Soket + plugg + socket + sokkel + Gniazdo + 'socket' + socket + socket + сокет + Soket + vtič + Socket + сокет + uttag + сокет + ổ cắm + 套接字 + socket + + + symbolic link + وصلة رمزية + simvolik körpü + symbalnaja spasyłka + Символна връзка + enllaç simbòlic + Symbolický odkaz + cyswllt symbolaidd + symbolsk henvisning + Symbolische Verknüpfung + συμβολικός σύνδεσμος + symbolic link + simbola ligilo + enlace simbólico + esteka sinbolikoa + symbolinen linkki + tykislig leinkja + lien symbolique + nasc siombalach + ligazón simbólica + קישור סימבולי + szimbolikus link + taut simbolik + Collegamento simbolico + シンボリックリンク + символдық сілтеме + 심볼릭 링크 + simbolinė nuoroda + simboliskā saite + Pautan simbolik + symbolsk lenke + symbolische koppeling + symbolsk lenkje + Dowiązanie symboliczne + ligação simbólica + ligação simbólica + legătură simbolică + символьная ссылка + Symbolický odkaz + simbolna povezava + Lidhje simbolike + симболичка веза + symbolisk länk + символічне посилання + liên kết tượng trưng + 符号链接 + 符號鏈結 + + + mail delivery report + تقرير تسليم البريد + poçt yollama raportu + rapart ab dastaŭcy pošty + Отчет за пристигналата поща + informe de lliurament de correu + Zpráva o doručení pošty + Adroddiad trosgludo post + postleveringsrapport + E-Mail-Zustellungsbericht + αναφορά παράδοσης μηνύματος + mail delivery report + raporto pri transdono de retpoŝto + informe de entrega de correo + posta banaketako txostena + viestin jakeluilmoitus + post útberingarfrásøgn + rapport de livraison de courriels + tuairisc sheachadadh poist + informe de entrega de correo + דוח העברת דואר + jelentés levélkézbesítésről + laporan pengantaran surat + Rapporto di consegna posta + メール配送ポート + пошта жеткізілгені туралы отчет + 메일 배달 보고서 + pašto pristatymo ataskaita + pasta piegādes atskaite + Laporan penghantaran mel + e-postleveranserapport + e-mail-bezorgingsbericht + e-post-leveringsrapport + Raport z dostarczenia poczty + relatório de entrega de e-mail + relatório de entrega de correspondência + raport de trimitere email + отчёт о доставке сообщения + Správa o doručení pošty + poročilo dostave pošte + Raport mbi dorëzimin e mesazhit + извештај доставе поруке + e-postleveransrapport + звіт про доставку пошти + thông báo phát thư + 邮件投递报告 + 郵件寄送回報 + + + + + mail disposition report + تقرير ترتيب البريد + poçt qayıtma raportu + rapart ab raźmiaščeńni pošty + Отчет за състоянието на пощата + informe de disposició de correu + Zpráva o předání pošty + adroddiad ffurf post + postdisponeringsrapport + E-Mail-Übertragungsbericht + αναφορά διάθεσης μηνύματος + mail disposition report + raporto pri dispono de retpoŝto + informe de disposición de correo + posta joerako txostena + viestin kuittausilmoitus + post avhendingarfrásøgn + rapport de disposition de courriels + tuairisc chóiriú poist + informe de disposición de correo + דוח אספקת דואר + jelentés levélkidobásról + laporan disposisi surat + Rapporto di disposizione posta + メール停止レポート + пошта жылжытылғаны туралы отчет + 메일 처리 보고서 + pašto charakteristikos ataskaita + pasta izvietojuma atskaite + Laporan pelupusan mel + e-postdispositionsrapport + e-mail-plaatsingsbericht + e-post-disposisjonsrapport + Raport z wysyłania poczty + relatório de disposição de e-mail + relatório de disposição de correspondência + confirmare primire email + отчёт о перемещении почты + Správa o odovzdaní pošty + poročilo razporeditve pošte + Raport mbi njoftimin e mesazhit + извештај слања поруке + e-postdispositionsrapport + звіт про розташування пошти + thông báo chuyển nhượng thư + 邮件接收报告 + 郵件處置回報 + + + + + reference to remote file + مرجع إلى ملف بعيد + uzaq fayla göstəriş + spasyłka da addalenaha fajłu + Препратка към отдалечен файл + referència a fitxer remot + Odkaz na vzdálený soubor + cyfeiriad at ffeil bell + reference til fjern fil + Verweis auf entfernte Datei + αναφορά σε απόμακρο αρχείο + reference to remote file + referenco al fora dosiero + referencia a un archivo remoto + erreferentzia urruneko fitxategiari + viittaus etätiedostoon + tilvísing til fjarfílu + référence au fichier distant + tagairt do chomhad cianda + referencia a un ficheiro remoto + התיחסות לקובץ מרוחק + hivatkozás távoli fájlra + referensi ke berkas jarak jauh + Riferimento a file remoto + リモートファイルへの参照 + қашықтағы файлға сілтеме + 원격 파일 참조 + nuoroda į nutolusį failą + norāde uz attālinātu failu + Rujukan ke fail jauh + referanse til ekstern fil + verwijzing naar bestand op afstand + referanse til fil over nettverk + Odwołanie do pliku zdalnego + referência a um ficheiro remoto + referência a um arquivo remoto + referință fișier la distanță + ссылка на удалённый файл + Odkaz na vzdialený súbor + sklic do oddaljene datoteke + Referim për tek file në distancë + референца на удаљену датотеку + referens till fjärrfil + посилання на віддалений файл + tham chiếu đến tập tin ở xa + 到远程文件的引用 + 遠端檔案的參照 + + + + Usenet news message + رسالة أخبار Usenet + Usenet xəbərlər ismarışı + Navina Usenet + Съобщение — Usenet + missatge de notícies Usenet + Příspěvek do diskusních skupin Usenet + Neges newyddion Usenet + Usenetnyhedsmeddelelse + Usenet-News-Nachricht + μήνυμα ομάδων συζητήσεων Usenet + Usenet news message + novaĵmesaĝo de Usenet + mensaje de noticias de Usenet + Usenet berrien mezua + nyyssiviesti + Usenet news boð + message de groupe d'échange Usenet + teachtaireacht nuacht Usenet + mensaxes de noticias de Usenet + הודעת חדשות של Usenet + USENET-hírcsoportüzenet + Pesan berita Usenet + Messaggio news Usenet + Usenet news メッセージ + Usenet жаңалық мәлімдемесі + 유즈넷 뉴스 메시지 + Usenet naujienų žinutė + Usenet jaunumu ziņojums + Mesej berita USENET + Usenet nyhetsmelding + Usenet-nieuwsbericht + USENET diskusjonsmelding + Wiadomość grupy dyskusyjnej + mensagem de notícias Usenet + Mensagem de notícias da Usenet + Mesaj Usenet de știri + новостное сообщение Usenet + Príspevok do diskusných skupín Usenet + novičarsko sporočilo Usenet + Mesazh lajmesh Usenet + Порука са дискусионе групе + Usenet-diskussionsgruppsmeddelande + повідомлення новин Usenet + Thông điệp tin tức USENET + Usenet 新闻信 + Usenet 新聞訊息 + + + + + + + + + + partial email message + رسالة البريد الإلكتروني الجزئية + qismi poçt ismarışı + niapoŭny list email + Част от електронно писмо + missatge de correu electrònic parcial + Částečná e-mailová zpráva + darn o neges e-bost + delvis postmeddelelse + E-Mail-Nachrichtenfragment + τμηματικό ηλ. μήνυμα + partial email message + parta retpoŝta mesaĝo + mensaje de correo electrónico parcial + posta mezu partziala + osittainen sähköpostiviesti + message partiel de courriel + teachtaireacht ríomhphoist neamhiomlán + mensaxe de correo electrónico parcial + מסר דוא"ל חלקי + részleges elektronikus levél + pesan email sebagian + Messaggio email parziale + 部分メールメッセージ + электронды поштаның үзінді мәлімдемесі + 부분적인 전자메일 메시지 + nepilnas el. laiškas + daļēja e-pasta vēstule + Bahagian mesej emel + del av e-postmelding + gedeeltelijk e-mailbericht + del av e-post-melding + Częściowa wiadomość e-mail + mensagem parcial de e-mail + mensagem de e-mail parcial + mesaj de email parțial + фрагмент сообщения электронной почты + Čiastočná e-mailová správa + delno elektronsko sporočilo + Mesazh poste i pjesëshëm + делимична е-порука + del av e-postmeddelande + часткове поштове повідомлення + thư điện tử riêng phần + 部分电子邮件 + 部份電子郵件訊息 + + + + + email message + رسالة البريد الإلكتروني + list email + Съобщение по електронната поща + missatge de correu electrònic + E-mailová zpráva + postmeddelelse + E-Mail-Nachricht + ηλ. μήνυμα + email message + retpoŝta mesaĝo + mensaje de correo electrónico + helbide elektronikoen mezua + sähköpostiviesti + t-post boð + message de courriel + teachtaireacht ríomhphoist + mensaxe de correo electrónico + הודעת דואר אלקטרוני + elektronikus levél + pesan email + Messaggio email + メール本文 + пошталық мәлімдеме + 전자우편 본문 + el. laiškas + e-pasta vēstule + Mesej emel + e-postmelding + e-mailbericht + e-postmelding + Wiadomość e-mail + mensagem de e-mail + mensagem de correio eletrônico + mesaj email + почтовое сообщение + E-mailová správa + sporočilo elektronske pošte + Mesazh poste + е-порука + e-postmeddelande + повідомлення email + thư điện tử + 电子邮件 + 電子郵件內容 + + + + + + + + + + + + + + + + + + GNU mail message + رسالة بريد جنو + GNU poçt ismarışı + List GNU + Съобщение — GNU mail + missatge de GNU mail + Zpráva GNU mail + Neges E-Bost GNU + GNU-postmeddelelse + GNU-Mail-Nachricht + μήνυμα αλληλογραφίας GNU + GNU mail message + mesaĝo de GNU mail + mensaje de GNU mail + GNU posta mezua + GNU-postiviesti + GNU mail boð + message de courriel GNU + teachtaireacht phost GNU + mensaxe de correo electrónico de GNU + הודעת דואר של GNU + GNU elektronikus levél + Pesan surat GNU + Messaggio GNU mail + GNU メールメッセージ + GNU пошта хабарламасы + GNU 메일 메시지 + GNU pašto žinutė + GNU pasta vēstule + Mesej emel GNU + GNU e-postmelding + GNU-mailbericht + GNU e-postmelding + Wiadomość pocztowa GNU + mensagem de e-mail GNU + Mensagem de correio GNU + Mesaj GNU mail + почтовое сообщение GNU + Správa GNU mail + Sporočilo pošte GNU + Mesazh GNU mail + ГНУ е-писмо + GNU-epostmeddelande + поштове повідомлення GNU + Thư điện tử của GNU + GNU mail 信件 + GNU 郵件訊息 + + + + + VRML document + مستند VRML + VRML sənədi + Dakument VRML + Документ — VRML + document VRML + Dokument VRML + Dogfen VRML + VRML-dokument + VRML-Dokument + έγγραφο VRML + VRML document + VRML-dokumento + documento VRML + VRML dokumentua + VRML-asiakirja + VRML skjal + document VRML + cáipéis VRML + documento VRML + מסמך VRML + VRML-dokumentum + Dokumen VRML + Documento VRML + VRML ドキュメント + VRML құжаты + VRML 문서 + VRML dokumentas + VRML dokuments + Dokumen VRML + VRML-dokument + VRML-document + VRML-dokument + Dokument VRML + documento VRML + Documento VRML + Document VRML + документ VRML + Dokument VRML + Dokument VRML + Dokument VRML + VRML документ + VRML-dokument + документ VRML + Tài liệu VRML + VRML 文档 + VRML 文件 + VRML + Virtual Reality Modeling Language + + + + + + + + message in several formats + رسالة في عدة صيغ + verici formatlarında ismarış + paviedamleńnie ŭ niekalkich farmatach + Съобщение в няколко формата + missatge en varis formats + Zpráva v několika formátech + neges mewn sawl fformat + meddelelse i flere formater + Nachricht in mehreren Formaten + μήνυμα σε διάφορες μορφές + message in several formats + mesaĝo en pluraj formatoj + mensaje en varios formatos + hainbat formatuko mezua + viesti useissa muodoissa + boð í fleiri sniðum + message en formats divers + teachtaireacht i roinnt fhormáidí + mensaxe en varios formatos + הודעה במספר פורמטים + többféle formátumú üzenet + pesan dalam beberapa format + Messaggio in diversi formati + いくつかの形式でのメッセージ + бірнеше пішімдегі мәлімдеме + 여러가지 형식의 메시지 + laiškas keletu formatų + ziņojums dažādos formātos + Mesej dalam beberapa format + melding i flere formater + bericht in meerdere opmaken + melding i fleire format + Wiadomość w wielu formatach + mensagem em vários formatos + mensagem em vários formatos + mesaj în diferite formate + сообщение в нескольких форматах + Správa v niekoľkých formátoch + sporočilo v več zapisih + Mesazh në formate të ndryshëm + поруке у више записа + meddelande i flera format + повідомлення у кількох форматах + thông điệp có vài định dạng + 各种格式的消息 + 多種格式的訊息 + + + Macintosh AppleDouble-encoded file + ملف Macintosh AppleDouble مشفر + Macintosh AppleDouble-kodlanmış fayl + Fajł Macintosh, AppleDouble-zakadavany + Файл — кодиран с Macintosh AppleDouble + fitxer codificat AppleDouble de Macintosh + Soubor kódovaný pomocí Macintosh AppleDouble + Ffeil AppleDouble-amgodedig Macintosh + Macintosh AppleDouble-kodet fil + Macintosh-Datei (AppleDouble-kodiert) + αρχείο Macintosh κωδικοποίησης AppleDouble + Macintosh AppleDouble-encoded file + dosiero kodigita laŭ Macintosh AppleDouble + archivo Macintosh codificado con AppleDouble + Macintosh AppleDouble-rekin kodetutako fitxategia + Macintosh AppleDouble -koodattu tiedosto + Macintosh AppleDouble-bronglað fíla + fichier codé Macintosh AppleDouble + comhad ionchódaithe le Macintosh AppleDouble + ficheiro de Macintosh codificado con AppleDouble + קובץ מסוג Macintosh AppleDouble-encoded + Macintosh AppleDouble kódolású fájl + Berkas tersandi Macintosh AppleDouble + File Macintosh codificato AppleDouble + Macintosh AppleDouble エンコードファイル + Macintosh AppleDouble кодталған файлы + 맥킨토시 AppleDouble-encoded 파일 + Macintosh AppleDouble-encoded failas + Macintosh AppleDouble-kodēts fails + Fail terenkod-AppleDouble Macintosh + dokument kodet med Macintosh AppleDouble + Macintosh AppleDouble-gecodeerd bestand + Macintosh AppleDouble-koda fil + Zakodowany w AppleDouble plik Macintosh + ficheiro codificado em AppleDouble de Macintosh + Arquivo Macintosh codificado com AppleDouble + Fișier codat Macintosh AppleDouble + файл (закодированный Macintosh AppleDouble) + Súbor kódovaný pomocou Macintosh AppleDouble + Kodirana datoteka Macintosh (AppleDouble) + File Macintosh i kodifikuar AppleDouble + Мекинтош AppleDouble-encoded датотека + Macintosh AppleDouble-kodad fil + файл закодований Macintosh AppleDouble + Tập tin đã mã hoá Apple-Double của Macintosh + Macintosh AppleDouble 编码的文件 + Macintosh AppleDouble 編碼檔 + + + message digest + خلاصة الرسالة + ismarış daycesti + digest paviedamleńniaŭ + Извадка от съобщение + recopilació de missatges + Přehled zpráv + crynodeb negeseuon + meddelelsessammendrag + Nachrichtensammlung + περίληψη μηνύματος + message digest + mesaĝaro + recopilación de mensajes + mezu laburra + viestikokoelma + boð samandráttur + condensé de message + achoimre theachtaireachtaí + recompilación de mensaxe + תקציר ההודעה + ömlesztett üzenet + pesan digest + Digest di messaggi + メッセージダイジェスト + мәлімдеме профилі + 메시지 묶음 + laiškų santrauka + ziņojumu apkopojums + Jilid mesej + medldingssamling + berichtenbundel + meldingsamandrag + Wiadomość przetwarzania + 'digest' de mensagens + resumo de mensagem + colecție mesaje email + профиль сообщения + Prehľad správ + povzetek sporočila + Shpërndarje mesazhesh + гомила порука + meddelandesamling + збірка повідомлень + bản tóm tắt thông điệp + 消息摘要 + 訊息摘要 + + + encrypted message + رسالة مشفرة + şifrələnmiş ismarış + zašyfravanaje paviedamleńnie + Шифрирано съобщение + missatge xifrat + Zašifrovaná zpráva + Neges wedi ei hamgryptio + krypteret meddelelse + Verschlüsselte Nachricht + κρυπτογραφημένο μήνυμα + encrypted message + ĉifrita mesaĝo + mensaje cifrado + mezu enkriptatua + salattu viesti + bronglað boð + message chiffré + teachtaireacht chriptithe + mensaxe cifrado + הודעה מוצפנת + titkosított üzenet + pesan terenkripsi + Messaggio cifrato + 暗号化メッセージ + шифрленген мәлімдеме + 암호화된 메시지 + užšifruotas laiškas + šifrēta vēstule + Mesej terenkripsi + kryptert melding + versleuteld bericht + kryptert melding + Wiadomość zaszyfrowana + mensagem cifrada + mensagem criptografada + mesaj criptat + зашифрованное сообщение + Zašifrovaná správa + šifrirano sporočilo + Mesazh i kriptuar + шифрована порука + krypterat meddelande + шифроване повідомлення + thông điệp đã mật mã + 加密信件 + 加密訊息 + + + compound documents + مستندات مركبة + składanyja dakumenty + Съставни документи + documents composats + Složené dokumenty + sammensatte dokumenter + Verbunddokumente + σύνθετα έγγραφα + compound documents + parentezaj dokumentoj + documentos compuestos + konposatutako dokumentuak + yhdisteasiakirjat + samansett skjøl + documents composés + cáipéisí comhshuite + documentos compostos + מסמכים מורכבים + összetett dokumentumok + dokumen kompon + Documenti composti + 複合ドキュメント + құрама құжаттары + 복합 문서 + sudurtiniai dokumentai + salikti dokumenti + Dokumen halaman + sammensatte dokumenter + samengestelde documenten + samansette dokument + Dokumenty złożone + documentos compostos + documentos compostos + documente compuse + составные документы + Zložené dokumenty + združeni dokumenti + dokumente të përbërë + сједињени документи + sammansatta dokument + складні документи + tài liệu ghép + 组合文档 + 複合文件 + + + compound document + مستند مركب + birləşik sənəd + składany dakument + Съставен документ + document composat + Složený dokument + dogfen gyfansawdd + sammensat dokument + Verbunddokument + σύνθετο έγγραφο + compound document + parenteza dokumento + documento compuesto + konposatutako dokumentua + yhdisteasiakirja + samansett skjal + document composé + cáipéis comhshuite + documento composto + מסמך מורכב + összetett dokumentum + dokumen kompon + Documento composto + 複合ドキュメント + құрама құжаты + 복합 문서 + sudurtinis dokumentas + salikts dokuments + Dokumen halaman + sammensatt dokument + samengesteld document + samansett dokument + Dokument złożony + documento composto + documento composto + document compus + составной документ + Zložený dokument + združeni dokument + dokumet i përbërë + сједињени документ + sammansatt dokument + складний документ + tài liệu ghép + 组合文档 + 複合文件 + + + mail system report + تقرير نظام البريد + poçt sistemi raportu + rapart paštovaj systemy + Отчет за пощенската система + informe de sistema de correu + Zpráva poštovního systému + adroddiad system bost + postsystemrapport + E-Mail-Systembericht + αναφορά συστήματος ηλ. ταχυδρομείου + mail system report + raporto de retpoŝta sistemo + informe del sistema de correo + posta sistemako txostena + viestijärjestelmän ilmoitus + postkervisfrásøgn + rapport système de courriels + tuairisc chóras poist + informe do sistema de correo + דו"ח של מערכת הדואר + levelezőrendszer jelentése + laporan sistem surat + Rapporto di sistema posta + メールシステムレポート + пошта жүйесінің мәлімдемесі + 메일 시스템 보고서 + pašto sistemos ataskaita + pasta sistēmas atskaite + Laporan sistem mel + e-postsystemrapport + e-mail-systeembericht + e-post-systemrapport + Raport systemu pocztowego + relatório de sistema de e-mail + relatório do sistema de correspondência + raport sistem email + отчёт почтовой системы + Správa poštového systému + poročilo poštnega sistema + Raport i sistemit të postës + извештај поштанског система + e-postsystemrapport + звіт поштової системи + thông báo hệ thống thư + 邮件系统报告 + 郵件系統回報 + + + signed message + رسالة موقّعة + imzalanmış ismarış + padpisanaje paviedamleńnie + Подписано съобщение + missatge signat + Podepsaná zpráva + neges lofnodwyd + signeret meddelelse + Signierte Nachricht + υπογεγραμμένο μήνυμα + signed message + pruvita mesaĝo + mensaje firmado + sinatutako mezua + allekirjoitettu viesti + undirskrivað boð + message signé + teachtaireacht sínithe + mensaxe firmado + הודעה חתומה + aláírt üzenet + pesan ditandatangani + Messaggio firmato + 署名付きメッセージ + қолтаңбасы бар мәлімдеме + 서명된 메시지 + pasirašytas laiškas + parakstīta ziņa + Mesej ditandatangani + signert melding + ondertekend bericht + signert melding + Podpisana wiadomość + mensagem assinada + mensagem assinada + mesaj semnat + подписанное сообщение + Podpísaná správa + podpisano sporočilo + Mesazh i firmosur + потписана порука + signerat meddelande + підписане повідомлення + thông điệp đã ký + 签名信件 + 簽署的訊息 + + + stream of data (server push) + دفق بيانات (دفع خادم) + płyń źviestak (ad servera) + Поток от данни, от страна на сървър + flux de dades (enviat pel servidor) + Proud dat (posílaný serverem) + datastrøm (serverskubbet) + Datenstrom (Server-Push) + χείμαρρος δεδομένων (στελλόμενα από τον εξυπηρετητή) + stream of data (server push) + datumstrio (puŝata per servilo) + flujo de datos (por iniciativa del servidor) + datu-korrontea (zerbitzari igortzailea) + tietovirta (palvelin työntää) + streymur av dáta (ambætara skump) + flux de données (émis par le serveur) + sruth sonraí (brú freastalaí) + fluxo de datos (por iniciativa do servidor) + מידע בזרימה (דחיפה ע"י השרת) + sugárzott adatfolyam (kiszolgálóról) + arus data (dorongan server) + Flusso di dati (server push) + データストリーム (サーバープッシュ型) + мәліметтер ағымы (server push) + 스트림 데이터 (서버 푸시) + duomenų srautas (iš serverio) + datu straume (servera grūsta) + Aliran dara (paksaan pelayan) + datastrøm (server push) + gegevensstroom (server duwt) + datastraum (dytta av tenaren) + Strumień danych (wymuszenie serwera) + fluxo de dados (empurrados pelo servidor) + fluxo de dados (por iniciativa do servidor) + flux de date (de la server) + поток данных (server push) + Prúd dát (posielaný serverom) + pretok podatkov (strežniški) + Fluks me të dhëna (server push) + проток података (гурање са сервера) + dataflöde (serverutsändning) + потік даних (від сервера) + luồng dữ liệu (trình phục vụ đẩy) + 数据流(服务器推送) + 資料串流 (server push) + + + VCS/ICS calendar + سجل VCS/ICS + Kalandar VCS/ICS + Календар — VCS/ICS + calendari VCS/ICS + Kalendář VCS/ICS + VCS/ICS-kalender + VCS/ICS-Kalender + VCS/ICS calendar + VCS/ICS-kalendaro + calendario VCS/ICS + VCS/ICS egutegia + VCS/ICS-kalenteri + VCS/ICS kalendari + calendrier VCS/ICS + féilire VCS/ICS + Calendario VCS/ICS + לוח שנה VCS/ICS + VCS/ICS naptár + Kalender VCS/ICS + Calendario VCS/ICS + VCS/ICS カレンダー + VCS/ICS күнтізбесі + VCS/ICS 달력 + VCS/ICS kalendorius + VCS/ICS kalendārs + VCS/ICS-kalender + VCS/ICS-kalender + VCS/ICS-kalender + Kalendarz VCS/ICS + Calendário VCS/ICS + Calendar VCS/ICS + календарь VCS/ICS + Kalendár VCS/ICS + Datoteka koledarja VCS/ICS + Kalendar VCS/ICS + VCS/ICS-kalender + календар VCS/ICS + Lịch VCS/ICS + VCS/ICS 日历 + VCS/ICS 行事曆 + VCS/ICS + vCalendar/iCalendar + + + + + + + + + + + CSS stylesheet + نمط CSS + Arkuš stylaŭ CSS + Стилове — CSS + llista d'estil CSS + Styl CSS + CSS-stilark + CSS-Stilvorlage + CSS stylesheet + CSS-stilfolio + hoja de estilo CSS + CSS estilo-orria + CSS-tyylitiedosto + CSS sniðark + feuille de style CSS + stílbhileog CSS + folla de estilos CSS + גליון עיצוב CSS + CSS stíluslap + Lembar gaya CSS + Foglio di stile CSS + CSS スタイルシート + CSS стильдер кестесі + CSS 스타일시트 + CSS stiliaus aprašas + CSS stilu saraksts + CSS-stilark + CSS-stijlblad + CSS-stilark + Arkusz stylów CSS + Folha de estilos CSS + Pagină de stil CSS + таблица стилей CSS + Štýly CSS + Slogovna predloga CSS + Fletë stili CSS + CSS-stilmall + таблиця стилів CSS + Tờ kiểu dáng CSS + CSS 样式表 + CSS 樣式表 + CSS + Cascading Style Sheets + + + + + + electronic business card + بطاقة أعمال إلكترونية + elektronnaja biznes-kartka + Електронна визитна картичка + targeta de visita electrònica + Elektronická navštívenka + elektronisk visitkort + Elektronische Visitenkarte + elektronika vizitkarto + tarjeta de visita electrónica + enpresako txartel elektronikoa + sähköinen käyntikortti + elektroniskt handilskort + carte de visite électronique + cárta gnó leictreonach + tarxeta de negocio electrónica + כרטיס ביקור אלקטרוני + elektronikus névjegykártya + kartu bisnis elektronik + Biglietto da visita elettronico + 電子名刺 + электронда визит карточкасы + 전자 명함 + elektroninė vizitinė kortelė + elektroniskā biznesa kartiņa + elektronisch visitekaartje + elektronisk visittkort + Wizytówka elektroniczna + cartão de visita electrónico + cartão de visitas eletrônico + carte de vizită electronică + электронная визитная карточка + Elektronická vizitka + elektronska poslovna vizitka + Skedë elektronike biznesi + elektroniskt visitkort + електронна бізнес-картка + danh thiếp điện tử + 电子商务卡 + 電子商務名片 + + + + + + + + + + + + + + txt2tags document + مستند txt2tags + dakument txt2tags + Документ — txt2tags + document txt2tags + Dokument txt2tags + txt2tags-dokument + txt2tags-Dokument + txt2tags-dokumento + documento txt2tags + txt2tags dokumentua + txt2tags-asiakirja + txt2tags skjal + document txt2tags + cáipéis txt2tags + documento txt2tags + מסמך txt2tags + txt2tags dokumentum + dokumen txt2tags + Documento txt2tags + txt2tags ドキュメント + txt2tags құжаты + txt2tags 문서 + txt2tags dokumentas + txt2tags dokuments + txt2tags-dokument + txt2tags-document + txt2tags-dokument + Dokument txt2tags + Documento txt2tags + document txt2tags + документ txt2tags + Dokument txt2tags + Dokument txt2tags + Dokument txt2tags + txt2tags-dokument + документ txt2tags + tài liệu txt2tags + txt2tags 文档 + txt2tags 文件 + + + + + + + + + Verilog source code + Изходен код — Verilog + codi font en Verilog + Zdrojový kód Verilog + Verilog-kildekode + Verilog-Quellcode + Verilog-fontkodo + código fuente en Verilog + Verilog-lähdekoodi + code source Verilog + código fonte en Verilog + קוד מקור של + Verilog-forráskód + Kode sumber Verilog + Codice sorgente Verilog + Verilog ソースコード + Verilog бастапқы коды + Verilog 소스 코드 + Verilog pirmkods + Kod źródłowy Verilog + Código fonte Verilog + исходный код Verilog + Zdrojový kód Verilog + Datoteka izvorne kode Verilog + Verilog-källkod + вихідний код мовою Verilog + Verilog 源代码 + Verilog 源代碼 + + + + + SystemVerilog header + Заглавен файл — SystemVerilog + capçalera de SystemVerilog + Záhlaví SystemVerilog + SystemVerilog-teksthoved + SystemVerilog-Header + cabeceras de SystemVerilog + SystemVerilog-otsake + en-tête + Cabeceiras de SystemVerilog + כותרת SystemVerilog + SystemVerilog fejléc + Header SystemVerilog + Header SystemVerilog + SystemVerilog ヘッダー + SystemVerilog тақырыптамасы + SystemVerilog 헤더 + SystemVerilog galvene + Nagłówek SystemVerilog + заголовочный файл SystemVerilog + Hlavičky SystemVerilog + Datoteka glave SystemVerilog + SystemVerilog-headerfil + заголовки SystemVerilog + SystemVerilog 头 + SystemVerilog 標頭 + + + + + SystemVerilog source code + Изходен код — SystemVerilog + codi font en SystemVerilog + Zdrojový kód SystemVerilog + SystemVerilog-kildekode + SystemVerilog-Quellcode + código fuente en SystemVerilog + SystemVerilog-lähdekoodi + code source + código fonte en SystemVerilog + קוד מקור של SystemVerilog + SystemVerilog-forráskód + Kode sumber SystemVerilog + Codice sorgente + SystemVerilog ソースコード + SystemVerilog бастапқы коды + SystemVerilog 소스 코드 + SystemVerilog pirmkods + Kod źródłowy SystemVerilog + исходный код SystemVerilog + Zdrojový kód SystemVerilog + Datoteka izvorne kode SystemVerilog + SystemVerilog-källkod + вихідний файл мовою SystemVerilog + SystemVerilog 源代码 + SystemVerilog 源代碼 + + + + + VHDL source code + Изходен код — VHDL + codi font en VHDL + Zdrojový kód VHDL + VHDL-kildekode + VHDL-Quellcode + VHDL-fontkodo + código fuente en VHDL + VHDL-lähdekoodi + code source VHDL + código fonte en VHDL + קוד מקור של VHDL + VHDL-forráskód + Kode sumber VHDL + Codice sorgente VHDL + VHDL ソースコード + VHDL бастапқы коды + VHDL 소스 코드 + VHDL pirmkods + Kod źródłowy VHDL + исходный код VHDL + Zdrojový kód VHDL + Datoteka izvorne kode VHDL + VHDL-källkod + вихідний код мовою VHDL + VHDL 源代码 + VHDL 源代碼 + VHDL + Very-High-Speed Integrated Circuit Hardware Description Language + + + + + + enriched text document + مستند نصي مغنى + zəngin mətn sənədi + azdobleny tekstavy dakument + Документ с обогатен текст + document de text enriquit + Rozšířený textový dokument + Dogfen testun wedi ei gyfoethogi + beriget tekstdokument + Angereichertes Textdokument + εγγραφο εμπλουτισμένου κειμένου + enriched text document + riĉigita teksta dokumento + documento de texto enriquecido + aberastutako testu dokumentua + rikastettu tekstiasiakirja + ríkað tekstskjal + document texte enrichi + cáipéis téacs saibhrithe + documento de texto enriquecido + מסמך טקסט מועשר + enriched text dokumentum + dokumen teks diperkaya + Documento testo arricchito + リッチテキストドキュメント + пішімделген мәтіндік құжаты + enriched text 문서 + praturtinto teksto dokumentas + bagātināta teksta formāts + Dokumen teks diperkaya + riktekst-dokument + verrijkt tekstdocument + rik tekst tekstdokument + Wzbogacony dokument tekstowy + documento de texto rico + documento de texto enriquecido + document text îmbogățit + форматированный текстовый документ + Rozšírený textový dokument + dokument z obogatenim besedilom + Dokument teksti i pasuruar + обогаћени текстуални документ + berikat textdokument + форматований текстовий документ + tài liệu văn bản có kiểu dáng + 富文本文档 + 豐富化文字文件 + + + + help page + صفحة المساعدة + yardım səhifəsi + staronka dapamohi + Страница от помощта + pàgina d'ajuda + Stránka nápovědy + tudalen gymorth + hjælpeside + Hilfeseite + σελίδα βοηθείας + help page + help-paĝo + página de ayuda + laguntzako orria + ohjesivu + hjálparsíða + page d'aide + leathanach cabhrach + páxina de axuda + דף עזרה + súgóoldal + halaman bantuan + Pagina di aiuto + ヘルプページ + анықтама парағы + 도움말 페이지 + žinyno puslapis + palīdzības lapa + Halaman bantuan + hjelpside + hulppagina + hjelpeside + Strona pomocy + página de ajuda + página de ajuda + pagină de ajutor + страница справки + Stránka Pomocníka + stran pomoči + Faqe ndihme + страна помоћи + hjälpsida + сторінка довідки + trang trợ giúp + 帮助页面 + 幫助頁面 + + + + plain text document + مستند نصي مجرد + prosty tekstavy dakument + Документ с неформатиран текст + document de text pla + Prostý textový dokument + rent tekstdokument + Einfaches Textdokument + έγγραφο απλού κειμένου + plain text document + plata teksta dokumento + documento de texto sencillo + testu soileko dokumentua + perustekstiasiakirja + document texte brut + cáipéis ghnáth-théacs + documento de texto sinxelo + מסמך טקסט פשוט + egyszerű szöveg + dokumen teks biasa + Documento in testo semplice + 平文テキストドキュメント + мәтіндік құжаты + 보통 text 문서 + paprastas tekstinis dokumentas + vienkāršs teksta dokuments + Dokumen teks jernih + vanlig tekstdokument + plattetekst-document + vanleg tekstdokument + Zwykły dokument tekstowy + documento em texto simples + documento somente texto + document text simplu + текстовый документ + Obyčajný textový dokument + običajna besedilna datoteka + Dokument në tekst të thjeshtë + обичан текстуални документ + vanligt textdokument + звичайний текстовий документ + tài liệu nhập thô + 纯文本文档 + 純文字文件 + + + + + + + + + + RDF file + ملف RDF + Fajł RDF + Файл — RDF + fitxer RDF + Soubor RDF + RDF-fil + RDF-Datei + RDF file + RDF-dosiero + archivo RDF + RDF fitxategia + RDF-tiedosto + RDF fíla + fichier RDF + comhad RDF + ficheiro RDF + קובץ RDF + RDF fájl + Arsip RDF + File RDF + RDF ファイル + RDF файлы + RDF 파일 + RDF failas + RDF fails + RDF-fil + RDF-bestand + RDF-fil + Plik RDF + Arquivo RDF + Fișier RDF + файл RDF + Súbor RDF + Datoteka RDF + File RDF + RDF-fil + файл RDF + Tập tin RDF + RDF 文件 + RDF 檔 + RDF + Resource Description Framework + + + + + + + + + email headers + ترويسة البريد الإلكتروني + epoçt başlıqları + paštovyja zahałoŭki + Заглавни части на електронни писма + capçaleres de correu electrònic + Záhlaví e-mailu + penawdau e-bost + posthoveder + E-Mail-Kopfzeilen + κεφαλίδες ηλ. μηνυμάτων + email headers + retpoŝtaj ĉapoj + cabeceras de correo electrónico + helbide elektronikoen goiburuak + sähköpostiotsakkeet + t-post tekshøvd + en-têtes de courriel + ceanntásca ríomhphoist + cabeceiras de correo electrónico + כותרת דוא"ל + levélfejléc + tajuk email + Intestazioni email + メールヘッダー + пошталық тақырыптамалары + 전자우편 헤더 + el. laiško antraštės + e-pasta galvene + Pengepala emel + e-posthode + e-mail-kopregels + e-post-hovud + Nagłówki wiadomości e-mail + cabeçalhos de e-mail + cabeçalhos de e-mail + antete email + почтовые заголовки + Hlavičky e-mailu + glava elektronske pošte + Header email + заглавља е-порука + e-posthuvuden + заголовки email + dòng đầu thư điện tử + 电子邮件头 + 電子郵件標頭 + + + + rich text document + مستند نصي غني + zəngin mətn sənədi + azdobleny tekstavy dakument + Документ — rich text + document de text enriquit + Textový dokument RTF + dogfen testun gyfoethog (rtf) + richtekstdokument + RTF-Textdokument + έγγραφο εμπλουτισμένου κειμένου (RTF) + rich text document + riĉteksta dokumento + documento de texto enriquecido + aberastutako testu formatua + RTF-asiakirja + document « rich text » + cáipéis mhéith-théacs + documento do texto enriquecido + מסמך טקסט עשיר + rich text-dokumentum + dokumen teks kaya + Documento rich text + リッチテキストドキュメント + пішімделген мәтіні бар құжаты + rich text 문서 + praturtinto teksto dokumentas + bagātā teksta dokuments + Dokumen teks diperkaya + rik tekst-dokument + opgemaakt tekstdocument + rik tekst-dokument + Dokument Rich Text + documento em texto rico + documento rich text + document text îmbogățit + документ с форматированным текстом + Textový dokument RTF + dokument z oblikovanim besedilom + Dokument rich text + обогаћени текстуални документ + RTF-textdokument + форматований текстовий документ + tài liệu văn bản có kiểu dáng (RTF) + RTF 丰富文本文档 + 豐富文字文件 + + + + + RSS summary + ملخص RSS + Karotki ahlad RSS + Обобщение за сайтове — RSS + resum RSS + Souhrn RSS + RSS-sammendrag + RSS-Zusammenfassung + RSS summary + resumen RSS + RSS laburpena + RSS-tiivistelmä + RSS samandráttur + résumé RSS + achoimre RSS + Resumo RSS + תקציר RSS + RSS összefoglaló + Ringkasan RSS + Sommario RSS + RSS サマリ + RSS жинақталғаны + RSS 요약 + RSS santrauka + RSS kopsavilkums + RSS-sammendrag + RSS-samenvatting + RSS-samandrag + Podsumowanie RSS + Resumo RSS + Rezumat RSS + сводка RSS + Súhrn RSS + Datoteka povzetek RSS + Përmbledhje RSS + RSS-sammanfattning + зведення сайту RSS + Bản tóm tắt RSS + RSS 摘要 + RSS 摘要 + RSS + RDF Site Summary + + + + + + + + + + + Atom syndication feed + مروج تغذية Atom + Syndykacyjny kanał navinaŭ Atom + Емисия — Atom + canal de sindicació Atom + Kanál Atom + Atom syndication-feed + Atom-Nachrichtenquelle + proveedor de noticias Atom + Atom harpidetze-iturria + Atom-yhdistevirta + fil de syndication Atom + fotha sindeacáitithe Atom + fonte de sindicación Atom + הזנה דרך הרשת של Atom + Atom egyesítőfolyam + Umpan sindikasi Atom + Feed di distribuzione Atom + Atom 配信フィード + Atom жаңалықтар таспасы + Atom 묶음 피드 + Atom sindikacijos kanalas + Atom sindikāta barotne + Atom syndikeringsstrøm + Atom-syndicatie-feed + Atom-kjelde + Kanał Atom + Fonte de notícias Atom + Flux agregare Atom + лента новостей Atom + Kanál Atom + Sindikalni vir Atom + Feed për përhapje Atom + Atom-syndikeringskanal + трансляція подач Atom + Nguồn tin tức Atom + Atom 更新种子 + + + + + + + + + + OPML syndication feed + مروج تغذية OPML + Syndykacyjny kanał OPML + Емисия — OPML + canal de sindicació OPML + Kanál OPML + OPML-syndikeringsfeed + OPML-Nachrichtenquelle + proveedor de noticias OPML + OPML harpidetze-iturria + OPML-yhdistevirta + fil de syndication OPML + fotha sindeacáitithe OPML + fonte de sindicación OPML + הזנה דרך הרשת OPML + OPML egyesítőfolyam + Umpan sindikasi OPML + Feed di distribuzione OPML + OPML 配信フィード + OPML жаңалықтар таспасы + OPML 묶음 feed + OPML sindikacijos kanalas + OPML sindikāta barotne + OPML syndikeringsstrøm + OPML-syndicatie-feed + OPML-kjelde + Kanał OPML + Fonte de notícias OPML + Flux OPML syndication + лента новостей OPML + Kanál OPML + Sindikalni vir OPML + Feed për përhapje OPML + OPML-syndikeringskanal + трансляція подач OPML + Nguồn tin tức OPML + OPML 聚合种子 + + + + + + + + + + SGML document + مستند SGML + Dakument SGML + Документ — SGML + document SGML + Dokument SGML + Dogfen SGML + SGML-dokument + SGML-Dokument + έγγραφο SGML + SGML document + SGML-dokumento + documento SGML + SGML dokumentua + SGML-asiakirja + SGML skjal + document SGML + cáipéis SGML + documento SGML + מסמך SGML + SGML-dokumentum + Dokumen SGML + Documento SGML + SGML ドキュメント + SGML құжаты + SGML 문서 + SGML dokumentas + SGML dokuments + Dokumen SGML + SGML-dokument + SGML-document + SGML-dokument + Dokument SGML + documento SGML + Documento SGML + Document SGML + документ SGML + Dokument SGML + Dokument SGML + Dokument SGML + SGML документ + SGML-dokument + документ SGML + Tài liệu SGML + SGML 文档 + SGML 文件 + SGML + Standard Generalized Markup Language + + + + + + spreadsheet interchange document + مستند تبادل الجدول + dakument dla abmienu raźlikovymi arkušami + Документ за обмяна между програми за електронни таблици + document d'intercanvi de full de càlcul + Sešitový přenosový dokument + regnearksudvekslingsdokument + Tabellenkalkulations-Austauschdokument + documento de intercambio de hojas de cálculo + kalkulu-orriak trukatzeko dokumentua + taulukkovälitysasiakirja + rokniarks umbýtisskjal + document d'échange de feuilles de calcul + cáipéis idirmhalartaithe scarbhileog + documento de intercambio de follas de cálculo + מסמך גליון נתונים מתחלף + spreadsheet-cserélhetődokumentum + dokumen lembar sebar saling tukar + Documento di scambio per foglio di calcolo + スプレッドシート交換ドキュメント + spreadsheet interchange құжаты + spreadsheet 교환 문서 + skaičialenčių apsikeitimo dokumentas + izklājlapu apmaiņas dokuments + dokument for regnearkutveksling + rekenblad-uitwisselingsdocument + Utvekslingsdokument for rekneark + Dokument wymiany arkuszy kalkulacyjnych + Documento de intercâmbio de planilhas + document schimb filă de calcul + документ Spreadsheet Interchange + Zošitový prenosový dokument + dokument izmenjeve razpredelnic + Dokument shkëmbimi për fletë llogaritje + spreadsheet interchange-dokument + документ обміну ел. таблицями + tài liệu hoán đổi bảng tính + 电子表格交换文档 + 試算表交換文件 + + + + + + + + + TSV document + مستند TSV + Dakument TSV + Документ — TSV + document TSV + Dokument TSV + TSV-dokument + TSV-Dokument + TSV document + documento TSV + TSV dokumentua + TSV-asiakirja + TSV skjal + document TSV + cáipéis TSV + documento TSV + מסמך TSV + TSV dokumentum + Dokumen TSV + Documento TSV + TSV ドキュメント + TSV құжаты + TSV 문서 + TSV dokumentas + TSV dokuments + TSV-dokument + TSV-document + TSV-dokument + Dokument TSV + Documento TSV + Document TSV + документ TSV + Dokument TSV + Dokument TSV + Dokument TSV + TSV-dokument + документ TSV + Tài liệu TSV + TSV 文档 + TSV 文件 + TSV + Tab Separated Values + + + + + Graphviz DOT graph + مبيان Graphviz DOT + Граф — Graphviz DOT + gràfic Graphviz DOT + Graf Graphviz DOT + Graphviz DOT-graf + Graphviz-DOT-Graph + gráfico Graphviz DOT + Graphviz DOT grafikoa + Graphviz DOT -graafi + Graphviz DOT ritmynd + graphe Graphviz DOT + graf DOT Graphviz + gráfica DOT de Graphviz + גרף של Graphviz DOT + Graphviz DOT-grafikon + Grafik Graphviz DOT + Grafico Graphviz DOT + Graphviz DOT グラフ + Graphviz DOT сызбасы + Graphviz DOT 그래프 + Graphviz DOT diagrama + Graphviz DOT grafiks + Graphviz wetenschappelijke grafiek + Wykres DOT Graphviz + Gráfico do Graphviz DOT + Grafic Graphviz DOT + Диаграмма Graphviz DOT + Graf Graphviz DOT + Datoteka grafikona Graphviz DOT + Graphviz DOT-graf + граф DOT Graphviz + Biểu đồ DOT Graphviz + Graphviz DOT 科学图形 + Graphviz DOT 圖 + + + + + + + + + + + + JAD document + مستند JAD + Dakument JAD + Документ — JAD + document JAD + Dokument JAD + JAD-dokument + JAD-Dokument + JAD-dokumento + documento JAD + JAD dokumentua + JAD-asiakirja + JAD skjal + document JAD + cáipéis JAD + documento JAD + מסמך JAD + JAD dokumentum + Dokumen JAD + Documento JAD + JAD ドキュメント + JAD құжаты + JAD 문서 + JAD dokumentas + JAD dokuments + JAD-dokument + JAD-document + JAD-dokument + Dokument JAD + Documento JAD + Document JAD + документ JAD + Dokument JAD + Dokument JAD + Dokument JAD + JAD-dokument + документ JAD + Tài liệu JAD + JAD 文档 + JAD 文件 + JAD + Java Application Descriptor + + + + + + + WML document + مستند WML + WML sənədi + Dakument WML + Документ — WML + document WML + Dokument WML + Dogfen WML + WML-dokument + WML-Dokument + έγγραφο WML + WML document + WML-dokumento + documento WML + WML dokumentua + WML-asiakirja + WML skjal + document WML + cáipéis WML + documento WML + מסמך WML + WML-dokumentum + Dokumen WML + Documento WML + WML ドキュメント + WML құжаты + WML 문서 + WML dokumentas + WML dokuments + Dokumen XML + WML-dokument + WML-document + WML-dokument + Dokument WML + documento WML + Documento WML + Document WML + документ WML + Dokument WML + Dokument WML + Dokument WML + WML документ + WML-dokument + документ WML + Tài liệu WML + WML 文档 + WML 文件 + WML + Wireless Markup Language + + + + + WMLScript program + برنامج WMLScript + Prahrama WMLScript + Програма — WMLScript + programa WMLScript + Program WMLScript + WMLScript-program + WMLScript-Programm + programa en WMLScript + WMLScript programa + WMLScript-ohjelma + WMLScript forrit + programme WMLScript + ríomhchlár WMLScript + programa en WMLScript + תוכנית של WMLScript + WMLScript program + Program WMLScript + Programma WMLScript + WMLScript プログラム + WMLScript бағдарламасы + WML스크립트 프로그램 + WMLScript programa + WMLScript programma + WMLScript-program + WMLScript-programma + WMLScript-program + Pogram WMLScript + Programa WMLScript + Program WMLScript + сценарий WMLScript + Program WMLScript + Programska datoteka WMLScript + Program WMLScript + WMLScript-program + програма мовою WMLScript + Chương trình WMLScript + WMLScript 程序 + WMLScript 程式 + + + + ACE archive + أرشيف ACE + Archiŭ ACE + Архив — ACE + arxiu ACE + Archiv ACE + ACE-arkiv + ACE-Archiv + ACE-arkivo + archivador ACE + ACE artxiboa + ACE-arkisto + ACE skjalasavn + archive ACE + cartlann ACE + arquivo ACE + ארכיון ACE + ACE archívum + Arsip ACE + Archivio ACE + ACE アーカイブ + ACE архиві + ACE 묶음 파일 + ACE archyvas + ACE arhīvs + ACE-arkiv + ACE-archief + ACE-arkiv + Archiwum ACE + Pacote ACE + Arhivă ACE + архив ACE + Archív ACE + Datoteka arhiva ACE + Arkiv ACE + ACE-arkiv + архів ACE + Kho nén ACE + ACE 归档文件 + ACE 封存檔 + + + + + + + + Ada source code + شفرة مصدر Ada + Kryničny kod Ada + Изходен код — Ada + codi font en Ada + Zdrojový kód v Adě + Ada-kildekode + Ada-Quelltext + πηγαίος κώδικας Ada + Ada source code + Ada-fontkodo + código fuente en Ada + Ada iturburu-kodea + Ada-lähdekoodi + Ada keldukota + code source Ada + cód foinseach Ada + código fonte en Ada + קוד מקור Ada + Ada-forráskód + Kode program Ada + Codice sorgente Ada + Ada ソースコード + Ada бастапқы коды + Ada 소스 코드 + Ada pradinis kodas + Ada pirmkods + Kod sumber Ada + Ada-kildekode + Ada-broncode + Ada-kjeldekode + Kod źródłowy Ada + código fonte Ada + Código fonte Ada + Cod sursă Ada + исходный код Ada + Zdrojový kód jazyka Ada + Datoteka izvorne kode Ada + Kod burues Ada + Ада изворни ко̂д + Ada-källkod + вихідний код мовою Ada + Mã nguồn Ada + Ada 源代码 + Ada 源代碼 + + + + + + author list + لائحة المؤلف + śpis aŭtaraŭ + Списък на авторите + llista d'autors + Seznam autorů + forfatterliste + Autorenliste + κατάλογος συγγραφέων + author list + listo de aŭtoroj + lista de autores + egile-zerrenda + tekijäluettelo + høvundalisti + liste d'auteurs + liosta údar + lista de autores + רשימת יוצרים + szerzőlista + senarai penulis + Elenco autori + 著者リスト + авторлар тізімі + 저자 목록 + autorių sąrašas + autoru saraksts + Senarai penulis + forfatterliste + auteurslijst + forfattarliste + Lista autorów + lista de autores + lista de autores + listă autori + список авторов + Zoznam autorov + seznam avtorjev + Lista e autorëve + списак аутора + författarlista + перелік авторів + danh sách tác giả + 作者列表 + 作者清單 + + + + + BibTeX document + مستند BibTeX + Dakument BibTeX + Документ — BibTeX + document BibTeX + Dokument BibTeX + BibTeX-dokument + BibTeX-Dokument + BibTeX document + BibTeX-dokumento + documento BibTeX + BibTeX dokumentua + BibTeX-asiakirja + BibTeX skjal + document BibTeX + cáipéis BibTeX + documento BibTex + מסמך BibTeX + BibTeX dokumentum + Dokumen BibTeX + Documento BibTeX + BibTeX ドキュメント + BibTeX құжаты + BibTeX 문서 + BibTeX dokumentas + BibTeX dokuments + BibTeX-dokument + BibTeX-document + BibTeX-dokument + Dokument BibTeX + Documento BibTeX + Document BibTeX + документ BibTeX + Dokument BibTeX + Dokument BibTeX + Dokument BibTeX + BibTeX-dokument + документ BibTeX + Tài liệu BibTeX + BibTeX 文档 + BibTeX 文件 + + + + + + + + C++ header + ترويسة سي++ + Zahałoŭny fajł C++ + Заглавен файл — C++ + capçalera en C++ + Záhlaví v C++ + C++-posthoved + C++-Header + C++ header + cabecera de código fuente en C++ + C++ goiburua + C++-otsake + C++ tekshøvd + en-tête C++ + ceanntásc C++ + cabeceira de código fonte en C++ + כותר ++C + C++ fejléc + Tajuk C++ + Header C++ + C++ ヘッダー + C++ тақырыптама файлы + C++ 헤더 + C++ antraštė + C++ galvene + C++-kildekodeheader + C++-header + C++-kjeldekode-hovud + Plik nagłówkowy C++ + Cabeçalho C++ + Antet C++ + заголовочный файл C++ + Hlavičky jazyka C++ + Datoteka glave C++ + Header C++ + C++-huvud + файл заголовків мовою C++ + Phần đầu mã nguồn C++ + C++ 源代码头文件 + C++ 標頭檔 + + + + + + + + + C++ source code + شفرة مصدر سي++ + Kryničny kod C++ + Изходен код — C++ + codi font en C++ + Zdrojový kód v C++ + C++-kildekode + C++-Quelltext + πηγαίος κώδικας C++ + C++ source code + C++-fontkodo + código fuente en C++ + C++ iturburu-kodea + C++-lähdekoodi + C++ keldukota + code source C++ + cód foinseach C++ + código fonte de C++ + קוד מקור של C++ + C++-forráskód + Kode program C++ + Codice sorgente C++ + C++ ソースコード + C++ бастапқы коды + C++ 소스 코드 + C++ pradinis kodas + C++ pirmkods + Kod sumber C++ + C++-kildekode + C++-broncode + C++-kjeldekode + Kod źródłowy C++ + código fonte C++ + Código fonte C++ + Cod sursă C++ + исходный код C++ + Zdrojový kód jazyka C++ + Datoteka izvorne kode C++ + Kod burues C++ + C++ изворни ко̂д + C++-källkod + вихідний код мовою C++ + Mã nguồn C++ + C++ 源代码 + C++ 源代碼 + + + + + + + + + ChangeLog document + مستند ChangeLog + Dakument zafiksavanych źmienaŭ ChangeLog + Дневник за промени — ChangeLog + document de registre de canvis + Dokument ChangeLog + ChangeLot-dokument + Änderungsprotokoll + ChangeLog document + documento de cambios + ChangeLog dokumentua + Muutoslokiasiakirja + ChangeLog skjal + document ChangeLog + cáipéis ChangeLog + documento Changelog + מסמך של ChangeLog + ChangeLog dokumentum + Dokumen ChangeLog + Documento ChangeLog + ChangeLog ドキュメント + ChangeLog құжаты + ChangeLog 문서 + ChangeLog dokumentas + ChangeLog dokuments + ChangeLog-dokument + ChangeLog-document + ChangeLog-dokument + Dokument zmian (ChangeLog) + Documento ChangeLog + Document ChangeLog + протокол изменений + Dokument ChangeLog + Dokument ChangeLog + Dokument ChangeLog + Ändringsloggsdokument + документ ChangeLog + Tài liệu ChangeLog (ghi lưu thay đổi) + 变更日志文档 + ChangeLog 文件 + + + + + C header + ترويسة C + Zahałoŭny fajł C + Заглавен файл — C + capçalera en C + Záhlaví v C + C-posthoved + C-Header + C header + cabecera de código fuente en C + C goiburua + C-otsake + C tekshøvd + en-tête C + ceanntásc C + cabeceira de códifo fonte de C + כותר C + C fejléc + Tajuk C + Header C + C ヘッダー + C тақырыптама файлы + C 헤더 + C antraštė + C galvene + C-kildekodeheader + C-header + C-kjeldekode-hovud + Plik nagłówkowy C + Cabeçalho C + Antet C + заголовочный файл C + Hlavičky jazyka C + Datoteka glave C + Header C + C-huvud + файл заголовків мовою C + Phần đầu mã nguồn C + C 程序头文件 + C 標頭檔 + + + + + CMake source code + شفرة مصدر CMake + Kryničny kod CMake + Изходен код — CMake + codi font en CMake + Zdrojový kód CMake + CMake-kildekode + CMake-Quelltext + CMake-fontkodo + código fuente en CMake + CMake iturburu-kodea + CMake-lähdekoodi + CMake keldukota + code source CMake + cód foinseach CMake + código fonte de CMake + קוד מקור של CMake + CMake-forráskód + Kode program CMake + Codice sorgente CMake + CMake ソースコード + CMake бастапқы коды + CMake 소스 코드 + CMake pirminis tekstas + CMake pirmkods + CMake-kildekode + CMake-broncode + CMake-kjeldekode + Kod źródłowy CMake + Código fonte CMake + Cod sursă CMake + исходный код CMake + Zdrojový kód CMake + Datoteka izvorne kode CMake + Kod burues CMake + CMake-källkod + вихідний код CMake + Mã nguồn CMake + CMake 源代码 + CMake 源代碼 + + + + + + CSV document + مستند CSV + Dakument CSV + Документ — CSV + document CSV + Dokument CSV + CSV-dokument + CSV-Dokument + CSV document + CSV-dokumento + documento CSV + CSV dokumentua + CSV-asiakirja + CSV skjal + document CSV + cáipéis CSV + documento CSV + מסמך CSV + CSV dokumentum + Dokumen CSV + Documento CSV + CSV ドキュメント + CSV құжаты + CSV 문서 + CSV dokumentas + CSV dokuments + CSV-dokument + CSV-document + CSV-dokument + Dokument CSV + Documento CSV + Document CSV + документ CSV + Dokument CSV + Dokument CSV + Dokument CSV + CSV-dokument + документ CSV + Tài liệu CSV + CSV 文档 + CSV 文件 + CSV + Comma Separated Values + + + + + + + license terms + شروط الترخيص + licenzijnyja ŭmovy + Лицензни условия + condicions de llicència + Licenční podmínky + licensbetingelser + Lizenzbedingungen + licence terms + términos de licencia + lizentzia baldintzak + lisenssiehdot + loyvistreytir + termes de licence + téarmaí ceadúnais + termos de licenza + תנאי רישיון + licencfeltételek + persyaratan lisensi + Termini di licenza + ソフトウェアライセンス条項 + лицензиялық келісімі + 라이선스 조항 + licencijos sąlygos + licences nosacījumi + lisensbestemmelser + licentievoorwaarden + lisensvilkår + Warunki licencji + termos de licença + termeni de licență + лицензионное соглашение + Licenčné podmienky + pogoji in dovoljenja uporabe + Kushte liçence + licensvillkor + ліцензійні умови + điều kiện giấy phép + 软件许可条款 + 授權條款 + + + + + author credits + شكر وتقدير المؤلف + zasłuhi aŭtara + Благодарности към авторите + atribucions d'autor + Autorské zásluhy + bidragydere + Autorendanksagung + author credits + reconocimiento de autoría + tekijöiden kiitokset + høvundaheiður + remerciements + admhálacha údar + créditos de autor + קרדיטים של היוצר + szerzők listája + kredit penulis + Riconoscimenti autori + ソフトウェア作者クレジット + бағдарлама авторлары + 저작자 크레디트 + padėkos autoriams + veidotāji + liste med bidragsytere + auteursinformatie + forfattarliste + Podziękowania autorów programu + créditos do autor + mulțumiri autori + авторы программы + Autorské zásluhy + avtorske zasluge + Kreditë e autorëve + författarlista + подяки авторам програми + công trạng tác giả + 软件作者致谢 + 作者致謝名單 + + + + + C source code + شفرة مصدر سي + Kryničny kod C + Изходен код — C + codi font en C + Zdrojový kód v C + C-kildekode + C-Quelltext + πηγαίος κώδικας C + C source code + C-fontkodo + código fuente en C + C iturburu-kodea + C-lähdekoodi + C keldukota + code source C + cód foinseach C + código fonte en C + קוד מקור של C + C-forráskód + Kode program C + Codice sorgente C + C ソースコード + C бастапқы коды + C 소스 코드 + C pradinis kodas + C pirmkods + Kod sumber C + C-kildekode + C-broncode + C-kjeldekode + Kod źródłowy C + código fonte C + Código fonte C + Cod sursă C + исходный код C + Zdrojový kód jazyka C + Datoteka izvorne kode C + Kod burues C + C изворни ко̂д + C-källkod + вихідний код мовою C + Mã nguồn C + C 源代码 + C 源代碼 + + + + + + + + + + + C# source code + شفرة مصدر سي# + Kryničny kod C# + Изходен код — C# + codi font en C# + Zdrojový kód v C# + C#-kildekode + C#-Quelltext + πηγαίος κώδικας C# + C# source code + C#-fontkodo + código fuente en C# + C# iturburu-kodea + C#-lähdekoodi + C# keldukota + code source C# + cód foinseach C# + código fonte en C# + קוד מקור של C# + C#-forráskód + Kode program C# + Codice sorgente C# + C# ソースコード + C# бастапқы коды + C# 소스 코드 + C# pradinis kodas + C# pirmkods + Kod sumber C# + C#-kildekode + C#-broncode + C#-kjeldekode + Kod źródłowy C# + código fonte C# + Código fonte C# + Cod sursă C# + исходный код C# + Zdrojový kód jazyka C# + Datoteka izvorne kode C# + Kod burues C# + C# изворни ко̂д + C#-källkod + вихідний код мовою C# + Mã nguồn C# + C# 源代码 + C# 源代碼 + + + + + Vala source code + شفرة مصدر Vala + Kryničny kod Vala + Изходен код — Vala + codi font en Vala + Zdrojový kód Vala + Valakildekode + Vala-Quelltext + Vala-fontkodo + código fuente en Vala + Vala iturburu-kodea + Vala-lähdekoodi + Vala keldukota + code source Vala + cód foinseach Vala + código fonte en Vala + קוד מקור של Vala + Vala forráskód + Kode program Vala + Codice sorgente Vala + Vala ソースコード + Vala бастапқы коды + Vala 소스 코드 + Vala pradinis kodas + Vala pirmkods + Vala-kildekode + Vala-broncode + Vala-kjeldekode + Kod źródłowy Vala + Código fonte Vala + Cod sursă Vala + исходный код Vala + Zdrojový kód Vala + Datoteka izvorne kode Vala + Kod burues Vala + Vala-källkod + вихідний код мовою Vala + Mã nguồn Vala + Vala 源代码 + Vala 源代碼 + + + + + + OOC source code + Изходен код — OOC + codi font en OOC + Zdrojový kód OOC + OOC-Quellcode + OOC-fontkodo + Código fuente en OOC + OOC-lähdekoodi + source code OOC + código fonte de OOC + קוד מקור של OOC + OOC forráskód + Kode sumber OOC + Codice sorgente OOC + OOC ソースコード + OOC бастапқы коды + OOC 소스 코드 + OOC pirmkods + Kod źródłowy OOC + исходный код OOC + Izvorna koda OOC + OOC-källkod + вихідний код мовою OOC + OOC + OOC 源代碼 + OOC + Out Of Class + + + + + DCL script + سكربت DCL + DCL skripti + Skrypt DCL + Скрипт — DCL + script DCL + Skript DCL + Sgript DCL + DCL-program + DCL-Skript + πρόγραμμα εντολών DCL + DCL script + DCL-skripto + script en DCL + DCL script-a + DCL-komentotiedosto + DCL boðrøð + script DCL + script DCL + script de DCL + תסריט DCL + DCL-parancsfájl + Skrip DCL + Script DCL + DCL スクリプト + DCL сценарийі + DCL 스크립트 + DCL scenarijus + DCL skripts + Skrip DCL + DCL-skript + DCL-script + DCL-skript + Skrypt DCL + 'script' DCL + Script DCL + Script DCL + сценарий DCL + Skript DCL + Skriptna datoteka DCL + Script DCL + DCL скрипта + DCL-skript + скрипт DCL + Văn lệnh DCL + DCL 脚本 + DCL 指令稿 + DCL + Data Conversion Laboratory + + + + + DSSSL document + مستند DSSSL + DSSSL sənədi + Dakument DSSSL + Документ — DSSSL + document DSSSL + Dokument DSSSL + Dogfen DSSSL + DSSSL-dokument + DSSSL-Dokument + έγγραφο DSSSL + DSSSL document + DSSSL-dokumento + documento DSSSL + DSSSL dokumentua + DSSSL-asiakirja + DSSSL skjal + document DSSSL + cáipéis DSSSL + documento DSSSL + מסמך DSSSL + DSSSL-dokumentum + Dokumen DSSSL + Documento DSSSL + DSSSL ドキュメント + DSSSL құжаты + DSSSL 문서 + DSSSL dokumentas + DSSSL dokuments + Dokumen DSSSL + DSSSL-dokument + DSSSL-document + DSSSL-dokument + Dokument DSSSL + documento DSSSL + Documento DSSSL + Document DSSSL + документ DSSSL + Dokument DSSSL + Dokument DSSSL + Dokument DSSSL + DSSSL документ + DSSSL-dokument + документ DSSSL + Tài liệu DSSSL + DSSSL 文档 + DSSSL 文件 + DSSSL + Document Style Semantics and Specification Language + + + + + D source code + شفرة مصدر D + Kryničny kod D + Изходен код — D + codi font en D + Zdrojový kód v D + D-kildekode + D-Quelltext + D source code + D-fontkodo + código fuente en D + D iturburu-kodea + D-lähdekoodi + D keldukota + code source D + cód foinseach D + código fonte de D + קוד מקור לשפת D + D-forráskód + Kode program D + Codice sorgente D + D ソースコード + D бастапқы коды + D 소스 코드 + D pradinis kodas + D pirmkods + D-kildekode + D-broncode + D-kjeldekode + Kod źródłowy D + Código fonte D + Cod sursă D + исходный код D + Zdrojový kód jazyka D + Datoteka izvorne kode D + Kod burues D + D изворни ко̂д + D-källkod + вихідний код мовою D + Mã nguồn D + D 源代码 + D 源代碼 + + + + + DTD file + ملف DTD + Fajł DTD + Документ — DTD + fitxer DTD + Soubor DTD + DTD-fil + DTD-Datei + DTD file + DTD-dosiero + archivo DTD + DTD fitxategia + DTD-tiedosto + DTD fíla + fichier DTD + comhad DTD + ficheiro DTD + מסמך DTD + DTD fájl + Berkas DTD + File DTD + DTD ファイル + DTD файлы + DTD 파일 + DTD failas + DTD fails + DTD-fil + DTD-bestand + DTD-fil + Plik DTD + Arquivo DTD + Fișier DTD + файл DTD + Súbor DTD + Datoteka DTD + File DTD + DTD-fil + файл DTD + Tập tin DTD + DTD 文件 + DTD 檔 + DTD + Document Type Definition + + + + + + + Eiffel source code + شفرة مصدر Eiffel + Kryničny kod Eiffel + Изходен код — Eiffel + codi font en Eiffel + Zdrojový kód Eiffel + Eiffelkildekode + Eiffel-Quelltext + Eiffel-fontkodo + código fuente en Eiffel + Eiffel iturburu-kodea + Eiffel-lähdekoodi + Eiffel keldukota + code source Eiffel + cód foinseach Eiffel + código fone de Eiffel + קוד מקור של Eiffel + Eiffel forráskód + Kode program Eiffel + Codice sorgente Eiffel + Eiffel ソースコード + Eiffel бастапқы коды + Eiffel 소스 코드 + Eiffel pirminis programos tekstas + Eiffel pirmkods + Eiffel-kildekode + Eiffel-broncode + Eiffel-kjeldekode + Kod źródłowy Eiffel + Código fonte Eiffel + Cod sursă Eiffel + исходный код Eiffel + Zdrojový kód Eiffel + Datoteka izvorne kode Eiffel + Kod burues Eiffel + Eiffel-källkod + вихідний код мовою Eiffel + Mã nguồn Eiffel + Eiffel 源代码 + Eiffel 源代碼 + + + + + + Emacs Lisp source code + شفرة مصدر Emacs Lisp + Emacs Lisp mənbə kodu + Kryničny kod Emacs Lisp + Изходен код — Emacs Lisp + codi font en Emacs Lisp + Zdrojový kód Emacs Lisp + Ffynhonnell rhaglen EMACS LISP + Emacs Lisp-kildekode + Emacs-Lisp-Quelltext + πηγαίος κώδικας Emacs Lisp + Emacs Lisp source code + fontkodo en Emacs Lisp + código fuente en Lisp de Emacs + Emacs Lisp iturburu-kodea + Emacs Lisp -lähdekoodi + Emacs Lisp keldukota + code source Emacs Lisp + cód foinseach Emacs Lisp + código fonte de Emacs Lisp + קוד מקור של Emcas Lisp + Emacs Lisp-forráskód + Kode sumber Emacs Lisp + Codice sorgente Emacs Lisp + Emacs Lisp ソースコード + Emacs Lisp бастапқы коды + Emacs Lisp 소스 코드 + Emacs Lisp pradinis kodas + Emacs Lisp pirmkods + Kod sumber Emacs Lisp + Emacs Lisp-kildekode + Emacs Lisp-broncode + Emacs Lisp kjeldekode + Plik źródłowy Emacs Lisp + código fonte Emacs Lisp + Código fonte Lisp do Emacs + Cod sursă Emacs Lisp + исходный код Emacs Lisp + Zdrojový kód Emacs Lisp + Datoteka izvorne kode Emacs Lisp + Kod burues Emacs Lisp + Емакс Лисп изворни ко̂д + Emacs Lisp-källkod + вихідний код мовою Emacs Lisp + Mã nguồn Lisp Emacs + Emacs Lisp 源代码 + Emacs Lisp 源代碼 + + + + + + + + + Erlang source code + شفرة مصدر Erlang + Kryničny kod Erlang + Изходен код — Erlang + codi font en Erlang + Zdrojový kód Erlang + Erlangkildekode + Erlang-Quelltext + Erlang-fontkodo + código fuente en Erlang + Erlang iturburu-kodea + Erlang-lähdekoodi + Erlang keldukota + code source Erlang + cód foinseach Erlang + código fonte de Erlang + קוד מקור של Erlang + Erlang forráskód + Kode program Erlang + Codice sorgente Erlang + Erlang ソースコード + Erlang бастапқы коды + Erlang 소스 코드 + Erlang pradinis kodas + Erlang pirmkods + Erlang-kildekode + Erlang-broncode + Erlang-kjeldekode + Kod źródłowy Erlang + Código fonte Erlang + Cod sursă Erlang + исходный код Erlang + Zdrojový kód Erlang + Datoteka izvorne kode Erlang + Kod burues Erlang + Erlang-källkod + вихідний код мовою Erlang + Mã nguồn Erlang + Erlang 源代码 + Erlang 源代碼 + + + + + Fortran source code + شفرة مصدر Fortran + Fortran mənbə kodu + Kryničny kod Fortran + Изходен код — Fortran + codi font en Fortran + Zdrojový kód Fortran + Ffynhonnell rhaglen FORTRAN + Fortrankildekode + Fortran-Quelltext + πηγαίος κώδικας Fortran + Fortran source code + Fotran-fontkodo + código fuente en Fortran + Fortran-en iturburu-kodea + Fortran-lähdekoodi + Fortran keldukota + code source Fortran + cód foinseach Fortran + código fonte de Fortran + קוד מקור של Fortran + Fortran-forráskód + Kode program Fortran + Codice sorgente Fortran + Fortran ソースコード + Fortran бастапқы коды + 포트란 소스 코드 + Fortran pradinis kodas + Fortran pirmkods + kod sumber Fortran + Fortran-kildekode + Fortran-broncode + Fortran-kjeldekode + Kod źródłowy Fortran + código fonte Fortran + Código fonte Fortran + Cod sursă Fortran + исходный код Fortran + Zdrojový kód Fortran + Datoteka izvorne kode Fortran + Kod burues Fortran + Фортран изворни ко̂д + Fortran-källkod + вихідний код мовою Fortran + Mã nguồn Fortran + Fortran 源代码 + Fortran 源代碼 + + + + + + + + translation file + ملف الترجمة + fajł pierakładu + Превод + fitxer traducció + Soubor překladu + oversættelsesfil + Übersetzungsdatei + tradukad-dosiero + archivo de traducción + itzulpen-fitxategia + käännöstiedosto + týðingarfíla + fichier de traduction + comhad aistrithe + ficheiro de tradución + קובץ תרגום + fordítási fájl + berkas terjemahan + File traduzione + 翻訳ファイル + аудармалар файлы + 번역 파일 + vertimo failas + tulkošanas fails + oversettelsesfil + vertalingsbestand + omsetjingsfil + Plik tłumaczenia + Arquivo de tradução + fișier traducere + файл переводов + Súbor prekladu + datoteka prevoda programa + File përkthimesh + översättningsfil + файл перекладу + tập tin dịch + 消息翻译文件 + 翻譯檔 + + + + + + + translation template + قالب الترجمة + šablon dla pierakładu + Шаблон за преводи + plantilla de traducció + Šablona překladu + oversættelsesskabelon + Übersetzungsvorlage + translation template + tradukad-ŝablono + plantilla de traducción + itzulpenen txantiloia + käännösmalli + týðingarformur + modèle de traduction + teimpléad aistrithe + plantilla de tradución + תבנית תרגום + fordítási sablon + templat terjemahan + Modello di traduzione + 翻訳テンプレート + аудармалар үлгісі + 메세지 번역 서식 + vertimo šablonas + tulkošanas veidne + mal for oversetting + vertalingssjabloon + omsetjingsmal + Szablon tłumaczenia + modelo de tradução + șablon de traducere + шаблон переводов + Šablóna prekladu + predloga datoteke prevoda programa + Model përkthimesh + översättningsmall + шаблон перекладу + mẫu dịch + 消息翻译模板 + 翻譯模版 + + + + + + HTML document + مستند HTML + Dakument HTML + Документ — HTML + document HTML + Dokument HTML + HTML-dokument + HTML-Dokument + HTML document + HTML-dokumento + documento HTML + HTML dokumentua + HTML-asiakirja + HTML skjal + document HTML + cáipéis HTML + documento HTML + מסמך HTML + HTML dokumentum + Dokumen HTML + Documento HTML + HTML ドキュメント + HTML құжаты + HTML 문서 + HTML dokumentas + HTML dokuments + HTML-dokument + HTML-document + HTML-dokument + Dokument HTML + Documento HTML + Document HTML + документ HTML + Dokument HTML + Dokument HTML + Dokument HTML + HTML-dokument + документ HTML + Tài liệu HTML + HTML 文档 + HTML 文件 + HTML + HyperText Markup Language + + + + + + + + + + + + + + + + + + + + + + + + + Web application cache manifest + قائمة التخزين الموقت لتطبيق الويب + Манифест за кеша на уеб приложение + manifest de memòria cau d'aplicació Web + Manifest mezipaměti webové aplikace + Manifest for internetprogrammellemlager + Webanwendungscache-Manifest + manifiesto de caché de aplicación web + Web aplikazioaren cache-aren agiria + Net nýtsluskipanarkova manifest + manifeste de cache d'application Web + lastliosta taisce d'fheidhmchlár Gréasáin + manifesto de caché de aplicativo web + הצהרה של מטמון של תוכנית ברשת + Webalkalmazás gyorsítótár-összefoglalója + Manifes singgahan aplikasi web + Manifesto cache applicazione Web + Web アプリケーションキャッシュ manifest + Веб қолданбасының кэш манифесті + 웹 애플리케이션 캐시 정의 + Žiniatinklio programos podėlio manifestas + Tīmekļa lietotņu keša manifests + Manifest pamięci podręcznej aplikacji WWW + Manifest de cache pentru aplicații web + манифест кэша веб-приложения + Predpomnilnik spletnega programa + Cachemanifest för webbapplikation + маніфест кешу веб-програми + 网络应用程序缓存清单 + + + + + + + + + + + + + Google Video Pointer + مؤشر فيديو جوجل + Pakazalnik Google Video + Документ-указател към видео на Google + apuntador a vídeo de Google + Google Video Pointer + Google Video-peger + Google Video Pointer + lista de reproducción de Google Video (GVP) + Google Video-ren erreprodukzio-zerrenda + Google-video-osoitin + Google Video Pointer + pointeur vidéo Google + pointeoir Google Video + punteiro de vídeo de Google + מצביע וידאו של Google + Google Video Pointer + Google Video Pointer + Puntatore Google Video + Google ビデオポインター + Google Video Pointer + 구글 비디오 포인터 + Google Video Pointer + Google Video Pointer + Peker til Google Video + Google-videoverwijzing + Google Video-peikar + Lista odtwarzania Google Video + Ponteiro do Google Vídeo + Indicator Google Video + Google Video Pointer + Google Video Pointer + Kazalec Google Video + Puntues Google Video + Google Video-pekare + вказівник відео Google + Con trỏ ảnh động Google + Google 视频指向 + Google Video Pointer + + + + + + + + + Haskell source code + شفرة مصدر Haskell + Haskell mənbə kodu + Kryničny kod Haskell + Изходен код на Haskell + codi font en Haskell + Zdrojový kód Haskell + Ffynhonnell rhaglen Haskell + Haskellkildekode + Haskell-Quelltext + πηγαίος κώδικας Haskell + Haskell source code + Haskell-fontkodo + código fuente en Haskell + Haskell iturburu-kodea + Haskell-lähdekoodi + Haskell keldukota + code source Haskell + cód foinseach Haskell + código fonte de Haskell + קוד מקור של Haskell + Haskell-forráskód + Kode program Haskell + Codice sorgente Haskell + Haskell ソースコード + Haskell бастапқы коды + Haskell 소스 코드 + Haskell pradinis kodas + Haskell pirmkods + Kod sumber Haskell + Haskell-kildekode + Haskell-broncode + Haskell-kjeldekode + Kod źródłowy Haskell + código fonte Haskell + Código fonte Haskell + Cod sursă Haskell + исходный код Haskell + Zdrojový kód Haskell + Datoteka izvorne kode Haskell + Kod burues Haskell + Haskell изворни ко̂д + Haskell-källkod + вихідний код мовою Haskell + Mã nguồn Haskell + Haskell 源代码 + Haskell 源代碼 + + + + + IDL document + مستند IDL + IDL sənədi + Dakument IDL + Документ — IDL + document IDL + Dokument IDL + Dogfen IDL + IDL-dokument + IDL-Dokument + έγγραφο IDL + IDL document + IDL-dokumento + documento IDL + IDL dokumentua + IDL-asiakirja + IDL skjal + document IDL + cáipéis IDL + documento IDL + מסמך IDL + IDL-dokumentum + Dokumen IDL + Documento IDL + IDL ドキュメント + IDL құжаты + IDL 문서 + IDL dokumentas + IDL dokuments + Dokumen IDL + IDL-dokument + IDL-document + IDL-dokument + Dokument IDL + documento IDL + Documento IDL + Document IDL + документ IDL + Dokument IDL + Dokument IDL + Dokument IDL + IDL документ + IDL-dokument + документ IDL + Tài liệu IDL + IDL 文档 + IDL 文件 + IDL + Interface Definition Language + + + + + installation instructions + تعليمات التثبيت + instrukcyja dla instalavańnia + Инструкции за инсталация + instruccions d'instal·lació + Návod k instalaci + installationsinstruktioner + Installationsanleitung + installation instructions + instrucciones de instalación + instalazioaren instrukzioak + asennusohjeet + innleggingar vegleiðing + instructions d'installation + treoracha suiteála + instrucións de instalación + הוראות התקנה + telepítési utasítások + instruksi instalasi + Istruzioni di installazione + ソフトウェアインストール説明 + бағдарламаны орнату нұсқаулары + 설치 방법 + diegimo instrukcijos + instalācijas instrukcijas + installationsinstruksjoner + installatie-instructies + installasjonsinstruksjonar + Instrukcje instalacji + instruções de instalação + instrucțiuni de instalare + инструкции по установке программы + Návod na inštaláciu + navodila namestitve + Udhëzime instalimi + installationsinstruktioner + інструкції з встановлення + hướng dẫn cài đặt + 软件安装指南 + 安裝指引 + + + + + Java source code + شفرة مصدر Java + Kryničny kod Java + Изходен код на Java + codi font en Java + Zdrojový kód v Javě + Javakildekode + Java-Quelltext + πηγαίος κώδικας Java + Java source code + Java-fontkodo + código fuente en Java + Java iturburu-kodea + Java-lähdekoodi + Java keldukota + code source Java + cód foinseach Java + código fonte de Java + קוד מקור ב־Java + Java-forráskód + Kode program Java + Codice sorgente Java + Java ソースコード + Java бастапқы коды + 자바 소스 코드 + Java pradinis kodas + Java pirmkods + Kod sumber Java + Java-kildekode + Java-broncode + Java-kjeldekode + Kod źródłowy Java + código fonte Java + Código fonte Java + Cod sursă Java + исходный код Java + Zdrojový kód Java + Datoteka izvorne kode Java + Kod burues Java + Јава изворни ко̂д + Java-källkod + вихідний код мовою Java + Mã nguồn Java + Java 源代码 + Java 源代碼 + + + + + LDIF address book + دفتر عناوين LDIF + Adrasnaja kniha LDIF + Адресна книга — LDIF + llibreta d'adreces LDIF + Adresář LDIF + LDIF-adressebog + LDIF-Adressbuch + LDIF-adresaro + libreta de direcciones LDIF + LDIF helbide-liburua + LDIF-osoitekirja + LDIF adressubók + carnet d'adresses LDIF + leabhar sheoltaí LDIF + lista de enderezos LDIF + ספר כתובות של LDIF + LDIF címjegyzék + Buku alamat LDIF + Rubrica LDIF + LDIF アドレス帳 + LDIF адрестер кітабы + LDIF 주소록 + LDIF adresų knygelė + LDIF adrešu grāmata + LDIF-adressebok + LDIF-adresboek + LDIF-adressebok + Książka adresowa LDIF + Livro de endereços LDIF + Agendă LDIF + адресная книга LDIF + Adresár LDIF + Datoteka imenika naslovov LDIF + Rubrikë LDIF + LDIF-adressbok + адресна книга LDIF + Sổ địa chỉ LDIF + LDIF 地址簿 + LDIF 通訊錄 + LDIF + LDAP Data Interchange Format + + + + + + + + + Lilypond music sheet + صفحة موسيقى Lilypond + Muzyčny arkuš Lilypond + Нотация на Lilypond + full de música Lilypond + Notový papír Lilypond + Lilypondmusikkort + Lilypond-Notenblatt + hoja de música Lilypond + Lilypond musika-orria + Lilypond-nuotit + Lilypond tónleika ark + partition musicale Lilypond + bileog cheoil Lilypond + folla de música de Lilypond + דף מוזיקה של Lilypond + Lilypond kotta + Lembar musik Lilypond + Partitura Lilypond + Lilypond 楽譜データ + Lilypond музыка тізімі + Lilypond 음악 시트 + Lilypond muzikos lapas + Lilypond mūzikas lapa + Lilypond-muziekblad + Lilypond noteark + Plik partytury Lilypond + Folha de música do Lilypond + Fișă muzică Lilypond + список музыки Lilypond + Notový papier Lilypond + Glasbena predloga Lilypond + Partiturë Lilypond + Lilypond-notblad + нотний запис Lilypond + Bản nhạc Lilypond + Lilypond 乐谱 + Lilypond 樂譜 + + + + + LHS source code + شفرة مصدر LHS + Kryničny kod LHS + Изходен код на LHS + codi font en LHS + Zdrojový kód v LHS + LHS-kildekode + LHS-Quelltext + LHS source code + LHS-fontkodo + código fuente en LHS + LHS iturburu-kodea + LHS-lähdekoodi + LHS keld + code source LHS + cód foinseach LHS + código fonte en LHS + קוד מקור של LHS + LHS forráskód + Kode program LHS + Codice sorgente LHS + LHS ソースコード + LHS бастапқы коды + LHS 소스 코드 + LHS pradinis kodas + LHS pirmkods + LHS-kildekode + LHS-broncode + LHS-kjeldekode + Kod źródłowy LHS + Código fonte LHS + Cod sursă LHS + исходный код LHS + Zdrojový kód LHS + Datoteka izvorne kode LHS + Kod burues LHS + LHS-källkod + вихідний код LHS + Mã nguồn LHS + LHS 源代码 + LHS 源代碼 + LHS + Literate Haskell source code + + + + + application log + سجل التطبيق + časopis aplikacyi + Файл-дневник на приложение + registre d'aplicació + Záznam aplikace + programlog + Anwendungsprotokoll + ημερολόγιο συμβάντων εφαρμογής + application log + protokolo de aplikaĵo + registro de aplicación + aplikazio egunkaria + sovelluksen lokitiedosto + nýtsluskipan logg + journal d'application + logchomhad feidhmchláir + rexistro de aplicativo + יומן התוכנה + alkalmazás naplója + log aplikasi + Log applicazione + アプリケーションログ + мәлімдемелер журналы + 프로그램 기록 + programos žurnalas + lietotnes žurnāls + Log aplikasi + applikasjonslogg + programma-logbestand + programlogg + Dziennik programu + registo de aplicação + Registro de aplicação + înregistrare aplicație + журнал сообщений + Záznam aplikácie + dnevnik programa + log i mesazheve të programit + дневник програма + programlogg + журнал програми + bản ghi ứng dụng + 应用程序日志 + 程式紀錄檔 + + + + + Makefile + ملف Makefile + İnşa faylı + Makefile + Файл — make + Makefile + Makefile + Ffeil "make" + Bygningsfil + Makefile + Makefile + Makefile + Muntodosiero + Makefile + Makefile + Makefile + Makefile + makefile + Makefile + Makefile + Makefile + Makefile + Makefile + Makefile + Makefile + Makefile (жинау файлы) + Makefile + Makefile + Makefile + Makefile + Makefile + Makefile + Makefile + Plik make + Makefile + Makefile (arquivo do make) + Makefile + Makefile (файл сборки) + Makefile + Datoteka Makefile + Makefile + Производна датотека + Makefil + файл проекту make + Tập tin tạo ứng dụng (Makefile) + Makefile + Makefile + + + + + + + + + + + Markdown document + Документ — Markdown + document Markdown + Dokument Markdown + Documento de Markdown + Markdown-asiakirja + document Markdown + documento de Markdown + מסמך Markdown + Dokumen markdown + Documento Markdown + Markdown + Markdown құжаты + Markdown dokuments + Dokument Markdown + документ Markdown + Dokument Markdown + документ Markdown + + + + + + + Qt MOC file + ملف Qt MOC + Fajł Qt MOC + Файл — Qt MOC + fitxer MOC de Qt + Soubor Qt MOC + Qt MOC-fil + Qt-MOC-Datei + Qt MOC file + archivo MOC Qt + Qt MOC fitxategia + Qt MOC -tiedosto + Qt MOC fíla + fichier Qt MOC + comhad MOC Qt + ficheiro MOC Qt + קובץ Qt MOC + Qt MOC fájl + Berkas Qt MOC + File MOC Qt + Qt MOC ファイル + Qt MOC файлы + Qt MOC 파일 + Qt MOC failas + Qt MOC fails + Qt MOC-fil + Qt MOC-bestand + Qt MOC-fil + Plik Qt MOC + Arquivo Qt MOC + Fișier Qt MOC + файл Qt MOC + Súbor Qt MOC + Datoteka Qt MOC + File Qt MOC + Qt MOC-fil + файл-метаоб'єкт Qt + Tập tin MOC của Qt + Qt 元对象编译文件 + Qt MOC 檔 + Qt MOC + Qt Meta Object Compiler + + + + + Windows Registry extract + استخراج مسجل ويندوز + Element rehistru Windows + Извадка от регистъра на Windows + extracte del registre de Windows + Část registrů Windows + Windows Registy-udtrækning + Windows-Registry-Auszug + extracto del registro de Windows + Windows-eko erregistro erauzlea + Windows-rekisteritietue + Windows Registry úrdráttur + extrait de registre Windows + sliocht as Clárlann Windows + Extracto do rexistro de Windows + קובץ Registry של Windows + Windows Registry kivonat + Ekstrak Windows Registry + Estratto Windows Registry + WIndows レジストリ抽出ファイル + Windows Registry бөлігі + 윈도우 레지스트리 파일 + Windows registro ištrauka + Windows Registry izvilkums + Utdrag av Windows Registry + Windows Registry-extract + Windows Registry-utdrag + Wycinek rejestru Windows + Extrator de registro do Windows + Extras al registrului Windows + фрагмент Windows Registry + Časť registrov Windows + izvleček vpisnika Windows + Pjesë Windows Registry + Windows Registry-utdrag + частина реєстру Windows + Bản trích Registry Windows + Windows 注册表文件 + Windows Registry 抽出 + + + + + + + + + + Managed Object Format + صيغة كائن مدار + Farmat Managed Object + Управлявани обекти — MOF + format d'objecte gestionat + Managed Object Format + Håndteret objektformat + Managed Object Format + formato de objeto manejado + Kudeatutako objektu formatua + Managed Object Format + format Managed Object + formáid réada bainistithe + formato de obxecto xestionado + פורמט ניהול אובייקט + Felügyelt objektum (MO) formátum + Managed Object Format + Managed Object Format + 管理オブジェクトフォーマット + Басқарылатын объект пішімі + 관리되는 오브젝트 형식 + Sutvarkytų objektų formatas + Pārvaldītu objektu formāts + Managed Object Format + Managed Object Format + Managed Object Format + Plik Managed Object Format + Formato de objeto gerenciado + Managed Object Format + формат управляемого объекта + Formát Managed Object + Datoteka Managed Object + Managed Object Format + Managed Object Format + формат керування об’єктами + Định dạng Đối tượng đã Quản lý + 托管对象格式 + Managed Object Format + + + + + Mup publication + منشور Mup + Publikacyja Mup + Издание — Mup + publicació Mup + Publikace Mup + Mupudgivelse + Mup-Veröffentlichung + Mup publication + publicación Mup + Mup publikazioa + Mup-julkaisu + Mup útgáva + publication Mup + foilseachán Mup + publicación Mup + פרסום של Mup + Mup publikáció + Publikasi Mup + Pubblicazione Mup + Mup 出版ファイル + Mup жариялымы + Mup 출판 + Mup leidinys + Mup publikācija + Mup publikasjon + Mup-publicatie + Mup-publikasjon + Publikacja Mup + Publicação do Mup + Publicație Mup + публикация Mup + Publikácie Mup + Datoteka objave Mup + Publikim Mup + Mup-publicering + публікація Mup + Bản xuất Mup + Mup 应用程序 + + + + + + + + + Objective-C source code + شفرة مصدر الهدف-C + Kryničny kod Objective-C + Изходен код — Objective C + codi font en Objective-C + Zdrojový kód v Objective-C + Objektiv C-kildekode + Objective-C-Quelltext + πηγαίος κώδικας Objective-C + Objective-C source code + fontkodo en Objective-C + código fuente en Objective-C + Objective-C iturburu-kodea + Objective-C-lähdekoodi + Objective-C keldukota + code source Objective-C + cód foinseach Objective-C + código fonte de Objective-C + קוד מקור של Objective-C + Objective-C forráskód + Kode program Objective-C + Codice sorgente Objective-C + Objective-C ソースコード + Objective-C бастапқы коды + Objective-C 소스 코드 + Objective-C pradinis kodas + Objective-C pirmkods + Kod sumber Objective-C + Objective-C-kildekode + Objective-C-broncode + Objective-C-kjeldekode + Kod źródłowy Objective-C + código fonte Objective-C + Código fonte Objective-C + Cod sursă Objective-C + исходный код Objective-C + Zdrojový kód Objective-C + Datoteka izvorne kode Objective-C + Kod burues C objekt + Објектни-C изворни ко̂д + Objective-C-källkod + вихідний код мовою Objective-C + Mã nguồn Objective-C + Objective-C 源代码 + Objective-C 源代碼 + + + + + + + + OCaml source code + شفرة مصدر OCaml + Kryničny kod OCaml + Изходен код — OCaml + codi font en OCaml + Zdrojový kód OCaml + OCaml-kildekode + OCaml-Quelltext + OCaml-fontkodo + código fuente en OCaml + OCaml iturburu-kodea + OCaml-lähdekoodi + OCaml keldukota + code source OCaml + cód foinseach OCaml + código fonte de OCaml + קוד מקור של OCaml + OCaml forráskód + Kode program OCaml + Codice sorgente OCaml + OCaml ソースコード + OCaml бастапқы коды + OCaml 소스 코드 + OCaml pradinis kodas + OCaml pirmkods + OCaml-kildekode + OCaml-broncode + OCaml-kjeldekode + Kod źródłowy OCaml + Código fonte do OCaml + Cod sursă OCaml + исходный код OCaml + Zdrojový kód OCaml + Datoteka izvorne kode OCaml + Kod burues OCaml + OCaml-källkod + первинний код мовою OCaml + Mã nguồn OCaml + OCaml 源代码 + OCaml 源代碼 + + + + + MATLAB script/function + سكربت/وظيفة MATLAB + Skrypt/funkcyja MATLAB + Скрипт/функция — MATLAB + script/funció MATLAB + Skript/funkce MATLAB + MATLAB-program/-funktion + MATLAB-Skript/-Funktion + MATLAB script/function + script/función de MATLAB + MATLAB script/funtzioa + MATLAB-komentotiedosto/funktio + MATLAB boðrøð/funka + script/fonction MATLAB + script/feidhm MATLAB + función/script de MATLAB + תסריט/פונקציית MATLAB + MATLAB parancsfájl/funkció + Skrip/fungsi MATLAB + Script/Funzione MATLAB + MATLAB スクリプト/関数 + MATLAB сценарий/функциясы + MATLAB 스크립트/함수 + MATLAB scenarijus / funkcija + MATLAB skripts/funkcija + Skript/funksjon for MATLAB + MATLAB-script/functie + MATLAB-skript/funksjon + Skrypt/funkcja MATLAB + Script/função do MATLAB + Funcție/script MATLAB + сценарий/функция MATLAB + Skript/funkcia MATLAB + Skriptna datoteka MATLAB + Script/Funksion MATLAB + MATLAB-skript/funktion + скрипт/функція MATLAB + Văn lệnh/chức năng MATLAB + MATLAB 脚本/函数 + MATLAB 指令稿/函式 + + + + + + + + + + + + + + + Pascal source code + شفرة مصدر باسكال + Kryničny kod Pascal + Изходен код — Pascal + codi font en Pascal + Zdrojový kód v Pascalu + Pascalkildekode + Pascal-Quelltext + πηγαίος κώδικας Pascal + Pascal source code + Pascal-fontkodo + código fuente en Pascal + Pascal iturburu-kodea + Pascal-lähdekoodi + Pascal keldukota + code source Pascal + cód foinseach Pascal + código fonte en Pascal + קוד מקור של Pascal + Pascal-forráskód + Kode program Pascal + Codice sorgente Pascal + Pascal ソースコード + Pascal бастапқы коды + 파스칼 소스 코드 + Pascal pradinis kodas + Pascal pirmkods + Kod sumber Pascal + Pascal-kildekode + Pascal-broncode + Pascal-kjeldekode + Kod źródłowy Pascal + código fonte Pascal + Código fonte Pascal + Cod sursă Pascal + исходный код Pascal + Zdrojový kód Pascal + Datoteka izvorne kode Pascal + Kod burues Pascal + Паскал изворни ко̂д + Pascal-källkod + вихідний код мовою Pascal + Mã nguồn Pascal + Pascal 源代码 + Pascal 源代碼 + + + + + + differences between files + الاختلافات بين الملفات + adroźnieńni pamiž fajłami + Разлики между файлове + diferències entre fitxers + Rozdíly mezi soubory + forskel mellem filer + Unterschiede zwischen Dateien + διαφορές μεταξύ αρχείων + differences between files + diferencoj inter dosieroj + diferencias entre archivos + fitxategien arteko ezberdintasunak + tiedostojen väliset erot + munur millum fílur + différences entre fichiers + difríochtaí idir chomhaid + diferenzas entre ficheiros + ההבדל בין קבצים + diff-különbségfájl + perbedaan diantara berkas + Differenze tra file + ファイル間差分 + файлдар арасындағы айырмашылықтары + 파일 사이의 바뀐점 + skirtumai tarp failų + divu failu atšķirība + Perbezaan antara fail + forskjeller mellom filer + verschillen tussen bestanden + skilnader mellom filer + Różnica pomiędzy plikami + diferenças entre ficheiros + diferenças entre arquivos + diferențe între fișiere + различия между файлами + Rozdiely medzi súbormi + razlike med datotekami + Diferencë midis file + разлике међу датотекама + skillnader mellan filer + різниця між файлами + khác biệt giữa các tập tin + 文件的区别 + 檔案內容差異 + + + + + + + + + + + + + + + + + + + Go source code + Изходен код — Go + codi font en Go + Zdrojový kód Go + Go-Quellcode + Go-fontkodo + Ir al código fuente + Go-lähdekoodi + code source Go + código fonte de Go + קוד מקור של Go + Go forráskód + Kode sumber Go + Codice sorgente Go + Go ソースコード + Go бастапқы коды + Go 소스 코드 + Go pirmkods + Kod źródłowy Go + исходный код Go + Izvorna koda Go + вихідний код мовою Go + Go + Go 源代碼 + + + + + Python script + سكربت بايثون + Skrypt Python + Скрипт — Python + script Python + Skript v Pythonu + Pythonprogram + Python-Skript + πρόγραμμα εντολών Python + Python script + Python-skripto + script en Python + Python script-a + Python-komentotiedosto + Python boðrøð + script Python + script Python + Script en Python + תסריט Python + Python-parancsfájl + Skrip Python + Script Python + Python スクリプト + Python сценарийі + 파이썬 스크립트 + Python scenarijus + Python skripts + Skrip Python + Python-skript + Python-script + Python-skript + Skrypt Python + 'script' Python + Script Python + Script Python + сценарий Python + Skript Python + Skriptna datoteka Python + Script Python + Питон скрипта + Pythonskript + скрипт мовою Python + Văn lệnh Python + Python 脚本 + Python 指令稿 + + + + + + + + + + + + + + + + + + + Lua script + سكربت Lua + Skrypt Lua + Скрипт на Lua + script Lua + Skript Lua + Luaprogram + Lua-Skript + Lua-skripto + script en Lua + Lua script-a + Lua-komentotiedosto + Lua boðrøð + script Lua + script Lua + script de Lua + תסריט Lua + Lua parancsfájl + Skrip Lua + Script Lua + Lua スクリプト + Lua сценарийі + Lua 스크립트 + Lua scenarijus + Lua skripts + Lua-skript + Lua-script + Lua-skript + Skrypt Lua + Script Lua + Script Lua + сценарий Lua + Skript Lua + Skriptna datoteka Lua + Script Lua + Lua-skript + скрипт Lua + Văn lệnh Lua + Lua 脚本 + Lua 指令稿 + + + + + + + + + + README document + مستند README + README sənədi + Dakument README + Документ — „Да се прочете“ + document README + Dokument README + Dogfen README + README-dokument + README-Dokument + έγγραφο README + README document + README-dokumento + documento README + README dokumentua + LUEMINUT-asiakirja + README skjal + document LISEZ-MOI + cáipéis README + documento README + מסמך README + README-dokumentum + Dokumen README + Documento README + README ドキュメント + README құжаты + README 문서 + README dokumentas + README dokuments + Dokumen README + README-dokument + LEESMIJ-document + README-dokument + Dokument README + documento LEIA-ME + Documento README + Document README + документ README + Dokument README + Dokument README + Dokument README + ПРОЧИТАЈМЕ документ + README-dokument + документ README + Tài liệu Đọc Đi (README) + README 文档 + README 說明文件 + + + + + NFO document + مستند NFO + Dakument NFO + Документ — NFO + document NFO + Dokument NFO + NFO-dokument + NFO-Dokument + NFO-dokumento + documento NFO + NFO dokumentua + NFO-asiakirja + NFO skjal + document NFO + cáipéis NFO + documento NFO + מסמך NFO + NFO-dokumentum + Dokumen NFO + Documento NFO + NFO ドキュメント + NFO құжаты + NFO 문서 + NFO dokumentas + NFO dokuments + NFO-dokument + NFO-document + NFO-dokument + Dokument NFO + Documento NFO + Document NFO + документ NFO + Dokument NFO + Dokument NFO + Dokument NFO + NFO-dokument + документ NFO + Tài liệu NFO + NFO 文档 + NFO 文件 + + + + + RPM spec file + ملف مواصفات RPM + Specyfikacyjny fajł RPM + Файл — спецификация за RPM + fitxer spec RPM + Soubor spec RPM + RPM spec-fil + RPM-Spezifikationsdatei + archivo de especificaciones RPM + RPM espezifikazio fitxategia + RPM spec -tiedosto + RPM tøknilýsingarfíla + fichier de spécification RPM + comhad spec RPM + ficheiro de especificacións RPM + קובץ מפרט RPM + RPM spec fájl + Berkas spesifikasi RPM + File specifica RPM + RPM spec ファイル + RPM анықтама файлы + RPM spec 파일 + RPM spec failas + RPM specifikācijas fails + RPM-spesifikasjonsfil + RPM-spec-bestand + RPM spec-fil + Plik spec RPM + Arquivo de especificação RPM + Fișier RPM spec + файл описания RPM + Súbor RPM spec + Določilna datoteka RPM + File specifikimi RPM + RPM spec-fil + spec-файл RPM + Tập tin đặc tả RPM + RPM spec 文件 + RPM spec 規格檔 + RPM + Red Hat Package Manager + + + + + + + + + Scala source code + Изходен код — Scala + codi font en Scala + Zdrojový kód Scala + Código fuente en Scala + Scala-lähdekoodi + code source Scala + código fnote en Scala + קוד מקור של Scala + Kode sumber Scala + Codice sorgente Scala + Scala ソースコード + Scala бастапқы коды + Scala pirmkods + Kod źródłowy Scala + исходный код Scala + Izvorna koda Scala + Scala-källkod + вихідний код мовою Scala + + + + + Scheme source code + شفرة مصدر Scheme + Sxem mənbə kodu + Kryničny kod Scheme + Изходен код — Scheme + codi font en Scheme + Zdrojový kód Scheme + Ffynhonnell Rhaglen Scheme + Schemekildekode + Scheme-Quelltext + πηγαίος κώδικας Scheme + Scheme source code + Scheme-fontkodo + código fuente en Scheme + Scheme iturburu-kodea + Scheme-lähdekoodi + Scheme keldukota + code source Scheme + cód foinseach Scheme + código fonte en Scheme + קוד מקור של Scheme + Scheme-forráskód + Kode program Scheme + Codice sorgente Scheme + Scheme ソースコード + Scheme бастапқы коды + Scheme 소스 코드 + Scheme pradinis kodas + Scheme pirmkods + Kod sumber Scheme + Scheme-kildekode + Scheme-broncode + Scheme-kjeldekode + Kod źródłowy Scheme + código fonte Scheme + Código fonte Scheme + Cod sursă Scheme + исходный код Scheme + Zdrojový kód Scheme + Datoteka izvorne kode Scheme + Kod burues Scheme + Scheme изворни ко̂д + Scheme-källkod + вихідний файл мовою Scheme + Mã nguồn Scheme + Scheme 源代码 + Scheme 源代碼 + + + + + + Setext document + مستند Setext + Setext sənədi + Dakument Setext + Документ — Setext + document Setext + Dokument Setext + Dogfen Setext + Setextdokument + Setext-Dokument + έγγραφο Setext + Setext document + Setext-dokumento + documento Setext + Setext dokumentua + Setext-asiakirja + Setext skjal + document Setext + cáipéis Setext + documento Settext + מסמך של Setext + Setext-dokumentum + Dokumen Setext + Documento Setext + Setext ドキュメント + Setext құжаты + Setext 문서 + Setext dokumentas + Setext dokuments + Dokumen Setext + Setext-dokument + Setext-document + Setext-dokument + Dokument Setext + documento Setext + Documento Setext + Document Setext + документ Setext + Dokument Setext + Dokument Setext + Dokument Setext + Setext документ + Setext-dokument + документ Setext + Tài liệu Setext + Setext 文档 + Setext 文件 + + + + + SQL code + شفرة SQL + SQL kodu + Kod SQL + Код — SQL + codi en SQL + Kód SQL + Côd SQL + SQL-kode + SQL-Befehle + κώδικας SQL + SQL code + SQL-kodo + código SQL + SQL kodea + SQL-koodi + SQL kota + code SQL + cód SQL + código SQL + קוד SQL + SQL-kód + Kode SQL + Codice SQL + SQL コード + SQL коды + SQL 코드 + SQL kodas + SQL kods + Kod SQL + SQL-kildekode + SQL-code + SQL-kode + Kod SQL + código SQL + Código SQL + Cod SQL + код SQL + Kód SQL + Datoteka kode SQL + Kod SQL + SQL ко̂д + SQL-kod + код SQL + Mã SQL + SQL 代码 + SQL 代碼 + + + + + Tcl script + سكربت Tcl + Skrypt Tcl + Скрипт — Tcl + script Tcl + Skript v Tcl + Tcl-program + Tcl-Skript + πρόγραμμα εντολών Tcl + Tcl script + Tcl-skripto + script en Tcl + Tcl script-a + Tcl-komentotiedosto + Tcl boðrøð + script Tcl + script Tcl + Script en Tcl + תסריט Tcl + Tcl-parancsfájl + Skrip Tcl + Script Tcl + Tcl スクリプト + Tcl сценарийі + Tcl 스크립트 + Tcl scenarijus + Tcl skripts + Skrip Tcl + Tcl-skript + Tcl-script + Tcl-skript + Skrypt Tcl + 'script' Tcl + Script Tcl + Script Tcl + сценарий Tcl + Skript Tcl + Skriptna datoteka Tcl + Script Tcl + Tcl скрипта + Tcl-skript + скрипт Tcl + Văn lệnh Tcl + Tcl 脚本 + Tcl 描述語言檔 + + + + + + TeX document + مستند TeX + Dakument TeX + Документ — TeX + document TeX + Dokument TeX + Dogfen TeX + TeX-dokument + TeX-Dokument + έγγραφο TeX + TeX document + TeX-dokumento + documento TeX + TeX dokumentua + TeX-asiakirja + TeX skjal + document TeX + cáipéis TeX + documenton TeX + מסמך TeX + TeX-dokumentum + Dokumen TeX + Documento TeX + TeX ドキュメント + TeX құжаты + TeX 문서 + TeX dokumentas + TeX dokuments + Dokumen TeX + TeX-dokument + TeX-document + TeX-dokument + Dokument TeX + documento TeX + Documento TeX + Document TeX + документ TeX + Dokument TeX + Dokument TeX + Dokument TeX + ТеХ документ + TeX-dokument + документ TeX + Tài liệu TeX + TeX 文档 + TeX 文件 + + + + + + + + + + + + + + + + + + TeXInfo document + مستند TeXInfo + TeXInfo sənədi + Dakument TeXInfo + Документ — TeXInfo + document TeXInfo + Dokument TeXInfo + Dogfen TeXInfo + TeXInfo-dokument + TeXInfo-Dokument + έγγραφο TeXInfo + TeXInfo document + TeXInfo-dokumento + documento TeXInfo + TeXInfo dokumentua + TeXInfo-asiakirja + TeXInfo skjal + document TeXInfo + cáipéis TeXInfo + documento TeXInfo + מסמך של TeXInfo + TeXInfo-dokumentum + Dokumen TeXInfo + Documento TeXInfo + TeXInfo ドキュメント + TeXInfo құжаты + TeXInfo 문서 + TeXInfo dokumentas + TeXInfo dokuments + Dokumen TeXInfo + TeXInfo-dokument + TeXInfo-document + TeXInfo-dokument + Dokument TeXInfo + documento TeXInfo + Documento TeXInfo + Document TexInfo + документ TeXInfo + Dokument TeXInfo + Dokument TeXInfo + Dokument TeXInfo + ТеХинфо документ + TeXInfo-dokument + документ TeXInfo + Tài liệu TeXInfo + TeXInfo 文档 + TeXInfo 文件 + + + + + + Troff ME input document + مستند Troff ME input + Uvodny dakument Troff ME + Изходен документ — Troff ME + document d'entrada Troff ME + Vstupní dokument Troff ME + Troff ME inddata-dokument + Troff-ME-Eingabedokument + έγγραφο/πρόγραμμα εντολών troff ME + Troff ME input document + eniga dokumento de Troff ME + documento de entrada Troff ME + Troff ME sarrerako dokumentua + Troff ME -syöteasiakirja + Troff ME inntaksskjal + document d'entrée Troff ME + cáipéis ionchur Troff ME + documento de entrada Troff ME + מסמך קלט של Troff ME + Troff ME bemeneti dokumentum + Dokumen masukan Troff ME + Documento di input Troff ME + Troff ME 入力ドキュメント + Troff ME кіріс құжаты + Troff ME 입력 문서 + Troff ME įvesties dokumentas + Troff ME ievades dokuments + Dokumen input Troff ME + Troff ME-inndatadokument + Troff ME-invoerdocument + Troff ME inndata-dokument + Dokument wejściowy Troff ME + documento origem Troff ME + Documento de entrada Troff ME + Document intrare Troff ME + входной документ Troff ME + Vstupný dokument Troff ME + Vnosni dokument Troff ME + Dokument i input Troff ME + Troff ME улазни документ + Troff ME-indatadokument + вхідний документ Troff ME + Tài liệu nhập ME Troff + Troff ME 输入文档 + Troff ME 輸入文件 + + + + + Troff MM input document + مستند Troff MM input + Uvodny dakument Troff MM + Изходен документ — Troff MM + document d'entrada Troff MM + Vstupní dokument Troff MM + Troff MM inddata-dokument + Troff-MM-Eingabedokument + έγγραφο/πρόγραμμα εντολών troff MM + Troff MM input document + eniga dokumento de Troff MM + documento de entrada Troff MM + Troff MM sarrerako dokumentua + Troff MM -syöteasiakirja + Troff MM inntaksskjal + document d'entrée Troff MM + cáipéis ionchur Troff MM + documento de entrada Troff MM + מסמך קלט של Troff MM + Troff MM bemeneti dokumentum + Dokumen masukan Troff MM + Documento di input Troff MM + Troff MM 入力ドキュメント + Troff MM кіріс құжаты + Troff MM 입력 문서 + Troff MM įvesties dokumentas + Troff MM ievades dokuments + Dokumen input Troff MM + Troff MM-inndatadokument + Troff MM-invoerdocument + Troff MM inndata-dokument + Dokument wejściowy Troff MM + documento origem Troff MM + Documento de entrada Troff MM + Document intrare Troff MM + входной документ Troff MM + Vstupný dokument Troff MM + Vnosni dokument Troff MM + Dokument i input Troff MM + Troff MM улазни документ + Troff MM-indatadokument + вхідний документ Troff MM + Tài liệu nhập MM Troff + Troff MM 输入文档 + Troff MM 輸入文件 + + + + + Troff MS input document + مستند Troff MS input + Uvodny dakument Troff MS + Изходен документ — Troff MS + document d'entrada Troff MS + Vstupní dokument Troff MS + Troff MS inddata-dokument + Troff-MS-Eingabedokument + έγγραφο/πρόγραμμα εντολών troff MS + Troff MS input document + eniga dokumento de Troff MS + documento de entrada Troff MS + Troff MS sarrerako dokumentua + Troff MS -syöteasiakirja + Troff MS inntaksskjal + document d'entrée Troff MS + cáipéis ionchur Troff MS + documento de entrada Troff MS + מסמך קלט של Troff MS + Troff MS bemeneti dokumentum + Dokumen masukan Troff MS + Documento di input Troff MS + Troff MS 入力ドキュメント + Troff MS кіріс құжаты + Troff Ms 입력 문서 + Troff MS įvesties dokumentas + Troff MS ievades dokuments + Dokumen input Troff MS + Troff MS-inndatadokument + Troff MS-invoerdocument + Troff MS inndata-dokument + Dokument wejściowy Troff MS + documento origem Troff MS + Documento de entrada Troff MS + Document intrare Troff MS + входной документ Troff MS + Vstupný dokument Troff MS + Vnosni dokument Troff MS + Dokument i input Troff MS + Troff MS улазни документ + Troff MS-indatadokument + вхідний документ Troff MS + Tài liệu nhập MS Troff + Troff MS 输入文档 + Troff MS 輸入文件 + + + + + X-Motif UIL table + جدول X-Motif UIL + Tablica X-Motif UIL + Таблица — X-Motif UIL + taula UIL de X-Motif + Tabulka X-Motif UIL + X-Motif UIL-tabel + X-Motif-UIL-Tabelle + πίνακας X-Motif UIL + X-Motif UIL table + tabla de X-Motif UIL + X-Motif UIL taula + X-Motif UIL -taulukko + X-Motif UIL talva + table X-Motif UIL + tábla X-Motif UIL + Táboa de X-Motif UIL + טבלה של X-Motif UIL + X-Motif UIL-táblázat + Tabel X-Motif UIL + Tabella UIL X-Motif + X-Motif UIL 表 + X-Motif UIL кестесі + X-Motif UIL 테이블 + X-Motif UIL lentelė + X-Motif UIL tabula + Jadual X-Motif UIL + X-Motif UIL-tabell + X-Motif UIL-tabel + X-Motif UIL-tabell + Tabela UIL X-Motif + tabela UIL do X-Motif + Tabela do X-Motif UIL + Tabel X-Motif UIL + таблица UIL X-Motif + Tabuľka X-Motif UIL + Preglednica X-Motif UIL + Tabelë X-Motif UIL + X-Motif UIL табела + X-Motif UIL-tabell + таблиця X-Motif UIL + Bảng UIL X-Motif + X-Motif UIL 表 + X-Motif UIL 表格 + + + + + resource location + موقع المورد + pałažeńnie resursu + Местоположение на ресурс + localització de recurs + Umístění zdroje + resurseplacering + Ressourcenort + τοποθεσία πόρου + resource location + loko de risurco + ubicación del recurso + baliabidearen kokalekua + resurssisijainti + tilfeingisstaður + localisation de ressource + suíomh acmhainne + localización do recurso + מיקומו של המקור + erőforrás-hely + lokasi sumber daya + Posizione risorsa + リソースの場所 + ресурс орналасуы + 자원 위치 + resurso vieta + resursa atrašanās vieta + Lokasi sumber + ressurslokasjon + bronlocatie + ressursplassering + Położenie zasobu + localização de recurso + localização de recurso + locație de resursă + расположение ресурса + Umiestnenie zdroja + mesto vira + Pozicion rezerve + путања ресурса + resursplats + розташування ресурсу + địa điểm tài nguyên + 资源位置 + 資源位置 + + + + + XMI file + ملف XMI + Fajł XMI + Файл — XMI + fitxer XMI + Soubor XMI + XMI-fil + XMI-Datei + XMI file + XMI-dosiero + archivo XMI + XMI fitxategia + XMI-tiedosto + XMI fíla + fichier XMI + comhad XMI + ficheiro XMI + קובץ XMI + XMI fájl + Berkas XMI + File XMI + XMI ファイル + XMI файлы + XMI 파일 + XMI failas + XMI fails + XMI-fil + XMI-bestand + XMI-fil + Plik XMI + Arquivo XMI + Fișier XMI + файл XMI + Súbor XMI + Datoteka XMI + File XMI + XMI-fil + файл XMI + Tập tin XMI + XMI 文件 + XMI 檔 + XMI + XML Metadata Interchange + + + + + + + XSL FO file + ملف XSL FO + Fajł XSL FO + Форматиращ файл — XSL FO + fitxer FO XSL + Soubor XSL FO + XML FO-fil + XSL-FO-Datei + XSL FO file + XSL-FO-dosiero + archivo XSL FO + XSL FO fitxategia + XSL FO -tiedosto + XSL FO fíla + fichier XSL FO + comhad XSL FO + ficheiro XSL FO + קובץ XSL FO + XSL FO fájl + Berkas XSL FO + File XSL FO + XSL FO ファイル + XSL FO файлы + XSL 포매팅 개체 파일 + XSL FO failas + XSL FO fails + FO-fil for XSL + XSL FO-bestand + XSL FO-fil + Plik XSL FO + Arquivo XSL FO + Fișier XSL FO + файл XSL FO + Súbor XSL FO + Datoteka XSL FO + File XSL FO + XSL FO-fil + файл XSL FO + Tập tin FO của XSL (XFO) + XSL 格式化对象文件 + XSL FO 檔 + XSL FO + XSL Formatting Objects + + + + + + + iptables configuration file + ملف تضبيط iptables + kanfihuracyjny fajł iptables + Настройки за iptables + fitxer de configuració d'iptables + Soubor nastavení iptables + iptableskonfigurationsfil + iptables-Konfigurationsdatei + archivo de configuración de iptables + iptables konfigurazio-fitxategia + iptables-asetustiedosto + iptables samansetingarfíla + fichier de configuration iptables + comhad cumraíochta iptables + ficheiro de configuración de iptables + קובץ הגדרה של iptables + iptables beállítófájl + berkas konfigurasi iptables + File configurazione iptables + iptables 設定ファイル + iptables баптаулар файлы + iptables 설정 파일 + iptables konfigūracijos failas + iptables konfigurācijas fails + konfigurasjonsfil for iptables + iptables-configuratiebestand + iptables oppsettfil + Plik konfiguracji iptables + arquivo de configuração do iptables + fișier configurare iptables + конфигурационный файл iptables + Súbor nastavení iptables + nastavitvena datoteka iptables + File konfigurimi iptables + iptables-konfigurationsfil + файл налаштувань iptables + tập tin cấu hình iptables + iptables 防火墙配置文件 + iptables 組態檔 + + + + + + + + + + + + + + + + + + + + + + + + + XSLT stylesheet + نمط XSLT + Arkuš stylaŭ XSLT + Стилове — XSLT + full d'estil XSLT + Styl XSLT + XSLT-stilark + XSLT-Stylesheet + φύλλο στυλ XSLT + XSLT stylesheet + XSLT-stilfolio + hoja de estilo XSLT + XSLT estilo-orria + XSLT-tyylitiedosto + XSLT sniðark + feuille de style XSLT + stílbhileog XSLT + folla de estilo XSLT + סגנון גליון XSLT + XSLT-stíluslap + Lembar gaya XSLT + Foglio di stile XSLT + XSLT スタイルシート + XSLT стильдер кестесі + XSLT 스타일시트 + XSLT stiliaus aprašas + XSLT izklājlapa + Helaian Gaya XSLT + XSLT-stilark + XSLT-stijlblad + XSLT-stilark + Arkusz stylów XSLT + folha de estilos XSLT + Folha de estilo XSLT + Fișă de stil XSLT + таблица стилей XSLT + Štýl XSLT + Slogovna predloga XSLT + Fletë stili XSLT + Датотека са XSLT стилом + XSLT-stilmall + таблиця стилів XSLT + Tờ kiểu dáng XSLT + XSLT 样式表 + XSLT 樣式表 + XSLT + eXtensible Stylesheet Language Transformation + + + + + + + + + + + XMCD CD database + قاعدة بيانات XMCD CD + Baza źviestak ab dyskach XMCD + База от данни за CD-та — XMCD + base de dades de CD XMCD + Databáze XMCD CD + XMCD-cd-database + XMCD-CD-Datenbank + base de datos de CD XMCD + XMCD CD datu-basea + XMCD CD -tietokanta + XMCD fløgu dátustovnur + base de données de CD XMCD + bunachar sonraí XMCD CD + base de datos de CD XMCD + בסיס נתונים XMCD CD + XMCD CD-adatbázis + Basis data XMCD CD + Database XMCD CD + XMCD CD データベース + XMCD CD дерекқоры + XMCD CD 데이터베이스 + XMCD CD duomenų bazė + XMCD CD datubāze + XMCD CD-database + XMCD CD-gegevensbank + XMCD CD-database + Baza danych CD XMCD + Banco de dados de CD XMCD + Bază de date XMCD CD + база данных компакт-дисков XMCD + Databáza XMCD CD + Podatkovna zbirka XMCD CD + Bazë me të dhëna XMCD CD + XMCD cd-databas + база даних XMCD CD + Cơ sở dữ liệu CD XMCD + XMCD CD 数据库 + XMCD CD 資料庫 + + + + + + + XML document + مستند XML + Dakument XML + Документ — XML + document XML + Dokument XML + XML-dokument + XML-Dokument + XML document + XML-dokumento + documento XML + XML dokumentua + XML-asiakirja + XML skjal + document XML + cáipéis XML + documento XML + מסמך XML + XML dokumentum + Dokumen XML + Documento XML + XML ドキュメント + XML құжаты + XML 문서 + XML dokumentas + XML dokuments + XML-dokument + XML-document + XML-dokument + Dokument XML + Documento XML + Document XML + документ XML + Dokument XML + Dokument XML + Dokument XML + XML-dokument + документ XML + Tài liệu XML + XML 文档 + XML 文件 + XML + eXtensible Markup Language + + + + + + + + + + + + + + XML entities document + مستند كيانات XML + Dakument elementaŭ XML + Документ — заместващи последователности в XML + document d'entitats XML + Dokument entit XML + XML-enhedsdokument + XML-Dokument-Entitäten + documento de entidades XML + XML entitateen dokumentua + XML-entiteettiasiakirja + XML einindisskjal + document d'entités XML + cáipéis aonán XML + documento de entidades XML + מסמך ישיות XML + XML egyeddokumentum + Dokumen entitas XML + Documento entità XML + XML エントリドキュメント + XML мәндер құжаты + XML 엔티티 문서 + XML esybių dokumentas + XML vienību dokuments + XML-entitetsdokument + XML entiteiten-document + XML-entitet-dokument + Dokument jednostek XML + Documento de entidades XML + Document entități XML + файл сущностей XML + Dokument entít XML + Dokument XML določil + Dokument njësish XML + XML-entitetsdokument + документ об’єктів XML + Tài liệu thực thể XML + XML 特征文档 + XML 實體文件 + XML + eXtensible Markup Language + + + + + + + DV video + DV مرئي + Videa DV + Видео — DV + vídeo DV + Video DV + DV-video + DV-Video + DV video + DV-video + vídeo DV + DV bideoa + DV-video + DV video + vidéo DV + físeán DV + vídeo DV + וידאו DV + DV videó + Video DV + Video DV + DV 動画 + DV видеосы + DV 비디오 + DV vaizdo įrašas + DV video + DV-film + DV-video + DV-video + Plik wideo DV + Vídeo DV + Video DV + видео DV + Video DV + Video datoteka DV + Video DV + DV-video + відеокліп DV + Ảnh động DV + DV 视频 + DV 視訊 + DV + Digital Video + + + + + + + ISI video + مرئي ISI + ISI video faylı + Videa ISI + Видео — ISI + vídeo ISI + Video ISI + Fideo ISI + ISI-video + ISI-Video + βίντεο ISI + ISI video + ISI-video + vídeo ISI + ISI bideoa + ISI-video + ISI video + vidéo ISI + físeán ISI + vídeo ISI + וידאו ISI + ISI-videó + Video ISI + Video ISI + ISI 動画 + ISI видеосы + ISI 비디오 + ISI vaizdo įrašas + ISI video + Video ISI + ISI-film + ISI-video + ISI video + Plik wideo ISI + vídeoISI + Vídeo ISI + Video ISI + видео ISI + Video ISI + Video datoteka ISI + Video ISI + ISI видео + ISI-video + відеокліп ISI + Ảnh động ISI + ISI 视频 + ISI 視訊 + + + MPEG-2 transport stream + بث نقل MPEG-2 + Поток — транспорт по MPEG-2 + flux de transport MPEG-2 + Přenosový proud MPEG-2 + MPEG-2-transportstrøm + MPEG-2-Transportstrom + flujo de transporte MPEG-2 + MPEG-2 -siirtobittivirta + MPEG-2 flutningsstreymur + flux de transport MPEG-2 + Sruth aistrithe MPEG-2 + fluxo de transporte MPEG-2 + העברת זרימה של MPEG-2 + MPEG-2 átviteli adatfolyam + Stream transport MPEG-2 + Stream di trasporto MPEG-2 + MPEG-2 トランスポートストリーム + MPEG-2 көліктік ағыны + MPEG-2 전송 스트림 + MPEG-2 transportavimo srautas + MPEG-2 transporta straume + Strumień przesyłania MPEG-2 + Flux transport MPEG-2 + транспортный поток MPEG-2 + Pretočni vir prenosega MPEG + MPEG-2 transportström + потік передавання даних MPEG-2 + MPEG-2 传输流 + MPEG-2 傳輸串流 + MPEG-2 TS + Moving Picture Experts Group 2 Transport Stream + + + + + + + + + + + + + + + + MPEG video + MPEG مرئي + Videa MPEG + Видео — MPEG + vídeo MPEG + Video MPEG + MPEG-video + MPEG-Video + βίντεο MPEG + MPEG video + MPEG-video + vídeo MPEG + MPEG bideoa + MPEG-video + MPEG video + vidéo MPEG + físeán MPEG + vídeo MPEG + וידאו MPEG + MPEG-videó + Video MPEG + Video MPEG + MPEG 動画 + MPEG видеосы + MPEG 비디오 + MPEG vaizdo įrašas + MPEG video + Video MPEG + MPEG-film + MPEG-video + MPEG-video + Plik wideo MPEG + vídeo MPEG + Vídeo MPEG + Video MPEG + видео MPEG + Video MPEG + Video datoteka MPEG + Video MPEG + MPEG видео + MPEG-video + відеокліп MPEG + Ảnh động MPEG + MPEG 视频 + MPEG 視訊 + MPEG + Moving Picture Experts Group + + + + + + + + + + + + + + + + MPEG video (streamed) + Видео — MPEG, поточно + vídeo MPEG (flux) + Video MPEG (proud) + MPEG-Video (Datenstrom) + Vídeo MPEG (flujo) + MPEG-video (virtaus) + vidéo MPEG (flux) + vídeo MPEG (en stream) + קובץ MPEG (בהזרמה) + MPEG videó (szórt) + Video MPEG (di-stream-kan) + Video MPEG (streamed) + MPEG ビデオ(ストリーム) + MPEG видео (ағымдық) + MPEG 비디오 (스트리밍) + MPEG video (straumēts) + Plik wideo MPEG (strumień) + видео MPEG (потоковое) + MPEG-video (pretočni) + MPEG-video (strömmad) + відеокліп MPEG (потоковий) + MPEG 視訊 (串流) + + + + + + + + + + + QuickTime video + QuickTime مرئي + Videa QuickTime + Видео — QuickTime + vídeo QuickTime + Video QuickTime + QuickTime-video + QuickTime-Video + βίντεο QuickTime + QuickTime-video + vídeo QuickTime + QuickTime bideoa + QuickTime-video + QuickTime video + vidéo QuickTime + físeán QuickTime + vídeo QuickTime + וידאו של QuickTime + QuickTime videó + Video QuickTime + Video QuickTime + QuickTime 動画 + QuickTime видеосы + 퀵타임 비디오 + QuickTime vaizdo įrašas + QuickTime video + Video QuickTime + Quicktime film + QuickTime-video + QuickTime-video + Plik wideo QuickTime + vídeo QuickTime + Vídeo do QuickTime + Video QuickTime + видео QuickTime + Video QuickTime + Video datoteka QuickTime + Video QuickTime + QuickTime видео + QuickTime-video + відеокліп QuickTime + Ảnh động QuickTime + QuickTime 视频 + QuickTime 視訊 + + + + + + + + + + + + + QuickTime image + صورة QuickTime + Vyjava QuickTime + Изображение — QuickTime + imatge QuickTime + Obrázek QuickTime + QuickTime-billede + QuickTime-Bild + QuickTime-bildo + imagen QuickTime + QuickTime irudia + QuickTime-kuva + QuickTime mynd + image QuickTime + íomhá QuickTime + imaxe QuickTime + תמונה של QuickTime + QuickTime kép + Citra QuickTime + Immagine QuickTime + QuickTime 画像 + QuickTime суреті + 퀵타임 그림 + QuickTime paveikslėlis + QuickTime attēls + Quicktime bilde + QuickTime-afbeelding + QuickTime-bilete + Obraz QuickTime + Imagem do QuickTime + Imagine QuickTime + изображение QuickTime + Obrázok QuickTime + Slikovna datoteka QuickTime + Figurë QuickTime + QuickTime-bild + зображення QuickTime + Ảnh QuickTime + QuickTime 图像 + QuickTime 影像 + + + + + + + + Vivo video + Vivo مرئي + Vivo video faylı + Videa Vivo + Видео — Vivo + vídeo Vivo + Video Vivo + Fideo Vivo + Vivo-video + Vivo-Video + βίντεο Vivo + Vivo video + Vivo-video + vídeo Vivo + Vivo bideoa + Vivo-video + Vivo video + vidéo Vivo + físeán Vivo + vídeo Vivo + וידאו של Vivo + Vivo-videó + Video Vivo + Video Vivo + Vivo 動画 + Vivo видеосы + Vivo 비디오 + Vivo vaizdo įrašas + Vivo video + Video Vivo + Vivo-film + Vivo-video + Vivo-film + Plik wideo Vivo + vídeo Vivo + Vídeo Vivo + Video Vivo + видео Vivo + Video Vivo + Video datoteka Vivo + Video Vivo + Vivo видео + Vivo-video + відео Vivo + Ảnh động Vivo + Vivo 视频 + Vivo 視訊 + + + + + + Wavelet video + Wavelet مرئي + Wavelet video faylı + Videa Wavelet + Видео — Wavelet + vídeo Wavelet + Video Wavelet + Fideo Wavelet + Waveletvideo + Wavelet-Video + βίντεο Wavelet + Wavelet video + Wavelet-video + vídeo Wavelet + Wavelet bideoa + Wavelet-video + Wavelet video + vidéo Wavelet + físeán Wavelet + vídeo Wavelet + וידאו של Wavelet + Wavelet-videó + Video Wavelet + Video Wavelet + Wavelet 動画 + Wavelet видеосы + Wavelet 비디오 + Wavelet vaizdo įrašas + Wavelet video + Video Wavelet + Wavelet-film + Wavelet-video + Wavelet video + Plik wideo Wavelet + vídeo Wavelet + Vídeo Wavelet + Video Wavelet + видео Wavelet + Video Wavelet + Video datoteka Wavelet + Video Wavelet + Wavelet видео + Wavelet-video + відеокліп Wavelet + Ảnh động Wavelet + Wavelet 视频 + Wavelet 視訊 + + + ANIM animation + تحريكة ANIM + ANIM animasiyası + Animacyja ANIM + Анимация — ANIM + animació ANIM + Animace ANIM + Animeiddiad ANIM + ANIM-animation + ANIM-Animation + κινούμενο σχέδιο ANIM + ANIM animation + ANIM-animacio + animación ANIM + ANIM animazioa + ANIM-animaatio + ANIM teknmyndagerð + animation ANIM + beochan ANIM + animación ANIM + הנפשת ANIM + ANIM-animáció + Animasi ANIM + Animazione ANIM + ANIM アニメーション + ANIM анимациясы + ANIM 동화상 + ANIM animacija + ANIM animācija + Animasi ANIM + ANIM-animasjon + ANIM-animatie + ANIM-animasjon + Plik animacji ANIM + animação ANIM + Animação ANIM + Animație ANIM + анимация ANIM + Animácia ANIM + Datoteka animacije ANIM + Animim ANIM + ANIM анимација + ANIM-animering + анімація ANIM + Hoạt ảnh ANIM + ANIM 动画 + ANIM 動畫 + + + + FLIC animation + تحريكة FLIC + Animacyja FLIC + Анимация — FLIC + animació FLIC + Animace FLIC + FLIC-animation + FLIC-Animation + FLIC animation + animación FLIC + FLIC animazioa + FLIC-animaatio + FLIC teknimyndagerð + animation FLIC + beochan FLIC + animación FLIC + הנפשת FLIC + FLIC animáció + Animasi FLIC + Animazione FLIC + FLIC アニメーション + FLIC анимациясы + FLIC 동화상 + FLIC animacija + FLIC animācija + FLIC-animasjon + FLIC-animatie + FLIC-animasjon + Plik animacji FLIC + Animação FLIC + Animație FLIC + анимация FLIC + Animácia FLIC + Datoteka animacije FLIC + Animim FLIC + FLIC-animering + анімація FLIC + Hoạt ảnh FLIC + FLIC 动画 + FLIC 動畫 + + + + + + + + + + + Haansoft Hangul document + مستند Haansoft Hangul + Dakument Haansoft Hangul + Документ — Haansoft Hangul + document Haansoft Hangul + Dokument Haansoft Hangul + Haansoft Hangul-dokument + Haansoft-Hangul-Dokument + documento de Haansoft Hangul + Haansoft Hangul dokumentua + Haansoft Hangul -asiakirja + Haansoft Hangul skjal + document Haansoft Hangul + cáipéis Haansoft Hangul + documento de Haansoft Hangul + מסמך Haansoft Hangul + Haansoft hangul dokumentum + Dokumen Haansoft Hangul + Documento Haansoft Hangul + Haansoft Hangul ドキュメント + Haansoft Hangul құжаты + 한소프트 한글 문서 + Haansoft Hangul dokumentas + Haansoft Hangul dokuments + Haansoft Hangul-dokument + Haansoft Hangul-document + Haansoft Hangul-dokument + Dokument Haansoft Hangul + Documento do Haansoft Hangul + Document Haansoft Hangul + документ Haansoft Hangul + Dokument Haansoft Hangul + Dokument Haansoft Hangul + Dokument Haansoft Hangul + Haansoft Hangul-dokument + документ Haansoft Hangul + Tài liệu Hangul Haansoft + Haansoft Hangul 文档 + Haansoft 韓文文件 + + + + + + + + + Haansoft Hangul document template + قالب مستند Haansoft Hangul + Šablon dakumentu Haansoft Hangul + Шаблон за документи — Haansoft Hangul + plantilla de document Haansoft Hangul + Šablona dokumentu Haansoft Hangul + Haansoft Hangul-dokumentskabelon + Haansoft-Hangul-Dokumentvorlage + plantilla de documento de Haansoft Hangul + Haansoft Hangul dokumentuaren txantiloia + Haansoft Hangul -asiakirjamalli + Haansoft Hangul skjalaformur + modèle de document Haansoft Hangul + teimpléad cháipéis Haansoft Hangul + modelo de documento de Haansoft Hangul + תבנית מסמך של Haansoft Hangul + Haansoft hangul dokumentumsablon + Templat dokumen Haansoft Hangul + Modello documento Haansoft Hangul + Haansoft Hangul ドキュメントテンプレート + Haansoft Hangul құжат үлгісі + 한소프트 한글 문서 서식 + Haansoft Hangul dokumento šablonas + Haansoft Hangul dokumentu veidne + Haansoft Hangul-dokumentmal + Haansoft Hangul-documentsjabloon + Haansoft Hangul-dokumentmal + Szablon dokumentu Haansoft Hangul + Modelo de documento do Haansoft Hangul + Document șablon Haansoft Hangul + шаблон документа Haansoft Hangul + Šablóna dokumentu Haansoft Hangul + Predloga dokumenta Haansoft Hangul + Model dokumenti Haansoft Hangul + Haansoft Hangul-dokumentmall + шаблон документа Haansoft Hangul + Mẫu tài liệu Hangul Haansoft + Haansoft Hangul 文档模板 + Haansoft 韓文文件範本 + + + + + + MNG animation + تحريكة MNG + Animacyja MNG + Анимация — MNG + animació MNG + Animace MNG + MNG-animation + MNG-Animation + κινούμενα σχέδια MNG + MNG animation + MNG-animacio + animación MNG + MNG animazioa + MNG-animaatio + MNG teknimyndagerð + animation MNG + beochan MNG + animación MNG + הנפשת MNG + MNG-animáció + Animasi MNG + Animazione MNG + MNG アニメーション + MNG анимациясы + MNG 동화상 + MNG animacija + MNG animācija + Animasi MNG + MNG-animasjon + MNG-animatie + MNG-animasjon + Animacja MNG + animação MNG + Animação MNG + Animație MNG + анимация MNG + Animácia MNG + Datoteka animacije MNG + Animim MNG + MNG анимација + MNG-animering + анімація MNG + Hoạt ảnh MNG + MNG 动画 + MNG 動畫 + MNG + Multiple-Image Network Graphics + + + + ASF video + ASF مرئي + Videa ASF + Видео — ASF + vídeo ASF + Video ASF + ASF-video + ASF-Video + ASF video + ASF-video + vídeo ASF + ASF bideoa + ASF-video + ASF video + vidéo ASF + físeán ASF + vídeo ASF + וידאו ASF + ASF videó + Video ASF + Video ASF + ASF 動画 + ASF видеосы + ASF 비디오 + ASF vaizdo įrašas + ASF video + ASF-film + ASF-video + ASF-video + Plik wideo ASF + Vídeo ASF + Video ASF + видео ASF + Video ASF + Video datoteka ASF + Video ASF + ASF-video + відеокліп ASF + Ảnh động ASF + ASF 视频 + ASF 視訊 + ASF + Advanced Streaming Format + + + + + + + + + + Windows Media Station file + ملف محطة Windows Media + Fajł Windows Media Station + Файл — Windows Media Station + fitxer Windows Media Station + Soubor Windows Media Station + Windows Media Station-fil + Windows-Media-Streamingbeschreibung + archivo de emisora de Windows Media + Windows Media Station fitxategia + Windows Media Station-tiedosto + Windows Media Station fíla + fichier Windows Media Station + comhad Windows Media Station + ficheiro de emisora de Windows Media + קובץ תחנה של Windows Media + Windows Media Station fájl + Berkas Windows Media Station + File Windows Media Station + Windows Media Station ファイル + Windows Media Station файлы + 윈도우 미디어 방송국 파일 + Windows Media Station failas + Windows Media Station fails + Windows Media Station-fil + Windows Media Station-bestand + Windows Media Station-fil + Plik Windows Media Station + Arquivo de estação de mídia do Windows + Fișier Windows Media Station + файл Windows Media Station + Súbor Windows Media Station + Datoteka Windows Media Station + File Windows Media Station + Windows Media Station-fil + файл Windows Media Station + Tập tin Windows Media Station + Windows 媒体工作站文件 + Windows Media Station 檔 + + + + + + + + + Windows Media video + Windows Media مرئي + Videa Windows Media + Видео — Windows Media + vídeo Windows Media + Video Windows Media + Windows Medie-video + Windows-Media-Video + vídeo de Windows Media + Windows Media bideoa + Windows Media -video + Windows Media video + vidéo Windows Media + físeán Windows Media + vídeo de Windows Media + וידאו של Windows Media + Windows Media videó + Video Windows Media + Video Windows Media + Windows Media 動画 + Windows Media видеосы + 윈도우 미디어 비디오 + Windows Media vaizdo įrašas + Windows Media video + Windows Media film + Windows Media-video + Windows Media-video + Plik wideo Windows Media + Vídeo do Windows Media + Video Windows Media + видео Windows Media + Video Windows Media + Video datoteka Windows Media + Video Windows Media + Windows Media-video + відеокліп Windows Media + Ảnh động Windows Media + Windows Media 视频 + Windows Media 視訊 + + + + + AVI video + AVI مرئي + AVI video faylı + Videa AVI + Видео — AVI + vídeo AVI + Video AVI + Fideo AVI + AVI-video + AVI-Video + βίντεο AVI + AVI video + AVI-video + vídeo AVI + AVI bideoa + AVI-video + AVI video + vidéo AVI + físeán AVI + vídeo AVI + וידאו AVI + AVI-videó + Video AVI + Video AVI + AVI 動画 + AVI видеосы + AVI 비디오 + AVI vaizdo įrašas + AVI video + Video AVI + AVI-film + AVI-video + AVI-video + Plik wideo AVI + vídeo AVI + Vídeo AVI + Video AVI + видео AVI + Video AVI + Video datoteka AVI + Video AVI + AVI видео + AVI-video + відеокліп AVI + Ảnh động AVI + AVI 视频 + AVI 視訊 + AVI + Audio Video Interleave + + + + + + + + + + + + + + + NullSoft video + NullSoft مرئي + Videa NullSoft + Видео — NullSoft + vídeo NullSoft + Video NullSoft + NullSoft-video + NullSoft-Video + NullSoft-video + vídeo NullSoft + NullSoft bideoa + NullSoft-video + NullSoft video + vidéo NullSoft + físeán NullSoft + vídeo de NullSoft + וידאו של NullSot + NullSoft videó + Video NullSoft + Video NullSoft + NullSoft 動画 + NullSoft видеосы + 널소프트 비디오 + NullSoft vaizdo įrašas + NullSoft video + Nullsoft-film + NullSoft-video + NullSoft-video + Plik wideo NullSoft + Vídeo do Nullsoft + Video NullSoft + видео Nullsoft + Video NullSoft + Video datoteka NullSoft + Video NullSoft + NullSoft-video + відеокліп NullSoft + Ảnh động NullSoft + Nullsoft 视频 + NullSoft 視訊 + + + + + + + SDP multicast stream file + ملف دفق متعدد البث SDP + Šmatadrasny płynievy fajł SDP + Файл за поток — SDP multicast + fitxer de flux de multidifusió SDP + Soubor vícesměrového vysílání proudu SDP + SDP multicast-strømfil + SDP-Multicast-Datenstromdatei + archivo de flujo multicast SDP + SDP multicast korrontearen fitxategia + SDP-monilähetysvirran tiedosto + SDP margvarpað streymafíla + fichier de flux multidiffusion SDP + comhad shruth ilchraolacháin SDP + ficheiro de fluxo multicast SDP + קובץ שידור בזרימה SDP + SDP multicast műsorfájl + Berkas SDP multicast stream + File stream multicast SDP + SDP マルチキャストストリームファイル + SDP мультикаст ағым файлы + SDP 멀티캐스트 스트림 파일 + SDP daugiaadresio srauto failas + SDP multiraides straumes fails + SDP-multicaststrøm + SDP-multicast-streambestand + SDP multicast straumfil + Plik strumienia multicast SDP + Arquivo de canal multicast SDP + Fișier flux multicast SDP + файл мультикаст-потока SDP + Súbor viacsmerového vysielania prúdu SDP + Pretočni vir večsmernega oddajanja + File stream multicast SDP + SDP multicast stream-fil + файл потокової трансляції SDP + Tập tin luồng truyền một-nhiều SDP + SDP 多播流文件 + SDP + Session Description Protocol + + + + + + + + + + + + SGI video + SGI مرئي + SGI video faylı + Videa SGI + Видео — SGI + vídeo SGI + Video SGI + Video SGI + SGI-video + SGI-Video + βίντεο SGI + SGI video + SGI-video + vídeo SGI + SGI bideoa + SGI-video + SGI video + vidéo SGI + físeán SGI + vídeo SGI + וידאו SGI + SGI-videó + Video SGI + Video SGI + SGI 動画 + SGI видеосы + SGI 비디오 + SGI vaizdo įrašas + SGI video + Video SGI + SGI-film + SGI-video + SGI-video + Plik wideo SGI + vídeo SGI + Vídeo SGI + Video SGI + видео SGI + Video SGI + Video datoteka SGI + Video SGI + SGI видео + SGI-video + відеокліп SGI + Ảnh động SGI + SGI 视频 + SGI 視訊 + + + + + + + eMusic download package + حزمة تنزيل eMusic + pakunak zahruzki eMusic + Пакет за сваляне — eMusic + paquet de descàrrega eMusic + Balíček stahování eMusic + eMusic-hentpakke + eMusic-Download-Paket + paquete de descarga eMusic + eMusic deskargaren paketea + eMusic-imurointipaketti + eMusic niðurtøkupakki + paquet de téléchargement eMusic + pacáiste íosluchtú eMusic + paquete de descarga de eMusic + חבילת הורדה של eMusic + eMusic letöltési csomag + paket unduh eMusic + Pacchetto scaricamento eMusic + eMusic ダウンロードパッケージ + eMusic жүктемелер дестесі + eMusic 다운로드 패키지 + eMusic atsiuntimo paketas + eMusic lejupielādes paciņa + eMusic nedlastingspakke + eMusic-downloadpakket + eMusic nedlastingspakke + Pobieralny pakiet eMusic + Pacote de download do eMusic + pachet descărcare eMusic + пакет загрузок eMusic + Balíček sťahovania eMusic + Datoteka paketa eMusic + Paketë shkarkimi eMusic + eMusic-hämtningspaket + пакунок завантаження eMusic + gói nhạc tải xuống eMusic + eMusic 下载包 + eMusic 下載套件 + + + + + + + + KML geographic data + بيانات جغرافية KML + Географски данни — KML + dades geogràfiques KML + Geografická data KML + Geografiske data i KML-format + KML geographische Daten + datos geográficos KML + KML datu geografikoak + KML landafrøðilig dáta + données géographiques KML + sonraí geografacha KML + datos xeográficos KML + מידע גאוגרפי KML + KML földrajzi adatok + Data geografis KML + Dati geografici KML + KML 地理データ + KML географилық ақпараты + KML 지리 정보 데이터 + KML geografiniai duomenys + KML ģeogrāfiskie dati + Dane geograficzne KML + Date geografice KML + географические данные KML + Zemepisné údaje KML + Datoteka geografskih podatkov KML + KML geografisk data + географічні дані KML + KML 地理数据 + KML 地理資料 + KML + Keyhole Markup Language + + + + + + KML geographic compressed data + بيانات جغرافية مضغوطة KML + Географски данни — KML, компресирани + dades geogràfiques comprimides KML + Komprimovaná geografická data KML + KML-geografiske komprimerede data + KML geographische komprimierte Daten + datos geográficos comprimidos KML + KML datu geografiko konprimituak + KML landafrøðilig stappað dáta + données géographiques KML compressées + sonraí comhbhrúite geografacha KML + datos xeográficos KML comprimidos + מידע גאוגרפי דחוס KML + KML tömörített földrajzi adatok + Data geografis KML terkompresi + Dati geografici KML compressi + KML 地理圧縮データ + KML географиялық сығылған ақпарат + KML 지리 정보 압축 데이터 + KML geografiniai suglaudinti duomenys + KML saspiesti ģeogrāfiskie dati + Skompresowane dane geograficzne KML + Date geografice comprimate KML + сжатые географические данные KML + Komprimované zemepisné údaje KML + Skrčeni geografski podatki KML + KML geografiskt komprimerat data + стиснуті географічні дані KML + KML 压缩地理数据 + KML 地理壓縮資料 + KML + Keyhole Markup Language + + + + + Citrix ICA settings file + ملف إعدادات Citrix ICA + Fajł naładaŭ Citrix ICA + Настройки — Citrix ICA + fitxer de paràmetres de Citrix ICA + Soubor nastavení Citrix ICA + Citrix ICA-opsætningsfil + Citrix-ICA-Einstellungsdatei + archivo de opciones de Citrix ICA + Citrix ICA ezarpenen fitxategia + Citrix ICA -asetustiedosto + Citrix ICA stillingarfíla + fichier de paramètres ICA Citrix + comhad socruithe Citrix ICA + ficheiro de configuracións de Citrix ICA + קובץ הגדרות של Citrix ICA + Citrix ICA beállításfájl + Berkas penataan Citrix ICA + File impostazioni Citrix ICA + Citrix ICA 設定ファイル + Citrix ICA баптаулар файлы + 시트릭스 ICA 설정 파일 + Citrix ICA parametrų failas + Citrix ICA iestatījumu fails + Innstillingsfil for Citrix ICA + Citrix ICA-instellingen + Citrix ICA-innstillingsfil + Plik ustawień Citrix ICA + Arquivo de configurações do Citrix ICA + Fișier de configurări Citrix ICA + файл настроек Citrix ICA + Súbor nastavení Citrix ICA + Nastavitvena datoteka Citrix ICA + File rregullimesh Citrix ICA + Citrix ICA-inställningsfil + файл параметрів ICA Citrix + Tập tin thiết lập ICA Citrix + Citrix ICA 设置文件 + Citrix ICA 設定值檔案 + ICA + Independent Computing Architecture + + + + + + XUL interface document + مستند واجهة XUL + Interfejsny dakument XUL + Документ — интерфейс за XUL + document d'interfície XUL + Dokument rozhraní XUL + XUL-grænsefladedokument + XUL-Oberflächendokument + documento de interfaz XUL + XUL interfazearen dokumentua + XUL-käyttöliittymäasiakirja + XUL markamótsskjal + document d'interface XUL + cáipéis chomhéadan XUL + documento de interface XUL + מסמך ממשק XUL + XUL-felületdokumentum + Dokumen antarmuka XUL + Documento interfaccia XUL + XUL インターフェイスドキュメント + XUL интерфейс құжаты + XUL 인터페이스 문서 + XUL sąsajos dokumentas + XUL saskarnes dokuments + XUL-grensesnittdokument + XUL-interface-document + XUL-grensesnitt-dokument + Dokument interfejsu XUL + Documento de interface XUL + Document interfață XUL + документ интерфейса XUL + Dokument rozhrania XUL + Dokument vmesnika XUL + Dokument interfaqe XUL + XUL-gränssnittsdokument + документ інтерфейсу XUL + Tài liệu giao diện XUL + XUL 界面文档 + XUL 介面文件 + XUL + XML User interface markup Language + + + + + + + XPInstall installer module + وحدة مثبت XPInstall + Пакет — инсталация XPInstall + mòdul instal·lador d'XPinstall + Modul instalátoru XPInstall + XPInstall-installationsmodul + XPInstall-Installermodul + módulo del instalador XPInstall + XPInstall instalatzailearen modulua + XPInstall-asennuspaketti + XPInstall innleggjaramótul + module d'installation XPInstall + modúl suiteála XPInstall + Módulo do instalador XPInstall + מודול התקנה של XPInstall + XPInstall telepítőmodul + Modul installer XPInstall + Modulo installatore XPInstall + XPInstall インストーラモジュール + XPInstall орнату модулі + XPInstall 설치 프로그램 모듈 + XPInstall įdiegiklio modulis + XPInstall instalatora modulis + Moduł instalatora XPInstall + Modul de instalare XPInstall + модуль установщика XPInstall + Modul inštalátora XPInstall + modul namestilnika XPInstall + XPInstall-installeringsmodul + модуль засобу встановлення XPInstall + XPInstall 安装工具模块 + XPInstall 安裝程式模組 + + + + + Word 2007 document + مستند Word 2007 + Документ — Word 2007 + document de Word 2007 + Dokument Word 2007 + Word 2007-dokument + Word-2007-Dokument + documento de Word 2007 + Word 2007 dokumentua + Word 2007 -asiakirja + Word 2007 skjal + document Word 2007 + cáipéis Word 2007 + documento de Word 2007 + מסמך Word 2007 + Word 2007 dokumentum + Dokumen Word 2007 + Documento Word 2007 + Word 2007 ドキュメント + Word 2007 құжаты + 워드 2007 문서 + Word 2007 dokumentas + Word 2007 dokuments + Word 2007-document + Dokument Word 2007 + Documento do Word 2007 + Document Word 2007 + документ Word 2007 + Dokument Word 2007 + Dokument Word 2007 + Word 2007-dokument + документ Word 2007 + Tài liệu Word 2007 + Microsoft Word 2007 文档 + Word 2007 文件 + + + + + + Word 2007 document template + Шаблон за документи — Word 2007 + plantilla de document de Word 2007 + Šablona dokumentu Word 2007 + Word 2007-Dokumentvorlage + Plantilla de documento de Word 2007 + Word 2007 -asiakirjamalli + modèle de document Word 2007 + Plantilla de documento de Word 2007 + תבנית מסמך של Word 2007 + Word 2007 dokumentumsablon + Templat dokumen Word 2007 + Modello documento Word 2007 + Word 2007 文書テンプレート + Word 2007 құжатының үлгісі + 워드 2007 문서 서식 + Word 2007 dokumenta veidne + Szablon dokumentu Word 2007 + шаблон документа Word 2007 + Predloga dokumenta Word 2007 + Word 2007-dokumentmall + шаблон документа Word 2007 + Word 2007 文件範本 + + + + + + PowerPoint 2007 presentation + عرض تقديمي PowerPoint 2007 + Презентация — PowerPoint 2007 + presentació de PowerPoint 2007 + Prezentace PowerPoint 2007 + PowerPoint 2007-præsentation + PowerPoint-2007-Präsentation + presentación de PowerPoint 2007 + PowerPoint 2007 aurkezpena + PowerPoint 2007 -esitys + PowerPoint 2007 framløga + présentation PowerPoint 2007 + láithreoireacht PowerPoint 2007 + presentación de PowerPoint 2007 + מצגת של PowerPoint 2007 + PowerPoint 2007 prezentáció + Presentasi PowerPoint 2007 + Presentazione standard PowerPoint 2007 + PowerPoint 2007 プレゼンテーション + PowerPoint 2007 презентациясы + 파워포인트 2007 프리젠테이션 + PowerPoint 2007 pateiktis + PowerPoint 2007 prezentācija + PowerPoint 2007-presentatie + Prezentacja PowerPoint 2007 + Apresentação do PowerPoint 2007 + Prezentare PowerPoint 2007 + презентация PowerPoint 2007 + Prezentácia PowerPoint 2007 + Predstavitev Microsoft PowerPoint 2007 + PowerPoint 2007-presentation + презентація PowerPoint 2007 + Trình diễn PowerPoint 2007 + Microsoft PowerPoint 2007 演示文稿 + PowerPoint 2007 簡報 + + + + + + PowerPoint 2007 slide + Кадър — PoerPoint 2007 + dispositiva de PowerPoint 2007 + Snímek PowerPoint 2007 + PowerPoint 2007-Folie + Diapositiva de PowerPoint 2007 + diapositive PowerPoint 2007 + Diaporama de PowerPoint 2007 + שקופית של PowerPoint 2007 + PowerPoint 2007 dia + Slide PowerPoint 2007 + Diapositiva PowerPoint 2007 + PowerPoint 2007 スライド + PowerPoint 2007 слайды + 파워포인트 2007 슬라이드 + PowerPoint 2007 slaids + Slajd PowerPoint 2007 + слайд PowerPoint 2007 + Prosojnica PowerPoint 2007 + слайд PowerPoint 2007 + PowerPoint 2007 文稿 + PowerPoint 2007 投影片 + + + + + + PowerPoint 2007 show + عرض PowerPoint 2007 + Презентация-шоу — PowerPoint 2007 + exposició de PowerPoint 2007 + Prezentace PowerPoint 2007 + PowerPoint 2007-dias + PowerPoint-2007-Präsentation + exposición de PowerPoint 2007 + PowerPoint 2007 ikuskizuna + PowerPoint 2007 -diaesitys + PowerPoint 2007 framsýning + diaporama PowerPoint 2007 + taispeántas PowerPoint 2007 + Exposición de PowerPoint 2007 + תצוגה של PowerPoint 2007 + PowerPoint 2007 bemutató + Presentasi PowerPoint 2007 + Solo presentazione PowerPoint 2007 + PowerPoint 2007 プレゼンテーション + PowerPoint 2007 көрсетілімі + 파워포인트 2007 쇼 + PowerPoint 2007 pateiktis + PowerPoint 2007 slīdrāde + Pokaz PowerPoint 2007 + Prezentare PowerPoint 2007 + презентация PowerPoint 2007 + Ukážka PowerPoint 2007 + Zagonska predstavitev PowerPoint 2007 + PowerPoint 2007-visning + показ слайдів PowerPoint 2007 + Microsoft PowerPoint 2007 演示文稿 + PowerPoint 2007 展示 + + + + + + PowerPoint 2007 presentation template + Шаблон за презентации — PowerPoint 2007 + plantilla de presentació de PowerPoint 2007 + Šablona prezentace PowerPoint 2007 + PowerPoint 2007-Präsentationsvorlage + Plantilla de presentación de PowerPoint 2007 + PowerPoint 2007 -esitysmalli + modèle de présentation PowerPoint 2007 + modelo de presentación de PowerPoint 2007 + תבנית למצגת של PowerPoint 2007 + PowerPoint 2007 bemutatósablon + Templat presentasi PowerPoint 2007 + Modello presentazione PowerPoint 2007 + PowerPoint 2007 プレゼンテーションテンプレート + PowerPoint 2007 презентация шаблоны + 파워포인트 2007 프리젠테이션 서식 + PowerPoint 2007 prezentācijas veidne + Szablon prezentacji PowerPoint 2007 + шаблон презентации PowerPoint 2007 + Predloga predstavitve PowerPoint 2007 + PowerPoint 2007-presentationsmall + шаблон презентації PowerPoint 2007 + PowerPoint 2007 簡報範本 + + + + + + Excel 2007 spreadsheet + جدول Excel 2007 + Таблица — Excel 2007 + full de càlcul d'Excel 2007 + Sešit Excel 2007 + Excel 2007-regneark + Excel-2007-Tabelle + hoja de cálculo de Excel 2007 + Excel 2007 kalkulu-orria + Excel 2007 -taulukko + Excel 2007 rokniark + feuille de calcul Excel 2007 + scarbhileog Excel 2007 + folla de cálculo de Excel 2007 + גליון נתונים של אקסל 2007 + Excel 2007 táblázat + Lembar sebar Excel 2007 + Foglio di calcolo Excel 2007 + Excel 2007 スプレッドシート + Excel 2007 электрондық кестесі + 엑셀 2007 스프레드시트 + Excel 2007 skaičialentė + Excel 2007 izklājlapa + Excel 2007-rekenblad + Arkusz Excel 2007 + Planilha do Excel 2007 + Foaie de calcul Excel 2007 + электронная таблица Excel 2007 + Zošit Excel 2007 + Razpredelnica Microsoft Excel 2007 + Excel 2007-kalkylblad + ел. таблиця Excel 2007 + Bảng tính Excel 2007 + Microsoft Excel 2007 工作簿 + Excel 2007 試算表 + + + + + + Excel 2007 spreadsheet template + Шаблон за таблици — Excel 2007 + plantilla de full de càlcul d'Excel 2007 + Šablona sešitu Excel 2007 + Excel 2007-Datenblattvorlage + Plantilla de hoja de cálculo Excel 2007 + Excel 2007 -taulukkomalli + modèle de feuille de calcul Excel 2007 + modelo de folla de cálculo Excel 2007 + תבנית של גיליון נתונים של Excel 2007 + Excel 2007 táblázatsablon + Templat lembar kerja Excel 2007 + Modello foglio di calcolo Excel 2007 + Excel 2007 スプレッドシートテンプレート + Excel 2007 кесте шаблоны + 엑셀 2007 스프레드쉬트 + Excel 2007 izklājlapas veidne + Szablon arkusza Excel 2007 + шаблон электронной таблицы Excel 2007 + Predloga razpredelnice Excel 2007 + Excel 2007-kalkylarksmall + шаблон електронної таблиці Excel 2007 + Excel 2007 試算表範本 + + + + + + T602 document + مستند T602 + Dakument T602 + Документ — T602 + document T602 + Dokument T602 + T602-dokument + T602-Dokument + T602-dokumento + documento T602 + T602 dokumentua + T602-asiakirja + T602 skjal + document T602 + cáipéis T602 + documento T602 + מסמך T602 + T602 dokumentum + Dokumen T602 + Documento T602 + T602 ドキュメント + T602 құжаты + T602 문서 + T602 dokumentas + T602 dokuments + T602-dokument + T602-document + T602-dokument + Dokument T602 + Documento T602 + Document T602 + документ T602 + Dokument T602 + Dokument T602 + Dokument T602 + T602-dokument + документ T602 + Tài liệu T602 + T602 文档 + T602 文件 + + + + + + + + + + Cisco VPN Settings + إعدادات Cisco VPN + Nałady Cisco VPN + Настройки — ВЧМ на Cisco + paràmetres VPN de Cisco + Nastavení Cisco VPN + Cisco VPN-opsætning + Cisco-VPN-Einstellungen + configuración VPN de Cisco + Cisco VPN ezarpenak + Cisco VPN -asetukset + Cisco VPN stillingar + paramètres VPN Cisco + socruithe VPN Cisco + configuracións de VPN de Cisco + הגדרות של Cisco VPN + Cisco VPN beállítások + Penataan Cisco VPN + Impostazioni VPN Cisco + Cisco VPN 設定 + Cisco VPN баптаулары + Cisco VPN 설정 + Cisco VPN parametrai + Cisco VPN iestatījumi + Cisco VPN-innstillinger + Cisco VPN-instellingen + Cisco VPN-innstillingar + Ustawienia VPN Cisco + Configurações de VPN da Cisco + Configurări VPN Cisco + файл настроек Cisco VPN + Nastavenia Cisco VPN + Datoteka nastavitev Cisco VPN + Rregullime VPN Cisco + Cisco VPN-inställningar + параметри VPN Cisco + Thiết lập VPN Cisco + Cisco VPN 设置 + Cisco VPN 設定值 + + + + + + + + + + ICC profile + تشكيلة OCL + Цветови профил — OCL + perfil ICC + Profil ICC + ICC-profil + ICC-Profil + ICC-profilo + perfil ICC + ICC profila + ICC-profiili + ICC umhvarv + profil ICC + próifíl ICC + perfíl ICC + פרופיל ICC + ICC profil + Profil ICC + Profilo ICC + ICC プロファイル + ICC профайлы + ICC 프로파일 + ICC profilis + ICC profils + Profil ICC + Profil ICC + профиль ICC + Profil farieb ICC + Datoteka profila ICC + ICC-profil + профіль ICC + ICC 文件 + ICC 設定檔 + + + + + + + + IT 8.7 color calibration file + ملف ضبط ألوان IT 8.7 + Файл за цветово калибриране — IT 8.7 + fitxer de calibratge de color IT 8.7 + Soubor kalibrace barev IT 8.7 + IT 8.7 farvekalibreringsfil + IT 8.7 Farbkalibrierungsdatei + archivo de calibración de color IT 8.7 + IT 8.7 kolore-kalibrazioaren fitxategia + IT 8.7 -värikalibrointitiedosto + IT 8.7 litstillingarfíla + fichier de calibration couleur IT 8.7 + comhad calabraithe dathanna IT 8.7 + ficheiro de calibración de cor IT 8.7 + קובץ כיול צבע IT 8.7 + IT 8.7 színkalibrációs fájl + Berkas kalibrasi warna IT 8.7 + File calibrazione colore IT 8.7 + IT 8.7 カラーキャリブレーションファイル + IT 8.7 түс баптау файлы + IT 8.7 색 조율 파일 + IT 8.7 spalvų kalibravimo failas + IT 8.7 krāsu kalibrācijas fails + Plik kalibracji kolorów IT 8.7 + Fișier de calibrare a culorii IT 8.7 + файл калибровки цвета IT 8.7 + Umeritvena datoteka barve IT 8.7 + IT 8.7-färgkalibreringsfil + файл калібрування кольорів IT 8.7 + IT 8.7 色彩校准文件 + IT 8.7 色彩校正檔 + + + + + + + + + + + + digital photos + الصور الرقمية + ličbavyja zdymki + Цифрови фотографии + fotos digitals + Digitální fotografie + digitale billeder + Digitale Fotos + fotos digitales + argazki digitalak + digivalokuvia + talgildar myndir + photos numériques + grianghraif dhigiteacha + fotos dixitais + תמונות דיגיטליות + digitális fényképek + foto digital + Foto digitali + デジタルフォト + сандық фотосуреттер + 디지털 사진 + skaitmeninės nuotraukos + digitāla fotogrāfija + digitale foto's + digitale fotografi + Zdjęcia cyfrowe + fotos digitais + fotografii digitale + цифровые фотографии + Digitálne fotografie + digitalne fotografije + Fotografi dixhitale + digitalbilder + цифрові фотографії + ảnh chụp số + 数字化图像 + 數位相片 + + + + + + + + Video CD + Video CD + Videa CD + CD — видео + Video CD + Video CD + Video-cd + Video-CD + Video-KD + Video CD + Bideo CDa + Video CD + Video CD + CD vidéo + Video CD + Video CD + תקליטור וידאו + Video CD + Video CD + Video CD + ビデオ CD + видео CD + 비디오 CD + Vaizdo CD + Video CD + video-CD + Video-CD + Video CD + CD de vídeo + CD video + видеодиск VCD + Video CD + Video CD + CD Video + Video-cd + Video CD + Đĩa CD ảnh động + VCD + Video CD + + + + + + + + Super Video CD + Super Video CD + Super Video CD + CD — супер видео + Super Video CD + Super Video CD + Super Video-cd + Super-Video-CD + Super-Video-KD + Super Video CD + Super Bideo CDa + Super Video CD + Super Video CD + Super VCD + Super Video CD + Super vídeo CD + Super Video CD + Super Video CD + Super Video CD + Super Video CD + スーパービデオ CD + Super Video CD + 슈퍼 비디오 CD + Super vaizdo CD + Super Video CD + super-video-CD + Super Video-CD + Super Video CD + CD de Super Vídeo (SVCD) + Super Video CD + компакт-диск Super Video + Super Video CD + Super Video CD + CD Super Video + Super Video CD + Super Video CD + Đĩa CD siêu ảnh động + SVCD + Super Video CD + + + + + + + + video DVD + DVD مرئي + videa DVD + DVD — видео + vídeo DVD + DVD-Video + video-dvd + Video-DVD + video-DVD + DVD de vídeo + bideo DVDa + video-DVD + video DVD + DVD vidéo + DVD físe + DVD de vídeo + DVD וידאו + video DVD + DVD video + DVD video + ビデオ DVD + видео DVD + 비디오 CD + vaizdo DVD + video DVD + video-DVD + Video-DVD + DVD-Video + DVD de vídeo + DVD video + видео-DVD + DVD-Video + video DVD + DVD video + video-dvd + відео-DVD + đĩa DVD ảnh động + 视频 DVD + 視訊 DVD + + + + + + + + + + + audio CD + CD سمعي + aŭdyjo CD + CD — аудио + CD d'àudio + Zvukové CD + lyd-cd + Audio-CD + Son-KD + CD de sonido + Audio CDa + ääni-CD + audio CD + CD audio + dlúthdhiosca fuaime + CD de son + תקליטור שמע + hang CD + CD audio + CD audio + オーディオ CD + аудио CD + 오디오 CD + garso CD + audio CD + audio-CD + lyd-CD + CD-Audio + CD de áudio + CD audio + звуковой CD + Zvukové CD + zvočni CD + CD audio + ljud-cd + звуковий CD + đĩa CD âm thanh + 音频 CD + 音訊 CD + + + + + blank CD disc + قرص CD فارغ + čysty dysk CD + CD — празно + disc CD en blanc + Prázdný disk CD + tom cd-disk + Leere CD + disco CD virgen + CD disko hutsa + tyhjä CD-levy + blonk fløga + CD vierge + dlúthdhiosca folamh + disco de CD en brancho + תקליטור ריק + üres CD-lemez + cakram CD kosong + Disco vuoto CD + ブランク CD ディスク + таза CD дискі + 빈 CD 디스크 + tuščias CD diskas + tukšs CD disks + blanco CD + tom CD-plate + Pusta płyta CD + Disco CD virgem + disc gol CD + чистый компакт-диск + Prázdny disk CD + prazen CD disk + Disk bosh CD + tom cd-skiva + порожній компакт-диск + đĩa CD trống + 空 CD 光盘 + 空白 CD 光碟 + + + + + blank DVD disc + قرص DVD فارغ + čysty dysk DVD + DVD — празно + disc DVD en blanc + Prázdný disk DVD + tom dvd-disk + Leere DVD + disco DVD virgen + DVD disko hutsa + tyhjä DVD-levy + blonk margfløga + DVD vierge + DVD folamh + disco de DVD en branco + תקליטור DVD ריק + üres DVD-lemez + cakram DVD kosong + Disco vuoto DVD + ブランク DVD ディスク + таза DVD дискі + 빈 DVD 디스크 + tuščias DVD diskas + tukšs DVD disks + blanco DVD + tom DVD-plate + Pusta płyta DVD + Disco DVD virgem + disc gol DVD + чистый диск DVD + Prázdny disk DVD + prazen DVD disk + Disk bosh DVD + tom dvd-skiva + порожній диск DVD + đĩa DVD trống + 空 DVD 光盘 + 空白 DVD 光碟 + + + + + blank Blu-ray disc + قرص بلو-راي فارغ + čysty dysk Blu-ray + Blu-ray — празно + disc Blu-Ray en blanc + Prázdný disk Blu-ray + tom Blu-ray-disk + Leeres Blu-Ray-Medium + disco Blu-ray virgen + Blu-ray disko hutsa + tyhjä Blu-ray-levy + blankur Blu-ray diskur + disque Blu-Ray vierge + diosca folamh Blu-Ray + disco Blu-ray en branco + תקליטור בלו־ריי ריק + üres Blu-Ray lemez + cakram Blu-ray kosong + Disco vuoto Blu-ray + ブランク Blu-ray ディスク + таза Blu-ray дискі + 빈 블루레이 디스크 + tuščias Blu-ray diskas + tukšs Blu-ray disks + blanco Blu-ray-disk + tom Blu-Ray-plate + Pusta płyta Blu-ray + Disco Blu-Ray virgem + disc gol Blu-ray + чистый диск Blu-ray + Prázdny disk Blu-ray + prazen Blu-Ray disk + Disk bosh Blu-ray + tom Blu-ray-skiva + порожній диск Blu-ray + đĩa Blu-ray trống + 空蓝光 DVD + 空白 Blu-ray 光碟 + + + + + blank HD DVD disc + قرص HD DVD فارغ + čysty dysk HD DVD + HD DVD — празно + disc DVD HD en blanc + Prázdný disk HD DVD + tom HD dvd-disk + Leere HD-DVD + disco HD DVD virgen + HD DVD disko hutsa + tyhjä HD DVD -levy + blankur HD DVD diskur + disque HD-DVD vierge + HD DVD folamh + disco de HD DVD en branco + דיסק HD DVD ריק + üres HD DVD-lemez + cakram HD DVD kosong + Disco vuoto DVD HD + ブランク HD DVD ディスク + таза HD DVD дискі + 빈 HD DVD 디스크 + tuščias HD DVD diskas + tukšs HD DVD disks + blanco HD-DVD + tom HD-DVD-plate + Pusta płyta HD DVD + Disco DVD HD virgem + disc gol HD DVD + чистый диск HD DVD + Prázdny disk HD DVD + prazen HD DVD disk + Disk bosh DVD HD + tom HD DVD-skiva + порожній диск HD DVD + đĩa DVD HD trống + 空 HD DVD 光盘 + 空白 HD DVD 光碟 + + + + + audio DVD + DVD سمعي + aŭdyjo DVD + DVD — аудио + DVD d'àudio + Zvukové DVD + lyd-dvd + Audio-DVD + Son-DVD + DVD de sonido + audio DVDa + ääni-DVD + Ljóð DVD + DVD audio + DVD fuaime + DVD de son + DVD שמע + hang DVD + DVD audio + DVD audio + オーディオ DVD + аудио DVD + 오디오 DVD + garso DVD + audio DVD + audio-DVD + lyd-DVD + DVD-Audio + DVD de áudio + DVD audio + звуковой DVD + Zvukové DVD + zvočni DVD + DVD audio + ljud-dvd + звуковий DVD + đĩa DVD âm thanh + 音频 DVD + 音訊 DVD + + + + + + + + + Blu-ray video disc + قرص بلو-راي مرئي + Videadysk Blu-ray + Blu-ray — видео + disc de vídeo Blu-Ray + Videodisk Blu-ray + Blu-ray video-disk + Blu-ray-Videoscheibe + disco de vídeo Blu-ray + Blu-ray bideo-diskoa + Blu-ray-videolevy + Blu-ray diskur + disque vidéo Blu-Ray + diosca físe Blu-Ray + disco de vídeo Blu-ray + תקליטור וידאו מסוג בלו־ריי + Blu-ray videolemez + Cakram video Blu-ray + Disco video Blu-ray + Blu-ray ビデオディスク + Blu-ray видео дискі + 블루레이 비디오 디스크 + Blu-ray vaizdo diskas + Blu-ray video disks + Blu-ray-videodisk + Blu-Ray videoplate + Płyta wideo Blu-ray + Disco de vídeo do Blu-Ray + Disc video Blu-ray + видеодиск Blu-ray + Videodisk Blu-ray + Blu-ray video disk + Disk video Blu-ray + Blu-ray-videoskiva + відеодиск Blu-ray + Đĩa ảnh động Blu-ray + 蓝光视频光盘 + Blu-ray 視訊光碟 + + + + + + + + + HD DVD video disc + قرص HD DVD مرئي + Videadysk HD DVD + HD DVD — видео + disc de vídeo DVD HD + Videodisk HD DVD + HD DVD-videodisk + HD-DVD-Videoscheibe + disco de vídeo HD DVD + HD DVD bideo-diskoa + HD DVD -videolevy + HD DVD video diskur + disque vidéo HD DVD + diosca físe HD DVD + disco de vídeo HD DVD + תקליטור וידאו HD DVD + HD DVD videolemez + Cakram video HD DVD + Disco video DVD HD + HD DVD ビデオディスク + HD DVD видео дискі + HD DVD 비디오 디스크 + HD DVD vaizdo diskas + HD DVD video disks + HD-DVD-videodisk + HD-DVD-videodisk + Płyta wideo HD DVD + Disco DVD de vídeo HD (HDDVD) + Disc video HD DVD + видеодиск HD DVD + Videodisk HD DVD + HD DVD video disk + Disk video DVD HD + HD DVD-videoskiva + відеодиск HD DVD + Đĩa ảnh động DVD HD + HD DVD 视频光盘 + HD DVD 視訊光碟 + + + + + + + + + + e-book reader + Четец на е-книги + lector de llibres electrònics + Čtečka elektronických knih + e-bogslæser + E-Book-Leser + lector de libros electrónicos + e-kirjan lukulaite + lecteur de livre numérique + lector de libros electrónicos + קורא ספרים אלקטרוניים + e-könyvolvasó + Pembaca e-book + Lettore e-book + 電子書籍リーダー + электронды кітаптарды оқу құрылғысы + 이북 리더 + e-grāmatu lasītājs + Czytnik e-booków + устройство для чтения электронных книг + Bralnik elektronskih knjig + e-book-läsare + пристрій для читання електронних книг + 电子书阅读器 + e-book 閱讀器 + + + + + Picture CD + Picture CD + Picture CD + CD — изображения + Picture CD + Picture CD + Billedcd + Bild-CD + Picture CD + Picture CD + Picture CD + Picture CD + CD Picture + Picture CD + Picture CD + תקליטור תמונות + Picture CD + CD Gambar + Picture CD + ピクチャー CD + Picture CD + Picture CD + Paveikslėlių CD + Attēlu CD + foto-CD + Bilete-CD + Picture CD + CD de Fotos + CD cu fotografii + Picture CD + Picture CD + Slikovni CD + Picture CD + Picture CD + CD з зображеннями + Đĩa CD ảnh + 柯达 Picture CD + 圖片 CD + + + + + + + + portable audio player + مشغل الملفات المسموعة المحمولة + pieranosny aŭdyjoplayer + Преносим аудио плеър + reproductor d'àudio portàtil + Přenosný zvukový přehrávač + bærbar lydafspiller + Portables Audio-Wiedergabegerät + dispositivo de sonido portable + audio erreproduzigailu eramangarria + siirrettävä äänisoitin + leysur ljóðavspælari + lecteur audio portable + seinnteoir iniompartha fuaime + dispositivo de son portábel + נגן מוזיקה נייד + hordozható zenelejátszó + pemutar audio portable + Lettore audio portabile + ポータブルオーディオプレイヤー + тасымалы аудио плеер + 휴대용 오디오 플레이어 + nešiojamasis garso leistuvas + portatīvais audio atskaņotājs + draagbare audiospeler + portable audio layer + Przenośny odtwarzacz dźwięku + reprodutor de áudio portátil + player audio portabil + портативный аудиопроигрыватель + Prenosný hudobný prehrávač + prenosni predvajalnik zvoka + Lexues audio portativ + bärbar ljudspelare + портативний аудіопрогравач + bộ phát nhạc di động + 便携式音频播放器 + 可攜式音訊播放程式 + + + + + software + برنامج + prahrama + Софтуер + programari + Software + software + Software + software + softwarea + ohjelmisto + ritbúnaður + logiciel + bogearraí + software + תכנה + szoftver + peranti lunak + Software + ソフトウェア + бағдарламалық қамтама + 소프트웨어 + programinė įranga + programmatūra + software + programvare + Oprogramowanie + Aplicação + software + программное обеспечение + Softvér + programska oprema + Software + programvara + програмне забезпечення + phần mềm + 软件 + 軟體 + + + + + UNIX software + برنامج يونكس + Софтуер за UNIX + programari UNIX + Software UNIX + UNIX-programmer + UNIX Software + software de UNIX + UNIXeko softwarea + UNIX-ohjelmisto + UNIX ritbúnaður + logiciel UNIX + bogearraí UNIX + Software de UNIX + תוכנת UNIX + UNIX-szoftver + Peranti lunak UNIX + Software UNIX + UNIX ソフトウェア + UNIX бағдарламасы + 유닉스 소프트웨어 + UNIX programinė įranga + UNIX programmatūra + Oprogramowanie systemu UNIX + Software UNIX + программа UNIX + Softvér UNIX + Programska datoteka UNIX + UNIX-programvara + програмне забезпечення UNIX + UNIX 软件 + UNIX 軟體 + + + + + + + + + + + Windows software + برنامج ويندوز + Софтуер — Windows + programari de Windows + Software Windows + Windowsprogram + Windows-Software + software de Windows + Windows-eko softwarea + Windows-ohjelmisto + Windows ritbúnaður + logiciel Windows + bogearraí Windows + Software de Windows + תוכנה לWindows + Windows-szoftver + Piranti lunak Windows + Software Windows + Windows ソフトウェア + Windows бағдарламасы + 윈도우 소프트웨어 + Windows programinė įranga + Windows programmatūra + Oprogramowanie systemu Windows + Software Windows + программа Windows + Softvér Windows + Programska oprema za okolje Windows + Windows-program + програмне забезпечення Windows + Windows 软件 + Windows 軟體 + + + + + + + + \ No newline at end of file diff --git a/src/corelib/mimetypes/mimetypes.pri b/src/corelib/mimetypes/mimetypes.pri new file mode 100644 index 00000000000..238aa837e2d --- /dev/null +++ b/src/corelib/mimetypes/mimetypes.pri @@ -0,0 +1,25 @@ +# Qt core mimetype module + +HEADERS += \ + mimetypes/qmimedatabase.h \ + mimetypes/qmimetype.h \ + mimetypes/qmimemagicrulematcher_p.h \ + mimetypes/qmimetype_p.h \ + mimetypes/qmimetypeparser_p.h \ + mimetypes/qmimedatabase_p.h \ + mimetypes/qmimemagicrule_p.h \ + mimetypes/qmimeglobpattern_p.h \ + mimetypes/qmimeprovider_p.h + +SOURCES += \ + mimetypes/qmimedatabase.cpp \ + mimetypes/qmimetype.cpp \ + mimetypes/qmimemagicrulematcher.cpp \ + mimetypes/qmimetypeparser.cpp \ + mimetypes/qmimemagicrule.cpp \ + mimetypes/qmimeglobpattern.cpp \ + mimetypes/qmimeprovider.cpp + +RESOURCES += \ + mimetypes/mimetypes.qrc + diff --git a/src/corelib/mimetypes/mimetypes.qrc b/src/corelib/mimetypes/mimetypes.qrc new file mode 100644 index 00000000000..f0cf47cd49c --- /dev/null +++ b/src/corelib/mimetypes/mimetypes.qrc @@ -0,0 +1,5 @@ + + + mime/packages/freedesktop.org.xml + + diff --git a/src/corelib/mimetypes/qmimedatabase.cpp b/src/corelib/mimetypes/qmimedatabase.cpp new file mode 100644 index 00000000000..a7e14eed24f --- /dev/null +++ b/src/corelib/mimetypes/qmimedatabase.cpp @@ -0,0 +1,609 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the QtCore module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include // always first + +#include "qmimedatabase.h" + +#include "qmimedatabase_p.h" + +#include "qmimeprovider_p.h" +#include "qmimetype_p.h" + +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +QT_BEGIN_NAMESPACE + +bool qt_isQMimeDatabaseDebuggingActivated (false); + +#ifndef QT_NO_DEBUG_OUTPUT +#define DBG() if (qt_isQMimeDatabaseDebuggingActivated) qDebug() << static_cast(this) << Q_FUNC_INFO +#else +#define DBG() if (0) qDebug() << static_cast(this) << Q_FUNC_INFO +#endif + +Q_GLOBAL_STATIC(QMimeDatabasePrivate, staticQMimeDatabase) + +QMimeDatabasePrivate *QMimeDatabasePrivate::instance() +{ + return staticQMimeDatabase(); +} + +QMimeDatabasePrivate::QMimeDatabasePrivate() + : m_provider(0), m_defaultMimeType(QLatin1String("application/octet-stream")) +{ +} + +QMimeDatabasePrivate::~QMimeDatabasePrivate() +{ + delete m_provider; + m_provider = 0; +} + +QMimeProviderBase *QMimeDatabasePrivate::provider() +{ + if (!m_provider) { + QMimeProviderBase *binaryProvider = new QMimeBinaryProvider(this); + if (binaryProvider->isValid()) { + m_provider = binaryProvider; + } else { + delete binaryProvider; + m_provider = new QMimeXMLProvider(this); + } + } + return m_provider; +} + +void QMimeDatabasePrivate::setProvider(QMimeProviderBase *theProvider) +{ + delete m_provider; + m_provider = theProvider; +} + +/*! + \internal + Returns a MIME type or an invalid one if none found + */ +QMimeType QMimeDatabasePrivate::mimeTypeForName(const QString &nameOrAlias) +{ + return provider()->mimeTypeForName(provider()->resolveAlias(nameOrAlias)); +} + +QStringList QMimeDatabasePrivate::mimeTypeForFileName(const QString &fileName, QString *foundSuffix) +{ + if (fileName.endsWith(QLatin1Char('/'))) + return QStringList() << QLatin1String("inode/directory"); + + const QStringList matchingMimeTypes = provider()->findByFileName(QFileInfo(fileName).fileName(), foundSuffix); + return matchingMimeTypes; +} + +static inline bool isTextFile(const QByteArray &data) +{ + // UTF16 byte order marks + static const char bigEndianBOM[] = "\xFE\xFF"; + static const char littleEndianBOM[] = "\xFF\xFE"; + if (data.startsWith(bigEndianBOM) || data.startsWith(littleEndianBOM)) + return true; + + // Check the first 32 bytes (see shared-mime spec) + const char *p = data.constData(); + const char *e = p + qMin(32, data.size()); + for ( ; p < e; ++p) { + if ((unsigned char)(*p) < 32 && *p != 9 && *p !=10 && *p != 13) + return false; + } + + return true; +} + +QMimeType QMimeDatabasePrivate::findByData(const QByteArray &data, int *accuracyPtr) +{ + if (data.isEmpty()) { + *accuracyPtr = 100; + return mimeTypeForName(QLatin1String("application/x-zerosize")); + } + + *accuracyPtr = 0; + QMimeType candidate = provider()->findByMagic(data, accuracyPtr); + + if (candidate.isValid()) + return candidate; + + if (isTextFile(data)) { + *accuracyPtr = 5; + return mimeTypeForName(QLatin1String("text/plain")); + } + + return mimeTypeForName(defaultMimeType()); +} + +QMimeType QMimeDatabasePrivate::mimeTypeForNameAndData(const QString &fileName, QIODevice *device, int *accuracyPtr) +{ + // First, glob patterns are evaluated. If there is a match with max weight, + // this one is selected and we are done. Otherwise, the file contents are + // evaluated and the match with the highest value (either a magic priority or + // a glob pattern weight) is selected. Matching starts from max level (most + // specific) in both cases, even when there is already a suffix matching candidate. + *accuracyPtr = 0; + + // Pass 1) Try to match on the file name + QStringList candidatesByName = mimeTypeForFileName(fileName); + if (candidatesByName.count() == 1) { + *accuracyPtr = 100; + const QMimeType mime = mimeTypeForName(candidatesByName.at(0)); + if (mime.isValid()) + return mime; + candidatesByName.clear(); + } + + // Extension is unknown, or matches multiple mimetypes. + // Pass 2) Match on content, if we can read the data + if (device->isOpen()) { + + // Read 16K in one go (QIODEVICE_BUFFERSIZE in qiodevice_p.h). + // This is much faster than seeking back and forth into QIODevice. + const QByteArray data = device->peek(16384); + + int magicAccuracy = 0; + QMimeType candidateByData(findByData(data, &magicAccuracy)); + + // Disambiguate conflicting extensions (if magic matching found something) + if (candidateByData.isValid() && magicAccuracy > 0) { + // "for glob_match in glob_matches:" + // "if glob_match is subclass or equal to sniffed_type, use glob_match" + const QString sniffedMime = candidateByData.name(); + foreach (const QString &m, candidatesByName) { + if (inherits(m, sniffedMime)) { + // We have magic + pattern pointing to this, so it's a pretty good match + *accuracyPtr = 100; + return mimeTypeForName(m); + } + } + *accuracyPtr = magicAccuracy; + return candidateByData; + } + } + + if (candidatesByName.count() > 1) { + *accuracyPtr = 20; + candidatesByName.sort(); // to make it deterministic + const QMimeType mime = mimeTypeForName(candidatesByName.at(0)); + if (mime.isValid()) + return mime; + } + + return mimeTypeForName(defaultMimeType()); +} + +QList QMimeDatabasePrivate::allMimeTypes() +{ + return provider()->allMimeTypes(); +} + +bool QMimeDatabasePrivate::inherits(const QString &mime, const QString &parent) +{ + const QString resolvedParent = provider()->resolveAlias(parent); + //Q_ASSERT(provider()->resolveAlias(mime) == mime); + QStack toCheck; + toCheck.push(mime); + while (!toCheck.isEmpty()) { + const QString current = toCheck.pop(); + if (current == resolvedParent) + return true; + foreach (const QString &par, provider()->parents(current)) + toCheck.push(par); + } + return false; +} + +/*! + \class QMimeDatabase + \brief The QMimeDatabase class maintains a database of MIME types. + + \since 5.0 + + The MIME type database is provided by the freedesktop.org shared-mime-info + project. If the MIME type database cannot be found on the system, as is the case + on most Windows and Mac OS X systems, Qt will use its own copy of it. + + Applications which want to define custom MIME types need to install an + XML file into the locations searched for MIME definitions. + These locations can be queried with + \code + QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, QLatin1String("mime/packages"), + QStandardPaths::LocateDirectory); + \endcode + On a typical Unix system, this will be /usr/share/mime/packages/, but it is also + possible to extend the list of directories by setting the environment variable + XDG_DATA_DIRS. For instance adding /opt/myapp/share to XDG_DATA_DIRS will result + in /opt/myapp/share/mime/packages/ being searched for MIME definitions. + + Here is an example of MIME XML: + \code + + + + Qt qmake Profile + + + + \endcode + + For more details about the syntax of XML MIME definitions, including defining + "magic" in order to detect MIME types based on data as well, read the + Shared Mime Info specification at + http://standards.freedesktop.org/shared-mime-info-spec/shared-mime-info-spec-latest.html + + On Unix systems, a binary cache is used for more performance. This cache is generated + by the command "update-mime-database path", where path would be /opt/myapp/share/mime + in the above example. Make sure to run this command when installing the MIME type + definition file. + + \threadsafe + + \snippet doc/src/snippets/code/src_corelib_mimetype_qmimedatabase.cpp 0 + + \sa QMimeType + */ + +/*! + \fn QMimeDatabase::QMimeDatabase(); + Constructs this QMimeDatabase object. + */ +QMimeDatabase::QMimeDatabase() : + d(staticQMimeDatabase()) +{ + DBG(); +} + +/*! + \fn QMimeDatabase::~QMimeDatabase(); + Destroys the QMimeDatabase object. + */ +QMimeDatabase::~QMimeDatabase() +{ + DBG(); + + d = 0; +} + +/*! + \fn QMimeType QMimeDatabase::mimeTypeForName(const QString &nameOrAlias) const; + Returns a MIME type for \a nameOrAlias or an invalid one if none found. + */ +QMimeType QMimeDatabase::mimeTypeForName(const QString &nameOrAlias) const +{ + QMutexLocker locker(&d->mutex); + + return d->mimeTypeForName(nameOrAlias); +} + +/*! + Returns a MIME type for \a fileInfo. + + A valid MIME type is always returned. + + The default matching algorithm looks at both the file name and the file + contents, if necessary. The file extension has priority over the contents, + but the contents will be used if the file extension is unknown, or + matches multiple MIME types. + If \a fileInfo is a Unix symbolic link, the file that it refers to + will be used instead. + If the file doesn't match any known pattern or data, the default MIME type + (application/octet-stream) is returned. + + When \a mode is set to MatchExtension, only the file name is used, not + the file contents. The file doesn't even have to exist. If the file name + doesn't match any known pattern, the default MIME type (application/octet-stream) + is returned. + If multiple MIME types match this file, the first one (alphabetically) is returned. + + When \a mode is set to MatchContent, and the file is readable, only the + file contents are used to determine the MIME type. This is equivalent to + calling mimeTypeForData with a QFile as input device. + + In all cases, the \a fileName can also include an absolute or relative path. + + \sa isDefault, mimeTypeForData +*/ +QMimeType QMimeDatabase::mimeTypeForFile(const QFileInfo &fileInfo, MatchMode mode) const +{ + DBG() << "fileInfo" << fileInfo.absoluteFilePath(); + + QMutexLocker locker(&d->mutex); + + if (fileInfo.isDir()) + return d->mimeTypeForName(QLatin1String("inode/directory")); + + QFile file(fileInfo.absoluteFilePath()); + +#ifdef Q_OS_UNIX + // Cannot access statBuf.st_mode from the filesystem engine, so we have to stat again. + const QByteArray nativeFilePath = QFile::encodeName(file.fileName()); + QT_STATBUF statBuffer; + if (QT_LSTAT(nativeFilePath.constData(), &statBuffer) == 0) { + if (S_ISCHR(statBuffer.st_mode)) + return d->mimeTypeForName(QLatin1String("inode/chardevice")); + if (S_ISBLK(statBuffer.st_mode)) + return d->mimeTypeForName(QLatin1String("inode/blockdevice")); + if (S_ISFIFO(statBuffer.st_mode)) + return d->mimeTypeForName(QLatin1String("inode/fifo")); + if (S_ISSOCK(statBuffer.st_mode)) + return d->mimeTypeForName(QLatin1String("inode/socket")); + } +#endif + + int priority = 0; + switch (mode) { + case MatchDefault: + file.open(QIODevice::ReadOnly); // isOpen() will be tested by method below + return d->mimeTypeForNameAndData(fileInfo.absoluteFilePath(), &file, &priority); + case MatchExtension: + locker.unlock(); + return mimeTypeForFile(fileInfo.absoluteFilePath(), mode); + case MatchContent: + if (file.open(QIODevice::ReadOnly)) { + locker.unlock(); + return mimeTypeForData(&file); + } else { + return d->mimeTypeForName(d->defaultMimeType()); + } + default: + Q_ASSERT(false); + } + return d->mimeTypeForName(d->defaultMimeType()); +} + +/*! + Returns a MIME type for the file named \a fileName using \a mode. + + \overload +*/ +QMimeType QMimeDatabase::mimeTypeForFile(const QString &fileName, MatchMode mode) const +{ + if (mode == MatchExtension) { + QMutexLocker locker(&d->mutex); + QStringList matches = d->mimeTypeForFileName(fileName); + const int matchCount = matches.count(); + if (matchCount == 0) { + return d->mimeTypeForName(d->defaultMimeType()); + } else if (matchCount == 1) { + return d->mimeTypeForName(matches.first()); + } else { + // We have to pick one. + matches.sort(); // Make it deterministic + return d->mimeTypeForName(matches.first()); + } + } else { + // Implemented as a wrapper around mimeTypeForFile(QFileInfo), so no mutex. + QFileInfo fileInfo(fileName); + return mimeTypeForFile(fileInfo); + } +} + +/*! + \fn QMimeType QMimeDatabase::findMimeTypesByFileName(const QString &fileName) const; + Returns the MIME types for the file name \a fileName. + + If the file name doesn't match any known pattern, an empty list is returned. + If multiple MIME types match this file, they are all returned. + + This function does not try to open the file. To also use the content + when determining the MIME type, use mimeTypeForFile() or + mimeTypeForNameAndData() instead. + + \sa mimeTypeForFile +*/ +QList QMimeDatabase::mimeTypesForFileName(const QString &fileName) const +{ + QMutexLocker locker(&d->mutex); + + QStringList matches = d->mimeTypeForFileName(fileName); + QList mimes; + matches.sort(); // Make it deterministic + foreach (const QString &mime, matches) + mimes.append(d->mimeTypeForName(mime)); + return mimes; +} +/*! + Returns the suffix for the file \a fileName, as known by the MIME database. + + This allows to pre-select "tar.bz2" for foo.tar.bz2, but still only + "txt" for my.file.with.dots.txt. +*/ +QString QMimeDatabase::suffixForFileName(const QString &fileName) const +{ + QMutexLocker locker(&d->mutex); + QString foundSuffix; + d->mimeTypeForFileName(fileName, &foundSuffix); + return foundSuffix; +} + +/*! + Returns a MIME type for \a data. + + A valid MIME type is always returned. If \a data doesn't match any + known MIME type data, the default MIME type (application/octet-stream) + is returned. +*/ +QMimeType QMimeDatabase::mimeTypeForData(const QByteArray &data) const +{ + QMutexLocker locker(&d->mutex); + + int accuracy = 0; + return d->findByData(data, &accuracy); +} + +/*! + Returns a MIME type for the data in \a device. + + A valid MIME type is always returned. If the data in \a device doesn't match any + known MIME type data, the default MIME type (application/octet-stream) + is returned. +*/ +QMimeType QMimeDatabase::mimeTypeForData(QIODevice *device) const +{ + QMutexLocker locker(&d->mutex); + + int accuracy = 0; + const bool openedByUs = !device->isOpen() && device->open(QIODevice::ReadOnly); + if (device->isOpen()) { + // Read 16K in one go (QIODEVICE_BUFFERSIZE in qiodevice_p.h). + // This is much faster than seeking back and forth into QIODevice. + const QByteArray data = device->peek(16384); + const QMimeType result = d->findByData(data, &accuracy); + if (openedByUs) + device->close(); + return result; + } + return d->mimeTypeForName(d->defaultMimeType()); +} + +/*! + Returns a MIME type for \a url. + + If the URL is a local file, this calls mimeTypeForFile. + + Otherwise the matching is done based on the file name only, + except for schemes where file names don't mean much, like HTTP. + This method always returns the default mimetype for HTTP URLs, + use QNetworkAccessManager to handle HTTP URLs properly. + + A valid MIME type is always returned. If \a url doesn't match any + known MIME type data, the default MIME type (application/octet-stream) + is returned. +*/ +QMimeType QMimeDatabase::mimeTypeForUrl(const QUrl &url) const +{ + if (url.isLocalFile()) + return mimeTypeForFile(url.toLocalFile()); + + const QString scheme = url.scheme(); + if (scheme.startsWith(QLatin1String("http"))) + return mimeTypeForName(d->defaultMimeType()); + + return mimeTypeForFile(url.path()); +} + +/*! + Returns a MIME type for the given \a fileName and \a device data. + + This overload can be useful when the file is remote, and we started to + download some of its data in a device. This allows to do full MIME type + matching for remote files as well. + + If the device is not open, it will be opened by this function, and closed + after the MIME type detection is completed. + + A valid MIME type is always returned. If \a device data doesn't match any + known MIME type data, the default MIME type (application/octet-stream) + is returned. + + This method looks at both the file name and the file contents, + if necessary. The file extension has priority over the contents, + but the contents will be used if the file extension is unknown, or + matches multiple MIME types. +*/ +QMimeType QMimeDatabase::mimeTypeForNameAndData(const QString &fileName, QIODevice *device) const +{ + DBG() << "fileName" << fileName; + + int accuracy = 0; + const bool openedByUs = !device->isOpen() && device->open(QIODevice::ReadOnly); + const QMimeType result = d->mimeTypeForNameAndData(fileName, device, &accuracy); + if (openedByUs) + device->close(); + return result; +} + +/*! + Returns a MIME type for the given \a fileName and device \a data. + + This overload can be useful when the file is remote, and we started to + download some of its data. This allows to do full MIME type matching for + remote files as well. + + A valid MIME type is always returned. If \a data doesn't match any + known MIME type data, the default MIME type (application/octet-stream) + is returned. + + This method looks at both the file name and the file contents, + if necessary. The file extension has priority over the contents, + but the contents will be used if the file extension is unknown, or + matches multiple MIME types. +*/ +QMimeType QMimeDatabase::mimeTypeForNameAndData(const QString &fileName, const QByteArray &data) const +{ + DBG() << "fileName" << fileName; + + QBuffer buffer(const_cast(&data)); + buffer.open(QIODevice::ReadOnly); + int accuracy = 0; + return d->mimeTypeForNameAndData(fileName, &buffer, &accuracy); +} + +/*! + Returns the list of all available MIME types. + + This can be useful for showing all MIME types to the user, for instance + in a MIME type editor. Do not use unless really necessary in other cases + though, prefer using the mimeTypeFor* methods for performance reasons. +*/ +QList QMimeDatabase::allMimeTypes() const +{ + QMutexLocker locker(&d->mutex); + + return d->allMimeTypes(); +} + +#undef DBG + +QT_END_NAMESPACE diff --git a/src/corelib/mimetypes/qmimedatabase.h b/src/corelib/mimetypes/qmimedatabase.h new file mode 100644 index 00000000000..cfd1cfe33d7 --- /dev/null +++ b/src/corelib/mimetypes/qmimedatabase.h @@ -0,0 +1,95 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the QtCore module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +#ifndef QMIMEDATABASE_H +#define QMIMEDATABASE_H + +#include "qmimetype.h" + +#include + +QT_BEGIN_NAMESPACE + +class QByteArray; +class QFileInfo; +class QIODevice; +class QUrl; + +class QMimeDatabasePrivate; +class Q_CORE_EXPORT QMimeDatabase +{ + Q_DISABLE_COPY(QMimeDatabase) + +public: + QMimeDatabase(); + ~QMimeDatabase(); + + QMimeType mimeTypeForName(const QString &nameOrAlias) const; + + enum MatchMode { + MatchDefault = 0x0, + MatchExtension = 0x1, + MatchContent = 0x2 + }; + + QMimeType mimeTypeForFile(const QString &fileName, MatchMode mode = MatchDefault) const; + QMimeType mimeTypeForFile(const QFileInfo &fileInfo, MatchMode mode = MatchDefault) const; + QList mimeTypesForFileName(const QString &fileName) const; + + QMimeType mimeTypeForData(const QByteArray &data) const; + QMimeType mimeTypeForData(QIODevice *device) const; + + QMimeType mimeTypeForUrl(const QUrl &url) const; + QMimeType mimeTypeForNameAndData(const QString &fileName, QIODevice *device) const; + QMimeType mimeTypeForNameAndData(const QString &fileName, const QByteArray &data) const; + + QString suffixForFileName(const QString &fileName) const; + + QList allMimeTypes() const; + +private: + QMimeDatabasePrivate *d; +}; + +QT_END_NAMESPACE + +#endif // QMIMEDATABASE_H diff --git a/src/corelib/mimetypes/qmimedatabase_p.h b/src/corelib/mimetypes/qmimedatabase_p.h new file mode 100644 index 00000000000..7e98548a354 --- /dev/null +++ b/src/corelib/mimetypes/qmimedatabase_p.h @@ -0,0 +1,90 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the QtCore module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +#ifndef QMIMEDATABASE_P_H +#define QMIMEDATABASE_P_H + +#include +#include + +#include "qmimetype.h" +#include "qmimetype_p.h" +#include "qmimeglobpattern_p.h" + +QT_BEGIN_NAMESPACE + +class QMimeDatabase; +class QMimeProviderBase; + +class QMimeDatabasePrivate +{ +public: + Q_DISABLE_COPY(QMimeDatabasePrivate) + + QMimeDatabasePrivate(); + ~QMimeDatabasePrivate(); + + static QMimeDatabasePrivate *instance(); + + QMimeProviderBase *provider(); + void setProvider(QMimeProviderBase *theProvider); + + inline QString defaultMimeType() const { return m_defaultMimeType; } + + bool inherits(const QString &mime, const QString &parent); + + QList allMimeTypes(); + + + QMimeType mimeTypeForName(const QString &nameOrAlias); + QMimeType mimeTypeForNameAndData(const QString &fileName, QIODevice *device, int *priorityPtr); + QMimeType findByData(const QByteArray &data, int *priorityPtr); + QStringList mimeTypeForFileName(const QString &fileName, QString *foundSuffix = 0); + + mutable QMimeProviderBase *m_provider; + const QString m_defaultMimeType; + QMutex mutex; +}; + +QT_END_NAMESPACE + +#endif // QMIMEDATABASE_P_H diff --git a/src/corelib/mimetypes/qmimeglobpattern.cpp b/src/corelib/mimetypes/qmimeglobpattern.cpp new file mode 100644 index 00000000000..de26dbaf15b --- /dev/null +++ b/src/corelib/mimetypes/qmimeglobpattern.cpp @@ -0,0 +1,240 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the QtCore module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qmimeglobpattern_p.h" + +#include +#include +#include + +QT_BEGIN_NAMESPACE + +/*! + \internal + \class QMimeGlobMatchResult + \brief The QMimeGlobMatchResult class accumulates results from glob matching. + + Handles glob weights, and preferring longer matches over shorter matches. +*/ + +void QMimeGlobMatchResult::addMatch(const QString &mimeType, int weight, const QString &pattern) +{ + // Is this a lower-weight pattern than the last match? Skip this match then. + if (weight < m_weight) + return; + bool replace = weight > m_weight; + if (!replace) { + // Compare the length of the match + if (pattern.length() < m_matchingPatternLength) + return; // too short, ignore + else if (pattern.length() > m_matchingPatternLength) { + // longer: clear any previous match (like *.bz2, when pattern is *.tar.bz2) + replace = true; + } + } + if (replace) { + m_matchingMimeTypes.clear(); + // remember the new "longer" length + m_matchingPatternLength = pattern.length(); + m_weight = weight; + } + m_matchingMimeTypes.append(mimeType); + if (pattern.startsWith(QLatin1String("*."))) + m_foundSuffix = pattern.mid(2); +} + +/*! + \internal + \class QMimeGlobPattern + \brief The QMimeGlobPattern class contains the glob pattern for file names for MIME type matching. + + \sa QMimeType, QMimeDatabase, QMimeMagicRuleMatcher, QMimeMagicRule +*/ + +bool QMimeGlobPattern::matchFileName(const QString &inputFilename) const +{ + // "Applications MUST match globs case-insensitively, except when the case-sensitive + // attribute is set to true." + // The constructor takes care of putting case-insensitive patterns in lowercase. + const QString filename = m_caseSensitivity == Qt::CaseInsensitive ? inputFilename.toLower() : inputFilename; + + const int pattern_len = m_pattern.length(); + if (!pattern_len) + return false; + const int len = filename.length(); + + const int starCount = m_pattern.count(QLatin1Char('*')); + + // Patterns like "*~", "*.extension" + if (m_pattern[0] == QLatin1Char('*') && m_pattern.indexOf(QLatin1Char('[')) == -1 && starCount == 1) + { + if (len + 1 < pattern_len) return false; + + const QChar *c1 = m_pattern.unicode() + pattern_len - 1; + const QChar *c2 = filename.unicode() + len - 1; + int cnt = 1; + while (cnt < pattern_len && *c1-- == *c2--) + ++cnt; + return cnt == pattern_len; + } + + // Patterns like "README*" (well this is currently the only one like that...) + if (starCount == 1 && m_pattern.at(pattern_len - 1) == QLatin1Char('*')) { + if (len + 1 < pattern_len) return false; + if (m_pattern.at(0) == QLatin1Char('*')) + return filename.indexOf(m_pattern.mid(1, pattern_len - 2)) != -1; + + const QChar *c1 = m_pattern.unicode(); + const QChar *c2 = filename.unicode(); + int cnt = 1; + while (cnt < pattern_len && *c1++ == *c2++) + ++cnt; + return cnt == pattern_len; + } + + // Names without any wildcards like "README" + if (m_pattern.indexOf(QLatin1Char('[')) == -1 && starCount == 0 && m_pattern.indexOf(QLatin1Char('?'))) + return (m_pattern == filename); + + // Other (quite rare) patterns, like "*.anim[1-9j]": use slow but correct method + const QRegExp rx(m_pattern, Qt::CaseSensitive, QRegExp::WildcardUnix); + return rx.exactMatch(filename); +} + +static bool isFastPattern(const QString &pattern) +{ + // starts with "*.", has no other '*' and no other '.' + return pattern.lastIndexOf(QLatin1Char('*')) == 0 + && pattern.lastIndexOf(QLatin1Char('.')) == 1 + // and contains no other special character + && !pattern.contains(QLatin1Char('?')) + && !pattern.contains(QLatin1Char('[')) + ; +} + +void QMimeAllGlobPatterns::addGlob(const QMimeGlobPattern &glob) +{ + const QString &pattern = glob.pattern(); + Q_ASSERT(!pattern.isEmpty()); + + // Store each patterns into either m_fastPatternDict (*.txt, *.html etc. with default weight 50) + // or for the rest, like core.*, *.tar.bz2, *~, into highWeightPatternOffset (>50) + // or lowWeightPatternOffset (<=50) + + if (glob.weight() == 50 && isFastPattern(pattern) && !glob.isCaseSensitive()) { + // The bulk of the patterns is *.foo with weight 50 --> those go into the fast patterns hash. + const QString extension = pattern.mid(2).toLower(); + QStringList &patterns = m_fastPatterns[extension]; // find or create + // This would just slow things down: if (!patterns.contains(glob.mimeType())) + patterns.append(glob.mimeType()); + } else { + if (glob.weight() > 50) { + // This would just slow things down: if (!m_highWeightGlobs.hasPattern(glob.mimeType(), glob.pattern())) + m_highWeightGlobs.append(glob); + } else { + //This would just slow things down: if (!m_lowWeightGlobs.hasPattern(glob.mimeType(), glob.pattern())) + m_lowWeightGlobs.append(glob); + } + } +} + +void QMimeAllGlobPatterns::removeMimeType(const QString &mimeType) +{ + QMutableHashIterator it(m_fastPatterns); + while (it.hasNext()) { + it.next().value().removeAll(mimeType); + } + m_highWeightGlobs.removeMimeType(mimeType); + m_lowWeightGlobs.removeMimeType(mimeType); +} + +void QMimeGlobPatternList::match(QMimeGlobMatchResult &result, + const QString &fileName) const +{ + + QMimeGlobPatternList::const_iterator it = this->constBegin(); + const QMimeGlobPatternList::const_iterator endIt = this->constEnd(); + for (; it != endIt; ++it) { + const QMimeGlobPattern &glob = *it; + if (glob.matchFileName(fileName)) + result.addMatch(glob.mimeType(), glob.weight(), glob.pattern()); + } +} + +QStringList QMimeAllGlobPatterns::matchingGlobs(const QString &fileName, QString *foundSuffix) const +{ + // First try the high weight matches (>50), if any. + QMimeGlobMatchResult result; + m_highWeightGlobs.match(result, fileName); + if (result.m_matchingMimeTypes.isEmpty()) { + + // Now use the "fast patterns" dict, for simple *.foo patterns with weight 50 + // (which is most of them, so this optimization is definitely worth it) + const int lastDot = fileName.lastIndexOf(QLatin1Char('.')); + if (lastDot != -1) { // if no '.', skip the extension lookup + const int ext_len = fileName.length() - lastDot - 1; + const QString simpleExtension = fileName.right(ext_len).toLower(); + // (toLower because fast patterns are always case-insensitive and saved as lowercase) + + const QStringList matchingMimeTypes = m_fastPatterns.value(simpleExtension); + foreach (const QString &mime, matchingMimeTypes) { + result.addMatch(mime, 50, QLatin1String("*.") + simpleExtension); + } + // Can't return yet; *.tar.bz2 has to win over *.bz2, so we need the low-weight mimetypes anyway, + // at least those with weight 50. + } + + // Finally, try the low weight matches (<=50) + m_lowWeightGlobs.match(result, fileName); + } + if (foundSuffix) + *foundSuffix = result.m_foundSuffix; + return result.m_matchingMimeTypes; +} + +void QMimeAllGlobPatterns::clear() +{ + m_fastPatterns.clear(); + m_highWeightGlobs.clear(); + m_lowWeightGlobs.clear(); +} + +QT_END_NAMESPACE diff --git a/src/corelib/mimetypes/qmimeglobpattern_p.h b/src/corelib/mimetypes/qmimeglobpattern_p.h new file mode 100644 index 00000000000..b64a0e2f2b7 --- /dev/null +++ b/src/corelib/mimetypes/qmimeglobpattern_p.h @@ -0,0 +1,146 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the QtCore module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QMIMEGLOBPATTERN_P_H +#define QMIMEGLOBPATTERN_P_H + +#include +#include + +QT_BEGIN_NAMESPACE + +struct QMimeGlobMatchResult +{ + QMimeGlobMatchResult() + : m_weight(0), m_matchingPatternLength(0) + {} + + void addMatch(const QString &mimeType, int weight, const QString &pattern); + + QStringList m_matchingMimeTypes; + int m_weight; + int m_matchingPatternLength; + QString m_foundSuffix; +}; + +class QMimeGlobPattern +{ +public: + static const unsigned MaxWeight = 100; + static const unsigned DefaultWeight = 50; + static const unsigned MinWeight = 1; + + explicit QMimeGlobPattern(const QString &thePattern, const QString &theMimeType, unsigned theWeight = DefaultWeight, Qt::CaseSensitivity s = Qt::CaseInsensitive) : + m_pattern(thePattern), m_mimeType(theMimeType), m_weight(theWeight), m_caseSensitivity(s) + { + if (s == Qt::CaseInsensitive) { + m_pattern = m_pattern.toLower(); + } + } + ~QMimeGlobPattern() {} + + bool matchFileName(const QString &filename) const; + + inline const QString &pattern() const { return m_pattern; } + inline unsigned weight() const { return m_weight; } + inline const QString &mimeType() const { return m_mimeType; } + inline bool isCaseSensitive() const { return m_caseSensitivity == Qt::CaseSensitive; } + +private: + QString m_pattern; + QString m_mimeType; + int m_weight; + Qt::CaseSensitivity m_caseSensitivity; +}; + +class QMimeGlobPatternList : public QList +{ +public: + bool hasPattern(const QString &mimeType, const QString &pattern) const + { + const_iterator it = begin(); + const const_iterator myend = end(); + for (; it != myend; ++it) + if ((*it).pattern() == pattern && (*it).mimeType() == mimeType) + return true; + return false; + } + + /*! + "noglobs" is very rare occurrence, so it's ok if it's slow + */ + void removeMimeType(const QString &mimeType) + { + QMutableListIterator it(*this); + while (it.hasNext()) { + if (it.next().mimeType() == mimeType) + it.remove(); + } + } + + void match(QMimeGlobMatchResult &result, const QString &fileName) const; +}; + +/*! + Result of the globs parsing, as data structures ready for efficient MIME type matching. + This contains: + 1) a map of fast regular patterns (e.g. *.txt is stored as "txt" in a qhash's key) + 2) a linear list of high-weight globs + 3) a linear list of low-weight globs + */ +class QMimeAllGlobPatterns +{ +public: + typedef QHash PatternsMap; // MIME type -> patterns + + void addGlob(const QMimeGlobPattern &glob); + void removeMimeType(const QString &mimeType); + QStringList matchingGlobs(const QString &fileName, QString *foundSuffix) const; + void clear(); + + PatternsMap m_fastPatterns; // example: "doc" -> "application/msword", "text/plain" + QMimeGlobPatternList m_highWeightGlobs; + QMimeGlobPatternList m_lowWeightGlobs; // <= 50, including the non-fast 50 patterns +}; + +QT_END_NAMESPACE + +#endif // QMIMEGLOBPATTERN_P_H diff --git a/src/corelib/mimetypes/qmimemagicrule.cpp b/src/corelib/mimetypes/qmimemagicrule.cpp new file mode 100644 index 00000000000..1dee62f6d0b --- /dev/null +++ b/src/corelib/mimetypes/qmimemagicrule.cpp @@ -0,0 +1,387 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the QtCore module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +#define QT_NO_CAST_FROM_ASCII + +#include "qmimemagicrule_p.h" + +#include +#include +#include + +QT_BEGIN_NAMESPACE + +// in the same order as Type! +static const char magicRuleTypes_string[] = + "invalid\0" + "string\0" + "host16\0" + "host32\0" + "big16\0" + "big32\0" + "little16\0" + "little32\0" + "byte\0" + "\0"; + +static const int magicRuleTypes_indices[] = { + 0, 8, 15, 22, 29, 35, 41, 50, 59, 65, 0 +}; + +QMimeMagicRule::Type QMimeMagicRule::type(const QByteArray &theTypeName) +{ + for (int i = String; i <= Byte; ++i) { + if (theTypeName == magicRuleTypes_string + magicRuleTypes_indices[i]) + return Type(i); + } + return Invalid; +} + +QByteArray QMimeMagicRule::typeName(QMimeMagicRule::Type theType) +{ + return magicRuleTypes_string + magicRuleTypes_indices[theType]; +} + +class QMimeMagicRulePrivate +{ +public: + bool operator==(const QMimeMagicRulePrivate &other) const; + + QMimeMagicRule::Type type; + QByteArray value; + int startPos; + int endPos; + QByteArray mask; + + QByteArray pattern; + quint32 number; + quint32 numberMask; + + typedef bool (*MatchFunction)(const QMimeMagicRulePrivate *d, const QByteArray &data); + MatchFunction matchFunction; +}; + +bool QMimeMagicRulePrivate::operator==(const QMimeMagicRulePrivate &other) const +{ + return type == other.type && + value == other.value && + startPos == other.startPos && + endPos == other.endPos && + mask == other.mask && + pattern == other.pattern && + number == other.number && + numberMask == other.numberMask && + matchFunction == other.matchFunction; +} + +// Used by both providers +bool QMimeMagicRule::matchSubstring(const char *dataPtr, int dataSize, int rangeStart, int rangeLength, + int valueLength, const char *valueData, const char *mask) +{ + // Size of searched data. + // Example: value="ABC", rangeLength=3 -> we need 3+3-1=5 bytes (ABCxx,xABCx,xxABC would match) + const int dataNeeded = qMin(rangeLength + valueLength - 1, dataSize - rangeStart); + + if (!mask) { + // callgrind says QByteArray::indexOf is much slower, since our strings are typically too + // short for be worth Boyer-Moore matching (1 to 71 bytes, 11 bytes on average). + bool found = false; + for (int i = rangeStart; i < rangeStart + rangeLength; ++i) { + if (i + valueLength > dataSize) + break; + + if (memcmp(valueData, dataPtr + i, valueLength) == 0) { + found = true; + break; + } + } + if (!found) + return false; + } else { + bool found = false; + const char *readDataBase = dataPtr + rangeStart; + // Example (continued from above): + // deviceSize is 4, so dataNeeded was max'ed to 4. + // maxStartPos = 4 - 3 + 1 = 2, and indeed + // we need to check for a match a positions 0 and 1 (ABCx and xABC). + const int maxStartPos = dataNeeded - valueLength + 1; + for (int i = 0; i < maxStartPos; ++i) { + const char *d = readDataBase + i; + bool valid = true; + for (int idx = 0; idx < valueLength; ++idx) { + if (((*d++) & mask[idx]) != (valueData[idx] & mask[idx])) { + valid = false; + break; + } + } + if (valid) + found = true; + } + if (!found) + return false; + } + //qDebug() << "Found" << value << "in" << searchedData; + return true; +} + +static bool matchString(const QMimeMagicRulePrivate *d, const QByteArray &data) +{ + const int rangeLength = d->endPos - d->startPos + 1; + return QMimeMagicRule::matchSubstring(data.constData(), data.size(), d->startPos, rangeLength, d->pattern.size(), d->pattern.constData(), d->mask.constData()); +} + +template +static bool matchNumber(const QMimeMagicRulePrivate *d, const QByteArray &data) +{ + const T value(d->number); + const T mask(d->numberMask); + + //qDebug() << "matchNumber" << "0x" << QString::number(d->number, 16) << "size" << sizeof(T); + //qDebug() << "mask" << QString::number(d->numberMask, 16); + + const char *p = data.constData() + d->startPos; + const char *e = data.constData() + qMin(data.size() - int(sizeof(T)), d->endPos + 1); + for ( ; p <= e; ++p) { + if ((*reinterpret_cast(p) & mask) == (value & mask)) + return true; + } + + return false; +} + +static inline QByteArray makePattern(const QByteArray &value) +{ + QByteArray pattern(value.size(), Qt::Uninitialized); + char *data = pattern.data(); + + const char *p = value.constData(); + const char *e = p + value.size(); + for ( ; p < e; ++p) { + if (*p == '\\' && ++p < e) { + if (*p == 'x') { // hex (\\xff) + char c = 0; + for (int i = 0; i < 2 && p + 1 < e; ++i) { + ++p; + if (*p >= '0' && *p <= '9') + c = (c << 4) + *p - '0'; + else if (*p >= 'a' && *p <= 'f') + c = (c << 4) + *p - 'a' + 10; + else if (*p >= 'A' && *p <= 'F') + c = (c << 4) + *p - 'A' + 10; + else + continue; + } + *data++ = c; + } else if (*p >= '0' && *p <= '7') { // oct (\\7, or \\77, or \\377) + char c = *p - '0'; + if (p + 1 < e && p[1] >= '0' && p[1] <= '7') { + c = (c << 3) + *(++p) - '0'; + if (p + 1 < e && p[1] >= '0' && p[1] <= '7' && p[-1] <= '3') + c = (c << 3) + *(++p) - '0'; + } + *data++ = c; + } else if (*p == 'n') { + *data++ = '\n'; + } else if (*p == 'r') { + *data++ = '\r'; + } else { // escaped + *data++ = *p; + } + } else { + *data++ = *p; + } + } + pattern.truncate(data - pattern.data()); + + return pattern; +} + +QMimeMagicRule::QMimeMagicRule(QMimeMagicRule::Type theType, + const QByteArray &theValue, + int theStartPos, + int theEndPos, + const QByteArray &theMask) : + d(new QMimeMagicRulePrivate) +{ + Q_ASSERT(!theValue.isEmpty()); + + d->type = theType; + d->value = theValue; + d->startPos = theStartPos; + d->endPos = theEndPos; + d->mask = theMask; + d->matchFunction = 0; + + if (d->type >= Host16 && d->type <= Byte) { + bool ok; + d->number = d->value.toUInt(&ok, 0); // autodetect + Q_ASSERT(ok); + d->numberMask = !d->mask.isEmpty() ? d->mask.toUInt(&ok, 0) : 0; // autodetect + } + + switch (d->type) { + case String: + d->pattern = makePattern(d->value); + d->pattern.squeeze(); + if (!d->mask.isEmpty()) { + Q_ASSERT(d->mask.size() >= 4 && d->mask.startsWith("0x")); + d->mask = QByteArray::fromHex(QByteArray::fromRawData(d->mask.constData() + 2, d->mask.size() - 2)); + Q_ASSERT(d->mask.size() == d->pattern.size()); + } else { + d->mask.fill(static_cast(0xff), d->pattern.size()); + } + d->mask.squeeze(); + d->matchFunction = matchString; + break; + case Byte: + if (d->number <= quint8(-1)) { + if (d->numberMask == 0) + d->numberMask = quint8(-1); + d->matchFunction = matchNumber; + } + break; + case Big16: + case Host16: + case Little16: + if (d->number <= quint16(-1)) { + d->number = d->type == Little16 ? qFromLittleEndian(d->number) : qFromBigEndian(d->number); + if (d->numberMask == 0) + d->numberMask = quint16(-1); + d->matchFunction = matchNumber; + } + break; + case Big32: + case Host32: + case Little32: + if (d->number <= quint32(-1)) { + d->number = d->type == Little32 ? qFromLittleEndian(d->number) : qFromBigEndian(d->number); + if (d->numberMask == 0) + d->numberMask = quint32(-1); + d->matchFunction = matchNumber; + } + break; + default: + break; + } +} + +QMimeMagicRule::QMimeMagicRule(const QMimeMagicRule &other) : + d(new QMimeMagicRulePrivate(*other.d)) +{ +} + +QMimeMagicRule::~QMimeMagicRule() +{ +} + +QMimeMagicRule &QMimeMagicRule::operator=(const QMimeMagicRule &other) +{ + *d = *other.d; + return *this; +} + +bool QMimeMagicRule::operator==(const QMimeMagicRule &other) const +{ + return d == other.d || + *d == *other.d; +} + +QMimeMagicRule::Type QMimeMagicRule::type() const +{ + return d->type; +} + +QByteArray QMimeMagicRule::value() const +{ + return d->value; +} + +int QMimeMagicRule::startPos() const +{ + return d->startPos; +} + +int QMimeMagicRule::endPos() const +{ + return d->endPos; +} + +QByteArray QMimeMagicRule::mask() const +{ + QByteArray result = d->mask; + if (d->type == String) { + // restore '0x' + result = "0x" + result.toHex(); + } + return result; +} + +bool QMimeMagicRule::isValid() const +{ + return d->matchFunction; +} + +bool QMimeMagicRule::matches(const QByteArray &data) const +{ + const bool ok = d->matchFunction && d->matchFunction(d.data(), data); + if (!ok) + return false; + + // No submatch? Then we are done. + if (m_subMatches.isEmpty()) + return true; + + //qDebug() << "Checking" << m_subMatches.count() << "sub-rules"; + // Check that one of the submatches matches too + for ( QList::const_iterator it = m_subMatches.begin(), end = m_subMatches.end() ; + it != end ; ++it ) { + if ((*it).matches(data)) { + // One of the hierarchies matched -> mimetype recognized. + return true; + } + } + return false; + + +} + +QT_END_NAMESPACE diff --git a/src/corelib/mimetypes/qmimemagicrule_p.h b/src/corelib/mimetypes/qmimemagicrule_p.h new file mode 100644 index 00000000000..655ca365fa0 --- /dev/null +++ b/src/corelib/mimetypes/qmimemagicrule_p.h @@ -0,0 +1,89 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the QtCore module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +#ifndef QMIMEMAGICRULE_P_H +#define QMIMEMAGICRULE_P_H + +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class QMimeMagicRulePrivate; +class QMimeMagicRule +{ +public: + enum Type { Invalid = 0, String, Host16, Host32, Big16, Big32, Little16, Little32, Byte }; + + QMimeMagicRule(Type type, const QByteArray &value, int startPos, int endPos, const QByteArray &mask = QByteArray()); + QMimeMagicRule(const QMimeMagicRule &other); + ~QMimeMagicRule(); + + QMimeMagicRule &operator=(const QMimeMagicRule &other); + + bool operator==(const QMimeMagicRule &other) const; + + Type type() const; + QByteArray value() const; + int startPos() const; + int endPos() const; + QByteArray mask() const; + + bool isValid() const; + + bool matches(const QByteArray &data) const; + + QList m_subMatches; + + static Type type(const QByteArray &type); + static QByteArray typeName(Type type); + + static bool matchSubstring(const char *dataPtr, int dataSize, int rangeStart, int rangeLength, int valueLength, const char *valueData, const char *mask); + +private: + const QScopedPointer d; +}; + +QT_END_NAMESPACE + +#endif // QMIMEMAGICRULE_H diff --git a/src/corelib/mimetypes/qmimemagicrulematcher.cpp b/src/corelib/mimetypes/qmimemagicrulematcher.cpp new file mode 100644 index 00000000000..8579d02b003 --- /dev/null +++ b/src/corelib/mimetypes/qmimemagicrulematcher.cpp @@ -0,0 +1,108 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the QtCore module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +#define QT_NO_CAST_FROM_ASCII + +#include "qmimemagicrulematcher_p.h" + +#include "qmimetype_p.h" + +QT_BEGIN_NAMESPACE + +/*! + \internal + \class QMimeMagicRuleMatcher + + \brief The QMimeMagicRuleMatcher class checks a number of rules based on operator "or". + + It is used for rules parsed from XML files. + + \sa QMimeType, QMimeDatabase, MagicRule, MagicStringRule, MagicByteRule, GlobPattern + \sa QMimeTypeParserBase, MimeTypeParser +*/ + +QMimeMagicRuleMatcher::QMimeMagicRuleMatcher(const QString &mime, unsigned thePriority) : + m_list(), + m_priority(thePriority), + m_mimetype(mime) +{ +} + +bool QMimeMagicRuleMatcher::operator==(const QMimeMagicRuleMatcher &other) +{ + return m_list == other.m_list && + m_priority == other.m_priority; +} + +void QMimeMagicRuleMatcher::addRule(const QMimeMagicRule &rule) +{ + m_list.append(rule); +} + +void QMimeMagicRuleMatcher::addRules(const QList &rules) +{ + m_list.append(rules); +} + +QList QMimeMagicRuleMatcher::magicRules() const +{ + return m_list; +} + +// Check for a match on contents of a file +bool QMimeMagicRuleMatcher::matches(const QByteArray &data) const +{ + foreach (const QMimeMagicRule &magicRule, m_list) { + if (magicRule.matches(data)) + return true; + } + + return false; +} + +// Return a priority value from 1..100 +unsigned QMimeMagicRuleMatcher::priority() const +{ + return m_priority; +} + +QT_END_NAMESPACE diff --git a/src/plugins/generic/touchscreen/qtoucheventsenderqpa.h b/src/corelib/mimetypes/qmimemagicrulematcher_p.h similarity index 67% rename from src/plugins/generic/touchscreen/qtoucheventsenderqpa.h rename to src/corelib/mimetypes/qmimemagicrulematcher_p.h index 6b21dfe2592..299f447a4c3 100644 --- a/src/plugins/generic/touchscreen/qtoucheventsenderqpa.h +++ b/src/corelib/mimetypes/qmimemagicrulematcher_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the plugins module of the Qt Toolkit. +** This file is part of the QtCore module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,39 +39,41 @@ ** ****************************************************************************/ -#ifndef QTOUCHEVENTSENDERQPA_H -#define QTOUCHEVENTSENDERQPA_H -#include "qtouchscreen.h" +#ifndef QMIMEMAGICRULEMATCHER_P_H +#define QMIMEMAGICRULEMATCHER_P_H -QT_BEGIN_HEADER +#include +#include +#include + +#include "qmimemagicrule_p.h" QT_BEGIN_NAMESPACE -class QTouchDevice; - -class QTouchEventSenderQPA : public QTouchScreenObserver +class QMimeMagicRuleMatcher { public: - QTouchEventSenderQPA(const QString &spec = QString()); - void touch_configure(int x_min, int x_max, int y_min, int y_max, - int pressure_min, int pressure_max, const QString &dev_name); - void touch_point(const QList &points); + explicit QMimeMagicRuleMatcher(const QString &mime, unsigned priority = 65535); + + bool operator==(const QMimeMagicRuleMatcher &other); + + void addRule(const QMimeMagicRule &rule); + void addRules(const QList &rules); + QList magicRules() const; + + bool matches(const QByteArray &data) const; + + unsigned priority() const; + + QString mimetype() const { return m_mimetype; } private: - bool m_forceToActiveWindow; - int hw_range_x_min; - int hw_range_x_max; - int hw_range_y_min; - int hw_range_y_max; - int hw_pressure_min; - int hw_pressure_max; - QString hw_dev_name; - QTouchDevice *m_device; + QList m_list; + unsigned m_priority; + QString m_mimetype; }; QT_END_NAMESPACE -QT_END_HEADER - -#endif // QTOUCHEVENTSENDERQPA_H +#endif // QMIMEMAGICRULEMATCHER_P_H diff --git a/src/corelib/mimetypes/qmimeprovider.cpp b/src/corelib/mimetypes/qmimeprovider.cpp new file mode 100644 index 00000000000..8ef0ee88814 --- /dev/null +++ b/src/corelib/mimetypes/qmimeprovider.cpp @@ -0,0 +1,830 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the QtCore module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qmimeprovider_p.h" + +#include "qmimetypeparser_p.h" +#include +#include "qmimemagicrulematcher_p.h" + +#include +#include +#include +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +static QString fallbackParent(const QString &mimeTypeName) +{ + const QString myGroup = mimeTypeName.left(mimeTypeName.indexOf(QLatin1Char('/'))); + // All text/* types are subclasses of text/plain. + if (myGroup == QLatin1String("text") && mimeTypeName != QLatin1String("text/plain")) + return QLatin1String("text/plain"); + // All real-file mimetypes implicitly derive from application/octet-stream + if (myGroup != QLatin1String("inode") && + // ignore non-file extensions + myGroup != QLatin1String("all") && myGroup != QLatin1String("fonts") && myGroup != QLatin1String("print") && myGroup != QLatin1String("uri") + && mimeTypeName != QLatin1String("application/octet-stream")) { + return QLatin1String("application/octet-stream"); + } + return QString(); +} + +QMimeProviderBase::QMimeProviderBase(QMimeDatabasePrivate *db) + : m_db(db) +{ +} + +Q_CORE_EXPORT int qmime_secondsBetweenChecks = 5; // exported for the unit test + +bool QMimeProviderBase::shouldCheck() +{ + const QDateTime now = QDateTime::currentDateTime(); + if (m_lastCheck.isValid() && m_lastCheck.secsTo(now) < qmime_secondsBetweenChecks) + return false; + m_lastCheck = now; + return true; +} + +QMimeBinaryProvider::QMimeBinaryProvider(QMimeDatabasePrivate *db) + : QMimeProviderBase(db), m_mimetypeListLoaded(false) +{ +} + +#if defined(Q_OS_UNIX) && !defined(Q_OS_INTEGRITY) +#define QT_USE_MMAP +#endif + +struct QMimeBinaryProvider::CacheFile +{ + CacheFile(const QString &fileName); + ~CacheFile(); + + bool isValid() const { return m_valid; } + inline quint16 getUint16(int offset) const + { + return qFromBigEndian(*reinterpret_cast(data + offset)); + } + inline quint32 getUint32(int offset) const + { + return qFromBigEndian(*reinterpret_cast(data + offset)); + } + inline const char *getCharStar(int offset) const + { + return reinterpret_cast(data + offset); + } + bool load(); + bool reload(); + + QFile file; + uchar *data; + QDateTime m_mtime; + bool m_valid; +}; + +QMimeBinaryProvider::CacheFile::CacheFile(const QString &fileName) + : file(fileName), m_valid(false) +{ + load(); +} + +QMimeBinaryProvider::CacheFile::~CacheFile() +{ +} + +bool QMimeBinaryProvider::CacheFile::load() +{ + if (!file.open(QIODevice::ReadOnly)) + return false; + data = file.map(0, file.size()); + if (data) { + const int major = getUint16(0); + const int minor = getUint16(2); + m_valid = (major == 1 && minor >= 1 && minor <= 2); + } + m_mtime = QFileInfo(file).lastModified(); + return m_valid; +} + +bool QMimeBinaryProvider::CacheFile::reload() +{ + //qDebug() << "reload!" << file->fileName(); + m_valid = false; + if (file.isOpen()) { + file.close(); + } + data = 0; + return load(); +} + +QMimeBinaryProvider::CacheFile *QMimeBinaryProvider::CacheFileList::findCacheFile(const QString &fileName) const +{ + for (const_iterator it = begin(); it != end(); ++it) { + if ((*it)->file.fileName() == fileName) + return *it; + } + return 0; +} + +QMimeBinaryProvider::~QMimeBinaryProvider() +{ + qDeleteAll(m_cacheFiles); +} + +// Position of the "list offsets" values, at the beginning of the mime.cache file +enum { + PosAliasListOffset = 4, + PosParentListOffset = 8, + PosLiteralListOffset = 12, + PosReverseSuffixTreeOffset = 16, + PosGlobListOffset = 20, + PosMagicListOffset = 24, + // PosNamespaceListOffset = 28, + PosIconsListOffset = 32, + PosGenericIconsListOffset = 36 +}; + +bool QMimeBinaryProvider::isValid() +{ +#if defined(QT_USE_MMAP) + if (!qgetenv("QT_NO_MIME_CACHE").isEmpty()) + return false; + + Q_ASSERT(m_cacheFiles.isEmpty()); // this method is only ever called once + checkCache(); + + if (m_cacheFiles.count() > 1) + return true; + if (m_cacheFiles.isEmpty()) + return false; + + // We found exactly one file; is it the user-modified mimes, or a system file? + const QString foundFile = m_cacheFiles.first()->file.fileName(); + const QString localCacheFile = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + QLatin1String("/mime/mime.cache"); + + return foundFile != localCacheFile; +#else + return false; +#endif +} + +bool QMimeBinaryProvider::CacheFileList::checkCacheChanged() +{ + bool somethingChanged = false; + QMutableListIterator it(*this); + while (it.hasNext()) { + CacheFile *cacheFile = it.next(); + QFileInfo fileInfo(cacheFile->file); + if (!fileInfo.exists()) { // This can't happen by just running update-mime-database. But the user could use rm -rf :-) + delete cacheFile; + it.remove(); + somethingChanged = true; + } else if (fileInfo.lastModified() > cacheFile->m_mtime) { + if (!cacheFile->reload()) { + delete cacheFile; + it.remove(); + } + somethingChanged = true; + } + } + return somethingChanged; +} + +void QMimeBinaryProvider::checkCache() +{ + if (!shouldCheck()) + return; + + // First iterate over existing known cache files and check for uptodate + if (m_cacheFiles.checkCacheChanged()) + m_mimetypeListLoaded = false; + + // Then check if new cache files appeared + const QStringList cacheFileNames = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, QLatin1String("mime/mime.cache")); + if (cacheFileNames != m_cacheFileNames) { + foreach (const QString &cacheFileName, cacheFileNames) { + CacheFile *cacheFile = m_cacheFiles.findCacheFile(cacheFileName); + if (!cacheFile) { + //qDebug() << "new file:" << cacheFileName; + cacheFile = new CacheFile(cacheFileName); + if (cacheFile->isValid()) // verify version + m_cacheFiles.append(cacheFile); + else + delete cacheFile; + } + } + m_cacheFileNames = cacheFileNames; + m_mimetypeListLoaded = false; + } +} + +static QMimeType mimeTypeForNameUnchecked(const QString &name) +{ + QMimeTypePrivate data; + data.name = name; + // The rest is retrieved on demand. + // comment and globPatterns: in loadMimeTypePrivate + // iconName: in loadIcon + // genericIconName: in loadGenericIcon + return QMimeType(data); +} + +QMimeType QMimeBinaryProvider::mimeTypeForName(const QString &name) +{ + checkCache(); + if (!m_mimetypeListLoaded) + loadMimeTypeList(); + if (!m_mimetypeNames.contains(name)) + return QMimeType(); // unknown mimetype + return mimeTypeForNameUnchecked(name); +} + +QStringList QMimeBinaryProvider::findByFileName(const QString &fileName, QString *foundSuffix) +{ + checkCache(); + const QString lowerFileName = fileName.toLower(); + QMimeGlobMatchResult result; + // TODO this parses in the order (local, global). Check that it handles "NOGLOBS" correctly. + foreach (CacheFile *cacheFile, m_cacheFiles) { + matchGlobList(result, cacheFile, cacheFile->getUint32(PosLiteralListOffset), fileName); + matchGlobList(result, cacheFile, cacheFile->getUint32(PosGlobListOffset), fileName); + const int reverseSuffixTreeOffset = cacheFile->getUint32(PosReverseSuffixTreeOffset); + const int numRoots = cacheFile->getUint32(reverseSuffixTreeOffset); + const int firstRootOffset = cacheFile->getUint32(reverseSuffixTreeOffset + 4); + matchSuffixTree(result, cacheFile, numRoots, firstRootOffset, lowerFileName, fileName.length() - 1, false); + if (result.m_matchingMimeTypes.isEmpty()) + matchSuffixTree(result, cacheFile, numRoots, firstRootOffset, fileName, fileName.length() - 1, true); + } + if (foundSuffix) + *foundSuffix = result.m_foundSuffix; + return result.m_matchingMimeTypes; +} + +void QMimeBinaryProvider::matchGlobList(QMimeGlobMatchResult &result, CacheFile *cacheFile, int off, const QString &fileName) +{ + const int numGlobs = cacheFile->getUint32(off); + //qDebug() << "Loading" << numGlobs << "globs from" << cacheFile->file.fileName() << "at offset" << cacheFile->globListOffset; + for (int i = 0; i < numGlobs; ++i) { + const int globOffset = cacheFile->getUint32(off + 4 + 12 * i); + const int mimeTypeOffset = cacheFile->getUint32(off + 4 + 12 * i + 4); + const int flagsAndWeight = cacheFile->getUint32(off + 4 + 12 * i + 8); + const int weight = flagsAndWeight & 0xff; + const bool caseSensitive = flagsAndWeight & 0x100; + const Qt::CaseSensitivity qtCaseSensitive = caseSensitive ? Qt::CaseSensitive : Qt::CaseInsensitive; + const QString pattern = QLatin1String(cacheFile->getCharStar(globOffset)); + + const char *mimeType = cacheFile->getCharStar(mimeTypeOffset); + //qDebug() << pattern << mimeType << weight << caseSensitive; + QMimeGlobPattern glob(pattern, QString() /*unused*/, weight, qtCaseSensitive); + + // TODO: this could be done faster for literals where a simple == would do. + if (glob.matchFileName(fileName)) + result.addMatch(QLatin1String(mimeType), weight, pattern); + } +} + +bool QMimeBinaryProvider::matchSuffixTree(QMimeGlobMatchResult &result, QMimeBinaryProvider::CacheFile *cacheFile, int numEntries, int firstOffset, const QString &fileName, int charPos, bool caseSensitiveCheck) +{ + QChar fileChar = fileName[charPos]; + int min = 0; + int max = numEntries - 1; + while (min <= max) { + const int mid = (min + max) / 2; + const int off = firstOffset + 12 * mid; + const QChar ch = cacheFile->getUint32(off); + if (ch < fileChar) + min = mid + 1; + else if (ch > fileChar) + max = mid - 1; + else { + --charPos; + int numChildren = cacheFile->getUint32(off + 4); + int childrenOffset = cacheFile->getUint32(off + 8); + bool success = false; + if (charPos > 0) + success = matchSuffixTree(result, cacheFile, numChildren, childrenOffset, fileName, charPos, caseSensitiveCheck); + if (!success) { + for (int i = 0; i < numChildren; ++i) { + const int childOff = childrenOffset + 12 * i; + const int mch = cacheFile->getUint32(childOff); + if (mch != 0) + break; + const int mimeTypeOffset = cacheFile->getUint32(childOff + 4); + const char *mimeType = cacheFile->getCharStar(mimeTypeOffset); + const int flagsAndWeight = cacheFile->getUint32(childOff + 8); + const int weight = flagsAndWeight & 0xff; + const bool caseSensitive = flagsAndWeight & 0x100; + if (caseSensitiveCheck || !caseSensitive) { + result.addMatch(QLatin1String(mimeType), weight, QLatin1Char('*') + fileName.mid(charPos+1)); + success = true; + } + } + } + return success; + } + } + return false; +} + +bool QMimeBinaryProvider::matchMagicRule(QMimeBinaryProvider::CacheFile *cacheFile, int numMatchlets, int firstOffset, const QByteArray &data) +{ + const char *dataPtr = data.constData(); + const int dataSize = data.size(); + for (int matchlet = 0; matchlet < numMatchlets; ++matchlet) { + const int off = firstOffset + matchlet * 32; + const int rangeStart = cacheFile->getUint32(off); + const int rangeLength = cacheFile->getUint32(off + 4); + //const int wordSize = cacheFile->getUint32(off + 8); + const int valueLength = cacheFile->getUint32(off + 12); + const int valueOffset = cacheFile->getUint32(off + 16); + const int maskOffset = cacheFile->getUint32(off + 20); + const char *mask = maskOffset ? cacheFile->getCharStar(maskOffset) : NULL; + + if (!QMimeMagicRule::matchSubstring(dataPtr, dataSize, rangeStart, rangeLength, valueLength, cacheFile->getCharStar(valueOffset), mask)) + continue; + + const int numChildren = cacheFile->getUint32(off + 24); + const int firstChildOffset = cacheFile->getUint32(off + 28); + if (numChildren == 0) // No submatch? Then we are done. + return true; + // Check that one of the submatches matches too + if (matchMagicRule(cacheFile, numChildren, firstChildOffset, data)) + return true; + } + return false; +} + +QMimeType QMimeBinaryProvider::findByMagic(const QByteArray &data, int *accuracyPtr) +{ + checkCache(); + foreach (CacheFile *cacheFile, m_cacheFiles) { + const int magicListOffset = cacheFile->getUint32(PosMagicListOffset); + const int numMatches = cacheFile->getUint32(magicListOffset); + //const int maxExtent = cacheFile->getUint32(magicListOffset + 4); + const int firstMatchOffset = cacheFile->getUint32(magicListOffset + 8); + + for (int i = 0; i < numMatches; ++i) { + const int off = firstMatchOffset + i * 16; + const int numMatchlets = cacheFile->getUint32(off + 8); + const int firstMatchletOffset = cacheFile->getUint32(off + 12); + if (matchMagicRule(cacheFile, numMatchlets, firstMatchletOffset, data)) { + const int mimeTypeOffset = cacheFile->getUint32(off + 4); + const char *mimeType = cacheFile->getCharStar(mimeTypeOffset); + *accuracyPtr = cacheFile->getUint32(off); + // Return the first match. We have no rules for conflicting magic data... + // (mime.cache itself is sorted, but what about local overrides with a lower prio?) + return mimeTypeForNameUnchecked(QLatin1String(mimeType)); + } + } + } + return QMimeType(); +} + +QStringList QMimeBinaryProvider::parents(const QString &mime) +{ + checkCache(); + const QByteArray mimeStr = mime.toLatin1(); + QStringList result; + foreach (CacheFile *cacheFile, m_cacheFiles) { + const int parentListOffset = cacheFile->getUint32(PosParentListOffset); + const int numEntries = cacheFile->getUint32(parentListOffset); + + int begin = 0; + int end = numEntries - 1; + while (begin <= end) { + const int medium = (begin + end) / 2; + const int off = parentListOffset + 4 + 8 * medium; + const int mimeOffset = cacheFile->getUint32(off); + const char *aMime = cacheFile->getCharStar(mimeOffset); + const int cmp = qstrcmp(aMime, mimeStr); + if (cmp < 0) { + begin = medium + 1; + } else if (cmp > 0) { + end = medium - 1; + } else { + const int parentsOffset = cacheFile->getUint32(off + 4); + const int numParents = cacheFile->getUint32(parentsOffset); + for (int i = 0; i < numParents; ++i) { + const int parentOffset = cacheFile->getUint32(parentsOffset + 4 + 4 * i); + const char *aParent = cacheFile->getCharStar(parentOffset); + result.append(QString::fromLatin1(aParent)); + } + break; + } + } + } + if (result.isEmpty()) { + const QString parent = fallbackParent(mime); + if (!parent.isEmpty()) + result.append(parent); + } + return result; +} + +QString QMimeBinaryProvider::resolveAlias(const QString &name) +{ + checkCache(); + const QByteArray input = name.toLatin1(); + foreach (CacheFile *cacheFile, m_cacheFiles) { + const int aliasListOffset = cacheFile->getUint32(PosAliasListOffset); + const int numEntries = cacheFile->getUint32(aliasListOffset); + int begin = 0; + int end = numEntries - 1; + while (begin <= end) { + const int medium = (begin + end) / 2; + const int off = aliasListOffset + 4 + 8 * medium; + const int aliasOffset = cacheFile->getUint32(off); + const char *alias = cacheFile->getCharStar(aliasOffset); + const int cmp = qstrcmp(alias, input); + if (cmp < 0) { + begin = medium + 1; + } else if (cmp > 0) { + end = medium - 1; + } else { + const int mimeOffset = cacheFile->getUint32(off + 4); + const char *mimeType = cacheFile->getCharStar(mimeOffset); + return QLatin1String(mimeType); + } + } + } + + return name; +} + +void QMimeBinaryProvider::loadMimeTypeList() +{ + if (!m_mimetypeListLoaded) { + m_mimetypeListLoaded = true; + m_mimetypeNames.clear(); + // Unfortunately mime.cache doesn't have a full list of all mimetypes. + // So we have to parse the plain-text files called "types". + const QStringList typesFilenames = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, QLatin1String("mime/types")); + foreach (const QString &typeFilename, typesFilenames) { + QFile file(typeFilename); + if (file.open(QIODevice::ReadOnly)) { + while (!file.atEnd()) { + QByteArray line = file.readLine(); + line.chop(1); + m_mimetypeNames.insert(QString::fromLatin1(line.constData(), line.size())); + } + } + } + } +} + +QList QMimeBinaryProvider::allMimeTypes() +{ + QList result; + loadMimeTypeList(); + + for (QSet::const_iterator it = m_mimetypeNames.constBegin(); + it != m_mimetypeNames.constEnd(); ++it) + result.append(mimeTypeForNameUnchecked(*it)); + + return result; +} + +void QMimeBinaryProvider::loadMimeTypePrivate(QMimeTypePrivate &data) +{ + // load comment and globPatterns + + const QString file = data.name + QLatin1String(".xml"); + const QStringList mimeFiles = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, QString::fromLatin1("mime/") + file); + if (mimeFiles.isEmpty()) { + // TODO: ask Thiago about this + qWarning() << "No file found for" << file << ", even though the file appeared in a directory listing."; + qWarning() << "Either it was just removed, or the directory doesn't have executable permission..."; + qWarning() << QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, QLatin1String("mime"), QStandardPaths::LocateDirectory); + return; + } + + QString comment; + QString mainPattern; + const QString preferredLanguage = QLocale::system().name(); + + QListIterator mimeFilesIter(mimeFiles); + mimeFilesIter.toBack(); + while (mimeFilesIter.hasPrevious()) { // global first, then local. + const QString fullPath = mimeFilesIter.previous(); + QFile qfile(fullPath); + if (!qfile.open(QFile::ReadOnly)) + continue; + + QXmlStreamReader xml(&qfile); + if (xml.readNextStartElement()) { + if (xml.name() != QLatin1String("mime-type")) { + continue; + } + const QString name = xml.attributes().value(QLatin1String("type")).toString(); + if (name.isEmpty()) + continue; + if (name != data.name) { + qWarning() << "Got name" << name << "in file" << file << "expected" << data.name; + } + + while (xml.readNextStartElement()) { + const QStringRef tag = xml.name(); + if (tag == QLatin1String("comment")) { + QString lang = xml.attributes().value(QLatin1String("xml:lang")).toString(); + const QString text = xml.readElementText(); + if (lang.isEmpty()) { + lang = QLatin1String("en_US"); + } + data.localeComments.insert(lang, text); + continue; // we called readElementText, so we're at the EndElement already. + } else if (tag == QLatin1String("icon")) { // as written out by shared-mime-info >= 0.40 + data.iconName = xml.attributes().value(QLatin1String("name")).toString(); + } else if (tag == QLatin1String("glob-deleteall")) { // as written out by shared-mime-info >= 0.70 + data.globPatterns.clear(); + } else if (tag == QLatin1String("glob")) { // as written out by shared-mime-info >= 0.70 + const QString pattern = xml.attributes().value(QLatin1String("pattern")).toString(); + if (mainPattern.isEmpty() && pattern.startsWith(QLatin1Char('*'))) { + mainPattern = pattern; + } + if (!data.globPatterns.contains(pattern)) + data.globPatterns.append(pattern); + } + xml.skipCurrentElement(); + } + Q_ASSERT(xml.name() == QLatin1String("mime-type")); + } + } + + // Let's assume that shared-mime-info is at least version 0.70 + // Otherwise we would need 1) a version check, and 2) code for parsing patterns from the globs file. +#if 1 + if (!mainPattern.isEmpty() && data.globPatterns.first() != mainPattern) { + // ensure it's first in the list of patterns + data.globPatterns.removeAll(mainPattern); + data.globPatterns.prepend(mainPattern); + } +#else + const bool globsInXml = sharedMimeInfoVersion() >= QT_VERSION_CHECK(0, 70, 0); + if (globsInXml) { + if (!mainPattern.isEmpty() && data.globPatterns.first() != mainPattern) { + // ensure it's first in the list of patterns + data.globPatterns.removeAll(mainPattern); + data.globPatterns.prepend(mainPattern); + } + } else { + // Fallback: get the patterns from the globs file + // TODO: This would be the only way to support shared-mime-info < 0.70 + // But is this really worth the effort? + } +#endif +} + +// Binary search in the icons or generic-icons list +QString QMimeBinaryProvider::iconForMime(CacheFile *cacheFile, int posListOffset, const QByteArray &inputMime) +{ + const int iconsListOffset = cacheFile->getUint32(posListOffset); + const int numIcons = cacheFile->getUint32(iconsListOffset); + int begin = 0; + int end = numIcons - 1; + while (begin <= end) { + const int medium = (begin + end) / 2; + const int off = iconsListOffset + 4 + 8 * medium; + const int mimeOffset = cacheFile->getUint32(off); + const char *mime = cacheFile->getCharStar(mimeOffset); + const int cmp = qstrcmp(mime, inputMime); + if (cmp < 0) + begin = medium + 1; + else if (cmp > 0) + end = medium - 1; + else { + const int iconOffset = cacheFile->getUint32(off + 4); + return QLatin1String(cacheFile->getCharStar(iconOffset)); + } + } + return QString(); +} + +void QMimeBinaryProvider::loadIcon(QMimeTypePrivate &data) +{ + checkCache(); + const QByteArray inputMime = data.name.toLatin1(); + foreach (CacheFile *cacheFile, m_cacheFiles) { + const QString icon = iconForMime(cacheFile, PosIconsListOffset, inputMime); + if (!icon.isEmpty()) { + data.iconName = icon; + return; + } + } +} + +void QMimeBinaryProvider::loadGenericIcon(QMimeTypePrivate &data) +{ + checkCache(); + const QByteArray inputMime = data.name.toLatin1(); + foreach (CacheFile *cacheFile, m_cacheFiles) { + const QString icon = iconForMime(cacheFile, PosGenericIconsListOffset, inputMime); + if (!icon.isEmpty()) { + data.genericIconName = icon; + return; + } + } +} + +//// + +QMimeXMLProvider::QMimeXMLProvider(QMimeDatabasePrivate *db) + : QMimeProviderBase(db), m_loaded(false) +{ +} + +bool QMimeXMLProvider::isValid() +{ + return true; +} + +QMimeType QMimeXMLProvider::mimeTypeForName(const QString &name) +{ + ensureLoaded(); + + return m_nameMimeTypeMap.value(name); +} + +QStringList QMimeXMLProvider::findByFileName(const QString &fileName, QString *foundSuffix) +{ + ensureLoaded(); + + const QStringList matchingMimeTypes = m_mimeTypeGlobs.matchingGlobs(fileName, foundSuffix); + return matchingMimeTypes; +} + +QMimeType QMimeXMLProvider::findByMagic(const QByteArray &data, int *accuracyPtr) +{ + ensureLoaded(); + + QString candidate; + + foreach (const QMimeMagicRuleMatcher &matcher, m_magicMatchers) { + if (matcher.matches(data)) { + const int priority = matcher.priority(); + if (priority > *accuracyPtr) { + *accuracyPtr = priority; + candidate = matcher.mimetype(); + } + } + } + return mimeTypeForName(candidate); +} + +void QMimeXMLProvider::ensureLoaded() +{ + if (!m_loaded || shouldCheck()) { + bool fdoXmlFound = false; + QStringList allFiles; + + const QStringList packageDirs = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, QLatin1String("mime/packages"), QStandardPaths::LocateDirectory); + //qDebug() << "packageDirs=" << packageDirs; + foreach (const QString &packageDir, packageDirs) { + QDir dir(packageDir); + const QStringList files = dir.entryList(QDir::Files | QDir::NoDotAndDotDot); + //qDebug() << static_cast(this) << Q_FUNC_INFO << packageDir << files; + if (!fdoXmlFound) + fdoXmlFound = files.contains(QLatin1String("freedesktop.org.xml")); + QStringList::const_iterator endIt(files.constEnd()); + for (QStringList::const_iterator it(files.constBegin()); it != endIt; ++it) { + allFiles.append(packageDir + QLatin1Char('/') + *it); + } + } + + if (!fdoXmlFound) { + // We could instead install the file as part of installing Qt? + allFiles.prepend(QLatin1String(":/qt-project.org/qmime/freedesktop.org.xml")); + } + + if (m_allFiles == allFiles) + return; + m_allFiles = allFiles; + + m_nameMimeTypeMap.clear(); + m_aliases.clear(); + m_parents.clear(); + m_mimeTypeGlobs.clear(); + m_magicMatchers.clear(); + + //qDebug() << "Loading" << m_allFiles; + + foreach (const QString &file, allFiles) + load(file); + } +} + +void QMimeXMLProvider::load(const QString &fileName) +{ + QString errorMessage; + if (!load(fileName, &errorMessage)) + qWarning("QMimeDatabase: Error loading %s\n%s", qPrintable(fileName), qPrintable(errorMessage)); +} + +bool QMimeXMLProvider::load(const QString &fileName, QString *errorMessage) +{ + m_loaded = true; + + QFile file(fileName); + if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) { + if (errorMessage) + *errorMessage = QString::fromLatin1("Cannot open %1: %2").arg(fileName, file.errorString()); + return false; + } + + if (errorMessage) + errorMessage->clear(); + + QMimeTypeParser parser(*this); + return parser.parse(&file, fileName, errorMessage); +} + +void QMimeXMLProvider::addGlobPattern(const QMimeGlobPattern &glob) +{ + m_mimeTypeGlobs.addGlob(glob); +} + +void QMimeXMLProvider::addMimeType(const QMimeType &mt) +{ + m_nameMimeTypeMap.insert(mt.name(), mt); +} + +QStringList QMimeXMLProvider::parents(const QString &mime) +{ + ensureLoaded(); + QStringList result = m_parents.value(mime); + if (result.isEmpty()) { + const QString parent = fallbackParent(mime); + if (!parent.isEmpty()) + result.append(parent); + } + return result; +} + +void QMimeXMLProvider::addParent(const QString &child, const QString &parent) +{ + m_parents[child].append(parent); +} + +QString QMimeXMLProvider::resolveAlias(const QString &name) +{ + ensureLoaded(); + return m_aliases.value(name, name); +} + +void QMimeXMLProvider::addAlias(const QString &alias, const QString &name) +{ + m_aliases.insert(alias, name); +} + +QList QMimeXMLProvider::allMimeTypes() +{ + ensureLoaded(); + return m_nameMimeTypeMap.values(); +} + +void QMimeXMLProvider::addMagicMatcher(const QMimeMagicRuleMatcher &matcher) +{ + m_magicMatchers.append(matcher); +} + +QT_END_NAMESPACE diff --git a/src/corelib/mimetypes/qmimeprovider_p.h b/src/corelib/mimetypes/qmimeprovider_p.h new file mode 100644 index 00000000000..cb51ba11eea --- /dev/null +++ b/src/corelib/mimetypes/qmimeprovider_p.h @@ -0,0 +1,165 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the QtCore module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QMIMEPROVIDER_P_H +#define QMIMEPROVIDER_P_H + +#include +#include "qmimedatabase_p.h" +#include + +QT_BEGIN_NAMESPACE + +class QMimeMagicRuleMatcher; + +class QMimeProviderBase +{ +public: + QMimeProviderBase(QMimeDatabasePrivate *db); + virtual ~QMimeProviderBase() {} + + virtual bool isValid() = 0; + virtual QMimeType mimeTypeForName(const QString &name) = 0; + virtual QStringList findByFileName(const QString &fileName, QString *foundSuffix) = 0; + virtual QStringList parents(const QString &mime) = 0; + virtual QString resolveAlias(const QString &name) = 0; + virtual QMimeType findByMagic(const QByteArray &data, int *accuracyPtr) = 0; + virtual QList allMimeTypes() = 0; + virtual void loadMimeTypePrivate(QMimeTypePrivate &) {} + virtual void loadIcon(QMimeTypePrivate &) {} + virtual void loadGenericIcon(QMimeTypePrivate &) {} + + QMimeDatabasePrivate *m_db; +protected: + bool shouldCheck(); + QDateTime m_lastCheck; +}; + +/* + Parses the files 'mime.cache' and 'types' on demand + */ +class QMimeBinaryProvider : public QMimeProviderBase +{ +public: + QMimeBinaryProvider(QMimeDatabasePrivate *db); + virtual ~QMimeBinaryProvider(); + + virtual bool isValid(); + virtual QMimeType mimeTypeForName(const QString &name); + virtual QStringList findByFileName(const QString &fileName, QString *foundSuffix); + virtual QStringList parents(const QString &mime); + virtual QString resolveAlias(const QString &name); + virtual QMimeType findByMagic(const QByteArray &data, int *accuracyPtr); + virtual QList allMimeTypes(); + virtual void loadMimeTypePrivate(QMimeTypePrivate &); + virtual void loadIcon(QMimeTypePrivate &); + virtual void loadGenericIcon(QMimeTypePrivate &); + +private: + struct CacheFile; + + void matchGlobList(QMimeGlobMatchResult &result, CacheFile *cacheFile, int offset, const QString &fileName); + bool matchSuffixTree(QMimeGlobMatchResult &result, CacheFile *cacheFile, int numEntries, int firstOffset, const QString &fileName, int charPos, bool caseSensitiveCheck); + bool matchMagicRule(CacheFile *cacheFile, int numMatchlets, int firstOffset, const QByteArray &data); + QString iconForMime(CacheFile *cacheFile, int posListOffset, const QByteArray &inputMime); + void loadMimeTypeList(); + void checkCache(); + + class CacheFileList : public QList + { + public: + CacheFile *findCacheFile(const QString &fileName) const; + bool checkCacheChanged(); + }; + CacheFileList m_cacheFiles; + QStringList m_cacheFileNames; + QSet m_mimetypeNames; + bool m_mimetypeListLoaded; +}; + +/* + Parses the raw XML files (slower) + */ +class QMimeXMLProvider : public QMimeProviderBase +{ +public: + QMimeXMLProvider(QMimeDatabasePrivate *db); + + virtual bool isValid(); + virtual QMimeType mimeTypeForName(const QString &name); + virtual QStringList findByFileName(const QString &fileName, QString *foundSuffix); + virtual QStringList parents(const QString &mime); + virtual QString resolveAlias(const QString &name); + virtual QMimeType findByMagic(const QByteArray &data, int *accuracyPtr); + virtual QList allMimeTypes(); + + bool load(const QString &fileName, QString *errorMessage); + + // Called by the mimetype xml parser + void addMimeType(const QMimeType &mt); + void addGlobPattern(const QMimeGlobPattern &glob); + void addParent(const QString &child, const QString &parent); + void addAlias(const QString &alias, const QString &name); + void addMagicMatcher(const QMimeMagicRuleMatcher &matcher); + +private: + void ensureLoaded(); + void load(const QString &fileName); + + bool m_loaded; + + typedef QHash NameMimeTypeMap; + NameMimeTypeMap m_nameMimeTypeMap; + + typedef QHash AliasHash; + AliasHash m_aliases; + + typedef QHash ParentsHash; + ParentsHash m_parents; + QMimeAllGlobPatterns m_mimeTypeGlobs; + + QList m_magicMatchers; + QStringList m_allFiles; +}; + +QT_END_NAMESPACE + +#endif // QMIMEPROVIDER_P_H diff --git a/src/corelib/mimetypes/qmimetype.cpp b/src/corelib/mimetypes/qmimetype.cpp new file mode 100644 index 00000000000..77592880a04 --- /dev/null +++ b/src/corelib/mimetypes/qmimetype.cpp @@ -0,0 +1,506 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the QtCore module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +#include "qmimetype.h" + +#include "qmimetype_p.h" +#include "qmimedatabase_p.h" +#include "qmimeprovider_p.h" + +#include "qmimeglobpattern_p.h" + +#include +#include + +QT_BEGIN_NAMESPACE + +bool qt_isQMimeTypeDebuggingActivated (false); + +#ifndef QT_NO_DEBUG_OUTPUT +#define DBG() if (qt_isQMimeTypeDebuggingActivated) qDebug() << static_cast(this) << Q_FUNC_INFO +#else +#define DBG() if (0) qDebug() << static_cast(this) << Q_FUNC_INFO +#endif + +QMimeTypePrivate::QMimeTypePrivate() + : name() + //, comment() + , localeComments() + , genericIconName() + , iconName() + , globPatterns() +{} + +QMimeTypePrivate::QMimeTypePrivate(const QMimeType &other) + : name(other.d->name) + //, comment(other.d->comment) + , localeComments(other.d->localeComments) + , genericIconName(other.d->genericIconName) + , iconName(other.d->iconName) + , globPatterns(other.d->globPatterns) +{} + +void QMimeTypePrivate::clear() +{ + name.clear(); + //comment.clear(); + localeComments.clear(); + genericIconName.clear(); + iconName.clear(); + globPatterns.clear(); +} + +/*! + \fn bool QMimeTypePrivate::operator==(const QMimeTypePrivate &other) const; + Returns true if \a other equals this QMimeTypePrivate object, otherwise returns false. + */ +bool QMimeTypePrivate::operator==(const QMimeTypePrivate &other) const +{ + DBG(); + if (name == other.name && + //comment == other.comment && + localeComments == other.localeComments && + genericIconName == other.genericIconName && + iconName == other.iconName && + globPatterns == other.globPatterns) { + return true; + } + + DBG() << name << other.name << (name == other.name); + //DBG() << comment << other.comment << (comment == other.comment); + DBG() << localeComments << other.localeComments << (localeComments == other.localeComments); + DBG() << genericIconName << other.genericIconName << (genericIconName == other.genericIconName); + DBG() << iconName << other.iconName << (iconName == other.iconName); + DBG() << globPatterns << other.globPatterns << (globPatterns == other.globPatterns); + return false; +} + +void QMimeTypePrivate::addGlobPattern(const QString &pattern) +{ + globPatterns.append(pattern); +} + +/*! + \class QMimeType + \brief The QMimeType class describes types of file or data, represented by a MIME type string. + + \since 5.0 + + For instance a file named "readme.txt" has the MIME type "text/plain". + The MIME type can be determined from the file name, or from the file + contents, or from both. MIME type determination can also be done on + buffers of data not coming from files. + + Determining the MIME type of a file can be useful to make sure your + application supports it. It is also useful in file-manager-like applications + or widgets, in order to display an appropriate icon() for the file, or even + the descriptive comment() in detailed views. + + To check if a file has the expected MIME type, you should use inherits() + rather than a simple string comparison based on the name(). This is because + MIME types can inherit from each other: for instance a C source file is + a specific type of plain text file, so text/x-csrc inherits text/plain. + + \sa QMimeDatabase + */ + +/*! + \fn QMimeType::QMimeType(); + Constructs this QMimeType object initialized with default property values that indicate an invalid MIME type. + */ +QMimeType::QMimeType() : + d(new QMimeTypePrivate()) +{ + DBG() << "name():" << name(); + //DBG() << "aliases():" << aliases(); + //DBG() << "comment():" << comment(); + DBG() << "genericIconName():" << genericIconName(); + DBG() << "iconName():" << iconName(); + DBG() << "globPatterns():" << globPatterns(); + DBG() << "suffixes():" << suffixes(); + DBG() << "preferredSuffix():" << preferredSuffix(); +} + +/*! + \fn QMimeType::QMimeType(const QMimeType &other); + Constructs this QMimeType object as a copy of \a other. + */ +QMimeType::QMimeType(const QMimeType &other) : + d(other.d) +{ + DBG() << "name():" << name(); + //DBG() << "aliases():" << aliases(); + //DBG() << "comment():" << comment(); + DBG() << "genericIconName():" << genericIconName(); + DBG() << "iconName():" << iconName(); + DBG() << "globPatterns():" << globPatterns(); + DBG() << "suffixes():" << suffixes(); + DBG() << "preferredSuffix():" << preferredSuffix(); +} + +/*! + \fn QMimeType &QMimeType::operator=(const QMimeType &other); + Assigns the data of \a other to this QMimeType object, and returns a reference to this object. + */ +QMimeType &QMimeType::operator=(const QMimeType &other) +{ + if (d != other.d) + d = other.d; + return *this; +} + +#ifdef Q_COMPILER_RVALUE_REFS +/*! + \fn QMimeType::QMimeType(QMimeType &&other); + Constructs this QMimeType object by moving the data of the rvalue reference \a other. + */ +QMimeType::QMimeType(QMimeType &&other) : + d(std::move(other.d)) +{ + DBG() << "name():" << name(); + //DBG() << "aliases():" << aliases(); + //DBG() << "comment():" << comment(); + DBG() << "genericIconName():" << genericIconName(); + DBG() << "iconName():" << iconName(); + DBG() << "globPatterns():" << globPatterns(); + DBG() << "suffixes():" << suffixes(); + DBG() << "preferredSuffix():" << preferredSuffix(); +} +#endif + +/*! + \fn QMimeType::QMimeType(const QMimeTypePrivate &dd); + Assigns the data of the QMimeTypePrivate \a dd to this QMimeType object, and returns a reference to this object. + */ +QMimeType::QMimeType(const QMimeTypePrivate &dd) : + d(new QMimeTypePrivate(dd)) +{ + DBG() << "name():" << name(); + //DBG() << "aliases():" << aliases(); + //DBG() << "comment():" << comment(); + DBG() << "genericIconName():" << genericIconName(); + DBG() << "iconName():" << iconName(); + DBG() << "globPatterns():" << globPatterns(); + DBG() << "suffixes():" << suffixes(); + DBG() << "preferredSuffix():" << preferredSuffix(); +} + +/*! + \fn void QMimeType::swap(QMimeType &other); + Swaps QMimeType \a other with this QMimeType object. + + This operation is very fast and never fails. + + The swap() method helps with the implementation of assignment + operators in an exception-safe way. For more information consult + \l {http://en.wikibooks.org/wiki/More_C++_Idioms/Copy-and-swap} + {More C++ Idioms - Copy-and-swap}. + */ + +/*! + \fn QMimeType::~QMimeType(); + Destroys the QMimeType object, and releases the d pointer. + */ +QMimeType::~QMimeType() +{ + DBG() << "name():" << name(); + //DBG() << "aliases():" << aliases(); + //DBG() << "comment():" << comment(); + DBG() << "genericIconName():" << genericIconName(); + DBG() << "iconName():" << iconName(); + DBG() << "globPatterns():" << globPatterns(); + DBG() << "suffixes():" << suffixes(); + DBG() << "preferredSuffix():" << preferredSuffix(); +} + +/*! + \fn bool QMimeType::operator==(const QMimeType &other) const; + Returns true if \a other equals this QMimeType object, otherwise returns false. + */ +bool QMimeType::operator==(const QMimeType &other) const +{ + return d == other.d || *d == *other.d; +} + +/*! + \fn bool QMimeType::operator!=(const QMimeType &other) const; + Returns true if \a other does not equal this QMimeType object, otherwise returns false. + */ + +/*! + \fn bool QMimeType::isValid() const; + Returns true if the QMimeType object contains valid data, otherwise returns false. + A valid MIME type has a non-empty name(). + The invalid MIME type is the default-constructed QMimeType. + */ +bool QMimeType::isValid() const +{ + return !d->name.isEmpty(); +} + +/*! + \fn bool QMimeType::isDefault() const; + Returns true if this MIME type is the default MIME type which + applies to all files: application/octet-stream. + */ +bool QMimeType::isDefault() const +{ + return d->name == QMimeDatabasePrivate::instance()->defaultMimeType(); +} + +/*! + \fn QString QMimeType::name() const; + Returns the name of the MIME type. + */ +QString QMimeType::name() const +{ + return d->name; +} + +/*! + Returns the description of the MIME type to be displayed on user interfaces. + + The system language (QLocale::system().name()) is used to select the appropriate translation. + Another language can be specified by setting the \a localeName argument. + */ +QString QMimeType::comment() const +{ + QMimeDatabasePrivate::instance()->provider()->loadMimeTypePrivate(*d); + + QStringList languageList; + languageList << QLocale::system().name(); + languageList << QLocale::system().uiLanguages(); + Q_FOREACH (const QString &lang, languageList) { + const QString comm = d->localeComments.value(lang); + if (!comm.isEmpty()) + return comm; + const int pos = lang.indexOf(QLatin1Char('_')); + if (pos != -1) { + // "pt_BR" not found? try just "pt" + const QString shortLang = lang.left(pos); + const QString commShort = d->localeComments.value(shortLang); + if (!commShort.isEmpty()) + return commShort; + } + } + + // Use the mimetype name as fallback + return d->name; +} + +/*! + \fn QString QMimeType::genericIconName() const; + Returns the file name of a generic icon that represents the MIME type. + + This should be used if the icon returned by iconName() cannot be found on + the system. It is used for categories of similar types (like spreadsheets + or archives) that can use a common icon. + The freedesktop.org Icon Naming Specification lists a set of such icon names. + + The icon name can be given to QIcon::fromTheme() in order to load the icon. + */ +QString QMimeType::genericIconName() const +{ + QMimeDatabasePrivate::instance()->provider()->loadGenericIcon(*d); + if (d->genericIconName.isEmpty()) { + // From the spec: + // If the generic icon name is empty (not specified by the mimetype definition) + // then the mimetype is used to generate the generic icon by using the top-level + // media type (e.g. "video" in "video/ogg") and appending "-x-generic" + // (i.e. "video-x-generic" in the previous example). + QString group = name(); + const int slashindex = group.indexOf(QLatin1Char('/')); + if (slashindex != -1) + group = group.left(slashindex); + return group + QLatin1String("-x-generic"); + } + return d->genericIconName; +} + +/*! + \fn QString QMimeType::iconName() const; + Returns the file name of an icon image that represents the MIME type. + + The icon name can be given to QIcon::fromTheme() in order to load the icon. + */ +QString QMimeType::iconName() const +{ + QMimeDatabasePrivate::instance()->provider()->loadIcon(*d); + if (d->iconName.isEmpty()) { + // Make default icon name from the mimetype name + d->iconName = name(); + const int slashindex = d->iconName.indexOf(QLatin1Char('/')); + if (slashindex != -1) + d->iconName[slashindex] = QLatin1Char('-'); + } + return d->iconName; +} + +/*! + \fn QStringList QMimeType::globPatterns() const; + Returns the list of glob matching patterns. + */ +QStringList QMimeType::globPatterns() const +{ + QMimeDatabasePrivate::instance()->provider()->loadMimeTypePrivate(*d); + return d->globPatterns; +} + +/*! + A type is a subclass of another type if any instance of the first type is + also an instance of the second. For example, all image/svg+xml files are also + text/xml, text/plain and application/octet-stream files. Subclassing is about + the format, rather than the category of the data (for example, there is no + 'generic spreadsheet' class that all spreadsheets inherit from). + Conversely, the parent mimetype of image/svg+xml is text/xml. + + A mimetype can have multiple parents. For instance application/x-perl + has two parents: application/x-executable and text/plain. This makes + it possible to both execute perl scripts, and to open them in text editors. +*/ +QStringList QMimeType::parentMimeTypes() const +{ + return QMimeDatabasePrivate::instance()->provider()->parents(d->name); +} + +static void collectParentMimeTypes(const QString &mime, QStringList &allParents) +{ + QStringList parents = QMimeDatabasePrivate::instance()->provider()->parents(mime); + foreach (const QString &parent, parents) { + // I would use QSet, but since order matters I better not + if (!allParents.contains(parent)) + allParents.append(parent); + } + // We want a breadth-first search, so that the least-specific parent (octet-stream) is last + // This means iterating twice, unfortunately. + foreach (const QString &parent, parents) { + collectParentMimeTypes(parent, allParents); + } +} + +/*! + Return all the parent mimetypes of this mimetype, direct and indirect. + This includes the parent(s) of its parent(s), etc. + + For instance, for image/svg+xml the list would be: + application/xml, text/plain, application/octet-stream. + + Note that application/octet-stream is the ultimate parent for all types + of files (but not directories). +*/ +QStringList QMimeType::allAncestors() const +{ + QStringList allParents; + collectParentMimeTypes(d->name, allParents); + return allParents; +} + +/*! + \fn QStringList QMimeType::suffixes() const; + Returns the known suffixes for the MIME type. + */ +QStringList QMimeType::suffixes() const +{ + QMimeDatabasePrivate::instance()->provider()->loadMimeTypePrivate(*d); + + QStringList result; + foreach (const QString &pattern, d->globPatterns) { + // Not a simple suffix if if looks like: README or *. or *.* or *.JP*G or *.JP? + if (pattern.startsWith(QLatin1String("*.")) && + pattern.length() > 2 && + pattern.indexOf(QLatin1Char('*'), 2) < 0 && pattern.indexOf(QLatin1Char('?'), 2) < 0) { + const QString suffix = pattern.mid(2); + result.append(suffix); + } + } + + return result; +} + +/*! + \fn QString QMimeType::preferredSuffix() const; + Returns the preferred suffix for the MIME type. + */ +QString QMimeType::preferredSuffix() const +{ + const QStringList suffixList = suffixes(); + return suffixList.isEmpty() ? QString() : suffixList.at(0); +} + +/*! + \fn QString QMimeType::filterString() const; + Returns a filter string usable for a file dialog. +*/ +QString QMimeType::filterString() const +{ + QMimeDatabasePrivate::instance()->provider()->loadMimeTypePrivate(*d); + QString filter; + + if (!d->globPatterns.empty()) { + filter += comment() + QLatin1String(" ("); + for (int i = 0; i < d->globPatterns.size(); ++i) { + if (i != 0) + filter += QLatin1Char(' '); + filter += d->globPatterns.at(i); + } + filter += QLatin1Char(')'); + } + + return filter; +} + +/*! + \fn bool QMimeType::inherits(const QString &mimeTypeName) const; + Returns true if this mimetype is \a mimeTypeName, + or inherits \a mimeTypeName (see parentMimeTypes()), + or \a mimeTypeName is an alias for this mimetype. + */ +bool QMimeType::inherits(const QString &mimeTypeName) const +{ + if (d->name == mimeTypeName) + return true; + return QMimeDatabasePrivate::instance()->inherits(d->name, mimeTypeName); +} + +#undef DBG + +QT_END_NAMESPACE diff --git a/src/corelib/mimetypes/qmimetype.h b/src/corelib/mimetypes/qmimetype.h new file mode 100644 index 00000000000..68d17caaba8 --- /dev/null +++ b/src/corelib/mimetypes/qmimetype.h @@ -0,0 +1,115 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the QtCore module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +#ifndef QMIMETYPE_H +#define QMIMETYPE_H + +#include +#include + +QT_BEGIN_NAMESPACE + +class QMimeTypePrivate; +class QFileinfo; +class QStringList; + +class Q_CORE_EXPORT QMimeType +{ +public: + QMimeType(); + QMimeType(const QMimeType &other); + QMimeType &operator=(const QMimeType &other); +#ifdef Q_COMPILER_RVALUE_REFS + QMimeType(QMimeType &&other); + + QMimeType &operator=(QMimeType &&other) + { + qSwap(d, other.d); + return *this; + } +#endif + void swap(QMimeType &other) + { + qSwap(d, other.d); + } + explicit QMimeType(const QMimeTypePrivate &dd); + ~QMimeType(); + + bool operator==(const QMimeType &other) const; + + inline bool operator!=(const QMimeType &other) const + { + return !operator==(other); + } + + bool isValid() const; + + bool isDefault() const; + + QString name() const; + QString comment() const; + QString genericIconName() const; + QString iconName() const; + QStringList globPatterns() const; + QStringList parentMimeTypes() const; + QStringList allAncestors() const; + QStringList suffixes() const; + QString preferredSuffix() const; + + bool inherits(const QString &mimeTypeName) const; + + QString filterString() const; + +protected: + friend class QMimeTypeParserBase; + friend class MimeTypeMapEntry; + friend class QMimeDatabasePrivate; + friend class QMimeXMLProvider; + friend class QMimeBinaryProvider; + friend class QMimeTypePrivate; + + QExplicitlySharedDataPointer d; +}; + +QT_END_NAMESPACE + +#endif // QMIMETYPE_H diff --git a/src/corelib/mimetypes/qmimetype_p.h b/src/corelib/mimetypes/qmimetype_p.h new file mode 100644 index 00000000000..d8aadccf50a --- /dev/null +++ b/src/corelib/mimetypes/qmimetype_p.h @@ -0,0 +1,114 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the QtCore module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +#ifndef QMIMETYPE_P_H +#define QMIMETYPE_P_H + +#include "qmimetype.h" + +#include +#include + +QT_BEGIN_NAMESPACE + +class Q_AUTOTEST_EXPORT QMimeTypePrivate : public QSharedData +{ +public: + typedef QHash LocaleHash; + + QMimeTypePrivate(); + explicit QMimeTypePrivate(const QMimeType &other); + + void clear(); + + bool operator==(const QMimeTypePrivate &other) const; + + void addGlobPattern(const QString &pattern); + + QString name; + LocaleHash localeComments; + QString genericIconName; + QString iconName; + QStringList globPatterns; +}; + +QT_END_NAMESPACE + +#define QMIMETYPE_BUILDER \ + QT_BEGIN_NAMESPACE \ + static QMimeType buildQMimeType ( \ + const QString &name, \ + const QString &genericIconName, \ + const QString &iconName, \ + const QStringList &globPatterns \ + ) \ + { \ + QMimeTypePrivate qMimeTypeData; \ + qMimeTypeData.name = name; \ + qMimeTypeData.genericIconName = genericIconName; \ + qMimeTypeData.iconName = iconName; \ + qMimeTypeData.globPatterns = globPatterns; \ + return QMimeType(qMimeTypeData); \ + } \ + QT_END_NAMESPACE + +#ifdef Q_COMPILER_RVALUE_REFS +#define QMIMETYPE_BUILDER_FROM_RVALUE_REFS \ + QT_BEGIN_NAMESPACE \ + static QMimeType buildQMimeType ( \ + QString &&name, \ + QString &&genericIconName, \ + QString &&iconName, \ + QStringList &&globPatterns \ + ) \ + { \ + QMimeTypePrivate qMimeTypeData; \ + qMimeTypeData.name = std::move(name); \ + qMimeTypeData.genericIconName = std::move(genericIconName); \ + qMimeTypeData.iconName = std::move(iconName); \ + qMimeTypeData.globPatterns = std::move(globPatterns); \ + return QMimeType(qMimeTypeData); \ + } \ + QT_END_NAMESPACE +#endif + +#endif // QMIMETYPE_P_H diff --git a/src/corelib/mimetypes/qmimetypeparser.cpp b/src/corelib/mimetypes/qmimetypeparser.cpp new file mode 100644 index 00000000000..23f57367e38 --- /dev/null +++ b/src/corelib/mimetypes/qmimetypeparser.cpp @@ -0,0 +1,342 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the QtCore module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +#define QT_NO_CAST_FROM_ASCII + +#include "qmimetypeparser_p.h" + +#include "qmimetype_p.h" +#include "qmimemagicrulematcher_p.h" + +#include +#include +#include +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +// XML tags in MIME files +const char *const mimeInfoTagC = "mime-info"; +const char *const mimeTypeTagC = "mime-type"; +const char *const mimeTypeAttributeC = "type"; +const char *const subClassTagC = "sub-class-of"; +const char *const commentTagC = "comment"; +const char *const genericIconTagC = "generic-icon"; +const char *const iconTagC = "icon"; +const char *const nameAttributeC = "name"; +const char *const globTagC = "glob"; +const char *const aliasTagC = "alias"; +const char *const patternAttributeC = "pattern"; +const char *const weightAttributeC = "weight"; +const char *const caseSensitiveAttributeC = "case-sensitive"; +const char *const localeAttributeC = "xml:lang"; + +const char *const magicTagC = "magic"; +const char *const priorityAttributeC = "priority"; + +const char *const matchTagC = "match"; +const char *const matchValueAttributeC = "value"; +const char *const matchTypeAttributeC = "type"; +const char *const matchOffsetAttributeC = "offset"; +const char *const matchMaskAttributeC = "mask"; + +/*! + \class QMimeTypeParser + \internal + \brief The QMimeTypeParser class parses MIME types, and builds a MIME database hierarchy by adding to QMimeDatabasePrivate. + + Populates QMimeDataBase + + \sa QMimeDatabase, QMimeMagicRuleMatcher, MagicRule, MagicStringRule, MagicByteRule, GlobPattern + \sa QMimeTypeParser +*/ + + +/*! + \class QMimeTypeParserBase + \brief The QMimeTypeParserBase class parses for a sequence of in a generic way. + + Calls abstract handler function process for QMimeType it finds. + + \sa QMimeDatabase, QMimeMagicRuleMatcher, MagicRule, MagicStringRule, MagicByteRule, GlobPattern + \sa QMimeTypeParser +*/ + +/*! + \fn virtual bool QMimeTypeParserBase::process(const QMimeType &t, QString *errorMessage) = 0; + Overwrite to process the sequence of parsed data +*/ + +QMimeTypeParserBase::ParseState QMimeTypeParserBase::nextState(ParseState currentState, const QStringRef &startElement) +{ + switch (currentState) { + case ParseBeginning: + if (startElement == QLatin1String(mimeInfoTagC)) + return ParseMimeInfo; + if (startElement == QLatin1String(mimeTypeTagC)) + return ParseMimeType; + return ParseError; + case ParseMimeInfo: + return startElement == QLatin1String(mimeTypeTagC) ? ParseMimeType : ParseError; + case ParseMimeType: + case ParseComment: + case ParseGenericIcon: + case ParseIcon: + case ParseGlobPattern: + case ParseSubClass: + case ParseAlias: + case ParseOtherMimeTypeSubTag: + case ParseMagicMatchRule: + if (startElement == QLatin1String(mimeTypeTagC)) // Sequence of + return ParseMimeType; + if (startElement == QLatin1String(commentTagC )) + return ParseComment; + if (startElement == QLatin1String(genericIconTagC)) + return ParseGenericIcon; + if (startElement == QLatin1String(iconTagC)) + return ParseIcon; + if (startElement == QLatin1String(globTagC)) + return ParseGlobPattern; + if (startElement == QLatin1String(subClassTagC)) + return ParseSubClass; + if (startElement == QLatin1String(aliasTagC)) + return ParseAlias; + if (startElement == QLatin1String(magicTagC)) + return ParseMagic; + if (startElement == QLatin1String(matchTagC)) + return ParseMagicMatchRule; + return ParseOtherMimeTypeSubTag; + case ParseMagic: + if (startElement == QLatin1String(matchTagC)) + return ParseMagicMatchRule; + break; + case ParseError: + break; + } + return ParseError; +} + +// Parse int number from an (attribute) string) +static bool parseNumber(const QString &n, int *target, QString *errorMessage) +{ + bool ok; + *target = n.toInt(&ok); + if (!ok) { + *errorMessage = QString::fromLatin1("Not a number '%1'.").arg(n); + return false; + } + return true; +} + +// Evaluate a magic match rule like +// +// +static bool createMagicMatchRule(const QXmlStreamAttributes &atts, + QString *errorMessage, QMimeMagicRule *&rule) +{ + const QString type = atts.value(QLatin1String(matchTypeAttributeC)).toString(); + QMimeMagicRule::Type magicType = QMimeMagicRule::type(type.toLatin1()); + if (magicType == QMimeMagicRule::Invalid) { + qWarning("%s: match type %s is not supported.", Q_FUNC_INFO, type.toUtf8().constData()); + return true; + } + const QString value = atts.value(QLatin1String(matchValueAttributeC)).toString(); + if (value.isEmpty()) { + *errorMessage = QString::fromLatin1("Empty match value detected."); + return false; + } + // Parse for offset as "1" or "1:10" + int startPos, endPos; + const QString offsetS = atts.value(QLatin1String(matchOffsetAttributeC)).toString(); + const int colonIndex = offsetS.indexOf(QLatin1Char(':')); + const QString startPosS = colonIndex == -1 ? offsetS : offsetS.mid(0, colonIndex); + const QString endPosS = colonIndex == -1 ? offsetS : offsetS.mid(colonIndex + 1); + if (!parseNumber(startPosS, &startPos, errorMessage) || !parseNumber(endPosS, &endPos, errorMessage)) + return false; + const QString mask = atts.value(QLatin1String(matchMaskAttributeC)).toString(); + + rule = new QMimeMagicRule(magicType, value.toUtf8(), startPos, endPos, mask.toLatin1()); + + return true; +} + +bool QMimeTypeParserBase::parse(QIODevice *dev, const QString &fileName, QString *errorMessage) +{ + QMimeTypePrivate data; + int priority = 50; + QStack currentRules; // stack for the nesting of rules + QList rules; // toplevel rules + QXmlStreamReader reader(dev); + ParseState ps = ParseBeginning; + QXmlStreamAttributes atts; + while (!reader.atEnd()) { + switch (reader.readNext()) { + case QXmlStreamReader::StartElement: + ps = nextState(ps, reader.name()); + atts = reader.attributes(); + switch (ps) { + case ParseMimeType: { // start parsing a MIME type name + const QString name = atts.value(QLatin1String(mimeTypeAttributeC)).toString(); + if (name.isEmpty()) { + reader.raiseError(QString::fromLatin1("Missing '%1'-attribute").arg(QString::fromLatin1(mimeTypeAttributeC))); + } else { + data.name = name; + } + } + break; + case ParseGenericIcon: + data.genericIconName = atts.value(QLatin1String(nameAttributeC)).toString(); + break; + case ParseIcon: + data.iconName = atts.value(QLatin1String(nameAttributeC)).toString(); + break; + case ParseGlobPattern: { + const QString pattern = atts.value(QLatin1String(patternAttributeC)).toString(); + unsigned weight = atts.value(QLatin1String(weightAttributeC)).toString().toInt(); + const bool caseSensitive = atts.value(QLatin1String(caseSensitiveAttributeC)).toString() == QLatin1String("true"); + + if (weight == 0) + weight = QMimeGlobPattern::DefaultWeight; + + Q_ASSERT(!data.name.isEmpty()); + const QMimeGlobPattern glob(pattern, data.name, weight, caseSensitive ? Qt::CaseSensitive : Qt::CaseInsensitive); + if (!process(glob, errorMessage)) // for actual glob matching + return false; + data.addGlobPattern(pattern); // just for QMimeType::globPatterns() + } + break; + case ParseSubClass: { + const QString inheritsFrom = atts.value(QLatin1String(mimeTypeAttributeC)).toString(); + if (!inheritsFrom.isEmpty()) + processParent(data.name, inheritsFrom); + } + break; + case ParseComment: { + // comments have locale attributes. We want the default, English one + QString locale = atts.value(QLatin1String(localeAttributeC)).toString(); + const QString comment = reader.readElementText(); + if (locale.isEmpty()) + locale = QString::fromLatin1("en_US"); + data.localeComments.insert(locale, comment); + } + break; + case ParseAlias: { + const QString alias = atts.value(QLatin1String(mimeTypeAttributeC)).toString(); + if (!alias.isEmpty()) + processAlias(alias, data.name); + } + break; + case ParseMagic: { + priority = 50; + const QString priorityS = atts.value(QLatin1String(priorityAttributeC)).toString(); + if (!priorityS.isEmpty()) { + if (!parseNumber(priorityS, &priority, errorMessage)) + return false; + + } + currentRules.clear(); + //qDebug() << "MAGIC start for mimetype" << data.name; + } + break; + case ParseMagicMatchRule: { + QMimeMagicRule *rule = 0; + if (!createMagicMatchRule(atts, errorMessage, rule)) + return false; + QList *ruleList; + if (currentRules.isEmpty()) + ruleList = &rules; + else // nest this rule into the proper parent + ruleList = ¤tRules.top()->m_subMatches; + ruleList->append(*rule); + //qDebug() << " MATCH added. Stack size was" << currentRules.size(); + currentRules.push(&ruleList->last()); + delete rule; + break; + } + case ParseError: + reader.raiseError(QString::fromLatin1("Unexpected element <%1>"). + arg(reader.name().toString())); + break; + default: + break; + } + break; + // continue switch QXmlStreamReader::Token... + case QXmlStreamReader::EndElement: // Finished element + { + const QStringRef elementName = reader.name(); + if (elementName == QLatin1String(mimeTypeTagC)) { + if (!process(QMimeType(data), errorMessage)) + return false; + data.clear(); + } else if (elementName == QLatin1String(matchTagC)) { + // Closing a tag, pop stack + currentRules.pop(); + //qDebug() << " MATCH closed. Stack size is now" << currentRules.size(); + } else if (elementName == QLatin1String(magicTagC)) { + //qDebug() << "MAGIC ended, we got" << rules.count() << "rules, with prio" << priority; + // Finished a sequence + QMimeMagicRuleMatcher ruleMatcher(data.name, priority); + ruleMatcher.addRules(rules); + processMagicMatcher(ruleMatcher); + rules.clear(); + } + break; + } + default: + break; + } + } + + if (reader.hasError()) { + if (errorMessage) + *errorMessage = QString::fromLatin1("An error has been encountered at line %1 of %2: %3:").arg(reader.lineNumber()).arg(fileName, reader.errorString()); + return false; + } + + return true; +} + +QT_END_NAMESPACE diff --git a/src/corelib/mimetypes/qmimetypeparser_p.h b/src/corelib/mimetypes/qmimetypeparser_p.h new file mode 100644 index 00000000000..455c07063c5 --- /dev/null +++ b/src/corelib/mimetypes/qmimetypeparser_p.h @@ -0,0 +1,142 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the QtCore module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +#ifndef MIMETYPEPARSER_P_H +#define MIMETYPEPARSER_P_H + +#include "qmimedatabase_p.h" +#include "qmimeprovider_p.h" + +QT_BEGIN_NAMESPACE + +class QIODevice; + +// XML tags in MIME files +extern const char *const mimeInfoTagC; +extern const char *const mimeTypeTagC; +extern const char *const mimeTypeAttributeC; +extern const char *const subClassTagC; +extern const char *const commentTagC; +extern const char *const genericIconTagC; +extern const char *const nameAttributeC; +extern const char *const globTagC; +extern const char *const aliasTagC; +extern const char *const patternAttributeC; +extern const char *const weightAttributeC; +extern const char *const caseSensitiveAttributeC; +extern const char *const localeAttributeC; + +extern const char *const magicTagC; +extern const char *const priorityAttributeC; + +extern const char *const matchTagC; +extern const char *const matchValueAttributeC; +extern const char *const matchTypeAttributeC; +extern const char *const matchOffsetAttributeC; +extern const char *const matchMaskAttributeC; + +class QMimeTypeParserBase +{ + Q_DISABLE_COPY(QMimeTypeParserBase) + +public: + QMimeTypeParserBase() {} + virtual ~QMimeTypeParserBase() {} + + bool parse(QIODevice *dev, const QString &fileName, QString *errorMessage); + +protected: + virtual bool process(const QMimeType &t, QString *errorMessage) = 0; + virtual bool process(const QMimeGlobPattern &t, QString *errorMessage) = 0; + virtual void processParent(const QString &child, const QString &parent) = 0; + virtual void processAlias(const QString &alias, const QString &name) = 0; + virtual void processMagicMatcher(const QMimeMagicRuleMatcher &matcher) = 0; + +private: + enum ParseState { + ParseBeginning, + ParseMimeInfo, + ParseMimeType, + ParseComment, + ParseGenericIcon, + ParseIcon, + ParseGlobPattern, + ParseSubClass, + ParseAlias, + ParseMagic, + ParseMagicMatchRule, + ParseOtherMimeTypeSubTag, + ParseError + }; + + static ParseState nextState(ParseState currentState, const QStringRef &startElement); +}; + + +class QMimeTypeParser : public QMimeTypeParserBase +{ +public: + explicit QMimeTypeParser(QMimeXMLProvider &provider) : m_provider(provider) {} + +protected: + inline bool process(const QMimeType &t, QString *) + { m_provider.addMimeType(t); return true; } + + inline bool process(const QMimeGlobPattern &glob, QString *) + { m_provider.addGlobPattern(glob); return true; } + + inline void processParent(const QString &child, const QString &parent) + { m_provider.addParent(child, parent); } + + inline void processAlias(const QString &alias, const QString &name) + { m_provider.addAlias(alias, name); } + + inline void processMagicMatcher(const QMimeMagicRuleMatcher &matcher) + { m_provider.addMagicMatcher(matcher); } + +private: + QMimeXMLProvider &m_provider; +}; + +QT_END_NAMESPACE + +#endif // MIMETYPEPARSER_P_H diff --git a/src/corelib/plugin/qelfparser_p.cpp b/src/corelib/plugin/qelfparser_p.cpp index 0e8d43454cf..70abbaf6e11 100644 --- a/src/corelib/plugin/qelfparser_p.cpp +++ b/src/corelib/plugin/qelfparser_p.cpp @@ -203,7 +203,7 @@ int QElfParser::parse(const char *dataStart, ulong fdlen, const QString &library qDebug() << "++++" << i << shnam; #endif - if (qstrcmp(shnam, ".qtplugin") == 0 || qstrcmp(shnam, ".rodata") == 0) { + if (qstrcmp(shnam, ".qtmetadata") == 0 || qstrcmp(shnam, ".qtplugin") == 0 || qstrcmp(shnam, ".rodata") == 0) { if (!(sh.type & 0x1)) { if (shnam[1] == 'r') { if (lib) @@ -227,7 +227,7 @@ int QElfParser::parse(const char *dataStart, ulong fdlen, const QString &library *pos = sh.offset; *sectionlen = sh.size - 1; if (shnam[1] == 'q') - return Ok; + return shnam[3] == 'm' ? QtMetaDataSection : QtPluginSection; } s += e_shentsize; } diff --git a/src/corelib/plugin/qelfparser_p.h b/src/corelib/plugin/qelfparser_p.h index 96e1eac33f6..afd81121380 100644 --- a/src/corelib/plugin/qelfparser_p.h +++ b/src/corelib/plugin/qelfparser_p.h @@ -72,7 +72,7 @@ typedef quintptr qelfaddr_t; class QElfParser { public: - enum {Ok = 0, NotElf = 1, NoQtSection = 2, Corrupt = 3}; + enum { QtMetaDataSection, QtPluginSection, NoQtSection, NotElf, Corrupt }; enum {ElfLittleEndian = 0, ElfBigEndian = 1}; struct ElfSectionHeader diff --git a/src/corelib/plugin/qfactoryloader.cpp b/src/corelib/plugin/qfactoryloader.cpp index e887ae8bf92..566ece77c9a 100644 --- a/src/corelib/plugin/qfactoryloader.cpp +++ b/src/corelib/plugin/qfactoryloader.cpp @@ -51,6 +51,10 @@ #include "qpluginloader.h" #include "private/qobject_p.h" #include "private/qcoreapplication_p.h" +#include "qjsondocument.h" +#include "qjsonvalue.h" +#include "qjsonobject.h" +#include "qjsonarray.h" QT_BEGIN_NAMESPACE @@ -78,8 +82,11 @@ public: QFactoryLoaderPrivate::~QFactoryLoaderPrivate() { - for (int i = 0; i < libraryList.count(); ++i) - libraryList.at(i)->release(); + for (int i = 0; i < libraryList.count(); ++i) { + QLibraryPrivate *library = libraryList.at(i); + library->unload(); + library->release(); + } } QFactoryLoader::QFactoryLoader(const char *iid, @@ -134,26 +141,45 @@ void QFactoryLoader::update() continue; } QStringList keys; - if (!library->loadPlugin()) { - if (qt_debug_component()) { - qDebug() << library->errorString; - qDebug() << " could not load"; + if (library->compatPlugin) { + qWarning("Qt plugin loader: Compatibility plugin '%s', need to load for accessing meta data.", + qPrintable(QDir::toNativeSeparators(fileName))); + if (!library->loadPlugin()) { + if (qt_debug_component()) { + qDebug() << library->errorString; + qDebug() << " could not load"; + } + library->release(); + continue; } - library->release(); - continue; + + if (!library->inst) + library->inst = library->instance(); + QObject *instance = library->inst.data(); + if (!instance) { + library->release(); + // ignore plugins that have a valid signature but cannot be loaded. + continue; + } + QFactoryInterface *factory = qobject_cast(instance); + if (instance && factory && instance->qt_metacast(d->iid)) + keys = factory->keys(); + } else { + QString iid = library->metaData.value(QLatin1String("IID")).toString(); + if (iid == QLatin1String(d->iid.constData(), d->iid.size())) { + QJsonObject object = library->metaData.value(QLatin1String("MetaData")).toObject(); + QJsonArray k = object.value(QLatin1String("Keys")).toArray(); + for (int i = 0; i < k.size(); ++i) { + QString s = k.at(i).toString(); + keys += s; + } + } + if (qt_debug_component()) + qDebug() << "Got keys from plugin meta data" << keys; } - QObject *instance = library->instance(); - if (!instance) { - library->release(); - // ignore plugins that have a valid signature but cannot be loaded. - continue; - } - QFactoryInterface *factory = qobject_cast(instance); - if (instance && factory && instance->qt_metacast(d->iid)) - keys = factory->keys(); - if (keys.isEmpty()) - library->unload(); + if (keys.isEmpty()) { + library->unload(); library->release(); continue; } @@ -167,7 +193,12 @@ void QFactoryLoader::update() if (!d->cs) key = key.toLower(); QLibraryPrivate *previous = d->keyMap.value(key); - if (!previous || (previous->qt_version > QT_VERSION && library->qt_version <= QT_VERSION)) { + int prev_qt_version = 0; + if (previous) { + prev_qt_version = (int)previous->metaData.value(QLatin1String("version")).toDouble(); + } + int qt_version = (int)library->metaData.value(QLatin1String("version")).toDouble(); + if (!previous || (prev_qt_version > QT_VERSION && qt_version <= QT_VERSION)) { d->keyMap[key] = library; d->keyList += keys.at(k); } @@ -194,29 +225,85 @@ QStringList QFactoryLoader::keys() const Q_D(const QFactoryLoader); QMutexLocker locker(&d->mutex); QStringList keys = d->keyList; - QObjectList instances = QPluginLoader::staticInstances(); - for (int i = 0; i < instances.count(); ++i) - if (QFactoryInterface *factory = qobject_cast(instances.at(i))) - if (instances.at(i)->qt_metacast(d->iid)) + QVector staticPlugins = QLibraryPrivate::staticPlugins(); + for (int i = 0; i < staticPlugins.count(); ++i) { + if (staticPlugins.at(i).metaData) { + const char *rawMetaData = staticPlugins.at(i).metaData(); + QJsonObject object = QLibraryPrivate::fromRawMetaData(rawMetaData).object(); + if (object.value(QLatin1String("IID")) != QLatin1String(d->iid.constData(), d->iid.size())) + continue; + + QJsonObject meta = object.value(QLatin1String("MetaData")).toObject(); + QJsonArray a = meta.value(QLatin1String("Keys")).toArray(); + for (int i = 0; i < a.size(); ++i) { + QString s = a.at(i).toString(); + if (!s.isEmpty()) + keys += s; + } + } else { + // compat plugin + QObject *instance = staticPlugins.at(i).instance(); + QFactoryInterface *factory = qobject_cast(instance); + if (instance && factory && instance->qt_metacast(d->iid)) keys += factory->keys(); + } + } return keys; } +QList QFactoryLoader::metaData() const +{ + Q_D(const QFactoryLoader); + QMutexLocker locker(&d->mutex); + QList metaData; + for (int i = 0; i < d->libraryList.size(); ++i) + metaData.append(d->libraryList.at(i)->metaData); + + QVector staticPlugins = QLibraryPrivate::staticPlugins(); + for (int i = 0; i < staticPlugins.count(); ++i) { + if (staticPlugins.at(i).metaData) { + const char *rawMetaData = staticPlugins.at(i).metaData(); + QJsonObject object = QLibraryPrivate::fromRawMetaData(rawMetaData).object(); + if (object.value(QLatin1String("IID")) != QLatin1String(d->iid.constData(), d->iid.size())) + continue; + + QJsonObject meta = object.value(QLatin1String("MetaData")).toObject(); + metaData.append(meta); + } else { + // compat plugins + QObject *instance = staticPlugins.at(i).instance(); + QFactoryInterface *factory = qobject_cast(instance); + if (instance && factory && instance->qt_metacast(d->iid)) { + QJsonObject meta; + QJsonArray a = QJsonArray::fromStringList(factory->keys()); + meta.insert(QLatin1String("Keys"), a); + metaData.append(meta); + } + } + } + return metaData; +} + QObject *QFactoryLoader::instance(const QString &key) const { Q_D(const QFactoryLoader); QMutexLocker locker(&d->mutex); - QObjectList instances = QPluginLoader::staticInstances(); - for (int i = 0; i < instances.count(); ++i) - if (QFactoryInterface *factory = qobject_cast(instances.at(i))) - if (instances.at(i)->qt_metacast(d->iid) && factory->keys().contains(key, Qt::CaseInsensitive)) - return instances.at(i); + QVector staticPlugins = QLibraryPrivate::staticPlugins(); + for (int i = 0; i < staticPlugins.count(); ++i) { + QObject *instance = staticPlugins.at(i).instance(); + if (QFactoryInterface *factory = qobject_cast(instance)) + if (instance->qt_metacast(d->iid) && factory->keys().contains(key, Qt::CaseInsensitive)) + return instance; + } QString lowered = d->cs ? key : key.toLower(); if (QLibraryPrivate* library = d->keyMap.value(lowered)) { if (library->instance || library->loadPlugin()) { - if (QObject *obj = library->instance()) { - if (obj && !obj->parent()) + if (!library->inst) + library->inst = library->instance(); + QObject *obj = library->inst.data(); + if (obj) { + if (!obj->parent()) obj->moveToThread(QCoreApplicationPrivate::mainThread()); return obj; } @@ -225,6 +312,26 @@ QObject *QFactoryLoader::instance(const QString &key) const return 0; } +QObject *QFactoryLoader::instance(int index) const +{ + Q_D(const QFactoryLoader); + if (index < 0 || index >= d->libraryList.size()) + return 0; + + QLibraryPrivate *library = d->libraryList.at(index); + if (library->instance || library->loadPlugin()) { + if (!library->inst) + library->inst = library->instance(); + QObject *obj = library->inst.data(); + if (obj) { + if (!obj->parent()) + obj->moveToThread(QCoreApplicationPrivate::mainThread()); + return obj; + } + } + return 0; +} + #if defined(Q_OS_UNIX) && !defined (Q_OS_MAC) QLibraryPrivate *QFactoryLoader::library(const QString &key) const { diff --git a/src/corelib/plugin/qfactoryloader_p.h b/src/corelib/plugin/qfactoryloader_p.h index 2241a22e5f9..ee7a68d6f89 100644 --- a/src/corelib/plugin/qfactoryloader_p.h +++ b/src/corelib/plugin/qfactoryloader_p.h @@ -55,8 +55,8 @@ #include "QtCore/qobject.h" #include "QtCore/qstringlist.h" +#include "QtCore/qjsonobject.h" #include "private/qlibrary_p.h" - #ifndef QT_NO_LIBRARY QT_BEGIN_NAMESPACE @@ -74,8 +74,11 @@ public: Qt::CaseSensitivity = Qt::CaseSensitive); ~QFactoryLoader(); - QStringList keys() const; - QObject *instance(const QString &key) const; + QT_DEPRECATED QStringList keys() const; + QList metaData() const; + + QT_DEPRECATED QObject *instance(const QString &key) const; + QObject *instance(int index) const; #if defined(Q_OS_UNIX) && !defined (Q_OS_MAC) QLibraryPrivate *library(const QString &key) const; diff --git a/src/corelib/plugin/qlibrary.cpp b/src/corelib/plugin/qlibrary.cpp index dc08b32db18..b171577184e 100644 --- a/src/corelib/plugin/qlibrary.cpp +++ b/src/corelib/plugin/qlibrary.cpp @@ -60,6 +60,9 @@ #include #include #include +#include +#include +#include #include "qelfparser_p.h" QT_BEGIN_NAMESPACE @@ -330,7 +333,7 @@ static long qt_find_pattern(const char *s, ulong s_len, information could not be read. Returns true if version information is present and successfully read. */ -static bool qt_unix_query(const QString &library, uint *version, bool *debug, QLibraryPrivate *lib = 0) +static bool qt_unix_query(const QString &library, QLibraryPrivate *lib) { QFile file(library); if (!file.open(QIODevice::ReadOnly)) { @@ -357,35 +360,71 @@ static bool qt_unix_query(const QString &library, uint *version, bool *debug, QL /* ELF binaries on GNU, have .qplugin sections. */ + bool hasMetaData = false; long pos = 0; - const char pattern[] = "pattern=QT_PLUGIN_VERIFICATION_DATA"; + const char oldPattern[] = "pattern=QT_PLUGIN_VERIFICATION_DATA"; + const ulong oldPlen = qstrlen(oldPattern); + const char pattern[] = "QTMETADATA "; const ulong plen = qstrlen(pattern); #if defined (Q_OF_ELF) && defined(Q_CC_GNU) int r = QElfParser().parse(filedata, fdlen, library, lib, &pos, &fdlen); - if (r == QElfParser::NoQtSection) { + if (r == QElfParser::Corrupt || r == QElfParser::NotElf) { + if (lib && qt_debug_component()) { + qWarning("QElfParser: %s",qPrintable(lib->errorString)); + } + return false; + } else if (r == QElfParser::NoQtSection || r == QElfParser::QtPluginSection) { if (pos > 0) { // find inside .rodata - long rel = qt_find_pattern(filedata + pos, fdlen, pattern, plen); + long rel = qt_find_pattern(filedata + pos, fdlen, oldPattern, oldPlen); if (rel < 0) { pos = -1; } else { pos += rel; } } else { - pos = qt_find_pattern(filedata, fdlen, pattern, plen); + pos = qt_find_pattern(filedata, fdlen, oldPattern, oldPlen); } - } else if (r != QElfParser::Ok) { - if (lib && qt_debug_component()) { - qWarning("QElfParser: %s",qPrintable(lib->errorString)); - } - return false; + } else if (r == QElfParser::QtMetaDataSection) { + long rel = qt_find_pattern(filedata + pos, fdlen, pattern, plen); + if (rel < 0) + pos = -1; + else + pos += rel; + hasMetaData = true; } #else pos = qt_find_pattern(filedata, fdlen, pattern, plen); + if (pos > 0) + hasMetaData = true; + else + pos = qt_find_pattern(filedata, fdlen, oldPattern, oldPlen); #endif // defined(Q_OF_ELF) && defined(Q_CC_GNU) + bool ret = false; - if (pos >= 0) - ret = qt_parse_pattern(filedata + pos, version, debug); + + if (pos >= 0) { + if (hasMetaData) { + const char *data = filedata + pos; + QJsonDocument doc = QLibraryPrivate::fromRawMetaData(data); + lib->metaData = doc.object(); + lib->compatPlugin = false; + if (qt_debug_component()) + qWarning("Found metadata in lib %s, metadata=\n%s\n", + library.toLocal8Bit().constData(), doc.toJson().constData()); + ret = !doc.isNull(); + } else { + qWarning("Old plugin format found in lib %s", library.toLocal8Bit().constData()); + uint version; + bool isDebug; + ret = qt_parse_pattern(filedata + pos, &version, &isDebug); + if (ret) { + lib->metaData.insert(QLatin1String("version"), (int)version); + lib->metaData.insert(QLatin1String("debug"), isDebug); + lib->compatPlugin = true; + } + } + } if (!ret && lib) lib->errorString = QLibrary::tr("Plugin verification data mismatch in '%1'").arg(library); @@ -446,8 +485,9 @@ static LibraryMap *libraryMap() } QLibraryPrivate::QLibraryPrivate(const QString &canonicalFileName, const QString &version) - :pHnd(0), fileName(canonicalFileName), fullVersion(version), instance(0), qt_version(0), - libraryRefCount(1), libraryUnloadCount(0), pluginState(MightBeAPlugin) + : pHnd(0), fileName(canonicalFileName), fullVersion(version), instance(0), + compatPlugin(false), loadHints(0), + libraryRefCount(1), libraryUnloadCount(0), pluginState(MightBeAPlugin) { libraryMap()->insert(canonicalFileName, this); } QLibraryPrivate *QLibraryPrivate::findOrCreate(const QString &fileName, const QString &version) @@ -488,6 +528,8 @@ bool QLibraryPrivate::load() return false; bool ret = load_sys(); + if (qt_debug_component()) + qDebug() << "loaded library" << fileName; if (ret) { //when loading a library we add a reference to it so that the QLibraryPrivate won't get deleted //this allows to unload the library at a later time @@ -643,13 +685,9 @@ const char* qt_try_versioninfo(void *pfn, bool *exceptionThrown) } #endif -#ifdef Q_CC_BOR -typedef const char * __stdcall (*QtPluginQueryVerificationDataFunction)(); -#else typedef const char * (*QtPluginQueryVerificationDataFunction)(); -#endif -bool qt_get_verificationdata(QtPluginQueryVerificationDataFunction pfn, uint *qt_version, bool *debug, bool *exceptionThrown) +bool qt_get_verificationdata(QtPluginQueryVerificationDataFunction pfn, QLibraryPrivate *priv, bool *exceptionThrown) { *exceptionThrown = false; const char *szData = 0; @@ -662,9 +700,41 @@ bool qt_get_verificationdata(QtPluginQueryVerificationDataFunction pfn, uint *qt #else szData = pfn(); #endif - return qt_parse_pattern(szData, qt_version, debug); + uint qt_version; + bool debug; + if (qt_parse_pattern(szData, &qt_version, &debug)) { + priv->metaData.insert(QLatin1String("version"), (int)qt_version); + priv->metaData.insert(QLatin1String("debug"), debug); + priv->compatPlugin = true; + return true; + } + return false; } +bool qt_get_metadata(QtPluginQueryVerificationDataFunction pfn, QLibraryPrivate *priv, bool *exceptionThrown) +{ + *exceptionThrown = false; + const char *szData = 0; + if (!pfn) + return false; +#ifdef QT_USE_MS_STD_EXCEPTION + szData = qt_try_versioninfo((void *)pfn, exceptionThrown); + if (*exceptionThrown) + return false; +#else + szData = pfn(); +#endif + if (!szData) + return false; + QJsonDocument doc = QLibraryPrivate::fromRawMetaData(szData); + if (doc.isNull()) + return false; + priv->metaData = doc.object(); + priv->compatPlugin = false; + return true; +} + + bool QLibraryPrivate::isPlugin() { errorString.clear(); @@ -672,7 +742,6 @@ bool QLibraryPrivate::isPlugin() return pluginState == IsAPlugin; #ifndef QT_NO_PLUGIN_CHECK - bool debug = !QLIBRARY_AS_DEBUG; bool success = false; #if defined(Q_OS_UNIX) && !defined(Q_OS_MAC) @@ -692,7 +761,7 @@ bool QLibraryPrivate::isPlugin() #if defined(Q_OS_UNIX) && !defined(Q_OS_MAC) if (!pHnd) { // use unix shortcut to avoid loading the library - success = qt_unix_query(fileName, &qt_version, &debug, this); + success = qt_unix_query(fileName, this); } else #endif { @@ -713,24 +782,50 @@ bool QLibraryPrivate::isPlugin() temporary_load = load_sys(); #endif } -#ifdef Q_OS_WIN - QtPluginQueryVerificationDataFunction qtPluginQueryVerificationDataFunction = hTempModule ? (QtPluginQueryVerificationDataFunction) -#ifdef Q_OS_WINCE - ::GetProcAddress(hTempModule, L"qt_plugin_query_verification_data") -#else - ::GetProcAddress(hTempModule, "qt_plugin_query_verification_data") -#endif - : (QtPluginQueryVerificationDataFunction) resolve("qt_plugin_query_verification_data"); -#else - QtPluginQueryVerificationDataFunction qtPluginQueryVerificationDataFunction = NULL; - qtPluginQueryVerificationDataFunction = (QtPluginQueryVerificationDataFunction) resolve("qt_plugin_query_verification_data"); -#endif + QtPluginQueryVerificationDataFunction getMetaData = NULL; + bool exceptionThrown = false; - bool ret = qt_get_verificationdata(qtPluginQueryVerificationDataFunction, - &qt_version, &debug, &exceptionThrown); + bool ret = false; +#ifdef Q_OS_WIN + if (hTempModule) { + getMetaData = (QtPluginQueryVerificationDataFunction) +#ifdef Q_OS_WINCE + ::GetProcAddress(hTempModule, L"qt_plugin_query_metadata") +#else + ::GetProcAddress(hTempModule, "qt_plugin_query_metadata") +#endif + ; + } else +#endif + { + getMetaData = (QtPluginQueryVerificationDataFunction) resolve("qt_plugin_query_metadata"); + } + + if (getMetaData) { + ret = qt_get_metadata(getMetaData, this, &exceptionThrown); + } else { + // try the old plugin style + QtPluginQueryVerificationDataFunction qtPluginQueryVerificationDataFunction = NULL; +#ifdef Q_OS_WIN + if (hTempModule) { + qtPluginQueryVerificationDataFunction = (QtPluginQueryVerificationDataFunction) +#ifdef Q_OS_WINCE + ::GetProcAddress(hTempModule, L"qt_plugin_query_verification_data") +#else + ::GetProcAddress(hTempModule, "qt_plugin_query_verification_data") +#endif + ; + } else +#endif + { + qtPluginQueryVerificationDataFunction = (QtPluginQueryVerificationDataFunction) resolve("qt_plugin_query_verification_data"); + } + + ret = qt_get_verificationdata(qtPluginQueryVerificationDataFunction, this, &exceptionThrown); + } + if (!exceptionThrown) { if (!ret) { - qt_version = 0; if (temporary_load) unload_sys(); } else { @@ -772,6 +867,8 @@ bool QLibraryPrivate::isPlugin() pluginState = IsNotAPlugin; // be pessimistic + uint qt_version = (uint)metaData.value(QLatin1String("version")).toDouble(); + bool debug = metaData.value(QLatin1String("debug")).toBool(); if ((qt_version & 0x00ff00) > (QT_VERSION & 0x00ff00) || (qt_version & 0xff0000) != (QT_VERSION & 0xff0000)) { if (qt_debug_component()) { qWarning("In %s:\n" diff --git a/src/corelib/plugin/qlibrary_p.h b/src/corelib/plugin/qlibrary_p.h index a5f366070ce..604a5fbddee 100644 --- a/src/corelib/plugin/qlibrary_p.h +++ b/src/corelib/plugin/qlibrary_p.h @@ -58,6 +58,9 @@ #include "QtCore/qstringlist.h" #include "QtCore/qplugin.h" #include "QtCore/qsharedpointer.h" +#include "QtCore/qjsonobject.h" +#include "QtCore/qjsondocument.h" +#include "QtCore/qendian.h" #ifdef Q_OS_WIN # include "QtCore/qt_windows.h" #endif @@ -90,16 +93,26 @@ public: static QLibraryPrivate *findOrCreate(const QString &fileName, const QString &version = QString()); + static QVector staticPlugins(); + + QWeakPointer inst; QtPluginInstanceFunction instance; - uint qt_version; - QString lastModified; + QJsonObject metaData; + bool compatPlugin; QString errorString; QLibrary::LoadHints loadHints; bool isPlugin(); + static inline QJsonDocument fromRawMetaData(const char *raw) { + raw += strlen("QTMETADATA "); + // the size of the embedded JSON object can be found 8 bytes into the data (see qjson_p.h), + // but doesn't include the size of the header (8 bytes) + QByteArray json(raw, qFromLittleEndian(*(uint *)(raw + 8)) + 8); + return QJsonDocument::fromBinaryData(json); + } private: explicit QLibraryPrivate(const QString &canonicalFileName, const QString &version); @@ -112,7 +125,7 @@ private: QAtomicInt libraryRefCount; QAtomicInt libraryUnloadCount; - enum {IsAPlugin, IsNotAPlugin, MightBeAPlugin } pluginState; + enum { IsAPlugin, IsNotAPlugin, MightBeAPlugin } pluginState; friend class QLibraryPrivateHasFriends; }; diff --git a/src/corelib/plugin/qplugin.h b/src/corelib/plugin/qplugin.h index 6cc0ceb5c23..93be7248c34 100644 --- a/src/corelib/plugin/qplugin.h +++ b/src/corelib/plugin/qplugin.h @@ -59,15 +59,33 @@ QT_BEGIN_NAMESPACE #endif typedef QObject *(*QtPluginInstanceFunction)(); +typedef const char *(*QtPluginMetaDataFunction)(); + +struct QStaticPlugin +{ + QtPluginInstanceFunction instance; + QtPluginMetaDataFunction metaData; +}; + +void Q_CORE_EXPORT qRegisterStaticPluginFunction(QStaticPlugin staticPlugin); + +#if defined (Q_OF_ELF) && defined (Q_CC_GNU) +# define QT_PLUGIN_VERIFICATION_SECTION \ + __attribute__ ((section (".qtplugin"))) __attribute__((used)) +# define QT_PLUGIN_METADATA_SECTION \ + __attribute__ ((section (".qtmetadata"))) __attribute__((used)) +#else +# define QT_PLUGIN_VERIFICATION_SECTION +# define QT_PLUGIN_METADATA_SECTION +#endif -void Q_CORE_EXPORT qRegisterStaticPluginInstanceFunction(QtPluginInstanceFunction function); #define Q_IMPORT_PLUGIN(PLUGIN) \ - extern QT_PREPEND_NAMESPACE(QObject) *qt_plugin_instance_##PLUGIN(); \ + extern const QT_PREPEND_NAMESPACE(QStaticPlugin) qt_static_plugin_##PLUGIN(); \ class Static##PLUGIN##PluginInstance{ \ public: \ Static##PLUGIN##PluginInstance() { \ - qRegisterStaticPluginInstanceFunction(qt_plugin_instance_##PLUGIN); \ + qRegisterStaticPluginFunction(qt_static_plugin_##PLUGIN()); \ } \ }; \ static Static##PLUGIN##PluginInstance static##PLUGIN##Instance; @@ -80,21 +98,43 @@ void Q_CORE_EXPORT qRegisterStaticPluginInstanceFunction(QtPluginInstanceFunctio return _instance; \ } -# define Q_EXPORT_PLUGIN(PLUGIN) \ - Q_EXPORT_PLUGIN2(PLUGIN, PLUGIN) +#if defined(QT_STATICPLUGIN) -# define Q_EXPORT_STATIC_PLUGIN(PLUGIN) \ - Q_EXPORT_STATIC_PLUGIN2(PLUGIN, PLUGIN) +# define QT_MOC_EXPORT_PLUGIN(PLUGINCLASS) \ + static QT_PREPEND_NAMESPACE(QObject) *qt_plugin_instance() \ + Q_PLUGIN_INSTANCE(PLUGINCLASS) \ + static const char *qt_plugin_query_metadata() { return (const char *)qt_pluginMetaData; } \ + const QT_PREPEND_NAMESPACE(QStaticPlugin) qt_static_plugin_##PLUGINCLASS() { \ + QT_PREPEND_NAMESPACE(QStaticPlugin) plugin = { qt_plugin_instance, qt_plugin_query_metadata }; \ + return plugin; \ + } + +#else + +# define QT_MOC_EXPORT_PLUGIN(PLUGINCLASS) \ + Q_EXTERN_C Q_DECL_EXPORT \ + const char *qt_plugin_query_metadata() \ + { return (const char *)qt_pluginMetaData; } \ + Q_EXTERN_C Q_DECL_EXPORT QT_PREPEND_NAMESPACE(QObject) *qt_plugin_instance() \ + Q_PLUGIN_INSTANCE(PLUGINCLASS) + +#endif + + +#define Q_EXPORT_PLUGIN(PLUGIN) \ + Q_EXPORT_PLUGIN2(PLUGIN, PLUGIN) +#define Q_EXPORT_STATIC_PLUGIN(PLUGIN) +#define Q_EXPORT_STATIC_PLUGIN2(PLUGIN, PLUGINCLASS) #if defined(QT_STATICPLUGIN) # define Q_EXPORT_PLUGIN2(PLUGIN, PLUGINCLASS) \ - QT_PREPEND_NAMESPACE(QObject) \ - *qt_plugin_instance_##PLUGIN() \ - Q_PLUGIN_INSTANCE(PLUGINCLASS) - -# define Q_EXPORT_STATIC_PLUGIN2(PLUGIN, PLUGINCLASS) \ - Q_EXPORT_PLUGIN2(PLUGIN, PLUGINCLASS) + static QT_PREPEND_NAMESPACE(QObject) *qt_plugin_instance() \ + Q_PLUGIN_INSTANCE(PLUGINCLASS) \ + const QT_PREPEND_NAMESPACE(QStaticPlugin) qt_static_plugin_##PLUGIN() { \ + QT_PREPEND_NAMESPACE(QStaticPlugin) plugin = { qt_plugin_instance, 0 }; \ + return plugin; \ + } #else // NOTE: if you change pattern, you MUST change the pattern in @@ -114,29 +154,17 @@ void Q_CORE_EXPORT qRegisterStaticPluginInstanceFunction(QtPluginInstanceFunctio # endif # define Q_PLUGIN_VERIFICATION_DATA \ static const char qt_plugin_verification_data[] = \ - "pattern=""QT_PLUGIN_VERIFICATION_DATA""\n" \ - "version="QT_VERSION_STR"\n" \ - "debug="QPLUGIN_DEBUG_STR; + "pattern=" "QT_PLUGIN_VERIFICATION_DATA" "\n" \ + "version=" QT_VERSION_STR "\n" \ + "debug=" QPLUGIN_DEBUG_STR; -# if defined (Q_OF_ELF) && defined (Q_CC_GNU) -# define Q_PLUGIN_VERIFICATION_SECTION \ - __attribute__ ((section (".qtplugin"))) __attribute__((used)) -# else -# define Q_PLUGIN_VERIFICATION_SECTION -# endif - -# if defined (Q_OS_WIN32) && defined(Q_CC_BOR) -# define Q_STANDARD_CALL __stdcall -# else -# define Q_STANDARD_CALL -# endif # define Q_EXPORT_PLUGIN2(PLUGIN, PLUGINCLASS) \ - Q_PLUGIN_VERIFICATION_SECTION Q_PLUGIN_VERIFICATION_DATA \ + QT_PLUGIN_VERIFICATION_SECTION Q_PLUGIN_VERIFICATION_DATA \ Q_EXTERN_C Q_DECL_EXPORT \ - const char * Q_STANDARD_CALL qt_plugin_query_verification_data() \ + const char * qt_plugin_query_verification_data() \ { return qt_plugin_verification_data; } \ - Q_EXTERN_C Q_DECL_EXPORT QT_PREPEND_NAMESPACE(QObject) * Q_STANDARD_CALL qt_plugin_instance() \ + Q_EXTERN_C Q_DECL_EXPORT QT_PREPEND_NAMESPACE(QObject) * qt_plugin_instance() \ Q_PLUGIN_INSTANCE(PLUGINCLASS) # define Q_EXPORT_STATIC_PLUGIN2(PLUGIN, PLUGINCLASS) diff --git a/src/corelib/plugin/qpluginloader.cpp b/src/corelib/plugin/qpluginloader.cpp index 4ef04f2ea3d..d652b251f14 100644 --- a/src/corelib/plugin/qpluginloader.cpp +++ b/src/corelib/plugin/qpluginloader.cpp @@ -291,8 +291,8 @@ QString QPluginLoader::errorString() const return (!d || d->errorString.isEmpty()) ? tr("Unknown error") : d->errorString; } -typedef QList StaticInstanceFunctionList; -Q_GLOBAL_STATIC(StaticInstanceFunctionList, staticInstanceFunctionList) +typedef QVector StaticPluginList; +Q_GLOBAL_STATIC(StaticPluginList, staticPluginList) /*! \since 4.4 @@ -329,13 +329,13 @@ QLibrary::LoadHints QPluginLoader::loadHints() const /*! \relates QPluginLoader - \since 4.4 + \since 5.0 - Registers the given \a function with the plugin loader. + Registers the given \a plugin with the plugin loader. */ -void Q_CORE_EXPORT qRegisterStaticPluginInstanceFunction(QtPluginInstanceFunction function) +void Q_CORE_EXPORT qRegisterStaticPluginFunction(QStaticPlugin plugin) { - staticInstanceFunctionList()->append(function); + staticPluginList()->append(plugin); } /*! @@ -345,14 +345,23 @@ void Q_CORE_EXPORT qRegisterStaticPluginInstanceFunction(QtPluginInstanceFunctio QObjectList QPluginLoader::staticInstances() { QObjectList instances; - StaticInstanceFunctionList *functions = staticInstanceFunctionList(); - if (functions) { - for (int i = 0; i < functions->count(); ++i) - instances.append((*functions)[i]()); + const StaticPluginList *plugins = staticPluginList(); + if (plugins) { + for (int i = 0; i < plugins->size(); ++i) + instances += plugins->at(i).instance(); } return instances; } + +QVector QLibraryPrivate::staticPlugins() +{ + StaticPluginList *plugins = staticPluginList(); + if (plugins) + return *plugins; + return QVector(); +} + QT_END_NAMESPACE #endif // QT_NO_LIBRARY diff --git a/src/corelib/plugin/qpluginloader.h b/src/corelib/plugin/qpluginloader.h index ee62986f212..6ca1892fa92 100644 --- a/src/corelib/plugin/qpluginloader.h +++ b/src/corelib/plugin/qpluginloader.h @@ -55,7 +55,6 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE - class QLibraryPrivate; class Q_CORE_EXPORT QPluginLoader : public QObject @@ -70,7 +69,7 @@ public: QObject *instance(); - static QObjectList staticInstances(); + QT_DEPRECATED static QObjectList staticInstances(); bool load(); bool unload(); diff --git a/src/corelib/plugin/quuid.cpp b/src/corelib/plugin/quuid.cpp index 7b1c682e21a..3d7988a8fca 100644 --- a/src/corelib/plugin/quuid.cpp +++ b/src/corelib/plugin/quuid.cpp @@ -45,6 +45,9 @@ #include "qendian.h" #include "qdebug.h" +#ifndef QT_BOOTSTRAPPED +#include "qcryptographichash.h" +#endif QT_BEGIN_NAMESPACE #ifndef QT_NO_QUUID_STRING @@ -133,6 +136,7 @@ bool _q_uuidFromHex(const Char *&src, uint &d1, ushort &d2, ushort &d3, uchar (& } #endif +#ifndef QT_BOOTSTRAPPED static QUuid createFromName(const QUuid &ns, const QByteArray &baseData, QCryptographicHash::Algorithm algorithm, int version) { QByteArray hashResult; @@ -155,6 +159,7 @@ static QUuid createFromName(const QUuid &ns, const QByteArray &baseData, QCrypto return result; } +#endif /*! \class QUuid @@ -437,7 +442,7 @@ QUuid::QUuid(const QByteArray &text) \sa variant(), version(), createUuidV3() */ - +#ifndef QT_BOOTSTRAPPED QUuid QUuid::createUuidV3(const QUuid &ns, const QByteArray &baseData) { return createFromName(ns, baseData, QCryptographicHash::Md5, 3); @@ -447,6 +452,7 @@ QUuid QUuid::createUuidV5(const QUuid &ns, const QByteArray &baseData) { return createFromName(ns, baseData, QCryptographicHash::Sha1, 5); } +#endif /*! Creates a QUuid object from the binary representation of the UUID, as diff --git a/src/corelib/plugin/quuid.h b/src/corelib/plugin/quuid.h index a55d6af3eba..dee97d93a57 100644 --- a/src/corelib/plugin/quuid.h +++ b/src/corelib/plugin/quuid.h @@ -43,7 +43,6 @@ #define QUUID_H #include -#include QT_BEGIN_HEADER @@ -175,6 +174,7 @@ public: } #endif static QUuid createUuid(); +#ifndef QT_BOOTSTRAPPED static QUuid createUuidV3(const QUuid &ns, const QByteArray &baseData); static QUuid createUuidV5(const QUuid &ns, const QByteArray &baseData); #ifndef QT_NO_QUUID_STRING @@ -188,6 +188,7 @@ public: return QUuid::createUuidV5(ns, baseData.toUtf8()); } +#endif #endif QUuid::Variant variant() const; diff --git a/src/corelib/statemachine/qsignaleventgenerator_p.h b/src/corelib/statemachine/qsignaleventgenerator_p.h index 2cdca89424a..c117a92a01f 100644 --- a/src/corelib/statemachine/qsignaleventgenerator_p.h +++ b/src/corelib/statemachine/qsignaleventgenerator_p.h @@ -61,13 +61,13 @@ class QStateMachine; class QSignalEventGenerator : public QObject { + Q_OBJECT_FAKE public: QSignalEventGenerator(QStateMachine *parent); - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const; - virtual void *qt_metacast(const char *); - virtual int qt_metacall(QMetaObject::Call, int, void **argv); +private: +// slots + void execute(void **_a); private: Q_DISABLE_COPY(QSignalEventGenerator) diff --git a/src/corelib/statemachine/qstatemachine.cpp b/src/corelib/statemachine/qstatemachine.cpp index 52fd806b055..7ff005f9a12 100644 --- a/src/corelib/statemachine/qstatemachine.cpp +++ b/src/corelib/statemachine/qstatemachine.cpp @@ -2210,16 +2210,19 @@ void QStateMachine::removeDefaultAnimation(QAbstractAnimation *animation) #endif // QT_NO_ANIMATION +// Begin moc-generated code -- modify carefully (check "HAND EDIT" parts)! static const uint qt_meta_data_QSignalEventGenerator[] = { // content: - 2, // revision + 6, // revision 0, // classname 0, 0, // classinfo - 1, 12, // methods + 1, 14, // methods 0, 0, // properties 0, 0, // enums/sets 0, 0, // constructors + 0, // flags + 0, // signalCount // slots: signature, parameters, type, tag, flags 23, 22, 22, 22, 0x0a, @@ -2231,9 +2234,26 @@ static const char qt_meta_stringdata_QSignalEventGenerator[] = { "QSignalEventGenerator\0\0execute()\0" }; +void QSignalEventGenerator::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a) +{ + if (_c == QMetaObject::InvokeMetaMethod) { + Q_ASSERT(staticMetaObject.cast(_o)); + QSignalEventGenerator *_t = static_cast(_o); + switch (_id) { + case 0: _t->execute(_a); break; // HAND EDIT: add the _a parameter + default: ; + } + } + Q_UNUSED(_a); +} + +const QMetaObjectExtraData QSignalEventGenerator::staticMetaObjectExtraData = { + 0, qt_static_metacall +}; + const QMetaObject QSignalEventGenerator::staticMetaObject = { { &QObject::staticMetaObject, qt_meta_stringdata_QSignalEventGenerator, - qt_meta_data_QSignalEventGenerator, 0 } + qt_meta_data_QSignalEventGenerator, &staticMetaObjectExtraData } }; const QMetaObject *QSignalEventGenerator::metaObject() const @@ -2255,26 +2275,27 @@ int QSignalEventGenerator::qt_metacall(QMetaObject::Call _c, int _id, void **_a) if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { - switch (_id) { - case 0: { -// ### in Qt 4.6 we can use QObject::senderSignalIndex() - QObjectPrivate *d = static_cast(d_ptr.data()); - int signalIndex = -1; - QObject *sender = this->sender(); - if (sender && d->currentSender) - signalIndex = d->currentSender->signal; - - Q_ASSERT(signalIndex != -1); - QStateMachine *machine = qobject_cast(parent()); - QStateMachinePrivate::get(machine)->handleTransitionSignal(sender, signalIndex, _a); - break; - } - default: ; - } + if (_id < 1) + qt_static_metacall(this, _c, _id, _a); _id -= 1; } return _id; } +// End moc-generated code + +void QSignalEventGenerator::execute(void **_a) +{ +// ### in Qt 4.6 we can use QObject::senderSignalIndex() + QObjectPrivate *d = static_cast(d_ptr.data()); + int signalIndex = -1; + QObject *sender = this->sender(); + if (sender && d->currentSender) + signalIndex = d->currentSender->signal; + + Q_ASSERT(signalIndex != -1); + QStateMachine *machine = qobject_cast(parent()); + QStateMachinePrivate::get(machine)->handleTransitionSignal(sender, signalIndex, _a); +} QSignalEventGenerator::QSignalEventGenerator(QStateMachine *parent) : QObject(parent) diff --git a/src/corelib/thread/qatomic.h b/src/corelib/thread/qatomic.h index b75ae94429b..94cef790db1 100644 --- a/src/corelib/thread/qatomic.h +++ b/src/corelib/thread/qatomic.h @@ -63,17 +63,11 @@ public: // Non-atomic API inline QAtomicInt(int value = 0) { -#ifdef QT_ARCH_PARISC - this->_q_lock[0] = this->_q_lock[1] = this->_q_lock[2] = this->_q_lock[3] = -1; -#endif _q_value = value; } inline QAtomicInt(const QAtomicInt &other) { -#ifdef QT_ARCH_PARISC - this->_q_lock[0] = this->_q_lock[1] = this->_q_lock[2] = this->_q_lock[3] = -1; -#endif store(other.load()); } @@ -123,16 +117,10 @@ class QAtomicPointer : public QBasicAtomicPointer public: inline QAtomicPointer(T *value = 0) { -#ifdef QT_ARCH_PARISC - this->_q_lock[0] = this->_q_lock[1] = this->_q_lock[2] = this->_q_lock[3] = -1; -#endif this->store(value); } inline QAtomicPointer(const QAtomicPointer &other) { -#ifdef QT_ARCH_PARISC - this->_q_lock[0] = this->_q_lock[1] = this->_q_lock[2] = this->_q_lock[3] = -1; -#endif this->store(other.load()); } diff --git a/src/corelib/thread/qbasicatomic.h b/src/corelib/thread/qbasicatomic.h index 47d690c13f7..96338c62dcf 100644 --- a/src/corelib/thread/qbasicatomic.h +++ b/src/corelib/thread/qbasicatomic.h @@ -46,30 +46,62 @@ #if defined(QT_MOC) || defined(QT_BUILD_QMAKE) || defined(QT_RCC) || defined(QT_UIC) || defined(QT_BOOTSTRAPPED) # include + +// Compiler dependent implementation #elif defined(Q_CC_MSVC) # include -#elif defined(__arm__) || defined(__TARGET_ARCH_ARM) -# include -#elif defined(__i386) || defined(__i386__) -# include -#elif defined(__ia64) || defined(__ia64__) + +// Operating system dependent implementation +#elif defined(Q_OS_INTEGRITY) +# include "QtCore/qatomic_integrity.h" +#elif defined(Q_OS_VXWORKS) +# include "QtCore/qatomic_vxworks.h" + +// Processor dependent implementation +#elif defined(Q_PROCESSOR_ALPHA) +# include "QtCore/qatomic_alpha.h" +#elif defined(Q_PROCESSOR_ARM_V7) +# include "QtCore/qatomic_armv7.h" +#elif defined(Q_PROCESSOR_ARM_V6) +# include "QtCore/qatomic_armv6.h" +#elif defined(Q_PROCESSOR_ARM_V5) +# include "QtCore/qatomic_armv5.h" +#elif defined(Q_PROCESSOR_BFIN) +# include "QtCore/qatomic_bfin.h" +#elif defined(Q_PROCESSOR_IA64) # include "QtCore/qatomic_ia64.h" -#elif defined(__mips) || defined(__mips__) +#elif defined(Q_PROCESSOR_MIPS) # include "QtCore/qatomic_mips.h" -#elif defined(__x86_64) || defined(__x86_64__) || defined(__amd64) +#elif defined(Q_PROCESSOR_POWER) +# include "QtCore/qatomic_power.h" +#elif defined(Q_PROCESSOR_S390) +# include "QtCore/qatomic_s390.h" +#elif defined(Q_PROCESSOR_SH4A) +# include "QtCore/qatomic_sh4a.h" +#elif defined(Q_PROCESSOR_SPARC) +# include "QtCore/qatomic_sparc.h" +#elif defined(Q_PROCESSOR_X86_32) +# include +#elif defined(Q_PROCESSOR_X86_64) # include + +// Fallback compiler dependent implementation #elif defined(Q_COMPILER_ATOMICS) && defined(Q_COMPILER_CONSTEXPR) # include #elif defined(Q_CC_GNU) # include + +// Fallback operating system dependent implementation +#elif defined(Q_OS_UNIX) +# include + +// No fallback #else -# define QT_OLD_ATOMICS +# error "Qt has not been ported to this platform" #endif -#ifdef QT_OLD_ATOMICS -# include "QtCore/qoldbasicatomic.h" -# undef QT_OLD_ATOMICS -#else +// Only include if the implementation has been ported to QAtomicOps +#ifndef QOLDBASICATOMIC_H QT_BEGIN_HEADER @@ -78,6 +110,10 @@ QT_BEGIN_NAMESPACE QT_MODULE(Core) #if 0 +// silence syncqt warnings +QT_END_NAMESPACE +QT_END_HEADER + #pragma qt_no_master_include #pragma qt_sync_stop_processing #endif @@ -226,7 +262,6 @@ QT_END_NAMESPACE QT_END_HEADER -#endif // QT_OLD_ATOMICS +#endif // QOLDBASICATOMIC_H - -#endif // QBASIC_ATOMIC +#endif // QBASICATOMIC_H diff --git a/src/corelib/thread/qgenericatomic.h b/src/corelib/thread/qgenericatomic.h index 984ebed47b8..f4d5e2f8d93 100644 --- a/src/corelib/thread/qgenericatomic.h +++ b/src/corelib/thread/qgenericatomic.h @@ -48,6 +48,10 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE #if 0 +// silence syncqt warnings +QT_END_NAMESPACE +QT_END_HEADER + #pragma qt_sync_stop_processing #endif diff --git a/src/corelib/thread/qmutex.cpp b/src/corelib/thread/qmutex.cpp index 4a64feff0e1..e13c78636c0 100644 --- a/src/corelib/thread/qmutex.cpp +++ b/src/corelib/thread/qmutex.cpp @@ -49,7 +49,7 @@ #include "qthread.h" #include "qmutex_p.h" -#ifndef Q_OS_LINUX +#ifndef Q_MUTEX_LINUX #include "private/qfreelist_p.h" #endif @@ -154,7 +154,7 @@ QMutex::~QMutex() if (quintptr(d) > 0x3 && d->recursive) { delete static_cast(d); } else if (d) { -#ifndef Q_OS_LINUX +#ifndef Q_MUTEX_LINUX if (d != dummyLocked() && static_cast(d)->possiblyUnlocked.load() && tryLock()) { unlock(); @@ -340,7 +340,7 @@ bool QBasicMutex::isRecursive() { \sa unlock() */ -#ifndef Q_OS_LINUX //linux implementation is in qmutex_linux.cpp +#ifndef Q_MUTEX_LINUX //linux implementation is in qmutex_linux.cpp /*! \internal helper for lock() */ diff --git a/src/corelib/thread/qmutex_p.h b/src/corelib/thread/qmutex_p.h index 3cf0938e943..8a9d0bf39bf 100644 --- a/src/corelib/thread/qmutex_p.h +++ b/src/corelib/thread/qmutex_p.h @@ -63,6 +63,11 @@ # include #endif +#if defined(Q_OS_LINUX) && !defined(QT_LINUXBASE) +// use Linux mutexes everywhere except for LSB builds +# define Q_MUTEX_LINUX +#endif + QT_BEGIN_NAMESPACE class QMutexData @@ -73,8 +78,9 @@ public: : recursive(mode == QMutex::Recursive) {} }; -#if !defined(Q_OS_LINUX) -class QMutexPrivate : public QMutexData { +#if !defined(Q_MUTEX_LINUX) +class QMutexPrivate : public QMutexData +{ public: ~QMutexPrivate(); QMutexPrivate(); @@ -122,7 +128,7 @@ public: Qt::HANDLE event; #endif }; -#endif //Q_OS_LINUX +#endif //Q_MUTEX_LINUX class QRecursiveMutexPrivate : public QMutexData { diff --git a/src/corelib/thread/qoldbasicatomic.h b/src/corelib/thread/qoldbasicatomic.h index a1985793ed1..4df07adfd06 100644 --- a/src/corelib/thread/qoldbasicatomic.h +++ b/src/corelib/thread/qoldbasicatomic.h @@ -50,6 +50,10 @@ QT_BEGIN_NAMESPACE #if 0 +// silence syncqt warnings +QT_END_NAMESPACE +QT_END_HEADER + #pragma qt_no_master_include #pragma qt_sync_stop_processing #endif @@ -57,16 +61,7 @@ QT_BEGIN_NAMESPACE class Q_CORE_EXPORT QBasicAtomicInt { public: -#ifdef QT_ARCH_PARISC - int _q_lock[4]; -#endif -#if defined(QT_ARCH_WINDOWS) || defined(QT_ARCH_WINDOWSCE) - union { // needed for Q_BASIC_ATOMIC_INITIALIZER - volatile long _q_value; - }; -#else volatile int _q_value; -#endif // Atomic API, implemented in qatomic_XXX.h @@ -110,22 +105,7 @@ template class QBasicAtomicPointer { public: -#ifdef QT_ARCH_PARISC - int _q_lock[4]; -#endif -#if defined(QT_ARCH_WINDOWS) || defined(QT_ARCH_WINDOWSCE) - union { - T * volatile _q_value; -# if !defined(Q_OS_WINCE) && !defined(__i386__) && !defined(_M_IX86) - qint64 -# else - long -# endif - volatile _q_value_integral; - }; -#else T * volatile _q_value; -#endif // Atomic API, implemented in qatomic_XXX.h @@ -159,17 +139,9 @@ public: T *fetchAndAddOrdered(qptrdiff valueToAdd); }; -#ifdef QT_ARCH_PARISC -# define Q_BASIC_ATOMIC_INITIALIZER(a) {{-1,-1,-1,-1},(a)} -#elif defined(QT_ARCH_WINDOWS) || defined(QT_ARCH_WINDOWSCE) -# define Q_BASIC_ATOMIC_INITIALIZER(a) { {(a)} } -#else -# define Q_BASIC_ATOMIC_INITIALIZER(a) { (a) } -#endif +#define Q_BASIC_ATOMIC_INITIALIZER(a) { (a) } QT_END_NAMESPACE QT_END_HEADER -# include - -#endif // QBASIC_ATOMIC +#endif // QOLDBASICATOMIC_H diff --git a/src/corelib/thread/qthread_unix.cpp b/src/corelib/thread/qthread_unix.cpp index 9ce951cf3b7..d458ee94724 100644 --- a/src/corelib/thread/qthread_unix.cpp +++ b/src/corelib/thread/qthread_unix.cpp @@ -90,6 +90,10 @@ # endif #endif +#if defined(Q_OS_LINUX) +#include +#endif + #if defined(Q_OS_LINUX) && !defined(SCHED_IDLE) // from linux/sched.h # define SCHED_IDLE 5 @@ -283,6 +287,20 @@ void *QThreadPrivate::start(void *arg) else createEventDispatcher(data); +#if !defined(QT_NO_DEBUG) && (defined(Q_OS_LINUX) || defined(Q_OS_MAC)) + // sets the name of the current thread. + QByteArray objectName = thr->objectName().toLocal8Bit(); + + if (objectName.isEmpty()) + objectName = thr->metaObject()->className(); + +#if defined(Q_OS_LINUX) + prctl(PR_SET_NAME, (unsigned long)objectName.constData(), 0, 0, 0); +#elif defined(Q_OS_MAC) + pthread_setname_np(objectName.constData()); +#endif +#endif + emit thr->started(); pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL); pthread_testcancel(); diff --git a/src/corelib/thread/thread.pri b/src/corelib/thread/thread.pri index 1eefa60d500..7f383d6a4c9 100644 --- a/src/corelib/thread/thread.pri +++ b/src/corelib/thread/thread.pri @@ -44,8 +44,12 @@ integrity:SOURCES += thread/qmutex_unix.cpp \ thread/qwaitcondition_unix.cpp unix: { - macx-* { SOURCES += thread/qmutex_mac.cpp } - else:linux-* { SOURCES += thread/qmutex_linux.cpp } - else { SOURCES += thread/qmutex_unix.cpp } + macx-* { + SOURCES += thread/qmutex_mac.cpp + } else:linux-*:!linux-lsb-* { + SOURCES += thread/qmutex_linux.cpp + } else { + SOURCES += thread/qmutex_unix.cpp + } } diff --git a/src/corelib/tools/qbytearray.h b/src/corelib/tools/qbytearray.h index c6546739593..bd3a4a84448 100644 --- a/src/corelib/tools/qbytearray.h +++ b/src/corelib/tools/qbytearray.h @@ -376,7 +376,7 @@ public: template inline QByteArray(const QStaticByteArrayData &dd) - : d(const_cast(&dd.str)) {} + : d(const_cast(&dd.ba)) {} template Q_DECL_CONSTEXPR inline QByteArray(QStaticByteArrayDataPtr dd) : d(const_cast(&dd.ptr->ba)) {} diff --git a/src/corelib/tools/qdatetime.cpp b/src/corelib/tools/qdatetime.cpp index 3da7a370667..70efb5db222 100644 --- a/src/corelib/tools/qdatetime.cpp +++ b/src/corelib/tools/qdatetime.cpp @@ -924,7 +924,7 @@ QDate QDate::addDays(qint64 ndays) const else diff = jd - minJd(); - if (abs(ndays) <= diff) + if ((quint64)qAbs(ndays) <= diff) d.jd = jd + ndays; return d; diff --git a/src/corelib/tools/qeasingcurve.cpp b/src/corelib/tools/qeasingcurve.cpp index 76c06cb0d54..5731faa69cf 100644 --- a/src/corelib/tools/qeasingcurve.cpp +++ b/src/corelib/tools/qeasingcurve.cpp @@ -1303,14 +1303,20 @@ void QEasingCurve::addTCBSegment(const QPointF &nextPoint, qreal t, qreal c, qre } /*! + \fn QList QEasingCurve::cubicBezierSpline() const + \obsolete Use toCubicSpline() instead. + */ + +/*! + \since 5.0 Returns the cubicBezierSpline that defines a custom easing curve. If the easing curve does not have a custom bezier easing curve the list is empty. - */ -QList QEasingCurve::cubicBezierSpline() const +*/ +QVector QEasingCurve::toCubicSpline() const { - return d_ptr->config ? d_ptr->config->_bezierCurves.toList() : QList(); + return d_ptr->config ? d_ptr->config->_bezierCurves : QVector(); } /*! diff --git a/src/corelib/tools/qeasingcurve.h b/src/corelib/tools/qeasingcurve.h index 4d53af591b0..ad2e510799f 100644 --- a/src/corelib/tools/qeasingcurve.h +++ b/src/corelib/tools/qeasingcurve.h @@ -44,7 +44,11 @@ #include #include -#include +#include +#if QT_DEPRECATED_SINCE(5, 0) +# include +# include +#endif QT_BEGIN_HEADER @@ -94,7 +98,10 @@ public: void addCubicBezierSegment(const QPointF & c1, const QPointF & c2, const QPointF & endPoint); void addTCBSegment(const QPointF &nextPoint, qreal t, qreal c, qreal b); - QList cubicBezierSpline() const; + QVector toCubicSpline() const; +#if QT_DEPRECATED_SINCE(5, 0) + QT_DEPRECATED QList cubicBezierSpline() const { return toCubicSpline().toList(); } +#endif Type type() const; void setType(Type type); diff --git a/src/corelib/tools/qline.cpp b/src/corelib/tools/qline.cpp index 1ca9a59bde1..78f1c442636 100644 --- a/src/corelib/tools/qline.cpp +++ b/src/corelib/tools/qline.cpp @@ -412,16 +412,12 @@ QDataStream &operator>>(QDataStream &stream, QLine &line) */ /*! + \fn bool QLineF::isNull() const + Returns true if the line is not set up with valid start and end point; otherwise returns false. */ -bool QLineF::isNull() const -{ - return (qFuzzyCompare(pt1.x(), pt2.x()) && qFuzzyCompare(pt1.y(), pt2.y())) ? true : false; -} - - /*! \fn QPointF QLineF::p1() const diff --git a/src/corelib/tools/qline.h b/src/corelib/tools/qline.h index 3c7977a207d..58ef0316ad1 100644 --- a/src/corelib/tools/qline.h +++ b/src/corelib/tools/qline.h @@ -310,6 +310,11 @@ inline qreal QLineF::y2() const return pt2.y(); } +inline bool QLineF::isNull() const +{ + return qFuzzyCompare(pt1.x(), pt2.x()) && qFuzzyCompare(pt1.y(), pt2.y()); +} + inline QPointF QLineF::p1() const { return pt1; diff --git a/src/corelib/tools/qlocale.qdoc b/src/corelib/tools/qlocale.qdoc index cc335a45755..2fff58333d9 100644 --- a/src/corelib/tools/qlocale.qdoc +++ b/src/corelib/tools/qlocale.qdoc @@ -595,7 +595,6 @@ \value Yugoslavia \value Zambia \value Zimbabwe - \value SerbiaAndMontenegro \value Montenegro \value Serbia \value SaintBarthelemy diff --git a/src/corelib/tools/qpoint.cpp b/src/corelib/tools/qpoint.cpp index 55a2261cb9d..ecbe9deb9fe 100644 --- a/src/corelib/tools/qpoint.cpp +++ b/src/corelib/tools/qpoint.cpp @@ -402,6 +402,8 @@ QDataStream &operator>>(QDataStream &s, QPoint &p) #endif // QT_NO_DATASTREAM /*! + \fn int QPoint::manhattanLength() const + Returns the sum of the absolute values of x() and y(), traditionally known as the "Manhattan length" of the vector from the origin to the point. For example: @@ -417,10 +419,6 @@ QDataStream &operator>>(QDataStream &s, QPoint &p) apply to travelers who can only travel on a rectangular grid, like the streets of Manhattan. */ -int QPoint::manhattanLength() const -{ - return qAbs(x())+qAbs(y()); -} #ifndef QT_NO_DEBUG_STREAM QDebug operator<<(QDebug dbg, const QPoint &p) { @@ -505,6 +503,7 @@ QDebug operator<<(QDebug d, const QPointF &p) /*! + \fn qreal QPointF::manhattanLength() const \since 4.6 Returns the sum of the absolute values of x() and y(), @@ -513,10 +512,6 @@ QDebug operator<<(QDebug d, const QPointF &p) \sa QPoint::manhattanLength() */ -qreal QPointF::manhattanLength() const -{ - return qAbs(x())+qAbs(y()); -} /*! \fn qreal QPointF::x() const diff --git a/src/corelib/tools/qpoint.h b/src/corelib/tools/qpoint.h index 827de3936c2..2e987fcf411 100644 --- a/src/corelib/tools/qpoint.h +++ b/src/corelib/tools/qpoint.h @@ -130,6 +130,9 @@ inline void QPoint::setX(int xpos) inline void QPoint::setY(int ypos) { yp = ypos; } +inline int QPoint::manhattanLength() const +{ return qAbs(x())+qAbs(y()); } + inline int &QPoint::rx() { return xp; } @@ -267,6 +270,11 @@ inline QPointF::QPointF(qreal xpos, qreal ypos) : xp(xpos), yp(ypos) { } inline QPointF::QPointF(const QPoint &p) : xp(p.x()), yp(p.y()) { } +inline qreal QPointF::manhattanLength() const +{ + return qAbs(x())+qAbs(y()); +} + inline bool QPointF::isNull() const { return qIsNull(xp) && qIsNull(yp); diff --git a/src/corelib/tools/qregexp.cpp b/src/corelib/tools/qregexp.cpp index 421d15c436a..e8c0d4eccc8 100644 --- a/src/corelib/tools/qregexp.cpp +++ b/src/corelib/tools/qregexp.cpp @@ -426,7 +426,7 @@ int qFindString(const QChar *haystack, int haystackLen, int from, For historical reasons, quantifiers (e.g. \bold{*}) that apply to capturing parentheses are more "greedy" than other quantifiers. - For example, \bold{a*(a)*} will match "aaa" with cap(1) == "aaa". + For example, \bold{a*(a*)} will match "aaa" with cap(1) == "aaa". This behavior is different from what other regexp engines do (notably, Perl). To obtain a more intuitive capturing behavior, specify QRegExp::RegExp2 to the QRegExp constructor or call @@ -670,7 +670,7 @@ int qFindString(const QChar *haystack, int haystackLen, int from, Wildcard matching can be convenient because of its simplicity, but any wildcard regexp can be defined using full regexps, e.g. - \bold{.*\.html$}. Notice that we can't match both \c .html and \c + \bold{.*\\.html$}. Notice that we can't match both \c .html and \c .htm files with a wildcard unless we use \bold{*.htm*} which will also match 'test.html.bak'. A full regexp gives us the precision we need, \bold{.*\\.html?$}. diff --git a/src/corelib/tools/qsharedpointer.cpp b/src/corelib/tools/qsharedpointer.cpp index ee0aee23990..77c3d1e2cb7 100644 --- a/src/corelib/tools/qsharedpointer.cpp +++ b/src/corelib/tools/qsharedpointer.cpp @@ -1226,24 +1226,22 @@ QT_BEGIN_NAMESPACE /*! \internal This function is called for a just-created QObject \a obj, to enable - the use of QSharedPointer and QWeakPointer. + the use of QSharedPointer and QWeakPointer in the future. + */ +void QtSharedPointer::ExternalRefCountData::setQObjectShared(const QObject *, bool) +{} - When QSharedPointer is active in a QObject, the object must not be deleted - directly: the lifetime is managed by the QSharedPointer object. In that case, - the deleteLater() and parent-child relationship in QObject only decrease - the strong reference count, instead of deleting the object. +/*! + \internal + This function is called when a QSharedPointer is created from a QWeakPointer + + We check that the QWeakPointer was really created from a QSharedPointer, and + not from a QObject. */ -void QtSharedPointer::ExternalRefCountData::setQObjectShared(const QObject *obj, bool) +void QtSharedPointer::ExternalRefCountData::checkQObjectShared(const QObject *) { - Q_ASSERT(obj); - QObjectPrivate *d = QObjectPrivate::get(const_cast(obj)); - - if (d->sharedRefcount.load() != 0) - qFatal("QSharedPointer: pointer %p already has reference counting", obj); - d->sharedRefcount.store(this); - - // QObject decreases the refcount too, so increase it up - weakref.ref(); + if (strongref.load() < 0) + qWarning("QSharedPointer: cannot create a QSharedPointer from a QObject-tracking QWeakPointer"); } QtSharedPointer::ExternalRefCountData *QtSharedPointer::ExternalRefCountData::getAndRef(const QObject *obj) diff --git a/src/corelib/tools/qsharedpointer_impl.h b/src/corelib/tools/qsharedpointer_impl.h index ebab027196f..58010dd8d9e 100644 --- a/src/corelib/tools/qsharedpointer_impl.h +++ b/src/corelib/tools/qsharedpointer_impl.h @@ -192,7 +192,9 @@ namespace QtSharedPointer { #ifndef QT_NO_QOBJECT Q_CORE_EXPORT static ExternalRefCountData *getAndRef(const QObject *); Q_CORE_EXPORT void setQObjectShared(const QObject *, bool enable); + Q_CORE_EXPORT void checkQObjectShared(const QObject *); #endif + inline void checkQObjectShared(...) { } inline void setQObjectShared(...) { } }; // sizeof(ExternalRefCount) = 12 (32-bit) / 16 (64-bit) @@ -432,10 +434,12 @@ namespace QtSharedPointer { tmp = o->strongref.load(); // failed, try again } - if (tmp > 0) + if (tmp > 0) { o->weakref.ref(); - else + } else { + o->checkQObjectShared(actual); o = 0; + } } qSwap(d, o); diff --git a/src/corelib/tools/qsimd.cpp b/src/corelib/tools/qsimd.cpp index d65dfa35a64..b3d2d62819b 100644 --- a/src/corelib/tools/qsimd.cpp +++ b/src/corelib/tools/qsimd.cpp @@ -47,7 +47,7 @@ # if defined(Q_OS_WINCE) # include # endif -# if defined(Q_OS_WIN64) && !defined(Q_CC_GNU) +# if defined(Q_OS_WIN64) # include # endif #elif defined(Q_OS_LINUX) && defined(__arm__) diff --git a/src/corelib/tools/qsimd_p.h b/src/corelib/tools/qsimd_p.h index 47c4a9952be..44428b72849 100644 --- a/src/corelib/tools/qsimd_p.h +++ b/src/corelib/tools/qsimd_p.h @@ -62,6 +62,10 @@ QT_BEGIN_HEADER #undef QT_HAVE_MMX #endif +#ifdef __MINGW64_VERSION_MAJOR +#include +#endif + // SSE intrinsics #if defined(QT_HAVE_SSE2) && (defined(__SSE2__) || defined(Q_CC_MSVC)) #if defined(QT_LINUXBASE) diff --git a/src/corelib/tools/qsize.cpp b/src/corelib/tools/qsize.cpp index d5e6f18326a..4c94f899e73 100644 --- a/src/corelib/tools/qsize.cpp +++ b/src/corelib/tools/qsize.cpp @@ -160,7 +160,7 @@ QT_BEGIN_NAMESPACE /*! Swaps the width and height values. - \sa setWidth(), setHeight() + \sa setWidth(), setHeight(), transposed() */ void QSize::transpose() @@ -170,6 +170,15 @@ void QSize::transpose() ht = tmp; } +/*! + \fn QSize QSize::transposed() const + \since 5.0 + + Returns a QSize with width and height swapped. + + \sa transpose() +*/ + /*! \fn void QSize::scale(int width, int height, Qt::AspectRatioMode mode) @@ -187,7 +196,7 @@ void QSize::transpose() Example: \snippet doc/src/snippets/code/src_corelib_tools_qsize.cpp 0 - \sa setWidth(), setHeight() + \sa setWidth(), setHeight(), scaled() */ /*! @@ -197,11 +206,25 @@ void QSize::transpose() Scales the size to a rectangle with the given \a size, according to the specified \a mode. */ -void QSize::scale(const QSize &s, Qt::AspectRatioMode mode) + +/*! + \fn QSize QSize::scaled(int width, int height, Qt::AspectRatioMode mode) const + \since 5.0 + + Return a size scaled to a rectangle with the given \a width and \a + height, according to the specified \a mode. + + \sa scale() +*/ + +/*! + \overload + \since 5.0 +*/ +QSize QSize::scaled(const QSize &s, Qt::AspectRatioMode mode) const { if (mode == Qt::IgnoreAspectRatio || wd == 0 || ht == 0) { - wd = s.wd; - ht = s.ht; + return s; } else { bool useHeight; qint64 rw = qint64(s.ht) * qint64(wd) / qint64(ht); @@ -213,11 +236,10 @@ void QSize::scale(const QSize &s, Qt::AspectRatioMode mode) } if (useHeight) { - wd = rw; - ht = s.ht; + return QSize(rw, s.ht); } else { - ht = qint32(qint64(s.wd) * qint64(ht) / qint64(wd)); - wd = s.wd; + return QSize(s.wd, + qint32(qint64(s.wd) * qint64(ht) / qint64(wd))); } } } @@ -566,7 +588,7 @@ QDebug operator<<(QDebug dbg, const QSize &s) { /*! Swaps the width and height values. - \sa setWidth(), setHeight() + \sa setWidth(), setHeight(), transposed() */ void QSizeF::transpose() @@ -576,6 +598,15 @@ void QSizeF::transpose() ht = tmp; } +/*! + \fn QSizeF QSizeF::transposed() const + \since 5.0 + + Returns the size with width and height values swapped. + + \sa transpose() +*/ + /*! \fn void QSizeF::scale(qreal width, qreal height, Qt::AspectRatioMode mode) @@ -593,7 +624,7 @@ void QSizeF::transpose() Example: \snippet doc/src/snippets/code/src_corelib_tools_qsize.cpp 5 - \sa setWidth(), setHeight() + \sa setWidth(), setHeight(), scaled() */ /*! @@ -603,11 +634,25 @@ void QSizeF::transpose() Scales the size to a rectangle with the given \a size, according to the specified \a mode. */ -void QSizeF::scale(const QSizeF &s, Qt::AspectRatioMode mode) + +/*! + \fn QSizeF QSizeF::scaled(int width, int height, Qt::AspectRatioMode mode) const + \since 5.0 + + Returns a size scaled to a rectangle with the given \a width and + \a height, according to the specified \mode. + + \sa scale() +*/ + +/*! + \overload + \since 5.0 +*/ +QSizeF QSizeF::scaled(const QSizeF &s, Qt::AspectRatioMode mode) const { if (mode == Qt::IgnoreAspectRatio || qIsNull(wd) || qIsNull(ht)) { - wd = s.wd; - ht = s.ht; + return s; } else { bool useHeight; qreal rw = s.ht * wd / ht; @@ -619,11 +664,9 @@ void QSizeF::scale(const QSizeF &s, Qt::AspectRatioMode mode) } if (useHeight) { - wd = rw; - ht = s.ht; + return QSizeF(rw, s.ht); } else { - ht = s.wd * ht / wd; - wd = s.wd; + return QSizeF(s.wd, s.wd * ht / wd); } } } diff --git a/src/corelib/tools/qsize.h b/src/corelib/tools/qsize.h index 5400f76a3ad..fece0ac943a 100644 --- a/src/corelib/tools/qsize.h +++ b/src/corelib/tools/qsize.h @@ -64,9 +64,12 @@ public: void setWidth(int w); void setHeight(int h); void transpose(); + QSize transposed() const; void scale(int w, int h, Qt::AspectRatioMode mode); void scale(const QSize &s, Qt::AspectRatioMode mode); + QSize scaled(int w, int h, Qt::AspectRatioMode mode) const; + QSize scaled(const QSize &s, Qt::AspectRatioMode mode) const; QSize expandedTo(const QSize &) const; QSize boundedTo(const QSize &) const; @@ -134,9 +137,18 @@ inline void QSize::setWidth(int w) inline void QSize::setHeight(int h) { ht = h; } +inline QSize QSize::transposed() const +{ return QSize(ht, wd); } + inline void QSize::scale(int w, int h, Qt::AspectRatioMode mode) { scale(QSize(w, h), mode); } +inline void QSize::scale(const QSize &s, Qt::AspectRatioMode mode) +{ *this = scaled(s, mode); } + +inline QSize QSize::scaled(int w, int h, Qt::AspectRatioMode mode) const +{ return scaled(QSize(w, h), mode); } + inline int &QSize::rwidth() { return wd; } @@ -214,9 +226,12 @@ public: void setWidth(qreal w); void setHeight(qreal h); void transpose(); + QSizeF transposed() const; void scale(qreal w, qreal h, Qt::AspectRatioMode mode); void scale(const QSizeF &s, Qt::AspectRatioMode mode); + QSizeF scaled(qreal w, qreal h, Qt::AspectRatioMode mode) const; + QSizeF scaled(const QSizeF &s, Qt::AspectRatioMode mode) const; QSizeF expandedTo(const QSizeF &) const; QSizeF boundedTo(const QSizeF &) const; @@ -292,9 +307,18 @@ inline void QSizeF::setWidth(qreal w) inline void QSizeF::setHeight(qreal h) { ht = h; } +inline QSizeF QSizeF::transposed() const +{ return QSizeF(ht, wd); } + inline void QSizeF::scale(qreal w, qreal h, Qt::AspectRatioMode mode) { scale(QSizeF(w, h), mode); } +inline void QSizeF::scale(const QSizeF &s, Qt::AspectRatioMode mode) +{ *this = scaled(s, mode); } + +inline QSizeF QSizeF::scaled(qreal w, qreal h, Qt::AspectRatioMode mode) const +{ return scaled(QSizeF(w, h), mode); } + inline qreal &QSizeF::rwidth() { return wd; } diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp index 0f7d3989723..57210901ee6 100644 --- a/src/corelib/tools/qstring.cpp +++ b/src/corelib/tools/qstring.cpp @@ -936,7 +936,7 @@ int QString::grow(int size) systems). This method is only available if Qt is configured with STL - compatibility enabled. + compatibility enabled and if QT_NO_STL is not defined. \sa fromUtf16(), fromLatin1(), fromLocal8Bit(), fromUtf8(), fromUcs4() */ @@ -964,7 +964,7 @@ int QString::grow(int size) that accepts a std::wstring object. This operator is only available if Qt is configured with STL - compatibility enabled. + compatibility enabled and if QT_NO_STL is not defined. \sa utf16(), toAscii(), toLatin1(), toUtf8(), toLocal8Bit() */ @@ -7006,7 +7006,7 @@ bool QString::isRightToLeft() const can lead to loss of information. This operator is only available if Qt is configured with STL - compatibility enabled. + compatibility enabled and if QT_NO_STL is not defined. \sa toAscii(), toLatin1(), toUtf8(), toLocal8Bit() */ diff --git a/src/corelib/tools/qvector.h b/src/corelib/tools/qvector.h index b47dddab144..83b19104501 100644 --- a/src/corelib/tools/qvector.h +++ b/src/corelib/tools/qvector.h @@ -67,7 +67,7 @@ struct Q_CORE_EXPORT QVectorData QtPrivate::RefCount ref; int alloc; int size; -#if defined(QT_ARCH_SPARC) && defined(Q_CC_GNU) && defined(__LP64__) && defined(QT_BOOTSTRAPPED) +#if defined(Q_PROCESSOR_SPARC) && defined(Q_CC_GNU) && defined(__LP64__) && defined(QT_BOOTSTRAPPED) // workaround for bug in gcc 3.4.2 uint capacity; uint reserved; diff --git a/src/dbus/qdbusabstractadaptor.cpp b/src/dbus/qdbusabstractadaptor.cpp index 9eae45b34b1..7bdd947a37f 100644 --- a/src/dbus/qdbusabstractadaptor.cpp +++ b/src/dbus/qdbusabstractadaptor.cpp @@ -57,6 +57,17 @@ QT_BEGIN_NAMESPACE +static int cachedRelaySlotMethodIndex = -1; + +int QDBusAdaptorConnector::relaySlotMethodIndex() +{ + if (cachedRelaySlotMethodIndex == -1) { + cachedRelaySlotMethodIndex = staticMetaObject.indexOfMethod("relaySlot()"); + Q_ASSERT(cachedRelaySlotMethodIndex != -1); + } + return cachedRelaySlotMethodIndex; +} + QDBusAdaptorConnector *qDBusFindAdaptorConnector(QObject *obj) { if (!obj) @@ -237,12 +248,12 @@ void QDBusAdaptorConnector::addAdaptor(QDBusAbstractAdaptor *adaptor) void QDBusAdaptorConnector::disconnectAllSignals(QObject *obj) { - QMetaObject::disconnect(obj, -1, this, metaObject()->methodOffset()); + QMetaObject::disconnect(obj, -1, this, relaySlotMethodIndex()); } void QDBusAdaptorConnector::connectAllSignals(QObject *obj) { - QMetaObject::connect(obj, -1, this, metaObject()->methodOffset(), Qt::DirectConnection); + QMetaObject::connect(obj, -1, this, relaySlotMethodIndex(), Qt::DirectConnection); } void QDBusAdaptorConnector::polish() @@ -310,37 +321,58 @@ void QDBusAdaptorConnector::relay(QObject *senderObj, int lastSignalIdx, void ** // our Meta Object // modify carefully: this has been hand-edited! -// the relaySlot slot has local ID 0 (we use this when calling QMetaObject::connect) -// it also gets called with the void** array +// the relaySlot slot gets called with the void** array static const uint qt_meta_data_QDBusAdaptorConnector[] = { + // content: - 1, // revision + 6, // revision 0, // classname 0, 0, // classinfo - 3, 10, // methods + 3, 14, // methods 0, 0, // properties 0, 0, // enums/sets - - // slots: signature, parameters, type, tag, flags - 106, 22, 22, 22, 0x0a, - 118, 22, 22, 22, 0x0a, + 0, 0, // constructors + 0, // flags + 1, // signalCount // signals: signature, parameters, type, tag, flags 47, 23, 22, 22, 0x05, + // slots: signature, parameters, type, tag, flags + 105, 22, 22, 22, 0x0a, + 117, 22, 22, 22, 0x0a, + 0 // eod }; static const char qt_meta_stringdata_QDBusAdaptorConnector[] = { - "QDBusAdaptorConnector\0\0obj,metaobject,sid,args\0" - "relaySignal(QObject*,const QMetaObject*,int,QVariantList)\0\0relaySlot()\0" - "polish()\0" + "QDBusAdaptorConnector\0\0obj,metaObject,sid,args\0" + "relaySignal(QObject*,const QMetaObject*,int,QVariantList)\0" + "relaySlot()\0polish()\0" +}; + +void QDBusAdaptorConnector::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a) +{ + if (_c == QMetaObject::InvokeMetaMethod) { + Q_ASSERT(staticMetaObject.cast(_o)); + QDBusAdaptorConnector *_t = static_cast(_o); + switch (_id) { + case 0: _t->relaySignal((*reinterpret_cast< QObject*(*)>(_a[1])),(*reinterpret_cast< const QMetaObject*(*)>(_a[2])),(*reinterpret_cast< int(*)>(_a[3])),(*reinterpret_cast< const QVariantList(*)>(_a[4]))); break; + case 1: _t->relaySlot(_a); break; // HAND EDIT: add the _a parameter + case 2: _t->polish(); break; + default: ; + } + } +} + +const QMetaObjectExtraData QDBusAdaptorConnector::staticMetaObjectExtraData = { + 0, qt_static_metacall }; const QMetaObject QDBusAdaptorConnector::staticMetaObject = { { &QObject::staticMetaObject, qt_meta_stringdata_QDBusAdaptorConnector, - qt_meta_data_QDBusAdaptorConnector, 0 } + qt_meta_data_QDBusAdaptorConnector, &staticMetaObjectExtraData } }; const QMetaObject *QDBusAdaptorConnector::metaObject() const @@ -352,7 +384,7 @@ void *QDBusAdaptorConnector::qt_metacast(const char *_clname) { if (!_clname) return 0; if (!strcmp(_clname, qt_meta_stringdata_QDBusAdaptorConnector)) - return static_cast(const_cast(this)); + return static_cast(const_cast< QDBusAdaptorConnector*>(this)); return QObject::qt_metacast(_clname); } @@ -362,11 +394,8 @@ int QDBusAdaptorConnector::qt_metacall(QMetaObject::Call _c, int _id, void **_a) if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { - switch (_id) { - case 0: relaySlot(_a); break; // HAND EDIT: add the _a parameter - case 1: polish(); break; - case 2: relaySignal((*reinterpret_cast< QObject*(*)>(_a[1])),(*reinterpret_cast< const QMetaObject*(*)>(_a[2])),(*reinterpret_cast< int(*)>(_a[3])),(*reinterpret_cast< const QVariantList(*)>(_a[4]))); break; - } + if (_id < 3) + qt_static_metacall(this, _c, _id, _a); _id -= 3; } return _id; @@ -376,7 +405,7 @@ int QDBusAdaptorConnector::qt_metacall(QMetaObject::Call _c, int _id, void **_a) void QDBusAdaptorConnector::relaySignal(QObject * _t1, const QMetaObject * _t2, int _t3, const QVariantList & _t4) { void *_a[] = { 0, const_cast(reinterpret_cast(&_t1)), const_cast(reinterpret_cast(&_t2)), const_cast(reinterpret_cast(&_t3)), const_cast(reinterpret_cast(&_t4)) }; - QMetaObject::activate(this, &staticMetaObject, 2, _a); + QMetaObject::activate(this, &staticMetaObject, 0, _a); } QT_END_NAMESPACE diff --git a/src/dbus/qdbusabstractadaptor_p.h b/src/dbus/qdbusabstractadaptor_p.h index a0b61e18874..9b10f03eda6 100644 --- a/src/dbus/qdbusabstractadaptor_p.h +++ b/src/dbus/qdbusabstractadaptor_p.h @@ -127,6 +127,9 @@ protected: public: // member variables AdaptorMap adaptors; bool waitingForPolish : 1; + +private: + static int relaySlotMethodIndex(); }; extern QDBusAdaptorConnector *qDBusFindAdaptorConnector(QObject *object); diff --git a/src/dbus/qdbusmetaobject.cpp b/src/dbus/qdbusmetaobject.cpp index c83865978cd..bd7b83bf65b 100644 --- a/src/dbus/qdbusmetaobject.cpp +++ b/src/dbus/qdbusmetaobject.cpp @@ -73,8 +73,6 @@ private: QByteArray typeName; QByteArray tag; QByteArray name; - QByteArray inputSignature; - QByteArray outputSignature; QVarLengthArray inputTypes; QVarLengthArray outputTypes; int flags; @@ -108,7 +106,7 @@ private: }; static const int intsPerProperty = 2; -static const int intsPerMethod = 5; +static const int intsPerMethod = 3; struct QDBusMetaObjectPrivate : public QMetaObjectPrivate { @@ -215,7 +213,6 @@ void QDBusMetaObjectGenerator::parseMethods() break; } - mm.inputSignature += arg.type.toLatin1(); mm.inputTypes.append(type.id); mm.parameters.append(arg.name.toLatin1()); @@ -236,7 +233,6 @@ void QDBusMetaObjectGenerator::parseMethods() break; } - mm.outputSignature += arg.type.toLatin1(); mm.outputTypes.append(type.id); if (i == 0) { @@ -297,7 +293,6 @@ void QDBusMetaObjectGenerator::parseSignals() break; } - mm.inputSignature += arg.type.toLatin1(); mm.inputTypes.append(type.id); mm.parameters.append(arg.name.toLatin1()); @@ -360,9 +355,39 @@ void QDBusMetaObjectGenerator::parseProperties() void QDBusMetaObjectGenerator::write(QDBusMetaObject *obj) { + class MetaStringTable + { + public: + typedef QHash Entries; // string --> offset mapping + typedef Entries::const_iterator const_iterator; + Entries::const_iterator constBegin() const + { return m_entries.constBegin(); } + Entries::const_iterator constEnd() const + { return m_entries.constEnd(); } + + MetaStringTable() : m_offset(0) {} + + int enter(const QByteArray &value) + { + Entries::iterator it = m_entries.find(value); + if (it != m_entries.end()) + return it.value(); + int pos = m_offset; + m_entries.insert(value, pos); + m_offset += value.size() + 1; + return pos; + } + + int arraySize() const { return m_offset; } + + private: + Entries m_entries; + int m_offset; + }; + // this code here is mostly copied from qaxbase.cpp // with a few modifications to make it cleaner - + QString className = interface; className.replace(QLatin1Char('.'), QLatin1String("::")); if (className.isEmpty()) @@ -400,10 +425,8 @@ void QDBusMetaObjectGenerator::write(QDBusMetaObject *obj) data_size += 2 + mm.inputTypes.count() + mm.outputTypes.count(); idata.resize(data_size + 1); - char null('\0'); - QByteArray stringdata = className.toLatin1(); - stringdata += null; - stringdata.reserve(8192); + MetaStringTable strings; + strings.enter(className.toLatin1()); int offset = header->methodData; int signatureOffset = header->methodDBusData; @@ -416,32 +439,16 @@ void QDBusMetaObjectGenerator::write(QDBusMetaObject *obj) QMap &map = (x == 0) ? signals_ : methods; for (QMap::ConstIterator it = map.constBegin(); it != map.constEnd(); ++it) { - // form "prototype\0parameters\0typeName\0tag\0methodname\0inputSignature\0outputSignature" + // form "prototype\0parameters\0typeName\0tag\0methodname\0" const Method &mm = it.value(); - idata[offset++] = stringdata.length(); - stringdata += it.key(); // prototype - stringdata += null; - idata[offset++] = stringdata.length(); - stringdata += mm.parameters; - stringdata += null; - idata[offset++] = stringdata.length(); - stringdata += mm.typeName; - stringdata += null; - idata[offset++] = stringdata.length(); - stringdata += mm.tag; - stringdata += null; + idata[offset++] = strings.enter(it.key()); // prototype + idata[offset++] = strings.enter(mm.parameters); + idata[offset++] = strings.enter(mm.typeName); + idata[offset++] = strings.enter(mm.tag); idata[offset++] = mm.flags; - idata[signatureOffset++] = stringdata.length(); - stringdata += mm.name; - stringdata += null; - idata[signatureOffset++] = stringdata.length(); - stringdata += mm.inputSignature; - stringdata += null; - idata[signatureOffset++] = stringdata.length(); - stringdata += mm.outputSignature; - stringdata += null; + idata[signatureOffset++] = strings.enter(mm.name); idata[signatureOffset++] = typeidOffset; idata[typeidOffset++] = mm.inputTypes.count(); @@ -466,25 +473,25 @@ void QDBusMetaObjectGenerator::write(QDBusMetaObject *obj) const Property &mp = it.value(); // form is "name\0typeName\0signature\0" - idata[offset++] = stringdata.length(); - stringdata += it.key(); // name - stringdata += null; - idata[offset++] = stringdata.length(); - stringdata += mp.typeName; - stringdata += null; + idata[offset++] = strings.enter(it.key()); // name + idata[offset++] = strings.enter(mp.typeName); idata[offset++] = mp.flags; - idata[signatureOffset++] = stringdata.length(); - stringdata += mp.signature; - stringdata += null; + idata[signatureOffset++] = strings.enter(mp.signature); idata[signatureOffset++] = mp.type; } Q_ASSERT(offset == header->propertyDBusData); Q_ASSERT(signatureOffset == header->methodDBusData); - char *string_data = new char[stringdata.length()]; - memcpy(string_data, stringdata, stringdata.length()); + char *string_data = new char[strings.arraySize()]; + { + MetaStringTable::const_iterator it; + for (it = strings.constBegin(); it != strings.constEnd(); ++it) { + memcpy(string_data + it.value(), it.key().constData(), it.key().size()); + string_data[it.value() + it.key().size()] = '\0'; + } + } uint *uint_data = new uint[idata.size()]; memcpy(uint_data, idata.data(), idata.size() * sizeof(int)); @@ -616,32 +623,12 @@ const char *QDBusMetaObject::dbusNameForMethod(int id) const return 0; } -const char *QDBusMetaObject::inputSignatureForMethod(int id) const -{ - //id -= methodOffset(); - if (id >= 0 && id < priv(d.data)->methodCount) { - int handle = priv(d.data)->methodDBusData + id*intsPerMethod; - return d.stringdata + d.data[handle + 1]; - } - return 0; -} - -const char *QDBusMetaObject::outputSignatureForMethod(int id) const -{ - //id -= methodOffset(); - if (id >= 0 && id < priv(d.data)->methodCount) { - int handle = priv(d.data)->methodDBusData + id*intsPerMethod; - return d.stringdata + d.data[handle + 2]; - } - return 0; -} - const int *QDBusMetaObject::inputTypesForMethod(int id) const { //id -= methodOffset(); if (id >= 0 && id < priv(d.data)->methodCount) { int handle = priv(d.data)->methodDBusData + id*intsPerMethod; - return reinterpret_cast(d.data + d.data[handle + 3]); + return reinterpret_cast(d.data + d.data[handle + 1]); } return 0; } @@ -651,7 +638,7 @@ const int *QDBusMetaObject::outputTypesForMethod(int id) const //id -= methodOffset(); if (id >= 0 && id < priv(d.data)->methodCount) { int handle = priv(d.data)->methodDBusData + id*intsPerMethod; - return reinterpret_cast(d.data + d.data[handle + 4]); + return reinterpret_cast(d.data + d.data[handle + 2]); } return 0; } diff --git a/src/dbus/qdbusmetaobject_p.h b/src/dbus/qdbusmetaobject_p.h index d8385fbcc79..7a8de41fa06 100644 --- a/src/dbus/qdbusmetaobject_p.h +++ b/src/dbus/qdbusmetaobject_p.h @@ -77,8 +77,6 @@ struct Q_DBUS_EXPORT QDBusMetaObject: public QMetaObject // methods (slots & signals): const char *dbusNameForMethod(int id) const; - const char *inputSignatureForMethod(int id) const; - const char *outputSignatureForMethod(int id) const; const int *inputTypesForMethod(int id) const; const int *outputTypesForMethod(int id) const; diff --git a/src/gui/accessible/qaccessible.cpp b/src/gui/accessible/qaccessible.cpp index 8610ef726d4..0d00df2a17a 100644 --- a/src/gui/accessible/qaccessible.cpp +++ b/src/gui/accessible/qaccessible.cpp @@ -49,6 +49,7 @@ #include #include #include "qplatformaccessibility_qpa.h" +#include "qplatformintegration_qpa.h" #include #include @@ -359,29 +360,13 @@ QT_BEGIN_NAMESPACE This enum type defines bit flags that can be combined to indicate the relationship between two accessible objects. - \value Unrelated The objects are unrelated. - \value Self The objects are the same. - - \value Up The first object is above the second object. - \value Down The first object is below the second object. - \value Left The first object is left of the second object. - \value Right The first object is right of the second object. - \value Covers The first object covers the second object. - \value Covered The first object is covered by the second object. - - \value FocusChild The first object is the second object's focus child. \value Label The first object is the label of the second object. \value Labelled The first object is labelled by the second object. \value Controller The first object controls the second object. \value Controlled The first object is controlled by the second object. - \omitvalue GeometryMask - \omitvalue LogicalMask - - Implementations of relationTo() return a combination of these flags. + Implementations of relations() return a combination of these flags. Some values are mutually exclusive. - - Implementations of navigate() can accept only one distinct value. */ /*! @@ -781,10 +766,9 @@ QAccessibleInterface *QAccessibleEvent::accessibleInterface() const top-most child. childAt() is used for hit testing (finding the object under the mouse). - The relationTo() function provides information about how two - different objects relate to each other, and navigate() allows - traversing from one object to another object with a given - relationship. + The relations() function provides information about the relations an + object has to other objects, and parent() and child() allows + traversing from one object to another object. \section1 Properties @@ -873,42 +857,30 @@ QAccessibleInterface *QAccessibleEvent::accessibleInterface() const \sa childCount() */ -/*! - \fn QAccessible::Relation QAccessibleInterface::relationTo(const QAccessibleInterface *other) const - - Returns the relationship between this object and the \a - other object. - - The returned value indicates the relation of the called object to - the \a other object, e.g. if this object is a label for \a other - the return value will be \c Label. - - Usually parent-child relations are not returned. - - The return value is a combination of the bit flags in the - QAccessible::Relation enumeration. - - All objects provide this information. - - \sa relations(), indexOfChild(), navigate() -*/ -QAccessible::Relation QAccessibleInterface::relationTo(const QAccessibleInterface *) const -{ - return QAccessible::Unrelated; -} - /*! Returns the meaningful relations to other widgets. Usually this will not return parent/child relations, unless they are handled in a specific way such as in tree views. It will typically return the labelled-by and label relations. + It should never return itself. - \sa relationTo(), navigate() + \sa parent(), child() */ -QVector > QAccessibleInterface::relations() const +QVector > +QAccessibleInterface::relations(QAccessible::Relation /*match = QAccessible::AllRelations*/) const { return QVector >(); } +/*! + Returns the object that has the keyboard focus. + + The object returned can be any descendant, including itself. +*/ +QAccessibleInterface *QAccessibleInterface::focusChild() const +{ + return 0; +} + /*! \fn QAccessibleInterface *QAccessibleInterface::childAt(int x, int y) const @@ -949,49 +921,6 @@ QVector > QAccessibleInterfa \sa childCount(), parent() */ -/*! - \fn int QAccessibleInterface::navigate(QAccessible::RelationFlag relation, int entry, QAccessibleInterface **target) const - - Navigates from this object to an object that has a relationship - \a relation to this object, and returns the respective object in - \a target. It is the caller's responsibility to delete *\a target - after use. - - If an object is found, \a target is set to point to the object, and - the index of the child of \a target is returned. The return value - is 0 if \a target itself is the requested object. \a target is set - to null if this object is the target object (i.e. the requested - object is a handled by this object). - - If no object is found \a target is set to null, and the return - value is -1. - - The \a entry parameter has two different meanings: - \list - \i \e{Hierarchical and Logical relationships} -- if multiple objects with - the requested relationship exist \a entry specifies which one to - return. \a entry is 1-based, e.g. use 1 to get the first (and - possibly only) object with the requested relationship. - - The following code demonstrates how to use this function to - navigate to the first child of an object: - - \snippet doc/src/snippets/code/src_gui_accessible_qaccessible.cpp 0 - - \i \e{Geometric relationships} -- the index of the child from - which to start navigating in the specified direction. \a entry - can be 0 to navigate to a sibling of this object, or non-null to - navigate within contained children that don't provide their own - accessible information. - \endlist - - Note that the \c Descendent value for \a relation is not supported. - - All objects support navigation. - - \sa relationTo(), childCount(), parent(), child() -*/ - /*! \fn QString QAccessibleInterface::text(QAccessible::Text t) const @@ -1140,60 +1069,24 @@ QColor QAccessibleInterface::backgroundColor() const /*! \class QAccessibleEvent - \internal + \brief The QAccessibleEvent class is used to give detailed updates to the + accessibility framework. It is used together with \l QAccessible::updateAccessibility. - \brief The QAccessibleEvent class is used to query addition - accessibility information about complex widgets. - - The event can be of type QEvent::AccessibilityDescription or - QEvent::AccessibilityHelp. - - Some QAccessibleInterface implementations send QAccessibleEvents - to the widget they wrap to obtain the description or help text of - a widget or of its children. The widget can answer by calling - setValue() with the requested information. - - The default QWidget::event() implementation simply sets the text - to be the widget's \l{QWidget::toolTip}{tooltip} (for \l - AccessibilityDescription event) or its - \l{QWidget::whatsThis}{"What's This?" text} (for \l - AccessibilityHelp event). + The event is one of the \l QAccessible::Event which depending on the type of event needs to use + one of the subclasses of QAccessibleEvent. \ingroup accessibility - \ingroup events - \inmodule QtWidgets + \inmodule QtGui */ /*! - \fn QAccessibleEvent::QAccessibleEvent(Type type) + \fn QAccessibleEvent::QAccessibleEvent(QAccessible::Event type, QObject *object, int child = -1) - Constructs an accessibility event of the given \a type, which - must be QEvent::AccessibilityDescription or - QEvent::AccessibilityHelp. -*/ + Constructs an accessibility event of the given \a type. + It also requires an \a object as source of the event and optionally a \a child index, + if the event comes from a child of the object. -/*! - \fn int QAccessibleEvent::child() const - - Returns the (1-based) index of the child to which the request - applies. If the child is 0, the request is for the widget itself. -*/ - -/*! - \fn QString QAccessibleEvent::value() const - - Returns the text set using setValue(). - - \sa setValue() -*/ - -/*! - \fn void QAccessibleEvent::setValue(const QString &text) - - Set the description or help text for the given child() to \a - text, thereby answering the request. - - \sa value() + Using a \a child index maybe more efficient than creating the accessible interface for the child. */ /*! diff --git a/src/gui/accessible/qaccessible.h b/src/gui/accessible/qaccessible.h index dc74ac18147..e57033d9bf0 100644 --- a/src/gui/accessible/qaccessible.h +++ b/src/gui/accessible/qaccessible.h @@ -291,6 +291,7 @@ public: Splitter = 0x0000003E, // Additional Qt roles where enum value does not map directly to MSAA: LayeredPane = 0x0000003F, + Terminal = 0x00000040, UserRole = 0x0000ffff }; @@ -305,13 +306,11 @@ public: }; enum RelationFlag { - Unrelated = 0x00000000, - FocusChild = 0x00010000, Label = 0x00020000, Labelled = 0x00040000, Controller = 0x00080000, Controlled = 0x00100000, - LogicalMask = 0x00ff0000 + AllRelations = 0xffffffff }; Q_DECLARE_FLAGS(Relation, RelationFlag) @@ -379,8 +378,8 @@ public: virtual QWindow *window() const; // relations - virtual QAccessible::Relation relationTo(const QAccessibleInterface *other) const; - virtual QVector > relations() const; + virtual QVector > relations(QAccessible::Relation match = QAccessible::AllRelations) const; + virtual QAccessibleInterface *focusChild() const; virtual QAccessibleInterface *childAt(int x, int y) const = 0; @@ -389,7 +388,6 @@ public: virtual QAccessibleInterface *child(int index) const = 0; virtual int childCount() const = 0; virtual int indexOfChild(const QAccessibleInterface *) const = 0; - virtual int navigate(QAccessible::RelationFlag relation, int index, QAccessibleInterface **iface) const = 0; // properties and state virtual QString text(QAccessible::Text t) const = 0; @@ -432,10 +430,10 @@ private: class Q_GUI_EXPORT QAccessibleEvent { public: - inline QAccessibleEvent(QAccessible::Event type, QObject *object, int child = -1) - : m_type(type), m_object(object), m_child(child) + inline QAccessibleEvent(QAccessible::Event typ, QObject *obj, int chld = -1) + : m_type(typ), m_object(obj), m_child(chld) { - Q_ASSERT(object); + Q_ASSERT(obj); } QAccessible::Event type() const { return m_type; } diff --git a/src/gui/accessible/qaccessibleobject.cpp b/src/gui/accessible/qaccessibleobject.cpp index b9e0ac388b4..d277f39c431 100644 --- a/src/gui/accessible/qaccessibleobject.cpp +++ b/src/gui/accessible/qaccessibleobject.cpp @@ -237,28 +237,13 @@ QAccessibleInterface *QAccessibleApplication::child(int index) const return 0; } + /*! \reimp */ -int QAccessibleApplication::navigate(QAccessible::RelationFlag relation, int, - QAccessibleInterface **target) const +QAccessibleInterface *QAccessibleApplication::focusChild() const { - if (!target) - return -1; - - *target = 0; - QObject *targetObject = 0; - - switch (relation) { - case QAccessible::FocusChild: - if (QWindow *window = QGuiApplication::activeWindow()) { - *target = window->accessibleRoot(); - return 0; - } - break; - default: - break; - } - *target = QAccessible::queryAccessibleInterface(targetObject); - return *target ? 0 : -1; + if (QWindow *window = QGuiApplication::activeWindow()) + return window->accessibleRoot(); + return 0; } /*! \reimp */ diff --git a/src/gui/accessible/qaccessibleobject.h b/src/gui/accessible/qaccessibleobject.h index 2372e82f890..d035f17b1db 100644 --- a/src/gui/accessible/qaccessibleobject.h +++ b/src/gui/accessible/qaccessibleobject.h @@ -85,11 +85,11 @@ public: // relations int childCount() const; int indexOfChild(const QAccessibleInterface*) const; + QAccessibleInterface *focusChild() const; // navigation QAccessibleInterface *parent() const; QAccessibleInterface *child(int index) const; - int navigate(QAccessible::RelationFlag, int, QAccessibleInterface **) const; // properties and state QString text(QAccessible::Text t) const; diff --git a/src/gui/image/image.pri b/src/gui/image/image.pri index dd7b665ecce..f83e7e60c9d 100644 --- a/src/gui/image/image.pri +++ b/src/gui/image/image.pri @@ -45,7 +45,6 @@ SOURCES += \ image/qimagepixmapcleanuphooks.cpp \ image/qvolatileimage.cpp -SOURCES += image/qpixmap_qpa.cpp win32: SOURCES += image/qpixmap_win.cpp SOURCES += image/qvolatileimagedata.cpp diff --git a/src/gui/image/qbitmap.cpp b/src/gui/image/qbitmap.cpp index 81842008138..f3c26dd5b2f 100644 --- a/src/gui/image/qbitmap.cpp +++ b/src/gui/image/qbitmap.cpp @@ -41,6 +41,7 @@ #include "qbitmap.h" #include "qplatformpixmap_qpa.h" +#include "qplatformintegration_qpa.h" #include "qimage.h" #include "qscreen.h" #include "qvariant.h" diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp index 07af19d06a6..5b23dbf4dcb 100644 --- a/src/gui/image/qimage.cpp +++ b/src/gui/image/qimage.cpp @@ -74,30 +74,6 @@ static inline bool isLocked(QImageData *data) return data != 0 && data->is_locked; } -static inline bool checkPixelSize(const QImage::Format format) -{ - switch (format) { - case QImage::Format_ARGB8565_Premultiplied: - return (sizeof(qargb8565) == 3); - case QImage::Format_RGB666: - return (sizeof(qrgb666) == 3); - case QImage::Format_ARGB6666_Premultiplied: - return (sizeof(qargb6666) == 3); - case QImage::Format_RGB555: - return (sizeof(qrgb555) == 2); - case QImage::Format_ARGB8555_Premultiplied: - return (sizeof(qargb8555) == 3); - case QImage::Format_RGB888: - return (sizeof(qrgb888) == 3); - case QImage::Format_RGB444: - return (sizeof(qrgb444) == 2); - case QImage::Format_ARGB4444_Premultiplied: - return (sizeof(qargb4444) == 2); - default: - return true; - } -} - #if defined(Q_CC_DEC) && defined(__alpha) && (__DECCXX_VER-0 >= 50190001) #pragma message disable narrowptr #endif @@ -141,12 +117,6 @@ QImageData * QImageData::create(const QSize &size, QImage::Format format, int nu if (!size.isValid() || numColors < 0 || format == QImage::Format_Invalid) return 0; // invalid parameter(s) - if (!checkPixelSize(format)) { - qWarning("QImageData::create(): Invalid pixel size for format %i", - format); - return 0; - } - uint width = size.width(); uint height = size.height(); uint depth = qt_depthForFormat(format); @@ -793,12 +763,6 @@ QImageData *QImageData::create(uchar *data, int width, int height, int bpl, QIm if (format == QImage::Format_Invalid) return d; - if (!checkPixelSize(format)) { - qWarning("QImageData::create(): Invalid pixel size for format %i", - format); - return 0; - } - const int depth = qt_depthForFormat(format); const int calc_bytes_per_line = ((width * depth + 31)/32) * 4; const int min_bytes_per_line = (width * depth + 7)/8; @@ -1708,9 +1672,8 @@ void QImage::fill(const QColor &color) pixel = PREMUL(pixel); fill((uint) pixel); - } else if (d->depth == 16 && d->format == QImage::Format_RGB16) { - qrgb565 p(color.rgba()); - fill((uint) p.rawValue()); + } else if (d->format == QImage::Format_RGB16) { + fill((uint) qConvertRgb32To16(color.rgba())); } else if (d->depth == 1) { if (color == Qt::color1) @@ -2025,12 +1988,12 @@ static bool convert_indexed8_to_RGB16_inplace(QImageData *data, Qt::ImageConvers quint16 colorTableRGB16[256]; if (data->colortable.isEmpty()) { for (int i = 0; i < 256; ++i) - colorTableRGB16[i] = qt_colorConvert(qRgb(i, i, i), 0); + colorTableRGB16[i] = qConvertRgb32To16(qRgb(i, i, i)); } else { // 1) convert the existing colors to RGB16 const int tableSize = data->colortable.size(); for (int i = 0; i < tableSize; ++i) - colorTableRGB16[i] = qt_colorConvert(data->colortable.at(i), 0); + colorTableRGB16[i] = qConvertRgb32To16(data->colortable.at(i)); data->colortable = QVector(); // 2) fill the rest of the table in case src_data > colortable.size() @@ -2068,7 +2031,8 @@ static bool convert_RGB_to_RGB16_inplace(QImageData *data, Qt::ImageConversionFl quint16 *dst_data = (quint16 *) data->data; for (int i = 0; i < data->height; ++i) { - qt_memconvert(dst_data, src_data, data->width); + for (int j = 0; j < data->width; ++j) + dst_data[j] = qConvertRgb32To16(src_data[j]); src_data = (quint32 *) (((char*)src_data) + src_bytes_per_line); dst_data = (quint16 *) (((char*)dst_data) + dst_bytes_per_line); } @@ -2878,60 +2842,33 @@ static void convert_Mono_to_Indexed8(QImageData *dest, const QImageData *src, Qt } } -#define CONVERT_DECL(DST, SRC) \ - static void convert_##SRC##_to_##DST(QImageData *dest, \ - const QImageData *src, \ - Qt::ImageConversionFlags) \ - { \ - qt_rectconvert(reinterpret_cast(dest->data), \ - reinterpret_cast(src->data), \ - 0, 0, src->width, src->height, \ - dest->bytes_per_line, src->bytes_per_line); \ +// Cannot be used with indexed formats. +static void convert_generic(QImageData *dest, const QImageData *src, Qt::ImageConversionFlags) +{ + const int buffer_size = 2048; + uint buffer[buffer_size]; + const QPixelLayout *srcLayout = &qPixelLayouts[src->format]; + const QPixelLayout *destLayout = &qPixelLayouts[dest->format]; + const uchar *srcData = src->data; + uchar *destData = dest->data; + + FetchPixelsFunc fetch = qFetchPixels[srcLayout->bpp]; + StorePixelsFunc store = qStorePixels[destLayout->bpp]; + + for (int y = 0; y < src->height; ++y) { + int x = 0; + while (x < src->width) { + int l = qMin(src->width - x, buffer_size); + const uint *ptr = fetch(buffer, srcData, x, l); + ptr = srcLayout->convertToARGB32PM(buffer, ptr, l, srcLayout, 0); + ptr = destLayout->convertFromARGB32PM(buffer, ptr, l, destLayout, 0); + store(destData, ptr, x, l); + x += l; + } + srcData += src->bytes_per_line; + destData += dest->bytes_per_line; } - -CONVERT_DECL(quint32, quint16) -CONVERT_DECL(quint16, quint32) -CONVERT_DECL(quint32, qargb8565) -CONVERT_DECL(qargb8565, quint32) -CONVERT_DECL(quint32, qrgb555) -CONVERT_DECL(qrgb666, quint32) -CONVERT_DECL(quint32, qrgb666) -CONVERT_DECL(qargb6666, quint32) -CONVERT_DECL(quint32, qargb6666) -CONVERT_DECL(qrgb555, quint32) -#if (defined(QT_QWS_DEPTH_15) && defined(QT_QWS_DEPTH_16)) -CONVERT_DECL(quint16, qrgb555) -CONVERT_DECL(qrgb555, quint16) -#endif -CONVERT_DECL(quint32, qrgb888) -CONVERT_DECL(qrgb888, quint32) -CONVERT_DECL(quint32, qargb8555) -CONVERT_DECL(qargb8555, quint32) -CONVERT_DECL(quint32, qrgb444) -CONVERT_DECL(qrgb444, quint32) -CONVERT_DECL(quint32, qargb4444) -CONVERT_DECL(qargb4444, quint32) -#undef CONVERT_DECL -#define CONVERT_PTR(DST, SRC) convert_##SRC##_to_##DST - -/* - Format_Invalid, - Format_Mono, - Format_MonoLSB, - Format_Indexed8, - Format_RGB32, - Format_ARGB32, - Format_ARGB32_Premultiplied, - Format_RGB16, - Format_ARGB8565_Premultiplied, - Format_RGB666, - Format_ARGB6666_Premultiplied, - Format_RGB555, - Format_ARGB8555_Premultiplied, - Format_RGB888 - Format_RGB444 - Format_ARGB4444_Premultiplied -*/ +} // first index source, second dest @@ -3005,15 +2942,15 @@ static Image_Converter converter_map[QImage::NImageFormats][QImage::NImageFormat 0, mask_alpha_converter, mask_alpha_converter, - CONVERT_PTR(quint16, quint32), - CONVERT_PTR(qargb8565, quint32), - CONVERT_PTR(qrgb666, quint32), - CONVERT_PTR(qargb6666, quint32), - CONVERT_PTR(qrgb555, quint32), - CONVERT_PTR(qargb8555, quint32), - CONVERT_PTR(qrgb888, quint32), - CONVERT_PTR(qrgb444, quint32), - CONVERT_PTR(qargb4444, quint32) + convert_generic, + convert_generic, + convert_generic, + convert_generic, + convert_generic, + convert_generic, + convert_generic, + convert_generic, + convert_generic }, // Format_RGB32 { @@ -3024,15 +2961,15 @@ static Image_Converter converter_map[QImage::NImageFormats][QImage::NImageFormat mask_alpha_converter, 0, convert_ARGB_to_ARGB_PM, - CONVERT_PTR(quint16, quint32), - CONVERT_PTR(qargb8565, quint32), - CONVERT_PTR(qrgb666, quint32), - CONVERT_PTR(qargb6666, quint32), - CONVERT_PTR(qrgb555, quint32), - CONVERT_PTR(qargb8555, quint32), - CONVERT_PTR(qrgb888, quint32), - CONVERT_PTR(qrgb444, quint32), - CONVERT_PTR(qargb4444, quint32) + convert_generic, + convert_generic, + convert_generic, + convert_generic, + convert_generic, + convert_generic, + convert_generic, + convert_generic, + convert_generic }, // Format_ARGB32 { @@ -3059,15 +2996,15 @@ static Image_Converter converter_map[QImage::NImageFormats][QImage::NImageFormat 0, 0, 0, - CONVERT_PTR(quint32, quint16), - CONVERT_PTR(quint32, quint16), - CONVERT_PTR(quint32, quint16), + convert_generic, + convert_generic, + convert_generic, 0, 0, 0, 0, #if defined(QT_QWS_DEPTH_15) && defined(QT_QWS_DEPTH_16) - CONVERT_PTR(qrgb555, quint16), + convert_generic, #else 0, #endif @@ -3082,9 +3019,9 @@ static Image_Converter converter_map[QImage::NImageFormats][QImage::NImageFormat 0, 0, 0, - CONVERT_PTR(quint32, qargb8565), - CONVERT_PTR(quint32, qargb8565), - CONVERT_PTR(quint32, qargb8565), + convert_generic, + convert_generic, + convert_generic, 0, 0, 0, @@ -3101,9 +3038,9 @@ static Image_Converter converter_map[QImage::NImageFormats][QImage::NImageFormat 0, 0, 0, - CONVERT_PTR(quint32, qrgb666), - CONVERT_PTR(quint32, qrgb666), - CONVERT_PTR(quint32, qrgb666), + convert_generic, + convert_generic, + convert_generic, 0, 0, 0, @@ -3120,9 +3057,9 @@ static Image_Converter converter_map[QImage::NImageFormats][QImage::NImageFormat 0, 0, 0, - CONVERT_PTR(quint32, qargb6666), - CONVERT_PTR(quint32, qargb6666), - CONVERT_PTR(quint32, qargb6666), + convert_generic, + convert_generic, + convert_generic, 0, 0, 0, @@ -3139,11 +3076,11 @@ static Image_Converter converter_map[QImage::NImageFormats][QImage::NImageFormat 0, 0, 0, - CONVERT_PTR(quint32, qrgb555), - CONVERT_PTR(quint32, qrgb555), - CONVERT_PTR(quint32, qrgb555), + convert_generic, + convert_generic, + convert_generic, #if defined(QT_QWS_DEPTH_15) && defined(QT_QWS_DEPTH_16) - CONVERT_PTR(quint16, qrgb555), + convert_generic, #else 0, #endif @@ -3162,9 +3099,9 @@ static Image_Converter converter_map[QImage::NImageFormats][QImage::NImageFormat 0, 0, 0, - CONVERT_PTR(quint32, qargb8555), - CONVERT_PTR(quint32, qargb8555), - CONVERT_PTR(quint32, qargb8555), + convert_generic, + convert_generic, + convert_generic, 0, 0, 0, @@ -3181,9 +3118,9 @@ static Image_Converter converter_map[QImage::NImageFormats][QImage::NImageFormat 0, 0, 0, - CONVERT_PTR(quint32, qrgb888), - CONVERT_PTR(quint32, qrgb888), - CONVERT_PTR(quint32, qrgb888), + convert_generic, + convert_generic, + convert_generic, 0, 0, 0, @@ -3200,9 +3137,9 @@ static Image_Converter converter_map[QImage::NImageFormats][QImage::NImageFormat 0, 0, 0, - CONVERT_PTR(quint32, qrgb444), - CONVERT_PTR(quint32, qrgb444), - CONVERT_PTR(quint32, qrgb444), + convert_generic, + convert_generic, + convert_generic, 0, 0, 0, @@ -3219,9 +3156,9 @@ static Image_Converter converter_map[QImage::NImageFormats][QImage::NImageFormat 0, 0, 0, - CONVERT_PTR(quint32, qargb4444), - CONVERT_PTR(quint32, qargb4444), - CONVERT_PTR(quint32, qargb4444), + convert_generic, + convert_generic, + convert_generic, 0, 0, 0, @@ -3626,35 +3563,28 @@ QRgb QImage::pixel(int x, int y) const qWarning("QImage::pixel: coordinate (%d,%d) out of range", x, y); return 12345; } - const uchar * s = scanLine(y); + + const uchar * s = constScanLine(y); switch(d->format) { case Format_Mono: - return d->colortable.at((*(s + (x >> 3)) >> (7- (x & 7))) & 1); + return d->colortable.at((*(s + (x >> 3)) >> (~x & 7)) & 1); case Format_MonoLSB: return d->colortable.at((*(s + (x >> 3)) >> (x & 7)) & 1); case Format_Indexed8: return d->colortable.at((int)s[x]); - case Format_ARGB8565_Premultiplied: - return qt_colorConvert(reinterpret_cast(s)[x], 0); - case Format_RGB666: - return qt_colorConvert(reinterpret_cast(s)[x], 0); - case Format_ARGB6666_Premultiplied: - return qt_colorConvert(reinterpret_cast(s)[x], 0); - case Format_RGB555: - return qt_colorConvert(reinterpret_cast(s)[x], 0); - case Format_ARGB8555_Premultiplied: - return qt_colorConvert(reinterpret_cast(s)[x], 0); - case Format_RGB888: - return qt_colorConvert(reinterpret_cast(s)[x], 0); - case Format_RGB444: - return qt_colorConvert(reinterpret_cast(s)[x], 0); - case Format_ARGB4444_Premultiplied: - return qt_colorConvert(reinterpret_cast(s)[x], 0); + case Format_RGB32: + case Format_ARGB32: // Keep old behaviour. + case Format_ARGB32_Premultiplied: + return reinterpret_cast(s)[x]; case Format_RGB16: - return qt_colorConvert(reinterpret_cast(s)[x], 0); + return qConvertRgb16To32(reinterpret_cast(s)[x]); default: - return ((QRgb*)s)[x]; + break; } + const QPixelLayout *layout = &qPixelLayouts[d->format]; + uint result; + const uint *ptr = qFetchPixels[layout->bpp](&result, s, x, 1); + return *layout->convertToARGB32PM(&result, ptr, 1, layout, 0); } @@ -3693,7 +3623,6 @@ void QImage::setPixel(int x, int y, uint index_or_rgb) } // detach is called from within scanLine uchar * s = scanLine(y); - const quint32p p = quint32p::fromRawData(index_or_rgb); switch(d->format) { case Format_Mono: case Format_MonoLSB: @@ -3710,54 +3639,38 @@ void QImage::setPixel(int x, int y, uint index_or_rgb) else *(s + (x >> 3)) |= (1 << (7-(x & 7))); } - break; + return; case Format_Indexed8: if (index_or_rgb >= (uint)d->colortable.size()) { qWarning("QImage::setPixel: Index %d out of range", index_or_rgb); return; } s[x] = index_or_rgb; - break; + return; case Format_RGB32: //make sure alpha is 255, we depend on it in qdrawhelper for cases // when image is set as a texture pattern on a qbrush ((uint *)s)[x] = uint(255 << 24) | index_or_rgb; - break; + return; case Format_ARGB32: case Format_ARGB32_Premultiplied: ((uint *)s)[x] = index_or_rgb; - break; + return; case Format_RGB16: - ((quint16 *)s)[x] = qt_colorConvert(p, 0); - break; - case Format_ARGB8565_Premultiplied: - ((qargb8565*)s)[x] = qt_colorConvert(p, 0); - break; - case Format_RGB666: - ((qrgb666*)s)[x] = qt_colorConvert(p, 0); - break; - case Format_ARGB6666_Premultiplied: - ((qargb6666*)s)[x] = qt_colorConvert(p, 0); - break; - case Format_RGB555: - ((qrgb555*)s)[x] = qt_colorConvert(p, 0); - break; - case Format_ARGB8555_Premultiplied: - ((qargb8555*)s)[x] = qt_colorConvert(p, 0); - break; - case Format_RGB888: - ((qrgb888*)s)[x] = qt_colorConvert(p, 0); - break; - case Format_RGB444: - ((qrgb444*)s)[x] = qt_colorConvert(p, 0); - break; - case Format_ARGB4444_Premultiplied: - ((qargb4444*)s)[x] = qt_colorConvert(p, 0); - break; + ((quint16 *)s)[x] = qConvertRgb32To16(INV_PREMUL(index_or_rgb)); + return; case Format_Invalid: case NImageFormats: Q_ASSERT(false); + return; + default: + break; } + + const QPixelLayout *layout = &qPixelLayouts[d->format]; + uint result; + const uint *ptr = layout->convertFromARGB32PM(&result, &index_or_rgb, 1, layout, 0); + qStorePixels[layout->bpp](s, ptr, x, 1); } /*! @@ -3774,30 +3687,56 @@ bool QImage::allGray() const if (!d) return true; - if (d->depth == 32) { - int p = width()*height(); - const QRgb* b = (const QRgb*)bits(); - while (p--) - if (!qIsGray(*b++)) - return false; - } else if (d->depth == 16) { - int p = width()*height(); - const ushort* b = (const ushort *)bits(); - while (p--) - if (!qIsGray(qt_colorConvert(*b++, 0))) - return false; - } else if (d->format == QImage::Format_RGB888) { - int p = width()*height(); - const qrgb888* b = (const qrgb888 *)bits(); - while (p--) - if (!qIsGray(qt_colorConvert(*b++, 0))) - return false; - } else { - if (d->colortable.isEmpty()) - return true; - for (int i = 0; i < colorCount(); i++) + switch (d->format) { + case Format_Mono: + case Format_MonoLSB: + case Format_Indexed8: + for (int i = 0; i < d->colortable.size(); ++i) { if (!qIsGray(d->colortable.at(i))) return false; + } + return true; + case Format_RGB32: + case Format_ARGB32: + case Format_ARGB32_Premultiplied: + for (int j = 0; j < d->height; ++j) { + const QRgb *b = (const QRgb *)constScanLine(j); + for (int i = 0; i < d->width; ++i) { + if (!qIsGray(b[i])) + return false; + } + } + return true; + case Format_RGB16: + for (int j = 0; j < d->height; ++j) { + const quint16 *b = (const quint16 *)constScanLine(j); + for (int i = 0; i < d->width; ++i) { + if (!qIsGray(qConvertRgb16To32(b[i]))) + return false; + } + } + return true; + default: + break; + } + + const int buffer_size = 2048; + uint buffer[buffer_size]; + const QPixelLayout *layout = &qPixelLayouts[d->format]; + FetchPixelsFunc fetch = qFetchPixels[layout->bpp]; + for (int j = 0; j < d->height; ++j) { + const uchar *b = constScanLine(j); + int x = 0; + while (x < d->width) { + int l = qMin(d->width - x, buffer_size); + const uint *ptr = fetch(buffer, b, x, l); + ptr = layout->convertToARGB32PM(buffer, ptr, l, layout, 0); + for (int i = 0; i < l; ++i) { + if (!qIsGray(ptr[i])) + return false; + } + x += l; + } } return true; } @@ -4320,7 +4259,7 @@ QImage QImage::rgbSwapped() const case Format_Invalid: case NImageFormats: Q_ASSERT(false); - break; + return res; case Format_Mono: case Format_MonoLSB: case Format_Indexed8: @@ -4329,7 +4268,7 @@ QImage QImage::rgbSwapped() const QRgb c = res.d->colortable.at(i); res.d->colortable[i] = QRgb(((c << 16) & 0xff0000) | ((c >> 16) & 0xff) | (c & 0xff00ff00)); } - break; + return res; case Format_RGB32: case Format_ARGB32: case Format_ARGB32_Premultiplied: @@ -4345,7 +4284,7 @@ QImage QImage::rgbSwapped() const q++; } } - break; + return res; case Format_RGB16: res = QImage(d->width, d->height, d->format); QIMAGE_SANITYCHECK_MEMORY(res); @@ -4359,113 +4298,41 @@ QImage QImage::rgbSwapped() const q++; } } + return res; + default: break; - case Format_ARGB8565_Premultiplied: - res = QImage(d->width, d->height, d->format); - QIMAGE_SANITYCHECK_MEMORY(res); - for (int i = 0; i < d->height; i++) { - const quint8 *p = constScanLine(i); - quint8 *q = res.scanLine(i); - const quint8 *end = p + d->width * sizeof(qargb8565); - while (p < end) { - q[0] = p[0]; - q[1] = (p[1] & 0xe0) | (p[2] >> 3); - q[2] = (p[2] & 0x07) | (p[1] << 3); - p += sizeof(qargb8565); - q += sizeof(qargb8565); + } + + res = QImage(d->width, d->height, d->format); + QIMAGE_SANITYCHECK_MEMORY(res); + const QPixelLayout *layout = &qPixelLayouts[d->format]; + Q_ASSERT(layout->redWidth == layout->blueWidth); + FetchPixelsFunc fetch = qFetchPixels[layout->bpp]; + StorePixelsFunc store = qStorePixels[layout->bpp]; + + const uint redBlueMask = (1 << layout->redWidth) - 1; + const uint alphaGreenMask = (((1 << layout->alphaWidth) - 1) << layout->alphaShift) + | (((1 << layout->greenWidth) - 1) << layout->greenShift); + + const int buffer_size = 2048; + uint buffer[buffer_size]; + for (int i = 0; i < d->height; ++i) { + uchar *q = res.scanLine(i); + const uchar *p = constScanLine(i); + int x = 0; + while (x < d->width) { + int l = qMin(d->width - x, buffer_size); + const uint *ptr = fetch(buffer, p, x, l); + for (int j = 0; j < l; ++j) { + uint red = (ptr[j] >> layout->redShift) & redBlueMask; + uint blue = (ptr[j] >> layout->blueShift) & redBlueMask; + buffer[j] = (ptr[j] & alphaGreenMask) + | (red << layout->blueShift) + | (blue << layout->redShift); } + store(q, buffer, x, l); + x += l; } - break; - case Format_RGB666: - res = QImage(d->width, d->height, d->format); - QIMAGE_SANITYCHECK_MEMORY(res); - for (int i = 0; i < d->height; i++) { - qrgb666 *q = reinterpret_cast(res.scanLine(i)); - const qrgb666 *p = reinterpret_cast(constScanLine(i)); - const qrgb666 *end = p + d->width; - while (p < end) { - const QRgb rgb = quint32(*p++); - *q++ = qRgb(qBlue(rgb), qGreen(rgb), qRed(rgb)); - } - } - break; - case Format_ARGB6666_Premultiplied: - res = QImage(d->width, d->height, d->format); - QIMAGE_SANITYCHECK_MEMORY(res); - for (int i = 0; i < d->height; i++) { - const quint8 *p = constScanLine(i); - const quint8 *end = p + d->width * sizeof(qargb6666); - quint8 *q = res.scanLine(i); - while (p < end) { - q[0] = (p[1] >> 4) | ((p[2] & 0x3) << 4) | (p[0] & 0xc0); - q[1] = (p[1] & 0xf) | (p[0] << 4); - q[2] = (p[2] & 0xfc) | ((p[0] >> 4) & 0x3); - p += sizeof(qargb6666); - q += sizeof(qargb6666); - } - } - break; - case Format_RGB555: - res = QImage(d->width, d->height, d->format); - QIMAGE_SANITYCHECK_MEMORY(res); - for (int i = 0; i < d->height; i++) { - quint16 *q = (quint16*)res.scanLine(i); - const quint16 *p = (const quint16*)constScanLine(i); - const quint16 *end = p + d->width; - while (p < end) { - *q = ((*p << 10) & 0x7c00) | ((*p >> 10) & 0x1f) | (*p & 0x3e0); - p++; - q++; - } - } - break; - case Format_ARGB8555_Premultiplied: - res = QImage(d->width, d->height, d->format); - QIMAGE_SANITYCHECK_MEMORY(res); - for (int i = 0; i < d->height; i++) { - const quint8 *p = constScanLine(i); - quint8 *q = res.scanLine(i); - const quint8 *end = p + d->width * sizeof(qargb8555); - while (p < end) { - q[0] = p[0]; - q[1] = (p[1] & 0xe0) | (p[2] >> 2); - q[2] = (p[2] & 0x03) | ((p[1] << 2) & 0x7f); - p += sizeof(qargb8555); - q += sizeof(qargb8555); - } - } - break; - case Format_RGB888: - res = QImage(d->width, d->height, d->format); - QIMAGE_SANITYCHECK_MEMORY(res); - for (int i = 0; i < d->height; i++) { - quint8 *q = res.scanLine(i); - const quint8 *p = constScanLine(i); - const quint8 *end = p + d->width * sizeof(qrgb888); - while (p < end) { - q[0] = p[2]; - q[1] = p[1]; - q[2] = p[0]; - q += sizeof(qrgb888); - p += sizeof(qrgb888); - } - } - break; - case Format_RGB444: - case Format_ARGB4444_Premultiplied: - res = QImage(d->width, d->height, d->format); - QIMAGE_SANITYCHECK_MEMORY(res); - for (int i = 0; i < d->height; i++) { - quint16 *q = reinterpret_cast(res.scanLine(i)); - const quint16 *p = reinterpret_cast(constScanLine(i)); - const quint16 *end = p + d->width; - while (p < end) { - *q = (*p & 0xf0f0) | ((*p & 0x0f) << 8) | ((*p & 0xf00) >> 8); - p++; - q++; - } - } - break; } return res; } diff --git a/src/gui/image/qjpeghandler.cpp b/src/gui/image/qjpeghandler.cpp index 0260d18217d..013a1a83b0b 100644 --- a/src/gui/image/qjpeghandler.cpp +++ b/src/gui/image/qjpeghandler.cpp @@ -106,6 +106,13 @@ static void my_error_exit (j_common_ptr cinfo) longjmp(myerr->setjmp_buffer, 1); } +static void my_output_message(j_common_ptr cinfo) +{ + char buffer[JMSG_LENGTH_MAX]; + (*cinfo->err->format_message)(cinfo, buffer); + qWarning("%s", buffer); +} + #if defined(Q_C_CALLBACKS) } #endif @@ -530,6 +537,7 @@ static bool write_jpeg_image(const QImage &image, QIODevice *device, int sourceQ cinfo.err = jpeg_std_error(&jerr); jerr.error_exit = my_error_exit; + jerr.output_message = my_output_message; if (!setjmp(jerr.setjmp_buffer)) { // WARNING: @@ -744,6 +752,7 @@ bool QJpegHandlerPrivate::readJpegHeader(QIODevice *device) info.src = iod_src; info.err = jpeg_std_error(&err); err.error_exit = my_error_exit; + err.output_message = my_output_message; if (!setjmp(err.setjmp_buffer)) { #if defined(Q_OS_UNIXWARE) diff --git a/src/gui/image/qnativeimage.cpp b/src/gui/image/qnativeimage.cpp index 45a8e29100b..96d7a0487bf 100644 --- a/src/gui/image/qnativeimage.cpp +++ b/src/gui/image/qnativeimage.cpp @@ -41,6 +41,7 @@ #include #include "qnativeimage_p.h" +#include "qplatformscreen_qpa.h" #include "private/qguiapplication_p.h" #include "qscreen.h" diff --git a/src/gui/image/qpixmap.cpp b/src/gui/image/qpixmap.cpp index f1a06fa33c0..e8c1304b74f 100644 --- a/src/gui/image/qpixmap.cpp +++ b/src/gui/image/qpixmap.cpp @@ -1003,14 +1003,6 @@ bool QPixmap::isDetached() const return data && data->ref.load() == 1; } -/*! \internal - ### Qt5 - remove me. -*/ -void QPixmap::deref() -{ - Q_ASSERT_X(false, "QPixmap::deref()", "Do not call this function anymore!"); -} - /*! Replaces this pixmap's data with the given \a image using the specified \a flags to control the conversion. The \a flags @@ -1613,9 +1605,22 @@ QPixmap QPixmap::fromImageReader(QImageReader *imageReader, Qt::ImageConversionF \warning In general, grabbing an area outside the screen is not safe. This depends on the underlying window system. + \warning The function is deprecated in Qt 5.0 since there might be + platform plugins in which window system identifiers (\c WId) + are local to a screen. Use QScreen::grabWindow() instead. + \sa grabWidget(), {Screenshot Example} + \sa QScreen + \deprecated */ +QPixmap QPixmap::grabWindow(WId window, int x, int y, int w, int h) +{ + qWarning("%s is deprecated, use QScreen::grabWindow() instead." + " Defaulting to primary screen.", Q_FUNC_INFO); + return QGuiApplication::primaryScreen()->grabWindow(window, x, y, w, h); +} + /*! \internal */ diff --git a/src/gui/image/qpixmap.h b/src/gui/image/qpixmap.h index de76321f0a5..27bfe156884 100644 --- a/src/gui/image/qpixmap.h +++ b/src/gui/image/qpixmap.h @@ -174,7 +174,6 @@ private: QPixmap(const QSize &s, int type); void doInit(int, int, int); - void deref(); Q_DUMMY_COMPARISON_OPERATOR(QPixmap) friend class QPlatformPixmap; friend class QBitmap; diff --git a/src/gui/image/qpixmap_blitter.cpp b/src/gui/image/qpixmap_blitter.cpp index e5222fa2160..382c0b8d1a7 100644 --- a/src/gui/image/qpixmap_blitter.cpp +++ b/src/gui/image/qpixmap_blitter.cpp @@ -144,27 +144,11 @@ void QBlittablePlatformPixmap::fill(const QColor &color) m_alpha = true; } - uint pixel; - switch (blittable()->lock()->format()) { - case QImage::Format_ARGB32_Premultiplied: - pixel = PREMUL(color.rgba()); - break; - case QImage::Format_ARGB8565_Premultiplied: - pixel = qargb8565(color.rgba()).rawValue(); - break; - case QImage::Format_ARGB8555_Premultiplied: - pixel = qargb8555(color.rgba()).rawValue(); - break; - case QImage::Format_ARGB6666_Premultiplied: - pixel = qargb6666(color.rgba()).rawValue(); - break; - case QImage::Format_ARGB4444_Premultiplied: - pixel = qargb4444(color.rgba()).rawValue(); - break; - default: - pixel = color.rgba(); - break; - } + uint pixel = PREMUL(color.rgba()); + const QPixelLayout *layout = &qPixelLayouts[blittable()->lock()->format()]; + Q_ASSERT(layout->convertFromARGB32PM); + layout->convertFromARGB32PM(&pixel, &pixel, 1, layout, 0); + //so premultiplied formats are supported and ARGB32 and RGB32 blittable()->lock()->fill(pixel); } diff --git a/src/gui/image/qpixmap_raster.cpp b/src/gui/image/qpixmap_raster.cpp index 3fe52163133..8125b1360d8 100644 --- a/src/gui/image/qpixmap_raster.cpp +++ b/src/gui/image/qpixmap_raster.cpp @@ -202,46 +202,10 @@ void QRasterPlatformPixmap::fill(const QColor &color) image = QImage(image.width(), image.height(), toFormat); } } - - switch (image.format()) { - case QImage::Format_ARGB8565_Premultiplied: - pixel = qargb8565(color.rgba()).rawValue(); - break; - case QImage::Format_ARGB8555_Premultiplied: - pixel = qargb8555(color.rgba()).rawValue(); - break; - case QImage::Format_ARGB6666_Premultiplied: - pixel = qargb6666(color.rgba()).rawValue(); - break; - case QImage::Format_ARGB4444_Premultiplied: - pixel = qargb4444(color.rgba()).rawValue(); - break; - default: - pixel = PREMUL(color.rgba()); - break; - } - } else { - switch (image.format()) { - case QImage::Format_RGB16: - pixel = qt_colorConvert(color.rgba(), 0); - break; - case QImage::Format_RGB444: - pixel = qrgb444(color.rgba()).rawValue(); - break; - case QImage::Format_RGB555: - pixel = qrgb555(color.rgba()).rawValue(); - break; - case QImage::Format_RGB666: - pixel = qrgb666(color.rgba()).rawValue(); - break; - case QImage::Format_RGB888: - pixel = qrgb888(color.rgba()).rawValue(); - break; - default: - pixel = color.rgba(); - break; - } } + pixel = PREMUL(color.rgba()); + const QPixelLayout *layout = &qPixelLayouts[image.format()]; + layout->convertFromARGB32PM(&pixel, &pixel, 1, layout, 0); } else { pixel = 0; // ### what about 8 bits diff --git a/src/gui/image/qpixmap_win.cpp b/src/gui/image/qpixmap_win.cpp index 6b0ec38f532..227e70e1a69 100644 --- a/src/gui/image/qpixmap_win.cpp +++ b/src/gui/image/qpixmap_win.cpp @@ -47,8 +47,91 @@ #include #include +#ifdef Q_OS_WINCE +#define UNDER_NT +#include +#endif + QT_BEGIN_NAMESPACE +#ifdef Q_OS_WINCE +#define GetDIBits(a,b,c,d,e,f,g) qt_wince_GetDIBits(a,b,c,d,e,f,g) +int qt_wince_GetDIBits(HDC /*hdc*/ , HBITMAP hSourceBitmap, uint, uint, LPVOID lpvBits, LPBITMAPINFO, uint) +{ + if (!lpvBits) { + qWarning("::GetDIBits(), lpvBits NULL"); + return 0; + } + BITMAP bm; + GetObject(hSourceBitmap, sizeof(BITMAP), &bm); + bm.bmHeight = qAbs(bm.bmHeight); + + HBITMAP hTargetBitmap; + void *pixels; + + BITMAPINFO dibInfo; + memset(&dibInfo, 0, sizeof(dibInfo)); + dibInfo.bmiHeader.biBitCount = 32; + dibInfo.bmiHeader.biClrImportant = 0; + dibInfo.bmiHeader.biClrUsed = 0; + dibInfo.bmiHeader.biCompression = BI_RGB;; + dibInfo.bmiHeader.biHeight = -bm.bmHeight; + dibInfo.bmiHeader.biWidth = bm.bmWidth; + dibInfo.bmiHeader.biPlanes = 1; + dibInfo.bmiHeader.biSize = sizeof(BITMAPINFOHEADER); + dibInfo.bmiHeader.biSizeImage = bm.bmWidth * bm.bmHeight * 4; + + HDC displayDC = GetDC(NULL); + if (!displayDC) { + qWarning("::GetDIBits(), failed to GetDC"); + return 0; + } + + int ret = bm.bmHeight; + + hTargetBitmap = CreateDIBSection(displayDC, (const BITMAPINFO*) &dibInfo, DIB_RGB_COLORS, + (void**)&pixels, NULL, 0); + if (!hTargetBitmap) { + qWarning("::GetDIBits(), failed to CreateDIBSection"); + return 0; + } + + HDC hdcSrc = CreateCompatibleDC(displayDC); + HDC hdcDst = CreateCompatibleDC(displayDC); + + if (!(hdcDst && hdcSrc)) { + qWarning("::GetDIBits(), failed to CreateCompatibleDC"); + ret = 0; + } + + HBITMAP hOldBitmap1 = (HBITMAP) SelectObject(hdcSrc, hSourceBitmap); + HBITMAP hOldBitmap2 = (HBITMAP) SelectObject(hdcDst, hTargetBitmap); + + if (!(hOldBitmap1 && hOldBitmap2)) { + qWarning("::GetDIBits(), failed to SelectObject for bitmaps"); + ret = 0; + } + + if (!BitBlt(hdcDst, 0, 0, bm.bmWidth, bm.bmHeight, hdcSrc, 0, 0, SRCCOPY)) { + qWarning("::GetDIBits(), BitBlt failed"); + ret = 0; + } + + SelectObject(hdcSrc, hOldBitmap1); + SelectObject(hdcDst, hOldBitmap2); + + DeleteDC(hdcSrc); + DeleteDC(hdcDst); + + ReleaseDC(NULL, displayDC); + + memcpy(lpvBits, pixels, dibInfo.bmiHeader.biSizeImage); + + DeleteObject(hTargetBitmap); + return ret; +} +#endif + enum HBitmapFormat { HBitmapNoAlpha, @@ -128,6 +211,8 @@ Q_GUI_EXPORT HBITMAP qt_pixmapToWinHBITMAP(const QPixmap &p, int hbitmapFormat = return bitmap; } +#ifndef Q_OS_WINCE + Q_GUI_EXPORT QPixmap qt_pixmapFromWinHBITMAP(HBITMAP bitmap, int hbitmapFormat = 0) { // Verify size @@ -191,6 +276,8 @@ Q_GUI_EXPORT QPixmap qt_pixmapFromWinHBITMAP(HBITMAP bitmap, int hbitmapFormat = return QPixmap::fromImage(image); } +#endif //ifndef Q_OS_WINCE + Q_GUI_EXPORT HICON qt_pixmapToWinHICON(const QPixmap &p) { QBitmap maskBitmap = p.mask(); @@ -214,6 +301,8 @@ Q_GUI_EXPORT HICON qt_pixmapToWinHICON(const QPixmap &p) return hIcon; } +#ifndef Q_OS_WINCE + Q_GUI_EXPORT QImage qt_imageFromWinHBITMAP(HDC hdc, HBITMAP bitmap, int w, int h) { BITMAPINFO bmi; @@ -315,5 +404,95 @@ Q_GUI_EXPORT QPixmap qt_pixmapFromWinHICON(HICON icon) DeleteDC(hdc); return QPixmap::fromImage(image); } +#else //ifndef Q_OS_WINCE +Q_GUI_EXPORT QPixmap qt_pixmapFromWinHICON(HICON icon) +{ + HDC screenDevice = GetDC(0); + HDC hdc = CreateCompatibleDC(screenDevice); + ReleaseDC(0, screenDevice); + + ICONINFO iconinfo; + bool result = GetIconInfo(icon, &iconinfo); + if (!result) + qWarning("QPixmap::fromWinHICON(), failed to GetIconInfo()"); + + int w = 0; + int h = 0; + if (!iconinfo.xHotspot || !iconinfo.yHotspot) { + // We could not retrieve the icon size via GetIconInfo, + // so we try again using the icon bitmap. + BITMAP bm; + int result = GetObject(iconinfo.hbmColor, sizeof(BITMAP), &bm); + if (!result) result = GetObject(iconinfo.hbmMask, sizeof(BITMAP), &bm); + if (!result) { + qWarning("QPixmap::fromWinHICON(), failed to retrieve icon size"); + return QPixmap(); + } + w = bm.bmWidth; + h = bm.bmHeight; + } else { + // x and y Hotspot describes the icon center + w = iconinfo.xHotspot * 2; + h = iconinfo.yHotspot * 2; + } + const DWORD dwImageSize = w * h * 4; + + BITMAPINFO bmi; + memset(&bmi, 0, sizeof(bmi)); + bmi.bmiHeader.biSize = sizeof(BITMAPINFO); + bmi.bmiHeader.biWidth = w; + bmi.bmiHeader.biHeight = -h; + bmi.bmiHeader.biPlanes = 1; + bmi.bmiHeader.biBitCount = 32; + bmi.bmiHeader.biCompression = BI_RGB; + bmi.bmiHeader.biSizeImage = dwImageSize; + + uchar* bits; + + HBITMAP winBitmap = CreateDIBSection(hdc, &bmi, DIB_RGB_COLORS, (void**) &bits, 0, 0); + if (winBitmap ) + memset(bits, 0xff, dwImageSize); + if (!winBitmap) { + qWarning("QPixmap::fromWinHICON(), failed to CreateDIBSection()"); + return QPixmap(); + } + + HGDIOBJ oldhdc = (HBITMAP)SelectObject(hdc, winBitmap); + if (!DrawIconEx( hdc, 0, 0, icon, w, h, 0, 0, DI_NORMAL)) + qWarning("QPixmap::fromWinHICON(), failed to DrawIcon()"); + + uint mask = 0xff000000; + // Create image and copy data into image. + QImage image(w, h, QImage::Format_ARGB32); + + if (!image.isNull()) { // failed to alloc? + int bytes_per_line = w * sizeof(QRgb); + for (int y=0; y < h; ++y) { + QRgb *dest = (QRgb *) image.scanLine(y); + const QRgb *src = (const QRgb *) (bits + y * bytes_per_line); + for (int x=0; x < w; ++x) { + dest[x] = src[x]; + } + } + } + if (!DrawIconEx( hdc, 0, 0, icon, w, h, 0, 0, DI_MASK)) + qWarning("QPixmap::fromWinHICON(), failed to DrawIcon()"); + if (!image.isNull()) { // failed to alloc? + int bytes_per_line = w * sizeof(QRgb); + for (int y=0; y < h; ++y) { + QRgb *dest = (QRgb *) image.scanLine(y); + const QRgb *src = (const QRgb *) (bits + y * bytes_per_line); + for (int x=0; x < w; ++x) { + if (!src[x]) + dest[x] = dest[x] | mask; + } + } + } + SelectObject(hdc, oldhdc); //restore state + DeleteObject(winBitmap); + DeleteDC(hdc); + return QPixmap::fromImage(image); +} +#endif //ifndef Q_OS_WINCE QT_END_NAMESPACE diff --git a/src/gui/image/qplatformpixmap.cpp b/src/gui/image/qplatformpixmap.cpp index 5162ea80d94..30ac6ce30e4 100644 --- a/src/gui/image/qplatformpixmap.cpp +++ b/src/gui/image/qplatformpixmap.cpp @@ -40,6 +40,7 @@ ****************************************************************************/ #include "qplatformpixmap_qpa.h" +#include "qplatformintegration_qpa.h" #include #include #include diff --git a/src/gui/kernel/kernel.pri b/src/gui/kernel/kernel.pri index 7b01ba14cd6..9c5f3b10da2 100644 --- a/src/gui/kernel/kernel.pri +++ b/src/gui/kernel/kernel.pri @@ -55,7 +55,8 @@ HEADERS += \ kernel/qtouchdevice.h \ kernel/qtouchdevice_p.h \ kernel/qplatformsharedgraphicscache_qpa.h \ - kernel/qplatformdialoghelper_qpa.h + kernel/qplatformdialoghelper_qpa.h \ + kernel/qplatformservices_qpa.h SOURCES += \ kernel/qclipboard_qpa.cpp \ @@ -97,7 +98,8 @@ SOURCES += \ kernel/qstylehints.cpp \ kernel/qtouchdevice.cpp \ kernel/qplatformsharedgraphicscache_qpa.cpp \ - kernel/qplatformdialoghelper_qpa.cpp + kernel/qplatformdialoghelper_qpa.cpp \ + kernel/qplatformservices_qpa.cpp contains(QT_CONFIG, opengl)|contains(QT_CONFIG, opengles2)|contains(QT_CONFIG, egl) { HEADERS += \ diff --git a/src/gui/kernel/qclipboard_qpa.cpp b/src/gui/kernel/qclipboard_qpa.cpp index ec940385b85..b33ccd42a23 100644 --- a/src/gui/kernel/qclipboard_qpa.cpp +++ b/src/gui/kernel/qclipboard_qpa.cpp @@ -46,6 +46,7 @@ #include "qmimedata.h" #include "private/qguiapplication_p.h" #include "qplatformclipboard_qpa.h" +#include "qplatformintegration_qpa.h" QT_BEGIN_NAMESPACE diff --git a/src/gui/kernel/qdnd.cpp b/src/gui/kernel/qdnd.cpp index b9f0fe4f5b0..2fb250cf18f 100644 --- a/src/gui/kernel/qdnd.cpp +++ b/src/gui/kernel/qdnd.cpp @@ -59,6 +59,7 @@ #include "qimagewriter.h" #include "qdebug.h" #include +#include #include #include diff --git a/src/gui/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp index 543f5453ff8..c3a6be692b6 100644 --- a/src/gui/kernel/qevent.cpp +++ b/src/gui/kernel/qevent.cpp @@ -3305,15 +3305,21 @@ QWindowStateChangeEvent::~QWindowStateChangeEvent() \section1 Event Handling - All touch events are of type QEvent::TouchBegin, QEvent::TouchUpdate, or QEvent::TouchEnd. - Reimplement QWidget::event() or QAbstractScrollArea::viewportEvent() for widgets and - QGraphicsItem::sceneEvent() for items in a graphics view to receive touch events. + All touch events are of type QEvent::TouchBegin, QEvent::TouchUpdate, QEvent::TouchEnd or + QEvent::TouchCancel. Reimplement QWidget::event() or QAbstractScrollArea::viewportEvent() for + widgets and QGraphicsItem::sceneEvent() for items in a graphics view to receive touch events. The QEvent::TouchUpdate and QEvent::TouchEnd events are sent to the widget or item that accepted the QEvent::TouchBegin event. If the QEvent::TouchBegin event is not accepted and not filtered by an event filter, then no further touch events are sent until the next QEvent::TouchBegin. + Some systems may send an event of type QEvent::TouchCancel. Upon receiving this event + applications are requested to ignore the entire active touch sequence. For example in a + composited system the compositor may decide to treat certain gestures as system-wide + gestures. Whenever such a decision is made (the gesture is recognized), the clients will be + notified with a QEvent::TouchCancel event so they can update their state accordingly. + The touchPoints() function returns a list of all touch points contained in the event. Information about each touch point can be retrieved using the QTouchEvent::TouchPoint class. The Qt::TouchPointState enum describes the different states that a touch point may have. diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp index b1cbb5fcaec..7cb3d4b4886 100644 --- a/src/gui/kernel/qguiapplication.cpp +++ b/src/gui/kernel/qguiapplication.cpp @@ -48,6 +48,8 @@ #include "qplatformfontdatabase_qpa.h" #include "qplatformwindow_qpa.h" #include "qplatformnativeinterface_qpa.h" +#include "qplatformtheme_qpa.h" +#include "qplatformintegration_qpa.h" #include #include @@ -126,6 +128,7 @@ QWindow *QGuiApplicationPrivate::focus_window = 0; static QBasicMutex applicationFontMutex; QFont *QGuiApplicationPrivate::app_font = 0; +bool QGuiApplicationPrivate::obey_desktop_settings = true; extern void qRegisterGuiVariant(); extern void qUnregisterGuiVariant(); @@ -184,7 +187,8 @@ QGuiApplication::~QGuiApplication() QGuiApplicationPrivate::QGuiApplicationPrivate(int &argc, char **argv, int flags) : QCoreApplicationPrivate(argc, argv, flags), styleHints(0), - inputMethod(0) + inputMethod(0), + lastTouchType(QEvent::TouchEnd) { self = this; application_type = QCoreApplication::GuiClient; @@ -502,6 +506,8 @@ void QGuiApplicationPrivate::init() QWindowSystemInterface::sendWindowSystemEvents(QCoreApplicationPrivate::eventDispatcher, QEventLoop::AllEvents); } +extern void qt_cleanupFontDatabase(); + QGuiApplicationPrivate::~QGuiApplicationPrivate() { is_app_closing = true; @@ -526,6 +532,8 @@ QGuiApplicationPrivate::~QGuiApplicationPrivate() delete styleHints; delete inputMethod; + qt_cleanupFontDatabase(); + delete platform_integration; platform_integration = 0; } @@ -655,6 +663,10 @@ void QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePriv QGuiApplicationPrivate::reportLogicalDotsPerInchChange( static_cast(e)); break; + case QWindowSystemInterfacePrivate::ThemeChange: + QGuiApplicationPrivate::processThemeChanged( + static_cast(e)); + break; case QWindowSystemInterfacePrivate::Map: QGuiApplicationPrivate::processMapEvent(static_cast(e)); break; @@ -882,6 +894,14 @@ void QGuiApplicationPrivate::processWindowStateChangedEvent(QWindowSystemInterfa } } +void QGuiApplicationPrivate::processThemeChanged(QWindowSystemInterfacePrivate::ThemeChangeEvent *tce) +{ + if (QWindow *window = tce->window.data()) { + QEvent e(QEvent::ThemeChange); + QGuiApplication::sendSpontaneousEvent(window, &e); + } +} + void QGuiApplicationPrivate::processGeometryChangeEvent(QWindowSystemInterfacePrivate::GeometryChangeEvent *e) { if (e->tlw.isNull()) @@ -946,8 +966,55 @@ Q_GUI_EXPORT bool operator==(const QGuiApplicationPrivate::ActiveTouchPointsKey void QGuiApplicationPrivate::processTouchEvent(QWindowSystemInterfacePrivate::TouchEvent *e) { - QWindow *window = e->window.data(); QGuiApplicationPrivate *d = self; + + if (e->touchType == QEvent::TouchCancel) { + // The touch sequence has been canceled (e.g. by the compositor). + // Send the TouchCancel to all windows with active touches and clean up. + QTouchEvent touchEvent(QEvent::TouchCancel, e->device, e->modifiers); + touchEvent.setTimestamp(e->timestamp); + QHash::const_iterator it + = self->activeTouchPoints.constBegin(), ite = self->activeTouchPoints.constEnd(); + QSet windowsNeedingCancel; + while (it != ite) { + QWindow *w = it->window.data(); + if (w) + windowsNeedingCancel.insert(w); + ++it; + } + for (QSet::const_iterator winIt = windowsNeedingCancel.constBegin(), + winItEnd = windowsNeedingCancel.constEnd(); winIt != winItEnd; ++winIt) { + touchEvent.setWindow(*winIt); + QGuiApplication::sendSpontaneousEvent(*winIt, &touchEvent); + } + if (!self->synthesizedMousePoints.isEmpty() && !e->synthetic) { + for (QHash::const_iterator synthIt = self->synthesizedMousePoints.constBegin(), + synthItEnd = self->synthesizedMousePoints.constEnd(); synthIt != synthItEnd; ++synthIt) { + if (!synthIt->window) + continue; + QWindowSystemInterfacePrivate::MouseEvent fake(synthIt->window.data(), + e->timestamp, + synthIt->pos, + synthIt->screenPos, + Qt::NoButton, + e->modifiers); + fake.synthetic = true; + processMouseEvent(&fake); + } + self->synthesizedMousePoints.clear(); + } + self->activeTouchPoints.clear(); + self->lastTouchType = e->touchType; + return; + } + + // Prevent sending ill-formed event sequences: Cancel can only be followed by a Begin. + if (self->lastTouchType == QEvent::TouchCancel && e->touchType != QEvent::TouchBegin) + return; + + self->lastTouchType = e->touchType; + + QWindow *window = e->window.data(); typedef QPair > StatesAndTouchPoints; QHash windowsNeedingEvents; @@ -1097,6 +1164,8 @@ void QGuiApplicationPrivate::processTouchEvent(QWindowSystemInterfacePrivate::To // exclude touchpads as those generate their own mouse events if (touchEvent.device()->type() != QTouchDevice::TouchPad) { Qt::MouseButtons b = eventType == QEvent::TouchEnd ? Qt::NoButton : Qt::LeftButton; + if (b == Qt::NoButton) + self->synthesizedMousePoints.clear(); QList touchPoints = touchEvent.touchPoints(); if (eventType == QEvent::TouchBegin) @@ -1105,6 +1174,9 @@ void QGuiApplicationPrivate::processTouchEvent(QWindowSystemInterfacePrivate::To for (int i = 0; i < touchPoints.count(); ++i) { const QTouchEvent::TouchPoint &touchPoint = touchPoints.at(i); if (touchPoint.id() == m_fakeMouseSourcePointId) { + if (b != Qt::NoButton) + self->synthesizedMousePoints.insert(w, SynthesizedMouseData( + touchPoint.pos(), touchPoint.screenPos(), w)); QWindowSystemInterfacePrivate::MouseEvent fake(w, e->timestamp, touchPoint.pos(), touchPoint.screenPos(), @@ -1312,6 +1384,9 @@ QClipboard * QGuiApplication::clipboard() */ QPalette QGuiApplication::palette() { + if (!QGuiApplicationPrivate::app_pal) + if (const QPalette *themePalette = QGuiApplicationPrivate::platformTheme()->palette()) + QGuiApplicationPrivate::app_pal = new QPalette(*themePalette); if (!QGuiApplicationPrivate::app_pal) QGuiApplicationPrivate::app_pal = new QPalette(Qt::black); return *QGuiApplicationPrivate::app_pal; @@ -1407,6 +1482,17 @@ void QGuiApplicationPrivate::emitLastWindowClosed() } } +bool QGuiApplicationPrivate::shouldQuit() +{ + /* if there is no visible top-level window left, we allow the quit */ + QWindowList list = QGuiApplication::topLevelWindows(); + for (int i = 0; i < list.size(); ++i) { + QWindow *w = list.at(i); + if (w->isVisible()) + return false; + } + return true; +} /*! \property QGuiApplication::layoutDirection @@ -1562,6 +1648,32 @@ QStyleHints *QGuiApplication::styleHints() const return d->styleHints; } +/*! + Sets whether Qt should use the system's standard colors, fonts, etc., to + \a on. By default, this is true. + + This function must be called before creating the QGuiApplication object, like + this: + + \snippet doc/src/snippets/code/src_gui_kernel_qapplication.cpp 6 + + \sa desktopSettingsAware() +*/ +void QGuiApplication::setDesktopSettingsAware(bool on) +{ + QGuiApplicationPrivate::obey_desktop_settings = on; +} + +/*! + Returns true if Qt is set to use the system's standard colors, fonts, etc.; + otherwise returns false. The default is true. + + \sa setDesktopSettingsAware() +*/ +bool QGuiApplication::desktopSettingsAware() +{ + return QGuiApplicationPrivate::obey_desktop_settings; +} /*! \since 5.0 diff --git a/src/gui/kernel/qguiapplication.h b/src/gui/kernel/qguiapplication.h index 75046d8767f..c374a05986d 100644 --- a/src/gui/kernel/qguiapplication.h +++ b/src/gui/kernel/qguiapplication.h @@ -56,6 +56,7 @@ QT_BEGIN_NAMESPACE class QGuiApplicationPrivate; class QPlatformNativeInterface; +class QPlatformIntegration; class QPalette; class QScreen; class QStyleHints; @@ -121,6 +122,9 @@ public: static inline bool isLeftToRight() { return layoutDirection() == Qt::LeftToRight; } QStyleHints *styleHints() const; + static void setDesktopSettingsAware(bool on); + static bool desktopSettingsAware(); + QT_DEPRECATED QInputPanel *inputPanel() const; QInputMethod *inputMethod() const; diff --git a/src/gui/kernel/qguiapplication_p.h b/src/gui/kernel/qguiapplication_p.h index d9444ebe95b..7e6e0aa8c78 100644 --- a/src/gui/kernel/qguiapplication_p.h +++ b/src/gui/kernel/qguiapplication_p.h @@ -51,14 +51,14 @@ #include #include "private/qwindowsysteminterface_qpa_p.h" -#include -#include #include "private/qshortcutmap_p.h" QT_BEGIN_HEADER QT_BEGIN_NAMESPACE +class QPlatformIntegration; +class QPlatformTheme; class Q_GUI_EXPORT QGuiApplicationPrivate : public QCoreApplicationPrivate { @@ -74,6 +74,8 @@ public: virtual void notifyLayoutDirectionChange(); virtual void notifyActiveWindowChange(QWindow *previous); + virtual bool shouldQuit(); + static Qt::KeyboardModifiers modifier_buttons; static Qt::MouseButtons mouse_buttons; @@ -125,6 +127,7 @@ public: static void reportGeometryChange(QWindowSystemInterfacePrivate::ScreenGeometryEvent *e); static void reportAvailableGeometryChange(QWindowSystemInterfacePrivate::ScreenAvailableGeometryEvent *e); static void reportLogicalDotsPerInchChange(QWindowSystemInterfacePrivate::ScreenLogicalDotsPerInchEvent *e); + static void processThemeChanged(QWindowSystemInterfacePrivate::ThemeChangeEvent *tce); static void processMapEvent(QWindowSystemInterfacePrivate::MapEvent *e); static void processUnmapEvent(QWindowSystemInterfacePrivate::UnmapEvent *e); @@ -181,6 +184,7 @@ public: static QFont *app_font; QStyleHints *styleHints; + static bool obey_desktop_settings; QInputMethod *inputMethod; static QList generic_plugin_list; @@ -199,6 +203,15 @@ public: QTouchEvent::TouchPoint touchPoint; }; QHash activeTouchPoints; + QEvent::Type lastTouchType; + struct SynthesizedMouseData { + SynthesizedMouseData(const QPointF &p, const QPointF &sp, QWindow *w) + : pos(p), screenPos(sp), window(w) { } + QPointF pos; + QPointF screenPos; + QWeakPointer window; + }; + QHash synthesizedMousePoints; private: void init(); diff --git a/src/gui/kernel/qinputmethod_p.h b/src/gui/kernel/qinputmethod_p.h index 862764d1bc3..8a17c859902 100644 --- a/src/gui/kernel/qinputmethod_p.h +++ b/src/gui/kernel/qinputmethod_p.h @@ -47,6 +47,7 @@ #include #include #include +#include #include QT_BEGIN_HEADER diff --git a/src/gui/kernel/qopenglcontext.cpp b/src/gui/kernel/qopenglcontext.cpp index 1b6d1d34c4a..ba51653fcfb 100644 --- a/src/gui/kernel/qopenglcontext.cpp +++ b/src/gui/kernel/qopenglcontext.cpp @@ -40,6 +40,7 @@ ****************************************************************************/ #include "qplatformopenglcontext_qpa.h" +#include "qplatformintegration_qpa.h" #include "qopenglcontext.h" #include "qopenglcontext_p.h" #include "qwindow.h" @@ -289,7 +290,7 @@ bool QOpenGLContext::makeCurrent(QSurface *surface) return false; if (surface->surfaceType() != QSurface::OpenGLSurface) { - qWarning() << "QOpenGLContext::makeBuffers() called with non-opengl surface"; + qWarning() << "QOpenGLContext::makeCurrent() called with non-opengl surface"; return false; } diff --git a/src/gui/kernel/qopenglcontext_p.h b/src/gui/kernel/qopenglcontext_p.h index 7b4e880ade8..3e2c35f0885 100644 --- a/src/gui/kernel/qopenglcontext_p.h +++ b/src/gui/kernel/qopenglcontext_p.h @@ -42,6 +42,8 @@ #ifndef QGUIGLCONTEXT_P_H #define QGUIGLCONTEXT_P_H +#ifndef QT_NO_OPENGL + #include "qopengl.h" #include "qopenglcontext.h" #include @@ -245,4 +247,5 @@ QT_END_NAMESPACE QT_END_HEADER +#endif // QT_NO_OPENGL #endif // QGUIGLCONTEXT_P_H diff --git a/src/gui/kernel/qpalette.cpp b/src/gui/kernel/qpalette.cpp index 627731ff20d..d5b17fa665c 100644 --- a/src/gui/kernel/qpalette.cpp +++ b/src/gui/kernel/qpalette.cpp @@ -41,6 +41,7 @@ #include "qpalette.h" #include "qguiapplication.h" +#include "qguiapplication_p.h" #include "qdatastream.h" #include "qvariant.h" #include "qdebug.h" @@ -64,6 +65,29 @@ static QColor qt_mix_colors(QColor a, QColor b) (a.blue() + b.blue()) / 2, (a.alpha() + b.alpha()) / 2); } +static void qt_palette_from_color(QPalette &pal, const QColor &button) +{ + int h, s, v; + button.getHsv(&h, &s, &v); + // inactive and active are the same.. + const QBrush baseBrush = QBrush(v > 128 ? Qt::white : Qt::black); + const QBrush foregroundBrush = QBrush(v > 128 ? Qt::black : Qt::white); + const QBrush buttonBrush = QBrush(button); + const QBrush buttonBrushDark = QBrush(button.darker()); + const QBrush buttonBrushDark150 = QBrush(button.darker(150)); + const QBrush buttonBrushLight150 = QBrush(button.lighter(150)); + const QBrush whiteBrush = QBrush(Qt::white); + pal.setColorGroup(QPalette::Active, foregroundBrush, buttonBrush, buttonBrushLight150, + buttonBrushDark, buttonBrushDark150, foregroundBrush, whiteBrush, + baseBrush, buttonBrush); + pal.setColorGroup(QPalette::Inactive, foregroundBrush, buttonBrush, buttonBrushLight150, + buttonBrushDark, buttonBrushDark150, foregroundBrush, whiteBrush, + baseBrush, buttonBrush); + pal.setColorGroup(QPalette::Disabled, buttonBrushDark, buttonBrush, buttonBrushLight150, + buttonBrushDark, buttonBrushDark150, buttonBrushDark, + whiteBrush, buttonBrush, buttonBrush); +} + /*! \fn const QColor &QPalette::color(ColorRole role) const @@ -488,40 +512,20 @@ static QColor qt_mix_colors(QColor a, QColor b) \sa QApplication::setPalette(), QApplication::palette() */ QPalette::QPalette() - : d(QGuiApplication::palette().d), - current_group(Active), - resolve_mask(0) + : d(0), current_group(Active), resolve_mask(0) { - d->ref.ref(); -} - -static void qt_palette_from_color(QPalette &pal, const QColor & button) -{ - QColor bg = button, - btn = button, - fg, base; - int h, s, v; - bg.getHsv(&h, &s, &v); - if(v > 128) { - fg = Qt::black; - base = Qt::white; + // Initialize to application palette if present, else default to black. + // This makes it possible to instantiate QPalette outside QGuiApplication, + // for example in the platform plugins. + if (QGuiApplicationPrivate::app_pal) { + d = QGuiApplicationPrivate::app_pal->d; + d->ref.ref(); } else { - fg = Qt::white; - base = Qt::black; + init(); + qt_palette_from_color(*this, Qt::black); } - //inactive and active are the same.. - pal.setColorGroup(QPalette::Active, QBrush(fg), QBrush(btn), QBrush(btn.lighter(150)), - QBrush(btn.darker()), QBrush(btn.darker(150)), QBrush(fg), QBrush(Qt::white), - QBrush(base), QBrush(bg)); - pal.setColorGroup(QPalette::Inactive, QBrush(fg), QBrush(btn), QBrush(btn.lighter(150)), - QBrush(btn.darker()), QBrush(btn.darker(150)), QBrush(fg), QBrush(Qt::white), - QBrush(base), QBrush(bg)); - pal.setColorGroup(QPalette::Disabled, QBrush(btn.darker()), QBrush(btn), QBrush(btn.lighter(150)), - QBrush(btn.darker()), QBrush(btn.darker(150)), QBrush(btn.darker()), - QBrush(Qt::white), QBrush(bg), QBrush(bg)); } - /*! Constructs a palette from the \a button color. The other colors are automatically calculated, based on this color. \c Window will be diff --git a/src/gui/kernel/qplatformintegration_qpa.cpp b/src/gui/kernel/qplatformintegration_qpa.cpp index e867e4e5880..7a3fe05f7a9 100644 --- a/src/gui/kernel/qplatformintegration_qpa.cpp +++ b/src/gui/kernel/qplatformintegration_qpa.cpp @@ -107,6 +107,11 @@ QPlatformNativeInterface * QPlatformIntegration::nativeInterface() const return 0; } +QPlatformServices *QPlatformIntegration::services() const +{ + return 0; +} + /*! \class QPlatformIntegration \since 4.8 @@ -215,12 +220,14 @@ QPlatformPixmap *QPlatformIntegration::createPlatformPixmap(QPlatformPixmap::Pix return new QRasterPlatformPixmap(type); } +#ifndef QT_NO_OPENGL QPlatformOpenGLContext *QPlatformIntegration::createPlatformOpenGLContext(QOpenGLContext *context) const { Q_UNUSED(context); qWarning("This plugin does not support createPlatformOpenGLContext!"); return 0; } +#endif /*! Factory function for QPlatformSharedGraphicsCache. This function will return 0 if the platform diff --git a/src/gui/kernel/qplatformintegration_qpa.h b/src/gui/kernel/qplatformintegration_qpa.h index efaf495b811..483964b8f38 100644 --- a/src/gui/kernel/qplatformintegration_qpa.h +++ b/src/gui/kernel/qplatformintegration_qpa.h @@ -66,6 +66,7 @@ class QPlatformAccessibility; class QPlatformTheme; class QPlatformDialogHelper; class QPlatformSharedGraphicsCache; +class QPlatformServices; class Q_GUI_EXPORT QPlatformIntegration { @@ -86,7 +87,9 @@ public: virtual QPlatformPixmap *createPlatformPixmap(QPlatformPixmap::PixelType type) const; virtual QPlatformWindow *createPlatformWindow(QWindow *window) const = 0; virtual QPlatformBackingStore *createPlatformBackingStore(QWindow *window) const = 0; +#ifndef QT_NO_OPENGL virtual QPlatformOpenGLContext *createPlatformOpenGLContext(QOpenGLContext *context) const; +#endif virtual QPlatformSharedGraphicsCache *createPlatformSharedGraphicsCache(const char *cacheId) const; // Event dispatcher: @@ -106,6 +109,8 @@ public: // Access native handles. The window handle is already available from Wid; virtual QPlatformNativeInterface *nativeInterface() const; + virtual QPlatformServices *services() const; + enum StyleHint { CursorFlashTime, KeyboardInputInterval, diff --git a/src/gui/kernel/qplatformintegrationplugin_qpa.h b/src/gui/kernel/qplatformintegrationplugin_qpa.h index 84c2567bbd2..d70569cbba6 100644 --- a/src/gui/kernel/qplatformintegrationplugin_qpa.h +++ b/src/gui/kernel/qplatformintegrationplugin_qpa.h @@ -68,7 +68,7 @@ struct QPlatformIntegrationFactoryInterface : public QFactoryInterface virtual QPlatformIntegration *create(const QString &key, const QStringList ¶mList) = 0; }; -#define QPlatformIntegrationFactoryInterface_iid "com.nokia.Qt.QPlatformIntegrationFactoryInterface" +#define QPlatformIntegrationFactoryInterface_iid "org.qt-project.Qt.QPlatformIntegrationFactoryInterface" Q_DECLARE_INTERFACE(QPlatformIntegrationFactoryInterface, QPlatformIntegrationFactoryInterface_iid) diff --git a/src/gui/kernel/qplatformopenglcontext_qpa.h b/src/gui/kernel/qplatformopenglcontext_qpa.h index 17d4e96f8ec..af70368f5e9 100644 --- a/src/gui/kernel/qplatformopenglcontext_qpa.h +++ b/src/gui/kernel/qplatformopenglcontext_qpa.h @@ -42,6 +42,8 @@ #ifndef QPLATFORMGLCONTEXT_H #define QPLATFORMGLCONTEXT_H +#ifndef QT_NO_OPENGL + #include #include #include @@ -91,5 +93,6 @@ QT_END_NAMESPACE QT_END_HEADER +#endif // QT_NO_OPENGL #endif // QPLATFORMGLCONTEXT_H diff --git a/src/gui/kernel/qplatformscreen_qpa.cpp b/src/gui/kernel/qplatformscreen_qpa.cpp index b8f1430d1b2..c832d853f4b 100644 --- a/src/gui/kernel/qplatformscreen_qpa.cpp +++ b/src/gui/kernel/qplatformscreen_qpa.cpp @@ -93,7 +93,7 @@ QWindow *QPlatformScreen::topLevelAt(const QPoint & pos) const QWindowList list = QGuiApplication::topLevelWindows(); for (int i = list.size()-1; i >= 0; --i) { QWindow *w = list[i]; - if (w->visible() && w->geometry().contains(pos)) + if (w->isVisible() && w->geometry().contains(pos)) return w; } diff --git a/src/gui/kernel/qplatformservices_qpa.cpp b/src/gui/kernel/qplatformservices_qpa.cpp new file mode 100644 index 00000000000..7993a82f4e7 --- /dev/null +++ b/src/gui/kernel/qplatformservices_qpa.cpp @@ -0,0 +1,74 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the QtGui module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qplatformservices_qpa.h" + +#include +#include +#include + +QT_BEGIN_NAMESPACE + +/*! + \class QPlatformServices + \since 5.0 + \internal + \preliminary + \ingroup qpa + + \brief The QPlatformServices provides the backend for desktop-related functionality. +*/ + +bool QPlatformServices::openUrl(const QUrl &url) +{ + qWarning("This plugin does not support QPlatformServices::openUrl() for '%s'.", + qPrintable(url.toString())); + return false; +} + +bool QPlatformServices::openDocument(const QUrl &url) +{ + qWarning("This plugin does not support QPlatformServices::openDocument() for '%s'.", + qPrintable(url.toString())); + return false; +} + +QT_END_NAMESPACE diff --git a/src/gui/util/qdesktopservices_qpa.cpp b/src/gui/kernel/qplatformservices_qpa.h similarity index 83% rename from src/gui/util/qdesktopservices_qpa.cpp rename to src/gui/kernel/qplatformservices_qpa.h index b94267e72e0..aff2e5d6fea 100644 --- a/src/gui/util/qdesktopservices_qpa.cpp +++ b/src/gui/kernel/qplatformservices_qpa.h @@ -39,23 +39,27 @@ ** ****************************************************************************/ -#include -#include +#ifndef QPLATFORMSERVICES_QPA_H +#define QPLATFORMSERVICES_QPA_H + +#include + +QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -static bool launchWebBrowser(const QUrl &url) -{ - Q_UNUSED(url); - qWarning("QDesktopServices::launchWebBrowser not implemented"); - return false; -} +class QUrl; -static bool openDocument(const QUrl &file) +class Q_GUI_EXPORT QPlatformServices { - Q_UNUSED(file); - qWarning("QDesktopServices::openDocument not implemented"); - return false; -} +public: + virtual ~QPlatformServices() { } + + virtual bool openUrl(const QUrl &url); + virtual bool openDocument(const QUrl &url); +}; QT_END_NAMESPACE +QT_END_HEADER + +#endif // QPLATFORMSERVICES_QPA_H diff --git a/src/gui/kernel/qplatformtheme_qpa.cpp b/src/gui/kernel/qplatformtheme_qpa.cpp index d2ff804ddf1..aec465f0fff 100644 --- a/src/gui/kernel/qplatformtheme_qpa.cpp +++ b/src/gui/kernel/qplatformtheme_qpa.cpp @@ -42,6 +42,8 @@ #include "qplatformtheme_qpa.h" #include +#include +#include QT_BEGIN_NAMESPACE @@ -68,6 +70,21 @@ QT_BEGIN_NAMESPACE \value MaximumScrollBarDragDistance (int) Determines the value returned by QStyle::pixelMetric(PM_MaximumDragDistance) + \value ToolButtonStyle (int) A value representing a Qt::ToolButtonStyle. + + \value ToolBarIconSize Icon size for tool bars. + + \value SystemIconThemeName (QString) Name of the icon theme. + + \value SystemIconFallbackThemeName (QString) Name of the fallback icon theme. + + \value IconThemeSearchPaths (QStringList) Search paths for icons. + + \value ItemViewActivateItemOnSingleClick (bool) Activate items by single click. + + \value StyleNames (QStringList) A list of preferred style names. + + \sa themeHint(), QStyle::pixelMetric() */ @@ -95,9 +112,28 @@ QPlatformDialogHelper *QPlatformTheme::createPlatformDialogHelper(DialogType typ return 0; } +const QPalette *QPlatformTheme::palette(Palette type) const +{ + Q_UNUSED(type) + return 0; +} + QVariant QPlatformTheme::themeHint(ThemeHint hint) const { switch (hint) { + case QPlatformTheme::ItemViewActivateItemOnSingleClick: + return QVariant(false); + case QPlatformTheme::ToolButtonStyle: + return QVariant(int(Qt::ToolButtonIconOnly)); + case QPlatformTheme::ToolBarIconSize: + return QVariant(int(0)); + case QPlatformTheme::SystemIconThemeName: + case QPlatformTheme::SystemIconFallbackThemeName: + return QVariant(QString()); + case QPlatformTheme::IconThemeSearchPaths: + return QVariant(QStringList()); + case QPlatformTheme::StyleNames: + return QVariant(QStringList()); case TextCursorWidth: return QVariant(1); case DropShadow: diff --git a/src/gui/kernel/qplatformtheme_qpa.h b/src/gui/kernel/qplatformtheme_qpa.h index 2b87e632879..036432054ec 100644 --- a/src/gui/kernel/qplatformtheme_qpa.h +++ b/src/gui/kernel/qplatformtheme_qpa.h @@ -48,13 +48,13 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE - class QMenu; class QMenuBar; class QPlatformMenu; class QPlatformMenuBar; class QPlatformDialogHelper; class QVariant; +class QPalette; class Q_GUI_EXPORT QPlatformTheme { @@ -62,7 +62,14 @@ public: enum ThemeHint { TextCursorWidth, DropShadow, - MaximumScrollBarDragDistance + MaximumScrollBarDragDistance, + ToolButtonStyle, + ToolBarIconSize, + ItemViewActivateItemOnSingleClick, + SystemIconThemeName, + SystemIconFallbackThemeName, + IconThemeSearchPaths, + StyleNames }; enum DialogType { @@ -71,12 +78,20 @@ public: FontDialog }; + enum Palette { + SystemPalette, + ToolTipPalette, + NPalettes + }; + virtual QPlatformMenu *createPlatformMenu(QMenu *menu = 0) const; virtual QPlatformMenuBar *createPlatformMenuBar(QMenuBar *menuBar = 0) const; virtual bool usePlatformNativeDialog(DialogType type) const; virtual QPlatformDialogHelper *createPlatformDialogHelper(DialogType type) const; + virtual const QPalette *palette(Palette type = SystemPalette) const; + virtual QVariant themeHint(ThemeHint hint) const; }; diff --git a/src/gui/kernel/qplatformthemeplugin_qpa.h b/src/gui/kernel/qplatformthemeplugin_qpa.h index fb4f9f9b7cc..3ce7cc5b022 100644 --- a/src/gui/kernel/qplatformthemeplugin_qpa.h +++ b/src/gui/kernel/qplatformthemeplugin_qpa.h @@ -68,7 +68,7 @@ struct QPlatformThemeFactoryInterface : public QFactoryInterface virtual QPlatformTheme *create(const QString &key, const QStringList ¶mList) = 0; }; -#define QPlatformThemeFactoryInterface_iid "com.nokia.Qt.QPlatformThemeFactoryInterface" +#define QPlatformThemeFactoryInterface_iid "org.qt-project.Qt.QPlatformThemeFactoryInterface" Q_DECLARE_INTERFACE(QPlatformThemeFactoryInterface, QPlatformThemeFactoryInterface_iid) diff --git a/src/gui/kernel/qplatformwindow_qpa.cpp b/src/gui/kernel/qplatformwindow_qpa.cpp index c52a1cf7571..e12228d7bd5 100644 --- a/src/gui/kernel/qplatformwindow_qpa.cpp +++ b/src/gui/kernel/qplatformwindow_qpa.cpp @@ -114,6 +114,10 @@ QSurfaceFormat QPlatformWindow::format() const can happen programatically(from ie. user application) or by the window manager. This means that there is no need to call this function specifically from the window manager callback, instead call QWindowSystemInterface::handleGeometryChange(QWindow *w, const QRect &newRect); + + The position(x, y) part of the rect might be inclusive or exclusive of the window frame + as returned by frameMargins(). You can detect this in the plugin by checking + qt_window_private(window())->positionPolicy. */ void QPlatformWindow::setGeometry(const QRect &rect) { @@ -142,6 +146,7 @@ QMargins QPlatformWindow::frameMargins() const void QPlatformWindow::setVisible(bool visible) { Q_UNUSED(visible); + QWindowSystemInterface::handleSynchronousExposeEvent(window(), QRect(QPoint(), geometry().size())); } /*! Requests setting the window flags of this surface @@ -152,6 +157,20 @@ Qt::WindowFlags QPlatformWindow::setWindowFlags(Qt::WindowFlags flags) return flags; } + + +/*! + Returns if this window is exposed in the windowing system. + + An exposeEvent() is sent every time this value changes. + */ + +bool QPlatformWindow::isExposed() const +{ + Q_D(const QPlatformWindow); + return d->window->visible(); +} + /*! Requests setting the window state of this surface to \a type. Returns the actual state set. diff --git a/src/gui/kernel/qplatformwindow_qpa.h b/src/gui/kernel/qplatformwindow_qpa.h index 88bf633425a..170f62162f4 100644 --- a/src/gui/kernel/qplatformwindow_qpa.h +++ b/src/gui/kernel/qplatformwindow_qpa.h @@ -89,6 +89,8 @@ public: virtual void raise(); virtual void lower(); + virtual bool isExposed() const; + virtual void propagateSizeHints(); virtual void setOpacity(qreal level); diff --git a/src/gui/kernel/qscreen.cpp b/src/gui/kernel/qscreen.cpp index 67eb991b199..da0716b7d5d 100644 --- a/src/gui/kernel/qscreen.cpp +++ b/src/gui/kernel/qscreen.cpp @@ -41,6 +41,7 @@ #include "qscreen.h" #include "qscreen_p.h" +#include "qpixmap.h" #include "qplatformscreen_qpa.h" #include @@ -542,4 +543,51 @@ void QScreenPrivate::updatePrimaryOrientation() primaryOrientation = geometry.width() >= geometry.height() ? Qt::LandscapeOrientation : Qt::PortraitOrientation; } +/*! + Creates and returns a pixmap constructed by grabbing the contents + of the given \a window restricted by QRect(\a x, \a y, \a width, + \a height). + + The arguments (\a{x}, \a{y}) specify the offset in the window, + whereas (\a{width}, \a{height}) specify the area to be copied. If + \a width is negative, the function copies everything to the right + border of the window. If \a height is negative, the function + copies everything to the bottom of the window. + + The window system identifier (\c WId) can be retrieved using the + QWidget::winId() function. The rationale for using a window + identifier and not a QWidget, is to enable grabbing of windows + that are not part of the application, window system frames, and so + on. + + The grabWindow() function grabs pixels from the screen, not from + the window, i.e. if there is another window partially or entirely + over the one you grab, you get pixels from the overlying window, + too. The mouse cursor is generally not grabbed. + + Note on X11 that if the given \a window doesn't have the same depth + as the root window, and another window partially or entirely + obscures the one you grab, you will \e not get pixels from the + overlying window. The contents of the obscured areas in the + pixmap will be undefined and uninitialized. + + On Windows Vista and above grabbing a layered window, which is + created by setting the Qt::WA_TranslucentBackground attribute, will + not work. Instead grabbing the desktop widget should work. + + \warning In general, grabbing an area outside the screen is not + safe. This depends on the underlying window system. + \since 5.0 +*/ + +QPixmap QScreen::grabWindow(WId window, int x, int y, int w, int h) const +{ + const QPlatformScreen *platformScreen = handle(); + if (!platformScreen) { + qWarning("%s invoked with handle==0", Q_FUNC_INFO); + return QPixmap(); + } + return platformScreen->grabWindow(window, x, y, w, h); +} + QT_END_NAMESPACE diff --git a/src/gui/kernel/qscreen.h b/src/gui/kernel/qscreen.h index f73cd0836f7..111e10d340d 100644 --- a/src/gui/kernel/qscreen.h +++ b/src/gui/kernel/qscreen.h @@ -61,6 +61,7 @@ class QPlatformScreen; class QScreenPrivate; class QWindow; class QRect; +class QPixmap; class Q_GUI_EXPORT QScreen : public QObject { @@ -124,6 +125,8 @@ public: bool isPortrait(Qt::ScreenOrientation orientation); bool isLandscape(Qt::ScreenOrientation orientation); + QPixmap grabWindow(WId window, int x, int y, int w, int h) const; + Q_SIGNALS: void sizeChanged(const QSize &size); void geometryChanged(const QRect &geometry); diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp index 4436884359c..9c6b6c4bf72 100644 --- a/src/gui/kernel/qwindow.cpp +++ b/src/gui/kernel/qwindow.cpp @@ -42,6 +42,7 @@ #include "qwindow.h" #include "qplatformwindow_qpa.h" +#include "qplatformintegration_qpa.h" #include "qsurfaceformat.h" #ifndef QT_NO_OPENGL #include "qplatformopenglcontext_qpa.h" @@ -165,19 +166,14 @@ void QWindow::setVisible(bool visible) return; d->visible = visible; emit visibleChanged(visible); - if (QCoreApplication::instance() && !transientParent()) { - QCoreApplicationPrivate *applicationPrivate = static_cast(QObjectPrivate::get(QCoreApplication::instance())); - if (visible) { - applicationPrivate->ref(); - } else { - applicationPrivate->deref(); - } - } if (!d->platformWindow) create(); if (visible) { + // remove posted quit events when showing a new window + QCoreApplication::removePostedEvents(qApp, QEvent::Quit); + QShowEvent showEvent; QGuiApplication::sendEvent(this, &showEvent); } @@ -190,7 +186,13 @@ void QWindow::setVisible(bool visible) } } + bool QWindow::visible() const +{ + return isVisible(); +} + +bool QWindow::isVisible() const { Q_D(const QWindow); @@ -219,7 +221,11 @@ WId QWindow::winId() const Q_D(const QWindow); if(!d->platformWindow) const_cast(this)->create(); - return d->platformWindow->winId(); + + WId id = d->platformWindow->winId(); + // See the QPlatformWindow::winId() documentation + Q_ASSERT(id != WId(0)); + return id; } QWindow *QWindow::parent() const @@ -373,6 +379,25 @@ void QWindow::requestActivateWindow() d->platformWindow->requestActivateWindow(); } + +/*! + Returns if this window is exposed in the windowing system. + + When the window is not exposed, it is shown by the application + but it is still not showing in the windowing system, so the application + should minimize rendering and other graphical activities. + + An exposeEvent() is sent every time this value changes. + */ + +bool QWindow::isExposed() const +{ + Q_D(const QWindow); + if (d->platformWindow) + return d->platformWindow->isExposed(); + return false; +} + /*! Returns true if the window should appear active from a style perspective. @@ -511,15 +536,6 @@ void QWindow::setTransientParent(QWindow *parent) QWindow *previousParent = d->transientParent; d->transientParent = parent; - - if (QCoreApplication::instance() && d->visible) { - QCoreApplicationPrivate *applicationPrivate = static_cast(QObjectPrivate::get(QCoreApplication::instance())); - if (parent && !previousParent) { - applicationPrivate->deref(); - } else if (!parent && previousParent) { - applicationPrivate->ref(); - } - } } QWindow *QWindow::transientParent() const @@ -731,6 +747,15 @@ void QWindow::setWindowIcon(const QImage &icon) const void QWindow::destroy() { Q_D(QWindow); + QObjectList childrenWindows = children(); + for (int i = 0; i < childrenWindows.size(); i++) { + QObject *object = childrenWindows.at(i); + if (object->isWindowType()) { + QWindow *w = static_cast(object); + QGuiApplicationPrivate::window_list.removeAll(w); + w->destroy(); + } + } setVisible(false); delete d->platformWindow; d->platformWindow = 0; @@ -881,22 +906,25 @@ bool QWindow::close() if (QGuiApplicationPrivate::focus_window == this) QGuiApplicationPrivate::focus_window = 0; - QObjectList childrenWindows = children(); - for (int i = 0; i < childrenWindows.size(); i++) { - QObject *object = childrenWindows.at(i); - if (object->isWindowType()) { - QWindow *w = static_cast(object); - QGuiApplicationPrivate::window_list.removeAll(w); - w->destroy(); - } - } - QGuiApplicationPrivate::window_list.removeAll(this); destroy(); d->maybeQuitOnLastWindowClosed(); return true; } + + +/*! + The expose event is sent by the window system whenever the window's + exposure on screen changes. + + If the window is moved off screen, is made totally obscured by another + window, iconified or similar, this function might be called and the + value of isExposed() might change to false. When this happens, + an application should stop its rendering as it is no longer visible + to the user. + */ + void QWindow::exposeEvent(QExposeEvent *ev) { ev->ignore(); @@ -944,6 +972,7 @@ bool QWindow::event(QEvent *ev) case QEvent::TouchBegin: case QEvent::TouchUpdate: case QEvent::TouchEnd: + case QEvent::TouchCancel: touchEvent(static_cast(ev)); break; @@ -979,7 +1008,7 @@ bool QWindow::event(QEvent *ev) case QEvent::Close: { Q_D(QWindow); - bool wasVisible = visible(); + bool wasVisible = isVisible(); destroy(); if (wasVisible) d->maybeQuitOnLastWindowClosed(); @@ -1113,13 +1142,16 @@ void QWindowPrivate::maybeQuitOnLastWindowClosed() bool lastWindowClosed = true; for (int i = 0; i < list.size(); ++i) { QWindow *w = list.at(i); - if (!w->visible() || w->parent()) + if (!w->isVisible()) continue; lastWindowClosed = false; break; } - if (lastWindowClosed) + if (lastWindowClosed) { QGuiApplicationPrivate::emitLastWindowClosed(); + QCoreApplicationPrivate *applicationPrivate = static_cast(QObjectPrivate::get(QCoreApplication::instance())); + applicationPrivate->maybeQuit(); + } } } diff --git a/src/gui/kernel/qwindow.h b/src/gui/kernel/qwindow.h index 98b468b1424..1461f125206 100644 --- a/src/gui/kernel/qwindow.h +++ b/src/gui/kernel/qwindow.h @@ -89,7 +89,7 @@ class Q_GUI_EXPORT QWindow : public QObject, public QSurface Q_PROPERTY(int y READ y WRITE setY NOTIFY yChanged) Q_PROPERTY(int width READ width WRITE setWidth NOTIFY widthChanged) Q_PROPERTY(int height READ height WRITE setHeight NOTIFY heightChanged) - Q_PROPERTY(bool visible READ visible WRITE setVisible NOTIFY visibleChanged) + Q_PROPERTY(bool visible READ isVisible WRITE setVisible NOTIFY visibleChanged) Q_PROPERTY(Qt::ScreenOrientation contentOrientation READ contentOrientation WRITE reportContentOrientationChange NOTIFY contentOrientationChanged) public: @@ -101,7 +101,9 @@ public: void setSurfaceType(SurfaceType surfaceType); SurfaceType surfaceType() const; - bool visible() const; + QT_DEPRECATED bool visible() const; + + bool isVisible() const; void create(); @@ -150,6 +152,8 @@ public: bool isAncestorOf(const QWindow *child, AncestorMode mode = IncludeTransients) const; + bool isExposed() const; + QSize minimumSize() const; QSize maximumSize() const; QSize baseSize() const; diff --git a/src/gui/kernel/qwindowdefs.h b/src/gui/kernel/qwindowdefs.h index 82cce0394b2..c2d7a2fe2fd 100644 --- a/src/gui/kernel/qwindowdefs.h +++ b/src/gui/kernel/qwindowdefs.h @@ -42,6 +42,7 @@ #ifndef QWINDOWDEFS_H #define QWINDOWDEFS_H +#include #include #include @@ -99,7 +100,7 @@ QT_END_HEADER -typedef unsigned long WId; +typedef QT_PREPEND_NAMESPACE(quintptr) WId; diff --git a/src/gui/kernel/qwindowsysteminterface_qpa.cpp b/src/gui/kernel/qwindowsysteminterface_qpa.cpp index ae94b75076e..e6c4454104e 100644 --- a/src/gui/kernel/qwindowsysteminterface_qpa.cpp +++ b/src/gui/kernel/qwindowsysteminterface_qpa.cpp @@ -296,6 +296,22 @@ void QWindowSystemInterface::handleTouchEvent(QWindow *tlw, ulong timestamp, QTo QWindowSystemInterfacePrivate::queueWindowSystemEvent(e); } +void QWindowSystemInterface::handleTouchCancelEvent(QWindow *w, QTouchDevice *device, + Qt::KeyboardModifiers mods) +{ + unsigned long time = QWindowSystemInterfacePrivate::eventTime.elapsed(); + handleTouchCancelEvent(w, time, device, mods); +} + +void QWindowSystemInterface::handleTouchCancelEvent(QWindow *w, ulong timestamp, QTouchDevice *device, + Qt::KeyboardModifiers mods) +{ + QWindowSystemInterfacePrivate::TouchEvent *e = + new QWindowSystemInterfacePrivate::TouchEvent(w, timestamp, QEvent::TouchCancel, device, + QList(), mods); + QWindowSystemInterfacePrivate::queueWindowSystemEvent(e); +} + void QWindowSystemInterface::handleScreenOrientationChange(QScreen *screen, Qt::ScreenOrientation orientation) { QWindowSystemInterfacePrivate::ScreenOrientationEvent *e = @@ -324,6 +340,12 @@ void QWindowSystemInterface::handleScreenLogicalDotsPerInchChange(QScreen *scree QWindowSystemInterfacePrivate::queueWindowSystemEvent(e); } +void QWindowSystemInterface::handleThemeChange(QWindow *tlw) +{ + QWindowSystemInterfacePrivate::ThemeChangeEvent *e = new QWindowSystemInterfacePrivate::ThemeChangeEvent(tlw); + QWindowSystemInterfacePrivate::queueWindowSystemEvent(e); +} + void QWindowSystemInterface::handleMapEvent(QWindow *tlw) { QWindowSystemInterfacePrivate::MapEvent *e = new QWindowSystemInterfacePrivate::MapEvent(tlw); diff --git a/src/gui/kernel/qwindowsysteminterface_qpa.h b/src/gui/kernel/qwindowsysteminterface_qpa.h index b99363eda77..78152a11783 100644 --- a/src/gui/kernel/qwindowsysteminterface_qpa.h +++ b/src/gui/kernel/qwindowsysteminterface_qpa.h @@ -101,6 +101,8 @@ public: const QList &points, Qt::KeyboardModifiers mods = Qt::NoModifier); static void handleTouchEvent(QWindow *w, ulong timestamp, QTouchDevice *device, const QList &points, Qt::KeyboardModifiers mods = Qt::NoModifier); + static void handleTouchCancelEvent(QWindow *w, QTouchDevice *device, Qt::KeyboardModifiers mods = Qt::NoModifier); + static void handleTouchCancelEvent(QWindow *w, ulong timestamp, QTouchDevice *device, Qt::KeyboardModifiers mods = Qt::NoModifier); static void handleGeometryChange(QWindow *w, const QRect &newRect); static void handleSynchronousGeometryChange(QWindow *w, const QRect &newRect); @@ -128,6 +130,8 @@ public: static void handleScreenAvailableGeometryChange(QScreen *screen, const QRect &newAvailableGeometry); static void handleScreenLogicalDotsPerInchChange(QScreen *screen, qreal newDpiX, qreal newDpiY); + static void handleThemeChange(QWindow *tlw); + // For event dispatcher implementations static bool sendWindowSystemEvents(QAbstractEventDispatcher *eventDispatcher, QEventLoop::ProcessEventsFlags flags); static int windowSystemEventsQueued(); diff --git a/src/gui/kernel/qwindowsysteminterface_qpa_p.h b/src/gui/kernel/qwindowsysteminterface_qpa_p.h index 0bd9ba017aa..661b39da882 100644 --- a/src/gui/kernel/qwindowsysteminterface_qpa_p.h +++ b/src/gui/kernel/qwindowsysteminterface_qpa_p.h @@ -64,6 +64,7 @@ public: ScreenGeometry, ScreenAvailableGeometry, ScreenLogicalDotsPerInch, + ThemeChange, Map, Unmap, Expose @@ -230,6 +231,13 @@ public: qreal dpiY; }; + class ThemeChangeEvent : public WindowSystemEvent { + public: + explicit ThemeChangeEvent(QWindow * w) + : WindowSystemEvent(ThemeChange), window(w) { } + QWeakPointer window; + }; + class MapEvent : public WindowSystemEvent { public: MapEvent(QWindow *mapped) diff --git a/src/gui/opengl/qopenglbuffer.cpp b/src/gui/opengl/qopenglbuffer.cpp index e0ab98df210..e6879a9e602 100644 --- a/src/gui/opengl/qopenglbuffer.cpp +++ b/src/gui/opengl/qopenglbuffer.cpp @@ -529,7 +529,11 @@ void *QOpenGLBuffer::map(QOpenGLBuffer::Access access) return glMapBufferARB(d->type, access); #endif Q_UNUSED(access); - qWarning("QOpenGLBuffer::map(): pending implementation"); + static bool warned = false; + if (!warned) { + qWarning("QOpenGLBuffer::map(): pending implementation"); + warned = true; + } return 0; } @@ -560,7 +564,11 @@ bool QOpenGLBuffer::unmap() return false; return glUnmapBufferARB(d->type) == GL_TRUE; #endif - qWarning("QOpenGLBuffer::map(): pending implementation"); + static bool warned = false; + if (!warned) { + qWarning("QOpenGLBuffer::map(): pending implementation"); + warned = true; + } return 0; } diff --git a/src/gui/opengl/qopenglframebufferobject.cpp b/src/gui/opengl/qopenglframebufferobject.cpp index 5e22554303a..0eb264b2d9d 100644 --- a/src/gui/opengl/qopenglframebufferobject.cpp +++ b/src/gui/opengl/qopenglframebufferobject.cpp @@ -313,9 +313,8 @@ bool QOpenGLFramebufferObjectFormat::operator!=(const QOpenGLFramebufferObjectFo return !(*this == other); } -bool QOpenGLFramebufferObjectPrivate::checkFramebufferStatus() const +bool QOpenGLFramebufferObjectPrivate::checkFramebufferStatus(QOpenGLContext *ctx) const { - QOpenGLContext *ctx = QOpenGLContext::currentContext(); if (!ctx) return false; // Context no longer exists. GLenum status = ctx->functions()->glCheckFramebufferStatus(GL_FRAMEBUFFER); @@ -402,8 +401,6 @@ void QOpenGLFramebufferObjectPrivate::init(QOpenGLFramebufferObject *, const QSi GLuint texture = 0; GLuint color_buffer = 0; - GLuint depth_buffer = 0; - GLuint stencil_buffer = 0; QT_CHECK_GLERROR(); // init texture @@ -417,8 +414,8 @@ void QOpenGLFramebufferObjectPrivate::init(QOpenGLFramebufferObject *, const QSi int height = size.height(); int level = 0; while (width > 1 || height > 1) { - width = (width + 1) >> 1; - height = (height + 1) >> 1; + width = qMax(1, width >> 1); + height = qMax(1, height >> 1); ++level; glTexImage2D(target, level, internal_format, width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL); @@ -432,7 +429,7 @@ void QOpenGLFramebufferObjectPrivate::init(QOpenGLFramebufferObject *, const QSi target, texture, 0); QT_CHECK_GLERROR(); - valid = checkFramebufferStatus(); + valid = checkFramebufferStatus(ctx); glBindTexture(target, 0); color_buffer = 0; @@ -458,12 +455,57 @@ void QOpenGLFramebufferObjectPrivate::init(QOpenGLFramebufferObject *, const QSi GL_RENDERBUFFER, color_buffer); QT_CHECK_GLERROR(); - valid = checkFramebufferStatus(); + valid = checkFramebufferStatus(ctx); if (valid) funcs.glGetRenderbufferParameteriv(GL_RENDERBUFFER, GL_RENDERBUFFER_SAMPLES, &samples); } + format.setTextureTarget(target); + format.setSamples(int(samples)); + format.setInternalTextureFormat(internal_format); + format.setMipmap(mipmap); + + initAttachments(ctx, attachment); + + funcs.glBindFramebuffer(GL_FRAMEBUFFER, ctx->d_func()->current_fbo); + if (valid) { + fbo_guard = new QOpenGLSharedResourceGuard(ctx, fbo, freeFramebufferFunc); + if (color_buffer) + color_buffer_guard = new QOpenGLSharedResourceGuard(ctx, color_buffer, freeRenderbufferFunc); + else + texture_guard = new QOpenGLSharedResourceGuard(ctx, texture, freeTextureFunc); + } else { + if (color_buffer) + funcs.glDeleteRenderbuffers(1, &color_buffer); + else + glDeleteTextures(1, &texture); + funcs.glDeleteFramebuffers(1, &fbo); + } + QT_CHECK_GLERROR(); +} + +void QOpenGLFramebufferObjectPrivate::initAttachments(QOpenGLContext *ctx, QOpenGLFramebufferObject::Attachment attachment) +{ + int samples = format.samples(); + + // free existing attachments + if (depth_buffer_guard) { + funcs.glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, 0); + depth_buffer_guard->free(); + } + if (stencil_buffer_guard) { + funcs.glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, GL_RENDERBUFFER, 0); + if (stencil_buffer_guard != depth_buffer_guard) + stencil_buffer_guard->free(); + } + + depth_buffer_guard = 0; + stencil_buffer_guard = 0; + + GLuint depth_buffer = 0; + GLuint stencil_buffer = 0; + // In practice, a combined depth-stencil buffer is supported by all desktop platforms, while a // separate stencil buffer is not. On embedded devices however, a combined depth-stencil buffer // might not be supported while separate buffers are, according to QTBUG-12861. @@ -488,7 +530,7 @@ void QOpenGLFramebufferObjectPrivate::init(QOpenGLFramebufferObject *, const QSi funcs.glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, GL_RENDERBUFFER, stencil_buffer); - valid = checkFramebufferStatus(); + valid = checkFramebufferStatus(ctx); if (!valid) { funcs.glDeleteRenderbuffers(1, &depth_buffer); stencil_buffer = depth_buffer = 0; @@ -529,7 +571,7 @@ void QOpenGLFramebufferObjectPrivate::init(QOpenGLFramebufferObject *, const QSi } funcs.glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, depth_buffer); - valid = checkFramebufferStatus(); + valid = checkFramebufferStatus(ctx); if (!valid) { funcs.glDeleteRenderbuffers(1, &depth_buffer); depth_buffer = 0; @@ -559,7 +601,7 @@ void QOpenGLFramebufferObjectPrivate::init(QOpenGLFramebufferObject *, const QSi } funcs.glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, GL_RENDERBUFFER, stencil_buffer); - valid = checkFramebufferStatus(); + valid = checkFramebufferStatus(ctx); if (!valid) { funcs.glDeleteRenderbuffers(1, &stencil_buffer); stencil_buffer = 0; @@ -567,7 +609,7 @@ void QOpenGLFramebufferObjectPrivate::init(QOpenGLFramebufferObject *, const QSi } // The FBO might have become valid after removing the depth or stencil buffer. - valid = checkFramebufferStatus(); + valid = checkFramebufferStatus(ctx); if (depth_buffer && stencil_buffer) { fbo_attachment = QOpenGLFramebufferObject::CombinedDepthStencil; @@ -577,13 +619,7 @@ void QOpenGLFramebufferObjectPrivate::init(QOpenGLFramebufferObject *, const QSi fbo_attachment = QOpenGLFramebufferObject::NoAttachment; } - funcs.glBindFramebuffer(GL_FRAMEBUFFER, ctx->d_func()->current_fbo); if (valid) { - fbo_guard = new QOpenGLSharedResourceGuard(ctx, fbo, freeFramebufferFunc); - if (color_buffer) - color_buffer_guard = new QOpenGLSharedResourceGuard(ctx, color_buffer, freeRenderbufferFunc); - else - texture_guard = new QOpenGLSharedResourceGuard(ctx, texture, freeTextureFunc); if (depth_buffer) depth_buffer_guard = new QOpenGLSharedResourceGuard(ctx, depth_buffer, freeRenderbufferFunc); if (stencil_buffer) { @@ -593,23 +629,14 @@ void QOpenGLFramebufferObjectPrivate::init(QOpenGLFramebufferObject *, const QSi stencil_buffer_guard = new QOpenGLSharedResourceGuard(ctx, stencil_buffer, freeRenderbufferFunc); } } else { - if (color_buffer) - funcs.glDeleteRenderbuffers(1, &color_buffer); - else - glDeleteTextures(1, &texture); if (depth_buffer) funcs.glDeleteRenderbuffers(1, &depth_buffer); if (stencil_buffer && depth_buffer != stencil_buffer) funcs.glDeleteRenderbuffers(1, &stencil_buffer); - funcs.glDeleteFramebuffers(1, &fbo); } QT_CHECK_GLERROR(); - format.setTextureTarget(target); - format.setSamples(int(samples)); format.setAttachment(fbo_attachment); - format.setInternalTextureFormat(internal_format); - format.setMipmap(mipmap); } /*! @@ -861,7 +888,7 @@ bool QOpenGLFramebufferObject::bind() qWarning("QOpenGLFramebufferObject::bind() called from incompatible context"); #endif d->funcs.glBindFramebuffer(GL_FRAMEBUFFER, d->fbo()); - d->valid = d->checkFramebufferStatus(); + d->valid = d->checkFramebufferStatus(current); if (d->valid && current) current->d_func()->current_fbo = d->fbo(); return d->valid; @@ -1107,6 +1134,30 @@ QOpenGLFramebufferObject::Attachment QOpenGLFramebufferObject::attachment() cons return NoAttachment; } +/*! + Sets the attachments of the framebuffer object. + + This can be used to free or reattach the depth and stencil buffer + attachments as needed. + */ +void QOpenGLFramebufferObject::setAttachment(QOpenGLFramebufferObject::Attachment attachment) +{ + Q_D(QOpenGLFramebufferObject); + if (attachment == d->fbo_attachment || !isValid()) + return; + QOpenGLContext *current = QOpenGLContext::currentContext(); + if (!current) + return; +#ifdef QT_DEBUG + if (current->shareGroup() != d->fbo_guard->group()) + qWarning("QOpenGLFramebufferObject::setAttachment() called from incompatible context"); +#endif + d->funcs.glBindFramebuffer(GL_FRAMEBUFFER, d->fbo()); + d->initAttachments(current, attachment); + if (current->d_func()->current_fbo != d->fbo()) + d->funcs.glBindFramebuffer(GL_FRAMEBUFFER, current->d_func()->current_fbo); +} + /*! Returns true if the framebuffer object is currently bound to a context, otherwise false is returned. diff --git a/src/gui/opengl/qopenglframebufferobject.h b/src/gui/opengl/qopenglframebufferobject.h index 0b2ead1cbbf..63260f1940f 100644 --- a/src/gui/opengl/qopenglframebufferobject.h +++ b/src/gui/opengl/qopenglframebufferobject.h @@ -101,6 +101,8 @@ public: QImage toImage() const; Attachment attachment() const; + void setAttachment(Attachment attachment); + GLuint handle() const; static bool bindDefault(); diff --git a/src/gui/opengl/qopenglframebufferobject_p.h b/src/gui/opengl/qopenglframebufferobject_p.h index 78d9d93ffe1..23cab8f0afb 100644 --- a/src/gui/opengl/qopenglframebufferobject_p.h +++ b/src/gui/opengl/qopenglframebufferobject_p.h @@ -120,7 +120,9 @@ public: QOpenGLFramebufferObject::Attachment attachment, GLenum internal_format, GLenum texture_target, GLint samples = 0, bool mipmap = false); - bool checkFramebufferStatus() const; + void initAttachments(QOpenGLContext *ctx, QOpenGLFramebufferObject::Attachment attachment); + + bool checkFramebufferStatus(QOpenGLContext *ctx) const; QOpenGLSharedResourceGuard *fbo_guard; QOpenGLSharedResourceGuard *texture_guard; QOpenGLSharedResourceGuard *depth_buffer_guard; diff --git a/src/gui/opengl/qopenglgradientcache_p.h b/src/gui/opengl/qopenglgradientcache_p.h index 4035689abd8..7acc8c1d9d0 100644 --- a/src/gui/opengl/qopenglgradientcache_p.h +++ b/src/gui/opengl/qopenglgradientcache_p.h @@ -52,9 +52,9 @@ #include #include -#include #include #include +#include QT_BEGIN_NAMESPACE diff --git a/src/gui/opengl/qopengltexturecache_p.h b/src/gui/opengl/qopengltexturecache_p.h index 549a2f4eab7..8ff20e94643 100644 --- a/src/gui/opengl/qopengltexturecache_p.h +++ b/src/gui/opengl/qopengltexturecache_p.h @@ -55,7 +55,7 @@ #include #include -#include +#include #include #include diff --git a/src/gui/painting/painting.pri b/src/gui/painting/painting.pri index 61a25e9ac86..4cd2351b23c 100644 --- a/src/gui/painting/painting.pri +++ b/src/gui/painting/painting.pri @@ -34,7 +34,8 @@ HEADERS += \ painting/qtextureglyphcache_p.h \ painting/qtransform.h \ painting/qplatformbackingstore_qpa.h \ - painting/qpaintbuffer_p.h + painting/qpaintbuffer_p.h \ + painting/qpathsimplifier_p.h SOURCES += \ @@ -68,7 +69,8 @@ SOURCES += \ painting/qtextureglyphcache.cpp \ painting/qtransform.cpp \ painting/qplatformbackingstore_qpa.cpp \ - painting/qpaintbuffer.cpp + painting/qpaintbuffer.cpp \ + painting/qpathsimplifier.cpp SOURCES += \ painting/qpaintengine_raster.cpp \ diff --git a/src/gui/painting/qbackingstore.cpp b/src/gui/painting/qbackingstore.cpp index 37446f4f801..03c2fc8d6a6 100644 --- a/src/gui/painting/qbackingstore.cpp +++ b/src/gui/painting/qbackingstore.cpp @@ -43,6 +43,7 @@ #include #include #include +#include #include #include diff --git a/src/gui/painting/qblendfunctions.cpp b/src/gui/painting/qblendfunctions.cpp index a83cadb1611..f17a630c8d0 100644 --- a/src/gui/painting/qblendfunctions.cpp +++ b/src/gui/painting/qblendfunctions.cpp @@ -71,21 +71,6 @@ struct SourceAndConstAlpha RGB16 (565) format target format ************************************************************************/ -static inline quint16 convert_argb32_to_rgb16(quint32 spix) -{ - quint32 b = spix; - quint32 g = spix; - b >>= 8; - g >>= 5; - b &= 0x0000f800; - g &= 0x000007e0; - spix >>= 3; - b |= g; - spix &= 0x0000001f; - b |= spix; - return b; -} - struct Blend_RGB16_on_RGB16_NoAlpha { inline void write(quint16 *dst, quint16 src) { *dst = src; } @@ -108,46 +93,11 @@ struct Blend_RGB16_on_RGB16_ConstAlpha { quint32 m_ialpha; }; -struct Blend_ARGB24_on_RGB16_SourceAlpha { - inline void write(quint16 *dst, const qargb8565 &src) { - const uint alpha = src.alpha(); - if (alpha) { - quint16 s = src.rawValue16(); - if (alpha < 255) - s += BYTE_MUL_RGB16(*dst, 255 - alpha); - *dst = s; - } - } - - inline void flush(void *) {} -}; - -struct Blend_ARGB24_on_RGB16_SourceAndConstAlpha { - inline Blend_ARGB24_on_RGB16_SourceAndConstAlpha(quint32 alpha) { - m_alpha = (alpha * 255) >> 8; - } - - inline void write(quint16 *dst, qargb8565 src) { - src = src.byte_mul(src.alpha(m_alpha)); - const uint alpha = src.alpha(); - if (alpha) { - quint16 s = src.rawValue16(); - if (alpha < 255) - s += BYTE_MUL_RGB16(*dst, 255 - alpha); - *dst = s; - } - } - - inline void flush(void *) {} - - quint32 m_alpha; -}; - struct Blend_ARGB32_on_RGB16_SourceAlpha { inline void write(quint16 *dst, quint32 src) { const quint8 alpha = qAlpha(src); - if(alpha) { - quint16 s = convert_argb32_to_rgb16(src); + if (alpha) { + quint16 s = qConvertRgb32To16(src); if(alpha < 255) s += BYTE_MUL_RGB16(*dst, 255 - alpha); *dst = s; @@ -166,7 +116,7 @@ struct Blend_ARGB32_on_RGB16_SourceAndConstAlpha { src = BYTE_MUL(src, m_alpha); const quint8 alpha = qAlpha(src); if(alpha) { - quint16 s = convert_argb32_to_rgb16(src); + quint16 s = qConvertRgb32To16(src); if(alpha < 255) s += BYTE_MUL_RGB16(*dst, 255 - alpha); *dst = s; @@ -203,32 +153,6 @@ void qt_scale_image_rgb16_on_rgb16(uchar *destPixels, int dbpl, } } -void qt_scale_image_argb24_on_rgb16(uchar *destPixels, int dbpl, - const uchar *srcPixels, int sbpl, - const QRectF &targetRect, - const QRectF &sourceRect, - const QRect &clip, - int const_alpha) -{ -#ifdef QT_DEBUG_DRAW - printf("qt_scale_argb24_on_rgb16: dst=(%p, %d), src=(%p, %d), target=(%d, %d), [%d x %d], src=(%d, %d) [%d x %d] alpha=%d\n", - destPixels, dbpl, srcPixels, sbpl, - targetRect.x(), targetRect.y(), targetRect.width(), targetRect.height(), - sourceRect.x(), sourceRect.y(), sourceRect.width(), sourceRect.height(), - const_alpha); -#endif - if (const_alpha == 256) { - Blend_ARGB24_on_RGB16_SourceAlpha noAlpha; - qt_scale_image_16bit(destPixels, dbpl, srcPixels, sbpl, - targetRect, sourceRect, clip, noAlpha); - } else { - Blend_ARGB24_on_RGB16_SourceAndConstAlpha constAlpha(const_alpha); - qt_scale_image_16bit(destPixels, dbpl, srcPixels, sbpl, - targetRect, sourceRect, clip, constAlpha); - } -} - - void qt_scale_image_argb32_on_rgb16(uchar *destPixels, int dbpl, const uchar *srcPixels, int sbpl, const QRectF &targetRect, @@ -280,7 +204,6 @@ void qt_blend_rgb16_on_rgb16(uchar *dst, int dbpl, } } } else if (const_alpha != 0) { - SourceAndConstAlpha alpha(const_alpha); // expects the 0-256 range quint16 *d = (quint16 *) dst; const quint16 *s = (const quint16 *) src; quint8 a = (255 * const_alpha) >> 8; @@ -296,79 +219,6 @@ void qt_blend_rgb16_on_rgb16(uchar *dst, int dbpl, } -template void qt_blend_argb24_on_rgb16(uchar *destPixels, int dbpl, - const uchar *srcPixels, int sbpl, - int w, int h, const T &alphaFunc) -{ - int srcOffset = w*3; - int dstJPL = dbpl / 2; - quint16 *dst = (quint16 *) destPixels; - int dstExtraStride = dstJPL - w; - - for (int y=0; y>8) + (0x80 << 8)) >> 8) & 0xf800; - quint32 rg = ((siag + (siag>>8) + (0x80 << 3)) >> 8) & 0x07e0; - quint32 rb = ((siab + (siab>>8) + (0x80 >> 3)) >> 8) & 0x001f; - - *dst = alphaFunc.bytemul(spix) + rr + rg + rb; - } - - ++dst; - src += 3; - } - dst += dstExtraStride; - } - -} - -static void qt_blend_argb24_on_rgb16(uchar *destPixels, int dbpl, - const uchar *srcPixels, int sbpl, - int w, int h, - int const_alpha) -{ -#ifdef QT_DEBUG_DRAW - printf("qt_blend_argb24_on_rgb16: dst=(%p, %d), src=(%p, %d), dim=(%d, %d) alpha=%d\n", - destPixels, dbpl, srcPixels, sbpl, w, h, const_alpha); -#endif - - if (const_alpha != 256) { - SourceAndConstAlpha alphaFunc(const_alpha); - qt_blend_argb24_on_rgb16(destPixels, dbpl, srcPixels, sbpl, w, h, alphaFunc); - } else { - SourceOnlyAlpha alphaFunc; - qt_blend_argb24_on_rgb16(destPixels, dbpl, srcPixels, sbpl, w, h, alphaFunc); - } -} - - - - void qt_blend_argb32_on_rgb16_const_alpha(uchar *destPixels, int dbpl, const uchar *srcPixels, int sbpl, int w, int h, @@ -383,7 +233,7 @@ void qt_blend_argb32_on_rgb16_const_alpha(uchar *destPixels, int dbpl, uint s = src[i]; s = BYTE_MUL(s, const_alpha); int alpha = qAlpha(s); - s = convert_argb32_to_rgb16(s); + s = qConvertRgb32To16(s); s += BYTE_MUL_RGB16(dst[i], 255 - alpha); dst[i] = s; } @@ -412,7 +262,7 @@ static void qt_blend_argb32_on_rgb16(uchar *destPixels, int dbpl, quint32 alpha = spix >> 24; if (alpha == 255) { - dst[x] = convert_argb32_to_rgb16(spix); + dst[x] = qConvertRgb32To16(spix); } else if (alpha != 0) { quint32 dpix = dst[x]; @@ -473,7 +323,7 @@ static void qt_blend_rgb32_on_rgb16(uchar *destPixels, int dbpl, while (dst < dstEnd) { const quint32 *srcEnd = src + w; while (src < srcEnd) { - *dst = convert_argb32_to_rgb16(*src); + *dst = qConvertRgb32To16(*src); ++dst; ++src; } @@ -545,19 +395,11 @@ void qt_blend_rgb32_on_rgb32(uchar *destPixels, int dbpl, const uint *src = (const uint *) srcPixels; uint *dst = (uint *) destPixels; - if (w <= 64) { - for (int y=0; y(destPixels), dbpl, - reinterpret_cast(srcPixels), sbpl, - targetRect, sourceRect, clip, targetRectTransform, noAlpha); - } else { - Blend_ARGB24_on_RGB16_SourceAndConstAlpha constAlpha(const_alpha); - qt_transform_image(reinterpret_cast(destPixels), dbpl, - reinterpret_cast(srcPixels), sbpl, - targetRect, sourceRect, clip, targetRectTransform, constAlpha); - } -} - - void qt_transform_image_argb32_on_rgb16(uchar *destPixels, int dbpl, const uchar *srcPixels, int sbpl, const QRectF &targetRect, @@ -903,7 +723,7 @@ SrcOverScaleFunc qScaleFunctions[QImage::NImageFormats][QImage::NImageFormats] = 0, // Format_ARGB32, qt_scale_image_argb32_on_rgb16, // Format_ARGB32_Premultiplied, qt_scale_image_rgb16_on_rgb16, // Format_RGB16, - qt_scale_image_argb24_on_rgb16, // Format_ARGB8565_Premultiplied, + 0, // Format_ARGB8565_Premultiplied, 0, // Format_RGB666, 0, // Format_ARGB6666_Premultiplied, 0, // Format_RGB555, @@ -1195,7 +1015,7 @@ SrcOverBlendFunc qBlendFunctions[QImage::NImageFormats][QImage::NImageFormats] = 0, // Format_ARGB32, qt_blend_argb32_on_rgb16, // Format_ARGB32_Premultiplied, qt_blend_rgb16_on_rgb16, // Format_RGB16, - qt_blend_argb24_on_rgb16, // Format_ARGB8565_Premultiplied, + 0, // Format_ARGB8565_Premultiplied, 0, // Format_RGB666, 0, // Format_ARGB6666_Premultiplied, 0, // Format_RGB555, @@ -1486,7 +1306,7 @@ SrcOverTransformFunc qTransformFunctions[QImage::NImageFormats][QImage::NImageFo 0, // Format_ARGB32, qt_transform_image_argb32_on_rgb16, // Format_ARGB32_Premultiplied, qt_transform_image_rgb16_on_rgb16, // Format_RGB16, - qt_transform_image_argb24_on_rgb16, // Format_ARGB8565_Premultiplied, + 0, // Format_ARGB8565_Premultiplied, 0, // Format_RGB666, 0, // Format_ARGB6666_Premultiplied, 0, // Format_RGB555, diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp index 13b8c8cae5d..0491a3deaf9 100644 --- a/src/gui/painting/qdrawhelper.cpp +++ b/src/gui/painting/qdrawhelper.cpp @@ -79,6 +79,232 @@ enum { // must be multiple of 4 for easier SIMD implementations static const int buffer_size = 2048; + + + +// To convert in place, let 'dest' and 'src' be the same. +static const uint *QT_FASTCALL convertIndexedToARGB32PM(uint *buffer, const uint *src, int count, + const QPixelLayout *, const QRgb *clut) +{ + for (int i = 0; i < count; ++i) + buffer[i] = PREMUL(clut[src[i]]); + return buffer; +} + +static const uint *QT_FASTCALL convertPassThrough(uint *, const uint *src, int, + const QPixelLayout *, const QRgb *) +{ + return src; +} + +static const uint *QT_FASTCALL convertRGB16ToARGB32PM(uint *buffer, const uint *src, int count, + const QPixelLayout *, const QRgb *) +{ + for (int i = 0; i < count; ++i) + buffer[i] = qConvertRgb16To32(src[i]); + return buffer; +} + +static const uint *QT_FASTCALL convertARGB32ToARGB32PM(uint *buffer, const uint *src, int count, + const QPixelLayout *, const QRgb *) +{ + for (int i = 0; i < count; ++i) + buffer[i] = PREMUL(src[i]); + return buffer; +} + +static const uint *QT_FASTCALL convertToRGB32(uint *buffer, const uint *src, int count, + const QPixelLayout *layout, const QRgb *) +{ + Q_ASSERT(layout->redWidth >= 4); + Q_ASSERT(layout->greenWidth >= 4); + Q_ASSERT(layout->blueWidth >= 4); + Q_ASSERT(layout->alphaWidth == 0); + + const uint redMask = ((1 << layout->redWidth) - 1); + const uint greenMask = ((1 << layout->greenWidth) - 1); + const uint blueMask = ((1 << layout->blueWidth) - 1); + + const uchar redLeftShift = 8 - layout->redWidth; + const uchar greenLeftShift = 8 - layout->greenWidth; + const uchar blueLeftShift = 8 - layout->blueWidth; + + const uchar redRightShift = 2 * layout->redWidth - 8; + const uchar greenRightShift = 2 * layout->greenWidth - 8; + const uchar blueRightShift = 2 * layout->blueWidth - 8; + + for (int i = 0; i < count; ++i) { + uint red = (src[i] >> layout->redShift) & redMask; + uint green = (src[i] >> layout->greenShift) & greenMask; + uint blue = (src[i] >> layout->blueShift) & blueMask; + + red = ((red << redLeftShift) | (red >> redRightShift)) << 16; + green = ((green << greenLeftShift) | (green >> greenRightShift)) << 8; + blue = (blue << blueLeftShift) | (blue >> blueRightShift); + buffer[i] = 0xff000000 | red | green | blue; + } + + return buffer; +} + +static const uint *QT_FASTCALL convertToARGB32PM(uint *buffer, const uint *src, int count, + const QPixelLayout *layout, const QRgb *) +{ + Q_ASSERT(layout->redWidth >= 4); + Q_ASSERT(layout->greenWidth >= 4); + Q_ASSERT(layout->blueWidth >= 4); + Q_ASSERT(layout->alphaWidth >= 4); + + const uint redMask = ((1 << layout->redWidth) - 1); + const uint greenMask = ((1 << layout->greenWidth) - 1); + const uint blueMask = ((1 << layout->blueWidth) - 1); + + const uchar redLeftShift = 8 - layout->redWidth; + const uchar greenLeftShift = 8 - layout->greenWidth; + const uchar blueLeftShift = 8 - layout->blueWidth; + + const uchar redRightShift = 2 * layout->redWidth - 8; + const uchar greenRightShift = 2 * layout->greenWidth - 8; + const uchar blueRightShift = 2 * layout->blueWidth - 8; + + const uint alphaMask = ((1 << layout->alphaWidth) - 1); + const uchar alphaLeftShift = 8 - layout->alphaWidth; + const uchar alphaRightShift = 2 * layout->alphaWidth - 8; + + if (layout->premultiplied) { + for (int i = 0; i < count; ++i) { + uint alpha = (src[i] >> layout->alphaShift) & alphaMask; + uint red = (src[i] >> layout->redShift) & redMask; + uint green = (src[i] >> layout->greenShift) & greenMask; + uint blue = (src[i] >> layout->blueShift) & blueMask; + + alpha = (alpha << alphaLeftShift) | (alpha >> alphaRightShift); + red = qMin(alpha, (red << redLeftShift) | (red >> redRightShift)); + green = qMin(alpha, (green << greenLeftShift) | (green >> greenRightShift)); + blue = qMin(alpha, (blue << blueLeftShift) | (blue >> blueRightShift)); + buffer[i] = (alpha << 24) | (red << 16) | (green << 8) | blue; + } + } else { + for (int i = 0; i < count; ++i) { + uint alpha = (src[i] >> layout->alphaShift) & alphaMask; + uint red = (src[i] >> layout->redShift) & redMask; + uint green = (src[i] >> layout->greenShift) & greenMask; + uint blue = (src[i] >> layout->blueShift) & blueMask; + + alpha = (alpha << alphaLeftShift) | (alpha >> alphaRightShift); + red = (red << redLeftShift) | (red >> redRightShift); + green = (green << greenLeftShift) | (green >> greenRightShift); + blue = (blue << blueLeftShift) | (blue >> blueRightShift); + buffer[i] = PREMUL((alpha << 24) | (red << 16) | (green << 8) | blue); + } + } + return buffer; +} + +static const uint *QT_FASTCALL convertRGB16FromARGB32PM(uint *buffer, const uint *src, int count, + const QPixelLayout *, const QRgb *) +{ + for (int i = 0; i < count; ++i) + buffer[i] = qConvertRgb32To16(INV_PREMUL(src[i])); + return buffer; +} + +static const uint *QT_FASTCALL convertARGB32FromARGB32PM(uint *buffer, const uint *src, int count, + const QPixelLayout *, const QRgb *) +{ + for (int i = 0; i < count; ++i) + buffer[i] = INV_PREMUL(src[i]); + return buffer; +} + +static const uint *QT_FASTCALL convertFromARGB32PM(uint *buffer, const uint *src, int count, + const QPixelLayout *layout, const QRgb *) +{ + Q_ASSERT(layout->redWidth <= 8); + Q_ASSERT(layout->greenWidth <= 8); + Q_ASSERT(layout->blueWidth <= 8); + Q_ASSERT(layout->alphaWidth <= 8); + + const uint redMask = (1 << layout->redWidth) - 1; + const uint greenMask = (1 << layout->greenWidth) - 1; + const uint blueMask = (1 << layout->blueWidth) - 1; + const uint alphaMask = (1 << layout->alphaWidth) - 1; + + const uchar redRightShift = 24 - layout->redWidth; + const uchar greenRightShift = 16 - layout->greenWidth; + const uchar blueRightShift = 8 - layout->blueWidth; + const uchar alphaRightShift = 32 - layout->alphaWidth; + + if (!layout->premultiplied) { + for (int i = 0; i < count; ++i) + buffer[i] = qAlpha(src[i]) == 255 ? src[i] : INV_PREMUL(src[i]); + src = buffer; + } + for (int i = 0; i < count; ++i) { + uint red = ((src[i] >> redRightShift) & redMask) << layout->redShift; + uint green = ((src[i] >> greenRightShift) & greenMask) << layout->greenShift; + uint blue = ((src[i] >> blueRightShift) & blueMask) << layout->blueShift; + uint alpha = ((src[i] >> alphaRightShift) & alphaMask) << layout->alphaShift; + buffer[i] = red | green | blue | alpha; + } + return buffer; +} + +// Note: +// convertToArgb32() assumes that no color channel is less than 4 bits. +// convertFromArgb32() assumes that no color channel is more than 8 bits. +// QImage::rgbSwapped() assumes that the red and blue color channels have the same number of bits. +QPixelLayout qPixelLayouts[QImage::NImageFormats] = { + { 0, 0, 0, 0, 0, 0, 0, 0, false, QPixelLayout::BPPNone, 0, 0 }, // Format_Invalid + { 0, 0, 0, 0, 0, 0, 0, 0, false, QPixelLayout::BPP1MSB, convertIndexedToARGB32PM, 0 }, // Format_Mono + { 0, 0, 0, 0, 0, 0, 0, 0, false, QPixelLayout::BPP1LSB, convertIndexedToARGB32PM, 0 }, // Format_MonoLSB + { 0, 0, 0, 0, 0, 0, 0, 0, false, QPixelLayout::BPP8, convertIndexedToARGB32PM, 0 }, // Format_Indexed8 + { 8, 16, 8, 8, 8, 0, 0, 0, false, QPixelLayout::BPP32, convertPassThrough, convertPassThrough }, // Format_RGB32 + { 8, 16, 8, 8, 8, 0, 8, 24, false, QPixelLayout::BPP32, convertARGB32ToARGB32PM, convertARGB32FromARGB32PM }, // Format_ARGB32 + { 8, 16, 8, 8, 8, 0, 8, 24, true, QPixelLayout::BPP32, convertPassThrough, convertPassThrough }, // Format_ARGB32_Premultiplied + { 5, 11, 6, 5, 5, 0, 0, 0, false, QPixelLayout::BPP16, convertRGB16ToARGB32PM, convertRGB16FromARGB32PM }, // Format_RGB16 + { 5, 19, 6, 13, 5, 8, 8, 0, true, QPixelLayout::BPP24, convertToARGB32PM, convertFromARGB32PM }, // Format_ARGB8565_Premultiplied + { 6, 12, 6, 6, 6, 0, 0, 0, false, QPixelLayout::BPP24, convertToRGB32, convertFromARGB32PM }, // Format_RGB666 + { 6, 12, 6, 6, 6, 0, 6, 18, true, QPixelLayout::BPP24, convertToARGB32PM, convertFromARGB32PM }, // Format_ARGB6666_Premultiplied + { 5, 10, 5, 5, 5, 0, 0, 0, false, QPixelLayout::BPP16, convertToRGB32, convertFromARGB32PM }, // Format_RGB555 + { 5, 18, 5, 13, 5, 8, 8, 0, true, QPixelLayout::BPP24, convertToARGB32PM, convertFromARGB32PM }, // Format_ARGB8555_Premultiplied + { 8, 0, 8, 8, 8, 16, 0, 0, false, QPixelLayout::BPP24, convertToRGB32, convertFromARGB32PM }, // Format_RGB888 + { 4, 8, 4, 4, 4, 0, 0, 0, false, QPixelLayout::BPP16, convertToRGB32, convertFromARGB32PM }, // Format_RGB444 + { 4, 8, 4, 4, 4, 0, 4, 12, true, QPixelLayout::BPP16, convertToARGB32PM, convertFromARGB32PM } // Format_ARGB4444_Premultiplied +}; + +FetchPixelsFunc qFetchPixels[QPixelLayout::BPPCount] = { + 0, // BPPNone + fetchPixels, // BPP1MSB + fetchPixels, // BPP1LSB + fetchPixels, // BPP8 + fetchPixels, // BPP16 + fetchPixels, // BPP24 + fetchPixels // BPP32 +}; + +StorePixelsFunc qStorePixels[QPixelLayout::BPPCount] = { + 0, // BPPNone + storePixels, // BPP1MSB + storePixels, // BPP1LSB + storePixels, // BPP8 + storePixels, // BPP16 + storePixels, // BPP24 + storePixels // BPP32 +}; + +typedef uint (QT_FASTCALL *FetchPixelFunc)(const uchar *src, int index); + +FetchPixelFunc qFetchPixel[QPixelLayout::BPPCount] = { + 0, // BPPNone + fetchPixel, // BPP1MSB + fetchPixel, // BPP1LSB + fetchPixel, // BPP8 + fetchPixel, // BPP16 + fetchPixel, // BPP24 + fetchPixel // BPP32 +}; + /* Destination fetch. This is simple as we don't have to do bounds checks or transformations @@ -110,14 +336,6 @@ static uint * QT_FASTCALL destFetchMonoLsb(uint *buffer, QRasterBuffer *rasterBu return start; } -static uint * QT_FASTCALL destFetchARGB32(uint *buffer, QRasterBuffer *rasterBuffer, int x, int y, int length) -{ - const uint *data = (const uint *)rasterBuffer->scanLine(y) + x; - for (int i = 0; i < length; ++i) - buffer[i] = PREMUL(data[i]); - return buffer; -} - static uint * QT_FASTCALL destFetchARGB32P(uint *, QRasterBuffer *rasterBuffer, int x, int y, int) { return (uint *)rasterBuffer->scanLine(y) + x; @@ -131,37 +349,32 @@ static uint * QT_FASTCALL destFetchRGB16(uint *buffer, QRasterBuffer *rasterBuff return buffer; } -template -Q_STATIC_TEMPLATE_FUNCTION uint * QT_FASTCALL destFetch(uint *buffer, QRasterBuffer *rasterBuffer, - int x, int y, int length) +static uint *QT_FASTCALL destFetch(uint *buffer, QRasterBuffer *rasterBuffer, int x, int y, int length) { - const DST *src = reinterpret_cast(rasterBuffer->scanLine(y)) + x; - quint32 *dest = reinterpret_cast(buffer); - while (length--) - *dest++ = *src++; - return buffer; + const QPixelLayout *layout = &qPixelLayouts[rasterBuffer->format]; + const uint *ptr = qFetchPixels[layout->bpp](buffer, rasterBuffer->scanLine(y), x, length); + return const_cast(layout->convertToARGB32PM(buffer, ptr, length, layout, 0)); } -# define SPANFUNC_POINTER_DESTFETCH(Arg) destFetch static DestFetchProc destFetchProc[QImage::NImageFormats] = { - 0, // Format_Invalid - destFetchMono, // Format_Mono, - destFetchMonoLsb, // Format_MonoLSB - 0, // Format_Indexed8 - destFetchARGB32P, // Format_RGB32 - destFetchARGB32, // Format_ARGB32, - destFetchARGB32P, // Format_ARGB32_Premultiplied - destFetchRGB16, // Format_RGB16 - SPANFUNC_POINTER_DESTFETCH(qargb8565), // Format_ARGB8565_Premultiplied - SPANFUNC_POINTER_DESTFETCH(qrgb666), // Format_RGB666 - SPANFUNC_POINTER_DESTFETCH(qargb6666), // Format_ARGB6666_Premultiplied - SPANFUNC_POINTER_DESTFETCH(qrgb555), // Format_RGB555 - SPANFUNC_POINTER_DESTFETCH(qargb8555), // Format_ARGB8555_Premultiplied - SPANFUNC_POINTER_DESTFETCH(qrgb888), // Format_RGB888 - SPANFUNC_POINTER_DESTFETCH(qrgb444), // Format_RGB444 - SPANFUNC_POINTER_DESTFETCH(qargb4444) // Format_ARGB4444_Premultiplied + 0, // Format_Invalid + destFetchMono, // Format_Mono, + destFetchMonoLsb, // Format_MonoLSB + 0, // Format_Indexed8 + destFetchARGB32P, // Format_RGB32 + destFetch, // Format_ARGB32, + destFetchARGB32P, // Format_ARGB32_Premultiplied + destFetchRGB16, // Format_RGB16 + destFetch, // Format_ARGB8565_Premultiplied + destFetch, // Format_RGB666 + destFetch, // Format_ARGB6666_Premultiplied + destFetch, // Format_RGB555 + destFetch, // Format_ARGB8555_Premultiplied + destFetch, // Format_RGB888 + destFetch, // Format_RGB444 + destFetch // Format_ARGB4444_Premultiplied }; /* @@ -253,63 +466,47 @@ static void QT_FASTCALL destStoreMonoLsb(QRasterBuffer *rasterBuffer, int x, int } } -static void QT_FASTCALL destStoreARGB32(QRasterBuffer *rasterBuffer, int x, int y, const uint *buffer, int length) -{ - uint *data = (uint *)rasterBuffer->scanLine(y) + x; - for (int i = 0; i < length; ++i) { - int p = buffer[i]; - int alpha = qAlpha(p); - if (alpha == 255) - data[i] = p; - else if (alpha == 0) - data[i] = 0; - else { - int inv_alpha = 0xff0000/qAlpha(buffer[i]); - data[i] = (p & 0xff000000) - | ((qRed(p)*inv_alpha) & 0xff0000) - | (((qGreen(p)*inv_alpha) >> 8) & 0xff00) - | ((qBlue(p)*inv_alpha) >> 16); - } - } -} - static void QT_FASTCALL destStoreRGB16(QRasterBuffer *rasterBuffer, int x, int y, const uint *buffer, int length) { quint16 *data = (quint16*)rasterBuffer->scanLine(y) + x; - qt_memconvert(data, buffer, length); + for (int i = 0; i < length; ++i) + data[i] = qConvertRgb32To16(buffer[i]); } -template -Q_STATIC_TEMPLATE_FUNCTION void QT_FASTCALL destStore(QRasterBuffer *rasterBuffer, - int x, int y, - const uint *buffer, int length) +static void QT_FASTCALL destStore(QRasterBuffer *rasterBuffer, int x, int y, const uint *buffer, int length) { - DST *dest = reinterpret_cast(rasterBuffer->scanLine(y)) + x; - const quint32p *src = reinterpret_cast(buffer); - while (length--) - *dest++ = DST(*src++); + uint buf[buffer_size]; + const QPixelLayout *layout = &qPixelLayouts[rasterBuffer->format]; + StorePixelsFunc store = qStorePixels[layout->bpp]; + uchar *dest = rasterBuffer->scanLine(y); + while (length) { + int l = qMin(length, buffer_size); + const uint *ptr = layout->convertFromARGB32PM(buf, buffer, l, layout, 0); + store(dest, ptr, x, l); + length -= l; + buffer += l; + x += l; + } } -# define SPANFUNC_POINTER_DESTSTORE(DEST) destStore - static DestStoreProc destStoreProc[QImage::NImageFormats] = { - 0, // Format_Invalid - destStoreMono, // Format_Mono, - destStoreMonoLsb, // Format_MonoLSB - 0, // Format_Indexed8 - 0, // Format_RGB32 - destStoreARGB32, // Format_ARGB32, - 0, // Format_ARGB32_Premultiplied - destStoreRGB16, // Format_RGB16 - SPANFUNC_POINTER_DESTSTORE(qargb8565), // Format_ARGB8565_Premultiplied - SPANFUNC_POINTER_DESTSTORE(qrgb666), // Format_RGB666 - SPANFUNC_POINTER_DESTSTORE(qargb6666), // Format_ARGB6666_Premultiplied - SPANFUNC_POINTER_DESTSTORE(qrgb555), // Format_RGB555 - SPANFUNC_POINTER_DESTSTORE(qargb8555), // Format_ARGB8555_Premultiplied - SPANFUNC_POINTER_DESTSTORE(qrgb888), // Format_RGB888 - SPANFUNC_POINTER_DESTSTORE(qrgb444), // Format_RGB444 - SPANFUNC_POINTER_DESTSTORE(qargb4444) // Format_ARGB4444_Premultiplied + 0, // Format_Invalid + destStoreMono, // Format_Mono, + destStoreMonoLsb, // Format_MonoLSB + 0, // Format_Indexed8 + 0, // Format_RGB32 + destStore, // Format_ARGB32, + 0, // Format_ARGB32_Premultiplied + destStoreRGB16, // Format_RGB16 + destStore, // Format_ARGB8565_Premultiplied + destStore, // Format_RGB666 + destStore, // Format_ARGB6666_Premultiplied + destStore, // Format_RGB555 + destStore, // Format_ARGB8555_Premultiplied + destStore, // Format_RGB888 + destStore, // Format_RGB444 + destStore // Format_ARGB4444_Premultiplied }; /* @@ -327,175 +524,6 @@ static DestStoreProc destStoreProc[QImage::NImageFormats] = The generic implementation does pixel by pixel fetches */ -template -Q_STATIC_TEMPLATE_FUNCTION uint QT_FASTCALL qt_fetchPixel(const uchar *scanLine, int x, const QVector *rgb); - -template<> -Q_STATIC_TEMPLATE_SPECIALIZATION -uint QT_FASTCALL qt_fetchPixel(const uchar *scanLine, - int x, const QVector *rgb) -{ - bool pixel = scanLine[x>>3] & (0x80 >> (x & 7)); - if (rgb) return PREMUL(rgb->at(pixel ? 1 : 0)); - return pixel ? 0xff000000 : 0xffffffff; -} - -template<> -Q_STATIC_TEMPLATE_SPECIALIZATION -uint QT_FASTCALL qt_fetchPixel(const uchar *scanLine, - int x, const QVector *rgb) -{ - bool pixel = scanLine[x>>3] & (0x1 << (x & 7)); - if (rgb) return PREMUL(rgb->at(pixel ? 1 : 0)); - return pixel ? 0xff000000 : 0xffffffff; -} - -template<> -Q_STATIC_TEMPLATE_SPECIALIZATION -uint QT_FASTCALL qt_fetchPixel(const uchar *scanLine, - int x, const QVector *rgb) -{ - return PREMUL(rgb->at(scanLine[x])); -} - -template<> -Q_STATIC_TEMPLATE_SPECIALIZATION -uint QT_FASTCALL qt_fetchPixel(const uchar *scanLine, - int x, const QVector *) -{ - return PREMUL(((const uint *)scanLine)[x]); -} - -template<> -Q_STATIC_TEMPLATE_SPECIALIZATION -uint QT_FASTCALL qt_fetchPixel(const uchar *scanLine, - int x, const QVector *) -{ - return ((const uint *)scanLine)[x]; -} - -template<> -Q_STATIC_TEMPLATE_SPECIALIZATION -uint QT_FASTCALL qt_fetchPixel(const uchar *scanLine, - int x, const QVector *) -{ - return qConvertRgb16To32(((const ushort *)scanLine)[x]); -} - -template<> -Q_STATIC_TEMPLATE_SPECIALIZATION -uint QT_FASTCALL qt_fetchPixel(const uchar *scanLine, - int x, - const QVector *) -{ - const qargb8565 color = reinterpret_cast(scanLine)[x]; - return qt_colorConvert(color, 0); -} - -template<> -Q_STATIC_TEMPLATE_SPECIALIZATION -uint QT_FASTCALL qt_fetchPixel(const uchar *scanLine, - int x, - const QVector *) -{ - const qrgb666 color = reinterpret_cast(scanLine)[x]; - return qt_colorConvert(color, 0); -} - -template<> -Q_STATIC_TEMPLATE_SPECIALIZATION -uint QT_FASTCALL qt_fetchPixel(const uchar *scanLine, - int x, - const QVector *) -{ - const qargb6666 color = reinterpret_cast(scanLine)[x]; - return qt_colorConvert(color, 0); -} - -template<> -Q_STATIC_TEMPLATE_SPECIALIZATION -uint QT_FASTCALL qt_fetchPixel(const uchar *scanLine, - int x, - const QVector *) -{ - const qrgb555 color = reinterpret_cast(scanLine)[x]; - return qt_colorConvert(color, 0); -} - -template<> -Q_STATIC_TEMPLATE_SPECIALIZATION -uint QT_FASTCALL qt_fetchPixel(const uchar *scanLine, - int x, - const QVector *) -{ - const qargb8555 color = reinterpret_cast(scanLine)[x]; - return qt_colorConvert(color, 0); -} - -template<> -Q_STATIC_TEMPLATE_SPECIALIZATION -uint QT_FASTCALL qt_fetchPixel(const uchar *scanLine, - int x, - const QVector *) -{ - const qrgb888 color = reinterpret_cast(scanLine)[x]; - return qt_colorConvert(color, 0); -} - -template<> -Q_STATIC_TEMPLATE_SPECIALIZATION -uint QT_FASTCALL qt_fetchPixel(const uchar *scanLine, - int x, - const QVector *) -{ - const qrgb444 color = reinterpret_cast(scanLine)[x]; - return qt_colorConvert(color, 0); -} - -template<> -Q_STATIC_TEMPLATE_SPECIALIZATION -uint QT_FASTCALL qt_fetchPixel(const uchar *scanLine, - int x, - const QVector *) -{ - const qargb4444 color = reinterpret_cast(scanLine)[x]; - return qt_colorConvert(color, 0); -} - -template<> -Q_STATIC_TEMPLATE_SPECIALIZATION -uint QT_FASTCALL qt_fetchPixel(const uchar *, - int , - const QVector *) -{ - return 0; -} - -typedef uint (QT_FASTCALL *FetchPixelProc)(const uchar *scanLine, int x, const QVector *); - -#define SPANFUNC_POINTER_FETCHPIXEL(Arg) qt_fetchPixel - - -static const FetchPixelProc fetchPixelProc[QImage::NImageFormats] = -{ - 0, - SPANFUNC_POINTER_FETCHPIXEL(Format_Mono), - SPANFUNC_POINTER_FETCHPIXEL(Format_MonoLSB), - SPANFUNC_POINTER_FETCHPIXEL(Format_Indexed8), - SPANFUNC_POINTER_FETCHPIXEL(Format_ARGB32_Premultiplied), - SPANFUNC_POINTER_FETCHPIXEL(Format_ARGB32), - SPANFUNC_POINTER_FETCHPIXEL(Format_ARGB32_Premultiplied), - SPANFUNC_POINTER_FETCHPIXEL(Format_RGB16), - SPANFUNC_POINTER_FETCHPIXEL(Format_ARGB8565_Premultiplied), - SPANFUNC_POINTER_FETCHPIXEL(Format_RGB666), - SPANFUNC_POINTER_FETCHPIXEL(Format_ARGB6666_Premultiplied), - SPANFUNC_POINTER_FETCHPIXEL(Format_RGB555), - SPANFUNC_POINTER_FETCHPIXEL(Format_ARGB8555_Premultiplied), - SPANFUNC_POINTER_FETCHPIXEL(Format_RGB888), - SPANFUNC_POINTER_FETCHPIXEL(Format_RGB444), - SPANFUNC_POINTER_FETCHPIXEL(Format_ARGB4444_Premultiplied) -}; - enum TextureBlendType { BlendUntransformed, BlendTiled, @@ -506,33 +534,38 @@ enum TextureBlendType { NBlendTypes }; -template -Q_STATIC_TEMPLATE_FUNCTION const uint * QT_FASTCALL qt_fetchUntransformed(uint *buffer, const Operator *, const QSpanData *data, - int y, int x, int length) +static const uint *QT_FASTCALL fetchUntransformed(uint *buffer, const Operator *, + const QSpanData *data, int y, int x, int length) { - const uchar *scanLine = data->texture.scanLine(y); - for (int i = 0; i < length; ++i) - buffer[i] = qt_fetchPixel(scanLine, x + i, data->texture.colorTable); - return buffer; + const QPixelLayout *layout = &qPixelLayouts[data->texture.format]; + const uint *ptr = qFetchPixels[layout->bpp](buffer, data->texture.scanLine(y), x, length); + const QRgb *clut = data->texture.colorTable ? data->texture.colorTable->constData() : 0; + return layout->convertToARGB32PM(buffer, ptr, length, layout, clut); } -template <> -Q_STATIC_TEMPLATE_SPECIALIZATION const uint * QT_FASTCALL -qt_fetchUntransformed(uint *, const Operator *, - const QSpanData *data, - int y, int x, int) +static const uint *QT_FASTCALL fetchUntransformedARGB32PM(uint *, const Operator *, + const QSpanData *data, int y, int x, int) { const uchar *scanLine = data->texture.scanLine(y); return ((const uint *)scanLine) + x; } -template /* either BlendTransformed or BlendTransformedTiled */ -Q_STATIC_TEMPLATE_FUNCTION -const uint * QT_FASTCALL fetchTransformed(uint *buffer, const Operator *, const QSpanData *data, - int y, int x, int length) +static const uint *QT_FASTCALL fetchUntransformedRGB16(uint *buffer, const Operator *, + const QSpanData *data, int y, int x, + int length) { - FetchPixelProc fetch = fetchPixelProc[data->texture.format]; + const quint16 *scanLine = (const quint16 *)data->texture.scanLine(y) + x; + for (int i = 0; i < length; ++i) + buffer[i] = qConvertRgb16To32(scanLine[i]); + return buffer; +} +// blendType is either BlendTransformed or BlendTransformedTiled +template +Q_STATIC_TEMPLATE_FUNCTION +const uint *QT_FASTCALL fetchTransformedARGB32PM(uint *buffer, const Operator *, const QSpanData *data, + int y, int x, int length) +{ int image_width = data->texture.width; int image_height = data->texture.height; @@ -560,18 +593,12 @@ const uint * QT_FASTCALL fetchTransformed(uint *buffer, const Operator *, const py %= image_height; if (px < 0) px += image_width; if (py < 0) py += image_height; - - const uchar *scanLine = data->texture.scanLine(py); - *b = fetch(scanLine, px, data->texture.colorTable); } else { - if ((px < 0) || (px >= image_width) - || (py < 0) || (py >= image_height)) { - *b = uint(0); - } else { - const uchar *scanLine = data->texture.scanLine(py); - *b = fetch(scanLine, px, data->texture.colorTable); - } + px = qBound(0, px, image_width - 1); + py = qBound(0, py, image_height - 1); } + *b = reinterpret_cast(data->texture.scanLine(py))[px]; + fx += fdx; fy += fdy; ++b; @@ -597,18 +624,12 @@ const uint * QT_FASTCALL fetchTransformed(uint *buffer, const Operator *, const py %= image_height; if (px < 0) px += image_width; if (py < 0) py += image_height; - - const uchar *scanLine = data->texture.scanLine(py); - *b = fetch(scanLine, px, data->texture.colorTable); } else { - if ((px < 0) || (px >= image_width) - || (py < 0) || (py >= image_height)) { - *b = uint(0); - } else { - const uchar *scanLine = data->texture.scanLine(py); - *b = fetch(scanLine, px, data->texture.colorTable); - } + px = qBound(0, px, image_width - 1); + py = qBound(0, py, image_height - 1); } + *b = reinterpret_cast(data->texture.scanLine(py))[px]; + fx += fdx; fy += fdy; fw += fdw; @@ -619,10 +640,95 @@ const uint * QT_FASTCALL fetchTransformed(uint *buffer, const Operator *, const ++b; } } - return buffer; } +template /* either BlendTransformed or BlendTransformedTiled */ +Q_STATIC_TEMPLATE_FUNCTION +const uint *QT_FASTCALL fetchTransformed(uint *buffer, const Operator *, const QSpanData *data, + int y, int x, int length) +{ + int image_width = data->texture.width; + int image_height = data->texture.height; + + const qreal cx = x + qreal(0.5); + const qreal cy = y + qreal(0.5); + + const QPixelLayout *layout = &qPixelLayouts[data->texture.format]; + FetchPixelFunc fetch = qFetchPixel[layout->bpp]; + + const uint *end = buffer + length; + uint *b = buffer; + if (data->fast_matrix) { + // The increment pr x in the scanline + int fdx = (int)(data->m11 * fixed_scale); + int fdy = (int)(data->m12 * fixed_scale); + + int fx = int((data->m21 * cy + + data->m11 * cx + data->dx) * fixed_scale); + int fy = int((data->m22 * cy + + data->m12 * cx + data->dy) * fixed_scale); + + while (b < end) { + int px = fx >> 16; + int py = fy >> 16; + + if (blendType == BlendTransformedTiled) { + px %= image_width; + py %= image_height; + if (px < 0) px += image_width; + if (py < 0) py += image_height; + } else { + px = qBound(0, px, image_width - 1); + py = qBound(0, py, image_height - 1); + } + *b = fetch(data->texture.scanLine(py), px); + + fx += fdx; + fy += fdy; + ++b; + } + } else { + const qreal fdx = data->m11; + const qreal fdy = data->m12; + const qreal fdw = data->m13; + + qreal fx = data->m21 * cy + data->m11 * cx + data->dx; + qreal fy = data->m22 * cy + data->m12 * cx + data->dy; + qreal fw = data->m23 * cy + data->m13 * cx + data->m33; + + while (b < end) { + const qreal iw = fw == 0 ? 1 : 1 / fw; + const qreal tx = fx * iw; + const qreal ty = fy * iw; + int px = int(tx) - (tx < 0); + int py = int(ty) - (ty < 0); + + if (blendType == BlendTransformedTiled) { + px %= image_width; + py %= image_height; + if (px < 0) px += image_width; + if (py < 0) py += image_height; + } else { + px = qBound(0, px, image_width - 1); + py = qBound(0, py, image_height - 1); + } + *b = fetch(data->texture.scanLine(py), px); + + fx += fdx; + fy += fdy; + fw += fdw; + //force increment to avoid /0 + if (!fw) { + fw += fdw; + } + ++b; + } + } + const QRgb *clut = data->texture.colorTable ? data->texture.colorTable->constData() : 0; + return layout->convertToARGB32PM(buffer, buffer, length, layout, clut); +} + /** \internal interpolate 4 argb pixels with the distx and disty factor. distx and disty bust be between 0 and 16 @@ -714,42 +820,42 @@ static inline uint interpolate_4_pixels_16(uint tl, uint tr, uint bl, uint br, i #endif template -Q_STATIC_TEMPLATE_FUNCTION inline void fetchTransformedBilinear_pixelBounds(int max, int l1, int l2, int &v1, int &v2) -{ - if (blendType == BlendTransformedBilinearTiled) { - v1 %= max; - if (v1 < 0) v1 += max; - v2 = v1 + 1; - v2 %= max; - } else { - if (v1 < l1) { - v2 = v1 = l1; - } else if (v1 >= l2) { - v2 = v1 = l2; - } else { - v2 = v1 + 1; - } - } +void fetchTransformedBilinear_pixelBounds(int max, int l1, int l2, int &v1, int &v2); +template<> +Q_STATIC_TEMPLATE_SPECIALIZATION +inline void fetchTransformedBilinear_pixelBounds(int max, int, int, int &v1, int &v2) +{ + v1 %= max; + if (v1 < 0) + v1 += max; + v2 = v1 + 1; + if (v2 == max) + v2 = 0; Q_ASSERT(v1 >= 0 && v1 < max); Q_ASSERT(v2 >= 0 && v2 < max); } -template /* blendType = BlendTransformedBilinear or BlendTransformedBilinearTiled */ -Q_STATIC_TEMPLATE_FUNCTION -const uint * QT_FASTCALL fetchTransformedBilinear(uint *buffer, const Operator *, const QSpanData *data, - int y, int x, int length) +template<> +Q_STATIC_TEMPLATE_SPECIALIZATION +inline void fetchTransformedBilinear_pixelBounds(int, int l1, int l2, int &v1, int &v2) { -#ifdef Q_CC_RVCT // needed to avoid compiler crash in RVCT 2.2 - FetchPixelProc fetch; - if (format != QImage::Format_Invalid) - fetch = qt_fetchPixel; + if (v1 < l1) + v2 = v1 = l1; + else if (v1 >= l2) + v2 = v1 = l2; else - fetch = fetchPixelProc[data->texture.format]; -#else - FetchPixelProc fetch = (format != QImage::Format_Invalid) ? FetchPixelProc(qt_fetchPixel) : fetchPixelProc[data->texture.format]; -#endif + v2 = v1 + 1; + Q_ASSERT(v1 >= l1 && v1 <= l2); + Q_ASSERT(v2 >= l1 && v2 <= l2); +} +template /* blendType = BlendTransformedBilinear or BlendTransformedBilinearTiled */ +Q_STATIC_TEMPLATE_FUNCTION +const uint * QT_FASTCALL fetchTransformedBilinearARGB32PM(uint *buffer, const Operator *, + const QSpanData *data, int y, int x, + int length) +{ int image_width = data->texture.width; int image_height = data->texture.height; @@ -780,8 +886,8 @@ const uint * QT_FASTCALL fetchTransformedBilinear(uint *buffer, const Operator * int y1 = (fy >> 16); int y2; fetchTransformedBilinear_pixelBounds(image_height, image_y1, image_y2, y1, y2); - const uchar *s1 = data->texture.scanLine(y1); - const uchar *s2 = data->texture.scanLine(y2); + const uint *s1 = (const uint *)data->texture.scanLine(y1); + const uint *s2 = (const uint *)data->texture.scanLine(y2); if (fdx <= fixed_scale && fdx > 0) { // scale up on X int disty = (fy & 0x0000ffff) >> 8; @@ -806,8 +912,8 @@ const uint * QT_FASTCALL fetchTransformedBilinear(uint *buffer, const Operator * lim = qMin(count, image_x2-x+1); if (x < image_x1) { Q_ASSERT(x <= image_x2); - uint t = fetch(s1, image_x1, data->texture.colorTable); - uint b = fetch(s2, image_x1, data->texture.colorTable); + uint t = s1[image_x1]; + uint b = s2[image_x1]; quint32 rb = (((t & 0xff00ff) * idisty + (b & 0xff00ff) * disty) >> 8) & 0xff00ff; quint32 ag = ((((t>>8) & 0xff00ff) * idisty + ((b>>8) & 0xff00ff) * disty) >> 8) & 0xff00ff; do { @@ -819,8 +925,7 @@ const uint * QT_FASTCALL fetchTransformedBilinear(uint *buffer, const Operator * } } - if (blendType != BlendTransformedBilinearTiled && - (format == QImage::Format_ARGB32_Premultiplied || format == QImage::Format_RGB32)) { + if (blendType != BlendTransformedBilinearTiled) { #if defined(QT_ALWAYS_HAVE_SSE2) const __m128i disty_ = _mm_set1_epi16(disty); const __m128i idisty_ = _mm_set1_epi16(idisty); @@ -890,8 +995,8 @@ const uint * QT_FASTCALL fetchTransformedBilinear(uint *buffer, const Operator * x = qMin(x, image_x2); } - uint t = fetch(s1, x, data->texture.colorTable); - uint b = fetch(s2, x, data->texture.colorTable); + uint t = s1[x]; + uint b = s2[x]; intermediate_buffer[0][f] = (((t & 0xff00ff) * idisty + (b & 0xff00ff) * disty) >> 8) & 0xff00ff; intermediate_buffer[1][f] = ((((t>>8) & 0xff00ff) * idisty + ((b>>8) & 0xff00ff) * disty) >> 8) & 0xff00ff; @@ -918,18 +1023,18 @@ const uint * QT_FASTCALL fetchTransformedBilinear(uint *buffer, const Operator * int y1 = (fy >> 16); int y2; fetchTransformedBilinear_pixelBounds(image_height, image_y1, image_y2, y1, y2); - const uchar *s1 = data->texture.scanLine(y1); - const uchar *s2 = data->texture.scanLine(y2); + const uint *s1 = (const uint *)data->texture.scanLine(y1); + const uint *s2 = (const uint *)data->texture.scanLine(y2); int disty = (fy & 0x0000ffff) >> 8; int idisty = 256 - disty; while (b < end) { int x1 = (fx >> 16); int x2; fetchTransformedBilinear_pixelBounds(image_width, image_x1, image_x2, x1, x2); - 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); + uint tl = s1[x1]; + uint tr = s1[x2]; + uint bl = s2[x1]; + uint br = s2[x2]; int distx = (fx & 0x0000ffff) >> 8; int idistx = 256 - distx; @@ -945,13 +1050,11 @@ const uint * QT_FASTCALL fetchTransformedBilinear(uint *buffer, const Operator * int y1 = (fy >> 16); int y2; fetchTransformedBilinear_pixelBounds(image_height, image_y1, image_y2, y1, y2); - const uchar *s1 = data->texture.scanLine(y1); - const uchar *s2 = data->texture.scanLine(y2); + const uint *s1 = (const uint *)data->texture.scanLine(y1); + const uint *s2 = (const uint *)data->texture.scanLine(y2); int disty = (fy & 0x0000ffff) >> 12; - if (blendType != BlendTransformedBilinearTiled && - (format == QImage::Format_ARGB32_Premultiplied || format == QImage::Format_RGB32)) { - + if (blendType != BlendTransformedBilinearTiled) { #define BILINEAR_DOWNSCALE_BOUNDS_PROLOG \ while (b < end) { \ int x1 = (fx >> 16); \ @@ -959,10 +1062,10 @@ const uint * QT_FASTCALL fetchTransformedBilinear(uint *buffer, const Operator * 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); \ + uint tl = s1[x1]; \ + uint tr = s1[x2]; \ + uint bl = s2[x1]; \ + uint br = s2[x2]; \ int distx = (fx & 0x0000ffff) >> 12; \ *b = interpolate_4_pixels_16(tl, tr, bl, br, distx, disty); \ fx += fdx; \ @@ -1070,10 +1173,10 @@ const uint * QT_FASTCALL fetchTransformedBilinear(uint *buffer, const Operator * int x1 = (fx >> 16); int x2; fetchTransformedBilinear_pixelBounds(image_width, image_x1, image_x2, x1, x2); - 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); + uint tl = s1[x1]; + uint tr = s1[x2]; + uint bl = s2[x1]; + uint br = s2[x2]; int distx = (fx & 0x0000ffff) >> 12; *b = interpolate_4_pixels_16(tl, tr, bl, br, distx, disty); fx += fdx; @@ -1092,13 +1195,13 @@ const uint * QT_FASTCALL fetchTransformedBilinear(uint *buffer, const Operator * fetchTransformedBilinear_pixelBounds(image_width, image_x1, image_x2, x1, x2); fetchTransformedBilinear_pixelBounds(image_height, image_y1, image_y2, y1, y2); - const uchar *s1 = data->texture.scanLine(y1); - const uchar *s2 = data->texture.scanLine(y2); + const uint *s1 = (const uint *)data->texture.scanLine(y1); + const uint *s2 = (const uint *)data->texture.scanLine(y2); - 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); + uint tl = s1[x1]; + uint tr = s1[x2]; + uint bl = s2[x1]; + uint br = s2[x2]; int distx = (fx & 0x0000ffff) >> 8; int disty = (fy & 0x0000ffff) >> 8; @@ -1124,13 +1227,13 @@ const uint * QT_FASTCALL fetchTransformedBilinear(uint *buffer, const Operator * fetchTransformedBilinear_pixelBounds(image_width, image_x1, image_x2, x1, x2); fetchTransformedBilinear_pixelBounds(image_height, image_y1, image_y2, y1, y2); - const uchar *s1 = data->texture.scanLine(y1); - const uchar *s2 = data->texture.scanLine(y2); + const uint *s1 = (const uint *)data->texture.scanLine(y1); + const uint *s2 = (const uint *)data->texture.scanLine(y2); - 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); + uint tl = s1[x1]; + uint tr = s1[x2]; + uint bl = s2[x1]; + uint br = s2[x2]; int distx = (fx & 0x0000ffff) >> 12; int disty = (fy & 0x0000ffff) >> 12; @@ -1170,13 +1273,13 @@ const uint * QT_FASTCALL fetchTransformedBilinear(uint *buffer, const Operator * fetchTransformedBilinear_pixelBounds(image_width, image_x1, image_x2, x1, x2); fetchTransformedBilinear_pixelBounds(image_height, image_y1, image_y2, y1, y2); - const uchar *s1 = data->texture.scanLine(y1); - const uchar *s2 = data->texture.scanLine(y2); + const uint *s1 = (const uint *)data->texture.scanLine(y1); + const uint *s2 = (const uint *)data->texture.scanLine(y2); - 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); + uint tl = s1[x1]; + uint tr = s1[x2]; + uint bl = s2[x1]; + uint br = s2[x2]; uint xtop = INTERPOLATE_PIXEL_256(tl, idistx, tr, distx); uint xbot = INTERPOLATE_PIXEL_256(bl, idistx, br, distx); @@ -1196,119 +1299,452 @@ const uint * QT_FASTCALL fetchTransformedBilinear(uint *buffer, const Operator * return buffer; } -#define SPANFUNC_POINTER_FETCHHUNTRANSFORMED(Arg) qt_fetchUntransformed +// blendType = BlendTransformedBilinear or BlendTransformedBilinearTiled +template +Q_STATIC_TEMPLATE_FUNCTION +const uint *QT_FASTCALL fetchTransformedBilinear(uint *buffer, const Operator *, + const QSpanData *data, int y, int x, int length) +{ + const QPixelLayout *layout = &qPixelLayouts[data->texture.format]; + const QRgb *clut = data->texture.colorTable ? data->texture.colorTable->constData() : 0; + + int image_width = data->texture.width; + int image_height = data->texture.height; + + int image_x1 = data->texture.x1; + int image_y1 = data->texture.y1; + int image_x2 = data->texture.x2 - 1; + int image_y2 = data->texture.y2 - 1; + + const qreal cx = x + qreal(0.5); + const qreal cy = y + qreal(0.5); + + if (data->fast_matrix) { + // The increment pr x in the scanline + int fdx = (int)(data->m11 * fixed_scale); + int fdy = (int)(data->m12 * fixed_scale); + + int fx = int((data->m21 * cy + data->m11 * cx + data->dx) * fixed_scale); + int fy = int((data->m22 * cy + data->m12 * cx + data->dy) * fixed_scale); + + fx -= half_point; + fy -= half_point; + + if (fdy == 0) { //simple scale, no rotation + int y1 = (fy >> 16); + int y2; + fetchTransformedBilinear_pixelBounds(image_height, image_y1, image_y2, y1, y2); + const uchar *s1 = data->texture.scanLine(y1); + const uchar *s2 = data->texture.scanLine(y2); + + if (fdx <= fixed_scale && fdx > 0) { // scale up on X + int disty = (fy & 0x0000ffff) >> 8; + int idisty = 256 - disty; + int x = fx >> 16; + + // The idea is first to do the interpolation between the row s1 and the row s2 + // into an intermediate buffer, then we interpolate between two pixel of this buffer. + FetchPixelsFunc fetch = qFetchPixels[layout->bpp]; + uint buf1[buffer_size + 2]; + uint buf2[buffer_size + 2]; + const uint *ptr1; + const uint *ptr2; + + int count = qCeil(length * data->m11) + 2; //+1 for the last pixel to interpolate with, and +1 for rounding errors. + Q_ASSERT(count <= buffer_size + 2); //length is supposed to be <= buffer_size and data->m11 < 1 in this case + + if (blendType == BlendTransformedBilinearTiled) { + x %= image_width; + if (x < 0) + x += image_width; + int len1 = qMin(count, image_width - x); + int len2 = qMin(x, count - len1); + + ptr1 = fetch(buf1, s1, x, len1); + ptr1 = layout->convertToARGB32PM(buf1, ptr1, len1, layout, clut); + ptr2 = fetch(buf2, s2, x, len1); + ptr2 = layout->convertToARGB32PM(buf2, ptr2, len1, layout, clut); + for (int i = 0; i < len1; ++i) { + uint t = ptr1[i]; + uint b = ptr2[i]; + buf1[i] = (((t & 0xff00ff) * idisty + (b & 0xff00ff) * disty) >> 8) & 0xff00ff; + buf2[i] = ((((t >> 8) & 0xff00ff) * idisty + ((b >> 8) & 0xff00ff) * disty) >> 8) & 0xff00ff; + } + + if (len2) { + ptr1 = fetch(buf1 + len1, s1, 0, len2); + ptr1 = layout->convertToARGB32PM(buf1 + len1, ptr1, len2, layout, clut); + ptr2 = fetch(buf2 + len1, s2, 0, len2); + ptr2 = layout->convertToARGB32PM(buf2 + len1, ptr2, len2, layout, clut); + for (int i = 0; i < len2; ++i) { + uint t = ptr1[i]; + uint b = ptr2[i]; + buf1[i + len1] = (((t & 0xff00ff) * idisty + (b & 0xff00ff) * disty) >> 8) & 0xff00ff; + buf2[i + len1] = ((((t >> 8) & 0xff00ff) * idisty + ((b >> 8) & 0xff00ff) * disty) >> 8) & 0xff00ff; + } + } + for (int i = image_width; i < count; ++i) { + buf1[i] = buf1[i - image_width]; + buf2[i] = buf2[i - image_width]; + } + } else { + int start = qMax(x, image_x1); + int end = qMin(x + count, image_x2 + 1); + int len = qMax(1, end - start); + int leading = start - x; + + ptr1 = fetch(buf1 + leading, s1, start, len); + ptr1 = layout->convertToARGB32PM(buf1 + leading, ptr1, len, layout, clut); + ptr2 = fetch(buf2 + leading, s2, start, len); + ptr2 = layout->convertToARGB32PM(buf2 + leading, ptr2, len, layout, clut); + + for (int i = 0; i < len; ++i) { + uint t = ptr1[i]; + uint b = ptr2[i]; + buf1[i + leading] = (((t & 0xff00ff) * idisty + (b & 0xff00ff) * disty) >> 8) & 0xff00ff; + buf2[i + leading] = ((((t >> 8) & 0xff00ff) * idisty + ((b >> 8) & 0xff00ff) * disty) >> 8) & 0xff00ff; + } + + for (int i = 0; i < leading; ++i) { + buf1[i] = buf1[leading]; + buf2[i] = buf2[leading]; + } + for (int i = leading + len; i < count; ++i) { + buf1[i] = buf1[i - 1]; + buf2[i] = buf2[i - 1]; + } + } + + // Now interpolate the values from the intermediate_buffer to get the final result. + fx &= fixed_scale - 1; + Q_ASSERT((fx >> 16) == 0); + for (int i = 0; i < length; ++i) { + register int x1 = (fx >> 16); + register int x2 = x1 + 1; + Q_ASSERT(x1 >= 0); + Q_ASSERT(x2 < count); + + register int distx = (fx & 0x0000ffff) >> 8; + register int idistx = 256 - distx; + int rb = ((buf1[x1] * idistx + buf1[x2] * distx) >> 8) & 0xff00ff; + int ag = (buf2[x1] * idistx + buf2[x2] * distx) & 0xff00ff00; + buffer[i] = rb | ag; + fx += fdx; + } + } else { + FetchPixelFunc fetch = qFetchPixel[layout->bpp]; + uint buf1[buffer_size]; + uint buf2[buffer_size]; + uint *b = buffer; + while (length) { + int len = qMin(length, buffer_size / 2); + int fracX = fx; + for (int i = 0; i < len; ++i) { + int x1 = (fx >> 16); + int x2; + fetchTransformedBilinear_pixelBounds(image_width, image_x1, image_x2, x1, x2); + + buf1[i * 2 + 0] = fetch(s1, x1); + buf1[i * 2 + 1] = fetch(s1, x2); + buf2[i * 2 + 0] = fetch(s2, x1); + buf2[i * 2 + 1] = fetch(s2, x2); + + fx += fdx; + } + layout->convertToARGB32PM(buf1, buf1, len * 2, layout, clut); + layout->convertToARGB32PM(buf2, buf2, len * 2, layout, clut); + + if ((fdx < 0 && fdx > -(fixed_scale / 8)) || fabs(data->m22) < (1./8.)) { // scale up more than 8x + int disty = (fy & 0x0000ffff) >> 8; + int idisty = 256 - disty; + for (int i = 0; i < len; ++i) { + uint tl = buf1[i * 2 + 0]; + uint tr = buf1[i * 2 + 1]; + uint bl = buf2[i * 2 + 0]; + uint br = buf2[i * 2 + 1]; + int distx = (fracX & 0x0000ffff) >> 8; + int idistx = 256 - distx; + uint xtop = INTERPOLATE_PIXEL_256(tl, idistx, tr, distx); + uint xbot = INTERPOLATE_PIXEL_256(bl, idistx, br, distx); + b[i] = INTERPOLATE_PIXEL_256(xtop, idisty, xbot, disty); + fracX += fdx; + } + } else { //scale down + int disty = (fy & 0x0000ffff) >> 12; + for (int i = 0; i < len; ++i) { + uint tl = buf1[i * 2 + 0]; + uint tr = buf1[i * 2 + 1]; + uint bl = buf2[i * 2 + 0]; + uint br = buf2[i * 2 + 1]; + int distx = (fracX & 0x0000ffff) >> 12; + b[i] = interpolate_4_pixels_16(tl, tr, bl, br, distx, disty); + fracX += fdx; + } + } + length -= len; + b += len; + } + } + } else { //rotation + FetchPixelFunc fetch = qFetchPixel[layout->bpp]; + uint buf1[buffer_size]; + uint buf2[buffer_size]; + uint *b = buffer; + + while (length) { + int len = qMin(length, buffer_size / 2); + int fracX = fx; + int fracY = fy; + for (int i = 0; i < len; ++i) { + int x1 = (fx >> 16); + int x2; + int y1 = (fy >> 16); + int y2; + fetchTransformedBilinear_pixelBounds(image_width, image_x1, image_x2, x1, x2); + fetchTransformedBilinear_pixelBounds(image_height, image_y1, image_y2, y1, y2); + + const uchar *s1 = data->texture.scanLine(y1); + const uchar *s2 = data->texture.scanLine(y2); + + buf1[i * 2 + 0] = fetch(s1, x1); + buf1[i * 2 + 1] = fetch(s1, x2); + buf2[i * 2 + 0] = fetch(s2, x1); + buf2[i * 2 + 1] = fetch(s2, x2); + + fx += fdx; + fy += fdy; + } + layout->convertToARGB32PM(buf1, buf1, len * 2, layout, clut); + layout->convertToARGB32PM(buf2, buf2, len * 2, layout, clut); + + if (fabs(data->m11) > 8 || fabs(data->m22) > 8) { + //if we are zooming more than 8 times, we use 8bit precision for the position. + for (int i = 0; i < len; ++i) { + uint tl = buf1[i * 2 + 0]; + uint tr = buf1[i * 2 + 1]; + uint bl = buf2[i * 2 + 0]; + uint br = buf2[i * 2 + 1]; + + int distx = (fracX & 0x0000ffff) >> 8; + int disty = (fracY & 0x0000ffff) >> 8; + int idistx = 256 - distx; + int idisty = 256 - disty; + + uint xtop = INTERPOLATE_PIXEL_256(tl, idistx, tr, distx); + uint xbot = INTERPOLATE_PIXEL_256(bl, idistx, br, distx); + b[i] = INTERPOLATE_PIXEL_256(xtop, idisty, xbot, disty); + fracX += fdx; + fracY += fdy; + } + } else { + //we are zooming less than 8x, use 4bit precision + for (int i = 0; i < len; ++i) { + uint tl = buf1[i * 2 + 0]; + uint tr = buf1[i * 2 + 1]; + uint bl = buf2[i * 2 + 0]; + uint br = buf2[i * 2 + 1]; + + int distx = (fracX & 0x0000ffff) >> 12; + int disty = (fracY & 0x0000ffff) >> 12; + + b[i] = interpolate_4_pixels_16(tl, tr, bl, br, distx, disty); + fracX += fdx; + fracY += fdy; + } + } + + length -= len; + b += len; + } + } + } else { + const qreal fdx = data->m11; + const qreal fdy = data->m12; + const qreal fdw = data->m13; + + qreal fx = data->m21 * cy + data->m11 * cx + data->dx; + qreal fy = data->m22 * cy + data->m12 * cx + data->dy; + qreal fw = data->m23 * cy + data->m13 * cx + data->m33; + + FetchPixelFunc fetch = qFetchPixel[layout->bpp]; + uint buf1[buffer_size]; + uint buf2[buffer_size]; + uint *b = buffer; + + int distxs[buffer_size / 2]; + int distys[buffer_size / 2]; + + while (length) { + int len = qMin(length, buffer_size / 2); + for (int i = 0; i < len; ++i) { + const qreal iw = fw == 0 ? 1 : 1 / fw; + const qreal px = fx * iw - qreal(0.5); + const qreal py = fy * iw - qreal(0.5); + + int x1 = int(px) - (px < 0); + int x2; + int y1 = int(py) - (py < 0); + int y2; + + distxs[i] = int((px - x1) * 256); + distys[i] = int((py - y1) * 256); + + fetchTransformedBilinear_pixelBounds(image_width, image_x1, image_x2, x1, x2); + fetchTransformedBilinear_pixelBounds(image_height, image_y1, image_y2, y1, y2); + + const uchar *s1 = data->texture.scanLine(y1); + const uchar *s2 = data->texture.scanLine(y2); + + buf1[i * 2 + 0] = fetch(s1, x1); + buf1[i * 2 + 1] = fetch(s1, x2); + buf2[i * 2 + 0] = fetch(s2, x1); + buf2[i * 2 + 1] = fetch(s2, x2); + + fx += fdx; + fy += fdy; + fw += fdw; + //force increment to avoid /0 + if (!fw) + fw += fdw; + } + + layout->convertToARGB32PM(buf1, buf1, len * 2, layout, clut); + layout->convertToARGB32PM(buf2, buf2, len * 2, layout, clut); + + for (int i = 0; i < len; ++i) { + int distx = distxs[i]; + int disty = distys[i]; + int idistx = 256 - distx; + int idisty = 256 - disty; + + uint tl = buf1[i * 2 + 0]; + uint tr = buf1[i * 2 + 1]; + uint bl = buf2[i * 2 + 0]; + uint br = buf2[i * 2 + 1]; + + uint xtop = INTERPOLATE_PIXEL_256(tl, idistx, tr, distx); + uint xbot = INTERPOLATE_PIXEL_256(bl, idistx, br, distx); + b[i] = INTERPOLATE_PIXEL_256(xtop, idisty, xbot, disty); + } + length -= len; + b += len; + } + } + + return buffer; +} static const SourceFetchProc sourceFetch[NBlendTypes][QImage::NImageFormats] = { // Untransformed { 0, // Invalid - SPANFUNC_POINTER_FETCHHUNTRANSFORMED(Format_Mono), // Mono - SPANFUNC_POINTER_FETCHHUNTRANSFORMED(Format_MonoLSB), // MonoLsb - SPANFUNC_POINTER_FETCHHUNTRANSFORMED(Format_Indexed8), // Indexed8 - SPANFUNC_POINTER_FETCHHUNTRANSFORMED(Format_ARGB32_Premultiplied), // RGB32 - SPANFUNC_POINTER_FETCHHUNTRANSFORMED(Format_ARGB32), // ARGB32 - SPANFUNC_POINTER_FETCHHUNTRANSFORMED(Format_ARGB32_Premultiplied), // ARGB32_Premultiplied - SPANFUNC_POINTER_FETCHHUNTRANSFORMED(Format_RGB16), // RGB16 - SPANFUNC_POINTER_FETCHHUNTRANSFORMED(Format_ARGB8565_Premultiplied),// ARGB8565_Premultiplied - SPANFUNC_POINTER_FETCHHUNTRANSFORMED(Format_RGB666), // RGB666 - SPANFUNC_POINTER_FETCHHUNTRANSFORMED(Format_ARGB6666_Premultiplied),// ARGB6666_Premultiplied - SPANFUNC_POINTER_FETCHHUNTRANSFORMED(Format_RGB555), // RGB555 - SPANFUNC_POINTER_FETCHHUNTRANSFORMED(Format_ARGB8555_Premultiplied),// ARGB8555_Premultiplied - SPANFUNC_POINTER_FETCHHUNTRANSFORMED(Format_RGB888), // RGB888 - SPANFUNC_POINTER_FETCHHUNTRANSFORMED(Format_RGB444), // RGB444 - SPANFUNC_POINTER_FETCHHUNTRANSFORMED(Format_ARGB4444_Premultiplied) // ARGB4444_Premultiplied + fetchUntransformed, // Mono + fetchUntransformed, // MonoLsb + fetchUntransformed, // Indexed8 + fetchUntransformedARGB32PM, // RGB32 + fetchUntransformed, // ARGB32 + fetchUntransformedARGB32PM, // ARGB32_Premultiplied + fetchUntransformedRGB16, // RGB16 + fetchUntransformed, // ARGB8565_Premultiplied + fetchUntransformed, // RGB666 + fetchUntransformed, // ARGB6666_Premultiplied + fetchUntransformed, // RGB555 + fetchUntransformed, // ARGB8555_Premultiplied + fetchUntransformed, // RGB888 + fetchUntransformed, // RGB444 + fetchUntransformed // ARGB4444_Premultiplied }, // Tiled { 0, // Invalid - SPANFUNC_POINTER_FETCHHUNTRANSFORMED(Format_Mono), // Mono - SPANFUNC_POINTER_FETCHHUNTRANSFORMED(Format_MonoLSB), // MonoLsb - SPANFUNC_POINTER_FETCHHUNTRANSFORMED(Format_Indexed8), // Indexed8 - SPANFUNC_POINTER_FETCHHUNTRANSFORMED(Format_ARGB32_Premultiplied), // RGB32 - SPANFUNC_POINTER_FETCHHUNTRANSFORMED(Format_ARGB32), // ARGB32 - SPANFUNC_POINTER_FETCHHUNTRANSFORMED(Format_ARGB32_Premultiplied), // ARGB32_Premultiplied - SPANFUNC_POINTER_FETCHHUNTRANSFORMED(Format_RGB16), // RGB16 - SPANFUNC_POINTER_FETCHHUNTRANSFORMED(Format_ARGB8565_Premultiplied),// ARGB8565_Premultiplied - SPANFUNC_POINTER_FETCHHUNTRANSFORMED(Format_RGB666), // RGB666 - SPANFUNC_POINTER_FETCHHUNTRANSFORMED(Format_ARGB6666_Premultiplied),// ARGB6666_Premultiplied - SPANFUNC_POINTER_FETCHHUNTRANSFORMED(Format_RGB555), // RGB555 - SPANFUNC_POINTER_FETCHHUNTRANSFORMED(Format_ARGB8555_Premultiplied),// ARGB8555_Premultiplied - SPANFUNC_POINTER_FETCHHUNTRANSFORMED(Format_RGB888), // RGB888 - SPANFUNC_POINTER_FETCHHUNTRANSFORMED(Format_RGB444), // RGB444 - SPANFUNC_POINTER_FETCHHUNTRANSFORMED(Format_ARGB4444_Premultiplied) // ARGB4444_Premultiplied + fetchUntransformed, // Mono + fetchUntransformed, // MonoLsb + fetchUntransformed, // Indexed8 + fetchUntransformedARGB32PM, // RGB32 + fetchUntransformed, // ARGB32 + fetchUntransformedARGB32PM, // ARGB32_Premultiplied + fetchUntransformedRGB16, // RGB16 + fetchUntransformed, // ARGB8565_Premultiplied + fetchUntransformed, // RGB666 + fetchUntransformed, // ARGB6666_Premultiplied + fetchUntransformed, // RGB555 + fetchUntransformed, // ARGB8555_Premultiplied + fetchUntransformed, // RGB888 + fetchUntransformed, // RGB444 + fetchUntransformed // ARGB4444_Premultiplied }, // Transformed { 0, // Invalid - fetchTransformed, // Mono - fetchTransformed, // MonoLsb - fetchTransformed, // Indexed8 - fetchTransformed, // RGB32 - fetchTransformed, // ARGB32 - fetchTransformed, // ARGB32_Premultiplied - fetchTransformed, // RGB16 - fetchTransformed, // ARGB8565_Premultiplied - fetchTransformed, // RGB666 - fetchTransformed, // ARGB6666_Premultiplied - fetchTransformed, // RGB555 - fetchTransformed, // ARGB8555_Premultiplied - fetchTransformed, // RGB888 - fetchTransformed, // RGB444 - fetchTransformed, // ARGB4444_Premultiplied + fetchTransformed, // Mono + fetchTransformed, // MonoLsb + fetchTransformed, // Indexed8 + fetchTransformedARGB32PM, // RGB32 + fetchTransformed, // ARGB32 + fetchTransformedARGB32PM, // ARGB32_Premultiplied + fetchTransformed, // RGB16 + fetchTransformed, // ARGB8565_Premultiplied + fetchTransformed, // RGB666 + fetchTransformed, // ARGB6666_Premultiplied + fetchTransformed, // RGB555 + fetchTransformed, // ARGB8555_Premultiplied + fetchTransformed, // RGB888 + fetchTransformed, // RGB444 + fetchTransformed, // ARGB4444_Premultiplied }, { 0, // TransformedTiled - fetchTransformed, // Mono - fetchTransformed, // MonoLsb - fetchTransformed, // Indexed8 - fetchTransformed, // RGB32 - fetchTransformed, // ARGB32 - fetchTransformed, // ARGB32_Premultiplied - fetchTransformed, // RGB16 - fetchTransformed, // ARGB8565_Premultiplied - fetchTransformed, // RGB666 - fetchTransformed, // ARGB6666_Premultiplied - fetchTransformed, // RGB555 - fetchTransformed, // ARGB8555_Premultiplied - fetchTransformed, // RGB888 - fetchTransformed, // RGB444 - fetchTransformed, // ARGB4444_Premultiplied + fetchTransformed, // Mono + fetchTransformed, // MonoLsb + fetchTransformed, // Indexed8 + fetchTransformedARGB32PM, // RGB32 + fetchTransformed, // ARGB32 + fetchTransformedARGB32PM, // ARGB32_Premultiplied + fetchTransformed, // RGB16 + fetchTransformed, // ARGB8565_Premultiplied + fetchTransformed, // RGB666 + fetchTransformed, // ARGB6666_Premultiplied + fetchTransformed, // RGB555 + fetchTransformed, // ARGB8555_Premultiplied + fetchTransformed, // RGB888 + fetchTransformed, // RGB444 + fetchTransformed, // ARGB4444_Premultiplied }, { 0, // Bilinear - fetchTransformedBilinear, // Mono - fetchTransformedBilinear, // MonoLsb - fetchTransformedBilinear, // Indexed8 - fetchTransformedBilinear, // RGB32 - fetchTransformedBilinear, // ARGB32 - fetchTransformedBilinear, // ARGB32_Premultiplied - fetchTransformedBilinear, // RGB16 - fetchTransformedBilinear, // ARGB8565_Premultiplied - fetchTransformedBilinear, // RGB666 - fetchTransformedBilinear, // ARGB6666_Premultiplied - fetchTransformedBilinear, // RGB555 - fetchTransformedBilinear, // ARGB8555_Premultiplied - fetchTransformedBilinear, // RGB888 - fetchTransformedBilinear, // RGB444 - fetchTransformedBilinear // ARGB4444_Premultiplied + fetchTransformedBilinear, // Mono + fetchTransformedBilinear, // MonoLsb + fetchTransformedBilinear, // Indexed8 + fetchTransformedBilinearARGB32PM, // RGB32 + fetchTransformedBilinear, // ARGB32 + fetchTransformedBilinearARGB32PM, // ARGB32_Premultiplied + fetchTransformedBilinear, // RGB16 + fetchTransformedBilinear, // ARGB8565_Premultiplied + fetchTransformedBilinear, // RGB666 + fetchTransformedBilinear, // ARGB6666_Premultiplied + fetchTransformedBilinear, // RGB555 + fetchTransformedBilinear, // ARGB8555_Premultiplied + fetchTransformedBilinear, // RGB888 + fetchTransformedBilinear, // RGB444 + fetchTransformedBilinear // ARGB4444_Premultiplied }, { 0, // BilinearTiled - fetchTransformedBilinear, // Mono - fetchTransformedBilinear, // MonoLsb - fetchTransformedBilinear, // Indexed8 - fetchTransformedBilinear, // RGB32 - fetchTransformedBilinear, // ARGB32 - fetchTransformedBilinear, // ARGB32_Premultiplied - fetchTransformedBilinear, // RGB16 - fetchTransformedBilinear, // ARGB8565_Premultiplied - fetchTransformedBilinear, // RGB666 - fetchTransformedBilinear, // ARGB6666_Premultiplied - fetchTransformedBilinear, // RGB555 - fetchTransformedBilinear, // ARGB8555_Premultiplied - fetchTransformedBilinear, // RGB888 - fetchTransformedBilinear, // RGB444 - fetchTransformedBilinear // ARGB4444_Premultiplied + fetchTransformedBilinear, // Mono + fetchTransformedBilinear, // MonoLsb + fetchTransformedBilinear, // Indexed8 + fetchTransformedBilinearARGB32PM, // RGB32 + fetchTransformedBilinear, // ARGB32 + fetchTransformedBilinearARGB32PM, // ARGB32_Premultiplied + fetchTransformedBilinear, // RGB16 + fetchTransformedBilinear, // ARGB8565_Premultiplied + fetchTransformedBilinear, // RGB666 + fetchTransformedBilinear, // ARGB6666_Premultiplied + fetchTransformedBilinear, // RGB555 + fetchTransformedBilinear, // ARGB8555_Premultiplied + fetchTransformedBilinear, // RGB888 + fetchTransformedBilinear, // RGB444 + fetchTransformedBilinear // ARGB4444_Premultiplied }, }; @@ -3247,6 +3683,8 @@ static inline Operator getOperator(const QSpanData *data, const QSpan *spans, in // don't clear dest_fetch as it sets up the pointer correctly to save one copy break; default: { + if (data->type == QSpanData::Texture && data->texture.const_alpha != 256) + break; const QSpan *lastSpan = spans + spanCount; bool alphaSpans = false; while (spans < lastSpan) { @@ -3274,26 +3712,6 @@ static inline Operator getOperator(const QSpanData *data, const QSpan *spans, in // -------------------- blend methods --------------------- -enum SpanMethod { - RegularSpans, - CallbackSpans -}; - -#if !defined(Q_CC_SUN) -static -#endif -void drawBufferSpan(QSpanData *data, const uint *buffer, int bufsize, - int x, int y, int length, uint const_alpha) -{ - Q_UNUSED(data); - Q_UNUSED(buffer); - Q_UNUSED(bufsize); - Q_UNUSED(x); - Q_UNUSED(y); - Q_UNUSED(length); - Q_UNUSED(const_alpha); -} - #if !defined(Q_CC_SUN) static #endif @@ -3349,55 +3767,6 @@ static void blend_color_argb(int count, const QSpan *spans, void *userData) } } -template -Q_STATIC_TEMPLATE_FUNCTION void blendColor(int count, const QSpan *spans, void *userData) -{ - QSpanData *data = reinterpret_cast(userData); - Operator op = getOperator(data, spans, count); - - if (op.mode == QPainter::CompositionMode_Source) { - const T c = qt_colorConvert(quint32p::fromRawData(data->solid.color), 0); - while (count--) { - T *target = ((T*)data->rasterBuffer->scanLine(spans->y)) - + spans->x; - if (spans->coverage == 255) { - qt_memfill(target, c, spans->len); - } else { - const quint8 alpha = T::alpha(spans->coverage); - const T color = c.byte_mul(alpha); - const int ialpha = T::ialpha(spans->coverage); - const T *end = target + spans->len; - while (target < end) { - *target = color + target->byte_mul(ialpha); - ++target; - } - } - ++spans; - } - return; - } - - if (op.mode == QPainter::CompositionMode_SourceOver) { - while (count--) { - const quint32 color = BYTE_MUL(data->solid.color, spans->coverage); - const T c = qt_colorConvert(quint32p::fromRawData(color), 0); - const quint8 ialpha = T::alpha(qAlpha(~color)); - T *target = ((T*)data->rasterBuffer->scanLine(spans->y)) + spans->x; - const T *end = target + spans->len; - while (target != end) { - *target = c + target->byte_mul(ialpha); - ++target; - } - ++spans; - } - return; - } - - blend_color_generic(count, spans, userData); -} - -#define SPANFUNC_POINTER_BLENDCOLOR(DST) blendColor - static void blend_color_rgb16(int count, const QSpan *spans, void *userData) { QSpanData *data = reinterpret_cast(userData); @@ -3542,7 +3911,6 @@ struct QBlendBase uint src_buffer[buffer_size]; }; -template class BlendSrcGeneric : public QBlendBase { public: @@ -3553,38 +3921,30 @@ public: const uint *fetch(int x, int y, int len) { - if (spanMethod == RegularSpans) - dest = op.dest_fetch ? op.dest_fetch(buffer, data->rasterBuffer, x, y, len) : buffer; - + dest = op.dest_fetch ? op.dest_fetch(buffer, data->rasterBuffer, x, y, len) : buffer; return op.src_fetch(src_buffer, &op, data, y, x, len); } - void process(int x, int y, int len, int coverage, const uint *src, int offset) + void process(int, int, int len, int coverage, const uint *src, int offset) { - if (spanMethod == RegularSpans) - op.func(dest + offset, src + offset, len, coverage); - else - drawBufferSpan(data, src + offset, len, x, y, len, coverage); + op.func(dest + offset, src + offset, len, coverage); } void store(int x, int y, int len) { - if (spanMethod == RegularSpans && op.dest_store) { + if (op.dest_store) op.dest_store(data->rasterBuffer, x, y, dest, len); - } } }; -template -Q_STATIC_TEMPLATE_FUNCTION void blend_src_generic(int count, const QSpan *spans, void *userData) +static void blend_src_generic(int count, const QSpan *spans, void *userData) { QSpanData *data = reinterpret_cast(userData); - BlendSrcGeneric blend(data, getOperator(data, spans, count)); + BlendSrcGeneric blend(data, getOperator(data, spans, count)); handleSpans(count, spans, data, blend); } -template -Q_STATIC_TEMPLATE_FUNCTION void blend_untransformed_generic(int count, const QSpan *spans, void *userData) +static void blend_untransformed_generic(int count, const QSpan *spans, void *userData) { QSpanData *data = reinterpret_cast(userData); @@ -3615,15 +3975,10 @@ Q_STATIC_TEMPLATE_FUNCTION void blend_untransformed_generic(int count, const QSp while (length) { int l = qMin(buffer_size, length); const uint *src = op.src_fetch(src_buffer, &op, data, sy, sx, l); - if (spanMethod == RegularSpans) { - uint *dest = op.dest_fetch ? op.dest_fetch(buffer, data->rasterBuffer, x, spans->y, l) : buffer; - op.func(dest, src, l, coverage); - if (op.dest_store) - op.dest_store(data->rasterBuffer, x, spans->y, dest, l); - } else { - drawBufferSpan(data, src, l, x, spans->y, - l, coverage); - } + uint *dest = op.dest_fetch ? op.dest_fetch(buffer, data->rasterBuffer, x, spans->y, l) : buffer; + op.func(dest, src, l, coverage); + if (op.dest_store) + op.dest_store(data->rasterBuffer, x, spans->y, dest, l); x += l; sx += l; length -= l; @@ -3634,13 +3989,12 @@ Q_STATIC_TEMPLATE_FUNCTION void blend_untransformed_generic(int count, const QSp } } -template -Q_STATIC_TEMPLATE_FUNCTION void blend_untransformed_argb(int count, const QSpan *spans, void *userData) +static void blend_untransformed_argb(int count, const QSpan *spans, void *userData) { QSpanData *data = reinterpret_cast(userData); if (data->texture.format != QImage::Format_ARGB32_Premultiplied && data->texture.format != QImage::Format_RGB32) { - blend_untransformed_generic(count, spans, userData); + blend_untransformed_generic(count, spans, userData); return; } @@ -3667,13 +4021,8 @@ Q_STATIC_TEMPLATE_FUNCTION void blend_untransformed_argb(int count, const QSpan if (length > 0) { const int coverage = (spans->coverage * data->texture.const_alpha) >> 8; const uint *src = (uint *)data->texture.scanLine(sy) + sx; - if (spanMethod == RegularSpans) { - uint *dest = ((uint *)data->rasterBuffer->scanLine(spans->y)) + x; - op.func(dest, src, length, coverage); - } else { - drawBufferSpan(data, src, length, x, - spans->y, length, coverage); - } + uint *dest = ((uint *)data->rasterBuffer->scanLine(spans->y)) + x; + op.func(dest, src, length, coverage); } } ++spans; @@ -3731,1167 +4080,19 @@ static inline void blend_sourceOver_rgb16_rgb16(quint16 *dest, } } -template -Q_STATIC_TEMPLATE_SPECIALIZATION -inline void madd_2(DST *dest, const quint16 alpha, const SRC *src) -{ - Q_ASSERT((quintptr(dest) & 0x3) == 0); - Q_ASSERT((quintptr(src) & 0x3) == 0); - dest[0] = dest[0].byte_mul(alpha >> 8) + DST(src[0]); - dest[1] = dest[1].byte_mul(alpha & 0xff) + DST(src[1]); -} - -template -Q_STATIC_TEMPLATE_SPECIALIZATION -inline void madd_4(DST *dest, const quint32 alpha, const SRC *src) -{ - Q_ASSERT((quintptr(dest) & 0x3) == 0); - Q_ASSERT((quintptr(src) & 0x3) == 0); - dest[0] = dest[0].byte_mul(alpha >> 24) + DST(src[0]); - dest[1] = dest[1].byte_mul((alpha >> 16) & 0xff) + DST(src[1]); - dest[2] = dest[2].byte_mul((alpha >> 8) & 0xff) + DST(src[2]); - dest[3] = dest[3].byte_mul(alpha & 0xff) + DST(src[3]); -} - -#if Q_BYTE_ORDER == Q_LITTLE_ENDIAN -template <> -Q_STATIC_TEMPLATE_SPECIALIZATION -inline void madd_4(qargb8565 *dest, const quint32 a, const qargb8565 *src) -{ - Q_ASSERT((quintptr(dest) & 0x3) == 0); - Q_ASSERT((quintptr(src) & 0x3) == 0); - - const quint32 *src32 = reinterpret_cast(src); - quint32 *dest32 = reinterpret_cast(dest); - quint32 x, y, t; - quint8 a8; - - { - x = dest32[0]; - y = src32[0]; - - a8 = a >> 24; - - // a0,g0 - t = ((((x & 0x0007e0ff) * a8) >> 5) & 0x0007e0ff) + (y & 0x0007c0f8); - - // r0,b0 - t |= ((((x & 0x00f81f00) * a8) >> 5) & 0x00f81f00) + (y & 0x00f81f00); - - a8 = (a >> 16) & 0xff; - - // a1 - t |= ((((x & 0xff000000) >> 5) * a8) & 0xff000000) + (y & 0xf8000000); - - dest32[0] = t; - } - { - x = dest32[1]; - y = src32[1]; - - // r1,b1 - t = ((((x & 0x0000f81f) * a8) >> 5) & 0x0000f81f) + (y & 0x0000f81f); - - // g1 - t |= ((((x & 0x000007e0) * a8) >> 5) & 0x000007e0) + (y & 0x000007c0); - - a8 = (a >> 8) & 0xff; - - // a2 - t |= ((((x & 0x00ff0000) * a8) >> 5) & 0x00ff0000) + (y & 0x00f80000); - - { - // rgb2 - quint16 x16 = (x >> 24) | ((dest32[2] & 0x000000ff) << 8); - quint16 y16 = (y >> 24) | ((src32[2] & 0x000000ff) << 8); - quint16 t16; - - t16 = ((((x16 & 0xf81f) * a8) >> 5) & 0xf81f) + (y16 & 0xf81f); - t16 |= ((((x16 & 0x07e0) * a8) >> 5) & 0x07e0) + (y16 & 0x07c0); - - // rg2 - t |= ((t16 & 0x00ff) << 24); - - dest32[1] = t; - - x = dest32[2]; - y = src32[2]; - - // gb2 - t = (t16 >> 8); - } - } - { - a8 = a & 0xff; - - // g3,a3 - t |= ((((x & 0x07e0ff00) * a8) >> 5) & 0x07e0ff00) + (y & 0x07c0f800); - - // r3,b3 - t |= ((((x & 0xf81f0000) >> 5) * a8) & 0xf81f0000)+ (y & 0xf81f0000); - - dest32[2] = t; - } -} -#endif - -#if Q_BYTE_ORDER == Q_LITTLE_ENDIAN -template <> -Q_STATIC_TEMPLATE_SPECIALIZATION -inline void madd_4(qargb8555 *dest, const quint32 a, const qargb8555 *src) -{ - Q_ASSERT((quintptr(dest) & 0x3) == 0); - Q_ASSERT((quintptr(src) & 0x3) == 0); - - const quint32 *src32 = reinterpret_cast(src); - quint32 *dest32 = reinterpret_cast(dest); - quint32 x, y, t; - quint8 a8; - - { - x = dest32[0]; - y = src32[0]; - - a8 = a >> 24; - - // a0,g0 - t = ((((x & 0x0003e0ff) * a8) >> 5) & 0x0003e0ff) + (y & 0x0003e0f8); - - // r0,b0 - t |= ((((x & 0x007c1f00) * a8) >> 5) & 0x007c1f00) + (y & 0x007c1f00); - - a8 = (a >> 16) & 0xff; - - // a1 - t |= ((((x & 0xff000000) >> 5) * a8) & 0xff000000) + (y & 0xf8000000); - - dest32[0] = t; - } - { - x = dest32[1]; - y = src32[1]; - - // r1,b1 - t = ((((x & 0x00007c1f) * a8) >> 5) & 0x00007c1f) + (y & 0x00007c1f); - - // g1 - t |= ((((x & 0x000003e0) * a8) >> 5) & 0x000003e0) + (y & 0x000003e0); - - a8 = (a >> 8) & 0xff; - - // a2 - t |= ((((x & 0x00ff0000) * a8) >> 5) & 0x00ff0000) + (y & 0x00f80000); - - { - // rgb2 - quint16 x16 = (x >> 24) | ((dest32[2] & 0x000000ff) << 8); - quint16 y16 = (y >> 24) | ((src32[2] & 0x000000ff) << 8); - quint16 t16; - - t16 = ((((x16 & 0x7c1f) * a8) >> 5) & 0x7c1f) + (y16 & 0x7c1f); - t16 |= ((((x16 & 0x03e0) * a8) >> 5) & 0x03e0) + (y16 & 0x03e0); - - // rg2 - t |= ((t16 & 0x00ff) << 24); - - dest32[1] = t; - - x = dest32[2]; - y = src32[2]; - - // gb2 - t = (t16 >> 8); - } - } - { - a8 = a & 0xff; - - // g3,a3 - t |= ((((x & 0x03e0ff00) * a8) >> 5) & 0x03e0ff00) + (y & 0x03e0f800); - - // r3,b3 - t |= ((((x & 0x7c1f0000) >> 5) * a8) & 0x7c1f0000)+ (y & 0x7c1f0000); - - dest32[2] = t; - } -} -#endif - -template -Q_STATIC_TEMPLATE_SPECIALIZATION -inline quint16 alpha_2(const T *src) -{ - Q_ASSERT((quintptr(src) & 0x3) == 0); - - if (T::hasAlpha()) - return (src[0].alpha() << 8) | src[1].alpha(); - else - return 0xffff; -} - -template -Q_STATIC_TEMPLATE_SPECIALIZATION -inline quint32 alpha_4(const T *src) -{ - Q_ASSERT((quintptr(src) & 0x3) == 0); - - if (T::hasAlpha()) { - return (src[0].alpha() << 24) | (src[1].alpha() << 16) - | (src[2].alpha() << 8) | src[3].alpha(); - } else { - return 0xffffffff; - } -} - -template <> -Q_STATIC_TEMPLATE_SPECIALIZATION -inline quint32 alpha_4(const qargb8565 *src) -{ - const quint8 *src8 = reinterpret_cast(src); - return src8[0] << 24 | src8[3] << 16 | src8[6] << 8 | src8[9]; -} - -template <> -Q_STATIC_TEMPLATE_SPECIALIZATION -inline quint32 alpha_4(const qargb6666 *src) -{ - const quint8 *src8 = reinterpret_cast(src); - return ((src8[2] & 0xfc) | (src8[2] >> 6)) << 24 - | ((src8[5] & 0xfc) | (src8[5] >> 6)) << 16 - | ((src8[8] & 0xfc) | (src8[8] >> 6)) << 8 - | ((src8[11] & 0xfc) | (src8[11] >> 6)); -} - -template <> -Q_STATIC_TEMPLATE_SPECIALIZATION -inline quint32 alpha_4(const qargb8555 *src) -{ - Q_ASSERT((quintptr(src) & 0x3) == 0); - const quint8 *src8 = reinterpret_cast(src); - return src8[0] << 24 | src8[3] << 16 | src8[6] << 8 | src8[9]; -} - -template <> -Q_STATIC_TEMPLATE_SPECIALIZATION -inline quint16 alpha_2(const qargb4444 *src) -{ - const quint32 *src32 = reinterpret_cast(src); - const quint32 t = (*src32 & 0xf000f000) | - ((*src32 & 0xf000f000) >> 4); - return (t >> 24) | (t & 0xff00); -} - -template -Q_STATIC_TEMPLATE_SPECIALIZATION -inline quint16 eff_alpha_2(quint16 alpha, const T*) -{ - return (T::alpha((alpha >> 8) & 0xff) << 8) - | T::alpha(alpha & 0xff); -} - -template <> -Q_STATIC_TEMPLATE_SPECIALIZATION -inline quint16 eff_alpha_2(quint16 a, const qrgb565*) -{ - return ((((a & 0xff00) + 0x0100) >> 3) & 0xff00) - | ((((a & 0x00ff) + 0x0001) >> 3) & 0x00ff); -} - -template <> -Q_STATIC_TEMPLATE_SPECIALIZATION -inline quint16 eff_alpha_2(quint16 a, const qrgb444*) -{ - return (((a & 0x00ff) + 0x0001) >> 4) - | ((((a & 0xff00) + 0x0100) >> 4) & 0xff00); -} - -template <> -Q_STATIC_TEMPLATE_SPECIALIZATION -inline quint16 eff_alpha_2(quint16 a, const qargb4444*) -{ - return (((a & 0x00ff) + 0x0001) >> 4) - | ((((a & 0xff00) + 0x0100) >> 4) & 0xff00); -} - -template -Q_STATIC_TEMPLATE_SPECIALIZATION -inline quint16 eff_ialpha_2(quint16 alpha, const T*) -{ - return (T::ialpha((alpha >> 8) & 0xff) << 8) - | T::ialpha(alpha & 0xff); -} - -template <> -Q_STATIC_TEMPLATE_SPECIALIZATION -inline quint16 eff_ialpha_2(quint16 a, const qrgb565 *dummy) -{ - return 0x2020 - eff_alpha_2(a, dummy); -} - -template <> -Q_STATIC_TEMPLATE_SPECIALIZATION -inline quint16 eff_ialpha_2(quint16 a, const qargb4444 *dummy) -{ - return 0x1010 - eff_alpha_2(a, dummy); -} - -template <> -Q_STATIC_TEMPLATE_SPECIALIZATION -inline quint16 eff_ialpha_2(quint16 a, const qrgb444 *dummy) -{ - return 0x1010 - eff_alpha_2(a, dummy); -} - -template -Q_STATIC_TEMPLATE_SPECIALIZATION -inline quint32 eff_alpha_4(quint32 alpha, const T*) -{ - return (T::alpha(alpha >> 24) << 24) - | (T::alpha((alpha >> 16) & 0xff) << 16) - | (T::alpha((alpha >> 8) & 0xff) << 8) - | T::alpha(alpha & 0xff); -} - -template <> -Q_STATIC_TEMPLATE_SPECIALIZATION -inline quint32 eff_alpha_4(quint32 a, const qrgb888*) -{ - return a; -} - -template <> -Q_STATIC_TEMPLATE_SPECIALIZATION -inline quint32 eff_alpha_4(quint32 a, const qargb8565*) -{ - return ((((a & 0xff00ff00) + 0x01000100) >> 3) & 0xff00ff00) - | ((((a & 0x00ff00ff) + 0x00010001) >> 3) & 0x00ff00ff); -} - -template <> -Q_STATIC_TEMPLATE_SPECIALIZATION -inline quint32 eff_alpha_4(quint32 a, const qargb6666*) -{ - return ((((a & 0xff00ff00) >> 2) + 0x00400040) & 0xff00ff00) - | ((((a & 0x00ff00ff) + 0x00010001) >> 2) & 0x00ff00ff); -} - -template <> -Q_STATIC_TEMPLATE_SPECIALIZATION -inline quint32 eff_alpha_4(quint32 a, const qrgb666*) -{ - return ((((a & 0xff00ff00) >> 2) + 0x00400040) & 0xff00ff00) - | ((((a & 0x00ff00ff) + 0x00010001) >> 2) & 0x00ff00ff); -} - -template <> -Q_STATIC_TEMPLATE_SPECIALIZATION -inline quint32 eff_alpha_4(quint32 a, const qargb8555*) -{ - return ((((a & 0xff00ff00) + 0x01000100) >> 3) & 0xff00ff00) - | ((((a & 0x00ff00ff) + 0x00010001) >> 3) & 0x00ff00ff); -} - -template -Q_STATIC_TEMPLATE_SPECIALIZATION -inline quint32 eff_ialpha_4(quint32 alpha, const T*) -{ - return (T::ialpha(alpha >> 24) << 24) - | (T::ialpha((alpha >> 16) & 0xff) << 16) - | (T::ialpha((alpha >> 8) & 0xff) << 8) - | T::ialpha(alpha & 0xff); -} - -template <> -Q_STATIC_TEMPLATE_SPECIALIZATION -inline quint32 eff_ialpha_4(quint32 a, const qrgb888*) -{ - return ~a; -} - -template <> -Q_STATIC_TEMPLATE_SPECIALIZATION -inline quint32 eff_ialpha_4(quint32 a, const qargb8565 *dummy) -{ - return 0x20202020 - eff_alpha_4(a, dummy); -} - -template <> -Q_STATIC_TEMPLATE_SPECIALIZATION -inline quint32 eff_ialpha_4(quint32 a, const qargb6666 *dummy) -{ - return 0x40404040 - eff_alpha_4(a, dummy); -} - -template <> -Q_STATIC_TEMPLATE_SPECIALIZATION -inline quint32 eff_ialpha_4(quint32 a, const qrgb666 *dummy) -{ - return 0x40404040 - eff_alpha_4(a, dummy); -} - -template <> -Q_STATIC_TEMPLATE_SPECIALIZATION -inline quint32 eff_ialpha_4(quint32 a, const qargb8555 *dummy) -{ - return 0x20202020 - eff_alpha_4(a, dummy); -} - -template -inline void interpolate_pixel_unaligned_2(DST *dest, const SRC *src, - quint16 alpha) -{ - const quint16 a = eff_alpha_2(alpha, dest); - const quint16 ia = eff_ialpha_2(alpha, dest); - dest[0] = DST(src[0]).byte_mul(a >> 8) + dest[0].byte_mul(ia >> 8); - dest[1] = DST(src[1]).byte_mul(a & 0xff) + dest[1].byte_mul(ia & 0xff); -} - -template -inline void interpolate_pixel_2(DST *dest, const SRC *src, quint16 alpha) -{ - Q_ASSERT((quintptr(dest) & 0x3) == 0); - Q_ASSERT((quintptr(src) & 0x3) == 0); - - const quint16 a = eff_alpha_2(alpha, dest); - const quint16 ia = eff_ialpha_2(alpha, dest); - - dest[0] = DST(src[0]).byte_mul(a >> 8) + dest[0].byte_mul(ia >> 8); - dest[1] = DST(src[1]).byte_mul(a & 0xff) + dest[1].byte_mul(ia & 0xff); -} - -template -inline void interpolate_pixel(DST &dest, quint8 a, const SRC &src, quint8 b) -{ - if (SRC::hasAlpha() && !DST::hasAlpha()) - interpolate_pixel(dest, a, DST(src), b); - else - dest = dest.byte_mul(a) + DST(src).byte_mul(b); -} - -template <> -inline void interpolate_pixel(qargb8565 &dest, quint8 a, - const qargb8565 &src, quint8 b) -{ - quint8 *d = reinterpret_cast(&dest); - const quint8 *s = reinterpret_cast(&src); - d[0] = (d[0] * a + s[0] * b) >> 5; - - const quint16 x = (d[2] << 8) | d[1]; - const quint16 y = (s[2] << 8) | s[1]; - quint16 t = (((x & 0x07e0) * a + (y & 0x07e0) * b) >> 5) & 0x07e0; - t |= (((x & 0xf81f) * a + (y & 0xf81f) * b) >> 5) & 0xf81f; - - d[1] = t & 0xff; - d[2] = t >> 8; -} - -template <> -inline void interpolate_pixel(qrgb565 &dest, quint8 a, - const qrgb565 &src, quint8 b) -{ - const quint16 x = dest.rawValue(); - const quint16 y = src.rawValue(); - quint16 t = (((x & 0x07e0) * a + (y & 0x07e0) * b) >> 5) & 0x07e0; - t |= (((x & 0xf81f) * a + (y & 0xf81f) * b) >> 5) & 0xf81f; - dest = t; -} - -template <> -inline void interpolate_pixel(qrgb555 &dest, quint8 a, - const qrgb555 &src, quint8 b) -{ - const quint16 x = dest.rawValue(); - const quint16 y = src.rawValue(); - quint16 t = (((x & 0x03e0) * a + (y & 0x03e0) * b) >> 5) & 0x03e0; - t |= ((((x & 0x7c1f) * a) + ((y & 0x7c1f) * b)) >> 5) & 0x7c1f; - dest = t; -} - -template <> -inline void interpolate_pixel(qrgb444 &dest, quint8 a, - const qrgb444 &src, quint8 b) -{ - const quint16 x = dest.rawValue(); - const quint16 y = src.rawValue(); - quint16 t = ((x & 0x00f0) * a + (y & 0x00f0) * b) & 0x0f00; - t |= ((x & 0x0f0f) * a + (y & 0x0f0f) * b) & 0xf0f0; - quint16 *d = reinterpret_cast(&dest); - *d = (t >> 4); -} - -template -inline void interpolate_pixel_2(DST *dest, quint8 a, - const SRC *src, quint8 b) -{ - Q_ASSERT((quintptr(dest) & 0x3) == 0); - Q_ASSERT((quintptr(src) & 0x3) == 0); - - Q_ASSERT(!SRC::hasAlpha()); - - dest[0] = dest[0].byte_mul(a) + DST(src[0]).byte_mul(b); - dest[1] = dest[1].byte_mul(a) + DST(src[1]).byte_mul(b); -} - -template <> -inline void interpolate_pixel_2(qrgb565 *dest, quint8 a, - const qrgb565 *src, quint8 b) -{ - quint32 *x = reinterpret_cast(dest); - const quint32 *y = reinterpret_cast(src); - quint32 t = (((*x & 0xf81f07e0) >> 5) * a + - ((*y & 0xf81f07e0) >> 5) * b) & 0xf81f07e0; - t |= (((*x & 0x07e0f81f) * a - + (*y & 0x07e0f81f) * b) >> 5) & 0x07e0f81f; - *x = t; -} - -template <> -inline void interpolate_pixel_2(qrgb555 *dest, quint8 a, - const qrgb555 *src, quint8 b) -{ - quint32 *x = reinterpret_cast(dest); - const quint32 *y = reinterpret_cast(src); - quint32 t = (((*x & 0x7c1f03e0) >> 5) * a + - ((*y & 0x7c1f03e0) >> 5) * b) & 0x7c1f03e0; - t |= (((*x & 0x03e07c1f) * a - + (*y & 0x03e07c1f) * b) >> 5) & 0x03e07c1f; - *x = t; -} - -template <> -inline void interpolate_pixel_2(qrgb444 *dest, quint8 a, - const qrgb444 *src, quint8 b) -{ - quint32 *x = reinterpret_cast(dest); - const quint32 *y = reinterpret_cast(src); - quint32 t = ((*x & 0x0f0f0f0f) * a + (*y & 0x0f0f0f0f) * b) & 0xf0f0f0f0; - t |= ((*x & 0x00f000f0) * a + (*y & 0x00f000f0) * b) & 0x0f000f00; - *x = t >> 4; -} - -template -inline void interpolate_pixel_4(DST *dest, const SRC *src, quint32 alpha) -{ - Q_ASSERT((quintptr(dest) & 0x3) == 0); - Q_ASSERT((quintptr(src) & 0x3) == 0); - - const quint32 a = eff_alpha_4(alpha, dest); - const quint32 ia = eff_ialpha_4(alpha, dest); - dest[0] = DST(src[0]).byte_mul(a >> 24) - + dest[0].byte_mul(ia >> 24); - dest[1] = DST(src[1]).byte_mul((a >> 16) & 0xff) - + dest[1].byte_mul((ia >> 16) & 0xff); - dest[2] = DST(src[2]).byte_mul((a >> 8) & 0xff) - + dest[2].byte_mul((ia >> 8) & 0xff); - dest[3] = DST(src[3]).byte_mul(a & 0xff) - + dest[3].byte_mul(ia & 0xff); -} - -#if Q_BYTE_ORDER == Q_LITTLE_ENDIAN -template <> -inline void interpolate_pixel_4(qargb8565 *dest, const qargb8565 *src, - quint32 alpha) -{ - Q_ASSERT((quintptr(dest) & 0x3) == 0); - Q_ASSERT((quintptr(src) & 0x3) == 0); - - const quint32 a = eff_alpha_4(alpha, dest); - const quint32 ia = eff_ialpha_4(alpha, dest); - const quint32 *src32 = reinterpret_cast(src); - quint32 *dest32 = reinterpret_cast(dest); - - quint32 x, y, t; - quint8 a8, ia8; - { - x = src32[0]; - y = dest32[0]; - - a8 = a >> 24; - ia8 = ia >> 24; - - // a0,g0 - t = (((x & 0x0007e0ff) * a8 + (y & 0x0007e0ff) * ia8) >> 5) - & 0x0007e0ff; - - // r0,b0 - t |= (((x & 0x00f81f00) * a8 + (y & 0x00f81f00) * ia8) >> 5) - & 0x00f81f00; - - a8 = (a >> 16) & 0xff; - ia8 = (ia >> 16) & 0xff; - - // a1 - t |= (((x & 0xff000000) >> 5) * a8 + ((y & 0xff000000) >> 5) * ia8) - & 0xff000000; - - dest32[0] = t; - } - { - x = src32[1]; - y = dest32[1]; - - // r1,b1 - t = (((x & 0x0000f81f) * a8 + (y & 0x0000f81f) * ia8) >> 5) - & 0x0000f81f; - - // g1 - t |= (((x & 0x000007e0) * a8 + (y & 0x000007e0) * ia8) >> 5) - & 0x000007e0; - - a8 = (a >> 8) & 0xff; - ia8 = (ia >> 8) & 0xff; - - // a2 - t |= (((x & 0x00ff0000) * a8 + (y & 0x00ff0000) * ia8) >> 5) - & 0x00ff0000; - - { - // rgb2 - quint16 x16 = (x >> 24) | ((src32[2] & 0x000000ff) << 8); - quint16 y16 = (y >> 24) | ((dest32[2] & 0x000000ff) << 8); - quint16 t16; - - t16 = (((x16 & 0xf81f) * a8 + (y16 & 0xf81f) * ia8) >> 5) & 0xf81f; - t16 |= (((x16 & 0x07e0) * a8 + (y16 & 0x07e0) * ia8) >> 5) & 0x07e0; - - // rg2 - t |= ((t16 & 0x00ff) << 24); - - dest32[1] = t; - - x = src32[2]; - y = dest32[2]; - - // gb2 - t = (t16 >> 8); - } - } - { - a8 = a & 0xff; - ia8 = ia & 0xff; - - // g3,a3 - t |= (((x & 0x07e0ff00) * a8 + (y & 0x07e0ff00) * ia8) >> 5) - & 0x07e0ff00; - - // r3,b3 - t |= (((x & 0xf81f0000) >> 5) * a8 + ((y & 0xf81f0000) >> 5) * ia8) - & 0xf81f0000; - - dest32[2] = t; - } -} -#endif - -#if Q_BYTE_ORDER == Q_LITTLE_ENDIAN -template <> -inline void interpolate_pixel_4(qargb8555 *dest, const qargb8555 *src, - quint32 alpha) -{ - Q_ASSERT((quintptr(dest) & 0x3) == 0); - Q_ASSERT((quintptr(src) & 0x3) == 0); - - - const quint32 a = eff_alpha_4(alpha, dest); - const quint32 ia = eff_ialpha_4(alpha, dest); - const quint32 *src32 = reinterpret_cast(src); - quint32 *dest32 = reinterpret_cast(dest); - - quint32 x, y, t; - quint8 a8, ia8; - { - x = src32[0]; - y = dest32[0]; - - a8 = a >> 24; - ia8 = ia >> 24; - - // a0,g0 - t = (((x & 0x0003e0ff) * a8 + (y & 0x0003e0ff) * ia8) >> 5) - & 0x0003e0ff; - - // r0,b0 - t |= (((x & 0x007c1f00) * a8 + (y & 0x007c1f00) * ia8) >> 5) - & 0x007c1f00; - - a8 = (a >> 16) & 0xff; - ia8 = (ia >> 16) & 0xff; - - // a1 - t |= (((x & 0xff000000) >> 5) * a8 + ((y & 0xff000000) >> 5) * ia8) - & 0xff000000; - - dest32[0] = t; - } - { - x = src32[1]; - y = dest32[1]; - - // r1,b1 - t = (((x & 0x00007c1f) * a8 + (y & 0x00007c1f) * ia8) >> 5) - & 0x00007c1f; - - // g1 - t |= (((x & 0x000003e0) * a8 + (y & 0x000003e0) * ia8) >> 5) - & 0x000003e0; - - a8 = (a >> 8) & 0xff; - ia8 = (ia >> 8) & 0xff; - - // a2 - t |= (((x & 0x00ff0000) * a8 + (y & 0x00ff0000) * ia8) >> 5) - & 0x00ff0000; - - { - // rgb2 - quint16 x16 = (x >> 24) | ((src32[2] & 0x000000ff) << 8); - quint16 y16 = (y >> 24) | ((dest32[2] & 0x000000ff) << 8); - quint16 t16; - - t16 = (((x16 & 0x7c1f) * a8 + (y16 & 0x7c1f) * ia8) >> 5) & 0x7c1f; - t16 |= (((x16 & 0x03e0) * a8 + (y16 & 0x03e0) * ia8) >> 5) & 0x03e0; - - // rg2 - t |= ((t16 & 0x00ff) << 24); - - dest32[1] = t; - - x = src32[2]; - y = dest32[2]; - - // gb2 - t = (t16 >> 8); - } - } - { - a8 = a & 0xff; - ia8 = ia & 0xff; - - // g3,a3 - t |= (((x & 0x03e0ff00) * a8 + (y & 0x03e0ff00) * ia8) >> 5) - & 0x03e0ff00; - - // r3,b3 - t |= (((x & 0x7c1f0000) >> 5) * a8 + ((y & 0x7c1f0000) >> 5) * ia8) - & 0x7c1f0000; - - dest32[2] = t; - } -} -#endif - -template <> -inline void interpolate_pixel_4(qrgb888 *dest, const qrgb888 *src, - quint32 alpha) -{ - Q_ASSERT((quintptr(dest) & 0x3) == 0); - Q_ASSERT((quintptr(src) & 0x3) == 0); - - const quint32 a = eff_alpha_4(alpha, dest); - const quint32 ia = eff_ialpha_4(alpha, dest); - const quint32 *src32 = reinterpret_cast(src); - quint32 *dest32 = reinterpret_cast(dest); - - { - quint32 x = src32[0]; - quint32 y = dest32[0]; - - quint32 t; - t = ((x >> 8) & 0xff00ff) * (a >> 24) - + ((y >> 8) & 0xff00ff) * (ia >> 24); - t = (t + ((t >> 8) & 0xff00ff) + 0x800080); - t &= 0xff00ff00; - - x = (x & 0xff0000) * (a >> 24) - + (x & 0x0000ff) * ((a >> 16) & 0xff) - + (y & 0xff0000) * (ia >> 24) - + (y & 0x0000ff) * ((ia >> 16) & 0xff); - x = (x + ((x >> 8) & 0xff00ff) + 0x800080) >> 8; - x &= 0x00ff00ff; - - dest32[0] = x | t; - } - { - quint32 x = src32[1]; - quint32 y = dest32[1]; - - quint32 t; - t = ((x >> 8) & 0xff0000) * ((a >> 16) & 0xff) - + ((x >> 8) & 0x0000ff) * ((a >> 8) & 0xff) - + ((y >> 8) & 0xff0000) * ((ia >> 16) & 0xff) - + ((y >> 8) & 0x0000ff) * ((ia >> 8) & 0xff); - t = (t + ((t >> 8) & 0xff00ff) + 0x800080); - t &= 0xff00ff00; - - x = (x & 0xff0000) * ((a >> 16) & 0xff) - + (x & 0x0000ff) * ((a >> 8) & 0xff) - + (y & 0xff0000) * ((ia >> 16) & 0xff) - + (y & 0x0000ff) * ((ia >> 8) & 0xff); - x = (x + ((x >> 8) & 0xff00ff) + 0x800080) >> 8; - x &= 0x00ff00ff; - - dest32[1] = x | t; - } - { - quint32 x = src32[2]; - quint32 y = dest32[2]; - - quint32 t; - t = ((x >> 8) & 0xff0000) * ((a >> 8) & 0xff) - + ((x >> 8) & 0x0000ff) * (a & 0xff) - + ((y >> 8) & 0xff0000) * ((ia >> 8) & 0xff) - + ((y >> 8) & 0x0000ff) * (ia & 0xff); - t = (t + ((t >> 8) & 0xff00ff) + 0x800080); - t &= 0xff00ff00; - - x = (x & 0xff00ff) * (a & 0xff) - + (y & 0xff00ff) * (ia & 0xff); - x = (x + ((x >> 8) & 0xff00ff) + 0x800080) >> 8; - x &= 0x00ff00ff; - - dest32[2] = x | t; - } -} - -template -inline void interpolate_pixel_4(DST *dest, quint8 a, - const SRC *src, quint8 b) -{ - Q_ASSERT((quintptr(dest) & 0x3) == 0); - Q_ASSERT((quintptr(src) & 0x3) == 0); - - dest[0] = dest[0].byte_mul(a) + DST(src[0]).byte_mul(b); - dest[1] = dest[1].byte_mul(a) + DST(src[1]).byte_mul(b); - dest[2] = dest[2].byte_mul(a) + DST(src[2]).byte_mul(b); - dest[3] = dest[3].byte_mul(a) + DST(src[3]).byte_mul(b); -} - -template -inline void blend_sourceOver_4(DST *dest, const SRC *src) -{ - Q_ASSERT((quintptr(dest) & 0x3) == 0); - Q_ASSERT((quintptr(src) & 0x3) == 0); - - const quint32 a = alpha_4(src); - if (a == 0xffffffff) { - qt_memconvert(dest, src, 4); - } else if (a > 0) { - quint32 buf[3]; // array of quint32 to get correct alignment - qt_memconvert((DST*)(void*)buf, src, 4); - madd_4(dest, eff_ialpha_4(a, dest), (DST*)(void*)buf); - } -} - -template <> -inline void blend_sourceOver_4(qargb8565 *dest, const qargb8565 *src) -{ - Q_ASSERT((quintptr(dest) & 0x3) == 0); - Q_ASSERT((quintptr(src) & 0x3) == 0); - - const quint32 a = alpha_4(src); - if (a == 0xffffffff) { - qt_memconvert(dest, src, 4); - } else if (a > 0) { - madd_4(dest, eff_ialpha_4(a, dest), src); - } -} - -template <> -inline void blend_sourceOver_4(qargb8555 *dest, const qargb8555 *src) -{ - Q_ASSERT((quintptr(dest) & 0x3) == 0); - Q_ASSERT((quintptr(src) & 0x3) == 0); - - const quint32 a = alpha_4(src); - if (a == 0xffffffff) { - qt_memconvert(dest, src, 4); - } else if (a > 0) { - madd_4(dest, eff_ialpha_4(a, dest), src); - } -} - -template <> -inline void blend_sourceOver_4(qargb6666 *dest, const qargb6666 *src) -{ - Q_ASSERT((quintptr(dest) & 0x3) == 0); - Q_ASSERT((quintptr(src) & 0x3) == 0); - - const quint32 a = alpha_4(src); - if (a == 0xffffffff) { - qt_memconvert(dest, src, 4); - } else if (a > 0) { - madd_4(dest, eff_ialpha_4(a, dest), src); - } -} - -template -void QT_FASTCALL blendUntransformed_unaligned(DST *dest, const SRC *src, - quint8 coverage, int length) -{ - Q_ASSERT(coverage > 0); - - if (coverage < 255) { - if (SRC::hasAlpha()) { - for (int i = 0; i < length; ++i) { - if (src[i].alpha()) { - const quint8 alpha = qt_div_255(int(src[i].alpha()) * int(coverage)); - interpolate_pixel(dest[i], DST::ialpha(alpha), - src[i], DST::alpha(alpha)); - } - } - } else { - const quint8 alpha = DST::alpha(coverage); - const quint8 ialpha = DST::ialpha(coverage); - if (alpha) { - for (int i = 0; i < length; ++i) - interpolate_pixel(dest[i], ialpha, src[i], alpha); - } - } - return; - } - - Q_ASSERT(coverage == 0xff); - Q_ASSERT(SRC::hasAlpha()); - - if (SRC::hasAlpha()) { - for (int i = 0; i < length; ++i) { - const quint8 a = src->alpha(); - if (a == 0xff) - *dest = DST(*src); - else if (a > 0) { - if (DST::hasAlpha()) - *dest = DST(*src).truncedAlpha() + dest->byte_mul(DST::ialpha(a)); - else - *dest = DST(SRC(*src).truncedAlpha()) + dest->byte_mul(DST::ialpha(a)); - } - ++src; - ++dest; - } - } -} - -template -void QT_FASTCALL blendUntransformed_dest16(DST *dest, const SRC *src, - quint8 coverage, int length) -{ - Q_ASSERT(sizeof(DST) == 2); - Q_ASSERT(sizeof(SRC) == 2); - Q_ASSERT((quintptr(dest) & 0x3) == (quintptr(src) & 0x3)); - Q_ASSERT(coverage > 0); - - const int align = quintptr(dest) & 0x3; - - if (coverage < 255) { - // align - if (align) { - const quint8 alpha = SRC::hasAlpha() - ? qt_div_255(int(src->alpha()) * int(coverage)) - : coverage; - if (alpha) { - interpolate_pixel(*dest, DST::ialpha(alpha), - *src, DST::alpha(alpha)); - } - ++dest; - ++src; - --length; - } - - if (SRC::hasAlpha()) { - while (length >= 2) { - const quint16 alpha16 = BYTE_MUL(uint(alpha_2(src)), uint(coverage)); - interpolate_pixel_2(dest, src, alpha16); - length -= 2; - src += 2; - dest += 2; - } - } else { - const quint8 alpha = DST::alpha(coverage); - const quint8 ialpha = DST::ialpha(coverage); - - while (length >= 2) { - interpolate_pixel_2(dest, ialpha, src, alpha); - length -= 2; - src += 2; - dest += 2; - } - } - - // tail - if (length) { - const quint8 alpha = SRC::hasAlpha() - ? qt_div_255(int(src->alpha()) * int(coverage)) - : coverage; - if (alpha) { - interpolate_pixel(*dest, DST::ialpha(alpha), - *src, DST::alpha(alpha)); - } - } - - return; - } - - Q_ASSERT(SRC::hasAlpha()); - if (SRC::hasAlpha()) { - if (align) { - const quint8 alpha = src->alpha(); - if (alpha == 0xff) - *dest = DST(*src); - else if (alpha > 0) - *dest = DST(*src).truncedAlpha() + dest->byte_mul(DST::ialpha(alpha)); - ++dest; - ++src; - --length; - } - - while (length >= 2) { - Q_ASSERT((quintptr(dest) & 3) == 0); - Q_ASSERT((quintptr(src) & 3) == 0); - - const quint16 a = alpha_2(src); - if (a == 0xffff) { - qt_memconvert(dest, src, 2); - } else if (a > 0) { - quint32 buf; - if (sizeof(DST) == 2) - qt_memconvert((DST*)(void*)&buf, src, 2); - madd_2(dest, eff_ialpha_2(a, dest), (DST*)(void*)&buf); - } - - length -= 2; - src += 2; - dest += 2; - } - - if (length) { - const quint8 alpha = src->alpha(); - if (alpha == 0xff) - *dest = DST(*src); - else if (alpha > 0) - *dest = DST(*src).truncedAlpha() + dest->byte_mul(DST::ialpha(alpha)); - } - } -} - -template -void QT_FASTCALL blendUntransformed_dest24(DST *dest, const SRC *src, - quint8 coverage, int length) -{ - Q_ASSERT((quintptr(dest) & 0x3) == (quintptr(src) & 0x3)); - Q_ASSERT(sizeof(DST) == 3); - Q_ASSERT(coverage > 0); - - const int align = quintptr(dest) & 0x3; - - if (coverage < 255) { - // align - for (int i = 0; i < align; ++i) { - if (SRC::hasAlpha()) { - const quint8 alpha = qt_div_255(int(src->alpha()) * int(coverage)); - if (alpha) - interpolate_pixel(*dest, DST::ialpha(alpha), - *src, DST::alpha(alpha)); - } else { - interpolate_pixel(*dest, DST::ialpha(coverage), - *src, DST::alpha(coverage)); - } - ++dest; - ++src; - --length; - } - - if (SRC::hasAlpha()) { - while (length >= 4) { - const quint32 alpha = QT_PREPEND_NAMESPACE(BYTE_MUL)(uint(alpha_4(src)), uint(coverage)); - if (alpha) - interpolate_pixel_4(dest, src, alpha); - length -= 4; - src += 4; - dest += 4; - } - } else { - const quint8 alpha = DST::alpha(coverage); - const quint8 ialpha = DST::ialpha(coverage); - while (length >= 4) { - interpolate_pixel_4(dest, ialpha, src, alpha); - length -= 4; - src += 4; - dest += 4; - } - } - - // tail - while (length--) { - if (SRC::hasAlpha()) { - const quint8 alpha = qt_div_255(int(src->alpha()) * int(coverage)); - if (alpha) - interpolate_pixel(*dest, DST::ialpha(alpha), - *src, DST::alpha(alpha)); - } else { - interpolate_pixel(*dest, DST::ialpha(coverage), - *src, DST::alpha(coverage)); - } - ++dest; - ++src; - } - - return; - } - - - Q_ASSERT(coverage == 255); - Q_ASSERT(SRC::hasAlpha()); - - if (SRC::hasAlpha()) { - // align - for (int i = 0; i < align; ++i) { - const quint8 a = src->alpha(); - if (a == 0xff) { - *dest = DST(*src); - } else if (a > 0) { - *dest = DST(*src).truncedAlpha() + dest->byte_mul(DST::ialpha(a)); - } - ++dest; - ++src; - --length; - } - - while (length >= 4) { - blend_sourceOver_4(dest, src); - length -= 4; - src += 4; - dest += 4; - } - - // tail - while (length--) { - const quint8 a = src->alpha(); - if (a == 0xff) { - *dest = DST(*src); - } else if (a > 0) { - *dest = DST(*src).truncedAlpha() + dest->byte_mul(DST::ialpha(a)); - } - ++dest; - ++src; - } - } -} - -template -Q_STATIC_TEMPLATE_SPECIALIZATION -void QT_FASTCALL blendUntransformed(int count, const QSpan *spans, void *userData) +static void blend_untransformed_rgb565(int count, const QSpan *spans, void *userData) { QSpanData *data = reinterpret_cast(userData); QPainter::CompositionMode mode = data->rasterBuffer->compositionMode; - if (mode != QPainter::CompositionMode_SourceOver && - mode != QPainter::CompositionMode_Source) + if (data->texture.format != QImage::Format_RGB16 + || (mode != QPainter::CompositionMode_SourceOver + && mode != QPainter::CompositionMode_Source)) { - blend_src_generic(count, spans, userData); + blend_untransformed_generic(count, spans, userData); return; } - const bool modeSource = !SRC::hasAlpha() || - mode == QPainter::CompositionMode_Source; const int image_width = data->texture.width; const int image_height = data->texture.height; int xoff = -qRound(-data->dx); @@ -4917,20 +4118,15 @@ void QT_FASTCALL blendUntransformed(int count, const QSpan *spans, void *userDat if (sx + length > image_width) length = image_width - sx; if (length > 0) { - DST *dest = ((DST*)data->rasterBuffer->scanLine(spans->y)) + x; - const SRC *src = (SRC*)data->texture.scanLine(sy) + sx; - if (modeSource && coverage == 255) { - qt_memconvert(dest, src, length); - } else if (sizeof(DST) == 3 && sizeof(SRC) == 3 && length >= 3 && - (quintptr(dest) & 3) == (quintptr(src) & 3)) - { - blendUntransformed_dest24(dest, src, coverage, length); - } else if (sizeof(DST) == 2 && sizeof(SRC) == 2 && length >= 3 && - (quintptr(dest) & 3) == (quintptr(src) & 3)) - { - blendUntransformed_dest16(dest, src, coverage, length); + quint16 *dest = (quint16 *)data->rasterBuffer->scanLine(spans->y) + x; + const quint16 *src = (quint16 *)data->texture.scanLine(sy) + sx; + if (coverage == 255) { + memcpy(dest, src, length * sizeof(quint16)); } else { - blendUntransformed_unaligned(dest, src, coverage, length); + const quint8 alpha = (coverage + 1) >> 3; + const quint8 ialpha = 0x20 - alpha; + if (alpha > 0) + blend_sourceOver_rgb16_rgb16(dest, src, length, alpha, ialpha); } } } @@ -4938,69 +4134,7 @@ void QT_FASTCALL blendUntransformed(int count, const QSpan *spans, void *userDat } } -static void blend_untransformed_rgb888(int count, const QSpan *spans, - void *userData) -{ - blend_untransformed_generic(count, spans, userData); -} - -static void blend_untransformed_argb6666(int count, const QSpan *spans, - void *userData) -{ - blend_untransformed_generic(count, spans, userData); -} - -static void blend_untransformed_rgb666(int count, const QSpan *spans, - void *userData) -{ - blend_untransformed_generic(count, spans, userData); -} - -static void blend_untransformed_argb8565(int count, const QSpan *spans, - void *userData) -{ - blend_untransformed_generic(count, spans, userData); -} - -static void blend_untransformed_rgb565(int count, const QSpan *spans, - void *userData) -{ - QSpanData *data = reinterpret_cast(userData); - - if (data->texture.format == QImage::Format_ARGB8565_Premultiplied) - blendUntransformed(count, spans, userData); - else if (data->texture.format == QImage::Format_RGB16) - blendUntransformed(count, spans, userData); - else - blend_untransformed_generic(count, spans, userData); -} - -static void blend_untransformed_argb8555(int count, const QSpan *spans, - void *userData) -{ - blend_untransformed_generic(count, spans, userData); -} - -static void blend_untransformed_rgb555(int count, const QSpan *spans, - void *userData) -{ - blend_untransformed_generic(count, spans, userData); -} - -static void blend_untransformed_argb4444(int count, const QSpan *spans, - void *userData) -{ - blend_untransformed_generic(count, spans, userData); -} - -static void blend_untransformed_rgb444(int count, const QSpan *spans, - void *userData) -{ - blend_untransformed_generic(count, spans, userData); -} - -template -Q_STATIC_TEMPLATE_FUNCTION void blend_tiled_generic(int count, const QSpan *spans, void *userData) +static void blend_tiled_generic(int count, const QSpan *spans, void *userData) { QSpanData *data = reinterpret_cast(userData); @@ -5034,15 +4168,10 @@ Q_STATIC_TEMPLATE_FUNCTION void blend_tiled_generic(int count, const QSpan *span if (buffer_size < l) l = buffer_size; const uint *src = op.src_fetch(src_buffer, &op, data, sy, sx, l); - if (spanMethod == RegularSpans) { - uint *dest = op.dest_fetch ? op.dest_fetch(buffer, data->rasterBuffer, x, spans->y, l) : buffer; - op.func(dest, src, l, coverage); - if (op.dest_store) - op.dest_store(data->rasterBuffer, x, spans->y, dest, l); - } else { - drawBufferSpan(data, src, l, x, spans->y, l, - coverage); - } + uint *dest = op.dest_fetch ? op.dest_fetch(buffer, data->rasterBuffer, x, spans->y, l) : buffer; + op.func(dest, src, l, coverage); + if (op.dest_store) + op.dest_store(data->rasterBuffer, x, spans->y, dest, l); x += l; sx += l; length -= l; @@ -5053,13 +4182,12 @@ Q_STATIC_TEMPLATE_FUNCTION void blend_tiled_generic(int count, const QSpan *span } } -template -Q_STATIC_TEMPLATE_FUNCTION void blend_tiled_argb(int count, const QSpan *spans, void *userData) +static void blend_tiled_argb(int count, const QSpan *spans, void *userData) { QSpanData *data = reinterpret_cast(userData); if (data->texture.format != QImage::Format_ARGB32_Premultiplied && data->texture.format != QImage::Format_RGB32) { - blend_tiled_generic(count, spans, userData); + blend_tiled_generic(count, spans, userData); return; } @@ -5091,13 +4219,8 @@ Q_STATIC_TEMPLATE_FUNCTION void blend_tiled_argb(int count, const QSpan *spans, if (buffer_size < l) l = buffer_size; const uint *src = (uint *)data->texture.scanLine(sy) + sx; - if (spanMethod == RegularSpans) { - uint *dest = ((uint *)data->rasterBuffer->scanLine(spans->y)) + x; - op.func(dest, src, l, coverage); - } else { - drawBufferSpan(data, src, buffer_size, - x, spans->y, l, coverage); - } + uint *dest = ((uint *)data->rasterBuffer->scanLine(spans->y)) + x; + op.func(dest, src, l, coverage); x += l; length -= l; sx = 0; @@ -5106,21 +4229,19 @@ Q_STATIC_TEMPLATE_FUNCTION void blend_tiled_argb(int count, const QSpan *spans, } } -template -Q_STATIC_TEMPLATE_FUNCTION void blendTiled(int count, const QSpan *spans, void *userData) +static void blend_tiled_rgb565(int count, const QSpan *spans, void *userData) { QSpanData *data = reinterpret_cast(userData); QPainter::CompositionMode mode = data->rasterBuffer->compositionMode; - if (mode != QPainter::CompositionMode_SourceOver && - mode != QPainter::CompositionMode_Source) + if (data->texture.format != QImage::Format_RGB16 + || (mode != QPainter::CompositionMode_SourceOver + && mode != QPainter::CompositionMode_Source)) { - blend_src_generic(count, spans, userData); + blend_tiled_generic(count, spans, userData); return; } - const bool modeSource = !SRC::hasAlpha() || - mode == QPainter::CompositionMode_Source; const int image_width = data->texture.width; const int image_height = data->texture.height; int xoff = -qRound(-data->dx) % image_width; @@ -5147,7 +4268,7 @@ Q_STATIC_TEMPLATE_FUNCTION void blendTiled(int count, const QSpan *spans, void * if (sy < 0) sy += image_height; - if (modeSource && coverage == 255) { + if (coverage == 255) { // Copy the first texture block length = qMin(image_width,length); int tx = x; @@ -5155,10 +4276,9 @@ Q_STATIC_TEMPLATE_FUNCTION void blendTiled(int count, const QSpan *spans, void * int l = qMin(image_width - sx, length); if (buffer_size < l) l = buffer_size; - DST *dest = ((DST*)data->rasterBuffer->scanLine(spans->y)) + tx; - const SRC *src = (SRC*)data->texture.scanLine(sy) + sx; - - qt_memconvert(dest, src, l); + quint16 *dest = ((quint16 *)data->rasterBuffer->scanLine(spans->y)) + tx; + const quint16 *src = (quint16 *)data->texture.scanLine(sy) + sx; + memcpy(dest, src, l * sizeof(quint16)); length -= l; tx += l; sx = 0; @@ -5172,110 +4292,51 @@ Q_STATIC_TEMPLATE_FUNCTION void blendTiled(int count, const QSpan *spans, void * // - can use memcpy int copy_image_width = qMin(image_width, int(spans->len)); length = spans->len - copy_image_width; - DST *src = ((DST*)data->rasterBuffer->scanLine(spans->y)) + x; - DST *dest = src + copy_image_width; + quint16 *src = ((quint16 *)data->rasterBuffer->scanLine(spans->y)) + x; + quint16 *dest = src + copy_image_width; while (copy_image_width < length) { - qt_memconvert(dest, src, copy_image_width); + memcpy(dest, src, copy_image_width * sizeof(quint16)); dest += copy_image_width; length -= copy_image_width; copy_image_width *= 2; } if (length > 0) - qt_memconvert(dest, src, length); + memcpy(dest, src, length * sizeof(quint16)); } else { - while (length) { - int l = qMin(image_width - sx, length); - if (buffer_size < l) - l = buffer_size; - DST *dest = ((DST*)data->rasterBuffer->scanLine(spans->y)) + x; - const SRC *src = (SRC*)data->texture.scanLine(sy) + sx; - if (sizeof(DST) == 3 && sizeof(SRC) == 3 && l >= 4 && - (quintptr(dest) & 3) == (quintptr(src) & 3)) - { - blendUntransformed_dest24(dest, src, coverage, l); - } else if (sizeof(DST) == 2 && sizeof(SRC) == 2 && l >= 2 && - (quintptr(dest) & 3) == (quintptr(src) & 3)) - { - blendUntransformed_dest16(dest, src, coverage, l); - } else { - blendUntransformed_unaligned(dest, src, coverage, l); + const quint8 alpha = (coverage + 1) >> 3; + const quint8 ialpha = 0x20 - alpha; + if (alpha > 0) { + while (length) { + int l = qMin(image_width - sx, length); + if (buffer_size < l) + l = buffer_size; + quint16 *dest = ((quint16 *)data->rasterBuffer->scanLine(spans->y)) + x; + const quint16 *src = (quint16 *)data->texture.scanLine(sy) + sx; + blend_sourceOver_rgb16_rgb16(dest, src, l, alpha, ialpha); + x += l; + length -= l; + sx = 0; } - - x += l; - length -= l; - sx = 0; } } ++spans; } } -static void blend_tiled_rgb888(int count, const QSpan *spans, void *userData) -{ - blend_tiled_generic(count, spans, userData); -} - -static void blend_tiled_argb6666(int count, const QSpan *spans, void *userData) -{ - blend_tiled_generic(count, spans, userData); -} - -static void blend_tiled_rgb666(int count, const QSpan *spans, void *userData) -{ - blend_tiled_generic(count, spans, userData); -} - -static void blend_tiled_argb8565(int count, const QSpan *spans, void *userData) -{ - blend_tiled_generic(count, spans, userData); -} - -static void blend_tiled_rgb565(int count, const QSpan *spans, void *userData) -{ - QSpanData *data = reinterpret_cast(userData); - - if (data->texture.format == QImage::Format_ARGB8565_Premultiplied) - blendTiled(count, spans, userData); - else if (data->texture.format == QImage::Format_RGB16) - blendTiled(count, spans, userData); - else - blend_tiled_generic(count, spans, userData); -} - -static void blend_tiled_argb8555(int count, const QSpan *spans, void *userData) -{ - blend_tiled_generic(count, spans, userData); -} - -static void blend_tiled_rgb555(int count, const QSpan *spans, void *userData) -{ - blend_tiled_generic(count, spans, userData); -} - -static void blend_tiled_argb4444(int count, const QSpan *spans, void *userData) -{ - blend_tiled_generic(count, spans, userData); -} - -static void blend_tiled_rgb444(int count, const QSpan *spans, void *userData) -{ - blend_tiled_generic(count, spans, userData); -} - -template -Q_STATIC_TEMPLATE_FUNCTION void blendTransformedBilinear(int count, const QSpan *spans, - void *userData) +static void blend_transformed_bilinear_rgb565(int count, const QSpan *spans, void *userData) { QSpanData *data = reinterpret_cast(userData); QPainter::CompositionMode mode = data->rasterBuffer->compositionMode; - - if (mode != QPainter::CompositionMode_SourceOver) { - blend_src_generic(count, spans, userData); + if (data->texture.format != QImage::Format_RGB16 + || (mode != QPainter::CompositionMode_SourceOver + && mode != QPainter::CompositionMode_Source)) + { + blend_src_generic(count, spans, userData); return; } - SRC buffer[buffer_size]; + quint16 buffer[buffer_size]; const int src_minx = data->texture.x1; const int src_miny = data->texture.y1; @@ -5289,13 +4350,14 @@ Q_STATIC_TEMPLATE_FUNCTION void blendTransformedBilinear(int count, const QSpan while (count--) { const quint8 coverage = (data->texture.const_alpha * spans->coverage) >> 8; - if (coverage == 0) { + const quint8 alpha = (coverage + 1) >> 3; + const quint8 ialpha = 0x20 - alpha; + if (alpha == 0) { ++spans; continue; } - DST *dest = (DST*)data->rasterBuffer->scanLine(spans->y) - + spans->x; + quint16 *dest = (quint16 *)data->rasterBuffer->scanLine(spans->y) + spans->x; const qreal cx = spans->x + qreal(0.5); const qreal cy = spans->y + qreal(0.5); int x = int((data->m21 * cy @@ -5305,84 +4367,58 @@ Q_STATIC_TEMPLATE_FUNCTION void blendTransformedBilinear(int count, const QSpan int length = spans->len; while (length) { - const int l = qMin(length, buffer_size); + int l; + quint16 *b; + if (ialpha == 0) { + l = length; + b = dest; + } else { + l = qMin(length, buffer_size); + b = buffer; + } + const quint16 *end = b + l; - const SRC *end = buffer + l; - SRC *b = buffer; while (b < end) { int x1 = (x >> 16); int x2; int y1 = (y >> 16); int y2; - const int distx = (x & 0x0000ffff) >> 8; - const int disty = (y & 0x0000ffff) >> 8; + fetchTransformedBilinear_pixelBounds(0, src_minx, src_maxx, x1, x2); + fetchTransformedBilinear_pixelBounds(0, src_miny, src_maxy, y1, y2); - if (x1 < src_minx) { - x2 = x1 = src_minx; - } else if (x1 >= src_maxx) { - x2 = x1 = src_maxx; - } else { - x2 = x1 + 1; - } - if (y1 < src_miny) { - y2 = y1 = src_miny; - } else if (y1 >= src_maxy) { - y2 = y1 = src_maxy; - } else { - y2 = y1 + 1; - } -#if 0 - if (x1 == x2) { - if (y1 == y2) { - *b = ((SRC*)data->texture.scanLine(y1))[x1]; - } else { - *b = ((SRC*)data->texture.scanLine(y1))[x1]; - const SRC t = data->texture.scanLine(y2)[x1]; - interpolate_pixel(*b, SRC::ialpha(disty), - t, SRC::alpha(disty)); - } - } else if (y1 == y2) { - *b = ((SRC*)data->texture.scanLine(y1))[x1]; - const SRC t = ((SRC*)data->texture.scanLine(y1))[x2]; - interpolate_pixel(*b, SRC::ialpha(distx), - t, SRC::alpha(distx)); - } else -#endif - { - const SRC *src1 = (SRC*)data->texture.scanLine(y1); - const SRC *src2 = (SRC*)data->texture.scanLine(y2); - SRC tl = src1[x1]; - const SRC tr = src1[x2]; - SRC bl = src2[x1]; - const SRC br = src2[x2]; - const quint8 ax = SRC::alpha(distx); - const quint8 iax = SRC::ialpha(distx); + const quint16 *src1 = (quint16*)data->texture.scanLine(y1); + const quint16 *src2 = (quint16*)data->texture.scanLine(y2); + quint16 tl = src1[x1]; + const quint16 tr = src1[x2]; + quint16 bl = src2[x1]; + const quint16 br = src2[x2]; + + const uint distxsl8 = x & 0xff00; + const uint distysl8 = y & 0xff00; + const uint distx = distxsl8 >> 8; + const uint disty = distysl8 >> 8; + const uint distxy = distx * disty; + + const uint tlw = 0x10000 - distxsl8 - distysl8 + distxy; // (256 - distx) * (256 - disty) + const uint trw = distxsl8 - distxy; // distx * (256 - disty) + const uint blw = distysl8 - distxy; // (256 - distx) * disty + const uint brw = distxy; // distx * disty + uint red = ((tl & 0xf800) * tlw + (tr & 0xf800) * trw + + (bl & 0xf800) * blw + (br & 0xf800) * brw) & 0xf8000000; + uint green = ((tl & 0x07e0) * tlw + (tr & 0x07e0) * trw + + (bl & 0x07e0) * blw + (br & 0x07e0) * brw) & 0x07e00000; + uint blue = ((tl & 0x001f) * tlw + (tr & 0x001f) * trw + + (bl & 0x001f) * blw + (br & 0x001f) * brw); + *b = quint16((red | green | blue) >> 16); - interpolate_pixel(tl, iax, tr, ax); - interpolate_pixel(bl, iax, br, ax); - interpolate_pixel(tl, SRC::ialpha(disty), - bl, SRC::alpha(disty)); - *b = tl; - } ++b; - x += fdx; y += fdy; } - if (!SRC::hasAlpha() && coverage == 255) { - qt_memconvert(dest, buffer, l); - } else if (sizeof(DST) == 3 && l >= 4 && - (quintptr(dest) & 3) == (quintptr(buffer) & 3)) - { - blendUntransformed_dest24(dest, buffer, coverage, l); - } else if (sizeof(DST) == 2 && sizeof(SRC) == 2 && l >= 2 && - (quintptr(dest) & 3) == (quintptr(buffer) & 3)) { - blendUntransformed_dest16(dest, buffer, coverage, l); - } else { - blendUntransformed_unaligned(dest, buffer, coverage, l); - } + if (ialpha != 0) + blend_sourceOver_rgb16_rgb16(dest, buffer, l, alpha, ialpha); dest += l; length -= l; @@ -5396,13 +4432,14 @@ Q_STATIC_TEMPLATE_FUNCTION void blendTransformedBilinear(int count, const QSpan while (count--) { const quint8 coverage = (data->texture.const_alpha * spans->coverage) >> 8; - if (coverage == 0) { + const quint8 alpha = (coverage + 1) >> 3; + const quint8 ialpha = 0x20 - alpha; + if (alpha == 0) { ++spans; continue; } - DST *dest = (DST*)data->rasterBuffer->scanLine(spans->y) - + spans->x; + quint16 *dest = (quint16 *)data->rasterBuffer->scanLine(spans->y) + spans->x; const qreal cx = spans->x + qreal(0.5); const qreal cy = spans->y + qreal(0.5); @@ -5413,9 +4450,17 @@ Q_STATIC_TEMPLATE_FUNCTION void blendTransformedBilinear(int count, const QSpan int length = spans->len; while (length) { - const int l = qMin(length, buffer_size); - const SRC *end = buffer + l; - SRC *b = buffer; + int l; + quint16 *b; + if (ialpha == 0) { + l = length; + b = dest; + } else { + l = qMin(length, buffer_size); + b = buffer; + } + const quint16 *end = b + l; + while (b < end) { const qreal iw = w == 0 ? 1 : 1 / w; const qreal px = x * iw - qreal(0.5); @@ -5426,56 +4471,42 @@ Q_STATIC_TEMPLATE_FUNCTION void blendTransformedBilinear(int count, const QSpan int y1 = int(py) - (py < 0); int y2; - const int distx = int((px - x1) * 256); - const int disty = int((py - y1) * 256); + fetchTransformedBilinear_pixelBounds(0, src_minx, src_maxx, x1, x2); + fetchTransformedBilinear_pixelBounds(0, src_miny, src_maxy, y1, y2); - if (x1 < src_minx) { - x2 = x1 = src_minx; - } else if (x1 >= src_maxx) { - x2 = x1 = src_maxx; - } else { - x2 = x1 + 1; - } - if (y1 < src_miny) { - y2 = y1 = src_miny; - } else if (y1 >= src_maxy) { - y2 = y1 = src_maxy; - } else { - y2 = y1 + 1; - } + const quint16 *src1 = (quint16 *)data->texture.scanLine(y1); + const quint16 *src2 = (quint16 *)data->texture.scanLine(y2); + quint16 tl = src1[x1]; + const quint16 tr = src1[x2]; + quint16 bl = src2[x1]; + const quint16 br = src2[x2]; - const SRC *src1 = (SRC*)data->texture.scanLine(y1); - const SRC *src2 = (SRC*)data->texture.scanLine(y2); - SRC tl = src1[x1]; - const SRC tr = src1[x2]; - SRC bl = src2[x1]; - const SRC br = src2[x2]; - const quint8 ax = SRC::alpha(distx); - const quint8 iax = SRC::ialpha(distx); + const uint distx = uint((px - x1) * 256); + const uint disty = uint((py - y1) * 256); + const uint distxsl8 = distx << 8; + const uint distysl8 = disty << 8; + const uint distxy = distx * disty; + + const uint tlw = 0x10000 - distxsl8 - distysl8 + distxy; // (256 - distx) * (256 - disty) + const uint trw = distxsl8 - distxy; // distx * (256 - disty) + const uint blw = distysl8 - distxy; // (256 - distx) * disty + const uint brw = distxy; // distx * disty + uint red = ((tl & 0xf800) * tlw + (tr & 0xf800) * trw + + (bl & 0xf800) * blw + (br & 0xf800) * brw) & 0xf8000000; + uint green = ((tl & 0x07e0) * tlw + (tr & 0x07e0) * trw + + (bl & 0x07e0) * blw + (br & 0x07e0) * brw) & 0x07e00000; + uint blue = ((tl & 0x001f) * tlw + (tr & 0x001f) * trw + + (bl & 0x001f) * blw + (br & 0x001f) * brw); + *b = quint16((red | green | blue) >> 16); - interpolate_pixel(tl, iax, tr, ax); - interpolate_pixel(bl, iax, br, ax); - interpolate_pixel(tl, SRC::ialpha(disty), - bl, SRC::alpha(disty)); - *b = tl; ++b; - x += fdx; y += fdy; w += fdw; } - if (!SRC::hasAlpha() && coverage == 255) { - qt_memconvert(dest, buffer, l); - } else if (sizeof(DST) == 3 && l >= 4 && - (quintptr(dest) & 3) == (quintptr(buffer) & 3)) - { - blendUntransformed_dest24(dest, buffer, coverage, l); - } else if (sizeof(DST) == 2 && sizeof(SRC) == 2 && l >= 2 && - (quintptr(dest) & 3) == (quintptr(buffer) & 3)) { - blendUntransformed_dest16(dest, buffer, coverage, l); - } else { - blendUntransformed_unaligned(dest, buffer, coverage, l); - } + + if (ialpha != 0) + blend_sourceOver_rgb16_rgb16(dest, buffer, l, alpha, ialpha); dest += l; length -= l; @@ -5485,66 +4516,12 @@ Q_STATIC_TEMPLATE_FUNCTION void blendTransformedBilinear(int count, const QSpan } } -static void blend_transformed_bilinear_rgb888(int count, const QSpan *spans, void *userData) -{ - blend_src_generic(count, spans, userData); -} - -static void blend_transformed_bilinear_argb6666(int count, const QSpan *spans, void *userData) -{ - blend_src_generic(count, spans, userData); -} - -static void blend_transformed_bilinear_rgb666(int count, const QSpan *spans, void *userData) -{ - blend_src_generic(count, spans, userData); -} - -static void blend_transformed_bilinear_argb8565(int count, const QSpan *spans, void *userData) -{ - blend_src_generic(count, spans, userData); -} - -static void blend_transformed_bilinear_rgb565(int count, const QSpan *spans, - void *userData) -{ - QSpanData *data = reinterpret_cast(userData); - - if (data->texture.format == QImage::Format_RGB16) - blendTransformedBilinear(count, spans, userData); - else if (data->texture.format == QImage::Format_ARGB8565_Premultiplied) - blendTransformedBilinear(count, spans, userData); - else - blend_src_generic(count, spans, userData); -} - -static void blend_transformed_bilinear_argb8555(int count, const QSpan *spans, void *userData) -{ - blend_src_generic(count, spans, userData); -} - -static void blend_transformed_bilinear_rgb555(int count, const QSpan *spans, void *userData) -{ - blend_src_generic(count, spans, userData); -} - -static void blend_transformed_bilinear_argb4444(int count, const QSpan *spans, void *userData) -{ - blend_src_generic(count, spans, userData); -} - -static void blend_transformed_bilinear_rgb444(int count, const QSpan *spans, void *userData) -{ - blend_src_generic(count, spans, userData); -} - -template -Q_STATIC_TEMPLATE_FUNCTION void blend_transformed_argb(int count, const QSpan *spans, void *userData) +static void blend_transformed_argb(int count, const QSpan *spans, void *userData) { QSpanData *data = reinterpret_cast(userData); if (data->texture.format != QImage::Format_ARGB32_Premultiplied && data->texture.format != QImage::Format_RGB32) { - blend_src_generic(count, spans, userData); + blend_src_generic(count, spans, userData); return; } @@ -5553,7 +4530,6 @@ Q_STATIC_TEMPLATE_FUNCTION void blend_transformed_argb(int count, const QSpan *s int image_width = data->texture.width; int image_height = data->texture.height; - const int scanline_offset = data->texture.bytesPerLine / 4; if (data->fast_matrix) { // The increment pr x in the scanline @@ -5564,7 +4540,6 @@ Q_STATIC_TEMPLATE_FUNCTION void blend_transformed_argb(int count, const QSpan *s void *t = data->rasterBuffer->scanLine(spans->y); uint *target = ((uint *)t) + spans->x; - uint *image_bits = (uint *)data->texture.imageData; const qreal cx = spans->x + qreal(0.5); const qreal cy = spans->y + qreal(0.5); @@ -5581,24 +4556,15 @@ Q_STATIC_TEMPLATE_FUNCTION void blend_transformed_argb(int count, const QSpan *s const uint *end = buffer + l; uint *b = buffer; while (b < end) { - int px = x >> 16; - int py = y >> 16; + int px = qBound(0, x >> 16, image_width - 1); + int py = qBound(0, y >> 16, image_height - 1); + *b = reinterpret_cast(data->texture.scanLine(py))[px]; - bool out = (px < 0) || (px >= image_width) - || (py < 0) || (py >= image_height); - - int y_offset = py * scanline_offset; - *b = out ? uint(0) : image_bits[y_offset + px]; x += fdx; y += fdy; ++b; } - if (spanMethod == RegularSpans) - func(target, buffer, l, coverage); - else - drawBufferSpan(data, buffer, buffer_size, - spans->x + spans->len - length, - spans->y, l, coverage); + func(target, buffer, l, coverage); target += l; length -= l; } @@ -5612,7 +4578,6 @@ Q_STATIC_TEMPLATE_FUNCTION void blend_transformed_argb(int count, const QSpan *s void *t = data->rasterBuffer->scanLine(spans->y); uint *target = ((uint *)t) + spans->x; - uint *image_bits = (uint *)data->texture.imageData; const qreal cx = spans->x + qreal(0.5); const qreal cy = spans->y + qreal(0.5); @@ -5631,26 +4596,17 @@ Q_STATIC_TEMPLATE_FUNCTION void blend_transformed_argb(int count, const QSpan *s const qreal iw = w == 0 ? 1 : 1 / w; const qreal tx = x * iw; const qreal ty = y * iw; - const int px = int(tx) - (tx < 0); - const int py = int(ty) - (ty < 0); + const int px = qBound(0, int(tx) - (tx < 0), image_width - 1); + const int py = qBound(0, int(ty) - (ty < 0), image_height - 1); - bool out = (px < 0) || (px >= image_width) - || (py < 0) || (py >= image_height); - - int y_offset = py * scanline_offset; - *b = out ? uint(0) : image_bits[y_offset + px]; + *b = reinterpret_cast(data->texture.scanLine(py))[px]; x += fdx; y += fdy; w += fdw; ++b; } - if (spanMethod == RegularSpans) - func(target, buffer, l, coverage); - else - drawBufferSpan(data, buffer, buffer_size, - spans->x + spans->len - length, - spans->y, l, coverage); + func(target, buffer, l, coverage); target += l; length -= l; } @@ -5659,18 +4615,20 @@ Q_STATIC_TEMPLATE_FUNCTION void blend_transformed_argb(int count, const QSpan *s } } -template -Q_STATIC_TEMPLATE_FUNCTION void blendTransformed(int count, const QSpan *spans, void *userData) +static void blend_transformed_rgb565(int count, const QSpan *spans, void *userData) { QSpanData *data = reinterpret_cast(userData); QPainter::CompositionMode mode = data->rasterBuffer->compositionMode; - if (mode != QPainter::CompositionMode_SourceOver) { - blend_src_generic(count, spans, userData); + if (data->texture.format != QImage::Format_RGB16 + || (mode != QPainter::CompositionMode_SourceOver + && mode != QPainter::CompositionMode_Source)) + { + blend_src_generic(count, spans, userData); return; } - SRC buffer[buffer_size]; + quint16 buffer[buffer_size]; const int image_width = data->texture.width; const int image_height = data->texture.height; @@ -5681,13 +4639,14 @@ Q_STATIC_TEMPLATE_FUNCTION void blendTransformed(int count, const QSpan *spans, while (count--) { const quint8 coverage = (data->texture.const_alpha * spans->coverage) >> 8; - if (coverage == 0) { + const quint8 alpha = (coverage + 1) >> 3; + const quint8 ialpha = 0x20 - alpha; + if (alpha == 0) { ++spans; continue; } - DST *dest = (DST*)data->rasterBuffer->scanLine(spans->y) - + spans->x; + quint16 *dest = (quint16 *)data->rasterBuffer->scanLine(spans->y) + spans->x; const qreal cx = spans->x + qreal(0.5); const qreal cy = spans->y + qreal(0.5); int x = int((data->m21 * cy @@ -5697,39 +4656,30 @@ Q_STATIC_TEMPLATE_FUNCTION void blendTransformed(int count, const QSpan *spans, int length = spans->len; while (length) { - const int l = qMin(length, buffer_size); + int l; + quint16 *b; + if (ialpha == 0) { + l = length; + b = dest; + } else { + l = qMin(length, buffer_size); + b = buffer; + } + const quint16 *end = b + l; - const SRC *end = buffer + l; - SRC *b = buffer; while (b < end) { - const int px = (x >> 16); - const int py = (y >> 16); + const int px = qBound(0, x >> 16, image_width - 1); + const int py = qBound(0, y >> 16, image_height - 1); - if ((px < 0) || (px >= image_width) || - (py < 0) || (py >= image_height)) - { - *b = 0; - } else { - *b = ((SRC*)data->texture.scanLine(py))[px]; - } + *b = ((quint16 *)data->texture.scanLine(py))[px]; ++b; x += fdx; y += fdy; } - if (!SRC::hasAlpha() && coverage == 255) { - qt_memconvert(dest, buffer, l); - } else if (sizeof(DST) == 3 && sizeof(SRC) == 3 && l >= 4 && - (quintptr(dest) & 3) == (quintptr(buffer) & 3)) - { - blendUntransformed_dest24(dest, buffer, coverage, l); - } else if (sizeof(DST) == 2 && sizeof(SRC) == 2 && l >= 2 && - (quintptr(dest) & 3) == (quintptr(buffer) & 3)) { - blendUntransformed_dest16(dest, buffer, coverage, l); - } else { - blendUntransformed_unaligned(dest, buffer, coverage, l); - } + if (ialpha != 0) + blend_sourceOver_rgb16_rgb16(dest, buffer, l, alpha, ialpha); dest += l; length -= l; @@ -5743,13 +4693,14 @@ Q_STATIC_TEMPLATE_FUNCTION void blendTransformed(int count, const QSpan *spans, while (count--) { const quint8 coverage = (data->texture.const_alpha * spans->coverage) >> 8; - if (coverage == 0) { + const quint8 alpha = (coverage + 1) >> 3; + const quint8 ialpha = 0x20 - alpha; + if (alpha == 0) { ++spans; continue; } - DST *dest = (DST*)data->rasterBuffer->scanLine(spans->y) - + spans->x; + quint16 *dest = (quint16 *)data->rasterBuffer->scanLine(spans->y) + spans->x; const qreal cx = spans->x + qreal(0.5); const qreal cy = spans->y + qreal(0.5); @@ -5760,42 +4711,35 @@ Q_STATIC_TEMPLATE_FUNCTION void blendTransformed(int count, const QSpan *spans, int length = spans->len; while (length) { - const int l = qMin(length, buffer_size); - const SRC *end = buffer + l; - SRC *b = buffer; + int l; + quint16 *b; + if (ialpha == 0) { + l = length; + b = dest; + } else { + l = qMin(length, buffer_size); + b = buffer; + } + const quint16 *end = b + l; + while (b < end) { const qreal iw = w == 0 ? 1 : 1 / w; const qreal tx = x * iw; const qreal ty = y * iw; - const int px = int(tx) - (tx < 0); - const int py = int(ty) - (ty < 0); + const int px = qBound(0, int(tx) - (tx < 0), image_width - 1); + const int py = qBound(0, int(ty) - (ty < 0), image_height - 1); - if ((px < 0) || (px >= image_width) || - (py < 0) || (py >= image_height)) - { - *b = 0; - } else { - *b = ((SRC*)data->texture.scanLine(py))[px]; - } + *b = ((quint16 *)data->texture.scanLine(py))[px]; ++b; x += fdx; y += fdy; w += fdw; } - if (!SRC::hasAlpha() && coverage == 255) { - qt_memconvert(dest, buffer, l); - } else if (sizeof(DST) == 3 && sizeof(SRC) == 3 && l >= 4 && - (quintptr(dest) & 3) == (quintptr(buffer) & 3)) - { - blendUntransformed_dest24(dest, buffer, coverage, l); - } else if (sizeof(DST) == 2 && sizeof(SRC) == 2 && l >= 2 && - (quintptr(dest) & 3) == (quintptr(buffer) & 3)) { - blendUntransformed_dest16(dest, buffer, coverage, l); - } else { - blendUntransformed_unaligned(dest, buffer, coverage, l); - } + + if (ialpha != 0) + blend_sourceOver_rgb16_rgb16(dest, buffer, l, alpha, ialpha); dest += l; length -= l; @@ -5805,74 +4749,12 @@ Q_STATIC_TEMPLATE_FUNCTION void blendTransformed(int count, const QSpan *spans, } } -static void blend_transformed_rgb888(int count, const QSpan *spans, - void *userData) -{ - blend_src_generic(count, spans, userData); -} - -static void blend_transformed_argb6666(int count, const QSpan *spans, - void *userData) -{ - blend_src_generic(count, spans, userData); -} - -static void blend_transformed_rgb666(int count, const QSpan *spans, - void *userData) -{ - blend_src_generic(count, spans, userData); -} - -static void blend_transformed_argb8565(int count, const QSpan *spans, - void *userData) -{ - blend_src_generic(count, spans, userData); -} - -static void blend_transformed_rgb565(int count, const QSpan *spans, - void *userData) -{ - QSpanData *data = reinterpret_cast(userData); - - if (data->texture.format == QImage::Format_ARGB8565_Premultiplied) - blendTransformed(count, spans, userData); - else if (data->texture.format == QImage::Format_RGB16) - blendTransformed(count, spans, userData); - else - blend_src_generic(count, spans, userData); -} - -static void blend_transformed_argb8555(int count, const QSpan *spans, - void *userData) -{ - blend_src_generic(count, spans, userData); -} - -static void blend_transformed_rgb555(int count, const QSpan *spans, - void *userData) -{ - blend_src_generic(count, spans, userData); -} - -static void blend_transformed_argb4444(int count, const QSpan *spans, - void *userData) -{ - blend_src_generic(count, spans, userData); -} - -static void blend_transformed_rgb444(int count, const QSpan *spans, - void *userData) -{ - blend_src_generic(count, spans, userData); -} - -template -Q_STATIC_TEMPLATE_FUNCTION void blend_transformed_tiled_argb(int count, const QSpan *spans, void *userData) +static void blend_transformed_tiled_argb(int count, const QSpan *spans, void *userData) { QSpanData *data = reinterpret_cast(userData); if (data->texture.format != QImage::Format_ARGB32_Premultiplied && data->texture.format != QImage::Format_RGB32) { - blend_src_generic(count, spans, userData); + blend_src_generic(count, spans, userData); return; } @@ -5925,12 +4807,7 @@ Q_STATIC_TEMPLATE_FUNCTION void blend_transformed_tiled_argb(int count, const QS y += fdy; ++b; } - if (spanMethod == RegularSpans) - func(target, buffer, l, coverage); - else - drawBufferSpan(data, buffer, buffer_size, - spans->x + spans->len - length, - spans->y, l, coverage); + func(target, buffer, l, coverage); target += l; length -= l; } @@ -5985,12 +4862,7 @@ Q_STATIC_TEMPLATE_FUNCTION void blend_transformed_tiled_argb(int count, const QS } ++b; } - if (spanMethod == RegularSpans) - func(target, buffer, l, coverage); - else - drawBufferSpan(data, buffer, buffer_size, - spans->x + spans->len - length, - spans->y, l, coverage); + func(target, buffer, l, coverage); target += l; length -= l; } @@ -5999,18 +4871,20 @@ Q_STATIC_TEMPLATE_FUNCTION void blend_transformed_tiled_argb(int count, const QS } } -template -Q_STATIC_TEMPLATE_FUNCTION void blendTransformedTiled(int count, const QSpan *spans, void *userData) +static void blend_transformed_tiled_rgb565(int count, const QSpan *spans, void *userData) { QSpanData *data = reinterpret_cast(userData); QPainter::CompositionMode mode = data->rasterBuffer->compositionMode; - if (mode != QPainter::CompositionMode_SourceOver) { - blend_src_generic(count, spans, userData); + if (data->texture.format != QImage::Format_RGB16 + || (mode != QPainter::CompositionMode_SourceOver + && mode != QPainter::CompositionMode_Source)) + { + blend_src_generic(count, spans, userData); return; } - SRC buffer[buffer_size]; + quint16 buffer[buffer_size]; const int image_width = data->texture.width; const int image_height = data->texture.height; @@ -6021,13 +4895,14 @@ Q_STATIC_TEMPLATE_FUNCTION void blendTransformedTiled(int count, const QSpan *sp while (count--) { const quint8 coverage = (data->texture.const_alpha * spans->coverage) >> 8; - if (coverage == 0) { + const quint8 alpha = (coverage + 1) >> 3; + const quint8 ialpha = 0x20 - alpha; + if (alpha == 0) { ++spans; continue; } - DST *dest = (DST*)data->rasterBuffer->scanLine(spans->y) - + spans->x; + quint16 *dest = (quint16 *)data->rasterBuffer->scanLine(spans->y) + spans->x; const qreal cx = spans->x + qreal(0.5); const qreal cy = spans->y + qreal(0.5); int x = int((data->m21 * cy @@ -6037,10 +4912,17 @@ Q_STATIC_TEMPLATE_FUNCTION void blendTransformedTiled(int count, const QSpan *sp int length = spans->len; while (length) { - const int l = qMin(length, buffer_size); + int l; + quint16 *b; + if (ialpha == 0) { + l = length; + b = dest; + } else { + l = qMin(length, buffer_size); + b = buffer; + } + const quint16 *end = b + l; - const SRC *end = buffer + l; - SRC *b = buffer; while (b < end) { int px = (x >> 16) % image_width; int py = (y >> 16) % image_height; @@ -6050,25 +4932,15 @@ Q_STATIC_TEMPLATE_FUNCTION void blendTransformedTiled(int count, const QSpan *sp if (py < 0) py += image_height; - *b = ((SRC*)data->texture.scanLine(py))[px]; + *b = ((quint16 *)data->texture.scanLine(py))[px]; ++b; x += fdx; y += fdy; } - if (!SRC::hasAlpha() && coverage == 255) { - qt_memconvert(dest, buffer, l); - } else if (sizeof(DST) == 3 && sizeof(SRC) == 3 && l >= 4 && - (quintptr(dest) & 3) == (quintptr(buffer) & 3)) - { - blendUntransformed_dest24(dest, buffer, coverage, l); - } else if (sizeof(DST) == 2 && sizeof(SRC) == 2 && l >= 2 && - (quintptr(dest) & 3) == (quintptr(buffer) & 3)) { - blendUntransformed_dest16(dest, buffer, coverage, l); - } else { - blendUntransformed_unaligned(dest, buffer, coverage, l); - } + if (ialpha != 0) + blend_sourceOver_rgb16_rgb16(dest, buffer, l, alpha, ialpha); dest += l; length -= l; @@ -6082,13 +4954,14 @@ Q_STATIC_TEMPLATE_FUNCTION void blendTransformedTiled(int count, const QSpan *sp while (count--) { const quint8 coverage = (data->texture.const_alpha * spans->coverage) >> 8; - if (coverage == 0) { + const quint8 alpha = (coverage + 1) >> 3; + const quint8 ialpha = 0x20 - alpha; + if (alpha == 0) { ++spans; continue; } - DST *dest = (DST*)data->rasterBuffer->scanLine(spans->y) - + spans->x; + quint16 *dest = (quint16 *)data->rasterBuffer->scanLine(spans->y) + spans->x; const qreal cx = spans->x + qreal(0.5); const qreal cy = spans->y + qreal(0.5); @@ -6099,9 +4972,17 @@ Q_STATIC_TEMPLATE_FUNCTION void blendTransformedTiled(int count, const QSpan *sp int length = spans->len; while (length) { - const int l = qMin(length, buffer_size); - const SRC *end = buffer + l; - SRC *b = buffer; + int l; + quint16 *b; + if (ialpha == 0) { + l = length; + b = dest; + } else { + l = qMin(length, buffer_size); + b = buffer; + } + const quint16 *end = b + l; + while (b < end) { const qreal iw = w == 0 ? 1 : 1 / w; const qreal tx = x * iw; @@ -6117,7 +4998,7 @@ Q_STATIC_TEMPLATE_FUNCTION void blendTransformedTiled(int count, const QSpan *sp if (py < 0) py += image_height; - *b = ((SRC*)data->texture.scanLine(py))[px]; + *b = ((quint16 *)data->texture.scanLine(py))[px]; ++b; x += fdx; @@ -6127,18 +5008,9 @@ Q_STATIC_TEMPLATE_FUNCTION void blendTransformedTiled(int count, const QSpan *sp if (!w) w += fdw; } - if (!SRC::hasAlpha() && coverage == 255) { - qt_memconvert(dest, buffer, l); - } else if (sizeof(DST) == 3 && sizeof(SRC) == 3 && l >= 4 && - (quintptr(dest) & 3) == (quintptr(buffer) & 3)) - { - blendUntransformed_dest24(dest, buffer, coverage, l); - } else if (sizeof(DST) == 2 && sizeof(SRC) == 2 && l >= 2 && - (quintptr(dest) & 3) == (quintptr(buffer) & 3)) { - blendUntransformed_dest16(dest, buffer, coverage, l); - } else { - blendUntransformed_unaligned(dest, buffer, coverage, l); - } + + if (ialpha != 0) + blend_sourceOver_rgb16_rgb16(dest, buffer, l, alpha, ialpha); dest += l; length -= l; @@ -6148,185 +5020,122 @@ Q_STATIC_TEMPLATE_FUNCTION void blendTransformedTiled(int count, const QSpan *sp } } -static void blend_transformed_tiled_rgb888(int count, const QSpan *spans, - void *userData) -{ - blend_src_generic(count, spans, userData); -} - -static void blend_transformed_tiled_argb6666(int count, const QSpan *spans, - void *userData) -{ - blend_src_generic(count, spans, userData); -} - -static void blend_transformed_tiled_rgb666(int count, const QSpan *spans, - void *userData) -{ - blend_src_generic(count, spans, userData); -} - -static void blend_transformed_tiled_argb8565(int count, const QSpan *spans, - void *userData) -{ - blend_src_generic(count, spans, userData); -} - -static void blend_transformed_tiled_rgb565(int count, const QSpan *spans, - void *userData) -{ - QSpanData *data = reinterpret_cast(userData); - - if (data->texture.format == QImage::Format_ARGB8565_Premultiplied) - blendTransformedTiled(count, spans, userData); - else if (data->texture.format == QImage::Format_RGB16) - blendTransformedTiled(count, spans, userData); - else - blend_src_generic(count, spans, userData); -} - -static void blend_transformed_tiled_argb8555(int count, const QSpan *spans, - void *userData) -{ - blend_src_generic(count, spans, userData); -} - -static void blend_transformed_tiled_rgb555(int count, const QSpan *spans, - void *userData) -{ - blend_src_generic(count, spans, userData); -} - -static void blend_transformed_tiled_argb4444(int count, const QSpan *spans, - void *userData) -{ - blend_src_generic(count, spans, userData); -} - -static void blend_transformed_tiled_rgb444(int count, const QSpan *spans, - void *userData) -{ - blend_src_generic(count, spans, userData); -} - -# define SPANFUNC_POINTER(Name, Arg) Name - /* Image formats here are target formats */ static const ProcessSpans processTextureSpans[NBlendTypes][QImage::NImageFormats] = { // Untransformed { 0, // Invalid - SPANFUNC_POINTER(blend_untransformed_generic, RegularSpans), // Mono - SPANFUNC_POINTER(blend_untransformed_generic, RegularSpans), // MonoLsb - SPANFUNC_POINTER(blend_untransformed_generic, RegularSpans), // Indexed8 - SPANFUNC_POINTER(blend_untransformed_generic, RegularSpans), // RGB32 - SPANFUNC_POINTER(blend_untransformed_generic, RegularSpans), // ARGB32 - SPANFUNC_POINTER(blend_untransformed_argb, RegularSpans), // ARGB32_Premultiplied + blend_untransformed_generic, // Mono + blend_untransformed_generic, // MonoLsb + blend_untransformed_generic, // Indexed8 + blend_untransformed_generic, // RGB32 + blend_untransformed_generic, // ARGB32 + blend_untransformed_argb, // ARGB32_Premultiplied blend_untransformed_rgb565, - blend_untransformed_argb8565, - blend_untransformed_rgb666, - blend_untransformed_argb6666, - blend_untransformed_rgb555, - blend_untransformed_argb8555, - blend_untransformed_rgb888, - blend_untransformed_rgb444, - blend_untransformed_argb4444, + blend_untransformed_generic, + blend_untransformed_generic, + blend_untransformed_generic, + blend_untransformed_generic, + blend_untransformed_generic, + blend_untransformed_generic, + blend_untransformed_generic, + blend_untransformed_generic, }, // Tiled { 0, // Invalid - SPANFUNC_POINTER(blend_tiled_generic, RegularSpans), // Mono - SPANFUNC_POINTER(blend_tiled_generic, RegularSpans), // MonoLsb - SPANFUNC_POINTER(blend_tiled_generic, RegularSpans), // Indexed8 - SPANFUNC_POINTER(blend_tiled_generic, RegularSpans), // RGB32 - SPANFUNC_POINTER(blend_tiled_generic, RegularSpans), // ARGB32 - SPANFUNC_POINTER(blend_tiled_argb, RegularSpans), // ARGB32_Premultiplied + blend_tiled_generic, // Mono + blend_tiled_generic, // MonoLsb + blend_tiled_generic, // Indexed8 + blend_tiled_generic, // RGB32 + blend_tiled_generic, // ARGB32 + blend_tiled_argb, // ARGB32_Premultiplied blend_tiled_rgb565, - blend_tiled_argb8565, - blend_tiled_rgb666, - blend_tiled_argb6666, - blend_tiled_rgb555, - blend_tiled_argb8555, - blend_tiled_rgb888, - blend_tiled_rgb444, - blend_tiled_argb4444, + blend_tiled_generic, + blend_tiled_generic, + blend_tiled_generic, + blend_tiled_generic, + blend_tiled_generic, + blend_tiled_generic, + blend_tiled_generic, + blend_tiled_generic, }, // Transformed { 0, // Invalid - SPANFUNC_POINTER(blend_src_generic, RegularSpans), // Mono - SPANFUNC_POINTER(blend_src_generic, RegularSpans), // MonoLsb - SPANFUNC_POINTER(blend_src_generic, RegularSpans), // Indexed8 - SPANFUNC_POINTER(blend_src_generic, RegularSpans), // RGB32 - SPANFUNC_POINTER(blend_src_generic, RegularSpans), // ARGB32 - SPANFUNC_POINTER(blend_transformed_argb, RegularSpans), // ARGB32_Premultiplied + blend_src_generic, // Mono + blend_src_generic, // MonoLsb + blend_src_generic, // Indexed8 + blend_src_generic, // RGB32 + blend_src_generic, // ARGB32 + blend_transformed_argb, // ARGB32_Premultiplied blend_transformed_rgb565, - blend_transformed_argb8565, - blend_transformed_rgb666, - blend_transformed_argb6666, - blend_transformed_rgb555, - blend_transformed_argb8555, - blend_transformed_rgb888, - blend_transformed_rgb444, - blend_transformed_argb4444, + blend_src_generic, + blend_src_generic, + blend_src_generic, + blend_src_generic, + blend_src_generic, + blend_src_generic, + blend_src_generic, + blend_src_generic, }, // TransformedTiled { 0, - SPANFUNC_POINTER(blend_src_generic, RegularSpans), // Mono - SPANFUNC_POINTER(blend_src_generic, RegularSpans), // MonoLsb - SPANFUNC_POINTER(blend_src_generic, RegularSpans), // Indexed8 - SPANFUNC_POINTER(blend_src_generic, RegularSpans), // RGB32 - SPANFUNC_POINTER(blend_src_generic, RegularSpans), // ARGB32 - SPANFUNC_POINTER(blend_transformed_tiled_argb, RegularSpans), // ARGB32_Premultiplied + blend_src_generic, // Mono + blend_src_generic, // MonoLsb + blend_src_generic, // Indexed8 + blend_src_generic, // RGB32 + blend_src_generic, // ARGB32 + blend_transformed_tiled_argb, // ARGB32_Premultiplied blend_transformed_tiled_rgb565, - blend_transformed_tiled_argb8565, - blend_transformed_tiled_rgb666, - blend_transformed_tiled_argb6666, - blend_transformed_tiled_rgb555, - blend_transformed_tiled_argb8555, - blend_transformed_tiled_rgb888, - blend_transformed_tiled_rgb444, - blend_transformed_tiled_argb4444 + blend_src_generic, + blend_src_generic, + blend_src_generic, + blend_src_generic, + blend_src_generic, + blend_src_generic, + blend_src_generic, + blend_src_generic }, // Bilinear { 0, - SPANFUNC_POINTER(blend_src_generic, RegularSpans), // Mono - SPANFUNC_POINTER(blend_src_generic, RegularSpans), // MonoLsb - SPANFUNC_POINTER(blend_src_generic, RegularSpans), // Indexed8 - SPANFUNC_POINTER(blend_src_generic, RegularSpans), // RGB32 - SPANFUNC_POINTER(blend_src_generic, RegularSpans), // ARGB32 - SPANFUNC_POINTER(blend_src_generic, RegularSpans), // ARGB32_Premultiplied + blend_src_generic, // Mono + blend_src_generic, // MonoLsb + blend_src_generic, // Indexed8 + blend_src_generic, // RGB32 + blend_src_generic, // ARGB32 + blend_src_generic, // ARGB32_Premultiplied blend_transformed_bilinear_rgb565, - blend_transformed_bilinear_argb8565, - blend_transformed_bilinear_rgb666, - blend_transformed_bilinear_argb6666, - blend_transformed_bilinear_rgb555, - blend_transformed_bilinear_argb8555, - blend_transformed_bilinear_rgb888, - blend_transformed_bilinear_rgb444, - blend_transformed_bilinear_argb4444, + blend_src_generic, + blend_src_generic, + blend_src_generic, + blend_src_generic, + blend_src_generic, + blend_src_generic, + blend_src_generic, + blend_src_generic, }, // BilinearTiled { 0, - SPANFUNC_POINTER(blend_src_generic, RegularSpans), // Mono - SPANFUNC_POINTER(blend_src_generic, RegularSpans), // MonoLsb - SPANFUNC_POINTER(blend_src_generic, RegularSpans), // Indexed8 - SPANFUNC_POINTER(blend_src_generic, RegularSpans), // RGB32 - SPANFUNC_POINTER(blend_src_generic, RegularSpans), // ARGB32 - SPANFUNC_POINTER(blend_src_generic, RegularSpans), // ARGB32_Premultiplied - SPANFUNC_POINTER(blend_src_generic, RegularSpans), // RGB16 - SPANFUNC_POINTER(blend_src_generic, RegularSpans), // ARGB8565_Premultiplied - SPANFUNC_POINTER(blend_src_generic, RegularSpans), // RGB666 - SPANFUNC_POINTER(blend_src_generic, RegularSpans), // ARGB6666_Premultiplied - SPANFUNC_POINTER(blend_src_generic, RegularSpans), // RGB555 - SPANFUNC_POINTER(blend_src_generic, RegularSpans), // ARGB8555_Premultiplied - SPANFUNC_POINTER(blend_src_generic, RegularSpans), // RGB888 - SPANFUNC_POINTER(blend_src_generic, RegularSpans), // RGB444 - SPANFUNC_POINTER(blend_src_generic, RegularSpans), // ARGB4444_Premultiplied + blend_src_generic, // Mono + blend_src_generic, // MonoLsb + blend_src_generic, // Indexed8 + blend_src_generic, // RGB32 + blend_src_generic, // ARGB32 + blend_src_generic, // ARGB32_Premultiplied + blend_src_generic, // RGB16 + blend_src_generic, // ARGB8565_Premultiplied + blend_src_generic, // RGB666 + blend_src_generic, // ARGB6666_Premultiplied + blend_src_generic, // RGB555 + blend_src_generic, // ARGB8555_Premultiplied + blend_src_generic, // RGB888 + blend_src_generic, // RGB444 + blend_src_generic, // ARGB4444_Premultiplied } }; @@ -6339,14 +5148,11 @@ void qBlendTexture(int count, const QSpan *spans, void *userData) template inline void qt_bitmapblit_template(QRasterBuffer *rasterBuffer, - int x, int y, quint32 color, + int x, int y, DST color, const uchar *map, - int mapWidth, int mapHeight, int mapStride, - DST dummy = 0) + int mapWidth, int mapHeight, int mapStride) { - Q_UNUSED(dummy); - const DST c = qt_colorConvert(color, 0); - DST *dest = reinterpret_cast(rasterBuffer->scanLine(y)) + x; + DST *dest = reinterpret_cast(rasterBuffer->scanLine(y)) + x; const int destStride = rasterBuffer->bytesPerLine() / sizeof(DST); if (mapWidth > 8) { @@ -6360,7 +5166,7 @@ inline void qt_bitmapblit_template(QRasterBuffer *rasterBuffer, ++n; } else { if (n) { - qt_memfill(dest + x0, c, n); + qt_memfill(dest + x0, color, n); x0 += n + 1; n = 0; } else { @@ -6375,7 +5181,7 @@ inline void qt_bitmapblit_template(QRasterBuffer *rasterBuffer, } } if (n) - qt_memfill(dest + x0, c, n); + qt_memfill(dest + x0, color, n); dest += destStride; map += mapStride; } @@ -6387,7 +5193,7 @@ inline void qt_bitmapblit_template(QRasterBuffer *rasterBuffer, if (s & 0x80) { ++n; } else if (n) { - qt_memfill(dest + x0, c, n); + qt_memfill(dest + x0, color, n); x0 += n + 1; n = 0; } else { @@ -6395,7 +5201,7 @@ inline void qt_bitmapblit_template(QRasterBuffer *rasterBuffer, } } if (n) - qt_memfill(dest + x0, c, n); + qt_memfill(dest + x0, color, n); dest += destStride; map += mapStride; } @@ -6448,7 +5254,7 @@ static void qt_gradient_quint32(int count, const QSpan *spans, void *userData) } } else { - blend_src_generic(count, spans, userData); + blend_src_generic(count, spans, userData); } } @@ -6496,7 +5302,7 @@ static void qt_gradient_quint16(int count, const QSpan *spans, void *userData) data->solid.color = oldColor; } else { - blend_src_generic(count, spans, userData); + blend_src_generic(count, spans, userData); } } @@ -6514,7 +5320,7 @@ inline static void qt_bitmapblit_quint16(QRasterBuffer *rasterBuffer, const uchar *map, int mapWidth, int mapHeight, int mapStride) { - qt_bitmapblit_template(rasterBuffer, x, y, color, + qt_bitmapblit_template(rasterBuffer, x, y, qConvertRgb32To16(color), map, mapWidth, mapHeight, mapStride); } @@ -6572,7 +5378,7 @@ static void qt_alphamapblit_quint16(QRasterBuffer *rasterBuffer, int mapWidth, int mapHeight, int mapStride, const QClipData *) { - const quint16 c = qt_colorConvert(color, 0); + const quint16 c = qConvertRgb32To16(color); quint16 *dest = reinterpret_cast(rasterBuffer->scanLine(y)) + x; const int destStride = rasterBuffer->bytesPerLine() / sizeof(quint16); @@ -6838,41 +5644,25 @@ static void qt_alphargbblit_quint32(QRasterBuffer *rasterBuffer, } } -template -inline void qt_rectfill_template(QRasterBuffer *rasterBuffer, - int x, int y, int width, int height, - quint32 color, T dummy = 0) +static void qt_rectfill_quint32(QRasterBuffer *rasterBuffer, + int x, int y, int width, int height, + quint32 color) { - Q_UNUSED(dummy); - - qt_rectfill(reinterpret_cast(rasterBuffer->buffer()), - qt_colorConvert(quint32p::fromRawData(color), 0), - x, y, width, height, rasterBuffer->bytesPerLine()); + qt_rectfill(reinterpret_cast(rasterBuffer->buffer()), + color, x, y, width, height, rasterBuffer->bytesPerLine()); } -#define QT_RECTFILL(T) \ - inline static void qt_rectfill_##T(QRasterBuffer *rasterBuffer, \ - int x, int y, int width, int height, \ - quint32 color) \ - { \ - qt_rectfill_template(rasterBuffer, x, y, width, height, color); \ - } +static void qt_rectfill_quint16(QRasterBuffer *rasterBuffer, + int x, int y, int width, int height, + quint32 color) +{ + qt_rectfill(reinterpret_cast(rasterBuffer->buffer()), + qConvertRgb32To16(color), x, y, width, height, rasterBuffer->bytesPerLine()); +} -QT_RECTFILL(quint32) -QT_RECTFILL(quint16) -QT_RECTFILL(qargb8565) -QT_RECTFILL(qrgb666) -QT_RECTFILL(qargb6666) -QT_RECTFILL(qrgb555) -QT_RECTFILL(qargb8555) -QT_RECTFILL(qrgb888) -QT_RECTFILL(qrgb444) -QT_RECTFILL(qargb4444) -#undef QT_RECTFILL - -inline static void qt_rectfill_nonpremul_quint32(QRasterBuffer *rasterBuffer, - int x, int y, int width, int height, - quint32 color) +static void qt_rectfill_nonpremul_quint32(QRasterBuffer *rasterBuffer, + int x, int y, int width, int height, + quint32 color) { qt_rectfill(reinterpret_cast(rasterBuffer->buffer()), INV_PREMUL(color), x, y, width, height, rasterBuffer->bytesPerLine()); @@ -6889,19 +5679,19 @@ DrawHelper qDrawHelper[QImage::NImageFormats] = // Format_Mono, { blend_color_generic, - SPANFUNC_POINTER(blend_src_generic, RegularSpans), + blend_src_generic, 0, 0, 0, 0 }, // Format_MonoLSB, { blend_color_generic, - SPANFUNC_POINTER(blend_src_generic, RegularSpans), + blend_src_generic, 0, 0, 0, 0 }, // Format_Indexed8, { blend_color_generic, - SPANFUNC_POINTER(blend_src_generic, RegularSpans), + blend_src_generic, 0, 0, 0, 0 }, // Format_RGB32, @@ -6942,88 +5732,78 @@ DrawHelper qDrawHelper[QImage::NImageFormats] = }, // Format_ARGB8565_Premultiplied { - SPANFUNC_POINTER_BLENDCOLOR(qargb8565), - SPANFUNC_POINTER(blend_src_generic, RegularSpans), - 0, 0, 0, - qt_rectfill_qargb8565 + blend_color_generic, + blend_src_generic, + 0, 0, 0, 0 }, // Format_RGB666 { - SPANFUNC_POINTER_BLENDCOLOR(qrgb666), - SPANFUNC_POINTER(blend_src_generic, RegularSpans), - 0, 0, 0, - qt_rectfill_qrgb666 + blend_color_generic, + blend_src_generic, + 0, 0, 0, 0 }, // Format_ARGB6666_Premultiplied { - SPANFUNC_POINTER_BLENDCOLOR(qargb6666), - SPANFUNC_POINTER(blend_src_generic, RegularSpans), - 0, 0, 0, - qt_rectfill_qargb6666 + blend_color_generic, + blend_src_generic, + 0, 0, 0, 0 }, // Format_RGB555 { - SPANFUNC_POINTER_BLENDCOLOR(qrgb555), - SPANFUNC_POINTER(blend_src_generic, RegularSpans), - 0, 0, 0, - qt_rectfill_qrgb555 + blend_color_generic, + blend_src_generic, + 0, 0, 0, 0 }, // Format_ARGB8555_Premultiplied { - SPANFUNC_POINTER_BLENDCOLOR(qargb8555), - SPANFUNC_POINTER(blend_src_generic, RegularSpans), - 0, 0, 0, - qt_rectfill_qargb8555 + blend_color_generic, + blend_src_generic, + 0, 0, 0, 0 }, // Format_RGB888 { - SPANFUNC_POINTER_BLENDCOLOR(qrgb888), - SPANFUNC_POINTER(blend_src_generic, RegularSpans), - 0, 0, 0, - qt_rectfill_qrgb888 + blend_color_generic, + blend_src_generic, + 0, 0, 0, 0 }, // Format_RGB444 { - SPANFUNC_POINTER_BLENDCOLOR(qrgb444), - SPANFUNC_POINTER(blend_src_generic, RegularSpans), - 0, 0, 0, - qt_rectfill_qrgb444 + blend_color_generic, + blend_src_generic, + 0, 0, 0, 0 }, // Format_ARGB4444_Premultiplied { - SPANFUNC_POINTER_BLENDCOLOR(qargb4444), - SPANFUNC_POINTER(blend_src_generic, RegularSpans), - 0, 0, 0, - qt_rectfill_qargb4444 + blend_color_generic, + blend_src_generic, + 0, 0, 0, 0 } }; #if defined(Q_CC_MSVC) && !defined(_MIPS_) -template -inline void qt_memfill_template(DST *dest, SRC color, int count) +template +inline void qt_memfill_template(T *dest, T color, int count) { - const DST c = qt_colorConvert(color, 0); while (count--) - *dest++ = c; + *dest++ = color; } #else -template -inline void qt_memfill_template(DST *dest, SRC color, int count) +template +inline void qt_memfill_template(T *dest, T color, int count) { - const DST c = qt_colorConvert(color, 0); int n = (count + 7) / 8; switch (count & 0x07) { - case 0: do { *dest++ = c; - case 7: *dest++ = c; - case 6: *dest++ = c; - case 5: *dest++ = c; - case 4: *dest++ = c; - case 3: *dest++ = c; - case 2: *dest++ = c; - case 1: *dest++ = c; + case 0: do { *dest++ = color; + case 7: *dest++ = color; + case 6: *dest++ = color; + case 5: *dest++ = color; + case 4: *dest++ = color; + case 3: *dest++ = color; + case 2: *dest++ = color; + case 1: *dest++ = color; } while (--n > 0); } } @@ -7053,7 +5833,7 @@ inline void qt_memfill_template(quint16 *dest, quint16 value, int count) static void qt_memfill_quint16(quint16 *dest, quint16 color, int count) { - qt_memfill_template(dest, color, count); + qt_memfill_template(dest, color, count); } typedef void (*qt_memfill32_func)(quint32 *dest, quint32 value, int count); @@ -7067,8 +5847,8 @@ qt_memfill16_func qt_memfill16 = qt_memfill16_setup; void qInitDrawhelperAsm() { - qt_memfill32 = qt_memfill_template; - qt_memfill16 = qt_memfill_quint16; //qt_memfill_template; + qt_memfill32 = qt_memfill_template; + qt_memfill16 = qt_memfill_quint16; //qt_memfill_template; CompositionFunction *functionForModeAsm = 0; CompositionFunctionSolid *functionForModeSolidAsm = 0; diff --git a/src/gui/painting/qdrawhelper_neon.cpp b/src/gui/painting/qdrawhelper_neon.cpp index c3dd4fb1ef5..895b44dc17a 100644 --- a/src/gui/painting/qdrawhelper_neon.cpp +++ b/src/gui/painting/qdrawhelper_neon.cpp @@ -198,7 +198,7 @@ void qt_blend_rgb16_on_argb32_neon(uchar *destPixels, int dbpl, while (h--) { for (int x=0; x -inline DST qt_colorConvert(SRC color, DST dummy) -{ - Q_UNUSED(dummy); - return DST(color); -} - - -template <> -inline quint32 qt_colorConvert(quint16 color, quint32 dummy) -{ - Q_UNUSED(dummy); - const int r = (color & 0xf800); - const int g = (color & 0x07e0); - const int b = (color & 0x001f); - const int tr = (r >> 8) | (r >> 13); - const int tg = (g >> 3) | (g >> 9); - const int tb = (b << 3) | (b >> 2); - - return qRgb(tr, tg, tb); -} - -template <> -inline quint16 qt_colorConvert(quint32 color, quint16 dummy) -{ - Q_UNUSED(dummy); - const int r = qRed(color) << 8; - const int g = qGreen(color) << 3; - const int b = qBlue(color) >> 3; - - return (r & 0xf800) | (g & 0x07e0)| (b & 0x001f); -} - -class quint32p -{ -public: - inline quint32p(quint32 v) : data(PREMUL(v)) {} - - inline operator quint32() const { return data; } - - inline operator quint16() const - { - return qt_colorConvert(data, 0); - } - - Q_STATIC_INLINE_FUNCTION quint32p fromRawData(quint32 v) - { - quint32p p; - p.data = v; - return p; - } - -private: - quint32p() {} - quint32 data; -} Q_PACKED; - -class qabgr8888 -{ -public: - inline qabgr8888(quint32 v) - { - data = qRgba(qBlue(v), qGreen(v), qRed(v), qAlpha(v)); - } - - inline bool operator==(const qabgr8888 &v) const { return data == v.data; } - -private: - quint32 data; -} Q_PACKED; - -class qrgb565; - -class qargb8565 -{ -public: - Q_STATIC_INLINE_FUNCTION bool hasAlpha() { return true; } - - inline qargb8565() {} - inline qargb8565(quint32 v); - inline explicit qargb8565(quint32p v); - inline qargb8565(const qargb8565 &v); - inline qargb8565(const qrgb565 &v); - - inline operator quint32() const; - inline operator quint16() const; - - inline quint8 alpha() const { return data[0]; } - inline qargb8565 truncedAlpha() { - data[0] &= 0xf8; - data[1] &= 0xdf; - return *this; - } - Q_STATIC_INLINE_FUNCTION quint8 alpha(quint8 a) { return (a + 1) >> 3; } - Q_STATIC_INLINE_FUNCTION quint8 ialpha(quint8 a) { return 0x20 - alpha(a); } - - inline qargb8565 byte_mul(quint8 a) const; - inline qargb8565 operator+(qargb8565 v) const; - inline bool operator==(const qargb8565 &v) const; - - inline quint32 rawValue() const; - inline quint16 rawValue16() const; - -private: - friend class qrgb565; - - quint8 data[3]; -} Q_PACKED; - -class qrgb565 -{ -public: - Q_STATIC_INLINE_FUNCTION bool hasAlpha() { return false; } - - qrgb565(int v = 0) : data(v) {} - - inline explicit qrgb565(quint32p v); - inline explicit qrgb565(quint32 v); - inline explicit qrgb565(const qargb8565 &v); - - inline operator quint32() const; - inline operator quint16() const; - - inline qrgb565 operator+(qrgb565 v) const; - - inline quint8 alpha() const { return 0xff; } - inline qrgb565 truncedAlpha() { return *this; } - Q_STATIC_INLINE_FUNCTION quint8 alpha(quint8 a) { return (a + 1) >> 3; } - Q_STATIC_INLINE_FUNCTION quint8 ialpha(quint8 a) { return 0x20 - alpha(a); } - - inline qrgb565 byte_mul(quint8 a) const; - - inline bool operator==(const qrgb565 &v) const; - inline quint16 rawValue() const { return data; } - -private: - friend class qargb8565; - - quint16 data; -} Q_PACKED; - -qargb8565::qargb8565(quint32 v) -{ - *this = qargb8565(quint32p(v)); -} - -qargb8565::qargb8565(quint32p v) -{ - data[0] = qAlpha(v); - const int r = qRed(v); - const int g = qGreen(v); - const int b = qBlue(v); - data[1] = ((g << 3) & 0xe0) | (b >> 3); - data[2] = (r & 0xf8) | (g >> 5); -} - -qargb8565::qargb8565(const qargb8565 &v) -{ - data[0] = v.data[0]; - data[1] = v.data[1]; - data[2] = v.data[2]; -} - -qargb8565::qargb8565(const qrgb565 &v) -{ - data[0] = 0xff; - data[1] = v.data & 0xff; - data[2] = v.data >> 8; -} - -qargb8565::operator quint32() const -{ - const quint16 rgb = (data[2] << 8) | data[1]; - const int a = data[0]; - const int r = (rgb & 0xf800); - const int g = (rgb & 0x07e0); - const int b = (rgb & 0x001f); - const int tr = qMin(a, (r >> 8) | (r >> 13)); - const int tg = qMin(a, (g >> 3) | (g >> 9)); - const int tb = qMin(a, (b << 3) | (b >> 2)); - return qRgba(tr, tg, tb, data[0]); -} - -qargb8565::operator quint16() const -{ - return (data[2] << 8) | data[1]; -} - -qargb8565 qargb8565::operator+(qargb8565 v) const -{ - qargb8565 t; - t.data[0] = data[0] + v.data[0]; - const quint16 rgb = ((data[2] + v.data[2]) << 8) - + (data[1] + v.data[1]); - t.data[1] = rgb & 0xff; - t.data[2] = rgb >> 8; - return t; -} - -qargb8565 qargb8565::byte_mul(quint8 a) const -{ - qargb8565 result; - result.data[0] = (data[0] * a) >> 5; - - const quint16 x = (data[2] << 8) | data[1]; - const quint16 t = ((((x & 0x07e0) >> 5) * a) & 0x07e0) | - ((((x & 0xf81f) * a) >> 5) & 0xf81f); - result.data[1] = t & 0xff; - result.data[2] = t >> 8; - return result; -} - -bool qargb8565::operator==(const qargb8565 &v) const -{ - return data[0] == v.data[0] - && data[1] == v.data[1] - && data[2] == v.data[2]; -} - -quint32 qargb8565::rawValue() const -{ - return (data[2] << 16) | (data[1] << 8) | data[0]; -} - -quint16 qargb8565::rawValue16() const -{ - return (data[2] << 8) | data[1]; -} - -qrgb565::qrgb565(quint32p v) -{ - *this = qrgb565(quint32(v)); -} - -qrgb565::qrgb565(quint32 v) -{ - const int r = qRed(v) << 8; - const int g = qGreen(v) << 3; - const int b = qBlue(v) >> 3; - - data = (r & 0xf800) | (g & 0x07e0)| (b & 0x001f); -} - -qrgb565::qrgb565(const qargb8565 &v) -{ - data = (v.data[2] << 8) | v.data[1]; -} - -qrgb565::operator quint32() const -{ - const int r = (data & 0xf800); - const int g = (data & 0x07e0); - const int b = (data & 0x001f); - const int tr = (r >> 8) | (r >> 13); - const int tg = (g >> 3) | (g >> 9); - const int tb = (b << 3) | (b >> 2); - return qRgb(tr, tg, tb); -} - -qrgb565::operator quint16() const -{ - return data; -} - -qrgb565 qrgb565::operator+(qrgb565 v) const -{ - qrgb565 t; - t.data = data + v.data; - return t; -} - -qrgb565 qrgb565::byte_mul(quint8 a) const -{ - qrgb565 result; - result.data = ((((data & 0x07e0) >> 5) * a) & 0x07e0) | - ((((data & 0xf81f) * a) >> 5) & 0xf81f); - return result; -} - -bool qrgb565::operator==(const qrgb565 &v) const -{ - return data == v.data; -} - -class qbgr565 -{ -public: - inline qbgr565(quint16 v) - { - data = ((v & 0x001f) << 11) | - (v & 0x07e0) | - ((v & 0xf800) >> 11); - } - - inline bool operator==(const qbgr565 &v) const - { - return data == v.data; - } - -private: - quint16 data; -} Q_PACKED; - -class qrgb555; - -class qargb8555 -{ -public: - Q_STATIC_INLINE_FUNCTION bool hasAlpha() { return true; } - - qargb8555() {} - inline qargb8555(quint32 v); - inline explicit qargb8555(quint32p v); - inline qargb8555(const qargb8555 &v); - inline qargb8555(const qrgb555 &v); - - inline operator quint32() const; - - inline quint8 alpha() const { return data[0]; } - inline qargb8555 truncedAlpha() { data[0] &= 0xf8; return *this; } - Q_STATIC_INLINE_FUNCTION quint8 alpha(quint8 a) { return (a + 1) >> 3; } - Q_STATIC_INLINE_FUNCTION quint8 ialpha(quint8 a) { return 0x20 - alpha(a); } - - inline qargb8555 operator+(qargb8555 v) const; - inline qargb8555 byte_mul(quint8 a) const; - - inline bool operator==(const qargb8555 &v) const; - - inline quint32 rawValue() const; - -private: - friend class qrgb555; - quint8 data[3]; -} Q_PACKED; - -class qrgb555 -{ -public: - Q_STATIC_INLINE_FUNCTION bool hasAlpha() { return false; } - - inline qrgb555(int v = 0) : data(v) {} - - inline explicit qrgb555(quint32p v) { *this = qrgb555(quint32(v)); } - - inline explicit qrgb555(quint32 v) - { - const int r = qRed(v) << 7; - const int g = qGreen(v) << 2; - const int b = qBlue(v) >> 3; - - data = (r & 0x7c00) | (g & 0x03e0) | (b & 0x001f); - } - - inline explicit qrgb555(quint16 v) - { - data = ((v >> 1) & (0x7c00 | 0x03e0)) | - (v & 0x001f); - } - - inline explicit qrgb555(const qargb8555 &v); - - inline operator quint32() const - { - const int r = (data & 0x7c00); - const int g = (data & 0x03e0); - const int b = (data & 0x001f); - const int tr = (r >> 7) | (r >> 12); - const int tg = (g >> 2) | (g >> 7); - const int tb = (b << 3) | (b >> 2); - - return qRgb(tr, tg, tb); - } - - inline operator quint16() const - { - const int r = ((data & 0x7c00) << 1) & 0xf800; - const int g = (((data & 0x03e0) << 1) | ((data >> 4) & 0x0020)) & 0x07e0; - const int b = (data & 0x001f); - - return r | g | b; - } - - inline qrgb555 operator+(qrgb555 v) const; - inline qrgb555 byte_mul(quint8 a) const; - - inline quint8 alpha() const { return 0xff; } - inline qrgb555 truncedAlpha() { return *this; } - Q_STATIC_INLINE_FUNCTION quint8 alpha(quint8 a) { return (a + 1) >> 3; } - Q_STATIC_INLINE_FUNCTION quint8 ialpha(quint8 a) { return 0x20 - alpha(a); } - - inline bool operator==(const qrgb555 &v) const { return v.data == data; } - inline bool operator!=(const qrgb555 &v) const { return v.data != data; } - - inline quint16 rawValue() const { return data; } - -private: - friend class qargb8555; - friend class qbgr555; - quint16 data; - -} Q_PACKED; - -qrgb555::qrgb555(const qargb8555 &v) -{ - data = (v.data[2] << 8) | v.data[1]; -} - -qrgb555 qrgb555::operator+(qrgb555 v) const -{ - qrgb555 t; - t.data = data + v.data; - return t; -} - -qrgb555 qrgb555::byte_mul(quint8 a) const -{ - quint16 t = (((data & 0x3e0) * a) >> 5) & 0x03e0; - t |= (((data & 0x7c1f) * a) >> 5) & 0x7c1f; - - qrgb555 result; - result.data = t; - return result; -} - -class qbgr555 -{ -public: - inline qbgr555(quint32 v) { *this = qbgr555(qrgb555(v)); } - - inline qbgr555(qrgb555 v) - { - data = ((v.data & 0x001f) << 10) | - (v.data & 0x03e0) | - ((v.data & 0x7c00) >> 10); - } - - inline bool operator==(const qbgr555 &v) const - { - return data == v.data; - } - -private: - quint16 data; -} Q_PACKED; - -qargb8555::qargb8555(quint32 v) -{ - v = quint32p(v); - data[0] = qAlpha(v); - const int r = qRed(v); - const int g = qGreen(v); - const int b = qBlue(v); - data[1] = ((g << 2) & 0xe0) | (b >> 3); - data[2] = ((r >> 1) & 0x7c) | (g >> 6); - -} - -qargb8555::qargb8555(quint32p v) -{ - data[0] = qAlpha(v); - const int r = qRed(v); - const int g = qGreen(v); - const int b = qBlue(v); - data[1] = ((g << 2) & 0xe0) | (b >> 3); - data[2] = ((r >> 1) & 0x7c) | (g >> 6); -} - -qargb8555::qargb8555(const qargb8555 &v) -{ - data[0] = v.data[0]; - data[1] = v.data[1]; - data[2] = v.data[2]; -} - -qargb8555::qargb8555(const qrgb555 &v) -{ - data[0] = 0xff; - data[1] = v.data & 0xff; - data[2] = v.data >> 8; -} - -qargb8555::operator quint32() const -{ - const quint16 rgb = (data[2] << 8) | data[1]; - const int r = (rgb & 0x7c00); - const int g = (rgb & 0x03e0); - const int b = (rgb & 0x001f); - const int tr = (r >> 7) | (r >> 12); - const int tg = (g >> 2) | (g >> 7); - const int tb = (b << 3) | (b >> 2); - - return qRgba(tr, tg, tb, data[0]); -} - -bool qargb8555::operator==(const qargb8555 &v) const -{ - return data[0] == v.data[0] - && data[1] == v.data[1] - && data[2] == v.data[2]; -} - -quint32 qargb8555::rawValue() const -{ - return (data[2] << 16) | (data[1] << 8) | data[0]; -} - -qargb8555 qargb8555::operator+(qargb8555 v) const -{ - qargb8555 t; - t.data[0] = data[0] + v.data[0]; - const quint16 rgb = ((data[2] + v.data[2]) << 8) - + (data[1] + v.data[1]); - t.data[1] = rgb & 0xff; - t.data[2] = rgb >> 8; - return t; -} - -qargb8555 qargb8555::byte_mul(quint8 a) const -{ - qargb8555 result; - result.data[0] = (data[0] * a) >> 5; - - const quint16 x = (data[2] << 8) | data[1]; - quint16 t = (((x & 0x3e0) * a) >> 5) & 0x03e0; - t |= (((x & 0x7c1f) * a) >> 5) & 0x7c1f; - result.data[1] = t & 0xff; - result.data[2] = t >> 8; - return result; - -} - -class qrgb666; - -class qargb6666 -{ -public: - Q_STATIC_INLINE_FUNCTION bool hasAlpha() { return true; } - - inline qargb6666() {} - inline qargb6666(quint32 v) { *this = qargb6666(quint32p(v)); } - inline explicit qargb6666(quint32p v); - inline qargb6666(const qargb6666 &v); - inline qargb6666(const qrgb666 &v); - - inline operator quint32 () const; - - inline quint8 alpha() const; - inline qargb6666 truncedAlpha() { return *this; } - Q_STATIC_INLINE_FUNCTION quint8 alpha(quint8 a) { return (a + 1) >> 2; } - Q_STATIC_INLINE_FUNCTION quint8 ialpha(quint8 a) { return (255 - a + 1) >> 2; } - - inline qargb6666 byte_mul(quint8 a) const; - inline qargb6666 operator+(qargb6666 v) const; - inline bool operator==(const qargb6666 &v) const; - - inline quint32 rawValue() const; - -private: - friend class qrgb666; - quint8 data[3]; - -} Q_PACKED; - -class qrgb666 -{ -public: - Q_STATIC_INLINE_FUNCTION bool hasAlpha() { return false; } - - inline qrgb666() {} - inline qrgb666(quint32 v); - inline qrgb666(const qargb6666 &v); - - inline operator quint32 () const; - - inline quint8 alpha() const { return 0xff; } - inline qrgb666 truncedAlpha() { return *this; } - Q_STATIC_INLINE_FUNCTION quint8 alpha(quint8 a) { return (a + 1) >> 2; } - Q_STATIC_INLINE_FUNCTION quint8 ialpha(quint8 a) { return (255 - a + 1) >> 2; } - - inline qrgb666 operator+(qrgb666 v) const; - inline qrgb666 byte_mul(quint8 a) const; - - inline bool operator==(const qrgb666 &v) const; - inline bool operator!=(const qrgb666 &v) const { return !(*this == v); } - - inline quint32 rawValue() const - { - return (data[2] << 16) | (data[1] << 8) | data[0]; - } - -private: - friend class qargb6666; - - quint8 data[3]; -} Q_PACKED; - -qrgb666::qrgb666(quint32 v) -{ - const uchar b = qBlue(v); - const uchar g = qGreen(v); - const uchar r = qRed(v); - const uint p = (b >> 2) | ((g >> 2) << 6) | ((r >> 2) << 12); - data[0] = qBlue(p); - data[1] = qGreen(p); - data[2] = qRed(p); -} - -qrgb666::qrgb666(const qargb6666 &v) -{ - data[0] = v.data[0]; - data[1] = v.data[1]; - data[2] = v.data[2] & 0x03; -} - -qrgb666::operator quint32 () const -{ - const uchar r = (data[2] << 6) | ((data[1] & 0xf0) >> 2) | (data[2] & 0x3); - const uchar g = (data[1] << 4) | ((data[0] & 0xc0) >> 4) | ((data[1] & 0x0f) >> 2); - const uchar b = (data[0] << 2) | ((data[0] & 0x3f) >> 4); - return qRgb(r, g, b); -} - -qrgb666 qrgb666::operator+(qrgb666 v) const -{ - const quint32 x1 = (data[2] << 16) | (data[1] << 8) | data[0]; - const quint32 x2 = (v.data[2] << 16) | (v.data[1] << 8) | v.data[0]; - const quint32 t = x1 + x2; - qrgb666 r; - r.data[0] = t & 0xff; - r.data[1] = (t >> 8) & 0xff; - r.data[2] = (t >> 16) & 0xff; - return r; -} - -qrgb666 qrgb666::byte_mul(quint8 a) const -{ - const quint32 x = (data[2] << 16) | (data[1] << 8) | data[0]; - const quint32 t = ((((x & 0x03f03f) * a) >> 6) & 0x03f03f) | - ((((x & 0x000fc0) * a) >> 6) & 0x000fc0); - - qrgb666 r; - r.data[0] = t & 0xff; - r.data[1] = (t >> 8) & 0xff; - r.data[2] = (t >> 16) & 0xff; - return r; -} - -bool qrgb666::operator==(const qrgb666 &v) const -{ - return (data[0] == v.data[0] && - data[1] == v.data[1] && - data[2] == v.data[2]); -} - -qargb6666::qargb6666(quint32p v) -{ - const quint8 b = qBlue(v) >> 2; - const quint8 g = qGreen(v) >> 2; - const quint8 r = qRed(v) >> 2; - const quint8 a = qAlpha(v) >> 2; - const uint p = (a << 18) | (r << 12) | (g << 6) | b; - data[0] = qBlue(p); - data[1] = qGreen(p); - data[2] = qRed(p); -} - -qargb6666::qargb6666(const qargb6666 &v) -{ - data[0] = v.data[0]; - data[1] = v.data[1]; - data[2] = v.data[2]; -} - -qargb6666::qargb6666(const qrgb666 &v) -{ - data[0] = v.data[0]; - data[1] = v.data[1]; - data[2] = (v.data[2] | 0xfc); -} - -qargb6666::operator quint32 () const -{ - const quint8 r = (data[2] << 6) | ((data[1] & 0xf0) >> 2) | (data[2] & 0x3); - const quint8 g = (data[1] << 4) | ((data[0] & 0xc0) >> 4) | ((data[1] & 0x0f) >> 2); - const quint8 b = (data[0] << 2) | ((data[0] & 0x3f) >> 4); - const quint8 a = (data[2] & 0xfc) | (data[2] >> 6); - return qRgba(r, g, b, a); -} - -qargb6666 qargb6666::operator+(qargb6666 v) const -{ - const quint32 x1 = (data[2] << 16) | (data[1] << 8) | data[0]; - const quint32 x2 = (v.data[2] << 16) | (v.data[1] << 8) | v.data[0]; - const quint32 t = x1 + x2; - qargb6666 r; - r.data[0] = t & 0xff; - r.data[1] = (t >> 8) & 0xff; - r.data[2] = (t >> 16) & 0xff; - return r; -} - -quint8 qargb6666::alpha() const -{ - return (data[2] & 0xfc) | (data[2] >> 6); -} - -inline qargb6666 qargb6666::byte_mul(quint8 a) const -{ - const quint32 x = (data[2] << 16) | (data[1] << 8) | data[0]; - const quint32 t = ((((x & 0x03f03f) * a) >> 6) & 0x03f03f) | - ((((x & 0xfc0fc0) * a) >> 6) & 0xfc0fc0); - - qargb6666 r; - r.data[0] = t & 0xff; - r.data[1] = (t >> 8) & 0xff; - r.data[2] = (t >> 16) & 0xff; - return r; -} - -bool qargb6666::operator==(const qargb6666 &v) const -{ - return data[0] == v.data[0] - && data[1] == v.data[1] - && data[2] == v.data[2]; -} - -quint32 qargb6666::rawValue() const -{ - return (data[2] << 16) | (data[1] << 8) | data[0]; -} - -class qrgb888 -{ -public: - Q_STATIC_INLINE_FUNCTION bool hasAlpha() { return false; } - - inline qrgb888() {} - inline qrgb888(quint32 v); - - inline operator quint32() const; - - inline quint8 alpha() const { return 0xff; } - inline qrgb888 truncedAlpha() { return *this; } - Q_STATIC_INLINE_FUNCTION quint8 alpha(quint8 a) { return a; } - Q_STATIC_INLINE_FUNCTION quint8 ialpha(quint8 a) { return 255 - a; } - - inline qrgb888 byte_mul(quint8 a) const; - inline qrgb888 operator+(qrgb888 v) const; - inline bool operator==(qrgb888 v) const; - - inline quint32 rawValue() const; - -private: - uchar data[3]; - -} Q_PACKED; - -qrgb888::qrgb888(quint32 v) -{ - data[0] = qRed(v); - data[1] = qGreen(v); - data[2] = qBlue(v); -} - -qrgb888::operator quint32() const -{ - return qRgb(data[0], data[1], data[2]); -} - -qrgb888 qrgb888::operator+(qrgb888 v) const -{ - qrgb888 t = *this; - t.data[0] += v.data[0]; - t.data[1] += v.data[1]; - t.data[2] += v.data[2]; - return t; -} - -qrgb888 qrgb888::byte_mul(quint8 a) const -{ - quint32 x(*this); - - quint32 t = (x & 0xff00ff) * a; - t = (t + ((t >> 8) & 0xff00ff) + 0x800080) >> 8; - t &= 0xff00ff; - - x = ((x >> 8) & 0xff00ff) * a; - x = (x + ((x >> 8) & 0xff00ff) + 0x800080); - x &= 0xff00ff00; - x |= t; - return qrgb888(x); -} - -bool qrgb888::operator==(qrgb888 v) const -{ - return (data[0] == v.data[0] && - data[1] == v.data[1] && - data[2] == v.data[2]); -} - -quint32 qrgb888::rawValue() const -{ - return (data[2] << 16) | (data[1] << 8) | data[0]; -} - -template <> -inline qrgb888 qt_colorConvert(quint32 color, qrgb888 dummy) -{ - Q_UNUSED(dummy); - return qrgb888(color); -} - -template <> -inline quint32 qt_colorConvert(qrgb888 color, quint32 dummy) -{ - Q_UNUSED(dummy); - return quint32(color); -} - -// hw: endianess?? -class quint24 -{ -public: - inline quint24(quint32 v) - { - data[0] = qBlue(v); - data[1] = qGreen(v); - data[2] = qRed(v); - } - - inline operator quint32 () - { - return qRgb(data[2], data[1], data[0]); - } - - inline bool operator==(const quint24 &v) const - { - return data[0] == v.data[0] - && data[1] == v.data[1] - && data[2] == v.data[2]; - } - -private: +struct quint24 { + quint24(uint value); + operator uint() const; uchar data[3]; } Q_PACKED; -template <> -inline quint24 qt_colorConvert(quint32 color, quint24 dummy) +inline quint24::quint24(uint value) { - Q_UNUSED(dummy); - return quint24(color); + data[0] = uchar(value); + data[1] = uchar(value >> 8); + data[2] = uchar(value >> 16); } -// hw: endianess?? -class quint18 +inline quint24::operator uint() const { -public: - inline quint18(quint32 v) - { - uchar b = qBlue(v); - uchar g = qGreen(v); - uchar r = qRed(v); - uint p = (b >> 2) | ((g >> 2) << 6) | ((r >> 2) << 12); - data[0] = qBlue(p); - data[1] = qGreen(p); - data[2] = qRed(p); - } - - inline operator quint32 () - { - const uchar r = (data[2] << 6) | ((data[1] & 0xf0) >> 2) | (data[2] & 0x3); - const uchar g = (data[1] << 4) | ((data[0] & 0xc0) >> 4) | ((data[1] & 0x0f) >> 2); - const uchar b = (data[0] << 2) | ((data[0] & 0x3f) >> 4); - return qRgb(r, g, b); - } - -private: - uchar data[3]; -} Q_PACKED; - -template <> -inline quint18 qt_colorConvert(quint32 color, quint18 dummy) -{ - Q_UNUSED(dummy); - return quint18(color); -} - -class qrgb444; - -class qargb4444 -{ -public: - Q_STATIC_INLINE_FUNCTION bool hasAlpha() { return true; } - - inline qargb4444() {} - inline qargb4444(quint32 v) { *this = qargb4444(quint32p(v)); } - inline explicit qargb4444(quint32p v); - inline qargb4444(const qrgb444 &v); - - inline operator quint32() const; - inline operator quint8() const; - - inline qargb4444 operator+(qargb4444 v) const; - - inline quint8 alpha() const { return ((data & 0xf000) >> 8) | ((data & 0xf000) >> 12); } - inline qargb4444 truncedAlpha() { return *this; } - Q_STATIC_INLINE_FUNCTION quint8 alpha(quint8 a) { return (a + 1) >> 4; } - Q_STATIC_INLINE_FUNCTION quint8 ialpha(quint8 a) { return 0x10 - alpha(a); } - inline qargb4444 byte_mul(quint8 a) const; - - inline bool operator==(const qargb4444 &v) const { return data == v.data; } - - inline quint16 rawValue() const { return data; } - -private: - friend class qrgb444; - quint16 data; - -} Q_PACKED; - -class qrgb444 -{ -public: - Q_STATIC_INLINE_FUNCTION bool hasAlpha() { return false; } - - inline qrgb444() {} - inline qrgb444(quint32 v); - inline explicit qrgb444(qargb4444 v); - - inline operator quint32() const; - inline operator quint8() const; - - inline qrgb444 operator+(qrgb444 v) const; - inline quint8 alpha() const { return 0xff; } - inline qrgb444 truncedAlpha() { return *this; } - Q_STATIC_INLINE_FUNCTION quint8 alpha(quint8 a) { return (a + 1) >> 4; } - Q_STATIC_INLINE_FUNCTION quint8 ialpha(quint8 a) { return 0x10 - alpha(a); } - inline qrgb444 byte_mul(quint8 a) const; - - inline bool operator==(const qrgb444 &v) const { return data == v.data; } - inline bool operator!=(const qrgb444 &v) const { return data != v.data; } - - inline quint16 rawValue() const { return data; } - -private: - friend class qargb4444; - quint16 data; - -} Q_PACKED; - - -qargb4444::qargb4444(quint32p color) -{ - quint32 v = color; - v &= 0xf0f0f0f0; - const int a = qAlpha(v) << 8; - const int r = qRed(v) << 4; - const int g = qGreen(v); - const int b = qBlue(v) >> 4; - - data = a | r | g | b; -} - -qargb4444::qargb4444(const qrgb444 &v) -{ - data = v.data | 0xf000; -} - -qargb4444::operator quint32() const -{ - const int a = (data & 0xf000); - const int r = (data & 0x0f00); - const int g = (data & 0x00f0); - const int b = (data & 0x000f); - const int ta = (a >> 8) | (a >> 12); - const int tr = (r >> 4) | (r >> 8); - const int tg = g | (g >> 4); - const int tb = (b << 4) | b; - - return qRgba(tr, tg, tb, ta); -} - -qargb4444::operator quint8() const -{ - // hw: optimize! - return qt_colorConvert(operator quint32(), 0); -} - -qargb4444 qargb4444::operator+(qargb4444 v) const -{ - qargb4444 t; - t.data = data + v.data; - return t; -} - -qargb4444 qargb4444::byte_mul(quint8 a) const -{ - quint16 t = (((data & 0xf0f0) * a) >> 4) & 0xf0f0; - t |= (((data & 0x0f0f) * a) >> 4) & 0x0f0f; - - qargb4444 result; - result.data = t; - return result; -} - -qrgb444::qrgb444(quint32 v) -{ - v &= 0xf0f0f0f0; - const int r = qRed(v) << 4; - const int g = qGreen(v); - const int b = qBlue(v) >> 4; - - data = r | g | b; -} - -qrgb444::qrgb444(qargb4444 v) -{ - data = v.data & 0x0fff; -} - -qrgb444::operator quint32() const -{ - const int r = (data & 0x0f00); - const int g = (data & 0x00f0); - const int b = (data & 0x000f); - const int tr = (r >> 4) | (r >> 8); - const int tg = g | (g >> 4); - const int tb = (b << 4) | b; - - return qRgb(tr, tg, tb); -} - -qrgb444::operator quint8() const -{ - // hw: optimize! - return qt_colorConvert(operator quint32(), 0); -} - -qrgb444 qrgb444::operator+(qrgb444 v) const -{ - qrgb444 t; - t.data = data + v.data; - return t; -} - -qrgb444 qrgb444::byte_mul(quint8 a) const -{ - quint16 t = (((data & 0xf0f0) * a) >> 4) & 0xf0f0; - t |= (((data & 0x0f0f) * a) >> 4) & 0x0f0f; - - qrgb444 result; - result.data = t; - return result; + return data[0] | (data[1] << 8) | (data[2] << 16); } template @@ -1769,156 +732,6 @@ inline void qt_rectfill(T *dest, T value, } } -template -inline void qt_memconvert(DST *dest, const SRC *src, int count) -{ - if (sizeof(DST) == 1) { - while (count) { - int n = 1; - const SRC color = *src++; - const DST dstColor = qt_colorConvert(color, 0); - while (--count && (*src == color || dstColor == qt_colorConvert(*src, 0))) { - ++n; - ++src; - } - qt_memfill(dest, dstColor, n); - dest += n; - } - } else { - /* Duff's device */ - int n = (count + 7) / 8; - switch (count & 0x07) - { - case 0: do { *dest++ = qt_colorConvert(*src++, 0); - case 7: *dest++ = qt_colorConvert(*src++, 0); - case 6: *dest++ = qt_colorConvert(*src++, 0); - case 5: *dest++ = qt_colorConvert(*src++, 0); - case 4: *dest++ = qt_colorConvert(*src++, 0); - case 3: *dest++ = qt_colorConvert(*src++, 0); - case 2: *dest++ = qt_colorConvert(*src++, 0); - case 1: *dest++ = qt_colorConvert(*src++, 0); - } while (--n > 0); - } - } -} - -#define QT_TRIVIAL_MEMCONVERT_IMPL(T) \ - template <> \ - inline void qt_memconvert(T *dest, const T *src, int count) \ - { \ - memcpy(dest, src, count * sizeof(T)); \ - } -QT_TRIVIAL_MEMCONVERT_IMPL(quint32) -QT_TRIVIAL_MEMCONVERT_IMPL(qrgb888) -QT_TRIVIAL_MEMCONVERT_IMPL(qargb6666) -QT_TRIVIAL_MEMCONVERT_IMPL(qrgb666) -QT_TRIVIAL_MEMCONVERT_IMPL(quint16) -QT_TRIVIAL_MEMCONVERT_IMPL(qrgb565) -QT_TRIVIAL_MEMCONVERT_IMPL(qargb8565) -QT_TRIVIAL_MEMCONVERT_IMPL(qargb8555) -QT_TRIVIAL_MEMCONVERT_IMPL(qrgb555) -QT_TRIVIAL_MEMCONVERT_IMPL(qargb4444) -QT_TRIVIAL_MEMCONVERT_IMPL(qrgb444) -#undef QT_TRIVIAL_MEMCONVERT_IMPL - -#if Q_BYTE_ORDER == Q_LITTLE_ENDIAN -template <> -inline void qt_memconvert(qrgb666 *dest, const quint32 *src, int count) -{ - if (count < 3) { - switch (count) { - case 2: *dest++ = qrgb666(*src++); - case 1: *dest = qrgb666(*src); - } - return; - } - - const int align = (quintptr(dest) & 3); - switch (align) { - case 1: *dest++ = qrgb666(*src++); --count; - case 2: *dest++ = qrgb666(*src++); --count; - case 3: *dest++ = qrgb666(*src++); --count; - } - - quint32 *dest32 = reinterpret_cast(dest); - int sourceCount = count >> 2; - while (sourceCount--) { - dest32[0] = ((src[1] & 0x00000c00) << 20) - | ((src[1] & 0x000000fc) << 22) - | ((src[0] & 0x00fc0000) >> 6) - | ((src[0] & 0x0000fc00) >> 4) - | ((src[0] & 0x000000fc) >> 2); - dest32[1] = ((src[2] & 0x003c0000) << 10) - | ((src[2] & 0x0000fc00) << 12) - | ((src[2] & 0x000000fc) << 14) - | ((src[1] & 0x00fc0000) >> 14) - | ((src[1] & 0x0000f000) >> 12); - dest32[2] = ((src[3] & 0x00fc0000) << 2) - | ((src[3] & 0x0000fc00) << 4) - | ((src[3] & 0x000000fc) << 6) - | ((src[2] & 0x00c00000) >> 22); - dest32 += 3; - src += 4; - } - - dest = reinterpret_cast(dest32); - switch (count & 3) { - case 3: *dest++ = qrgb666(*src++); - case 2: *dest++ = qrgb666(*src++); - case 1: *dest = qrgb666(*src); - } -} -#endif // Q_BYTE_ORDER - -template -inline void qt_rectcopy(T *dest, const T *src, - int x, int y, int width, int height, - int dstStride, int srcStride) -{ - char *d = (char*)(dest + x) + y * dstStride; - const char *s = (char*)(src); - for (int i = 0; i < height; ++i) { - ::memcpy(d, s, width * sizeof(T)); - d += dstStride; - s += srcStride; - } -} - -template -inline void qt_rectconvert(DST *dest, const SRC *src, - int x, int y, int width, int height, - int dstStride, int srcStride) -{ - char *d = (char*)(dest + x) + y * dstStride; - const char *s = (char*)(src); - for (int i = 0; i < height; ++i) { - qt_memconvert((DST*)d, (const SRC*)s, width); - d += dstStride; - s += srcStride; - } -} - -#define QT_RECTCONVERT_TRIVIAL_IMPL(T) \ - template <> \ - inline void qt_rectconvert(T *dest, const T *src, \ - int x, int y, int width, int height, \ - int dstStride, int srcStride) \ - { \ - qt_rectcopy(dest, src, x, y, width, height, dstStride, srcStride); \ - } -QT_RECTCONVERT_TRIVIAL_IMPL(quint32) -QT_RECTCONVERT_TRIVIAL_IMPL(qrgb888) -QT_RECTCONVERT_TRIVIAL_IMPL(qargb6666) -QT_RECTCONVERT_TRIVIAL_IMPL(qrgb666) -QT_RECTCONVERT_TRIVIAL_IMPL(qrgb565) -QT_RECTCONVERT_TRIVIAL_IMPL(qargb8565) -QT_RECTCONVERT_TRIVIAL_IMPL(quint16) -QT_RECTCONVERT_TRIVIAL_IMPL(qargb8555) -QT_RECTCONVERT_TRIVIAL_IMPL(qrgb555) -QT_RECTCONVERT_TRIVIAL_IMPL(qargb4444) -QT_RECTCONVERT_TRIVIAL_IMPL(qrgb444) -#undef QT_RECTCONVERT_TRIVIAL_IMPL - #define QT_MEMFILL_UINT(dest, length, color) \ qt_memfill(dest, color, length); @@ -2137,6 +950,162 @@ void QT_FASTCALL rasterop_solid_NotSource(uint *dest, int length, uint color, ui void QT_FASTCALL rasterop_solid_NotSourceAndDestination(uint *dest, int length, uint color, uint const_alpha); void QT_FASTCALL rasterop_solid_SourceAndNotDestination(uint *dest, int length, uint color, uint const_alpha); + +struct QPixelLayout; +typedef const uint *(QT_FASTCALL *ConvertFunc)(uint *buffer, const uint *src, int count, + const QPixelLayout *layout, const QRgb *clut); + +struct QPixelLayout +{ + // Bits per pixel + enum BPP { + BPPNone, + BPP1MSB, + BPP1LSB, + BPP8, + BPP16, + BPP24, + BPP32, + BPPCount + }; + + // All numbers in bits. + uchar redWidth; + uchar redShift; + uchar greenWidth; + uchar greenShift; + uchar blueWidth; + uchar blueShift; + uchar alphaWidth; + uchar alphaShift; + bool premultiplied; + BPP bpp; + ConvertFunc convertToARGB32PM; + ConvertFunc convertFromARGB32PM; +}; + +template +uint fetchPixel(const uchar *src, int index); + +template <> +inline uint QT_FASTCALL fetchPixel(const uchar *src, int index) +{ + return (src[index >> 3] >> (index & 7)) & 1; +} + +template <> +inline uint QT_FASTCALL fetchPixel(const uchar *src, int index) +{ + return (src[index >> 3] >> (~index & 7)) & 1; +} + +template <> +inline uint QT_FASTCALL fetchPixel(const uchar *src, int index) +{ + return src[index]; +} + +template <> +inline uint QT_FASTCALL fetchPixel(const uchar *src, int index) +{ + return reinterpret_cast(src)[index]; +} + +template <> +inline uint QT_FASTCALL fetchPixel(const uchar *src, int index) +{ + return reinterpret_cast(src)[index]; +} + +template <> +inline uint QT_FASTCALL fetchPixel(const uchar *src, int index) +{ + return reinterpret_cast(src)[index]; +} + +template +inline const uint *QT_FASTCALL fetchPixels(uint *buffer, const uchar *src, int index, int count) +{ + for (int i = 0; i < count; ++i) + buffer[i] = fetchPixel(src, index + i); + return buffer; +} + +template <> +inline const uint *QT_FASTCALL fetchPixels(uint *, const uchar *src, int index, int) +{ + return reinterpret_cast(src) + index; +} + +typedef const uint *(QT_FASTCALL *FetchPixelsFunc)(uint *buffer, const uchar *src, int index, int count); + + +template +void storePixel(uchar *dest, int index, uint pixel); + +template <> +inline void QT_FASTCALL storePixel(uchar *dest, int index, uint pixel) +{ + if (pixel) + dest[index >> 3] |= 1 << (index & 7); + else + dest[index >> 3] &= ~(1 << (index & 7)); +} + +template <> +inline void QT_FASTCALL storePixel(uchar *dest, int index, uint pixel) +{ + if (pixel) + dest[index >> 3] |= 1 << (~index & 7); + else + dest[index >> 3] &= ~(1 << (~index & 7)); +} + +template <> +inline void QT_FASTCALL storePixel(uchar *dest, int index, uint pixel) +{ + dest[index] = uchar(pixel); +} + +template <> +inline void QT_FASTCALL storePixel(uchar *dest, int index, uint pixel) +{ + reinterpret_cast(dest)[index] = quint16(pixel); +} + +template <> +inline void QT_FASTCALL storePixel(uchar *dest, int index, uint pixel) +{ + reinterpret_cast(dest)[index] = quint24(pixel); +} + +template <> +inline void QT_FASTCALL storePixel(uchar *dest, int index, uint pixel) +{ + reinterpret_cast(dest)[index] = pixel; +} + +template +inline void QT_FASTCALL storePixels(uchar *dest, const uint *src, int index, int count) +{ + for (int i = 0; i < count; ++i) + storePixel(dest, index + i, src[i]); +} + +template <> +inline void QT_FASTCALL storePixels(uchar *dest, const uint *src, int index, int count) +{ + memcpy(reinterpret_cast(dest) + index, src, count * sizeof(uint)); +} + +typedef void (QT_FASTCALL *StorePixelsFunc)(uchar *dest, const uint *src, int index, int count); + +extern QPixelLayout qPixelLayouts[QImage::NImageFormats]; +extern FetchPixelsFunc qFetchPixels[QPixelLayout::BPPCount]; +extern StorePixelsFunc qStorePixels[QPixelLayout::BPPCount]; + + + QT_END_NAMESPACE #endif // QDRAWHELPER_P_H diff --git a/src/gui/painting/qdrawhelper_sse2.cpp b/src/gui/painting/qdrawhelper_sse2.cpp index 17b249a2350..7b57d5c5e26 100644 --- a/src/gui/painting/qdrawhelper_sse2.cpp +++ b/src/gui/painting/qdrawhelper_sse2.cpp @@ -459,7 +459,7 @@ void qt_bitmapblit16_sse2(QRasterBuffer *rasterBuffer, int x, int y, quint32 color, const uchar *src, int width, int height, int stride) { - const quint16 c = qt_colorConvert(color, 0); + const quint16 c = qConvertRgb32To16(color); quint16 *dest = reinterpret_cast(rasterBuffer->scanLine(y)) + x; const int destStride = rasterBuffer->bytesPerLine() / sizeof(quint16); @@ -629,8 +629,9 @@ void qt_scale_image_argb32_on_argb32_sse2(uchar *destPixels, int dbpl, int x = 0; ALIGNMENT_PROLOGUE_16BYTES(dst, x, w) { - uint s = src[(srcx + x*ix) >> 16]; + uint s = src[srcx >> 16]; dst[x] = s + BYTE_MUL(dst[x], qAlpha(~s)); + srcx += ix; } __m128i srcxVector = _mm_set_epi32(srcx, srcx + ix, srcx + ix + ix, srcx + ix + ix + ix); @@ -646,7 +647,7 @@ void qt_scale_image_argb32_on_argb32_sse2(uchar *destPixels, int dbpl, } for (; x> 16]; + uint s = src[(basex + x*ix) >> 16]; dst[x] = s + BYTE_MUL(dst[x], qAlpha(~s)); } dst = (quint32 *)(((uchar *) dst) + dbpl); diff --git a/src/gui/painting/qdrawhelper_sse_p.h b/src/gui/painting/qdrawhelper_sse_p.h index 81a5001fb3a..494ee70fcba 100644 --- a/src/gui/painting/qdrawhelper_sse_p.h +++ b/src/gui/painting/qdrawhelper_sse_p.h @@ -127,7 +127,7 @@ inline void qt_bitmapblit16_sse_template(QRasterBuffer *rasterBuffer, const uchar *src, int width, int height, int stride) { - const quint16 c = qt_colorConvert(color, 0); + const quint16 c = qConvertRgb32To16(color); quint16 *dest = reinterpret_cast(rasterBuffer->scanLine(y)) + x; const int destStride = rasterBuffer->bytesPerLine() / sizeof(quint16); diff --git a/src/gui/painting/qmemrotate.cpp b/src/gui/painting/qmemrotate.cpp index 5d027b669b8..e6fcc3e5ddb 100644 --- a/src/gui/painting/qmemrotate.cpp +++ b/src/gui/painting/qmemrotate.cpp @@ -53,36 +53,36 @@ static const int tileSize = 32; #endif #endif -template -Q_STATIC_TEMPLATE_FUNCTION inline void qt_memrotate90_cachedRead(const SRC *src, int w, int h, - int sstride, - DST *dest, int dstride) +template +Q_STATIC_TEMPLATE_FUNCTION +inline void qt_memrotate90_cachedRead(const T *src, int w, int h, int sstride, T *dest, + int dstride) { const char *s = reinterpret_cast(src); char *d = reinterpret_cast(dest); for (int y = 0; y < h; ++y) { for (int x = w - 1; x >= 0; --x) { - DST *destline = reinterpret_cast(d + (w - x - 1) * dstride); - destline[y] = qt_colorConvert(src[x], 0); + T *destline = reinterpret_cast(d + (w - x - 1) * dstride); + destline[y] = src[x]; } s += sstride; - src = reinterpret_cast(s); + src = reinterpret_cast(s); } } -template -Q_STATIC_TEMPLATE_FUNCTION inline void qt_memrotate270_cachedRead(const SRC *src, int w, int h, - int sstride, - DST *dest, int dstride) +template +Q_STATIC_TEMPLATE_FUNCTION +inline void qt_memrotate270_cachedRead(const T *src, int w, int h, int sstride, T *dest, + int dstride) { const char *s = reinterpret_cast(src); char *d = reinterpret_cast(dest); s += (h - 1) * sstride; for (int y = h - 1; y >= 0; --y) { - src = reinterpret_cast(s); + src = reinterpret_cast(s); for (int x = 0; x < w; ++x) { - DST *destline = reinterpret_cast(d + x * dstride); - destline[h - y - 1] = qt_colorConvert(src[x], 0); + T *destline = reinterpret_cast(d + x * dstride); + destline[h - y - 1] = src[x]; } s -= sstride; } @@ -90,29 +90,29 @@ Q_STATIC_TEMPLATE_FUNCTION inline void qt_memrotate270_cachedRead(const SRC *src #if QT_ROTATION_ALGORITHM == QT_ROTATION_CACHEDWRITE -template -Q_STATIC_TEMPLATE_FUNCTION inline void qt_memrotate90_cachedWrite(const SRC *src, int w, int h, - int sstride, - DST *dest, int dstride) +template +Q_STATIC_TEMPLATE_FUNCTION +inline void qt_memrotate90_cachedWrite(const T *src, int w, int h, int sstride, T *dest, + int dstride) { for (int x = w - 1; x >= 0; --x) { - DST *d = dest + (w - x - 1) * dstride; + T *d = dest + (w - x - 1) * dstride; for (int y = 0; y < h; ++y) { - *d++ = qt_colorConvert(src[y * sstride + x], 0); + *d++ = src[y * sstride + x]; } } } -template -Q_STATIC_TEMPLATE_FUNCTION inline void qt_memrotate270_cachedWrite(const SRC *src, int w, int h, - int sstride, - DST *dest, int dstride) +template +Q_STATIC_TEMPLATE_FUNCTION +inline void qt_memrotate270_cachedWrite(const T *src, int w, int h, int sstride, T *dest, + int dstride) { for (int x = 0; x < w; ++x) { - DST *d = dest + x * dstride; + T *d = dest + x * dstride; for (int y = h - 1; y >= 0; --y) { - *d++ = qt_colorConvert(src[y * sstride + x], 0); + *d++ = src[y * sstride + x]; } } } @@ -123,23 +123,21 @@ Q_STATIC_TEMPLATE_FUNCTION inline void qt_memrotate270_cachedWrite(const SRC *sr // TODO: packing algorithms should probably be modified on 64-bit architectures -template -Q_STATIC_TEMPLATE_FUNCTION inline void qt_memrotate90_packing(const SRC *src, int w, int h, - int sstride, - DST *dest, int dstride) +template +Q_STATIC_TEMPLATE_FUNCTION +inline void qt_memrotate90_packing(const T *src, int w, int h, int sstride, T *dest, int dstride) { - sstride /= sizeof(SRC); - dstride /= sizeof(DST); + sstride /= sizeof(T); + dstride /= sizeof(T); - const int pack = sizeof(quint32) / sizeof(DST); - const int unaligned = int((long(dest) & (sizeof(quint32)-1))) / sizeof(DST); + const int pack = sizeof(quint32) / sizeof(T); + const int unaligned = int((long(dest) & (sizeof(quint32)-1))) / sizeof(T); for (int x = w - 1; x >= 0; --x) { int y = 0; for (int i = 0; i < unaligned; ++i) { - dest[(w - x - 1) * dstride + y] - = qt_colorConvert(src[y * sstride + x], 0); + dest[(w - x - 1) * dstride + y] = src[y * sstride + x]; ++y; } @@ -147,40 +145,36 @@ Q_STATIC_TEMPLATE_FUNCTION inline void qt_memrotate90_packing(const SRC *src, in + unaligned); const int rest = (h - unaligned) % pack; while (y < h - rest) { - quint32 c = qt_colorConvert(src[y * sstride + x], 0); + quint32 c = src[y * sstride + x]; for (int i = 1; i < pack; ++i) { - c |= qt_colorConvert(src[(y + i) * sstride + x], 0) - << (sizeof(int) * 8 / pack * i); + c |= src[(y + i) * sstride + x] << (sizeof(int) * 8 / pack * i); } *d++ = c; y += pack; } while (y < h) { - dest[(w - x - 1) * dstride + y] - = qt_colorConvert(src[y * sstride + x], 0); + dest[(w - x - 1) * dstride + y] = src[y * sstride + x]; ++y; } } } -template -Q_STATIC_TEMPLATE_FUNCTION inline void qt_memrotate270_packing(const SRC *src, int w, int h, - int sstride, - DST *dest, int dstride) +template +Q_STATIC_TEMPLATE_FUNCTION +inline void qt_memrotate270_packing(const T *src, int w, int h, int sstride, T *dest, int dstride) { - sstride /= sizeof(SRC); - dstride /= sizeof(DST); + sstride /= sizeof(T); + dstride /= sizeof(T); - const int pack = sizeof(quint32) / sizeof(DST); - const int unaligned = int((long(dest) & (sizeof(quint32)-1))) / sizeof(DST); + const int pack = sizeof(quint32) / sizeof(T); + const int unaligned = int((long(dest) & (sizeof(quint32)-1))) / sizeof(T); for (int x = 0; x < w; ++x) { int y = h - 1; for (int i = 0; i < unaligned; ++i) { - dest[x * dstride + h - y - 1] - = qt_colorConvert(src[y * sstride + x], 0); + dest[x * dstride + h - y - 1] = src[y * sstride + x]; --y; } @@ -188,17 +182,15 @@ Q_STATIC_TEMPLATE_FUNCTION inline void qt_memrotate270_packing(const SRC *src, i + unaligned); const int rest = (h - unaligned) % pack; while (y > rest) { - quint32 c = qt_colorConvert(src[y * sstride + x], 0); + quint32 c = src[y * sstride + x]; for (int i = 1; i < pack; ++i) { - c |= qt_colorConvert(src[(y - i) * sstride + x], 0) - << (sizeof(int) * 8 / pack * i); + c |= src[(y - i) * sstride + x] << (sizeof(int) * 8 / pack * i); } *d++ = c; y -= pack; } while (y >= 0) { - dest[x * dstride + h - y - 1] - = qt_colorConvert(src[y * sstride + x], 0); + dest[x * dstride + h - y - 1] = src[y * sstride + x]; --y; } } @@ -207,17 +199,16 @@ Q_STATIC_TEMPLATE_FUNCTION inline void qt_memrotate270_packing(const SRC *src, i #endif // QT_ROTATION_PACKING #if QT_ROTATION_ALGORITHM == QT_ROTATION_TILED -template -Q_STATIC_TEMPLATE_FUNCTION inline void qt_memrotate90_tiled(const SRC *src, int w, int h, - int sstride, - DST *dest, int dstride) +template +Q_STATIC_TEMPLATE_FUNCTION +inline void qt_memrotate90_tiled(const T *src, int w, int h, int sstride, T *dest, int dstride) { - sstride /= sizeof(SRC); - dstride /= sizeof(DST); + sstride /= sizeof(T); + dstride /= sizeof(T); - const int pack = sizeof(quint32) / sizeof(DST); + const int pack = sizeof(quint32) / sizeof(T); const int unaligned = - qMin(uint((quintptr(dest) & (sizeof(quint32)-1)) / sizeof(DST)), uint(h)); + qMin(uint((quintptr(dest) & (sizeof(quint32)-1)) / sizeof(T)), uint(h)); const int restX = w % tileSize; const int restY = (h - unaligned) % tileSize; const int unoptimizedY = restY % pack; @@ -230,9 +221,9 @@ Q_STATIC_TEMPLATE_FUNCTION inline void qt_memrotate90_tiled(const SRC *src, int if (unaligned) { for (int x = startx; x >= stopx; --x) { - DST *d = dest + (w - x - 1) * dstride; + T *d = dest + (w - x - 1) * dstride; for (int y = 0; y < unaligned; ++y) { - *d++ = qt_colorConvert(src[y * sstride + x], 0); + *d++ = src[y * sstride + x]; } } } @@ -244,10 +235,10 @@ Q_STATIC_TEMPLATE_FUNCTION inline void qt_memrotate90_tiled(const SRC *src, int for (int x = startx; x >= stopx; --x) { quint32 *d = reinterpret_cast(dest + (w - x - 1) * dstride + starty); for (int y = starty; y < stopy; y += pack) { - quint32 c = qt_colorConvert(src[y * sstride + x], 0); + quint32 c = src[y * sstride + x]; for (int i = 1; i < pack; ++i) { const int shift = (sizeof(int) * 8 / pack * i); - const DST color = qt_colorConvert(src[(y + i) * sstride + x], 0); + const T color = src[(y + i) * sstride + x]; c |= color << shift; } *d++ = c; @@ -258,19 +249,19 @@ Q_STATIC_TEMPLATE_FUNCTION inline void qt_memrotate90_tiled(const SRC *src, int if (unoptimizedY) { const int starty = h - unoptimizedY; for (int x = startx; x >= stopx; --x) { - DST *d = dest + (w - x - 1) * dstride + starty; + T *d = dest + (w - x - 1) * dstride + starty; for (int y = starty; y < h; ++y) { - *d++ = qt_colorConvert(src[y * sstride + x], 0); + *d++ = src[y * sstride + x]; } } } } } -template -Q_STATIC_TEMPLATE_FUNCTION inline void qt_memrotate90_tiled_unpacked(const SRC *src, int w, int h, - int sstride, - DST *dest, int dstride) +template +Q_STATIC_TEMPLATE_FUNCTION +inline void qt_memrotate90_tiled_unpacked(const T *src, int w, int h, int sstride, T *dest, + int dstride) { const int numTilesX = (w + tileSize - 1) / tileSize; const int numTilesY = (h + tileSize - 1) / tileSize; @@ -284,10 +275,10 @@ Q_STATIC_TEMPLATE_FUNCTION inline void qt_memrotate90_tiled_unpacked(const SRC * const int stopy = qMin(starty + tileSize, h); for (int x = startx; x >= stopx; --x) { - DST *d = (DST*)((char*)dest + (w - x - 1) * dstride) + starty; + T *d = (T *)((char*)dest + (w - x - 1) * dstride) + starty; const char *s = (const char*)(src + x) + starty * sstride; for (int y = starty; y < stopy; ++y) { - *d++ = qt_colorConvert(*(const SRC*)(s), 0); + *d++ = *(const T *)(s); s += sstride; } } @@ -295,17 +286,16 @@ Q_STATIC_TEMPLATE_FUNCTION inline void qt_memrotate90_tiled_unpacked(const SRC * } } -template -Q_STATIC_TEMPLATE_FUNCTION inline void qt_memrotate270_tiled(const SRC *src, int w, int h, - int sstride, - DST *dest, int dstride) +template +Q_STATIC_TEMPLATE_FUNCTION +inline void qt_memrotate270_tiled(const T *src, int w, int h, int sstride, T *dest, int dstride) { - sstride /= sizeof(SRC); - dstride /= sizeof(DST); + sstride /= sizeof(T); + dstride /= sizeof(T); - const int pack = sizeof(quint32) / sizeof(DST); + const int pack = sizeof(quint32) / sizeof(T); const int unaligned = - qMin(uint((long(dest) & (sizeof(quint32)-1)) / sizeof(DST)), uint(h)); + qMin(uint((long(dest) & (sizeof(quint32)-1)) / sizeof(T)), uint(h)); const int restX = w % tileSize; const int restY = (h - unaligned) % tileSize; const int unoptimizedY = restY % pack; @@ -318,9 +308,9 @@ Q_STATIC_TEMPLATE_FUNCTION inline void qt_memrotate270_tiled(const SRC *src, int if (unaligned) { for (int x = startx; x < stopx; ++x) { - DST *d = dest + x * dstride; + T *d = dest + x * dstride; for (int y = h - 1; y >= h - unaligned; --y) { - *d++ = qt_colorConvert(src[y * sstride + x], 0); + *d++ = src[y * sstride + x]; } } } @@ -333,10 +323,10 @@ Q_STATIC_TEMPLATE_FUNCTION inline void qt_memrotate270_tiled(const SRC *src, int quint32 *d = reinterpret_cast(dest + x * dstride + h - 1 - starty); for (int y = starty; y > stopy; y -= pack) { - quint32 c = qt_colorConvert(src[y * sstride + x], 0); + quint32 c = src[y * sstride + x]; for (int i = 1; i < pack; ++i) { const int shift = (sizeof(int) * 8 / pack * i); - const DST color = qt_colorConvert(src[(y - i) * sstride + x], 0); + const T color = src[(y - i) * sstride + x]; c |= color << shift; } *d++ = c; @@ -346,19 +336,19 @@ Q_STATIC_TEMPLATE_FUNCTION inline void qt_memrotate270_tiled(const SRC *src, int if (unoptimizedY) { const int starty = unoptimizedY - 1; for (int x = startx; x < stopx; ++x) { - DST *d = dest + x * dstride + h - 1 - starty; + T *d = dest + x * dstride + h - 1 - starty; for (int y = starty; y >= 0; --y) { - *d++ = qt_colorConvert(src[y * sstride + x], 0); + *d++ = src[y * sstride + x]; } } } } } -template -Q_STATIC_TEMPLATE_FUNCTION inline void qt_memrotate270_tiled_unpacked(const SRC *src, int w, int h, - int sstride, - DST *dest, int dstride) +template +Q_STATIC_TEMPLATE_FUNCTION +inline void qt_memrotate270_tiled_unpacked(const T *src, int w, int h, int sstride, T *dest, + int dstride) { const int numTilesX = (w + tileSize - 1) / tileSize; const int numTilesY = (h + tileSize - 1) / tileSize; @@ -372,10 +362,10 @@ Q_STATIC_TEMPLATE_FUNCTION inline void qt_memrotate270_tiled_unpacked(const SRC const int stopy = qMax(starty - tileSize, 0); for (int x = startx; x < stopx; ++x) { - DST *d = (DST*)((char*)dest + x * dstride) + h - 1 - starty; + T *d = (T*)((char*)dest + x * dstride) + h - 1 - starty; const char *s = (const char*)(src + x) + starty * sstride; for (int y = starty; y >= stopy; --y) { - *d++ = qt_colorConvert(*(const SRC*)s, 0); + *d++ = *(const T*)s; s -= sstride; } } @@ -385,214 +375,112 @@ Q_STATIC_TEMPLATE_FUNCTION inline void qt_memrotate270_tiled_unpacked(const SRC #endif // QT_ROTATION_ALGORITHM -template -Q_STATIC_TEMPLATE_FUNCTION inline void qt_memrotate90_template(const SRC *src, - int srcWidth, int srcHeight, int srcStride, - DST *dest, int dstStride) +template +Q_STATIC_TEMPLATE_FUNCTION +inline void qt_memrotate90_template(const T *src, int srcWidth, int srcHeight, int srcStride, + T *dest, int dstStride) { #if QT_ROTATION_ALGORITHM == QT_ROTATION_CACHEDREAD - qt_memrotate90_cachedRead(src, srcWidth, srcHeight, srcStride, - dest, dstStride); + qt_memrotate90_cachedRead(src, srcWidth, srcHeight, srcStride, dest, dstStride); #elif QT_ROTATION_ALGORITHM == QT_ROTATION_CACHEDWRITE - qt_memrotate90_cachedWrite(src, srcWidth, srcHeight, srcStride, - dest, dstStride); + qt_memrotate90_cachedWrite(src, srcWidth, srcHeight, srcStride, dest, dstStride); #elif QT_ROTATION_ALGORITHM == QT_ROTATION_PACKING - qt_memrotate90_packing(src, srcWidth, srcHeight, srcStride, - dest, dstStride); + qt_memrotate90_packing(src, srcWidth, srcHeight, srcStride, dest, dstStride); #elif QT_ROTATION_ALGORITHM == QT_ROTATION_TILED - qt_memrotate90_tiled(src, srcWidth, srcHeight, srcStride, - dest, dstStride); + qt_memrotate90_tiled(src, srcWidth, srcHeight, srcStride, dest, dstStride); #endif } -template -Q_STATIC_TEMPLATE_FUNCTION inline void qt_memrotate180_template(const SRC *src, - int w, int h, int sstride, - DST *dest, int dstride) +template +Q_STATIC_TEMPLATE_FUNCTION +inline void qt_memrotate180_template(const T *src, int w, int h, int sstride, T *dest, int dstride) { const char *s = (const char*)(src) + (h - 1) * sstride; for (int y = h - 1; y >= 0; --y) { - DST *d = reinterpret_cast((char *)(dest) + (h - y - 1) * dstride); - src = reinterpret_cast(s); + T *d = reinterpret_cast((char *)(dest) + (h - y - 1) * dstride); + src = reinterpret_cast(s); for (int x = w - 1; x >= 0; --x) { - d[w - x - 1] = qt_colorConvert(src[x], 0); + d[w - x - 1] = src[x]; } s -= sstride; } } -template -Q_STATIC_TEMPLATE_FUNCTION inline void qt_memrotate270_template(const SRC *src, - int srcWidth, int srcHeight, int srcStride, - DST *dest, int dstStride) +template +Q_STATIC_TEMPLATE_FUNCTION +inline void qt_memrotate270_template(const T *src, int srcWidth, int srcHeight, int srcStride, + T *dest, int dstStride) { #if QT_ROTATION_ALGORITHM == QT_ROTATION_CACHEDREAD - qt_memrotate270_cachedRead(src, srcWidth, srcHeight, srcStride, - dest, dstStride); + qt_memrotate270_cachedRead(src, srcWidth, srcHeight, srcStride, dest, dstStride); #elif QT_ROTATION_ALGORITHM == QT_ROTATION_CACHEDWRITE - qt_memrotate270_cachedWrite(src, srcWidth, srcHeight, srcStride, - dest, dstStride); + qt_memrotate270_cachedWrite(src, srcWidth, srcHeight, srcStride, dest, dstStride); #elif QT_ROTATION_ALGORITHM == QT_ROTATION_PACKING - qt_memrotate270_packing(src, srcWidth, srcHeight, srcStride, - dest, dstStride); + qt_memrotate270_packing(src, srcWidth, srcHeight, srcStride, dest, dstStride); #elif QT_ROTATION_ALGORITHM == QT_ROTATION_TILED - qt_memrotate270_tiled_unpacked(src, srcWidth, srcHeight, - srcStride, - dest, dstStride); + qt_memrotate270_tiled_unpacked(src, srcWidth, srcHeight, srcStride, dest, dstStride); #endif } template <> Q_STATIC_TEMPLATE_SPECIALIZATION -inline void qt_memrotate90_template(const quint24 *src, - int srcWidth, int srcHeight, int srcStride, - quint24 *dest, int dstStride) +inline void qt_memrotate90_template(const quint24 *src, int srcWidth, int srcHeight, + int srcStride, quint24 *dest, int dstStride) { #if QT_ROTATION_ALGORITHM == QT_ROTATION_CACHEDREAD - qt_memrotate90_cachedRead(src, srcWidth, srcHeight, - srcStride, dest, dstStride); + qt_memrotate90_cachedRead(src, srcWidth, srcHeight, srcStride, dest, dstStride); #elif QT_ROTATION_ALGORITHM == QT_ROTATION_CACHEDWRITE - qt_memrotate90_cachedWrite(src, srcWidth, srcHeight, - srcStride, dest, dstStride); + qt_memrotate90_cachedWrite(src, srcWidth, srcHeight, srcStride, dest, dstStride); #elif QT_ROTATION_ALGORITHM == QT_ROTATION_PACKING // packed algorithm not implemented - qt_memrotate90_cachedRead(src, srcWidth, srcHeight, - srcStride, dest, dstStride); + qt_memrotate90_cachedRead(src, srcWidth, srcHeight, srcStride, dest, dstStride); #elif QT_ROTATION_ALGORITHM == QT_ROTATION_TILED // packed algorithm not implemented - qt_memrotate90_tiled_unpacked(src, srcWidth, srcHeight, - srcStride, dest, dstStride); + qt_memrotate90_tiled_unpacked(src, srcWidth, srcHeight, srcStride, dest, dstStride); #endif } -template <> -Q_STATIC_TEMPLATE_SPECIALIZATION -inline void qt_memrotate90_template(const quint32 *src, - int srcWidth, int srcHeight, int srcStride, - quint24 *dest, int dstStride) -{ -#if QT_ROTATION_ALGORITHM == QT_ROTATION_CACHEDREAD - qt_memrotate90_cachedRead(src, srcWidth, srcHeight, - srcStride, dest, dstStride); -#elif QT_ROTATION_ALGORITHM == QT_ROTATION_CACHEDWRITE - qt_memrotate90_cachedWrite(src, srcWidth, srcHeight, - srcStride, dest, dstStride); -#elif QT_ROTATION_ALGORITHM == QT_ROTATION_PACKING - // packed algorithm not implemented - qt_memrotate90_cachedRead(src, srcWidth, srcHeight, - srcStride, dest, dstStride); -#elif QT_ROTATION_ALGORITHM == QT_ROTATION_TILED - // packed algorithm not implemented - qt_memrotate90_tiled_unpacked(src, srcWidth, srcHeight, - srcStride, dest, dstStride); -#endif -} - -template <> -Q_STATIC_TEMPLATE_SPECIALIZATION -inline void qt_memrotate90_template(const quint32 *src, - int srcWidth, int srcHeight, int srcStride, - quint18 *dest, int dstStride) -{ -#if QT_ROTATION_ALGORITHM == QT_ROTATION_CACHEDREAD - qt_memrotate90_cachedRead(src, srcWidth, srcHeight, - srcStride, dest, dstStride); -#elif QT_ROTATION_ALGORITHM == QT_ROTATION_CACHEDWRITE - qt_memrotate90_cachedWrite(src, srcWidth, srcHeight, - srcStride, dest, dstStride); -#elif QT_ROTATION_ALGORITHM == QT_ROTATION_PACKING - // packed algorithm not implemented - qt_memrotate90_cachedRead(src, srcWidth, srcHeight, - srcStride, dest, dstStride); -#elif QT_ROTATION_ALGORITHM == QT_ROTATION_TILED - // packed algorithm not implemented - qt_memrotate90_tiled_unpacked(src, srcWidth, srcHeight, - srcStride, dest, dstStride); -#endif -} - -#define QT_IMPL_MEMROTATE(srctype, desttype) \ -Q_GUI_EXPORT void qt_memrotate90(const srctype *src, int w, int h, int sstride, \ - desttype *dest, int dstride) \ +#define QT_IMPL_MEMROTATE(type) \ +Q_GUI_EXPORT void qt_memrotate90(const type *src, int w, int h, int sstride, \ + type *dest, int dstride) \ { \ qt_memrotate90_template(src, w, h, sstride, dest, dstride); \ } \ -Q_GUI_EXPORT void qt_memrotate180(const srctype *src, int w, int h, int sstride, \ - desttype *dest, int dstride) \ +Q_GUI_EXPORT void qt_memrotate180(const type *src, int w, int h, int sstride, \ + type *dest, int dstride) \ { \ qt_memrotate180_template(src, w, h, sstride, dest, dstride); \ } \ -Q_GUI_EXPORT void qt_memrotate270(const srctype *src, int w, int h, int sstride, \ - desttype *dest, int dstride) \ +Q_GUI_EXPORT void qt_memrotate270(const type *src, int w, int h, int sstride, \ + type *dest, int dstride) \ { \ qt_memrotate270_template(src, w, h, sstride, dest, dstride); \ } -#define QT_IMPL_SIMPLE_MEMROTATE(srctype, desttype) \ -Q_GUI_EXPORT void qt_memrotate90(const srctype *src, int w, int h, int sstride, \ - desttype *dest, int dstride) \ +#define QT_IMPL_SIMPLE_MEMROTATE(type) \ +Q_GUI_EXPORT void qt_memrotate90(const type *src, int w, int h, int sstride, \ + type *dest, int dstride) \ { \ - qt_memrotate90_tiled_unpacked(src, w, h, sstride, dest, dstride); \ + qt_memrotate90_tiled_unpacked(src, w, h, sstride, dest, dstride); \ } \ -Q_GUI_EXPORT void qt_memrotate180(const srctype *src, int w, int h, int sstride, \ - desttype *dest, int dstride) \ +Q_GUI_EXPORT void qt_memrotate180(const type *src, int w, int h, int sstride, \ + type *dest, int dstride) \ { \ qt_memrotate180_template(src, w, h, sstride, dest, dstride); \ } \ -Q_GUI_EXPORT void qt_memrotate270(const srctype *src, int w, int h, int sstride, \ - desttype *dest, int dstride) \ +Q_GUI_EXPORT void qt_memrotate270(const type *src, int w, int h, int sstride, \ + type *dest, int dstride) \ { \ - qt_memrotate270_tiled_unpacked(src, w, h, sstride, dest, dstride); \ + qt_memrotate270_tiled_unpacked(src, w, h, sstride, dest, dstride); \ } -QT_IMPL_MEMROTATE(quint32, quint32) -QT_IMPL_MEMROTATE(quint32, quint16) -QT_IMPL_MEMROTATE(quint16, quint32) -QT_IMPL_MEMROTATE(quint16, quint16) -QT_IMPL_MEMROTATE(quint24, quint24) -QT_IMPL_MEMROTATE(quint32, quint24) -QT_IMPL_MEMROTATE(quint32, quint18) -QT_IMPL_MEMROTATE(quint32, quint8) -QT_IMPL_MEMROTATE(quint16, quint8) -QT_IMPL_MEMROTATE(qrgb444, quint8) -QT_IMPL_MEMROTATE(quint8, quint8) - -#if defined(QT_QWS_ROTATE_BGR) -QT_IMPL_SIMPLE_MEMROTATE(quint16, qbgr565) -QT_IMPL_SIMPLE_MEMROTATE(quint32, qbgr565) -QT_IMPL_SIMPLE_MEMROTATE(qrgb555, qbgr555) -QT_IMPL_SIMPLE_MEMROTATE(quint32, qbgr555) -#endif - -#ifdef QT_QWS_DEPTH_GENERIC -QT_IMPL_MEMROTATE(quint32, qrgb_generic16) -QT_IMPL_MEMROTATE(quint16, qrgb_generic16) -#endif - -struct qrgb_gl_rgba -{ -public: - inline qrgb_gl_rgba(quint32 v) { - if (QSysInfo::ByteOrder == QSysInfo::LittleEndian) - data = ((v << 16) & 0xff0000) | ((v >> 16) & 0xff) | (v & 0xff00ff00); - else - data = (v << 8) | ((v >> 24) & 0xff); - } - - inline operator quint32() const { return data; } - -private: - quint32 data; -} Q_PACKED; - -void Q_GUI_EXPORT qt_memrotate90_gl(const quint32 *src, int srcWidth, int srcHeight, int srcStride, - quint32 *dest, int dstStride) -{ - qt_memrotate90_template(src, srcWidth, srcHeight, srcStride, reinterpret_cast(dest), dstStride); -} +QT_IMPL_MEMROTATE(quint32) +QT_IMPL_MEMROTATE(quint16) +QT_IMPL_MEMROTATE(quint24) +QT_IMPL_MEMROTATE(quint8) void qt_memrotate90_16(const uchar *srcPixels, int w, int h, int sbpl, uchar *destPixels, int dbpl) { diff --git a/src/gui/painting/qmemrotate_p.h b/src/gui/painting/qmemrotate_p.h index 4c4bc947677..a72310e330a 100644 --- a/src/gui/painting/qmemrotate_p.h +++ b/src/gui/painting/qmemrotate_p.h @@ -70,37 +70,15 @@ QT_BEGIN_NAMESPACE #endif #endif -#define QT_DECL_MEMROTATE(srctype, desttype) \ - void Q_GUI_EXPORT qt_memrotate90(const srctype*, int, int, int, desttype*, int); \ - void Q_GUI_EXPORT qt_memrotate180(const srctype*, int, int, int, desttype*, int); \ - void Q_GUI_EXPORT qt_memrotate270(const srctype*, int, int, int, desttype*, int) +#define QT_DECL_MEMROTATE(type) \ + void Q_GUI_EXPORT qt_memrotate90(const type*, int, int, int, type*, int); \ + void Q_GUI_EXPORT qt_memrotate180(const type*, int, int, int, type*, int); \ + void Q_GUI_EXPORT qt_memrotate270(const type*, int, int, int, type*, int) -void Q_GUI_EXPORT qt_memrotate90(const quint32*, int, int, int, quint32*, int); -void Q_GUI_EXPORT qt_memrotate180(const quint32*, int, int, int, quint32*, int); -void Q_GUI_EXPORT qt_memrotate270(const quint32*, int, int, int, quint32*, int); - -QT_DECL_MEMROTATE(quint32, quint16); -QT_DECL_MEMROTATE(quint16, quint32); -QT_DECL_MEMROTATE(quint16, quint16); -QT_DECL_MEMROTATE(quint24, quint24); -QT_DECL_MEMROTATE(quint32, quint24); -QT_DECL_MEMROTATE(quint32, quint18); -QT_DECL_MEMROTATE(quint32, quint8); -QT_DECL_MEMROTATE(quint16, quint8); -QT_DECL_MEMROTATE(qrgb444, quint8); -QT_DECL_MEMROTATE(quint8, quint8); - -#ifdef QT_QWS_ROTATE_BGR -QT_DECL_MEMROTATE(quint16, qbgr565); -QT_DECL_MEMROTATE(quint32, qbgr565); -QT_DECL_MEMROTATE(qrgb555, qbgr555); -QT_DECL_MEMROTATE(quint32, qbgr555); -#endif - -#ifdef QT_QWS_DEPTH_GENERIC -QT_DECL_MEMROTATE(quint32, qrgb_generic16); -QT_DECL_MEMROTATE(quint16, qrgb_generic16); -#endif +QT_DECL_MEMROTATE(quint32); +QT_DECL_MEMROTATE(quint16); +QT_DECL_MEMROTATE(quint24); +QT_DECL_MEMROTATE(quint8); #undef QT_DECL_MEMROTATE diff --git a/src/gui/painting/qpathsimplifier.cpp b/src/gui/painting/qpathsimplifier.cpp new file mode 100644 index 00000000000..fc3ce6361b2 --- /dev/null +++ b/src/gui/painting/qpathsimplifier.cpp @@ -0,0 +1,1673 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qpathsimplifier_p.h" + +#include +#include +#include +#include + +#include + +#include +#include + +QT_BEGIN_NAMESPACE + +#define Q_FIXED_POINT_SCALE 256 +#define Q_TRIANGULATE_END_OF_POLYGON quint32(-1) + + +namespace { + +//============================================================================// +// QPoint // +//============================================================================// + +inline bool operator < (const QPoint &a, const QPoint &b) +{ + return a.y() < b.y() || (a.y() == b.y() && a.x() < b.x()); +} + +inline bool operator > (const QPoint &a, const QPoint &b) +{ + return b < a; +} + +inline bool operator <= (const QPoint &a, const QPoint &b) +{ + return !(a > b); +} + +inline bool operator >= (const QPoint &a, const QPoint &b) +{ + return !(a < b); +} + +inline int cross(const QPoint &u, const QPoint &v) +{ + return u.x() * v.y() - u.y() * v.x(); +} + +inline int dot(const QPoint &u, const QPoint &v) +{ + return u.x() * v.x() + u.y() * v.y(); +} + +//============================================================================// +// Fraction // +//============================================================================// + +// Fraction must be in the range [0, 1) +struct Fraction +{ + bool isValid() const { return denominator != 0; } + + // numerator and denominator must not have common denominators. + unsigned int numerator, denominator; +}; + +inline unsigned int gcd(unsigned int x, unsigned int y) +{ + while (y != 0) { + unsigned int z = y; + y = x % y; + x = z; + } + return x; +} + +// Fraction must be in the range [0, 1) +// Assume input is valid. +Fraction fraction(unsigned int n, unsigned int d) { + Fraction result; + if (n == 0) { + result.numerator = 0; + result.denominator = 1; + } else { + unsigned int g = gcd(n, d); + result.numerator = n / g; + result.denominator = d / g; + } + return result; +} + +//============================================================================// +// Rational // +//============================================================================// + +struct Rational +{ + bool isValid() const { return fraction.isValid(); } + int integer; + Fraction fraction; +}; + +//============================================================================// +// IntersectionPoint // +//============================================================================// + +struct IntersectionPoint +{ + bool isValid() const { return x.fraction.isValid() && y.fraction.isValid(); } + QPoint round() const; + bool isAccurate() const { return x.fraction.numerator == 0 && y.fraction.numerator == 0; } + + Rational x; // 8:8 signed, 32/32 + Rational y; // 8:8 signed, 32/32 +}; + +QPoint IntersectionPoint::round() const +{ + QPoint result(x.integer, y.integer); + if (2 * x.fraction.numerator >= x.fraction.denominator) + ++result.rx(); + if (2 * y.fraction.numerator >= y.fraction.denominator) + ++result.ry(); + return result; +} + +// Return positive value if 'p' is to the right of the line 'v1'->'v2', negative if left of the +// line and zero if exactly on the line. +// The returned value is the z-component of the qCross product between 'v2-v1' and 'p-v1', +// which is twice the signed area of the triangle 'p'->'v1'->'v2' (positive for CW order). +inline int pointDistanceFromLine(const QPoint &p, const QPoint &v1, const QPoint &v2) +{ + return cross(v2 - v1, p - v1); +} + +IntersectionPoint intersectionPoint(const QPoint &u1, const QPoint &u2, + const QPoint &v1, const QPoint &v2) +{ + IntersectionPoint result = {{0, {0, 0}}, {0, {0, 0}}}; + + QPoint u = u2 - u1; + QPoint v = v2 - v1; + int d1 = cross(u, v1 - u1); + int d2 = cross(u, v2 - u1); + int det = d2 - d1; + int d3 = cross(v, u1 - v1); + int d4 = d3 - det; //qCross(v, u2 - v1); + + // Check that the math is correct. + Q_ASSERT(d4 == cross(v, u2 - v1)); + + // The intersection point can be expressed as: + // v1 - v * d1/det + // v2 - v * d2/det + // u1 + u * d3/det + // u2 + u * d4/det + + // I'm only interested in lines that are crossing, so ignore parallel lines even if they overlap. + if (det == 0) + return result; + + if (det < 0) { + det = -det; + d1 = -d1; + d2 = -d2; + d3 = -d3; + d4 = -d4; + } + + // I'm only interested in lines intersecting at their interior, not at their end points. + // The lines intersect at their interior if and only if 'd1 < 0', 'd2 > 0', 'd3 < 0' and 'd4 > 0'. + if (d1 >= 0 || d2 <= 0 || d3 <= 0 || d4 >= 0) + return result; + + // Calculate the intersection point as follows: + // v1 - v * d1/det | v1 <= v2 (component-wise) + // v2 - v * d2/det | v2 < v1 (component-wise) + + // Assuming 16 bits per vector component. + if (v.x() >= 0) { + result.x.integer = v1.x() + int(qint64(-v.x()) * d1 / det); + result.x.fraction = fraction((unsigned int)(qint64(-v.x()) * d1 % det), (unsigned int)det); + } else { + result.x.integer = v2.x() + int(qint64(-v.x()) * d2 / det); + result.x.fraction = fraction((unsigned int)(qint64(-v.x()) * d2 % det), (unsigned int)det); + } + + if (v.y() >= 0) { + result.y.integer = v1.y() + int(qint64(-v.y()) * d1 / det); + result.y.fraction = fraction((unsigned int)(qint64(-v.y()) * d1 % det), (unsigned int)det); + } else { + result.y.integer = v2.y() + int(qint64(-v.y()) * d2 / det); + result.y.fraction = fraction((unsigned int)(qint64(-v.y()) * d2 % det), (unsigned int)det); + } + + Q_ASSERT(result.x.fraction.isValid()); + Q_ASSERT(result.y.fraction.isValid()); + return result; +} + +//============================================================================// +// PathSimplifier // +//============================================================================// + +class PathSimplifier +{ +public: + PathSimplifier(const QVectorPath &path, QDataBuffer &vertices, + QDataBuffer &indices, const QTransform &matrix); + +private: + struct Element; + + class BoundingVolumeHierarchy + { + public: + struct Node + { + enum Type + { + Leaf, + Split + }; + Type type; + QPoint minimum; + QPoint maximum; + union { + Element *element; // type == Leaf + Node *left; // type == Split + }; + Node *right; + }; + + BoundingVolumeHierarchy(); + ~BoundingVolumeHierarchy(); + void allocate(int nodeCount); + void free(); + Node *newNode(); + + Node *root; + private: + void freeNode(Node *n); + + Node *nodeBlock; + int blockSize; + int firstFree; + }; + + struct Element + { + enum Degree + { + Line = 1, + Quadratic = 2, + Cubic = 3 + }; + + quint32 &upperIndex() { return indices[pointingUp ? degree : 0]; } + quint32 &lowerIndex() { return indices[pointingUp ? 0 : degree]; } + quint32 upperIndex() const { return indices[pointingUp ? degree : 0]; } + quint32 lowerIndex() const { return indices[pointingUp ? 0 : degree]; } + void flip(); + + QPoint middle; + quint32 indices[4]; // index to points + Element *next, *previous; // used in connectElements() + int winding; // used in connectElements() + union { + QRBTree::Node *edgeNode; // used in connectElements() + BoundingVolumeHierarchy::Node *bvhNode; + }; + Degree degree : 8; + uint processed : 1; // initially false, true when the element has been checked for intersections. + uint pointingUp : 1; // used in connectElements() + uint originallyPointingUp : 1; // used in connectElements() + }; + + class ElementAllocator + { + public: + ElementAllocator(); + ~ElementAllocator(); + void allocate(int count); + Element *newElement(); + private: + struct ElementBlock + { + ElementBlock *next; + int blockSize; + int firstFree; + Element elements[1]; + } *blocks; + }; + + struct Event + { + enum Type { Upper, Lower }; + bool operator < (const Event &other) const; + + QPoint point; + Type type; + Element *element; + }; + + typedef QRBTree::Node RBNode; + typedef BoundingVolumeHierarchy::Node BVHNode; + + void initElements(const QVectorPath &path, const QTransform &matrix); + void removeIntersections(); + void connectElements(); + void fillIndices(); + BVHNode *buildTree(Element **elements, int elementCount); + bool intersectNodes(QDataBuffer &elements, BVHNode *elementNode, BVHNode *treeNode); + bool equalElements(const Element *e1, const Element *e2); + bool splitLineAt(QDataBuffer &elements, BVHNode *node, quint32 pointIndex, bool processAgain); + void appendSeparatingAxes(QVarLengthArray &axes, Element *element); + QPair calculateSeparatingAxisRange(const QPoint &axis, Element *element); + void splitCurve(QDataBuffer &elements, BVHNode *node); + bool setElementToQuadratic(Element *element, quint32 pointIndex1, const QPoint &ctrl, quint32 pointIndex2); + bool setElementToCubic(Element *element, quint32 pointIndex1, const QPoint &ctrl1, const QPoint &ctrl2, quint32 pointIndex2); + void setElementToCubicAndSimplify(Element *element, quint32 pointIndex1, const QPoint &ctrl1, const QPoint &ctrl2, quint32 pointIndex2); + RBNode *findElementLeftOf(const Element *element, const QPair &bounds); + bool elementIsLeftOf(const Element *left, const Element *right); + QPair outerBounds(const QPoint &point); + static bool flattenQuadratic(const QPoint &u, const QPoint &v, const QPoint &w); + static bool flattenCubic(const QPoint &u, const QPoint &v, const QPoint &w, const QPoint &q); + static bool splitQuadratic(const QPoint &u, const QPoint &v, const QPoint &w, QPoint *result); + static bool splitCubic(const QPoint &u, const QPoint &v, const QPoint &w, const QPoint &q, QPoint *result); + void subDivQuadratic(const QPoint &u, const QPoint &v, const QPoint &w); + void subDivCubic(const QPoint &u, const QPoint &v, const QPoint &w, const QPoint &q); + static void sortEvents(Event *events, int count); + + ElementAllocator m_elementAllocator; + QDataBuffer m_elements; + QDataBuffer *m_points; + BoundingVolumeHierarchy m_bvh; + QDataBuffer *m_indices; + QRBTree m_elementList; + uint m_hints; +}; + +inline PathSimplifier::BoundingVolumeHierarchy::BoundingVolumeHierarchy() + : root(0) + , nodeBlock(0) + , blockSize(0) + , firstFree(0) +{ +} + +inline PathSimplifier::BoundingVolumeHierarchy::~BoundingVolumeHierarchy() +{ + free(); +} + +inline void PathSimplifier::BoundingVolumeHierarchy::allocate(int nodeCount) +{ + Q_ASSERT(nodeBlock == 0); + Q_ASSERT(firstFree == 0); + nodeBlock = new Node[blockSize = nodeCount]; +} + +inline void PathSimplifier::BoundingVolumeHierarchy::free() +{ + freeNode(root); + delete[] nodeBlock; + nodeBlock = 0; + firstFree = blockSize = 0; + root = 0; +} + +inline PathSimplifier::BVHNode *PathSimplifier::BoundingVolumeHierarchy::newNode() +{ + if (firstFree < blockSize) + return &nodeBlock[firstFree++]; + return new Node; +} + +inline void PathSimplifier::BoundingVolumeHierarchy::freeNode(Node *n) +{ + if (!n) + return; + Q_ASSERT(n->type == Node::Split || n->type == Node::Leaf); + if (n->type == Node::Split) { + freeNode(n->left); + freeNode(n->right); + } + if (!(n >= nodeBlock && n < nodeBlock + blockSize)) + delete n; +} + +inline PathSimplifier::ElementAllocator::ElementAllocator() + : blocks(0) +{ +} + +inline PathSimplifier::ElementAllocator::~ElementAllocator() +{ + while (blocks) { + ElementBlock *block = blocks; + blocks = blocks->next; + free(block); + } +} + +inline void PathSimplifier::ElementAllocator::allocate(int count) +{ + Q_ASSERT(blocks == 0); + Q_ASSERT(count > 0); + blocks = (ElementBlock *)malloc(sizeof(ElementBlock) + (count - 1) * sizeof(Element)); + blocks->blockSize = count; + blocks->next = 0; + blocks->firstFree = 0; +} + +inline PathSimplifier::Element *PathSimplifier::ElementAllocator::newElement() +{ + Q_ASSERT(blocks); + if (blocks->firstFree < blocks->blockSize) + return &blocks->elements[blocks->firstFree++]; + ElementBlock *oldBlock = blocks; + blocks = (ElementBlock *)malloc(sizeof(ElementBlock) + (oldBlock->blockSize - 1) * sizeof(Element)); + blocks->blockSize = oldBlock->blockSize; + blocks->next = oldBlock; + blocks->firstFree = 0; + return &blocks->elements[blocks->firstFree++]; +} + + +inline bool PathSimplifier::Event::operator < (const Event &other) const +{ + if (point == other.point) + return type < other.type; + return other.point < point; +} + +inline void PathSimplifier::Element::flip() +{ + for (int i = 0; i < (degree + 1) >> 1; ++i) { + Q_ASSERT(degree >= Line && degree <= Cubic); + Q_ASSERT(i >= 0 && i < degree); + qSwap(indices[i], indices[degree - i]); + } + pointingUp = !pointingUp; + Q_ASSERT(next == 0 && previous == 0); +} + +PathSimplifier::PathSimplifier(const QVectorPath &path, QDataBuffer &vertices, + QDataBuffer &indices, const QTransform &matrix) + : m_elements(0) + , m_points(&vertices) + , m_indices(&indices) +{ + m_points->reset(); + m_indices->reset(); + initElements(path, matrix); + if (!m_elements.isEmpty()) { + removeIntersections(); + connectElements(); + fillIndices(); + } +} + +void PathSimplifier::initElements(const QVectorPath &path, const QTransform &matrix) +{ + m_hints = path.hints(); + int pathElementCount = path.elementCount(); + if (pathElementCount == 0) + return; + m_elements.reserve(2 * pathElementCount); + m_elementAllocator.allocate(2 * pathElementCount); + m_points->reserve(2 * pathElementCount); + const QPainterPath::ElementType *e = path.elements(); + const qreal *p = path.points(); + if (e) { + qreal x, y; + quint32 moveToIndex = 0; + quint32 previousIndex = 0; + for (int i = 0; i < pathElementCount; ++i, ++e, p += 2) { + switch (*e) { + case QPainterPath::MoveToElement: + { + if (!m_points->isEmpty()) { + const QPoint &from = m_points->at(previousIndex); + const QPoint &to = m_points->at(moveToIndex); + if (from != to) { + Element *element = m_elementAllocator.newElement(); + element->degree = Element::Line; + element->indices[0] = previousIndex; + element->indices[1] = moveToIndex; + element->middle.rx() = (from.x() + to.x()) >> 1; + element->middle.ry() = (from.y() + to.y()) >> 1; + m_elements.add(element); + } + } + previousIndex = moveToIndex = m_points->size(); + matrix.map(p[0], p[1], &x, &y); + QPoint to(qRound(x * Q_FIXED_POINT_SCALE), qRound(y * Q_FIXED_POINT_SCALE)); + m_points->add(to); + } + break; + case QPainterPath::LineToElement: + Q_ASSERT(!m_points->isEmpty()); + { + matrix.map(p[0], p[1], &x, &y); + QPoint to(qRound(x * Q_FIXED_POINT_SCALE), qRound(y * Q_FIXED_POINT_SCALE)); + const QPoint &from = m_points->last(); + if (to != from) { + Element *element = m_elementAllocator.newElement(); + element->degree = Element::Line; + element->indices[0] = previousIndex; + element->indices[1] = quint32(m_points->size()); + element->middle.rx() = (from.x() + to.x()) >> 1; + element->middle.ry() = (from.y() + to.y()) >> 1; + m_elements.add(element); + previousIndex = m_points->size(); + m_points->add(to); + } + } + break; + case QPainterPath::CurveToElement: + Q_ASSERT(i + 2 < pathElementCount); + Q_ASSERT(!m_points->isEmpty()); + Q_ASSERT(e[1] == QPainterPath::CurveToDataElement); + Q_ASSERT(e[2] == QPainterPath::CurveToDataElement); + { + quint32 startPointIndex = previousIndex; + matrix.map(p[4], p[5], &x, &y); + QPoint end(qRound(x * Q_FIXED_POINT_SCALE), qRound(y * Q_FIXED_POINT_SCALE)); + previousIndex = m_points->size(); + m_points->add(end); + + // See if this cubic bezier is really quadratic. + qreal x1 = p[-2] + qreal(1.5) * (p[0] - p[-2]); + qreal y1 = p[-1] + qreal(1.5) * (p[1] - p[-1]); + qreal x2 = p[4] + qreal(1.5) * (p[2] - p[4]); + qreal y2 = p[5] + qreal(1.5) * (p[3] - p[5]); + + Element *element = m_elementAllocator.newElement(); + if (qAbs(x1 - x2) < qreal(1e-3) && qAbs(y1 - y2) < qreal(1e-3)) { + // The bezier curve is quadratic. + matrix.map(x1, y1, &x, &y); + QPoint ctrl(qRound(x * Q_FIXED_POINT_SCALE), + qRound(y * Q_FIXED_POINT_SCALE)); + setElementToQuadratic(element, startPointIndex, ctrl, previousIndex); + } else { + // The bezier curve is cubic. + matrix.map(p[0], p[1], &x, &y); + QPoint ctrl1(qRound(x * Q_FIXED_POINT_SCALE), + qRound(y * Q_FIXED_POINT_SCALE)); + matrix.map(p[2], p[3], &x, &y); + QPoint ctrl2(qRound(x * Q_FIXED_POINT_SCALE), + qRound(y * Q_FIXED_POINT_SCALE)); + setElementToCubicAndSimplify(element, startPointIndex, ctrl1, ctrl2, + previousIndex); + } + m_elements.add(element); + } + i += 2; + e += 2; + p += 4; + + break; + default: + Q_ASSERT_X(0, "QSGPathSimplifier::initialize", "Unexpected element type."); + break; + } + } + if (!m_points->isEmpty()) { + const QPoint &from = m_points->at(previousIndex); + const QPoint &to = m_points->at(moveToIndex); + if (from != to) { + Element *element = m_elementAllocator.newElement(); + element->degree = Element::Line; + element->indices[0] = previousIndex; + element->indices[1] = moveToIndex; + element->middle.rx() = (from.x() + to.x()) >> 1; + element->middle.ry() = (from.y() + to.y()) >> 1; + m_elements.add(element); + } + } + } else { + qreal x, y; + + for (int i = 0; i < pathElementCount; ++i, p += 2) { + matrix.map(p[0], p[1], &x, &y); + QPoint to(qRound(x * Q_FIXED_POINT_SCALE), qRound(y * Q_FIXED_POINT_SCALE)); + if (to != m_points->last()) + m_points->add(to); + } + + while (!m_points->isEmpty() && m_points->last() == m_points->first()) + m_points->pop_back(); + + if (m_points->isEmpty()) + return; + + quint32 prev = quint32(m_points->size() - 1); + for (int i = 0; i < m_points->size(); ++i) { + QPoint &to = m_points->at(i); + QPoint &from = m_points->at(prev); + Element *element = m_elementAllocator.newElement(); + element->degree = Element::Line; + element->indices[0] = prev; + element->indices[1] = quint32(i); + element->middle.rx() = (from.x() + to.x()) >> 1; + element->middle.ry() = (from.y() + to.y()) >> 1; + m_elements.add(element); + prev = i; + } + } + + for (int i = 0; i < m_elements.size(); ++i) + m_elements.at(i)->processed = false; +} + +void PathSimplifier::removeIntersections() +{ + Q_ASSERT(!m_elements.isEmpty()); + QDataBuffer elements(m_elements.size()); + for (int i = 0; i < m_elements.size(); ++i) + elements.add(m_elements.at(i)); + m_bvh.allocate(2 * m_elements.size()); + m_bvh.root = buildTree(elements.data(), elements.size()); + + elements.reset(); + for (int i = 0; i < m_elements.size(); ++i) + elements.add(m_elements.at(i)); + + while (!elements.isEmpty()) { + Element *element = elements.last(); + elements.pop_back(); + BVHNode *node = element->bvhNode; + Q_ASSERT(node->type == BVHNode::Leaf); + Q_ASSERT(node->element == element); + if (!element->processed) { + if (!intersectNodes(elements, node, m_bvh.root)) + element->processed = true; + } + } + + m_bvh.free(); // The bounding volume hierarchy is not needed anymore. +} + +void PathSimplifier::connectElements() +{ + Q_ASSERT(!m_elements.isEmpty()); + QDataBuffer events(m_elements.size() * 2); + for (int i = 0; i < m_elements.size(); ++i) { + Element *element = m_elements.at(i); + element->next = element->previous = 0; + element->winding = 0; + element->edgeNode = 0; + const QPoint &u = m_points->at(element->indices[0]); + const QPoint &v = m_points->at(element->indices[element->degree]); + if (u != v) { + element->pointingUp = element->originallyPointingUp = v < u; + + Event event; + event.element = element; + event.point = u; + event.type = element->pointingUp ? Event::Lower : Event::Upper; + events.add(event); + event.point = v; + event.type = element->pointingUp ? Event::Upper : Event::Lower; + events.add(event); + } + } + QVarLengthArray orderedElements; + if (!events.isEmpty()) + sortEvents(events.data(), events.size()); + while (!events.isEmpty()) { + const Event *event = &events.last(); + QPoint eventPoint = event->point; + + // Find all elements passing through the event point. + QPair bounds = outerBounds(eventPoint); + + // Special case: single element above and single element below event point. + int eventCount = events.size(); + if (event->type == Event::Lower && eventCount > 2) { + QPair range; + range.first = bounds.first ? m_elementList.next(bounds.first) + : m_elementList.front(m_elementList.root); + range.second = bounds.second ? m_elementList.previous(bounds.second) + : m_elementList.back(m_elementList.root); + + const Event *event2 = &events.at(eventCount - 2); + const Event *event3 = &events.at(eventCount - 3); + Q_ASSERT(event2->point == eventPoint); // There are always at least two events at a point. + if (range.first == range.second && event2->type == Event::Upper && event3->point != eventPoint) { + Element *element = event->element; + Element *element2 = event2->element; + element->edgeNode->data = event2->element; + element2->edgeNode = element->edgeNode; + element->edgeNode = 0; + + events.pop_back(); + events.pop_back(); + + if (element2->pointingUp != element->pointingUp) + element2->flip(); + element2->winding = element->winding; + int winding = element->winding; + if (element->originallyPointingUp) + ++winding; + if (winding == 0 || winding == 1) { + if (element->pointingUp) { + element->previous = event2->element; + element2->next = event->element; + } else { + element->next = event2->element; + element2->previous = event->element; + } + } + continue; + } + } + orderedElements.clear(); + + // First, find the ones above the event point. + if (m_elementList.root) { + RBNode *current = bounds.first ? m_elementList.next(bounds.first) + : m_elementList.front(m_elementList.root); + while (current != bounds.second) { + Element *element = current->data; + Q_ASSERT(element->edgeNode == current); + int winding = element->winding; + if (element->originallyPointingUp) + ++winding; + const QPoint &lower = m_points->at(element->lowerIndex()); + if (lower == eventPoint) { + if (winding == 0 || winding == 1) + orderedElements.append(current->data); + } else { + // The element is passing through 'event.point'. + Q_ASSERT(m_points->at(element->upperIndex()) != eventPoint); + Q_ASSERT(element->degree == Element::Line); + // Split the line. + Element *eventElement = event->element; + int indexIndex = (event->type == Event::Upper) == eventElement->pointingUp + ? eventElement->degree : 0; + quint32 pointIndex = eventElement->indices[indexIndex]; + Q_ASSERT(eventPoint == m_points->at(pointIndex)); + + Element *upperElement = m_elementAllocator.newElement(); + *upperElement = *element; + upperElement->lowerIndex() = element->upperIndex() = pointIndex; + upperElement->edgeNode = 0; + element->next = element->previous = 0; + if (upperElement->next) + upperElement->next->previous = upperElement; + else if (upperElement->previous) + upperElement->previous->next = upperElement; + if (element->pointingUp != element->originallyPointingUp) + element->flip(); + if (winding == 0 || winding == 1) + orderedElements.append(upperElement); + m_elements.add(upperElement); + } + current = m_elementList.next(current); + } + } + while (!events.isEmpty() && events.last().point == eventPoint) { + event = &events.last(); + if (event->type == Event::Upper) { + Q_ASSERT(event->point == m_points->at(event->element->upperIndex())); + RBNode *left = findElementLeftOf(event->element, bounds); + RBNode *node = m_elementList.newNode(); + node->data = event->element; + Q_ASSERT(event->element->edgeNode == 0); + event->element->edgeNode = node; + m_elementList.attachAfter(left, node); + } else { + Q_ASSERT(event->type == Event::Lower); + Q_ASSERT(event->point == m_points->at(event->element->lowerIndex())); + Element *element = event->element; + Q_ASSERT(element->edgeNode); + m_elementList.deleteNode(element->edgeNode); + Q_ASSERT(element->edgeNode == 0); + } + events.pop_back(); + } + + if (m_elementList.root) { + RBNode *current = bounds.first ? m_elementList.next(bounds.first) + : m_elementList.front(m_elementList.root); + int winding = bounds.first ? bounds.first->data->winding : 0; + + // Calculate winding numbers and flip elements if necessary. + while (current != bounds.second) { + Element *element = current->data; + Q_ASSERT(element->edgeNode == current); + int ccw = winding & 1; + Q_ASSERT(element->pointingUp == element->originallyPointingUp); + if (element->originallyPointingUp) { + --winding; + } else { + ++winding; + ccw ^= 1; + } + element->winding = winding; + if (ccw == 0) + element->flip(); + current = m_elementList.next(current); + } + + // Pick elements with correct winding number. + current = bounds.second ? m_elementList.previous(bounds.second) + : m_elementList.back(m_elementList.root); + while (current != bounds.first) { + Element *element = current->data; + Q_ASSERT(element->edgeNode == current); + Q_ASSERT(m_points->at(element->upperIndex()) == eventPoint); + int winding = element->winding; + if (element->originallyPointingUp) + ++winding; + if (winding == 0 || winding == 1) + orderedElements.append(current->data); + current = m_elementList.previous(current); + } + } + + if (!orderedElements.isEmpty()) { + Q_ASSERT((orderedElements.size() & 1) == 0); + int i = 0; + Element *firstElement = orderedElements.at(0); + if (m_points->at(firstElement->indices[0]) != eventPoint) { + orderedElements.append(firstElement); + i = 1; + } + for (; i < orderedElements.size(); i += 2) { + Q_ASSERT(i + 1 < orderedElements.size()); + Element *next = orderedElements.at(i); + Element *previous = orderedElements.at(i + 1); + Q_ASSERT(next->previous == 0); + Q_ASSERT(previous->next == 0); + next->previous = previous; + previous->next = next; + } + } + } +#ifndef QT_NO_DEBUG + for (int i = 0; i < m_elements.size(); ++i) { + const Element *element = m_elements.at(i); + Q_ASSERT(element->next == 0 || element->next->previous == element); + Q_ASSERT(element->previous == 0 || element->previous->next == element); + Q_ASSERT((element->next == 0) == (element->previous == 0)); + } +#endif +} + +void PathSimplifier::fillIndices() +{ + for (int i = 0; i < m_elements.size(); ++i) + m_elements.at(i)->processed = false; + for (int i = 0; i < m_elements.size(); ++i) { + Element *element = m_elements.at(i); + if (element->processed || element->next == 0) + continue; + do { + m_indices->add(element->indices[0]); + switch (element->degree) { + case Element::Quadratic: + { + QPoint pts[] = { + m_points->at(element->indices[0]), + m_points->at(element->indices[1]), + m_points->at(element->indices[2]) + }; + subDivQuadratic(pts[0], pts[1], pts[2]); + } + break; + case Element::Cubic: + { + QPoint pts[] = { + m_points->at(element->indices[0]), + m_points->at(element->indices[1]), + m_points->at(element->indices[2]), + m_points->at(element->indices[3]) + }; + subDivCubic(pts[0], pts[1], pts[2], pts[3]); + } + break; + default: + break; + } + Q_ASSERT(element->next); + element->processed = true; + element = element->next; + } while (element != m_elements.at(i)); + m_indices->add(Q_TRIANGULATE_END_OF_POLYGON); + } +} + +PathSimplifier::BVHNode *PathSimplifier::buildTree(Element **elements, int elementCount) +{ + Q_ASSERT(elementCount > 0); + BVHNode *node = m_bvh.newNode(); + if (elementCount == 1) { + Element *element = *elements; + element->bvhNode = node; + node->type = BVHNode::Leaf; + node->element = element; + node->minimum = node->maximum = m_points->at(element->indices[0]); + for (int i = 1; i <= element->degree; ++i) { + const QPoint &p = m_points->at(element->indices[i]); + node->minimum.rx() = qMin(node->minimum.x(), p.x()); + node->minimum.ry() = qMin(node->minimum.y(), p.y()); + node->maximum.rx() = qMax(node->maximum.x(), p.x()); + node->maximum.ry() = qMax(node->maximum.y(), p.y()); + } + return node; + } + + node->type = BVHNode::Split; + + QPoint minimum, maximum; + minimum = maximum = elements[0]->middle; + + for (int i = 1; i < elementCount; ++i) { + const QPoint &p = elements[i]->middle; + minimum.rx() = qMin(minimum.x(), p.x()); + minimum.ry() = qMin(minimum.y(), p.y()); + maximum.rx() = qMax(maximum.x(), p.x()); + maximum.ry() = qMax(maximum.y(), p.y()); + } + + int comp, pivot; + if (maximum.x() - minimum.x() > maximum.y() - minimum.y()) { + comp = 0; + pivot = (maximum.x() + minimum.x()) >> 1; + } else { + comp = 1; + pivot = (maximum.y() + minimum.y()) >> 1; + } + + int lo = 0; + int hi = elementCount - 1; + while (lo < hi) { + while (lo < hi && (&elements[lo]->middle.rx())[comp] <= pivot) + ++lo; + while (lo < hi && (&elements[hi]->middle.rx())[comp] > pivot) + --hi; + if (lo < hi) + qSwap(elements[lo], elements[hi]); + } + + if (lo == elementCount) { + // All points are the same. + Q_ASSERT(minimum.x() == maximum.x() && minimum.y() == maximum.y()); + lo = elementCount >> 1; + } + + node->left = buildTree(elements, lo); + node->right = buildTree(elements + lo, elementCount - lo); + + const BVHNode *left = node->left; + const BVHNode *right = node->right; + node->minimum.rx() = qMin(left->minimum.x(), right->minimum.x()); + node->minimum.ry() = qMin(left->minimum.y(), right->minimum.y()); + node->maximum.rx() = qMax(left->maximum.x(), right->maximum.x()); + node->maximum.ry() = qMax(left->maximum.y(), right->maximum.y()); + + return node; +} + +bool PathSimplifier::intersectNodes(QDataBuffer &elements, BVHNode *elementNode, + BVHNode *treeNode) +{ + if (elementNode->minimum.x() >= treeNode->maximum.x() + || elementNode->minimum.y() >= treeNode->maximum.y() + || elementNode->maximum.x() <= treeNode->minimum.x() + || elementNode->maximum.y() <= treeNode->minimum.y()) + { + return false; + } + + Q_ASSERT(elementNode->type == BVHNode::Leaf); + Element *element = elementNode->element; + Q_ASSERT(!element->processed); + + if (treeNode->type == BVHNode::Leaf) { + Element *nodeElement = treeNode->element; + if (!nodeElement->processed) + return false; + + if (treeNode->element == elementNode->element) + return false; + + if (equalElements(treeNode->element, elementNode->element)) + return false; // element doesn't split itself. + + if (element->degree == Element::Line && nodeElement->degree == Element::Line) { + const QPoint &u1 = m_points->at(element->indices[0]); + const QPoint &u2 = m_points->at(element->indices[1]); + const QPoint &v1 = m_points->at(nodeElement->indices[0]); + const QPoint &v2 = m_points->at(nodeElement->indices[1]); + IntersectionPoint intersection = intersectionPoint(u1, u2, v1, v2); + if (!intersection.isValid()) + return false; + + Q_ASSERT(intersection.x.integer >= qMin(u1.x(), u2.x())); + Q_ASSERT(intersection.y.integer >= qMin(u1.y(), u2.y())); + Q_ASSERT(intersection.x.integer >= qMin(v1.x(), v2.x())); + Q_ASSERT(intersection.y.integer >= qMin(v1.y(), v2.y())); + + Q_ASSERT(intersection.x.integer <= qMax(u1.x(), u2.x())); + Q_ASSERT(intersection.y.integer <= qMax(u1.y(), u2.y())); + Q_ASSERT(intersection.x.integer <= qMax(v1.x(), v2.x())); + Q_ASSERT(intersection.y.integer <= qMax(v1.y(), v2.y())); + + m_points->add(intersection.round()); + splitLineAt(elements, treeNode, m_points->size() - 1, !intersection.isAccurate()); + return splitLineAt(elements, elementNode, m_points->size() - 1, false); + } else { + QVarLengthArray axes; + appendSeparatingAxes(axes, elementNode->element); + appendSeparatingAxes(axes, treeNode->element); + for (int i = 0; i < axes.size(); ++i) { + QPair range1 = calculateSeparatingAxisRange(axes.at(i), elementNode->element); + QPair range2 = calculateSeparatingAxisRange(axes.at(i), treeNode->element); + if (range1.first >= range2.second || range1.second <= range2.first) { + return false; // Separating axis found. + } + } + // Bounding areas overlap. + if (nodeElement->degree > Element::Line) + splitCurve(elements, treeNode); + if (element->degree > Element::Line) { + splitCurve(elements, elementNode); + } else { + // The element was not split, so it can be processed further. + if (intersectNodes(elements, elementNode, treeNode->left)) + return true; + if (intersectNodes(elements, elementNode, treeNode->right)) + return true; + return false; + } + return true; + } + } else { + if (intersectNodes(elements, elementNode, treeNode->left)) + return true; + if (intersectNodes(elements, elementNode, treeNode->right)) + return true; + return false; + } +} + +bool PathSimplifier::equalElements(const Element *e1, const Element *e2) +{ + Q_ASSERT(e1 != e2); + if (e1->degree != e2->degree) + return false; + + // Possibly equal and in the same direction. + bool equalSame = true; + for (int i = 0; i <= e1->degree; ++i) + equalSame &= m_points->at(e1->indices[i]) == m_points->at(e2->indices[i]); + + // Possibly equal and in opposite directions. + bool equalOpposite = true; + for (int i = 0; i <= e1->degree; ++i) + equalOpposite &= m_points->at(e1->indices[e1->degree - i]) == m_points->at(e2->indices[i]); + + return equalSame || equalOpposite; +} + +bool PathSimplifier::splitLineAt(QDataBuffer &elements, BVHNode *node, + quint32 pointIndex, bool processAgain) +{ + Q_ASSERT(node->type == BVHNode::Leaf); + Element *element = node->element; + Q_ASSERT(element->degree == Element::Line); + const QPoint &u = m_points->at(element->indices[0]); + const QPoint &v = m_points->at(element->indices[1]); + const QPoint &p = m_points->at(pointIndex); + if (u == p || v == p) + return false; // No split needed. + + if (processAgain) + element->processed = false; // Needs to be processed again. + + Element *first = node->element; + Element *second = m_elementAllocator.newElement(); + *second = *first; + first->indices[1] = second->indices[0] = pointIndex; + first->middle.rx() = (u.x() + p.x()) >> 1; + first->middle.ry() = (u.y() + p.y()) >> 1; + second->middle.rx() = (v.x() + p.x()) >> 1; + second->middle.ry() = (v.y() + p.y()) >> 1; + m_elements.add(second); + + BVHNode *left = m_bvh.newNode(); + BVHNode *right = m_bvh.newNode(); + left->type = right->type = BVHNode::Leaf; + left->element = first; + right->element = second; + left->minimum = right->minimum = node->minimum; + left->maximum = right->maximum = node->maximum; + if (u.x() < v.x()) + left->maximum.rx() = right->minimum.rx() = p.x(); + else + left->minimum.rx() = right->maximum.rx() = p.x(); + if (u.y() < v.y()) + left->maximum.ry() = right->minimum.ry() = p.y(); + else + left->minimum.ry() = right->maximum.ry() = p.y(); + left->element->bvhNode = left; + right->element->bvhNode = right; + + node->type = BVHNode::Split; + node->left = left; + node->right = right; + + if (!first->processed) { + elements.add(left->element); + elements.add(right->element); + } + return true; +} + +void PathSimplifier::appendSeparatingAxes(QVarLengthArray &axes, Element *element) +{ + switch (element->degree) { + case Element::Cubic: + { + const QPoint &u = m_points->at(element->indices[0]); + const QPoint &v = m_points->at(element->indices[1]); + const QPoint &w = m_points->at(element->indices[2]); + const QPoint &q = m_points->at(element->indices[3]); + QPoint ns[] = { + QPoint(u.y() - v.y(), v.x() - u.x()), + QPoint(v.y() - w.y(), w.x() - v.x()), + QPoint(w.y() - q.y(), q.x() - w.x()), + QPoint(q.y() - u.y(), u.x() - q.x()), + QPoint(u.y() - w.y(), w.x() - u.x()), + QPoint(v.y() - q.y(), q.x() - v.x()) + }; + for (int i = 0; i < 6; ++i) { + if (ns[i].x() || ns[i].y()) + axes.append(ns[i]); + } + } + break; + case Element::Quadratic: + { + const QPoint &u = m_points->at(element->indices[0]); + const QPoint &v = m_points->at(element->indices[1]); + const QPoint &w = m_points->at(element->indices[2]); + QPoint ns[] = { + QPoint(u.y() - v.y(), v.x() - u.x()), + QPoint(v.y() - w.y(), w.x() - v.x()), + QPoint(w.y() - u.y(), u.x() - w.x()) + }; + for (int i = 0; i < 3; ++i) { + if (ns[i].x() || ns[i].y()) + axes.append(ns[i]); + } + } + break; + case Element::Line: + { + const QPoint &u = m_points->at(element->indices[0]); + const QPoint &v = m_points->at(element->indices[1]); + QPoint n(u.y() - v.y(), v.x() - u.x()); + if (n.x() || n.y()) + axes.append(n); + } + break; + default: + Q_ASSERT_X(0, "QSGPathSimplifier::appendSeparatingAxes", "Unexpected element type."); + break; + } +} + +QPair PathSimplifier::calculateSeparatingAxisRange(const QPoint &axis, Element *element) +{ + QPair range(0x7fffffff, -0x7fffffff); + for (int i = 0; i <= element->degree; ++i) { + const QPoint &p = m_points->at(element->indices[i]); + int dist = dot(axis, p); + range.first = qMin(range.first, dist); + range.second = qMax(range.second, dist); + } + return range; +} + +void PathSimplifier::splitCurve(QDataBuffer &elements, BVHNode *node) +{ + Q_ASSERT(node->type == BVHNode::Leaf); + + Element *first = node->element; + Element *second = m_elementAllocator.newElement(); + *second = *first; + m_elements.add(second); + Q_ASSERT(first->degree > Element::Line); + + bool accurate = true; + const QPoint &u = m_points->at(first->indices[0]); + const QPoint &v = m_points->at(first->indices[1]); + const QPoint &w = m_points->at(first->indices[2]); + + if (first->degree == Element::Quadratic) { + QPoint pts[3]; + accurate = splitQuadratic(u, v, w, pts); + int pointIndex = m_points->size(); + m_points->add(pts[1]); + accurate &= setElementToQuadratic(first, first->indices[0], pts[0], pointIndex); + accurate &= setElementToQuadratic(second, pointIndex, pts[2], second->indices[2]); + } else { + Q_ASSERT(first->degree == Element::Cubic); + const QPoint &q = m_points->at(first->indices[3]); + QPoint pts[5]; + accurate = splitCubic(u, v, w, q, pts); + int pointIndex = m_points->size(); + m_points->add(pts[2]); + accurate &= setElementToCubic(first, first->indices[0], pts[0], pts[1], pointIndex); + accurate &= setElementToCubic(second, pointIndex, pts[3], pts[4], second->indices[3]); + } + + if (!accurate) + first->processed = second->processed = false; // Needs to be processed again. + + BVHNode *left = m_bvh.newNode(); + BVHNode *right = m_bvh.newNode(); + left->type = right->type = BVHNode::Leaf; + left->element = first; + right->element = second; + + left->minimum.rx() = left->minimum.ry() = right->minimum.rx() = right->minimum.ry() = INT_MAX; + left->maximum.rx() = left->maximum.ry() = right->maximum.rx() = right->maximum.ry() = INT_MIN; + + for (int i = 0; i <= first->degree; ++i) { + QPoint &p = m_points->at(first->indices[i]); + left->minimum.rx() = qMin(left->minimum.x(), p.x()); + left->minimum.ry() = qMin(left->minimum.y(), p.y()); + left->maximum.rx() = qMax(left->maximum.x(), p.x()); + left->maximum.ry() = qMax(left->maximum.y(), p.y()); + } + for (int i = 0; i <= second->degree; ++i) { + QPoint &p = m_points->at(second->indices[i]); + right->minimum.rx() = qMin(right->minimum.x(), p.x()); + right->minimum.ry() = qMin(right->minimum.y(), p.y()); + right->maximum.rx() = qMax(right->maximum.x(), p.x()); + right->maximum.ry() = qMax(right->maximum.y(), p.y()); + } + left->element->bvhNode = left; + right->element->bvhNode = right; + + node->type = BVHNode::Split; + node->left = left; + node->right = right; + + if (!first->processed) { + elements.add(left->element); + elements.add(right->element); + } +} + +bool PathSimplifier::setElementToQuadratic(Element *element, quint32 pointIndex1, + const QPoint &ctrl, quint32 pointIndex2) +{ + const QPoint &p1 = m_points->at(pointIndex1); + const QPoint &p2 = m_points->at(pointIndex2); + if (flattenQuadratic(p1, ctrl, p2)) { + // Insert line. + element->degree = Element::Line; + element->indices[0] = pointIndex1; + element->indices[1] = pointIndex2; + element->middle.rx() = (p1.x() + p2.x()) >> 1; + element->middle.ry() = (p1.y() + p2.y()) >> 1; + return false; + } else { + // Insert bezier. + element->degree = Element::Quadratic; + element->indices[0] = pointIndex1; + element->indices[1] = m_points->size(); + element->indices[2] = pointIndex2; + element->middle.rx() = (p1.x() + ctrl.x() + p2.x()) / 3; + element->middle.ry() = (p1.y() + ctrl.y() + p2.y()) / 3; + m_points->add(ctrl); + return true; + } +} + +bool PathSimplifier::setElementToCubic(Element *element, quint32 pointIndex1, const QPoint &v, + const QPoint &w, quint32 pointIndex2) +{ + const QPoint &u = m_points->at(pointIndex1); + const QPoint &q = m_points->at(pointIndex2); + if (flattenCubic(u, v, w, q)) { + // Insert line. + element->degree = Element::Line; + element->indices[0] = pointIndex1; + element->indices[1] = pointIndex2; + element->middle.rx() = (u.x() + q.x()) >> 1; + element->middle.ry() = (u.y() + q.y()) >> 1; + return false; + } else { + // Insert bezier. + element->degree = Element::Cubic; + element->indices[0] = pointIndex1; + element->indices[1] = m_points->size(); + element->indices[2] = m_points->size() + 1; + element->indices[3] = pointIndex2; + element->middle.rx() = (u.x() + v.x() + w.x() + q.x()) >> 2; + element->middle.ry() = (u.y() + v.y() + w.y() + q.y()) >> 2; + m_points->add(v); + m_points->add(w); + return true; + } +} + +void PathSimplifier::setElementToCubicAndSimplify(Element *element, quint32 pointIndex1, + const QPoint &v, const QPoint &w, + quint32 pointIndex2) +{ + const QPoint &u = m_points->at(pointIndex1); + const QPoint &q = m_points->at(pointIndex2); + if (flattenCubic(u, v, w, q)) { + // Insert line. + element->degree = Element::Line; + element->indices[0] = pointIndex1; + element->indices[1] = pointIndex2; + element->middle.rx() = (u.x() + q.x()) >> 1; + element->middle.ry() = (u.y() + q.y()) >> 1; + return; + } + + bool intersecting = (u == q) || intersectionPoint(u, v, w, q).isValid(); + if (!intersecting) { + // Insert bezier. + element->degree = Element::Cubic; + element->indices[0] = pointIndex1; + element->indices[1] = m_points->size(); + element->indices[2] = m_points->size() + 1; + element->indices[3] = pointIndex2; + element->middle.rx() = (u.x() + v.x() + w.x() + q.x()) >> 2; + element->middle.ry() = (u.y() + v.y() + w.y() + q.y()) >> 2; + m_points->add(v); + m_points->add(w); + return; + } + + QPoint pts[5]; + splitCubic(u, v, w, q, pts); + int pointIndex = m_points->size(); + m_points->add(pts[2]); + Element *element2 = m_elementAllocator.newElement(); + m_elements.add(element2); + setElementToCubicAndSimplify(element, pointIndex1, pts[0], pts[1], pointIndex); + setElementToCubicAndSimplify(element2, pointIndex, pts[3], pts[4], pointIndex2); +} + +PathSimplifier::RBNode *PathSimplifier::findElementLeftOf(const Element *element, + const QPair &bounds) +{ + if (!m_elementList.root) + return 0; + RBNode *current = bounds.first; + Q_ASSERT(!current || !elementIsLeftOf(element, current->data)); + if (!current) + current = m_elementList.front(m_elementList.root); + Q_ASSERT(current); + RBNode *result = 0; + while (current != bounds.second && !elementIsLeftOf(element, current->data)) { + result = current; + current = m_elementList.next(current); + } + return result; +} + +bool PathSimplifier::elementIsLeftOf(const Element *left, const Element *right) +{ + const QPoint &leftU = m_points->at(left->upperIndex()); + const QPoint &leftL = m_points->at(left->lowerIndex()); + const QPoint &rightU = m_points->at(right->upperIndex()); + const QPoint &rightL = m_points->at(right->lowerIndex()); + Q_ASSERT(leftL >= rightU && rightL >= leftU); + if (leftU.x() < qMin(rightL.x(), rightU.x())) + return true; + if (leftU.x() > qMax(rightL.x(), rightU.x())) + return false; + int d = pointDistanceFromLine(leftU, rightL, rightU); + // d < 0: left, d > 0: right, d == 0: on top + if (d == 0) { + d = pointDistanceFromLine(leftL, rightL, rightU); + if (d == 0) { + if (right->degree > Element::Line) { + d = pointDistanceFromLine(leftL, rightL, m_points->at(right->indices[1])); + if (d == 0) + d = pointDistanceFromLine(leftL, rightL, m_points->at(right->indices[2])); + } else if (left->degree > Element::Line) { + d = pointDistanceFromLine(m_points->at(left->indices[1]), rightL, rightU); + if (d == 0) + d = pointDistanceFromLine(m_points->at(left->indices[2]), rightL, rightU); + } + } + } + return d < 0; +} + +QPair PathSimplifier::outerBounds(const QPoint &point) +{ + RBNode *current = m_elementList.root; + QPair result(0, 0); + + while (current) { + const Element *element = current->data; + Q_ASSERT(element->edgeNode == current); + const QPoint &v1 = m_points->at(element->lowerIndex()); + const QPoint &v2 = m_points->at(element->upperIndex()); + Q_ASSERT(point >= v2 && point <= v1); + if (point == v1 || point == v2) + break; + int d = pointDistanceFromLine(point, v1, v2); + if (d == 0) { + if (element->degree == Element::Line) + break; + d = pointDistanceFromLine(point, v1, m_points->at(element->indices[1])); + if (d == 0) + d = pointDistanceFromLine(point, v1, m_points->at(element->indices[2])); + Q_ASSERT(d != 0); + } + if (d < 0) { + result.second = current; + current = current->left; + } else { + result.first = current; + current = current->right; + } + } + + if (!current) + return result; + + RBNode *mid = current; + + current = mid->left; + while (current) { + const Element *element = current->data; + Q_ASSERT(element->edgeNode == current); + const QPoint &v1 = m_points->at(element->lowerIndex()); + const QPoint &v2 = m_points->at(element->upperIndex()); + Q_ASSERT(point >= v2 && point <= v1); + bool equal = (point == v1 || point == v2); + if (!equal) { + int d = pointDistanceFromLine(point, v1, v2); + Q_ASSERT(d >= 0); + equal = (d == 0 && element->degree == Element::Line); + } + if (equal) { + current = current->left; + } else { + result.first = current; + current = current->right; + } + } + + current = mid->right; + while (current) { + const Element *element = current->data; + Q_ASSERT(element->edgeNode == current); + const QPoint &v1 = m_points->at(element->lowerIndex()); + const QPoint &v2 = m_points->at(element->upperIndex()); + Q_ASSERT(point >= v2 && point <= v1); + bool equal = (point == v1 || point == v2); + if (!equal) { + int d = pointDistanceFromLine(point, v1, v2); + Q_ASSERT(d <= 0); + equal = (d == 0 && element->degree == Element::Line); + } + if (equal) { + current = current->right; + } else { + result.second = current; + current = current->left; + } + } + + return result; +} + +inline bool PathSimplifier::flattenQuadratic(const QPoint &u, const QPoint &v, const QPoint &w) +{ + QPoint deltas[2] = { v - u, w - v }; + int d = qAbs(cross(deltas[0], deltas[1])); + int l = qAbs(deltas[0].x()) + qAbs(deltas[0].y()) + qAbs(deltas[1].x()) + qAbs(deltas[1].y()); + return d < (Q_FIXED_POINT_SCALE * Q_FIXED_POINT_SCALE * 3 / 2) || l <= Q_FIXED_POINT_SCALE * 2; +} + +inline bool PathSimplifier::flattenCubic(const QPoint &u, const QPoint &v, + const QPoint &w, const QPoint &q) +{ + QPoint deltas[] = { v - u, w - v, q - w, q - u }; + int d = qAbs(cross(deltas[0], deltas[1])) + qAbs(cross(deltas[1], deltas[2])) + + qAbs(cross(deltas[0], deltas[3])) + qAbs(cross(deltas[3], deltas[2])); + int l = qAbs(deltas[0].x()) + qAbs(deltas[0].y()) + qAbs(deltas[1].x()) + qAbs(deltas[1].y()) + + qAbs(deltas[2].x()) + qAbs(deltas[2].y()); + return d < (Q_FIXED_POINT_SCALE * Q_FIXED_POINT_SCALE * 3) || l <= Q_FIXED_POINT_SCALE * 2; +} + +inline bool PathSimplifier::splitQuadratic(const QPoint &u, const QPoint &v, + const QPoint &w, QPoint *result) +{ + result[0] = u + v; + result[2] = v + w; + result[1] = result[0] + result[2]; + bool accurate = ((result[0].x() | result[0].y() | result[2].x() | result[2].y()) & 1) == 0 + && ((result[1].x() | result[1].y()) & 3) == 0; + result[0].rx() >>= 1; + result[0].ry() >>= 1; + result[1].rx() >>= 2; + result[1].ry() >>= 2; + result[2].rx() >>= 1; + result[2].ry() >>= 1; + return accurate; +} + +inline bool PathSimplifier::splitCubic(const QPoint &u, const QPoint &v, + const QPoint &w, const QPoint &q, QPoint *result) +{ + result[0] = u + v; + result[2] = v + w; + result[4] = w + q; + result[1] = result[0] + result[2]; + result[3] = result[2] + result[4]; + result[2] = result[1] + result[3]; + bool accurate = ((result[0].x() | result[0].y() | result[4].x() | result[4].y()) & 1) == 0 + && ((result[1].x() | result[1].y() | result[3].x() | result[3].y()) & 3) == 0 + && ((result[2].x() | result[2].y()) & 7) == 0; + result[0].rx() >>= 1; + result[0].ry() >>= 1; + result[1].rx() >>= 2; + result[1].ry() >>= 2; + result[2].rx() >>= 3; + result[2].ry() >>= 3; + result[3].rx() >>= 2; + result[3].ry() >>= 2; + result[4].rx() >>= 1; + result[4].ry() >>= 1; + return accurate; +} + +inline void PathSimplifier::subDivQuadratic(const QPoint &u, const QPoint &v, const QPoint &w) +{ + if (flattenQuadratic(u, v, w)) + return; + QPoint pts[3]; + splitQuadratic(u, v, w, pts); + subDivQuadratic(u, pts[0], pts[1]); + m_indices->add(m_points->size()); + m_points->add(pts[1]); + subDivQuadratic(pts[1], pts[2], w); +} + +inline void PathSimplifier::subDivCubic(const QPoint &u, const QPoint &v, + const QPoint &w, const QPoint &q) +{ + if (flattenCubic(u, v, w, q)) + return; + QPoint pts[5]; + splitCubic(u, v, w, q, pts); + subDivCubic(u, pts[0], pts[1], pts[2]); + m_indices->add(m_points->size()); + m_points->add(pts[2]); + subDivCubic(pts[2], pts[3], pts[4], q); +} + +void PathSimplifier::sortEvents(Event *events, int count) +{ + // Bucket sort + insertion sort. + Q_ASSERT(count > 0); + QDataBuffer buffer(count); + buffer.resize(count); + QScopedArrayPointer bins(new int[count]); + int counts[0x101]; + memset(counts, 0, sizeof(counts)); + + int minimum, maximum; + minimum = maximum = events[0].point.y(); + for (int i = 1; i < count; ++i) { + minimum = qMin(minimum, events[i].point.y()); + maximum = qMax(maximum, events[i].point.y()); + } + + for (int i = 0; i < count; ++i) { + bins[i] = ((maximum - events[i].point.y()) << 8) / (maximum - minimum + 1); + Q_ASSERT(bins[i] >= 0 && bins[i] < 0x100); + ++counts[bins[i]]; + } + + for (int i = 1; i < 0x100; ++i) + counts[i] += counts[i - 1]; + counts[0x100] = counts[0xff]; + Q_ASSERT(counts[0x100] == count); + + for (int i = 0; i < count; ++i) + buffer.at(--counts[bins[i]]) = events[i]; + + int j = 0; + for (int i = 0; i < 0x100; ++i) { + for (; j < counts[i + 1]; ++j) { + int k = j; + while (k > 0 && (buffer.at(j) < events[k - 1])) { + events[k] = events[k - 1]; + --k; + } + events[k] = buffer.at(j); + } + } +} + +} // end anonymous namespace + + +void qSimplifyPath(const QVectorPath &path, QDataBuffer &vertices, + QDataBuffer &indices, const QTransform &matrix) +{ + PathSimplifier(path, vertices, indices, matrix); +} + +void qSimplifyPath(const QPainterPath &path, QDataBuffer &vertices, + QDataBuffer &indices, const QTransform &matrix) +{ + qSimplifyPath(qtVectorPathForPath(path), vertices, indices, matrix); +} + + +QT_END_NAMESPACE diff --git a/src/gui/painting/qpathsimplifier_p.h b/src/gui/painting/qpathsimplifier_p.h new file mode 100644 index 00000000000..9941bd21f21 --- /dev/null +++ b/src/gui/painting/qpathsimplifier_p.h @@ -0,0 +1,68 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QPATHSIMPLIFIER_P_H +#define QPATHSIMPLIFIER_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 + +QT_BEGIN_NAMESPACE + +// The returned vertices are in 8:8 fixed point format. The path is assumed to be in the range (-128, 128)x(-128, 128). +void qSimplifyPath(const QVectorPath &path, QDataBuffer &vertices, QDataBuffer &indices, const QTransform &matrix = QTransform()); +void qSimplifyPath(const QPainterPath &path, QDataBuffer &vertices, QDataBuffer &indices, const QTransform &matrix = QTransform()); + +QT_END_NAMESPACE + +#endif diff --git a/src/gui/painting/qstroker.cpp b/src/gui/painting/qstroker.cpp index ddf828982a7..1201a481b68 100644 --- a/src/gui/painting/qstroker.cpp +++ b/src/gui/painting/qstroker.cpp @@ -756,7 +756,9 @@ template bool qt_stroke_side(Iterator *it, #ifdef QPP_STROKE_DEBUG qDebug("\n ---> (side) closed subpath"); #endif - stroker->joinPoints(prev.x, prev.y, *startTangent, stroker->joinStyleMode()); + // don't join empty subpaths + if (!first) + stroker->joinPoints(prev.x, prev.y, *startTangent, stroker->joinStyleMode()); return true; } else { #ifdef QPP_STROKE_DEBUG diff --git a/src/gui/text/qabstracttextdocumentlayout.cpp b/src/gui/text/qabstracttextdocumentlayout.cpp index 2c22b728468..7bf2a631ea7 100644 --- a/src/gui/text/qabstracttextdocumentlayout.cpp +++ b/src/gui/text/qabstracttextdocumentlayout.cpp @@ -469,7 +469,7 @@ void QAbstractTextDocumentLayout::resizeInlineObject(QTextInlineObject item, int QSizeF s = handler.iface->intrinsicSize(document(), posInDocument, format); item.setWidth(s.width()); - item.setAscent(s.height() - 1); + item.setAscent(s.height()); item.setDescent(0); } diff --git a/src/gui/text/qdistancefield.cpp b/src/gui/text/qdistancefield.cpp new file mode 100644 index 00000000000..fb06a26c8f1 --- /dev/null +++ b/src/gui/text/qdistancefield.cpp @@ -0,0 +1,762 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qdistancefield_p.h" +#include +#include +#include + +QT_BEGIN_NAMESPACE + +namespace +{ + enum FillHDir + { + LeftToRight, + RightToLeft + }; + + enum FillVDir + { + TopDown, + BottomUp + }; + + enum FillClip + { + NoClip, + Clip + }; +} + +template +inline void fillLine(qint32 *, int, int, int, qint32, qint32) +{ +} + +template <> +inline void fillLine(qint32 *line, int width, int lx, int rx, qint32 d, qint32 dd) +{ + int fromX = qMax(0, lx >> 8); + int toX = qMin(width, rx >> 8); + int x = toX - fromX; + if (x <= 0) + return; + qint32 val = d + (((fromX << 8) + 0xff - lx) * dd >> 8); + line += fromX; + do { + *line = abs(val) < abs(*line) ? val : *line; + val += dd; + ++line; + } while (--x); +} + +template <> +inline void fillLine(qint32 *line, int width, int lx, int rx, qint32 d, qint32 dd) +{ + int fromX = qMax(0, lx >> 8); + int toX = qMin(width, rx >> 8); + int x = toX - fromX; + if (x <= 0) + return; + qint32 val = d + (((toX << 8) + 0xff - rx) * dd >> 8); + line += toX; + do { + val -= dd; + --line; + *line = abs(val) < abs(*line) ? val : *line; + } while (--x); +} + +template <> +inline void fillLine(qint32 *line, int, int lx, int rx, qint32 d, qint32 dd) +{ + int fromX = lx >> 8; + int toX = rx >> 8; + int x = toX - fromX; + if (x <= 0) + return; + qint32 val = d + ((~lx & 0xff) * dd >> 8); + line += fromX; + do { + *line = abs(val) < abs(*line) ? val : *line; + val += dd; + ++line; + } while (--x); +} + +template <> +inline void fillLine(qint32 *line, int, int lx, int rx, qint32 d, qint32 dd) +{ + int fromX = lx >> 8; + int toX = rx >> 8; + int x = toX - fromX; + if (x <= 0) + return; + qint32 val = d + ((~rx & 0xff) * dd >> 8); + line += toX; + do { + val -= dd; + --line; + *line = abs(val) < abs(*line) ? val : *line; + } while (--x); +} + +template +inline void fillLines(qint32 *bits, int width, int height, int upperY, int lowerY, + int &lx, int ldx, int &rx, int rdx, qint32 &d, qint32 ddy, qint32 ddx) +{ + Q_UNUSED(height); + Q_ASSERT(upperY < lowerY); + int y = lowerY - upperY; + if (vDir == TopDown) { + qint32 *line = bits + upperY * width; + do { + fillLine(line, width, lx, rx, d, ddx); + lx += ldx; + d += ddy; + rx += rdx; + line += width; + } while (--y); + } else { + qint32 *line = bits + lowerY * width; + do { + lx -= ldx; + d -= ddy; + rx -= rdx; + line -= width; + fillLine(line, width, lx, rx, d, ddx); + } while (--y); + } +} + +template +void drawTriangle(qint32 *bits, int width, int height, const QPoint *center, + const QPoint *v1, const QPoint *v2, qint32 value) +{ + const int y1 = clip == Clip ? qBound(0, v1->y() >> 8, height) : v1->y() >> 8; + const int y2 = clip == Clip ? qBound(0, v2->y() >> 8, height) : v2->y() >> 8; + const int yC = clip == Clip ? qBound(0, center->y() >> 8, height) : center->y() >> 8; + + const int v1Frac = clip == Clip ? (y1 << 8) + 0xff - v1->y() : ~v2->y() & 0xff; + const int v2Frac = clip == Clip ? (y2 << 8) + 0xff - v2->y() : ~v1->y() & 0xff; + const int centerFrac = clip == Clip ? (yC << 8) + 0xff - center->y() : ~center->y() & 0xff; + + int dx1 = 0, x1 = 0, dx2 = 0, x2 = 0; + qint32 dd1, d1, dd2, d2; + if (v1->y() != center->y()) { + dx1 = ((v1->x() - center->x()) << 8) / (v1->y() - center->y()); + x1 = center->x() + centerFrac * (v1->x() - center->x()) / (v1->y() - center->y()); + } + if (v2->y() != center->y()) { + dx2 = ((v2->x() - center->x()) << 8) / (v2->y() - center->y()); + x2 = center->x() + centerFrac * (v2->x() - center->x()) / (v2->y() - center->y()); + } + + const qint32 div = (v2->x() - center->x()) * (v1->y() - center->y()) + - (v2->y() - center->y()) * (v1->x() - center->x()); + const qint32 dd = div ? qint32((qint64(value * (v1->y() - v2->y())) << 8) / div) : 0; + + if (y2 < yC) { + if (y1 < yC) { + // Center at the bottom. + if (y2 < y1) { + // y2 < y1 < yC + // Long right edge. + d1 = centerFrac * value / (v1->y() - center->y()); + dd1 = ((value << 8) / (v1->y() - center->y())); + fillLines(bits, width, height, y1, yC, x1, dx1, + x2, dx2, d1, dd1, dd); + dx1 = ((v1->x() - v2->x()) << 8) / (v1->y() - v2->y()); + x1 = v1->x() + v1Frac * (v1->x() - v2->x()) / (v1->y() - v2->y()); + fillLines(bits, width, height, y2, y1, x1, dx1, + x2, dx2, value, 0, dd); + } else { + // y1 <= y2 < yC + // Long left edge. + d2 = centerFrac * value / (v2->y() - center->y()); + dd2 = ((value << 8) / (v2->y() - center->y())); + fillLines(bits, width, height, y2, yC, x1, dx1, + x2, dx2, d2, dd2, dd); + if (y1 != y2) { + dx2 = ((v1->x() - v2->x()) << 8) / (v1->y() - v2->y()); + x2 = v2->x() + v2Frac * (v1->x() - v2->x()) / (v1->y() - v2->y()); + fillLines(bits, width, height, y1, y2, x1, dx1, + x2, dx2, value, 0, dd); + } + } + } else { + // y2 < yC <= y1 + // Center to the right. + int dx = ((v1->x() - v2->x()) << 8) / (v1->y() - v2->y()); + int xUp, xDn; + xUp = xDn = v2->x() + (clip == Clip ? (yC << 8) + 0xff - v2->y() + : (center->y() | 0xff) - v2->y()) + * (v1->x() - v2->x()) / (v1->y() - v2->y()); + fillLines(bits, width, height, y2, yC, xUp, dx, + x2, dx2, value, 0, dd); + if (yC != y1) + fillLines(bits, width, height, yC, y1, xDn, dx, + x1, dx1, value, 0, dd); + } + } else { + if (y1 < yC) { + // y1 < yC <= y2 + // Center to the left. + int dx = ((v1->x() - v2->x()) << 8) / (v1->y() - v2->y()); + int xUp, xDn; + xUp = xDn = v1->x() + (clip == Clip ? (yC << 8) + 0xff - v1->y() + : (center->y() | 0xff) - v1->y()) + * (v1->x() - v2->x()) / (v1->y() - v2->y()); + fillLines(bits, width, height, y1, yC, x1, dx1, + xUp, dx, value, 0, dd); + if (yC != y2) + fillLines(bits, width, height, yC, y2, x2, dx2, + xDn, dx, value, 0, dd); + } else { + // Center at the top. + if (y2 < y1) { + // yC <= y2 < y1 + // Long right edge. + if (yC != y2) { + d2 = centerFrac * value / (v2->y() - center->y()); + dd2 = ((value << 8) / (v2->y() - center->y())); + fillLines(bits, width, height, yC, y2, x2, dx2, + x1, dx1, d2, dd2, dd); + } + dx2 = ((v1->x() - v2->x()) << 8) / (v1->y() - v2->y()); + x2 = v2->x() + v2Frac * (v1->x() - v2->x()) / (v1->y() - v2->y()); + fillLines(bits, width, height, y2, y1, x2, dx2, + x1, dx1, value, 0, dd); + } else { + // Long left edge. + // yC <= y1 <= y2 + if (yC != y1) { + d1 = centerFrac * value / (v1->y() - center->y()); + dd1 = ((value << 8) / (v1->y() - center->y())); + fillLines(bits, width, height, yC, y1, x2, dx2, + x1, dx1, d1, dd1, dd); + } + if (y1 != y2) { + dx1 = ((v1->x() - v2->x()) << 8) / (v1->y() - v2->y()); + x1 = v1->x() + v1Frac * (v1->x() - v2->x()) / (v1->y() - v2->y()); + fillLines(bits, width, height, y1, y2, x2, dx2, + x1, dx1, value, 0, dd); + } + } + } + } +} + +template +void drawRectangle(qint32 *bits, int width, int height, + const QPoint *int1, const QPoint *center1, const QPoint *ext1, + const QPoint *int2, const QPoint *center2, const QPoint *ext2, + qint32 extValue) +{ + if (center1->y() > center2->y()) { + qSwap(center1, center2); + qSwap(int1, ext2); + qSwap(ext1, int2); + extValue = -extValue; + } + + Q_ASSERT(ext1->x() - center1->x() == center1->x() - int1->x()); + Q_ASSERT(ext1->y() - center1->y() == center1->y() - int1->y()); + Q_ASSERT(ext2->x() - center2->x() == center2->x() - int2->x()); + Q_ASSERT(ext2->y() - center2->y() == center2->y() - int2->y()); + + const int yc1 = clip == Clip ? qBound(0, center1->y() >> 8, height) : center1->y() >> 8; + const int yc2 = clip == Clip ? qBound(0, center2->y() >> 8, height) : center2->y() >> 8; + const int yi1 = clip == Clip ? qBound(0, int1->y() >> 8, height) : int1->y() >> 8; + const int yi2 = clip == Clip ? qBound(0, int2->y() >> 8, height) : int2->y() >> 8; + const int ye1 = clip == Clip ? qBound(0, ext1->y() >> 8, height) : ext1->y() >> 8; + const int ye2 = clip == Clip ? qBound(0, ext2->y() >> 8, height) : ext2->y() >> 8; + + const int center1Frac = clip == Clip ? (yc1 << 8) + 0xff - center1->y() : ~center1->y() & 0xff; + const int center2Frac = clip == Clip ? (yc2 << 8) + 0xff - center2->y() : ~center2->y() & 0xff; + const int int1Frac = clip == Clip ? (yi1 << 8) + 0xff - int1->y() : ~int1->y() & 0xff; + const int ext1Frac = clip == Clip ? (ye1 << 8) + 0xff - ext1->y() : ~ext1->y() & 0xff; + + int dxC = 0, dxE = 0; // cap slope, edge slope + qint32 ddC = 0; + if (ext1->y() != int1->y()) { + dxC = ((ext1->x() - int1->x()) << 8) / (ext1->y() - int1->y()); + ddC = (extValue << 9) / (ext1->y() - int1->y()); + } + if (ext1->y() != ext2->y()) + dxE = ((ext1->x() - ext2->x()) << 8) / (ext1->y() - ext2->y()); + + const qint32 div = (ext1->x() - int1->x()) * (ext2->y() - int1->y()) + - (ext1->y() - int1->y()) * (ext2->x() - int1->x()); + const qint32 dd = div ? qint32((qint64(extValue * (ext2->y() - ext1->y())) << 9) / div) : 0; + + int xe1, xe2, xc1, xc2; + qint32 d; + + qint32 intValue = -extValue; + + if (center2->x() < center1->x()) { + // Leaning to the right. '/' + if (int1->y() < ext2->y()) { + // Mostly vertical. + Q_ASSERT(ext1->y() != ext2->y()); + xe1 = ext1->x() + ext1Frac * (ext1->x() - ext2->x()) / (ext1->y() - ext2->y()); + xe2 = int1->x() + int1Frac * (ext1->x() - ext2->x()) / (ext1->y() - ext2->y()); + if (ye1 != yi1) { + xc2 = center1->x() + center1Frac * (ext1->x() - int1->x()) / (ext1->y() - int1->y()); + xc2 += (ye1 - yc1) * dxC; + fillLines(bits, width, height, ye1, yi1, xe1, dxE, + xc2, dxC, extValue, 0, dd); + } + if (yi1 != ye2) + fillLines(bits, width, height, yi1, ye2, xe1, dxE, + xe2, dxE, extValue, 0, dd); + if (ye2 != yi2) { + xc1 = center2->x() + center2Frac * (ext1->x() - int1->x()) / (ext1->y() - int1->y()); + xc1 += (ye2 - yc2) * dxC; + fillLines(bits, width, height, ye2, yi2, xc1, dxC, + xe2, dxE, intValue, 0, dd); + } + } else { + // Mostly horizontal. + Q_ASSERT(ext1->y() != int1->y()); + xc1 = center2->x() + center2Frac * (ext1->x() - int1->x()) / (ext1->y() - int1->y()); + xc2 = center1->x() + center1Frac * (ext1->x() - int1->x()) / (ext1->y() - int1->y()); + xc1 += (ye2 - yc2) * dxC; + xc2 += (ye1 - yc1) * dxC; + if (ye1 != ye2) { + xe1 = ext1->x() + ext1Frac * (ext1->x() - ext2->x()) / (ext1->y() - ext2->y()); + fillLines(bits, width, height, ye1, ye2, xe1, dxE, + xc2, dxC, extValue, 0, dd); + } + if (ye2 != yi1) { + d = (clip == Clip ? (ye2 << 8) + 0xff - center2->y() + : (ext2->y() | 0xff) - center2->y()) + * 2 * extValue / (ext1->y() - int1->y()); + fillLines(bits, width, height, ye2, yi1, xc1, dxC, + xc2, dxC, d, ddC, dd); + } + if (yi1 != yi2) { + xe2 = int1->x() + int1Frac * (ext1->x() - ext2->x()) / (ext1->y() - ext2->y()); + fillLines(bits, width, height, yi1, yi2, xc1, dxC, + xe2, dxE, intValue, 0, dd); + } + } + } else { + // Leaning to the left. '\' + if (ext1->y() < int2->y()) { + // Mostly vertical. + Q_ASSERT(ext1->y() != ext2->y()); + xe1 = ext1->x() + ext1Frac * (ext1->x() - ext2->x()) / (ext1->y() - ext2->y()); + xe2 = int1->x() + int1Frac * (ext1->x() - ext2->x()) / (ext1->y() - ext2->y()); + if (yi1 != ye1) { + xc1 = center1->x() + center1Frac * (ext1->x() - int1->x()) / (ext1->y() - int1->y()); + xc1 += (yi1 - yc1) * dxC; + fillLines(bits, width, height, yi1, ye1, xc1, dxC, + xe2, dxE, intValue, 0, dd); + } + if (ye1 != yi2) + fillLines(bits, width, height, ye1, yi2, xe1, dxE, + xe2, dxE, intValue, 0, dd); + if (yi2 != ye2) { + xc2 = center2->x() + center2Frac * (ext1->x() - int1->x()) / (ext1->y() - int1->y()); + xc2 += (yi2 - yc2) * dxC; + fillLines(bits, width, height, yi2, ye2, xe1, dxE, + xc2, dxC, extValue, 0, dd); + } + } else { + // Mostly horizontal. + Q_ASSERT(ext1->y() != int1->y()); + xc1 = center1->x() + center1Frac * (ext1->x() - int1->x()) / (ext1->y() - int1->y()); + xc2 = center2->x() + center2Frac * (ext1->x() - int1->x()) / (ext1->y() - int1->y()); + xc1 += (yi1 - yc1) * dxC; + xc2 += (yi2 - yc2) * dxC; + if (yi1 != yi2) { + xe2 = int1->x() + int1Frac * (ext1->x() - ext2->x()) / (ext1->y() - ext2->y()); + fillLines(bits, width, height, yi1, yi2, xc1, dxC, + xe2, dxE, intValue, 0, dd); + } + if (yi2 != ye1) { + d = (clip == Clip ? (yi2 << 8) + 0xff - center2->y() + : (int2->y() | 0xff) - center2->y()) + * 2 * extValue / (ext1->y() - int1->y()); + fillLines(bits, width, height, yi2, ye1, xc1, dxC, + xc2, dxC, d, ddC, dd); + } + if (ye1 != ye2) { + xe1 = ext1->x() + ext1Frac * (ext1->x() - ext2->x()) / (ext1->y() - ext2->y()); + fillLines(bits, width, height, ye1, ye2, xe1, dxE, + xc2, dxC, extValue, 0, dd); + } + } + } +} + +static void drawPolygons(qint32 *bits, int width, int height, const QPoint *vertices, + const quint32 *indices, int indexCount, qint32 value) +{ + Q_ASSERT(indexCount != 0); + Q_ASSERT(height <= 128); + QVarLengthArray scans[128]; + int first = 0; + for (int i = 1; i < indexCount; ++i) { + quint32 idx1 = indices[i - 1]; + quint32 idx2 = indices[i]; + Q_ASSERT(idx1 != quint32(-1)); + if (idx2 == quint32(-1)) { + idx2 = indices[first]; + Q_ASSERT(idx2 != quint32(-1)); + first = ++i; + } + const QPoint *v1 = &vertices[idx1]; + const QPoint *v2 = &vertices[idx2]; + if (v2->y() < v1->y()) + qSwap(v1, v2); + int fromY = qMax(0, v1->y() >> 8); + int toY = qMin(height, v2->y() >> 8); + if (fromY >= toY) + continue; + int dx = ((v2->x() - v1->x()) << 8) / (v2->y() - v1->y()); + int x = v1->x() + ((fromY << 8) + 0xff - v1->y()) * (v2->x() - v1->x()) / (v2->y() - v1->y()); + for (int y = fromY; y < toY; ++y) { + quint32 c = quint32(x >> 8); + if (c < quint32(width)) + scans[y].append(quint8(c)); + x += dx; + } + } + for (int i = 0; i < height; ++i) { + quint8 *scanline = scans[i].data(); + int size = scans[i].size(); + for (int j = 1; j < size; ++j) { + int k = j; + quint8 value = scanline[k]; + for (; k != 0 && value < scanline[k - 1]; --k) + scanline[k] = scanline[k - 1]; + scanline[k] = value; + } + qint32 *line = bits + i * width; + int j = 0; + for (; j + 1 < size; j += 2) { + for (quint8 x = scanline[j]; x < scanline[j + 1]; ++x) + line[x] = value; + } + if (j < size) { + for (int x = scanline[j]; x < width; ++x) + line[x] = value; + } + } +} + +static QImage makeDistanceField(int imgSize, const QPainterPath &path, int dfScale, int offs) +{ + QImage image(imgSize, imgSize, QImage::Format_Indexed8); + + if (path.isEmpty()) { + image.fill(0); + return image; + } + + QTransform transform; + transform.translate(offs, offs); + transform.scale(qreal(1) / dfScale, qreal(1) / dfScale); + + QDataBuffer pathIndices(0); + QDataBuffer pathVertices(0); + qSimplifyPath(path, pathVertices, pathIndices, transform); + + const qint32 interiorColor = -0x7f80; // 8:8 signed format, -127.5 + const qint32 exteriorColor = 0x7f80; // 8:8 signed format, 127.5 + + QScopedArrayPointer bits(new qint32[imgSize * imgSize]); + for (int i = 0; i < imgSize * imgSize; ++i) + bits[i] = exteriorColor; + + const qreal angleStep = qreal(15 * 3.141592653589793238 / 180); + const QPoint rotation(qRound(cos(angleStep) * 0x4000), + qRound(sin(angleStep) * 0x4000)); // 2:14 signed + + const quint32 *indices = pathIndices.data(); + QVarLengthArray normals; + QVarLengthArray vertices; + QVarLengthArray isConvex; + QVarLengthArray needsClipping; + + drawPolygons(bits.data(), imgSize, imgSize, pathVertices.data(), indices, pathIndices.size(), + interiorColor); + + int index = 0; + + while (index < pathIndices.size()) { + normals.clear(); + vertices.clear(); + needsClipping.clear(); + + // Find end of polygon. + int end = index; + while (indices[end] != quint32(-1)) + ++end; + + // Calculate vertex normals. + for (int next = index, prev = end - 1; next < end; prev = next++) { + quint32 fromVertexIndex = indices[prev]; + quint32 toVertexIndex = indices[next]; + + const QPoint &from = pathVertices.at(fromVertexIndex); + const QPoint &to = pathVertices.at(toVertexIndex); + + QPoint n(to.y() - from.y(), from.x() - to.x()); + if (n.x() == 0 && n.y() == 0) + continue; + int scale = qRound((offs << 16) / sqrt(qreal(n.x() * n.x() + n.y() * n.y()))); // 8:16 + n.rx() = n.x() * scale >> 8; + n.ry() = n.y() * scale >> 8; + normals.append(n); + QPoint v(to.x() + 0x7f, to.y() + 0x7f); + vertices.append(v); + needsClipping.append((to.x() < offs << 8) || (to.x() >= (imgSize - offs) << 8) + || (to.y() < offs << 8) || (to.y() >= (imgSize - offs) << 8)); + } + + isConvex.resize(normals.count()); + for (int next = 0, prev = normals.count() - 1; next < normals.count(); prev = next++) { + isConvex[prev] = normals.at(prev).x() * normals.at(next).y() + - normals.at(prev).y() * normals.at(next).x() < 0; + } + + // Draw quads. + for (int next = 0, prev = normals.count() - 1; next < normals.count(); prev = next++) { + QPoint n = normals.at(next); + QPoint intPrev = vertices.at(prev); + QPoint extPrev = vertices.at(prev); + QPoint intNext = vertices.at(next); + QPoint extNext = vertices.at(next); + + extPrev.rx() -= n.x(); + extPrev.ry() -= n.y(); + intPrev.rx() += n.x(); + intPrev.ry() += n.y(); + extNext.rx() -= n.x(); + extNext.ry() -= n.y(); + intNext.rx() += n.x(); + intNext.ry() += n.y(); + + if (needsClipping[prev] || needsClipping[next]) { + drawRectangle(bits.data(), imgSize, imgSize, + &intPrev, &vertices.at(prev), &extPrev, + &intNext, &vertices.at(next), &extNext, + exteriorColor); + } else { + drawRectangle(bits.data(), imgSize, imgSize, + &intPrev, &vertices.at(prev), &extPrev, + &intNext, &vertices.at(next), &extNext, + exteriorColor); + } + + if (isConvex.at(prev)) { + QPoint p = extPrev; + if (needsClipping[prev]) { + for (;;) { + QPoint rn((n.x() * rotation.x() - n.y() * rotation.y()) >> 14, + (n.y() * rotation.x() + n.x() * rotation.y()) >> 14); + n = rn; + if (n.x() * normals.at(prev).y() - n.y() * normals.at(prev).x() <= 0) { + p.rx() = vertices.at(prev).x() - normals.at(prev).x(); + p.ry() = vertices.at(prev).y() - normals.at(prev).y(); + drawTriangle(bits.data(), imgSize, imgSize, &vertices.at(prev), + &extPrev, &p, exteriorColor); + break; + } + + p.rx() = vertices.at(prev).x() - n.x(); + p.ry() = vertices.at(prev).y() - n.y(); + drawTriangle(bits.data(), imgSize, imgSize, &vertices.at(prev), + &extPrev, &p, exteriorColor); + extPrev = p; + } + } else { + for (;;) { + QPoint rn((n.x() * rotation.x() - n.y() * rotation.y()) >> 14, + (n.y() * rotation.x() + n.x() * rotation.y()) >> 14); + n = rn; + if (n.x() * normals.at(prev).y() - n.y() * normals.at(prev).x() <= 0) { + p.rx() = vertices.at(prev).x() - normals.at(prev).x(); + p.ry() = vertices.at(prev).y() - normals.at(prev).y(); + drawTriangle(bits.data(), imgSize, imgSize, &vertices.at(prev), + &extPrev, &p, exteriorColor); + break; + } + + p.rx() = vertices.at(prev).x() - n.x(); + p.ry() = vertices.at(prev).y() - n.y(); + drawTriangle(bits.data(), imgSize, imgSize, &vertices.at(prev), + &extPrev, &p, exteriorColor); + extPrev = p; + } + } + } else { + QPoint p = intPrev; + if (needsClipping[prev]) { + for (;;) { + QPoint rn((n.x() * rotation.x() + n.y() * rotation.y()) >> 14, + (n.y() * rotation.x() - n.x() * rotation.y()) >> 14); + n = rn; + if (n.x() * normals.at(prev).y() - n.y() * normals.at(prev).x() >= 0) { + p.rx() = vertices.at(prev).x() + normals.at(prev).x(); + p.ry() = vertices.at(prev).y() + normals.at(prev).y(); + drawTriangle(bits.data(), imgSize, imgSize, &vertices.at(prev), + &p, &intPrev, interiorColor); + break; + } + + p.rx() = vertices.at(prev).x() + n.x(); + p.ry() = vertices.at(prev).y() + n.y(); + drawTriangle(bits.data(), imgSize, imgSize, &vertices.at(prev), + &p, &intPrev, interiorColor); + intPrev = p; + } + } else { + for (;;) { + QPoint rn((n.x() * rotation.x() + n.y() * rotation.y()) >> 14, + (n.y() * rotation.x() - n.x() * rotation.y()) >> 14); + n = rn; + if (n.x() * normals.at(prev).y() - n.y() * normals.at(prev).x() >= 0) { + p.rx() = vertices.at(prev).x() + normals.at(prev).x(); + p.ry() = vertices.at(prev).y() + normals.at(prev).y(); + drawTriangle(bits.data(), imgSize, imgSize, &vertices.at(prev), + &p, &intPrev, interiorColor); + break; + } + + p.rx() = vertices.at(prev).x() + n.x(); + p.ry() = vertices.at(prev).y() + n.y(); + drawTriangle(bits.data(), imgSize, imgSize, &vertices.at(prev), + &p, &intPrev, interiorColor); + intPrev = p; + } + } + } + } + + index = end + 1; + } + + const qint32 *inLine = bits.data(); + uchar *outLine = image.bits(); + int padding = image.bytesPerLine() - image.width(); + for (int y = 0; y < imgSize; ++y) { + for (int x = 0; x < imgSize; ++x, ++inLine, ++outLine) + *outLine = uchar((0x7f80 - *inLine) >> 8); + outLine += padding; + } + + return image; +} + +bool qt_fontHasNarrowOutlines(const QRawFont &f) +{ + QRawFont font = f; + font.setPixelSize(QT_DISTANCEFIELD_DEFAULT_BASEFONTSIZE); + Q_ASSERT(font.isValid()); + + QVector glyphIndices = font.glyphIndexesForString(QLatin1String("O")); + if (glyphIndices.size() < 1) + return false; + + QImage im = font.alphaMapForGlyph(glyphIndices.at(0), QRawFont::PixelAntialiasing); + if (im.isNull()) + return false; + + int minHThick = 999; + int minVThick = 999; + + int thick = 0; + bool in = false; + int y = (im.height() + 1) / 2; + for (int x = 0; x < im.width(); ++x) { + int a = qAlpha(im.pixel(x, y)); + if (a > 127) { + in = true; + ++thick; + } else if (in) { + in = false; + minHThick = qMin(minHThick, thick); + thick = 0; + } + } + + thick = 0; + in = false; + int x = (im.width() + 1) / 2; + for (int y = 0; y < im.height(); ++y) { + int a = qAlpha(im.pixel(x, y)); + if (a > 127) { + in = true; + ++thick; + } else if (in) { + in = false; + minVThick = qMin(minVThick, thick); + thick = 0; + } + } + + return minHThick == 1 || minVThick == 1; +} + +QImage qt_renderDistanceFieldGlyph(const QRawFont &font, glyph_t glyph, bool doubleResolution) +{ + QRawFont renderFont = font; + renderFont.setPixelSize(QT_DISTANCEFIELD_BASEFONTSIZE(doubleResolution) * QT_DISTANCEFIELD_SCALE(doubleResolution)); + + QPainterPath path = renderFont.pathForGlyph(glyph); + path.translate(-path.boundingRect().topLeft()); + path.setFillRule(Qt::WindingFill); + + QImage im = makeDistanceField(QT_DISTANCEFIELD_TILESIZE(doubleResolution), + path, + QT_DISTANCEFIELD_SCALE(doubleResolution), + QT_DISTANCEFIELD_RADIUS(doubleResolution) / QT_DISTANCEFIELD_SCALE(doubleResolution)); + return im; +} + +QT_END_NAMESPACE + diff --git a/src/widgets/kernel/qguiplatformplugin_p.h b/src/gui/text/qdistancefield_p.h similarity index 56% rename from src/widgets/kernel/qguiplatformplugin_p.h rename to src/gui/text/qdistancefield_p.h index 09b65640616..486d291b782 100644 --- a/src/widgets/kernel/qguiplatformplugin_p.h +++ b/src/gui/text/qdistancefield_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtGui module of the Qt Toolkit. +** This file is part of the QtDeclarative module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,8 +39,8 @@ ** ****************************************************************************/ -#ifndef QGUIPLATFORM_P_H -#define QGUIPLATFORM_P_H +#ifndef QDISTANCEFIELD_H +#define QDISTANCEFIELD_H // // W A R N I N G @@ -53,56 +53,33 @@ // We mean it. // -#include -#include -#include - -QT_BEGIN_HEADER +#include +#include QT_BEGIN_NAMESPACE +#define QT_DISTANCEFIELD_DEFAULT_BASEFONTSIZE 54 +#define QT_DISTANCEFIELD_DEFAULT_TILESIZE 64 +#define QT_DISTANCEFIELD_DEFAULT_SCALE 16 +#define QT_DISTANCEFIELD_DEFAULT_RADIUS 80 +#define QT_DISTANCEFIELD_HIGHGLYPHCOUNT 2000 -class QStyle; -class QPalette; -class QIcon; -class QFileDialog; -class QColorDialog; -class QFileInfo; +#define QT_DISTANCEFIELD_BASEFONTSIZE(NarrowOutlineFont) \ + (NarrowOutlineFont ? QT_DISTANCEFIELD_DEFAULT_BASEFONTSIZE * 2 : \ + QT_DISTANCEFIELD_DEFAULT_BASEFONTSIZE) +#define QT_DISTANCEFIELD_TILESIZE(NarrowOutlineFont) \ + (NarrowOutlineFont ? QT_DISTANCEFIELD_DEFAULT_TILESIZE * 2 : \ + QT_DISTANCEFIELD_DEFAULT_TILESIZE) +#define QT_DISTANCEFIELD_SCALE(NarrowOutlineFont) \ + (NarrowOutlineFont ? QT_DISTANCEFIELD_DEFAULT_SCALE / 2 : \ + QT_DISTANCEFIELD_DEFAULT_SCALE) +#define QT_DISTANCEFIELD_RADIUS(NarrowOutlineFont) \ + (NarrowOutlineFont ? QT_DISTANCEFIELD_DEFAULT_RADIUS / 2 : \ + QT_DISTANCEFIELD_DEFAULT_RADIUS) -struct Q_WIDGETS_EXPORT QGuiPlatformPluginInterface : public QFactoryInterface -{ -}; - -#define QGuiPlatformPluginInterface_iid "com.nokia.qt.QGuiPlatformPluginInterface" - -Q_DECLARE_INTERFACE(QGuiPlatformPluginInterface, QGuiPlatformPluginInterface_iid) - -class Q_WIDGETS_EXPORT QGuiPlatformPlugin : public QObject, public QGuiPlatformPluginInterface -{ - Q_OBJECT - Q_INTERFACES(QGuiPlatformPluginInterface:QFactoryInterface) - public: - explicit QGuiPlatformPlugin(QObject *parent = 0); - ~QGuiPlatformPlugin(); - - virtual QStringList keys() const { return QStringList(QStringLiteral("default")); } - - virtual QString styleName(); - virtual QPalette palette(); - virtual QString systemIconThemeName(); - virtual QStringList iconThemeSearchPaths(); - virtual QIcon fileSystemIcon(const QFileInfo &); - - enum PlatformHint { PH_ToolButtonStyle, PH_ToolBarIconSize, PH_ItemView_ActivateItemOnSingleClick }; - virtual int platformHint(PlatformHint hint); -}; - -//internal -QGuiPlatformPlugin *qt_guiPlatformPlugin(); +bool Q_GUI_EXPORT qt_fontHasNarrowOutlines(const QRawFont &f); +QImage Q_GUI_EXPORT qt_renderDistanceFieldGlyph(const QRawFont &font, glyph_t glyph, bool doubleResolution); QT_END_NAMESPACE -QT_END_HEADER - - -#endif // QGUIPLATFORMPLUGIN_H +#endif // QDISTANCEFIELD_H diff --git a/src/gui/text/qfont.cpp b/src/gui/text/qfont.cpp index a347c626294..ee833a06cfa 100644 --- a/src/gui/text/qfont.cpp +++ b/src/gui/text/qfont.cpp @@ -2729,6 +2729,20 @@ QFontEngine *QFontCache::findEngine(const Key &key) return it.value().data; } +void QFontCache::removeEngine(QFontEngine *engine) +{ + EngineCache::iterator it = engineCache.begin(); + while (it != engineCache.end()) { + if (it.value().data == engine) { + it = engineCache.erase(it); + if (--engine->cache_count == 0) + decreaseCost(engine->cache_cost); + } else { + ++it; + } + } +} + void QFontCache::insertEngine(const Key &key, QFontEngine *engine) { FC_DEBUG("QFontCache: inserting new engine %p", engine); diff --git a/src/gui/text/qfont_p.h b/src/gui/text/qfont_p.h index e26a98aaf24..d10249201ab 100644 --- a/src/gui/text/qfont_p.h +++ b/src/gui/text/qfont_p.h @@ -243,6 +243,7 @@ public: QFontEngine *findEngine(const Key &key); void insertEngine(const Key &key, QFontEngine *engine); + void removeEngine(QFontEngine *engine); private: diff --git a/src/gui/text/qfont_qpa.cpp b/src/gui/text/qfont_qpa.cpp index 7fcbe98b6f4..29ba7767bc8 100644 --- a/src/gui/text/qfont_qpa.cpp +++ b/src/gui/text/qfont_qpa.cpp @@ -40,6 +40,7 @@ ****************************************************************************/ #include +#include #include QT_BEGIN_NAMESPACE diff --git a/src/gui/text/qfontdatabase.cpp b/src/gui/text/qfontdatabase.cpp index 3ef28b8e504..7fa486e1ee2 100644 --- a/src/gui/text/qfontdatabase.cpp +++ b/src/gui/text/qfontdatabase.cpp @@ -39,7 +39,6 @@ ** ****************************************************************************/ -#include #include "qfontdatabase.h" #include "qdebug.h" #include "qalgorithms.h" @@ -47,12 +46,14 @@ #include "qvarlengtharray.h" // here or earlier - workaround for VC++6 #include "qthread.h" #include "qmutex.h" +#include "qfile.h" +#include "qfileinfo.h" #include "private/qunicodetables_p.h" #include "qfontengine_p.h" +#include "qplatformintegration_qpa.h" #include #include -#include "qabstractfileengine.h" #include #include @@ -196,7 +197,7 @@ struct QtFontStyle // bitfield count-- in while condition does not work correctly in mwccsym2 count--; QPlatformIntegration *integration = QGuiApplicationPrivate::platformIntegration(); - if (integration) { //on shut down there will be some that we don't release. + if (integration) { integration->fontDatabase()->releaseHandle(pixelSizes[count].handle); } } @@ -349,6 +350,7 @@ struct QtFontFamily #endif QString name; + QStringList aliases; int count; QtFontFoundry **foundries; @@ -724,7 +726,7 @@ static void match(int script, const QFontDef &request, const QString &family_name, const QString &foundry_name, int force_encoding_id, QtFontDesc *desc, const QList &blacklistedFamilies = QList(), bool forceXLFD=false); -static void initFontDef(const QtFontDesc &desc, const QFontDef &request, QFontDef *fontDef) +static void initFontDef(const QtFontDesc &desc, const QFontDef &request, QFontDef *fontDef, bool multi) { fontDef->family = desc.family->name; if (! desc.foundry->name.isEmpty() && desc.family->count > 1) { @@ -743,8 +745,10 @@ static void initFontDef(const QtFontDesc &desc, const QFontDef &request, QFontDe fontDef->styleHint = request.styleHint; fontDef->styleStrategy = request.styleStrategy; - fontDef->weight = desc.style->key.weight; - fontDef->style = desc.style->key.style; + if (!multi) + fontDef->weight = desc.style->key.weight; + if (!multi) + fontDef->style = desc.style->key.style; fontDef->fixedPitch = desc.family->fixedPitch; fontDef->stretch = desc.style->key.stretch; fontDef->ignorePitch = false; @@ -794,6 +798,14 @@ static QStringList familyList(const QFontDef &req) Q_GLOBAL_STATIC(QFontDatabasePrivate, privateDb) Q_GLOBAL_STATIC_WITH_ARGS(QMutex, fontDatabaseMutex, (QMutex::Recursive)) +// used in qguiapplication.cpp +void qt_cleanupFontDatabase() +{ + QFontDatabasePrivate *db = privateDb(); + if (db) + db->free(); +} + // used in qfontengine_x11.cpp QMutex *qt_fontdatabase_mutex() { @@ -986,6 +998,25 @@ unsigned int bestFoundry(int script, unsigned int score, int styleStrategy, return score; } +static bool matchFamilyName(const QString &familyName, QtFontFamily *f) +{ + if (familyName.isEmpty()) + return true; + + if (f->name.compare(familyName, Qt::CaseInsensitive) == 0) + return true; + + QStringList::const_iterator it = f->aliases.constBegin(); + while (it != f->aliases.constEnd()) { + if ((*it).compare(familyName, Qt::CaseInsensitive) == 0) + return true; + + ++it; + } + + return false; +} + /*! \internal @@ -1035,9 +1066,7 @@ static void match(int script, const QFontDef &request, test.family = db->families[x]; test.familyIndex = x; - if (!family_name.isEmpty() - && test.family->name.compare(family_name, Qt::CaseInsensitive) != 0 - ) + if (!matchFamilyName(family_name, test.family)) continue; if (family_name.isEmpty()) @@ -2193,8 +2222,8 @@ bool QFontDatabasePrivate::isApplicationFont(const QString &fileName) int QFontDatabase::addApplicationFont(const QString &fileName) { QByteArray data; - QFile f(fileName); - if (!(f.fileEngine()->fileFlags(QAbstractFileEngine::FlagsMask) & QAbstractFileEngine::LocalDiskFlag)) { + if (!QFileInfo(fileName).isNativePath()) { + QFile f(fileName); if (!f.open(QIODevice::ReadOnly)) return -1; data = f.readAll(); diff --git a/src/gui/text/qfontdatabase_qpa.cpp b/src/gui/text/qfontdatabase_qpa.cpp index 16777d593c0..1a1f08f73d4 100644 --- a/src/gui/text/qfontdatabase_qpa.cpp +++ b/src/gui/text/qfontdatabase_qpa.cpp @@ -58,28 +58,49 @@ Q_GUI_EXPORT void qt_registerFont(const QString &familyName, const QString &fou const QSupportedWritingSystems &writingSystems, void *handle) { QFontDatabasePrivate *d = privateDb(); - // qDebug() << "Adding font" << familyName << weight << style << pixelSize << antialiased; - QtFontStyle::Key styleKey; - styleKey.style = style; - styleKey.weight = weight; - styleKey.stretch = stretch; - QtFontFamily *f = d->family(familyName, true); - f->fixedPitch = fixedPitch; +// qDebug() << "Adding font" << familyName << weight << style << pixelSize << antialiased; + QtFontStyle::Key styleKey; + styleKey.style = style; + styleKey.weight = weight; + styleKey.stretch = stretch; + QtFontFamily *f = d->family(familyName, true); + f->fixedPitch = fixedPitch; - for (int i = 0; i < QFontDatabase::WritingSystemsCount; ++i) { - if (writingSystems.supported(QFontDatabase::WritingSystem(i))) { - f->writingSystems[i] = QtFontFamily::Supported; - } else { - f->writingSystems[i] = QtFontFamily::Unsupported; - } + for (int i = 0; i < QFontDatabase::WritingSystemsCount; ++i) { + if (writingSystems.supported(QFontDatabase::WritingSystem(i))) { + f->writingSystems[i] = QtFontFamily::Supported; + } else { + f->writingSystems[i] = QtFontFamily::Unsupported; } + } - QtFontFoundry *foundry = f->foundry(foundryname, true); - QtFontStyle *fontStyle = foundry->style(styleKey, QString(), true); - fontStyle->smoothScalable = scalable; - fontStyle->antialiased = antialiased; - QtFontSize *size = fontStyle->pixelSize(pixelSize?pixelSize:SMOOTH_SCALABLE, true); - size->handle = handle; + QtFontFoundry *foundry = f->foundry(foundryname, true); + QtFontStyle *fontStyle = foundry->style(styleKey, QString(), true); + fontStyle->smoothScalable = scalable; + fontStyle->antialiased = antialiased; + QtFontSize *size = fontStyle->pixelSize(pixelSize ? pixelSize : SMOOTH_SCALABLE, true); + if (size->handle) { + QPlatformIntegration *integration = QGuiApplicationPrivate::platformIntegration(); + if (integration) + integration->fontDatabase()->releaseHandle(size->handle); + } + size->handle = handle; +} + +Q_GUI_EXPORT void qt_registerAliasToFontFamily(const QString &familyName, const QString &alias) +{ + if (alias.isEmpty()) + return; + + QFontDatabasePrivate *d = privateDb(); + QtFontFamily *f = d->family(familyName, false); + if (!f) + return; + + if (f->aliases.contains(alias, Qt::CaseInsensitive)) + return; + + f->aliases.push_back(alias); } static QStringList fallbackFamilies(const QString &family, const QFont::Style &style, const QFont::StyleHint &styleHint, const QUnicodeTables::Script &script) @@ -185,7 +206,8 @@ QFontEngine *loadEngine(int script, const QFontDef &request, if (family && !family->fallbackFamilies.isEmpty()) fallbacks = family->fallbackFamilies; - engine = new QFontEngineMultiQPA(engine, script, fallbacks); + QPlatformFontDatabase *pfdb = QGuiApplicationPrivate::platformIntegration()->fontDatabase(); + engine = pfdb->fontEngineMulti(engine, QUnicodeTables::Script(script), fallbacks); // Cache Multi font engine as well in case we got the FT single // font engine when we are actually looking for a Multi one @@ -278,7 +300,7 @@ QFontDatabase::findFont(int script, const QFontPrivate *fp, } if (engine && engine->type() != QFontEngine::TestFontEngine) { - initFontDef(desc, request, &engine->fontDef); + initFontDef(desc, request, &engine->fontDef, engine->type() == QFontEngine::Multi); if (fp) { QFontDef def = request; @@ -305,7 +327,7 @@ QFontDatabase::findFont(int script, const QFontPrivate *fp, } engine = loadEngine(script, def, desc.family, desc.foundry, desc.style, desc.size); if (engine) { - initFontDef(desc, def, &engine->fontDef); + initFontDef(desc, def, &engine->fontDef, engine->type() == QFontEngine::Multi); } } } @@ -377,8 +399,12 @@ void QFontDatabase::load(const QFontPrivate *d, int script) req.family = *it; fe = QFontDatabase::findFont(script, d, req, multi); - if (fe && (fe->type()==QFontEngine::Box) && !req.family.isEmpty()) + if (fe && (fe->type()==QFontEngine::Box) && !req.family.isEmpty()) { + if (fe->ref.load() == 0) + delete fe; + fe = 0; + } } if (fe->symbol || (d->request.styleStrategy & QFont::NoFontMerging)) { diff --git a/src/gui/text/qfontengine.cpp b/src/gui/text/qfontengine.cpp index 156a4a1e591..a084a3dd8cf 100644 --- a/src/gui/text/qfontengine.cpp +++ b/src/gui/text/qfontengine.cpp @@ -1379,18 +1379,24 @@ bool QFontEngineMulti::stringToCMap(const QChar *str, int len, int glyph_pos = 0; for (int i = 0; i < len; ++i) { bool surrogate = (str[i].isHighSurrogate() && i < len-1 && str[i+1].isLowSurrogate()); - + uint ucs4 = surrogate ? QChar::surrogateToUcs4(str[i], str[i+1]) : str[i].unicode(); if (glyphs->glyphs[glyph_pos] == 0 && str[i].category() != QChar::Separator_Line) { QGlyphLayoutInstance tmp = glyphs->instance(glyph_pos); - for (int x = 1; x < engines.size(); ++x) { + for (int x=1; x < engines.size(); ++x) { + if (!shouldLoadFontEngineForCharacter(x, ucs4)) + continue; + QFontEngine *engine = engines.at(x); + bool deleteThisEngine = false; if (!engine) { const_cast(this)->loadEngine(x); engine = engines.at(x); + deleteThisEngine = true; } Q_ASSERT(engine != 0); if (engine->type() == Box) continue; + glyphs->advances_x[glyph_pos] = glyphs->advances_y[glyph_pos] = 0; glyphs->offsets[glyph_pos] = QFixedPoint(); int num = 2; @@ -1401,13 +1407,17 @@ bool QFontEngineMulti::stringToCMap(const QChar *str, int len, // set the high byte to indicate which engine the glyph came from glyphs->glyphs[glyph_pos] |= (x << 24); break; + } else if (deleteThisEngine) { + const_cast(this)->unloadEngine(x); } } + // ensure we use metrics from the 1st font when we use the fallback image. if (!glyphs->glyphs[glyph_pos]) { glyphs->setInstance(glyph_pos, tmp); } } + if (surrogate) ++i; ++glyph_pos; @@ -1418,6 +1428,29 @@ bool QFontEngineMulti::stringToCMap(const QChar *str, int len, return true; } +bool QFontEngineMulti::shouldLoadFontEngineForCharacter(int at, uint ucs4) const +{ + Q_UNUSED(at); + Q_UNUSED(ucs4); + return true; +} + +void QFontEngineMulti::unloadEngine(int at) +{ + QFontEngine *fontEngine = engines.at(at); + if (fontEngine == 0) + return; + + // If there are other references to the engine, keep it around and keep the reference + if (fontEngine->ref.load() == 1) { + QFontCache::instance()->removeEngine(fontEngine); + if (fontEngine->cache_count == 0) { + delete fontEngine; + engines[at] = 0; + } + } +} + glyph_metrics_t QFontEngineMulti::boundingBox(const QGlyphLayout &glyphs) { if (glyphs.numGlyphs <= 0) diff --git a/src/gui/text/qfontengine_ft.cpp b/src/gui/text/qfontengine_ft.cpp index cecf9d1feb6..14e2dba3644 100644 --- a/src/gui/text/qfontengine_ft.cpp +++ b/src/gui/text/qfontengine_ft.cpp @@ -49,7 +49,7 @@ #ifndef QT_NO_FREETYPE #include "qfile.h" -#include "qabstractfileengine.h" +#include "qfileinfo.h" #include "qthreadstorage.h" #include @@ -231,7 +231,7 @@ QFreetypeFace *QFreetypeFace::getFace(const QFontEngine::FaceId &face_id, QScopedPointer newFreetype(new QFreetypeFace); FT_Face face; if (!face_id.filename.isEmpty()) { - QFile file(QString::fromUtf8(face_id.filename)); + QString fileName = QString::fromUtf8(face_id.filename); if (face_id.filename.startsWith(":qmemoryfonts/")) { // from qfontdatabase.cpp QByteArray idx = face_id.filename; @@ -240,7 +240,8 @@ QFreetypeFace *QFreetypeFace::getFace(const QFontEngine::FaceId &face_id, newFreetype->fontData = qt_fontdata_from_index(idx.toInt(&ok)); if (!ok) newFreetype->fontData = QByteArray(); - } else if (!(file.fileEngine()->fileFlags(QAbstractFileEngine::FlagsMask) & QAbstractFileEngine::LocalDiskFlag)) { + } else if (!QFileInfo(fileName).isNativePath()) { + QFile file(fileName); if (!file.open(QIODevice::ReadOnly)) { return 0; } @@ -876,7 +877,7 @@ QFontEngineFT::Glyph *QFontEngineFT::loadGlyph(QGlyphSet *set, uint glyph, if (err != FT_Err_Ok) qWarning("load glyph failed err=%x face=%p, glyph=%d", err, face, glyph); - if ((!set || set->outline_drawing) && fetchMetricsOnly) + if (!set || set->outline_drawing || fetchMetricsOnly) return 0; FT_GlyphSlot slot = face->glyph; @@ -1172,8 +1173,7 @@ QFixed QFontEngineFT::ascent() const QFixed QFontEngineFT::descent() const { - // subtract a pixel to work around QFontMetrics's built-in + 1 - return QFixed::fromFixed(-metrics.descender - 64); + return QFixed::fromFixed(-metrics.descender); } QFixed QFontEngineFT::leading() const @@ -1588,7 +1588,7 @@ glyph_metrics_t QFontEngineFT::boundingBox(const QGlyphLayout &glyphs) glyph_metrics_t overall; // initialize with line height, we get the same behaviour on all platforms overall.y = -ascent(); - overall.height = ascent() + descent() + 1; + overall.height = ascent() + descent(); QFixed ymax = 0; QFixed xmax = 0; diff --git a/src/gui/text/qfontengine_ft_p.h b/src/gui/text/qfontengine_ft_p.h index a9e67c10e8a..83b51685c03 100644 --- a/src/gui/text/qfontengine_ft_p.h +++ b/src/gui/text/qfontengine_ft_p.h @@ -328,6 +328,7 @@ protected: private: friend class QFontEngineFTRawFont; friend class QFontconfigDatabase; + friend class QFontEngineMultiFontConfig; int loadFlags(QGlyphSet *set, GlyphFormat format, int flags, bool &hsubpixel, int &vfactor) const; diff --git a/src/gui/text/qfontengine_p.h b/src/gui/text/qfontengine_p.h index c0bd1afb80c..023882d5600 100644 --- a/src/gui/text/qfontengine_p.h +++ b/src/gui/text/qfontengine_p.h @@ -392,11 +392,14 @@ public: loadEngine(at); } + virtual bool shouldLoadFontEngineForCharacter(int at, uint ucs4) const; + protected: friend class QPSPrintEnginePrivate; friend class QPSPrintEngineFontMulti; friend class QRawFont; virtual void loadEngine(int at) = 0; + virtual void unloadEngine(int at); QVector engines; }; diff --git a/src/gui/text/qfontengine_qpa_p.h b/src/gui/text/qfontengine_qpa_p.h index 6a73b9d3096..ed2e071ac2a 100644 --- a/src/gui/text/qfontengine_qpa_p.h +++ b/src/gui/text/qfontengine_qpa_p.h @@ -243,13 +243,16 @@ struct QPAGenerator QFontEngine *fe; }; -class QFontEngineMultiQPA : public QFontEngineMulti +class Q_GUI_EXPORT QFontEngineMultiQPA : public QFontEngineMulti { public: QFontEngineMultiQPA(QFontEngine *fe, int script, const QStringList &fallbacks); void loadEngine(int at); + int fallbackFamilyCount() const { return fallbackFamilies.size(); } + QString fallbackFamilyAt(int at) const { return fallbackFamilies.at(at); } + private: QStringList fallbackFamilies; int script; diff --git a/src/gui/text/qfontenginedirectwrite.cpp b/src/gui/text/qfontenginedirectwrite.cpp index afbc41daeb9..0f21ae8a1ea 100644 --- a/src/gui/text/qfontenginedirectwrite.cpp +++ b/src/gui/text/qfontenginedirectwrite.cpp @@ -484,8 +484,8 @@ QFixed QFontEngineDirectWrite::ascent() const QFixed QFontEngineDirectWrite::descent() const { return fontDef.styleStrategy & QFont::ForceIntegerMetrics - ? (m_descent - 1).round() - : (m_descent - 1); + ? (m_descent).round() + : (m_descent); } QFixed QFontEngineDirectWrite::leading() const diff --git a/src/gui/text/qfontmetrics.cpp b/src/gui/text/qfontmetrics.cpp index a2f0dd724af..283494e316b 100644 --- a/src/gui/text/qfontmetrics.cpp +++ b/src/gui/text/qfontmetrics.cpp @@ -288,7 +288,7 @@ int QFontMetrics::height() const { QFontEngine *engine = d->engineForScript(QUnicodeTables::Common); Q_ASSERT(engine != 0); - return qRound(engine->ascent()) + qRound(engine->descent()) + 1; + return qRound(engine->ascent()) + qRound(engine->descent()); } /*! @@ -316,7 +316,7 @@ int QFontMetrics::lineSpacing() const { QFontEngine *engine = d->engineForScript(QUnicodeTables::Common); Q_ASSERT(engine != 0); - return qRound(engine->leading()) + qRound(engine->ascent()) + qRound(engine->descent()) + 1; + return qRound(engine->leading()) + qRound(engine->ascent()) + qRound(engine->descent()); } /*! @@ -1147,7 +1147,7 @@ qreal QFontMetricsF::height() const QFontEngine *engine = d->engineForScript(QUnicodeTables::Common); Q_ASSERT(engine != 0); - return (engine->ascent() + engine->descent() + 1).toReal(); + return (engine->ascent() + engine->descent()).toReal(); } /*! @@ -1175,7 +1175,7 @@ qreal QFontMetricsF::lineSpacing() const { QFontEngine *engine = d->engineForScript(QUnicodeTables::Common); Q_ASSERT(engine != 0); - return (engine->leading() + engine->ascent() + engine->descent() + 1).toReal(); + return (engine->leading() + engine->ascent() + engine->descent()).toReal(); } /*! diff --git a/src/gui/text/qplatformfontdatabase_qpa.cpp b/src/gui/text/qplatformfontdatabase_qpa.cpp index f9cc97cbc7a..8fcf4213306 100644 --- a/src/gui/text/qplatformfontdatabase_qpa.cpp +++ b/src/gui/text/qplatformfontdatabase_qpa.cpp @@ -270,6 +270,18 @@ void QPlatformFontDatabase::populateFontDatabase() } } +/*! + Returns a multi font engine in the specified \a script to encapsulate \a fontEngine with the + option to fall back to to the fonts given by \a fallbacks if \a fontEngine does not support + a certain character. +*/ +QFontEngineMulti *QPlatformFontDatabase::fontEngineMulti(QFontEngine *fontEngine, + QUnicodeTables::Script script, + const QStringList &fallbacks) +{ + return new QFontEngineMultiQPA(fontEngine, script, fallbacks); +} + /*! Returns the font engine that can be used to render the font described by the font definition, \a fontDef, in the specified \a script. diff --git a/src/gui/text/qplatformfontdatabase_qpa.h b/src/gui/text/qplatformfontdatabase_qpa.h index 151442c5e15..6a58a3106ce 100644 --- a/src/gui/text/qplatformfontdatabase_qpa.h +++ b/src/gui/text/qplatformfontdatabase_qpa.h @@ -82,12 +82,14 @@ Q_GUI_EXPORT bool operator==(const QSupportedWritingSystems &, const QSupportedW Q_GUI_EXPORT bool operator!=(const QSupportedWritingSystems &, const QSupportedWritingSystems &); class QFontRequestPrivate; +class QFontEngineMulti; class Q_GUI_EXPORT QPlatformFontDatabase { public: virtual ~QPlatformFontDatabase(); virtual void populateFontDatabase(); + virtual QFontEngineMulti *fontEngineMulti(QFontEngine *fontEngine, QUnicodeTables::Script script, const QStringList &fallbacks); virtual QFontEngine *fontEngine(const QFontDef &fontDef, QUnicodeTables::Script script, void *handle); virtual QStringList fallbacksForFamily(const QString family, const QFont::Style &style, const QFont::StyleHint &styleHint, const QUnicodeTables::Script &script) const; virtual QStringList addApplicationFont(const QByteArray &fontData, const QString &fileName); diff --git a/src/gui/text/qrawfont_qpa.cpp b/src/gui/text/qrawfont_qpa.cpp index e9515fdf97b..d037d5902d3 100644 --- a/src/gui/text/qrawfont_qpa.cpp +++ b/src/gui/text/qrawfont_qpa.cpp @@ -44,6 +44,7 @@ #if !defined(QT_NO_RAWFONT) #include "qrawfont_p.h" +#include "qplatformintegration_qpa.h" #include #include diff --git a/src/gui/text/qtextcursor.cpp b/src/gui/text/qtextcursor.cpp index 25ec09d9db1..ddf2fb080e2 100644 --- a/src/gui/text/qtextcursor.cpp +++ b/src/gui/text/qtextcursor.cpp @@ -414,11 +414,18 @@ bool QTextCursorPrivate::movePosition(QTextCursor::MoveOperation op, QTextCursor break; } case QTextCursor::PreviousCharacter: - newPosition = priv->previousCursorPosition(position, QTextLayout::SkipCharacters); + if (mode == QTextCursor::MoveAnchor && position != adjusted_anchor) + newPosition = qMin(position, adjusted_anchor); + else + newPosition = priv->previousCursorPosition(position, QTextLayout::SkipCharacters); break; case QTextCursor::Left: - newPosition = visualMovement ? priv->leftCursorPosition(position) - : priv->previousCursorPosition(position, QTextLayout::SkipCharacters); + if (mode == QTextCursor::MoveAnchor && position != adjusted_anchor) + newPosition = visualMovement ? qMax(position, adjusted_anchor) + : qMin(position, adjusted_anchor); + else + newPosition = visualMovement ? priv->leftCursorPosition(position) + : priv->previousCursorPosition(position, QTextLayout::SkipCharacters); break; case QTextCursor::StartOfWord: { if (relativePos == 0) @@ -530,11 +537,18 @@ bool QTextCursorPrivate::movePosition(QTextCursor::MoveOperation op, QTextCursor break; } case QTextCursor::NextCharacter: - newPosition = priv->nextCursorPosition(position, QTextLayout::SkipCharacters); + if (mode == QTextCursor::MoveAnchor && position != adjusted_anchor) + newPosition = qMax(position, adjusted_anchor); + else + newPosition = priv->nextCursorPosition(position, QTextLayout::SkipCharacters); break; case QTextCursor::Right: - newPosition = visualMovement ? priv->rightCursorPosition(position) - : priv->nextCursorPosition(position, QTextLayout::SkipCharacters); + if (mode == QTextCursor::MoveAnchor && position != adjusted_anchor) + newPosition = visualMovement ? qMin(position, adjusted_anchor) + : qMax(position, adjusted_anchor); + else + newPosition = visualMovement ? priv->rightCursorPosition(position) + : priv->nextCursorPosition(position, QTextLayout::SkipCharacters); break; case QTextCursor::NextWord: case QTextCursor::WordRight: diff --git a/src/gui/text/qtextdocumentlayout.cpp b/src/gui/text/qtextdocumentlayout.cpp index cc3372d6e89..2aedfe9133a 100644 --- a/src/gui/text/qtextdocumentlayout.cpp +++ b/src/gui/text/qtextdocumentlayout.cpp @@ -3002,15 +3002,15 @@ void QTextDocumentLayout::resizeInlineObject(QTextInlineObject item, int posInDo { case QTextCharFormat::AlignMiddle: item.setDescent(inlineSize.height() / 2); - item.setAscent(inlineSize.height() / 2 - 1); + item.setAscent(inlineSize.height() / 2); break; case QTextCharFormat::AlignBaseline: item.setDescent(m.descent()); - item.setAscent(inlineSize.height() - m.descent() - 1); + item.setAscent(inlineSize.height() - m.descent()); break; default: item.setDescent(0); - item.setAscent(inlineSize.height() - 1); + item.setAscent(inlineSize.height()); } } diff --git a/src/gui/text/qtextengine.cpp b/src/gui/text/qtextengine.cpp index 5e5354a9806..bc7f4f7ad67 100644 --- a/src/gui/text/qtextengine.cpp +++ b/src/gui/text/qtextengine.cpp @@ -2237,7 +2237,7 @@ static inline bool prevCharJoins(const QString &string, int pos) return (joining == QChar::Dual || joining == QChar::Center); } -QString QTextEngine::elidedText(Qt::TextElideMode mode, const QFixed &width, int flags) const +QString QTextEngine::elidedText(Qt::TextElideMode mode, const QFixed &width, int flags, int from, int count) const { // qDebug() << "elidedText; available width" << width.toReal() << "text width:" << this->width(0, layoutData->string.length()).toReal(); @@ -2271,10 +2271,14 @@ QString QTextEngine::elidedText(Qt::TextElideMode mode, const QFixed &width, int validate(); + const int to = count >= 0 && count <= layoutData->string.length() - from + ? from + count + : layoutData->string.length(); + if (mode == Qt::ElideNone - || this->width(0, layoutData->string.length()) <= width - || layoutData->string.length() <= 1) - return layoutData->string; + || this->width(from, layoutData->string.length()) <= width + || to - from <= 1) + return layoutData->string.mid(from, from - to); QFixed ellipsisWidth; QString ellipsisText; @@ -2328,7 +2332,7 @@ QString QTextEngine::elidedText(Qt::TextElideMode mode, const QFixed &width, int if (mode == Qt::ElideRight) { QFixed currentWidth; int pos; - int nextBreak = 0; + int nextBreak = from; do { pos = nextBreak; @@ -2338,17 +2342,17 @@ QString QTextEngine::elidedText(Qt::TextElideMode mode, const QFixed &width, int ++nextBreak; currentWidth += this->width(pos, nextBreak - pos); - } while (nextBreak < layoutData->string.length() + } while (nextBreak < to && currentWidth < availableWidth); if (nextCharJoins(layoutData->string, pos)) ellipsisText.prepend(QChar(0x200d) /* ZWJ */); - return layoutData->string.left(pos) + ellipsisText; + return layoutData->string.mid(from, pos - from) + ellipsisText; } else if (mode == Qt::ElideLeft) { QFixed currentWidth; int pos; - int nextBreak = layoutData->string.length(); + int nextBreak = to; do { pos = nextBreak; @@ -2358,22 +2362,22 @@ QString QTextEngine::elidedText(Qt::TextElideMode mode, const QFixed &width, int --nextBreak; currentWidth += this->width(nextBreak, pos - nextBreak); - } while (nextBreak > 0 + } while (nextBreak > from && currentWidth < availableWidth); if (prevCharJoins(layoutData->string, pos)) ellipsisText.append(QChar(0x200d) /* ZWJ */); - return ellipsisText + layoutData->string.mid(pos); + return ellipsisText + layoutData->string.mid(pos, to - pos); } else if (mode == Qt::ElideMiddle) { QFixed leftWidth; QFixed rightWidth; - int leftPos = 0; - int nextLeftBreak = 0; + int leftPos = from; + int nextLeftBreak = from; - int rightPos = layoutData->string.length(); - int nextRightBreak = layoutData->string.length(); + int rightPos = to; + int nextRightBreak = to; do { leftPos = nextLeftBreak; @@ -2384,13 +2388,13 @@ QString QTextEngine::elidedText(Qt::TextElideMode mode, const QFixed &width, int ++nextLeftBreak; --nextRightBreak; - while (nextRightBreak > 0 && !attributes[nextRightBreak].charStop) + while (nextRightBreak > from && !attributes[nextRightBreak].charStop) --nextRightBreak; leftWidth += this->width(leftPos, nextLeftBreak - leftPos); rightWidth += this->width(nextRightBreak, rightPos - nextRightBreak); - } while (nextLeftBreak < layoutData->string.length() - && nextRightBreak > 0 + } while (nextLeftBreak < to + && nextRightBreak > from && leftWidth + rightWidth < availableWidth); if (nextCharJoins(layoutData->string, leftPos)) @@ -2398,10 +2402,10 @@ QString QTextEngine::elidedText(Qt::TextElideMode mode, const QFixed &width, int if (prevCharJoins(layoutData->string, rightPos)) ellipsisText.append(QChar(0x200d) /* ZWJ */); - return layoutData->string.left(leftPos) + ellipsisText + layoutData->string.mid(rightPos); + return layoutData->string.mid(from, leftPos - from) + ellipsisText + layoutData->string.mid(rightPos, to - rightPos); } - return layoutData->string; + return layoutData->string.mid(from, to - from); } void QTextEngine::setBoundary(int strPos) const diff --git a/src/gui/text/qtextengine_p.h b/src/gui/text/qtextengine_p.h index 641d946aa94..b29f626b68f 100644 --- a/src/gui/text/qtextengine_p.h +++ b/src/gui/text/qtextengine_p.h @@ -366,7 +366,7 @@ struct Q_AUTOTEST_EXPORT QScriptItem QFixed leading; QFixed width; int glyph_data_offset; - QFixed height() const { return ascent + descent + 1; } + QFixed height() const { return ascent + descent; } }; @@ -396,7 +396,7 @@ struct Q_AUTOTEST_EXPORT QScriptLine mutable uint gridfitted : 1; uint hasTrailingSpaces : 1; uint leadingIncluded : 1; - QFixed height() const { return (ascent + descent).ceil() + 1 + QFixed height() const { return (ascent + descent).ceil() + (leadingIncluded? qMax(QFixed(),leading) : QFixed()); } QFixed base() const { return ascent + (leadingIncluded ? qMax(QFixed(),leading) : QFixed()); } @@ -619,7 +619,7 @@ public: bool atSpace(int position) const; void indexAdditionalFormats(); - QString elidedText(Qt::TextElideMode mode, const QFixed &width, int flags = 0) const; + QString elidedText(Qt::TextElideMode mode, const QFixed &width, int flags = 0, int from = 0, int count = -1) const; void shapeLine(const QScriptLine &line); QFixed leadingSpaceWidth(const QScriptLine &line); diff --git a/src/gui/text/qtextlayout.cpp b/src/gui/text/qtextlayout.cpp index ac92c4dd516..943caea6449 100644 --- a/src/gui/text/qtextlayout.cpp +++ b/src/gui/text/qtextlayout.cpp @@ -1429,9 +1429,9 @@ qreal QTextLine::descent() const } /*! - Returns the line's height. This is equal to ascent() + descent() + 1 + Returns the line's height. This is equal to ascent() + descent() if leading is not included. If leading is included, this equals to - ascent() + descent() + leading() + 1. + ascent() + descent() + leading(). \sa ascent(), descent(), leading(), setLeadingIncluded() */ @@ -2124,8 +2124,8 @@ static QGlyphRun glyphRunWithInfo(QFontEngine *fontEngine, const QGlyphLayout &g Q_ASSERT(glyphsArray.size() == positionsArray.size()); qreal fontHeight = font.ascent() + font.descent(); - qreal minY; - qreal maxY; + qreal minY = 0; + qreal maxY = 0; QVector glyphs; QVector positions; for (int i=0; i -#include "qdesktopservices_qpa.cpp" - #include #include #include #include +#include #include #include +#include +#include QT_BEGIN_NAMESPACE @@ -185,14 +186,15 @@ bool QDesktopServices::openUrl(const QUrl &url) return result; // ### support bool slot return type } } - - bool result; - if (url.scheme() == QLatin1String("file")) - result = openDocument(url); - else - result = launchWebBrowser(url); - - return result; + if (!url.isValid()) + return false; + QPlatformServices *platformServices = QGuiApplicationPrivate::platformIntegration()->services(); + if (!platformServices) { + qWarning("%s: The platform plugin does not support services.", Q_FUNC_INFO); + return false; + } + return url.scheme() == QStringLiteral("file") ? + platformServices->openDocument(url) : platformServices->openUrl(url); } /*! diff --git a/src/gui/util/qdesktopservices_mac.cpp b/src/gui/util/qdesktopservices_mac.cpp deleted file mode 100644 index 84c7156ef3f..00000000000 --- a/src/gui/util/qdesktopservices_mac.cpp +++ /dev/null @@ -1,127 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the QtGui module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QT_NO_DESKTOPSERVICES - -#include -#include -#include -#include -#include -#include - -#include - -QT_BEGIN_NAMESPACE - -/* - Translates a QDesktopServices::StandardLocation into the mac equivalent. -*/ -OSType translateLocation(QDesktopServices::StandardLocation type) -{ - switch (type) { - case QDesktopServices::DesktopLocation: - return kDesktopFolderType; break; - - case QDesktopServices::DocumentsLocation: - return kDocumentsFolderType; break; - - case QDesktopServices::FontsLocation: - // There are at least two different font directories on the mac: /Library/Fonts and ~/Library/Fonts. - // To select a specific one we have to specify a different first parameter when calling FSFindFolder. - return kFontsFolderType; break; - - case QDesktopServices::ApplicationsLocation: - return kApplicationsFolderType; break; - - case QDesktopServices::MusicLocation: - return kMusicDocumentsFolderType; break; - - case QDesktopServices::MoviesLocation: - return kMovieDocumentsFolderType; break; - - case QDesktopServices::PicturesLocation: - return kPictureDocumentsFolderType; break; - - case QDesktopServices::TempLocation: - return kTemporaryFolderType; break; - - case QDesktopServices::DataLocation: - return kApplicationSupportFolderType; break; - - case QDesktopServices::CacheLocation: - return kCachedDataFolderType; break; - - default: - return kDesktopFolderType; break; - } -} - -static bool lsOpen(const QUrl &url) -{ - if (!url.isValid() || url.scheme().isEmpty()) - return false; - - QCFType cfUrl = CFURLCreateWithString(0, QCFString(QString::fromLatin1(url.toEncoded())), 0); - if (cfUrl == 0) - return false; - - const OSStatus err = LSOpenCFURLRef(cfUrl, 0); - return (err == noErr); -} - -static bool launchWebBrowser(const QUrl &url) -{ - return lsOpen(url); -} - -static bool openDocument(const QUrl &file) -{ - if (!file.isValid()) - return false; - - // LSOpen does not work in this case, use QProcess open instead. - return QProcess::startDetached(QLatin1String("open"), QStringList() << file.toLocalFile()); -} - -QT_END_NAMESPACE - -#endif // QT_NO_DESKTOPSERVICES diff --git a/src/gui/util/qdesktopservices_win.cpp b/src/gui/util/qdesktopservices_win.cpp deleted file mode 100644 index 88f245d6f67..00000000000 --- a/src/gui/util/qdesktopservices_win.cpp +++ /dev/null @@ -1,177 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the QtGui module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#if !defined(Q_OS_WINCE) -# include -#else -# include -# if !defined(STANDARDSHELL_UI_MODEL) -# include -# endif -#endif - -#ifndef CSIDL_MYMUSIC -#define CSIDL_MYMUSIC 13 -#define CSIDL_MYVIDEO 14 -#endif - -#ifndef QT_NO_DESKTOPSERVICES - -QT_BEGIN_NAMESPACE - -static bool openDocument(const QUrl &file) -{ - if (!file.isValid()) - return false; - QString filePath = file.toLocalFile(); - if (filePath.isEmpty()) - filePath = file.toString(); - quintptr returnValue = (quintptr)ShellExecute(0, 0, (wchar_t*)filePath.utf16(), 0, 0, SW_SHOWNORMAL); - return (returnValue > 32); //ShellExecute returns a value greater than 32 if successful -} - -static QString expandEnvStrings(const QString &command) -{ -#if defined(Q_OS_WINCE) - return command; -#else - wchar_t buffer[MAX_PATH]; - if (ExpandEnvironmentStrings((wchar_t*)command.utf16(), buffer, MAX_PATH)) - return QString::fromWCharArray(buffer); - else - return command; -#endif -} - -static bool launchWebBrowser(const QUrl &url) -{ - if (url.scheme() == QLatin1String("mailto")) { - //Retrieve the commandline for the default mail client - //the default key used below is the command line for the mailto: shell command - DWORD bufferSize = sizeof(wchar_t) * MAX_PATH; - long returnValue = -1; - QString command; - - HKEY handle; - LONG res; - wchar_t keyValue[MAX_PATH] = {0}; - QString keyName(QLatin1String("mailto")); - - //Check if user has set preference, otherwise use default. - res = RegOpenKeyEx(HKEY_CURRENT_USER, - L"Software\\Microsoft\\Windows\\Shell\\Associations\\UrlAssociations\\mailto\\UserChoice", - 0, KEY_READ, &handle); - if (res == ERROR_SUCCESS) { - returnValue = RegQueryValueEx(handle, L"Progid", 0, 0, reinterpret_cast(keyValue), &bufferSize); - if (!returnValue) - keyName = QString::fromUtf16((const ushort*)keyValue); - RegCloseKey(handle); - } - keyName += QLatin1String("\\Shell\\Open\\Command"); - res = RegOpenKeyExW(HKEY_CLASSES_ROOT, (const wchar_t*)keyName.utf16(), 0, KEY_READ, &handle); - if (res != ERROR_SUCCESS) - return false; - - bufferSize = sizeof(wchar_t) * MAX_PATH; - returnValue = RegQueryValueEx(handle, L"", 0, 0, reinterpret_cast(keyValue), &bufferSize); - if (!returnValue) - command = QString::fromRawData((QChar*)keyValue, bufferSize); - RegCloseKey(handle); - - if (returnValue) - return false; - - command = expandEnvStrings(command); - command = command.trimmed(); - //Make sure the path for the process is in quotes - int index = -1 ; - if (command[0]!= QLatin1Char('\"')) { - index = command.indexOf(QLatin1String(".exe "), 0, Qt::CaseInsensitive); - command.insert(index+4, QLatin1Char('\"')); - command.insert(0, QLatin1Char('\"')); - } - //pass the url as the parameter - index = command.lastIndexOf(QLatin1String("%1")); - if (index != -1){ - command.replace(index, 2, url.toString()); - } - //start the process - PROCESS_INFORMATION pi; - ZeroMemory(&pi, sizeof(pi)); - STARTUPINFO si; - ZeroMemory(&si, sizeof(si)); - si.cb = sizeof(si); - - returnValue = CreateProcess(NULL, (wchar_t*)command.utf16(), NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi); - - if (!returnValue) - return false; - - CloseHandle(pi.hProcess); - CloseHandle(pi.hThread); - return true; - } - - if (!url.isValid()) - return false; - - if (url.scheme().isEmpty()) - return openDocument(url); - - quintptr returnValue = (quintptr)ShellExecute(0, 0, (wchar_t *)QString::fromUtf8(url.toEncoded().constData()).utf16(), - 0, 0, SW_SHOWNORMAL); - return (returnValue > 32); -} - -QT_END_NAMESPACE - -#endif // QT_NO_DESKTOPSERVICES diff --git a/src/gui/util/qdesktopservices_x11.cpp b/src/gui/util/qdesktopservices_x11.cpp deleted file mode 100644 index 73cf47a1dbc..00000000000 --- a/src/gui/util/qdesktopservices_x11.cpp +++ /dev/null @@ -1,131 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the QtGui module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qdesktopservices.h" - -#ifndef QT_NO_DESKTOPSERVICES - -#include -#include -#include -#include -#include -#include -#include -#include - -QT_BEGIN_NAMESPACE - -inline static bool launch(const QUrl &url, const QString &client) -{ -#if !defined(QT_NO_PROCESS) - return (QProcess::startDetached(client + QLatin1Char(' ') + QString::fromLatin1(url.toEncoded().constData()))); -#else - return (::system((client + QLatin1Char(' ') + QString::fromLatin1(url.toEncoded().constData())).toLocal8Bit().constData()) != -1); -#endif -} - -static bool openDocument(const QUrl &url) -{ - if (!url.isValid()) - return false; - - if (launch(url, QLatin1String("xdg-open"))) - return true; - - // Use the X11->desktopEnvironment value if X11 is non-NULL, - // otherwise just attempt to launch command regardless of the desktop environment - if ((!X11 || (X11 && X11->desktopEnvironment == DE_GNOME)) && launch(url, QLatin1String("gnome-open"))) { - return true; - } else { - if ((!X11 || (X11 && X11->desktopEnvironment == DE_KDE)) && launch(url, QLatin1String("kfmclient exec"))) - return true; - } - - if (launch(url, QLatin1String("firefox"))) - return true; - if (launch(url, QLatin1String("mozilla"))) - return true; - if (launch(url, QLatin1String("netscape"))) - return true; - if (launch(url, QLatin1String("opera"))) - return true; - - return false; -} - -static bool launchWebBrowser(const QUrl &url) -{ - if (!url.isValid()) - return false; - if (url.scheme() == QLatin1String("mailto")) - return openDocument(url); - - if (launch(url, QLatin1String("xdg-open"))) - return true; - if (launch(url, QString::fromLocal8Bit(getenv("DEFAULT_BROWSER")))) - return true; - if (launch(url, QString::fromLocal8Bit(getenv("BROWSER")))) - return true; - - // Use the X11->desktopEnvironment value if X11 is non-NULL, - // otherwise just attempt to launch command regardless of the desktop environment - if ((!X11 || (X11 && X11->desktopEnvironment == DE_GNOME)) && launch(url, QLatin1String("gnome-open"))) { - return true; - } else { - if ((!X11 || (X11 && X11->desktopEnvironment == DE_KDE)) && launch(url, QLatin1String("kfmclient openURL"))) - return true; - } - - if (launch(url, QLatin1String("firefox"))) - return true; - if (launch(url, QLatin1String("mozilla"))) - return true; - if (launch(url, QLatin1String("netscape"))) - return true; - if (launch(url, QLatin1String("opera"))) - return true; - return false; -} - -QT_END_NAMESPACE - -#endif // QT_NO_DESKTOPSERVICES diff --git a/src/network/access/qhttpthreaddelegate.cpp b/src/network/access/qhttpthreaddelegate.cpp index 5cf153325ba..3901635ca07 100644 --- a/src/network/access/qhttpthreaddelegate.cpp +++ b/src/network/access/qhttpthreaddelegate.cpp @@ -560,7 +560,8 @@ void QHttpThreadDelegate::synchronousAuthenticationRequiredSlot(const QHttpNetwo } // Disconnect this connection now since we only want to ask the authentication cache once. - QObject::disconnect(this, SLOT(synchronousAuthenticationRequiredSlot(QHttpNetworkRequest,QAuthenticator*))); + QObject::disconnect(httpReply, SIGNAL(authenticationRequired(QHttpNetworkRequest,QAuthenticator*)), + this, SLOT(synchronousAuthenticationRequiredSlot(QHttpNetworkRequest,QAuthenticator*))); } #ifndef QT_NO_NETWORKPROXY @@ -577,7 +578,8 @@ void QHttpThreadDelegate::synchronousProxyAuthenticationRequiredSlot(const QNet } // Disconnect this connection now since we only want to ask the authentication cache once. - QObject::disconnect(this, SLOT(synchronousProxyAuthenticationRequiredSlot(QNetworkProxy,QAuthenticator*))); + QObject::disconnect(httpReply, SIGNAL(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)), + this, SLOT(synchronousProxyAuthenticationRequiredSlot(QNetworkProxy,QAuthenticator*))); } #endif diff --git a/src/network/access/qnetworkaccessftpbackend.cpp b/src/network/access/qnetworkaccessftpbackend.cpp index 98967e730e9..42201aa9a31 100644 --- a/src/network/access/qnetworkaccessftpbackend.cpp +++ b/src/network/access/qnetworkaccessftpbackend.cpp @@ -179,11 +179,7 @@ void QNetworkAccessFtpBackend::closeDownstreamChannel() { state = Disconnecting; if (operation() == QNetworkAccessManager::GetOperation) -#ifndef Q_OS_WINCE - abort(); -#else - exit(3); -#endif + ftp->abort(); } void QNetworkAccessFtpBackend::downstreamReadyWrite() diff --git a/src/network/access/qnetworkaccessmanager.cpp b/src/network/access/qnetworkaccessmanager.cpp index 85375021169..7be9d278f79 100644 --- a/src/network/access/qnetworkaccessmanager.cpp +++ b/src/network/access/qnetworkaccessmanager.cpp @@ -1094,6 +1094,16 @@ void QNetworkAccessManagerPrivate::authenticationRequired(QAuthenticator *authen // also called when last URL is empty, e.g. on first call if (urlForLastAuthentication->isEmpty() || url != *urlForLastAuthentication) { + // if credentials are included in the url, then use them + if (!url.userName().isEmpty() + && !url.password().isEmpty()) { + authenticator->setUser(url.userName()); + authenticator->setPassword(url.password()); + *urlForLastAuthentication = url; + authenticationManager->cacheCredentials(url, authenticator); + return; + } + QNetworkAuthenticationCredential cred = authenticationManager->fetchCachedCredentials(url, authenticator); if (!cred.isNull()) { authenticator->setUser(cred.user); diff --git a/src/network/access/qnetworkcookie.cpp b/src/network/access/qnetworkcookie.cpp index c987c50017a..88b021d7806 100644 --- a/src/network/access/qnetworkcookie.cpp +++ b/src/network/access/qnetworkcookie.cpp @@ -58,6 +58,8 @@ QT_BEGIN_NAMESPACE /*! \class QNetworkCookie \since 4.4 + \inmodule QtNetwork + \brief The QNetworkCookie class holds one network cookie. Cookies are small bits of information that stateless protocols diff --git a/src/network/access/qnetworkcookiejar.cpp b/src/network/access/qnetworkcookiejar.cpp index 4136043e2eb..a7436cb38c0 100644 --- a/src/network/access/qnetworkcookiejar.cpp +++ b/src/network/access/qnetworkcookiejar.cpp @@ -51,8 +51,10 @@ QT_BEGIN_NAMESPACE /*! \class QNetworkCookieJar - \brief The QNetworkCookieJar class implements a simple jar of QNetworkCookie objects \since 4.4 + \inmodule QtNetwork + + \brief The QNetworkCookieJar class implements a simple jar of QNetworkCookie objects Cookies are small bits of information that stateless protocols like HTTP use to maintain some persistent information across diff --git a/src/network/access/qnetworkrequest.cpp b/src/network/access/qnetworkrequest.cpp index b9c149e5d89..ef81b6081d1 100644 --- a/src/network/access/qnetworkrequest.cpp +++ b/src/network/access/qnetworkrequest.cpp @@ -57,12 +57,12 @@ QT_BEGIN_NAMESPACE /*! \class QNetworkRequest - \brief The QNetworkRequest class holds a request to be sent with QNetworkAccessManager. \since 4.4 - \ingroup network \inmodule QtNetwork + \brief The QNetworkRequest class holds a request to be sent with QNetworkAccessManager. + QNetworkRequest is part of the Network Access API and is the class holding the information necessary to send a request over the network. It contains a URL and some ancillary information that can @@ -115,7 +115,7 @@ QT_BEGIN_NAMESPACE /*! \enum QNetworkRequest::Attribute \since 4.7 - + Attribute codes for the QNetworkRequest and QNetworkReply. Attributes are extra meta-data that are used to control the @@ -606,7 +606,7 @@ QNetworkRequest::Priority QNetworkRequest::priority() const /*! \enum QNetworkRequest::Priority \since 4.7 - + This enum lists the possible network request priorities. \value HighPriority High priority diff --git a/src/network/kernel/kernel.pri b/src/network/kernel/kernel.pri index ea937da5183..adc72bbcbb6 100644 --- a/src/network/kernel/kernel.pri +++ b/src/network/kernel/kernel.pri @@ -8,10 +8,12 @@ HEADERS += kernel/qauthenticator.h \ kernel/qdnslookup.h \ kernel/qdnslookup_p.h \ kernel/qhostaddress.h \ + kernel/qhostaddress_p.h \ kernel/qhostinfo.h \ kernel/qhostinfo_p.h \ kernel/qurlinfo.h \ kernel/qnetworkproxy.h \ + kernel/qnetworkproxy_p.h \ kernel/qnetworkinterface.h \ kernel/qnetworkinterface_p.h @@ -24,7 +26,10 @@ SOURCES += kernel/qauthenticator.cpp \ kernel/qnetworkinterface.cpp unix:SOURCES += kernel/qdnslookup_unix.cpp kernel/qhostinfo_unix.cpp kernel/qnetworkinterface_unix.cpp -win32:SOURCES += kernel/qdnslookup_win.cpp kernel/qhostinfo_win.cpp kernel/qnetworkinterface_win.cpp +win32: { + HEADERS += kernel/qnetworkinterface_win_p.h + SOURCES += kernel/qdnslookup_win.cpp kernel/qhostinfo_win.cpp kernel/qnetworkinterface_win.cpp +} integrity:SOURCES += kernel/qdnslookup_unix.cpp kernel/qhostinfo_unix.cpp kernel/qnetworkinterface_unix.cpp mac:LIBS_PRIVATE += -framework SystemConfiguration -framework CoreFoundation diff --git a/src/network/kernel/qauthenticator.cpp b/src/network/kernel/qauthenticator.cpp index 36f47eb5b4e..b14fbf8c30d 100644 --- a/src/network/kernel/qauthenticator.cpp +++ b/src/network/kernel/qauthenticator.cpp @@ -81,12 +81,10 @@ static QByteArray qNtlmPhase3(QAuthenticatorPrivate *ctx, const QByteArray& phas QAuthenticator supports the following authentication methods: \list \o Basic - \o NTLM version 1 + \o NTLM version 2 \o Digest-MD5 \endlist - Note that, in particular, NTLM version 2 is not supported. - \section1 Options In addition to the username and password required for authentication, a @@ -112,7 +110,7 @@ static QByteArray qNtlmPhase3(QAuthenticatorPrivate *ctx, const QByteArray& phas The Basic authentication mechanism supports no outgoing options. - \section2 NTLM version 1 + \section2 NTLM version 2 The NTLM authentication mechanism currently supports no incoming or outgoing options. diff --git a/src/network/kernel/qdnslookup_win.cpp b/src/network/kernel/qdnslookup_win.cpp index ba97e649421..9b2c088ee27 100644 --- a/src/network/kernel/qdnslookup_win.cpp +++ b/src/network/kernel/qdnslookup_win.cpp @@ -39,6 +39,7 @@ ** ****************************************************************************/ +#include #include "qdnslookup_p.h" #include diff --git a/src/network/kernel/qhostaddress.cpp b/src/network/kernel/qhostaddress.cpp index b68335314fb..dd46b8126b2 100644 --- a/src/network/kernel/qhostaddress.cpp +++ b/src/network/kernel/qhostaddress.cpp @@ -38,6 +38,7 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ + #include "qhostaddress.h" #include "qhostaddress_p.h" #include "qdebug.h" diff --git a/src/network/kernel/qhostaddress_p.h b/src/network/kernel/qhostaddress_p.h index 26dbf861f2b..0471d4414a8 100644 --- a/src/network/kernel/qhostaddress_p.h +++ b/src/network/kernel/qhostaddress_p.h @@ -53,11 +53,11 @@ // We mean it. // -QT_BEGIN_NAMESPACE - #include "qhostaddress.h" #include "qabstractsocket.h" +QT_BEGIN_NAMESPACE + class QNetmaskAddress: public QHostAddress { int length; diff --git a/src/network/kernel/qhostinfo_win.cpp b/src/network/kernel/qhostinfo_win.cpp index a00389e3ede..8ace68d9614 100644 --- a/src/network/kernel/qhostinfo_win.cpp +++ b/src/network/kernel/qhostinfo_win.cpp @@ -95,6 +95,22 @@ static void resolveLibrary() #endif } +static void translateWSAError(int error, QHostInfo *results) +{ + switch (error) { + case WSAHOST_NOT_FOUND: //authoritative not found + case WSATRY_AGAIN: //non authoritative not found + case WSANO_DATA: //valid name, no associated address + results->setError(QHostInfo::HostNotFound); + results->setErrorString(QHostInfoAgent::tr("Host not found")); + return; + default: + results->setError(QHostInfo::UnknownError); + results->setErrorString(QHostInfoAgent::tr("Unknown error (%1)").arg(error)); + return; + } +} + QHostInfo QHostInfoAgent::fromName(const QString &hostName) { #if defined(Q_OS_WINCE) @@ -200,12 +216,8 @@ QHostInfo QHostInfoAgent::fromName(const QString &hostName) } results.setAddresses(addresses); local_freeaddrinfo(res); - } else if (WSAGetLastError() == WSAHOST_NOT_FOUND || WSAGetLastError() == WSANO_DATA) { - results.setError(QHostInfo::HostNotFound); - results.setErrorString(tr("Host not found")); } else { - results.setError(QHostInfo::UnknownError); - results.setErrorString(tr("Unknown error")); + translateWSAError(WSAGetLastError(), &results); } } else { // Fall back to gethostbyname, which only supports IPv4. @@ -228,12 +240,8 @@ QHostInfo QHostInfoAgent::fromName(const QString &hostName) break; } results.setAddresses(addresses); - } else if (WSAGetLastError() == 11001) { - results.setErrorString(tr("Host not found")); - results.setError(QHostInfo::HostNotFound); } else { - results.setErrorString(tr("Unknown error")); - results.setError(QHostInfo::UnknownError); + translateWSAError(WSAGetLastError(), &results); } } diff --git a/src/network/kernel/qnetworkinterface.cpp b/src/network/kernel/qnetworkinterface.cpp index 7b68ed6c125..947b2ab0d93 100644 --- a/src/network/kernel/qnetworkinterface.cpp +++ b/src/network/kernel/qnetworkinterface.cpp @@ -149,6 +149,7 @@ QString QNetworkInterfacePrivate::makeHwAddress(int len, uchar *data) \since 4.2 \reentrant \ingroup network + \inmodule QtNetwork Each network interface can contain zero or more IP addresses, which in turn can be associated with a netmask and/or a broadcast @@ -333,6 +334,7 @@ void QNetworkAddressEntry::setBroadcast(const QHostAddress &newBroadcast) \since 4.2 \reentrant \ingroup network + \inmodule QtNetwork QNetworkInterface represents one network interface attached to the host where the program is being run. Each network interface may diff --git a/src/network/kernel/qnetworkproxy.cpp b/src/network/kernel/qnetworkproxy.cpp index 4070c8f0145..0238d22eb64 100644 --- a/src/network/kernel/qnetworkproxy.cpp +++ b/src/network/kernel/qnetworkproxy.cpp @@ -247,6 +247,12 @@ public: , socks5SocketEngineHandler(0) , httpSocketEngineHandler(0) { +#ifndef QT_NO_SOCKS5 + socks5SocketEngineHandler = new QSocks5SocketEngineHandler(); +#endif +#ifndef QT_NO_HTTP + httpSocketEngineHandler = new QHttpSocketEngineHandler(); +#endif } ~QGlobalNetworkProxy() @@ -257,19 +263,6 @@ public: delete httpSocketEngineHandler; } - void init() - { - QMutexLocker lock(&mutex); -#ifndef QT_NO_SOCKS5 - if (!socks5SocketEngineHandler) - socks5SocketEngineHandler = new QSocks5SocketEngineHandler(); -#endif -#ifndef QT_NO_HTTP - if (!httpSocketEngineHandler) - httpSocketEngineHandler = new QHttpSocketEngineHandler(); -#endif - } - void setApplicationProxy(const QNetworkProxy &proxy) { QMutexLocker lock(&mutex); @@ -431,8 +424,6 @@ template<> void QSharedDataPointer::detach() QNetworkProxy::QNetworkProxy() : d(0) { - if (QGlobalNetworkProxy *globalProxy = globalNetworkProxy()) - globalProxy->init(); } /*! @@ -447,8 +438,6 @@ QNetworkProxy::QNetworkProxy(ProxyType type, const QString &hostName, quint16 po const QString &user, const QString &password) : d(new QNetworkProxyPrivate(type, hostName, port, user, password)) { - if (QGlobalNetworkProxy *globalProxy = globalNetworkProxy()) - globalProxy->init(); } /*! @@ -853,7 +842,7 @@ template<> void QSharedDataPointer::detach() \since 4.5 \inmodule QtNetwork \brief The QNetworkProxyQuery class is used to query the proxy - settings for a socket + settings for a socket. QNetworkProxyQuery holds the details of a socket being created or request being made. It is used by QNetworkProxy and @@ -1440,7 +1429,7 @@ void QNetworkProxyFactory::setApplicationProxyFactory(QNetworkProxyFactory *fact /*! \fn QList QNetworkProxyFactory::queryProxy(const QNetworkProxyQuery &query) - This function examines takes the query request, \a query, + This function takes the query request, \a query, examines the details of the type of socket or request and returns a list of QNetworkProxy objects that indicate the proxy servers to be used, in order of preference. @@ -1461,7 +1450,7 @@ void QNetworkProxyFactory::setApplicationProxyFactory(QNetworkProxyFactory *fact /*! \fn QList QNetworkProxyFactory::systemProxyForQuery(const QNetworkProxyQuery &query) - This function examines takes the query request, \a query, + This function takes the query request, \a query, examines the details of the type of socket or request and returns a list of QNetworkProxy objects that indicate the proxy servers to be used, in order of preference. @@ -1507,7 +1496,7 @@ void QNetworkProxyFactory::setApplicationProxyFactory(QNetworkProxyFactory *fact */ /*! - This function examines takes the query request, \a query, + This function takes the query request, \a query, examines the details of the type of socket or request and returns a list of QNetworkProxy objects that indicate the proxy servers to be used, in order of preference. diff --git a/src/network/kernel/qurlinfo.cpp b/src/network/kernel/qurlinfo.cpp index a446f03b85a..9f571b9e8c1 100644 --- a/src/network/kernel/qurlinfo.cpp +++ b/src/network/kernel/qurlinfo.cpp @@ -86,6 +86,7 @@ public: \ingroup io \ingroup network + \inmodule QtNetwork The information about a URL that can be retrieved includes name(), permissions(), owner(), group(), size(), lastModified(), diff --git a/src/network/socket/qlocalserver.cpp b/src/network/socket/qlocalserver.cpp index b3fe4ac4481..e9848213d87 100644 --- a/src/network/socket/qlocalserver.cpp +++ b/src/network/socket/qlocalserver.cpp @@ -50,6 +50,7 @@ QT_BEGIN_NAMESPACE /*! \class QLocalServer \since 4.4 + \inmodule QtNetwork \brief The QLocalServer class provides a local socket based server. @@ -81,6 +82,27 @@ QT_BEGIN_NAMESPACE \sa QLocalSocket, QTcpServer */ +/*! + \enum QLocalServer::SocketOption + + This enum describes the possible options that can be used to create the + socket. This changes the access permissions on platforms (Linux, Windows) + that support access permissions on the socket. Both GroupAccess and OtherAccess + may vary slightly in meanings depending on the platform. + + \value UserAccess + Access is restricted to the same user as the process that created the socket. + \value GroupAccess + Access is restricted to the same group but not the user that created the socket on Linux. + \value OtherAccess + Access is available to everyone but the user and group that created the socket on Linux. + \value WorldAccess + No access restrictions. + + \sa SocketOptions +*/ + + /*! Create a new local socket server with the given \a parent. @@ -108,6 +130,48 @@ QLocalServer::~QLocalServer() close(); } +/*! + \property QLocalServer::socketOptions + \since 5.0 + + The setSocketOptions method controls how the socket operates. + For example the socket may restrict access to what user ids can + connect to the socket. + + These options must be set before listen() is called. + + In some cases, such as with Unix domain sockets on Linux, the + access to the socket will be determined by file system permissions, + and are created based on the umask. Setting the access flags will + overide this and will restrict or permit access as specified. + + Other Unix-based operating systems, such as Mac OS X, do not + honor file permissions for Unix domain sockets and by default + have WorldAccess and these permission flags will have no effect. + + By default none of the flags are set, access permissions + are the platform default. + + \sa listen() +*/ +void QLocalServer::setSocketOptions(SocketOptions options) +{ + Q_D(QLocalServer); + + d->socketOptions = options; +} + +/*! + Returns the socket options set on the socket. + + \sa setSocketOptions() + */ +QLocalServer::SocketOptions QLocalServer::socketOptions() const +{ + Q_D(const QLocalServer); + return d->socketOptions; +} + /*! Stop listening for incoming connections. Existing connections are not effected, but any new connections will be refused. @@ -235,6 +299,40 @@ bool QLocalServer::listen(const QString &name) return true; } +/*! + \since 5.0 + + Instructs the server to listen for incoming connections on + \a socketDescriptor. The property returns \c false if the server is + currently listening. It returns \c true on success; otherwise, + it returns \c false. The socket must be ready to accept + new connections with no extra platform-specific functions + called. The socket is set into non-blocking mode. + + serverName(), fullServerName() may return a string with + a name if this option is supported by the platform; + otherwise, they return an empty QString. + + \sa isListening(), close() + */ +bool QLocalServer::listen(qintptr socketDescriptor) +{ + Q_D(QLocalServer); + if (isListening()) { + qWarning("QLocalServer::listen() called when already listening"); + return false; + } + + d->serverName.clear(); + d->fullServerName.clear(); + + if (!d->listen(socketDescriptor)) { + return false; + } + + return true; +} + /*! Returns the maximum number of pending accepted connections. The default is 30. diff --git a/src/network/socket/qlocalserver.h b/src/network/socket/qlocalserver.h index f694131953a..291122e10de 100644 --- a/src/network/socket/qlocalserver.h +++ b/src/network/socket/qlocalserver.h @@ -58,11 +58,22 @@ class Q_NETWORK_EXPORT QLocalServer : public QObject { Q_OBJECT Q_DECLARE_PRIVATE(QLocalServer) + Q_PROPERTY(SocketOptions socketOptions READ socketOptions WRITE setSocketOptions) + Q_FLAGS(SocketOption SocketOptions) Q_SIGNALS: void newConnection(); public: + enum SocketOption { + NoOptions = 0x0, + UserAccessOption = 0x01, + GroupAccessOption = 0x2, + OtherAccessOption = 0x4, + WorldAccessOption = 0x7 + }; + Q_DECLARE_FLAGS(SocketOptions, SocketOption) + QLocalServer(QObject *parent = 0); ~QLocalServer(); @@ -71,6 +82,7 @@ public: virtual bool hasPendingConnections() const; bool isListening() const; bool listen(const QString &name); + bool listen(qintptr socketDescriptor); int maxPendingConnections() const; virtual QLocalSocket *nextPendingConnection(); QString serverName() const; @@ -80,6 +92,9 @@ public: void setMaxPendingConnections(int numConnections); bool waitForNewConnection(int msec = 0, bool *timedOut = 0); + void setSocketOptions(SocketOptions options); + SocketOptions socketOptions() const; + protected: virtual void incomingConnection(quintptr socketDescriptor); @@ -88,6 +103,8 @@ private: Q_PRIVATE_SLOT(d_func(), void _q_onNewConnection()) }; +Q_DECLARE_OPERATORS_FOR_FLAGS(QLocalServer::SocketOptions) + #endif // QT_NO_LOCALSERVER QT_END_NAMESPACE diff --git a/src/network/socket/qlocalserver_p.h b/src/network/socket/qlocalserver_p.h index 6e39136dd48..84081159c76 100644 --- a/src/network/socket/qlocalserver_p.h +++ b/src/network/socket/qlocalserver_p.h @@ -80,12 +80,14 @@ public: #if !defined(QT_LOCALSOCKET_TCP) && !defined(Q_OS_WIN) listenSocket(-1), socketNotifier(0), #endif - maxPendingConnections(30), error(QAbstractSocket::UnknownSocketError) + maxPendingConnections(30), error(QAbstractSocket::UnknownSocketError), + socketOptions(QLocalServer::NoOptions) { } void init(); bool listen(const QString &name); + bool listen(qintptr socketDescriptor); static bool removeServer(const QString &name); void closeServer(); void waitForNewConnection(int msec, bool *timedOut); @@ -121,6 +123,7 @@ public: QQueue pendingConnections; QString errorString; QAbstractSocket::SocketError error; + QLocalServer::SocketOptions socketOptions; }; QT_END_NAMESPACE diff --git a/src/network/socket/qlocalserver_tcp.cpp b/src/network/socket/qlocalserver_tcp.cpp index d6c6a1af920..9ac1bfaf0eb 100644 --- a/src/network/socket/qlocalserver_tcp.cpp +++ b/src/network/socket/qlocalserver_tcp.cpp @@ -78,6 +78,13 @@ bool QLocalServerPrivate::listen(const QString &requestedServerName) return true; } +bool QLocalServerPrivate::listen(qintptr socketDescriptor) +{ + Q_Q(QLocalServer); + + return tcpServer.setSocketDescriptor(socketDescriptor); +} + void QLocalServerPrivate::closeServer() { QSettings settings(QLatin1String("Trolltech"), QLatin1String("Qt")); diff --git a/src/network/socket/qlocalserver_unix.cpp b/src/network/socket/qlocalserver_unix.cpp index c4482dadfc6..0c2edef578e 100644 --- a/src/network/socket/qlocalserver_unix.cpp +++ b/src/network/socket/qlocalserver_unix.cpp @@ -44,6 +44,7 @@ #include "qlocalsocket.h" #include "qlocalsocket_p.h" #include "qnet_unix_p.h" +#include "qtemporarydir.h" #ifndef QT_NO_LOCALSERVER @@ -92,6 +93,20 @@ bool QLocalServerPrivate::listen(const QString &requestedServerName) } serverName = requestedServerName; + QString tempPath; + QScopedPointer tempDir; + + // Check any of the flags + if (socketOptions & QLocalServer::WorldAccessOption) { + tempDir.reset(new QTemporaryDir(fullServerName)); + if (!tempDir->isValid()) { + setError(QLatin1String("QLocalServer::listen")); + return false; + } + tempPath = tempDir->path(); + tempPath += QLatin1Char('/') + requestedServerName; + } + // create the unix socket listenSocket = qt_safe_socket(PF_UNIX, SOCK_STREAM, 0); if (-1 == listenSocket) { @@ -108,8 +123,26 @@ bool QLocalServerPrivate::listen(const QString &requestedServerName) closeServer(); return false; } - ::memcpy(addr.sun_path, fullServerName.toLatin1().data(), - fullServerName.toLatin1().size() + 1); + + if (socketOptions & QLocalServer::WorldAccessOption) { + if (sizeof(addr.sun_path) < (uint)tempPath.toLatin1().size() + 1) { + setError(QLatin1String("QLocalServer::listen")); + closeServer(); + return false; + } + ::memcpy(addr.sun_path, tempPath.toLatin1().data(), + tempPath.toLatin1().size() + 1); + + if (-1 == ::fchmod(listenSocket, 0)) { + setError(QLatin1String("QLocalServer::listen")); + closeServer(); + return false; + } + + } else { + ::memcpy(addr.sun_path, fullServerName.toLatin1().data(), + fullServerName.toLatin1().size() + 1); + } // bind if(-1 == QT_SOCKET_BIND(listenSocket, (sockaddr *)&addr, sizeof(sockaddr_un))) { @@ -133,6 +166,76 @@ bool QLocalServerPrivate::listen(const QString &requestedServerName) QFile::remove(fullServerName); return false; } + + if (socketOptions & QLocalServer::WorldAccessOption) { + mode_t mode = 000; + + if (socketOptions & QLocalServer::UserAccessOption) { + mode |= S_IRWXU; + } + if (socketOptions & QLocalServer::GroupAccessOption) { + mode |= S_IRWXG; + } + if (socketOptions & QLocalServer::OtherAccessOption) { + mode |= S_IRWXO; + } + + if (mode) { + if (-1 == ::chmod(tempPath.toLatin1(), mode)) { + setError(QLatin1String("QLocalServer::listen")); + closeServer(); + return false; + } + } + if (-1 == ::rename(tempPath.toLatin1(), fullServerName.toLatin1())){ + setError(QLatin1String("QLocalServer::listen")); + closeServer(); + return false; + } + } + + Q_ASSERT(!socketNotifier); + socketNotifier = new QSocketNotifier(listenSocket, + QSocketNotifier::Read, q); + q->connect(socketNotifier, SIGNAL(activated(int)), + q, SLOT(_q_onNewConnection())); + socketNotifier->setEnabled(maxPendingConnections > 0); + return true; +} + +bool QLocalServerPrivate::listen(qintptr socketDescriptor) +{ + Q_Q(QLocalServer); + + // Attach to the localsocket + listenSocket = socketDescriptor; + + ::fcntl(listenSocket, F_SETFD, FD_CLOEXEC); + ::fcntl(listenSocket, F_SETFL, ::fcntl(listenSocket, F_GETFL) | O_NONBLOCK); + +#ifdef Q_OS_LINUX + struct ::sockaddr_un addr; + socklen_t len; + memset(&addr, 0, sizeof(addr)); + if (0 == ::getsockname(listenSocket, (sockaddr *)&addr, &len)) { + // check for absract sockets + if (addr.sun_family == PF_UNIX && addr.sun_path[0] == 0) { + addr.sun_path[0] = '@'; + } + QString name = QString::fromLatin1(addr.sun_path); + if (!name.isEmpty()) { + fullServerName = name; + serverName = fullServerName.mid(fullServerName.lastIndexOf(QLatin1String("/"))+1); + if (serverName.isEmpty()) { + serverName = fullServerName; + } + } + } +#else + serverName.clear(); + fullServerName.clear(); +#endif + Q_ASSERT(!socketNotifier); socketNotifier = new QSocketNotifier(listenSocket, QSocketNotifier::Read, q); diff --git a/src/network/socket/qlocalserver_win.cpp b/src/network/socket/qlocalserver_win.cpp index 67e319cdbba..07357e57897 100644 --- a/src/network/socket/qlocalserver_win.cpp +++ b/src/network/socket/qlocalserver_win.cpp @@ -144,6 +144,12 @@ bool QLocalServerPrivate::listen(const QString &name) return true; } +bool QLocalServerPrivate::listen(qintptr) +{ + qWarning("QLocalServer::listen(qintptr) is not supported on Windows QTBUG-24230"); + return false; +} + void QLocalServerPrivate::_q_onNewConnection() { Q_Q(QLocalServer); diff --git a/src/network/socket/qlocalsocket.cpp b/src/network/socket/qlocalsocket.cpp index 3097eaa96c9..ced7bba09be 100644 --- a/src/network/socket/qlocalsocket.cpp +++ b/src/network/socket/qlocalsocket.cpp @@ -49,6 +49,7 @@ QT_BEGIN_NAMESPACE /*! \class QLocalSocket \since 4.4 + \inmodule QtNetwork \brief The QLocalSocket class provides a local socket. diff --git a/src/network/socket/qnativesocketengine_win.cpp b/src/network/socket/qnativesocketengine_win.cpp index e57bfcb52be..d7bbe7eb869 100644 --- a/src/network/socket/qnativesocketengine_win.cpp +++ b/src/network/socket/qnativesocketengine_win.cpp @@ -615,6 +615,16 @@ bool QNativeSocketEnginePrivate::nativeConnect(const QHostAddress &address, quin setPortAndAddress(&sockAddrIPv4, &sockAddrIPv6, port, address, &sockAddrPtr, &sockAddrSize); +#if defined (IPV6_V6ONLY) + if (socketProtocol == QAbstractSocket::IPv6Protocol && address.toIPv4Address()) { + //IPV6_V6ONLY option must be cleared to connect to a V4 mapped address + if (QSysInfo::windowsVersion() >= QSysInfo::WV_6_0) { + DWORD ipv6only = 0; + ipv6only = ::setsockopt(socketDescriptor, IPPROTO_IPV6, IPV6_V6ONLY, (char*)&ipv6only, sizeof(ipv6only) ); + } + } +#endif + forever { int connectResult = ::WSAConnect(socketDescriptor, sockAddrPtr, sockAddrSize, 0,0,0,0); if (connectResult == SOCKET_ERROR) { diff --git a/src/network/ssl/qsslcertificateextension.cpp b/src/network/ssl/qsslcertificateextension.cpp index 2b5c57e3f05..eef27d7c2e2 100644 --- a/src/network/ssl/qsslcertificateextension.cpp +++ b/src/network/ssl/qsslcertificateextension.cpp @@ -41,10 +41,11 @@ /*! \class QSslCertificateExtension - \brief The QSslCertificateExtension provides an API for accessing the extensions of an X509 certificate. + \brief The QSslCertificateExtension class provides an API for accessing the + extensions of an X509 certificate. \since 5.0 - \rentrant + \reentrant \ingroup network \ingroup ssl \inmodule QtNetwork diff --git a/src/network/ssl/qsslsocket.cpp b/src/network/ssl/qsslsocket.cpp index ffc9f3f9fee..311ac5fe86b 100644 --- a/src/network/ssl/qsslsocket.cpp +++ b/src/network/ssl/qsslsocket.cpp @@ -2345,6 +2345,4 @@ QList QSslSocketPrivate::unixRootCertDirectories() QT_END_NAMESPACE -// For private slots -#define d d_ptr #include "moc_qsslsocket.cpp" diff --git a/src/opengl/qgl.h b/src/opengl/qgl.h index be1651ea2f4..caa5b96cdc9 100644 --- a/src/opengl/qgl.h +++ b/src/opengl/qgl.h @@ -42,6 +42,8 @@ #ifndef QGL_H #define QGL_H +#ifndef QT_NO_OPENGL + #include #include #include @@ -551,4 +553,5 @@ QT_END_NAMESPACE QT_END_HEADER +#endif // QT_NO_OPENGL #endif // QGL_H diff --git a/src/opengl/qglframebufferobject.cpp b/src/opengl/qglframebufferobject.cpp index 96479e189e6..21b3abfdd89 100644 --- a/src/opengl/qglframebufferobject.cpp +++ b/src/opengl/qglframebufferobject.cpp @@ -459,8 +459,8 @@ void QGLFramebufferObjectPrivate::init(QGLFramebufferObject *q, const QSize &sz, int height = size.height(); int level = 0; while (width > 1 || height > 1) { - width = (width + 1) >> 1; - height = (height + 1) >> 1; + width = qMax(1, width >> 1); + height = qMax(1, height >> 1); ++level; glTexImage2D(target, level, internal_format, width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL); diff --git a/src/platformsupport/eglconvenience/qeglconvenience.cpp b/src/platformsupport/eglconvenience/qeglconvenience.cpp index f9ccde6b527..4ba9c1f5ac3 100644 --- a/src/platformsupport/eglconvenience/qeglconvenience.cpp +++ b/src/platformsupport/eglconvenience/qeglconvenience.cpp @@ -152,13 +152,19 @@ bool q_reduceConfigAttributes(QVector *configAttributes) } } + i = configAttributes->indexOf(EGL_SAMPLES); + if (i >= 0) { + EGLint value = configAttributes->value(i+1, 0); + if (value > 1) + configAttributes->replace(i+1, qMin(EGLint(16), value / 2)); + else + configAttributes->remove(i, 2); + return true; + } + i = configAttributes->indexOf(EGL_SAMPLE_BUFFERS); if (i >= 0) { configAttributes->remove(i,2); - i = configAttributes->indexOf(EGL_SAMPLES); - if (i >= 0) { - configAttributes->remove(i,2); - } return true; } diff --git a/src/platformsupport/fontdatabases/fontconfig/fontconfig.pri b/src/platformsupport/fontdatabases/fontconfig/fontconfig.pri index 7ea1c64e33c..2c896ef2cc7 100644 --- a/src/platformsupport/fontdatabases/fontconfig/fontconfig.pri +++ b/src/platformsupport/fontdatabases/fontconfig/fontconfig.pri @@ -1,3 +1,5 @@ -HEADERS += $$PWD/qfontconfigdatabase_p.h -SOURCES += $$PWD/qfontconfigdatabase.cpp +HEADERS += $$PWD/qfontconfigdatabase_p.h \ + fontdatabases/fontconfig/qfontenginemultifontconfig_p.h +SOURCES += $$PWD/qfontconfigdatabase.cpp \ + fontdatabases/fontconfig/qfontenginemultifontconfig.cpp DEFINES -= QT_NO_FONTCONFIG diff --git a/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp b/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp index f048ed91de1..8a9670118fe 100644 --- a/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp +++ b/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp @@ -40,6 +40,7 @@ ****************************************************************************/ #include "qfontconfigdatabase_p.h" +#include "qfontenginemultifontconfig_p.h" #include #include @@ -50,8 +51,7 @@ #include #include - - +#include #include #include FT_TRUETYPE_TABLES_H @@ -471,6 +471,13 @@ void QFontconfigDatabase::populateFontDatabase() // QApplication::setFont(font); } +QFontEngineMulti *QFontconfigDatabase::fontEngineMulti(QFontEngine *fontEngine, + QUnicodeTables::Script script, + const QStringList &fallbacks) +{ + return new QFontEngineMultiFontConfig(fontEngine, script, fallbacks); +} + QFontEngine *QFontconfigDatabase::fontEngine(const QFontDef &f, QUnicodeTables::Script script, void *usrPtr) { if (!usrPtr) diff --git a/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase_p.h b/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase_p.h index 77509f76e52..d4742167e9f 100644 --- a/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase_p.h +++ b/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase_p.h @@ -51,6 +51,7 @@ class QFontconfigDatabase : public QBasicFontDatabase { public: void populateFontDatabase(); + QFontEngineMulti *fontEngineMulti(QFontEngine *fontEngine, QUnicodeTables::Script script, const QStringList &fallbacks); QFontEngine *fontEngine(const QFontDef &fontDef, QUnicodeTables::Script script, void *handle); QStringList fallbacksForFamily(const QString family, const QFont::Style &style, const QFont::StyleHint &styleHint, const QUnicodeTables::Script &script) const; QStringList addApplicationFont(const QByteArray &fontData, const QString &fileName); diff --git a/src/platformsupport/fontdatabases/fontconfig/qfontenginemultifontconfig.cpp b/src/platformsupport/fontdatabases/fontconfig/qfontenginemultifontconfig.cpp new file mode 100644 index 00000000000..7b28b20bcbe --- /dev/null +++ b/src/platformsupport/fontdatabases/fontconfig/qfontenginemultifontconfig.cpp @@ -0,0 +1,87 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the plugins of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qfontenginemultifontconfig_p.h" + +#include +#include +#include + +QT_BEGIN_NAMESPACE + +QFontEngineMultiFontConfig::QFontEngineMultiFontConfig(QFontEngine *fe, int script, + const QStringList &fallbacks) + : QFontEngineMultiQPA(fe, script, fallbacks) +{ +} + +bool QFontEngineMultiFontConfig::shouldLoadFontEngineForCharacter(int at, uint ucs4) const +{ + QFontEngineFT *fontEngine = static_cast(engines.at(at)); + bool charSetHasChar = true; + if (fontEngine != 0) { + FcCharSet *charSet = fontEngine->freetype->charset; + charSetHasChar = FcCharSetHasChar(charSet, ucs4); + } else { + FcPattern *requestPattern = FcPatternCreate(); + + FcValue value; + value.type = FcTypeString; + QByteArray cs = fallbackFamilyAt(at-1).toUtf8(); + value.u.s = reinterpret_cast(cs.data()); + FcPatternAdd(requestPattern, FC_FAMILY, value, true); + + FcResult result; + FcPattern *matchPattern = FcFontMatch(0, requestPattern, &result); + if (matchPattern != 0) { + FcCharSet *charSet; + FcPatternGetCharSet(matchPattern, FC_CHARSET, 0, &charSet); + charSetHasChar = FcCharSetHasChar(charSet, ucs4); + FcPatternDestroy(matchPattern); + } + + FcPatternDestroy(requestPattern); + } + + return charSetHasChar; +} + +QT_END_NAMESPACE diff --git a/src/platformsupport/fontdatabases/fontconfig/qfontenginemultifontconfig_p.h b/src/platformsupport/fontdatabases/fontconfig/qfontenginemultifontconfig_p.h new file mode 100644 index 00000000000..4323cb7d2ec --- /dev/null +++ b/src/platformsupport/fontdatabases/fontconfig/qfontenginemultifontconfig_p.h @@ -0,0 +1,60 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the plugins of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QFONTENGINEMULTIFONTCONFIG_H +#define QFONTENGINEMULTIFONTCONFIG_H + +#include + +QT_BEGIN_NAMESPACE + +class QFontEngineMultiFontConfig : public QFontEngineMultiQPA +{ + Q_OBJECT +public: + explicit QFontEngineMultiFontConfig(QFontEngine *fe, int script, const QStringList &fallbacks); + + bool shouldLoadFontEngineForCharacter(int at, uint ucs4) const; +}; + +QT_END_NAMESPACE + +#endif // QFONTENGINEMULTIFONTCONFIG_H diff --git a/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm b/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm index 489138abaed..a51ffb77eaf 100644 --- a/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm +++ b/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm @@ -255,9 +255,7 @@ QFixed QCoreTextFontEngine::descent() const if (fontDef.styleStrategy & QFont::ForceIntegerMetrics) d = d.round(); - // subtract a pixel to even out the historical +1 in QFontMetrics::height(). - // Fix in Qt 5. - return d - 1; + return d; } QFixed QCoreTextFontEngine::leading() const { diff --git a/src/platformsupport/glxconvenience/qglxconvenience.cpp b/src/platformsupport/glxconvenience/qglxconvenience.cpp index 5acb2d0b656..f619bf53b82 100644 --- a/src/platformsupport/glxconvenience/qglxconvenience.cpp +++ b/src/platformsupport/glxconvenience/qglxconvenience.cpp @@ -153,23 +153,28 @@ GLXFBConfig qglx_findConfig(Display *display, int screen , const QSurfaceFormat XFree(configs); } - reducedFormat = qglx_reduceSurfaceFormat(reducedFormat,&reduced); + if (!chosenConfig) + reducedFormat = qglx_reduceSurfaceFormat(reducedFormat,&reduced); } return chosenConfig; } -XVisualInfo *qglx_findVisualInfo(Display *display, int screen, const QSurfaceFormat &format) +XVisualInfo *qglx_findVisualInfo(Display *display, int screen, QSurfaceFormat *format) { + Q_ASSERT(format); + XVisualInfo *visualInfo = 0; - GLXFBConfig config = qglx_findConfig(display,screen,format); - if (config) + GLXFBConfig config = qglx_findConfig(display,screen,*format); + if (config) { visualInfo = glXGetVisualFromFBConfig(display, config); + *format = qglx_surfaceFormatFromGLXFBConfig(display, config); + } // attempt to fall back to glXChooseVisual bool reduced = true; - QSurfaceFormat reducedFormat = format; + QSurfaceFormat reducedFormat = *format; while (!visualInfo && reduced) { QVarLengthArray attribs; attribs.append(GLX_RGBA); @@ -264,7 +269,7 @@ QSurfaceFormat qglx_reduceSurfaceFormat(const QSurfaceFormat &format, bool *redu } else if (retFormat.blueBufferSize() > 1) { retFormat.setBlueBufferSize(1); } else if (retFormat.samples() > 1) { - retFormat.setSamples(0); + retFormat.setSamples(qMin(retFormat.samples() / 2, 16)); } else if (retFormat.stereo()) { retFormat.setStereo(false); }else if (retFormat.stencilBufferSize() > 0) { diff --git a/src/platformsupport/glxconvenience/qglxconvenience_p.h b/src/platformsupport/glxconvenience/qglxconvenience_p.h index 6d4cecfbe6a..a60f789a859 100644 --- a/src/platformsupport/glxconvenience/qglxconvenience_p.h +++ b/src/platformsupport/glxconvenience/qglxconvenience_p.h @@ -48,9 +48,9 @@ #include #include -XVisualInfo *qglx_findVisualInfo(Display *display, int screen, const QSurfaceFormat &format); +XVisualInfo *qglx_findVisualInfo(Display *display, int screen, QSurfaceFormat *format); GLXFBConfig qglx_findConfig(Display *display, int screen, const QSurfaceFormat &format, int drawableBit = GLX_WINDOW_BIT); -QSurfaceFormat qglx_surfaceFormatFromGLXFBConfig(Display *display, GLXFBConfig config, GLXContext context); +QSurfaceFormat qglx_surfaceFormatFromGLXFBConfig(Display *display, GLXFBConfig config, GLXContext context = 0); QVector qglx_buildSpec(const QSurfaceFormat &format, int drawableBit = GLX_WINDOW_BIT); QSurfaceFormat qglx_reduceSurfaceFormat(const QSurfaceFormat &format, bool *reduced); diff --git a/src/platformsupport/inputcontext/qplatforminputcontextfactory_qpa.cpp b/src/platformsupport/inputcontext/qplatforminputcontextfactory_qpa.cpp index e7fdf4385f6..ca3673f670a 100644 --- a/src/platformsupport/inputcontext/qplatforminputcontextfactory_qpa.cpp +++ b/src/platformsupport/inputcontext/qplatforminputcontextfactory_qpa.cpp @@ -82,9 +82,12 @@ QPlatformInputContext *QPlatformInputContextFactory::create() { QPlatformInputContext *ic = 0; - QString icString = QString::fromLatin1(getenv("QT_IM_MODULE")); - ic = create(icString); + QString icString = QString::fromLatin1(qgetenv("QT_IM_MODULE")); + if (icString == QStringLiteral("none")) + return 0; + + ic = create(icString); if (ic && ic->isValid()) return ic; diff --git a/src/platformsupport/platformsupport.pro b/src/platformsupport/platformsupport.pro index 36323d97660..8322d4c70f3 100644 --- a/src/platformsupport/platformsupport.pro +++ b/src/platformsupport/platformsupport.pro @@ -33,3 +33,6 @@ include(fontdatabases/fontdatabases.pri) include(glxconvenience/glxconvenience.pri) #include(printersupport/printersupport.pri) include(inputcontext/inputcontext.pri) +include(udev/udev.pri) +include(services/services.pri) +include(themes/themes.pri) diff --git a/src/platformsupport/services/genericunix/genericunix.pri b/src/platformsupport/services/genericunix/genericunix.pri new file mode 100644 index 00000000000..6afafa31d0b --- /dev/null +++ b/src/platformsupport/services/genericunix/genericunix.pri @@ -0,0 +1,2 @@ +HEADERS += $$PWD/qgenericunixservices_p.h +SOURCES += $$PWD/qgenericunixservices.cpp diff --git a/src/platformsupport/services/genericunix/qgenericunixservices.cpp b/src/platformsupport/services/genericunix/qgenericunixservices.cpp new file mode 100644 index 00000000000..34f46e4e6ed --- /dev/null +++ b/src/platformsupport/services/genericunix/qgenericunixservices.cpp @@ -0,0 +1,152 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the plugins of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qgenericunixservices_p.h" + +#include +#include +#include +#include + +#include + +QT_BEGIN_NAMESPACE + +enum { debug = 0 }; + +static inline QGenericUnixServices::DesktopEnvironment detectDesktopEnvironment() +{ + if (!qgetenv("KDE_FULL_SESSION").isEmpty()) + return QGenericUnixServices::DE_KDE; + // GNOME_DESKTOP_SESSION_ID is deprecated for some reason, but still check it + if (qgetenv("DESKTOP_SESSION") == "gnome" || !qgetenv("GNOME_DESKTOP_SESSION_ID").isEmpty()) + return QGenericUnixServices::DE_GNOME; + return QGenericUnixServices::DE_UNKNOWN; +} + +static inline bool checkExecutable(const QString &candidate, QString *result) +{ + *result = QStandardPaths::findExecutable(candidate); + return !result->isEmpty(); +} + +static inline bool detectWebBrowser(QGenericUnixServices::DesktopEnvironment desktop, + bool checkBrowserVariable, + QString *browser) +{ + const char *browsers[] = {"google-chrome", "firefox", "mozilla", "opera"}; + + browser->clear(); + if (checkExecutable(QStringLiteral("xdg-open"), browser)) + return true; + + if (checkBrowserVariable) { + QByteArray browserVariable = qgetenv("DEFAULT_BROWSER"); + if (browserVariable.isEmpty()) + browserVariable = qgetenv("BROWSER"); + if (!browserVariable.isEmpty() && checkExecutable(QString::fromLocal8Bit(browserVariable), browser)) + return true; + } + + switch (desktop) { + case QGenericUnixServices::DE_UNKNOWN: + break; + case QGenericUnixServices::DE_KDE: + // Konqueror launcher + if (checkExecutable(QStringLiteral("kfmclient"), browser)) { + browser->append(QStringLiteral(" exec")); + return true; + } + case QGenericUnixServices::DE_GNOME: + if (checkExecutable(QStringLiteral("gnome-open"), browser)) + return true; + break; + } + + for (size_t i = 0; i < sizeof(browsers)/sizeof(char *); ++i) + if (checkExecutable(QLatin1String(browsers[i]), browser)) + return true; + return false; +} + +static inline bool launch(const QString &launcher, const QUrl &url) +{ + const QString command = launcher + QLatin1Char(' ') + QLatin1String(url.toEncoded()); + if (debug) + qDebug("Launching %s", qPrintable(command)); +#if defined(QT_NO_PROCESS) + const bool ok = ::system(qPrintable(command + QStringLiteral(" &"))); +#else + const bool ok = QProcess::startDetached(command); +#endif + if (!ok) + qWarning("Launch failed (%s)", qPrintable(command)); + return ok; +} + +QGenericUnixServices::DesktopEnvironment QGenericUnixServices::desktopEnvironment() +{ + static const DesktopEnvironment result = detectDesktopEnvironment(); + return result; +} + +bool QGenericUnixServices::openUrl(const QUrl &url) +{ + if (url.scheme() == QStringLiteral("mailto")) + return openDocument(url); + + if (m_webBrowser.isEmpty() && !detectWebBrowser(desktopEnvironment(), true, &m_webBrowser)) { + qWarning("%s: Unable to detect a web browser to launch '%s'", Q_FUNC_INFO, qPrintable(url.toString())); + return false; + } + return launch(m_webBrowser, url); +} + +bool QGenericUnixServices::openDocument(const QUrl &url) +{ + if (m_documentLauncher.isEmpty() && !detectWebBrowser(desktopEnvironment(), false, &m_documentLauncher)) { + qWarning("%s: Unable to detect a launcher for '%s'", Q_FUNC_INFO, qPrintable(url.toString())); + return false; + } + return launch(m_documentLauncher, url); +} + +QT_END_NAMESPACE diff --git a/src/platformsupport/services/genericunix/qgenericunixservices_p.h b/src/platformsupport/services/genericunix/qgenericunixservices_p.h new file mode 100644 index 00000000000..3923a45f897 --- /dev/null +++ b/src/platformsupport/services/genericunix/qgenericunixservices_p.h @@ -0,0 +1,77 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the plugins of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QGENERICUNIXDESKTOPSERVICES_H +#define QGENERICUNIXDESKTOPSERVICES_H + +#include +#include + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +class QGenericUnixServices : public QPlatformServices +{ +public: + enum DesktopEnvironment { + DE_UNKNOWN, + DE_KDE, + DE_GNOME + }; + + QGenericUnixServices() {} + + static DesktopEnvironment desktopEnvironment(); + + virtual bool openUrl(const QUrl &url); + virtual bool openDocument(const QUrl &url); + +private: + QString m_webBrowser; + QString m_documentLauncher; +}; + +QT_END_NAMESPACE + +QT_END_HEADER + +#endif // QGENERICUNIXDESKTOPSERVICES_H diff --git a/src/platformsupport/services/services.pri b/src/platformsupport/services/services.pri new file mode 100644 index 00000000000..adee8526266 --- /dev/null +++ b/src/platformsupport/services/services.pri @@ -0,0 +1,3 @@ +unix:!mac { + include($$PWD/genericunix/genericunix.pri) +} diff --git a/src/platformsupport/themes/genericunix/genericunix.pri b/src/platformsupport/themes/genericunix/genericunix.pri new file mode 100644 index 00000000000..eed48257d01 --- /dev/null +++ b/src/platformsupport/themes/genericunix/genericunix.pri @@ -0,0 +1,2 @@ +HEADERS += $$PWD/qgenericunixthemes_p.h +SOURCES += $$PWD/qgenericunixthemes.cpp diff --git a/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp b/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp new file mode 100644 index 00000000000..a9f05f6084f --- /dev/null +++ b/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp @@ -0,0 +1,325 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the plugins of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qgenericunixthemes_p.h" +#include "../../services/genericunix/qgenericunixservices_p.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +/*! + \class QGenericX11ThemeQKdeTheme + \brief QGenericX11Theme is a generic theme implementation for X11. + \since 5.0 + \internal + \ingroup qpa +*/ + +// Helper to return the icon theme paths from XDG. +QStringList QGenericUnixTheme::xdgIconThemePaths() +{ + QStringList paths; + // Add home directory first in search path + const QFileInfo homeIconDir(QDir::homePath() + QStringLiteral("/.icons")); + if (homeIconDir.isDir()) + paths.prepend(homeIconDir.absoluteFilePath()); + + QString xdgDirString = QFile::decodeName(qgetenv("XDG_DATA_DIRS")); + if (xdgDirString.isEmpty()) + xdgDirString = QLatin1String("/usr/local/share/:/usr/share/"); + foreach (const QString &xdgDir, xdgDirString.split(QLatin1Char(':'))) { + const QFileInfo xdgIconsDir(xdgDir + QStringLiteral("/icons")); + if (xdgIconsDir.isDir()) + paths.append(xdgIconsDir.absoluteFilePath()); + } + return paths; +} + +QVariant QGenericUnixTheme::themeHint(ThemeHint hint) const +{ + switch (hint) { + case QPlatformTheme::SystemIconFallbackThemeName: + return QVariant(QString(QStringLiteral("hicolor"))); + case QPlatformTheme::IconThemeSearchPaths: + return xdgIconThemePaths(); + case QPlatformTheme::StyleNames: { + QStringList styleNames; + styleNames << QStringLiteral("Plastique") << QStringLiteral("Windows"); + return QVariant(styleNames); + } + break; + default: + break; + } + return QPlatformTheme::themeHint(hint); +} + +// Reads the color from the KDE configuration, and store it in the +// palette with the given color role if found. +static inline bool kdeColor(QPalette *pal, QPalette::ColorRole role, + const QSettings &kdeSettings, const QString &key) +{ + const QVariant value = kdeSettings.value(key); + if (!value.isValid()) + return false; + const QStringList values = value.toStringList(); + if (values.size() != 3) + return false; + pal->setBrush(role, QColor(values.at(0).toInt(), values.at(1).toInt(), values.at(2).toInt())); + return true; +} + +// Reads the KDE system palette +static inline bool readKdeSystemPalette(const QSettings &kdeSettings, QPalette *pal) +{ + // Setup KDE palette + return kdeColor(pal, QPalette::Button, kdeSettings, QStringLiteral("Colors:Button/BackgroundNormal")) + || kdeColor(pal, QPalette::Window, kdeSettings, QStringLiteral("Colors:Window/BackgroundNormal")) + || kdeColor(pal, QPalette::Text, kdeSettings, QStringLiteral("Colors:View/ForegroundNormal")) + || kdeColor(pal, QPalette::WindowText, kdeSettings, QStringLiteral("Colors:Window/ForegroundNormal")) + || kdeColor(pal, QPalette::Base, kdeSettings, QStringLiteral("Colors:View/BackgroundNormal")) + || kdeColor(pal, QPalette::Highlight, kdeSettings, QStringLiteral("Colors:Selection/BackgroundNormal")) + || kdeColor(pal, QPalette::HighlightedText, kdeSettings, QStringLiteral("Colors:Selection/ForegroundNormal")) + || kdeColor(pal, QPalette::AlternateBase, kdeSettings, QStringLiteral("Colors:View/BackgroundAlternate")) + || kdeColor(pal, QPalette::ButtonText, kdeSettings, QStringLiteral("Colors:Button/ForegroundNormal")) + || kdeColor(pal, QPalette::Link, kdeSettings, QStringLiteral("Colors:View/ForegroundLink")) + || kdeColor(pal, QPalette::LinkVisited, kdeSettings, QStringLiteral("Colors:View/ForegroundVisited")); +} + +/*! + \class QKdeTheme + \brief QKdeTheme is a theme implementation for the KDE desktop (version 4 or higher). + \since 5.0 + \internal + \ingroup qpa +*/ + +QKdeTheme::QKdeTheme(const QString &kdeHome, int kdeVersion) : + m_kdeHome(kdeHome), m_kdeVersion(kdeVersion), + m_toolButtonStyle(Qt::ToolButtonTextBesideIcon), m_toolBarIconSize(0) +{ + qFill(m_palettes, m_palettes + NPalettes, static_cast(0)); + refresh(); +} + +void QKdeTheme::clearPalettes() +{ + qDeleteAll(m_palettes, m_palettes + NPalettes); + qFill(m_palettes, m_palettes + NPalettes, static_cast(0)); +} + +void QKdeTheme::refresh() +{ + clearPalettes(); + + m_toolButtonStyle = Qt::ToolButtonTextBesideIcon; + m_toolBarIconSize = 0; + m_styleNames.clear(); + m_styleNames << QStringLiteral("Oxygen") << QStringLiteral("plastique") << QStringLiteral("windows"); + m_iconFallbackThemeName = m_iconThemeName = QStringLiteral("oxygen"); + + // Read settings file. + const QString settingsFile = globalSettingsFile(); + if (!QFileInfo(settingsFile).isReadable()) + return; + + const QSettings kdeSettings(settingsFile, QSettings::IniFormat); + + QPalette systemPalette; + if (readKdeSystemPalette(kdeSettings, &systemPalette)) + m_palettes[SystemPalette] = new QPalette(systemPalette); + //## TODO tooltip color + + const QVariant styleValue = kdeSettings.value(QStringLiteral("widgetStyle")); + if (styleValue.isValid()) { + const QString style = styleValue.toString(); + if (style != m_styleNames.front()) + m_styleNames.push_front(style); + } + + const QVariant themeValue = kdeSettings.value(QStringLiteral("Icons/Theme")); + if (themeValue.isValid()) + m_iconThemeName = themeValue.toString(); + + const QVariant toolBarIconSizeValue = kdeSettings.value(QStringLiteral("ToolbarIcons/Size")); + if (toolBarIconSizeValue.isValid()) + m_toolBarIconSize = toolBarIconSizeValue.toInt(); + + const QVariant toolbarStyleValue = kdeSettings.value(QStringLiteral("ToolButtonStyle")); + if (toolbarStyleValue.isValid()) { + const QString toolBarStyle = toolbarStyleValue.toString(); + if (toolBarStyle == QStringLiteral("TextBesideIcon")) + m_toolButtonStyle = Qt::ToolButtonTextBesideIcon; + else if (toolBarStyle == QStringLiteral("TextOnly")) + m_toolButtonStyle = Qt::ToolButtonTextOnly; + else if (toolBarStyle == QStringLiteral("TextUnderIcon")) + m_toolButtonStyle = Qt::ToolButtonTextUnderIcon; + } +} + +QString QKdeTheme::globalSettingsFile() const +{ + return m_kdeHome + QStringLiteral("/share/config/kdeglobals"); +} + +static QStringList kdeIconThemeSearchPaths(const QString &kdeHome) +{ + QStringList candidates = QStringList(kdeHome); + const QString kdeDirs = QFile::decodeName(qgetenv("KDEDIRS")); + if (!kdeDirs.isEmpty()) + candidates.append(kdeDirs.split(QLatin1Char(':'))); + + QStringList paths = QGenericUnixTheme::xdgIconThemePaths(); + const QString iconPath = QStringLiteral("/share/icons"); + foreach (const QString &candidate, candidates) { + const QFileInfo fi(candidate + iconPath); + if (fi.isDir()) + paths.append(fi.absoluteFilePath()); + } + return paths; +} + +QVariant QKdeTheme::themeHint(QPlatformTheme::ThemeHint hint) const +{ + switch (hint) { + case QPlatformTheme::ToolButtonStyle: + return QVariant(m_toolButtonStyle); + case QPlatformTheme::ToolBarIconSize: + return QVariant(m_toolBarIconSize); + case QPlatformTheme::SystemIconThemeName: + return QVariant(m_iconThemeName); + case QPlatformTheme::SystemIconFallbackThemeName: + return QVariant(m_iconFallbackThemeName); + case QPlatformTheme::IconThemeSearchPaths: + return QVariant(kdeIconThemeSearchPaths(m_kdeHome)); + case QPlatformTheme::StyleNames: + return QVariant(m_styleNames); + default: + break; + } + return QPlatformTheme::themeHint(hint); +} + +QPlatformTheme *QKdeTheme::createKdeTheme() +{ + // Check for version >= 4 and determine home folder from environment, + // defaulting to ~/.kde, ~/.kde + const QByteArray kdeVersionBA = qgetenv("KDE_SESSION_VERSION"); + const int kdeVersion = kdeVersionBA.toInt(); + if (kdeVersion < 4) + return 0; + const QString kdeHomePathVar = QString::fromLocal8Bit(qgetenv("KDEHOME")); + if (!kdeHomePathVar.isEmpty()) + return new QKdeTheme(kdeHomePathVar, kdeVersion); + + const QString kdeVersionHomePath = QDir::homePath() + QStringLiteral("/.kde") + QLatin1String(kdeVersionBA); + if (QFileInfo(kdeVersionHomePath).isDir()) + return new QKdeTheme(kdeVersionHomePath, kdeVersion); + + const QString kdeHomePath = QDir::homePath() + QStringLiteral("/.kde"); + if (QFileInfo(kdeHomePath).isDir()) + return new QKdeTheme(kdeHomePath, kdeVersion); + + qWarning("%s: Unable to determine KDEHOME", Q_FUNC_INFO); + return 0; +} + +/*! + \class QGnomeTheme + \brief QGnomeTheme is a theme implementation for the Gnome desktop. + \since 5.0 + \internal + \ingroup qpa +*/ + +QVariant QGnomeTheme::themeHint(QPlatformTheme::ThemeHint hint) const +{ + switch (hint) { + case QPlatformTheme::SystemIconThemeName: + case QPlatformTheme::SystemIconFallbackThemeName: + return QVariant(QString(QStringLiteral("gnome"))); + case QPlatformTheme::IconThemeSearchPaths: + return QVariant(QGenericUnixTheme::xdgIconThemePaths()); + case QPlatformTheme::StyleNames: { + QStringList styleNames; + styleNames << QStringLiteral("GTK+") << QStringLiteral("cleanlooks") << QStringLiteral("windows"); + return QVariant(styleNames); + } + default: + break; + } + return QPlatformTheme::themeHint(hint); +} + +/*! + \brief Creates a UNIX theme according to the detected desktop environment. +*/ + +QPlatformTheme *QGenericUnixTheme::createUnixTheme() +{ + QPlatformTheme *result = 0; + if (QGuiApplication::desktopSettingsAware()) { + switch (QGenericUnixServices::desktopEnvironment()) { + case QGenericUnixServices::DE_UNKNOWN: + break; + case QGenericUnixServices::DE_KDE: + result = QKdeTheme::createKdeTheme(); + break; + case QGenericUnixServices::DE_GNOME: + result = new QGnomeTheme; + break; + } + } + if (!result) + result = new QGenericUnixTheme; + return result; +} + +QT_END_NAMESPACE diff --git a/src/platformsupport/themes/genericunix/qgenericunixthemes_p.h b/src/platformsupport/themes/genericunix/qgenericunixthemes_p.h new file mode 100644 index 00000000000..12937a205f1 --- /dev/null +++ b/src/platformsupport/themes/genericunix/qgenericunixthemes_p.h @@ -0,0 +1,106 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the plugins of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QGENERICUNIXTHEMES_H +#define QGENERICUNIXTHEMES_H + +#include +#include +#include + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +class QGenericUnixTheme : public QPlatformTheme +{ +public: + QGenericUnixTheme() {} + + static QPlatformTheme *createUnixTheme(); + + virtual QVariant themeHint(ThemeHint hint) const; + + static QStringList xdgIconThemePaths(); +}; + +class QKdeTheme : public QPlatformTheme +{ + QKdeTheme(const QString &kdeHome, int kdeVersion); +public: + ~QKdeTheme() { clearPalettes(); } + + static QPlatformTheme *createKdeTheme(); + virtual QVariant themeHint(ThemeHint hint) const; + virtual const QPalette *palette(Palette type = SystemPalette) const + { return m_palettes[type]; } + +private: + QString globalSettingsFile() const; + void clearPalettes(); + void refresh(); + + const QString m_kdeHome; + const int m_kdeVersion; + QPalette *m_palettes[NPalettes]; + QString m_iconThemeName; + QString m_iconFallbackThemeName; + QStringList m_styleNames; + int m_toolButtonStyle; + int m_toolBarIconSize; +}; + +class QGnomeTheme : public QPlatformTheme +{ +public: + QGnomeTheme() {} + virtual QVariant themeHint(ThemeHint hint) const; + +private: +}; + +QPlatformTheme *qt_createUnixTheme(); + +QT_END_NAMESPACE + +QT_END_HEADER + +#endif // QGENERICUNIXTHEMES_H diff --git a/src/platformsupport/themes/themes.pri b/src/platformsupport/themes/themes.pri new file mode 100644 index 00000000000..adee8526266 --- /dev/null +++ b/src/platformsupport/themes/themes.pri @@ -0,0 +1,3 @@ +unix:!mac { + include($$PWD/genericunix/genericunix.pri) +} diff --git a/src/platformsupport/udev/qudevhelper.cpp b/src/platformsupport/udev/qudevhelper.cpp new file mode 100644 index 00000000000..b63ef64ed8c --- /dev/null +++ b/src/platformsupport/udev/qudevhelper.cpp @@ -0,0 +1,73 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the plugins of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qudevhelper_p.h" +#include + +QT_BEGIN_NAMESPACE + +void q_udev_devicePath(int type, QString *path) +{ + *path = QString(); + udev *u = udev_new(); + udev_enumerate *ue = udev_enumerate_new(u); + udev_enumerate_add_match_subsystem(ue, "input"); + if (type & UDev_Mouse) + udev_enumerate_add_match_property(ue, "ID_INPUT_MOUSE", "1"); + if (type & UDev_Touchpad) + udev_enumerate_add_match_property(ue, "ID_INPUT_TOUCHPAD", "1"); + if (type & UDev_Touchscreen) + udev_enumerate_add_match_property(ue, "ID_INPUT_TOUCHSCREEN", "1"); + udev_enumerate_scan_devices(ue); + udev_list_entry *entry; + udev_list_entry_foreach(entry, udev_enumerate_get_list_entry(ue)) { + const char *syspath = udev_list_entry_get_name(entry); + udev_device *udevice = udev_device_new_from_syspath(u, syspath); + QString candidate = QString::fromLocal8Bit(udev_device_get_devnode(udevice)); + udev_device_unref(udevice); + if (path->isEmpty() && candidate.startsWith(QLatin1String("/dev/input/event"))) + *path = candidate; + } + udev_enumerate_unref(ue); + udev_unref(u); +} + +QT_END_NAMESPACE diff --git a/src/gui/image/qpixmap_qpa.cpp b/src/platformsupport/udev/qudevhelper_p.h similarity index 84% rename from src/gui/image/qpixmap_qpa.cpp rename to src/platformsupport/udev/qudevhelper_p.h index 162c5f52869..e6046ca0854 100644 --- a/src/gui/image/qpixmap_qpa.cpp +++ b/src/platformsupport/udev/qudevhelper_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtGui module of the Qt Toolkit. +** This file is part of the plugins of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,15 +39,21 @@ ** ****************************************************************************/ -#include -#include -#include +#ifndef QUDEVHELPER_P_H +#define QUDEVHELPER_P_H + +#include QT_BEGIN_NAMESPACE -QPixmap QPixmap::grabWindow(WId window, int x, int y, int w, int h) -{ - return QGuiApplication::primaryScreen()->handle()->grabWindow(window, x, y, w, h); -} +enum QUDeviceType { + UDev_Mouse = 0x01, + UDev_Touchpad = 0x02, + UDev_Touchscreen = 0x04 +}; + +void q_udev_devicePath(int type, QString *path); QT_END_NAMESPACE + +#endif // QUDEVHELPER_P_H diff --git a/src/platformsupport/udev/udev.pri b/src/platformsupport/udev/udev.pri new file mode 100644 index 00000000000..ac3f7df40aa --- /dev/null +++ b/src/platformsupport/udev/udev.pri @@ -0,0 +1,5 @@ +contains(QT_CONFIG, libudev) { + HEADERS += $$PWD/qudevhelper_p.h + SOURCES += $$PWD/qudevhelper.cpp + LIBS += -ludev +} diff --git a/src/plugins/accessible/widgets/complexwidgets.cpp b/src/plugins/accessible/widgets/complexwidgets.cpp index 50e0cd7b655..e4b10670ae2 100644 --- a/src/plugins/accessible/widgets/complexwidgets.cpp +++ b/src/plugins/accessible/widgets/complexwidgets.cpp @@ -122,13 +122,6 @@ public: return QAccessible::queryAccessibleInterface(m_parent); } QAccessibleInterface *child(int) const { return 0; } - int navigate(QAccessible::RelationFlag relation, int index, QAccessibleInterface **iface) const - { - Q_UNUSED(relation); - Q_UNUSED(index); - Q_UNUSED(iface); - return -1; - } // action interface QStringList actionNames() const { diff --git a/src/plugins/accessible/widgets/itemviews.cpp b/src/plugins/accessible/widgets/itemviews.cpp index a85c79918f7..a9f3a858d24 100644 --- a/src/plugins/accessible/widgets/itemviews.cpp +++ b/src/plugins/accessible/widgets/itemviews.cpp @@ -442,14 +442,6 @@ QAccessibleInterface *QAccessibleTable::child(int index) const return childFromLogical(index + 1); } -int QAccessibleTable::navigate(QAccessible::RelationFlag relation, int index, QAccessibleInterface **iface) const -{ - Q_UNUSED(relation); - Q_UNUSED(index); - *iface = 0; - return -1; -} - void *QAccessibleTable::interface_cast(QAccessible::InterfaceType t) { if (t == QAccessible::TableInterface) @@ -780,41 +772,6 @@ QAccessibleInterface *QAccessibleTableCell::child(int) const return 0; } -int QAccessibleTableCell::navigate(QAccessible::RelationFlag relation, int index, QAccessibleInterface **iface) const -{ - Q_UNUSED(index); - Q_UNUSED(relation); - -// switch (relation) { -// From table1 implementation: -// case Up: -// case Down: -// case Left: -// case Right: { -// // This is in the "not so nice" category. In order to find out which item -// // is geometrically around, we have to set the current index, navigate -// // and restore the index as well as the old selection -// view->setUpdatesEnabled(false); -// const QModelIndex oldIdx = view->currentIndex(); -// QList kids = children(); -// const QModelIndex currentIndex = index ? kids.at(index - 1) : QModelIndex(row); -// const QItemSelection oldSelection = view->selectionModel()->selection(); -// view->setCurrentIndex(currentIndex); -// const QModelIndex idx = view->moveCursor(toCursorAction(relation), Qt::NoModifier); -// view->setCurrentIndex(oldIdx); -// view->selectionModel()->select(oldSelection, QItemSelectionModel::ClearAndSelect); -// view->setUpdatesEnabled(true); -// if (!idx.isValid()) -// return -1; - -// if (idx.parent() != row.parent() || idx.row() != row.row()) -// *iface = cell(idx); -// return index ? kids.indexOf(idx) + 1 : 0; } -// } - *iface = 0; - return -1; -} - QAccessibleTableHeaderCell::QAccessibleTableHeaderCell(QAbstractItemView *view_, int index_, Qt::Orientation orientation_) : view(view_), index(index_), orientation(orientation_) { @@ -905,15 +862,6 @@ QAccessibleInterface *QAccessibleTableHeaderCell::child(int) const return 0; } -int QAccessibleTableHeaderCell::navigate(QAccessible::RelationFlag relation, int index, QAccessibleInterface **iface) const -{ - Q_UNUSED(relation); - Q_UNUSED(index); - Q_UNUSED(iface); - - return -1; -} - #endif // QT_NO_ITEMVIEWS QT_END_NAMESPACE diff --git a/src/plugins/accessible/widgets/itemviews.h b/src/plugins/accessible/widgets/itemviews.h index 35a9f83a9e5..3d852a23773 100644 --- a/src/plugins/accessible/widgets/itemviews.h +++ b/src/plugins/accessible/widgets/itemviews.h @@ -77,7 +77,6 @@ public: QAccessibleInterface *parent() const; QAccessibleInterface *child(int index) const; - int navigate(QAccessible::RelationFlag relation, int index, QAccessibleInterface **iface) const; void *interface_cast(QAccessible::InterfaceType t); @@ -190,7 +189,6 @@ public: QAccessibleInterface *parent() const; QAccessibleInterface *child(int) const; - int navigate(QAccessible::RelationFlag relation, int m_index, QAccessibleInterface **iface) const; // cell interface virtual int columnExtent() const; @@ -236,7 +234,6 @@ public: QAccessibleInterface *parent() const; QAccessibleInterface *child(int index) const; - int navigate(QAccessible::RelationFlag relation, int index, QAccessibleInterface **iface) const; private: QAbstractItemView *view; @@ -276,13 +273,6 @@ public: QAccessibleInterface *child(int) const { return 0; } - int navigate(QAccessible::RelationFlag relation, int, QAccessibleInterface **iface) const - { - Q_UNUSED(relation); - Q_UNUSED(iface); - return -1; - } - private: QAbstractItemView *view; }; diff --git a/src/plugins/accessible/widgets/qaccessiblemenu.cpp b/src/plugins/accessible/widgets/qaccessiblemenu.cpp index 49cf550b76a..d3ca1629bd0 100644 --- a/src/plugins/accessible/widgets/qaccessiblemenu.cpp +++ b/src/plugins/accessible/widgets/qaccessiblemenu.cpp @@ -204,14 +204,6 @@ QAccessibleInterface *QAccessibleMenuItem::child(int index) const return 0; } -int QAccessibleMenuItem::navigate(QAccessible::RelationFlag relation, int entry, QAccessibleInterface **target) const -{ - Q_UNUSED(relation); - Q_UNUSED(entry); - *target = 0; - return -1; -} - void *QAccessibleMenuItem::interface_cast(QAccessible::InterfaceType t) { if (t == QAccessible::ActionInterface) diff --git a/src/plugins/accessible/widgets/qaccessiblemenu.h b/src/plugins/accessible/widgets/qaccessiblemenu.h index e926dc708ad..af934e2de75 100644 --- a/src/plugins/accessible/widgets/qaccessiblemenu.h +++ b/src/plugins/accessible/widgets/qaccessiblemenu.h @@ -103,7 +103,6 @@ public: QAccessibleInterface *parent() const; QAccessibleInterface *child(int index) const; - int navigate(QAccessible::RelationFlag relation, int entry, QAccessibleInterface ** target) const; QObject * object() const; QRect rect() const; QAccessible::Role role() const; diff --git a/src/plugins/accessible/widgets/qaccessiblewidgets.cpp b/src/plugins/accessible/widgets/qaccessiblewidgets.cpp index 12a415a5b1f..140848a559e 100644 --- a/src/plugins/accessible/widgets/qaccessiblewidgets.cpp +++ b/src/plugins/accessible/widgets/qaccessiblewidgets.cpp @@ -87,7 +87,7 @@ QList childWidgets(const QWidget *widget, bool includeTopLevel) if (!w) continue; QString objectName = w->objectName(); - if ((includeTopLevel || !w->isWindow()) + if ((includeTopLevel || !w->isWindow()) && !qobject_cast(w) && !qobject_cast(w) && objectName != QLatin1String("qt_rubberband") @@ -106,30 +106,6 @@ QList childWidgets(const QWidget *widget, bool includeTopLevel) \internal */ -static QTextBlock qTextBlockAt(const QTextDocument *doc, int pos) -{ - Q_ASSERT(pos >= 0); - - QTextBlock block = doc->begin(); - int i = 0; - while (block.isValid() && i < pos) { - block = block.next(); - ++i; - } - return block; -} - -static int qTextBlockPosition(QTextBlock block) -{ - int child = 0; - while (block.isValid()) { - block = block.previous(); - ++child; - } - - return child; -} - /*! \fn QAccessibleTextEdit::QAccessibleTextEdit(QWidget* widget) @@ -507,12 +483,17 @@ static QTextCursor cursorForRange(QTextEdit *textEdit, int startOffset, int endO void QAccessibleTextEdit::copyText(int startOffset, int endOffset) const { +#ifndef QT_NO_CLIPBOARD + QTextCursor previousCursor = textEdit()->textCursor(); QTextCursor cursor = cursorForRange(textEdit(), startOffset, endOffset); if (!cursor.hasSelection()) return; -// QApplication::clipboard()->setMimeData(new QTextEditMimeData(cursor.selection())); + textEdit()->setTextCursor(cursor); + textEdit()->copy(); + textEdit()->setTextCursor(previousCursor); +#endif } void QAccessibleTextEdit::deleteText(int startOffset, int endOffset) @@ -532,13 +513,15 @@ void QAccessibleTextEdit::insertText(int offset, const QString &text) void QAccessibleTextEdit::cutText(int startOffset, int endOffset) { +#ifndef QT_NO_CLIPBOARD QTextCursor cursor = cursorForRange(textEdit(), startOffset, endOffset); if (!cursor.hasSelection()) return; -// QApplication::clipboard()->setMimeData(new QTextEditMimeData(cursor.selection())); - cursor.removeSelectedText(); + textEdit()->setTextCursor(cursor); + textEdit()->cut(); +#endif } void QAccessibleTextEdit::pasteText(int offset) @@ -965,34 +948,6 @@ QAccessibleInterface *QAccessibleTitleBar::child(int index) const return 0; } -int QAccessibleTitleBar::navigate(QAccessible::RelationFlag relation, int entry, QAccessibleInterface **iface) const -{ - switch (relation) { - case QAccessible::FocusChild: - // ### - if (entry >= 1) { - QDockWidgetLayout *layout = dockWidgetLayout(); - int index = 1; - int role; - for (role = QDockWidgetLayout::CloseButton; role <= QDockWidgetLayout::FloatButton; ++role) { - QWidget *w = layout->widgetForRole((QDockWidgetLayout::Role)role); - if (!w->isVisible()) - continue; - if (index == entry) - break; - ++index; - } - *iface = 0; - return role > QDockWidgetLayout::FloatButton ? -1 : index; - } - break; - default: - break; - } - *iface = 0; - return -1; -} - int QAccessibleTitleBar::indexOfChild(const QAccessibleInterface * /*child*/) const { return -1; diff --git a/src/plugins/accessible/widgets/qaccessiblewidgets.h b/src/plugins/accessible/widgets/qaccessiblewidgets.h index c19f1f49fdc..147ea91a412 100644 --- a/src/plugins/accessible/widgets/qaccessiblewidgets.h +++ b/src/plugins/accessible/widgets/qaccessiblewidgets.h @@ -248,7 +248,6 @@ public: QAccessibleInterface *parent() const; QAccessibleInterface *child(int index) const; - int navigate(QAccessible::RelationFlag relation, int entry, QAccessibleInterface **iface) const; int indexOfChild(const QAccessibleInterface *child) const; int childCount() const; QAccessibleInterface *childAt(int x, int y) const; diff --git a/src/plugins/accessible/widgets/simplewidgets.cpp b/src/plugins/accessible/widgets/simplewidgets.cpp index 652150f3926..0fdd4490f7c 100644 --- a/src/plugins/accessible/widgets/simplewidgets.cpp +++ b/src/plugins/accessible/widgets/simplewidgets.cpp @@ -54,6 +54,7 @@ #include #include #include +#include #ifdef Q_OS_MAC #include @@ -427,52 +428,36 @@ QString QAccessibleDisplay::text(QAccessible::Text t) const return qt_accStripAmp(str); } -QAccessible::Relation QAccessibleDisplay::relationTo(const QAccessibleInterface *other) const +/*! \reimp */ +QVector > +QAccessibleDisplay::relations(QAccessible::Relation match /*= QAccessible::AllRelations*/) const { - QAccessible::Relation relation = QAccessibleWidget::relationTo(other); + QVector > rels = QAccessibleWidget::relations(match); + if (match & QAccessible::Labelled) { + QVarLengthArray relatedObjects; - QObject *o = other->object(); - QLabel *label = qobject_cast(object()); - if (label) { #ifndef QT_NO_SHORTCUT - if (o == label->buddy()) - relation |= QAccessible::Label; + if (QLabel *label = qobject_cast(object())) { + relatedObjects.append(label->buddy()); #endif #ifndef QT_NO_GROUPBOX - } else { - QGroupBox *groupbox = qobject_cast(object()); - if (groupbox && !groupbox->title().isEmpty()) - if (groupbox->children().contains(o)) - relation |= QAccessible::Label; -#endif - } - return relation; -} - -int QAccessibleDisplay::navigate(QAccessible::RelationFlag rel, int entry, QAccessibleInterface **target) const -{ - *target = 0; - if (rel == QAccessible::Labelled) { - QObject *targetObject = 0; - QLabel *label = qobject_cast(object()); - if (label) { -#ifndef QT_NO_SHORTCUT - if (entry == 1) - targetObject = label->buddy(); -#endif -#ifndef QT_NO_GROUPBOX - } else { - QGroupBox *groupbox = qobject_cast(object()); - if (groupbox && !groupbox->title().isEmpty()) - *target = child(entry - 1); + } else if (QGroupBox *groupbox = qobject_cast(object())) { + if (!groupbox->title().isEmpty()) { + const QList kids = childWidgets(widget()); + for (int i = 0; i < kids.count(); ++i) { + relatedObjects.append(kids.at(i)); + } + } #endif } - if (targetObject) - *target = QAccessible::queryAccessibleInterface(targetObject); - if (*target) - return 0; + for (int i = 0; i < relatedObjects.count(); ++i) { + const QAccessible::Relation rel = QAccessible::Labelled; + QAccessibleInterface *iface = QAccessible::queryAccessibleInterface(relatedObjects.at(i)); + if (iface) + rels.append(qMakePair(iface, rel)); + } } - return QAccessibleWidget::navigate(rel, entry, target); + return rels; } void *QAccessibleDisplay::interface_cast(QAccessible::InterfaceType t) diff --git a/src/plugins/accessible/widgets/simplewidgets.h b/src/plugins/accessible/widgets/simplewidgets.h index bbdececadf8..c2287754214 100644 --- a/src/plugins/accessible/widgets/simplewidgets.h +++ b/src/plugins/accessible/widgets/simplewidgets.h @@ -104,8 +104,7 @@ public: QString text(QAccessible::Text t) const; QAccessible::Role role() const; - QAccessible::Relation relationTo(const QAccessibleInterface *other) const; - int navigate(QAccessible::RelationFlag, int entry, QAccessibleInterface **target) const; + QVector >relations(QAccessible::Relation match = QAccessible::AllRelations) const; void *interface_cast(QAccessible::InterfaceType t); // QAccessibleImageInterface diff --git a/src/plugins/bearer/connman/qconnmanengine.cpp b/src/plugins/bearer/connman/qconnmanengine.cpp index 1a874a92b70..0e54668394a 100644 --- a/src/plugins/bearer/connman/qconnmanengine.cpp +++ b/src/plugins/bearer/connman/qconnmanengine.cpp @@ -255,7 +255,7 @@ quint64 QConnmanEngine::bytesWritten(const QString &id) quint64 result = 0; QString devFile = getInterfaceFromId(id); QFile tx("/sys/class/net/"+devFile+"/statistics/tx_bytes"); - if(tx.exists() && tx.open(QIODevice::ReadOnly | QIODevice::Text)) { + if (tx.open(QIODevice::ReadOnly | QIODevice::Text)) { QTextStream in(&tx); in >> result; tx.close(); @@ -270,7 +270,7 @@ quint64 QConnmanEngine::bytesReceived(const QString &id) quint64 result = 0; QString devFile = getInterfaceFromId(id); QFile rx("/sys/class/net/"+devFile+"/statistics/rx_bytes"); - if(rx.exists() && rx.open(QIODevice::ReadOnly | QIODevice::Text)) { + if (rx.open(QIODevice::ReadOnly | QIODevice::Text)) { QTextStream in(&rx); in >> result; rx.close(); diff --git a/src/plugins/bearer/generic/qgenericengine.cpp b/src/plugins/bearer/generic/qgenericengine.cpp index a90d066ad65..7b30b5d64c2 100644 --- a/src/plugins/bearer/generic/qgenericengine.cpp +++ b/src/plugins/bearer/generic/qgenericengine.cpp @@ -232,7 +232,7 @@ void QGenericEngine::doRequestUpdate() name = interface.name(); QNetworkConfiguration::StateFlags state = QNetworkConfiguration::Defined; - if((interface.flags() & QNetworkInterface::IsUp) && !interface.addressEntries().isEmpty()) + if ((interface.flags() & QNetworkInterface::IsRunning) && !interface.addressEntries().isEmpty()) state |= QNetworkConfiguration::Active; if (accessPointConfigurations.contains(id)) { diff --git a/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp b/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp index fd79cff484b..a71a241ea67 100644 --- a/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp +++ b/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp @@ -837,7 +837,7 @@ quint64 QNetworkManagerEngine::bytesWritten(const QString &id) quint64 result = Q_UINT64_C(0); QFile tx(devFile); - if (tx.exists() && tx.open(QIODevice::ReadOnly | QIODevice::Text)) { + if (tx.open(QIODevice::ReadOnly | QIODevice::Text)) { QTextStream in(&tx); in >> result; tx.close(); @@ -865,7 +865,7 @@ quint64 QNetworkManagerEngine::bytesReceived(const QString &id) quint64 result = Q_UINT64_C(0); QFile tx(devFile); - if (tx.exists() && tx.open(QIODevice::ReadOnly | QIODevice::Text)) { + if (tx.open(QIODevice::ReadOnly | QIODevice::Text)) { QTextStream in(&tx); in >> result; tx.close(); diff --git a/src/plugins/generic/evdevkeyboard/evdevkeyboard.pro b/src/plugins/generic/evdevkeyboard/evdevkeyboard.pro new file mode 100644 index 00000000000..997a58ef6e5 --- /dev/null +++ b/src/plugins/generic/evdevkeyboard/evdevkeyboard.pro @@ -0,0 +1,19 @@ +TARGET = qevdevkeyboardplugin +load(qt_plugin) + +DESTDIR = $$QT.gui.plugins/generic +target.path = $$[QT_INSTALL_PLUGINS]/generic +INSTALLS += target + +HEADERS = \ + qevdevkeyboard_defaultmap.h \ + qevdevkeyboardhandler.h \ + qevdevkeyboardmanager.h + +QT += core-private + +LIBS += -ludev + +SOURCES = main.cpp \ + qevdevkeyboardhandler.cpp \ + qevdevkeyboardmanager.cpp diff --git a/src/plugins/generic/linuxinput/main.cpp b/src/plugins/generic/evdevkeyboard/main.cpp similarity index 77% rename from src/plugins/generic/linuxinput/main.cpp rename to src/plugins/generic/evdevkeyboard/main.cpp index 04fc00f5286..6df4e29fcb2 100644 --- a/src/plugins/generic/linuxinput/main.cpp +++ b/src/plugins/generic/evdevkeyboard/main.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the plugins of the Qt Toolkit. +** This file is part of the QtGui module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -40,38 +40,38 @@ ****************************************************************************/ #include -#include "qlinuxinput.h" +#include "qevdevkeyboardmanager.h" QT_BEGIN_NAMESPACE -class QLinuxInputPlugin : public QGenericPlugin +class QEvdevKeyboardPlugin : public QGenericPlugin { public: - QLinuxInputPlugin(); + QEvdevKeyboardPlugin(); QStringList keys() const; QObject* create(const QString &key, const QString &specification); }; -QLinuxInputPlugin::QLinuxInputPlugin() +QEvdevKeyboardPlugin::QEvdevKeyboardPlugin() : QGenericPlugin() { } -QStringList QLinuxInputPlugin::keys() const +QStringList QEvdevKeyboardPlugin::keys() const { return (QStringList() - << QLatin1String("LinuxInputMouse")); + << QLatin1String("EvdevKeyboard")); } -QObject* QLinuxInputPlugin::create(const QString &key, +QObject* QEvdevKeyboardPlugin::create(const QString &key, const QString &specification) { - if (!key.compare(QLatin1String("LinuxInputMouse"), Qt::CaseInsensitive)) - return new QLinuxInputMouseHandler(key, specification); + if (!key.compare(QLatin1String("EvdevKeyboard"), Qt::CaseInsensitive)) + return new QEvdevKeyboardManager(key, specification); return 0; - } +} -Q_EXPORT_PLUGIN2(qlinuxinputplugin, QLinuxInputPlugin) +Q_EXPORT_PLUGIN2(qevdevkeyboardplugin, QEvdevKeyboardPlugin) QT_END_NAMESPACE diff --git a/src/plugins/generic/evdevkeyboard/qevdevkeyboard_defaultmap.h b/src/plugins/generic/evdevkeyboard/qevdevkeyboard_defaultmap.h new file mode 100644 index 00000000000..49b07efff9c --- /dev/null +++ b/src/plugins/generic/evdevkeyboard/qevdevkeyboard_defaultmap.h @@ -0,0 +1,787 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the QtGui module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QEVDEVKEYBOARDHANDLER_DEFAULTMAP_H +#define QEVDEVKEYBOARDHANDLER_DEFAULTMAP_H + +// no QT_BEGIN_NAMESPACE, since we include it internally... + +const QEvdevKeyboardMap::Mapping QEvdevKeyboardHandler::s_keymap_default[] = { + { 1, 0xffff, 0x01000000, 0x00, 0x00, 0x0000 }, + { 2, 0x0031, 0x00000031, 0x00, 0x00, 0x0000 }, + { 2, 0x0021, 0x00000021, 0x01, 0x00, 0x0000 }, + { 3, 0x0032, 0x00000032, 0x00, 0x00, 0x0000 }, + { 3, 0x0040, 0x00000040, 0x01, 0x00, 0x0000 }, + { 3, 0x0040, 0x00000040, 0x02, 0x00, 0x0000 }, + { 4, 0x0033, 0x00000033, 0x00, 0x00, 0x0000 }, + { 4, 0x0023, 0x00000023, 0x01, 0x00, 0x0000 }, + { 4, 0xffff, 0x01000000, 0x04, 0x00, 0x0000 }, + { 5, 0x0034, 0x00000034, 0x00, 0x00, 0x0000 }, + { 5, 0x0024, 0x00000024, 0x01, 0x00, 0x0000 }, + { 5, 0x0024, 0x00000024, 0x02, 0x00, 0x0000 }, + { 5, 0x005c, 0x0400005c, 0x04, 0x00, 0x0000 }, + { 6, 0x0035, 0x00000035, 0x00, 0x00, 0x0000 }, + { 6, 0x0025, 0x00000025, 0x01, 0x00, 0x0000 }, + { 6, 0x005d, 0x0400005d, 0x04, 0x00, 0x0000 }, + { 7, 0x0036, 0x00000036, 0x00, 0x00, 0x0000 }, + { 7, 0x005e, 0x0000005e, 0x01, 0x00, 0x0000 }, + { 7, 0x005e, 0x01001252, 0x02, 0x01, 0x0000 }, + { 7, 0x005e, 0x0400005e, 0x04, 0x00, 0x0000 }, + { 8, 0x0037, 0x00000037, 0x00, 0x00, 0x0000 }, + { 8, 0x0026, 0x00000026, 0x01, 0x00, 0x0000 }, + { 8, 0x007b, 0x0000007b, 0x02, 0x00, 0x0000 }, + { 8, 0x005f, 0x0400005f, 0x04, 0x00, 0x0000 }, + { 9, 0x0038, 0x00000038, 0x00, 0x00, 0x0000 }, + { 9, 0x002a, 0x0000002a, 0x01, 0x00, 0x0000 }, + { 9, 0x005b, 0x0000005b, 0x02, 0x00, 0x0000 }, + { 9, 0xffff, 0x01000003, 0x04, 0x00, 0x0000 }, + { 10, 0x0039, 0x00000039, 0x00, 0x00, 0x0000 }, + { 10, 0x0028, 0x00000028, 0x01, 0x00, 0x0000 }, + { 10, 0x005d, 0x0000005d, 0x02, 0x00, 0x0000 }, + { 11, 0x0030, 0x00000030, 0x00, 0x00, 0x0000 }, + { 11, 0x0029, 0x00000029, 0x01, 0x00, 0x0000 }, + { 11, 0x007d, 0x0000007d, 0x02, 0x00, 0x0000 }, + { 12, 0x002d, 0x0000002d, 0x00, 0x00, 0x0000 }, + { 12, 0x005f, 0x0000005f, 0x01, 0x00, 0x0000 }, + { 12, 0x005c, 0x0000005c, 0x02, 0x00, 0x0000 }, + { 12, 0x005f, 0x0400005f, 0x04, 0x00, 0x0000 }, + { 12, 0x005f, 0x0400005f, 0x05, 0x00, 0x0000 }, + { 13, 0x003d, 0x0000003d, 0x00, 0x00, 0x0000 }, + { 13, 0x002b, 0x0000002b, 0x01, 0x00, 0x0000 }, + { 14, 0xffff, 0x01000003, 0x00, 0x00, 0x0000 }, + { 14, 0xffff, 0x01000000, 0x0c, 0x08, 0x0300 }, + { 15, 0xffff, 0x01000001, 0x00, 0x00, 0x0000 }, + { 16, 0x0071, 0x00000051, 0x00, 0x00, 0x0000 }, + { 16, 0x0051, 0x00000051, 0x01, 0x00, 0x0000 }, + { 16, 0x0071, 0x00000051, 0x02, 0x00, 0x0000 }, + { 16, 0x0051, 0x00000051, 0x03, 0x00, 0x0000 }, + { 16, 0x0071, 0x04000051, 0x04, 0x00, 0x0000 }, + { 16, 0x0071, 0x04000051, 0x05, 0x00, 0x0000 }, + { 16, 0x0071, 0x04000051, 0x06, 0x00, 0x0000 }, + { 16, 0x0071, 0x04000051, 0x07, 0x00, 0x0000 }, + { 16, 0x0071, 0x08000051, 0x08, 0x00, 0x0000 }, + { 16, 0x0071, 0x08000051, 0x09, 0x00, 0x0000 }, + { 16, 0x0071, 0x08000051, 0x0a, 0x00, 0x0000 }, + { 16, 0x0071, 0x08000051, 0x0b, 0x00, 0x0000 }, + { 16, 0x0071, 0x0c000051, 0x0c, 0x00, 0x0000 }, + { 16, 0x0071, 0x0c000051, 0x0d, 0x00, 0x0000 }, + { 16, 0x0071, 0x0c000051, 0x0e, 0x00, 0x0000 }, + { 16, 0x0071, 0x0c000051, 0x0f, 0x00, 0x0000 }, + { 17, 0x0077, 0x00000057, 0x00, 0x00, 0x0000 }, + { 17, 0x0057, 0x00000057, 0x01, 0x00, 0x0000 }, + { 17, 0x0077, 0x00000057, 0x02, 0x00, 0x0000 }, + { 17, 0x0057, 0x00000057, 0x03, 0x00, 0x0000 }, + { 17, 0x0077, 0x04000057, 0x04, 0x00, 0x0000 }, + { 17, 0x0077, 0x04000057, 0x05, 0x00, 0x0000 }, + { 17, 0x0077, 0x04000057, 0x06, 0x00, 0x0000 }, + { 17, 0x0077, 0x04000057, 0x07, 0x00, 0x0000 }, + { 17, 0x0077, 0x08000057, 0x08, 0x00, 0x0000 }, + { 17, 0x0077, 0x08000057, 0x09, 0x00, 0x0000 }, + { 17, 0x0077, 0x08000057, 0x0a, 0x00, 0x0000 }, + { 17, 0x0077, 0x08000057, 0x0b, 0x00, 0x0000 }, + { 17, 0x0077, 0x0c000057, 0x0c, 0x00, 0x0000 }, + { 17, 0x0077, 0x0c000057, 0x0d, 0x00, 0x0000 }, + { 17, 0x0077, 0x0c000057, 0x0e, 0x00, 0x0000 }, + { 17, 0x0077, 0x0c000057, 0x0f, 0x00, 0x0000 }, + { 18, 0x0065, 0x00000045, 0x00, 0x00, 0x0000 }, + { 18, 0x0045, 0x00000045, 0x01, 0x00, 0x0000 }, + { 18, 0x0065, 0x00000045, 0x02, 0x00, 0x0000 }, + { 18, 0x0045, 0x00000045, 0x03, 0x00, 0x0000 }, + { 18, 0x0065, 0x04000045, 0x04, 0x00, 0x0000 }, + { 18, 0x0065, 0x04000045, 0x05, 0x00, 0x0000 }, + { 18, 0x0065, 0x04000045, 0x06, 0x00, 0x0000 }, + { 18, 0x0065, 0x04000045, 0x07, 0x00, 0x0000 }, + { 18, 0x0065, 0x08000045, 0x08, 0x00, 0x0000 }, + { 18, 0x0065, 0x08000045, 0x09, 0x00, 0x0000 }, + { 18, 0x0065, 0x08000045, 0x0a, 0x00, 0x0000 }, + { 18, 0x0065, 0x08000045, 0x0b, 0x00, 0x0000 }, + { 18, 0x0065, 0x0c000045, 0x0c, 0x00, 0x0000 }, + { 18, 0x0065, 0x0c000045, 0x0d, 0x00, 0x0000 }, + { 18, 0x0065, 0x0c000045, 0x0e, 0x00, 0x0000 }, + { 18, 0x0065, 0x0c000045, 0x0f, 0x00, 0x0000 }, + { 19, 0x0072, 0x00000052, 0x00, 0x00, 0x0000 }, + { 19, 0x0052, 0x00000052, 0x01, 0x00, 0x0000 }, + { 19, 0x0072, 0x00000052, 0x02, 0x00, 0x0000 }, + { 19, 0x0052, 0x00000052, 0x03, 0x00, 0x0000 }, + { 19, 0x0072, 0x04000052, 0x04, 0x00, 0x0000 }, + { 19, 0x0072, 0x04000052, 0x05, 0x00, 0x0000 }, + { 19, 0x0072, 0x04000052, 0x06, 0x00, 0x0000 }, + { 19, 0x0072, 0x04000052, 0x07, 0x00, 0x0000 }, + { 19, 0x0072, 0x08000052, 0x08, 0x00, 0x0000 }, + { 19, 0x0072, 0x08000052, 0x09, 0x00, 0x0000 }, + { 19, 0x0072, 0x08000052, 0x0a, 0x00, 0x0000 }, + { 19, 0x0072, 0x08000052, 0x0b, 0x00, 0x0000 }, + { 19, 0x0072, 0x0c000052, 0x0c, 0x00, 0x0000 }, + { 19, 0x0072, 0x0c000052, 0x0d, 0x00, 0x0000 }, + { 19, 0x0072, 0x0c000052, 0x0e, 0x00, 0x0000 }, + { 19, 0x0072, 0x0c000052, 0x0f, 0x00, 0x0000 }, + { 20, 0x0074, 0x00000054, 0x00, 0x00, 0x0000 }, + { 20, 0x0054, 0x00000054, 0x01, 0x00, 0x0000 }, + { 20, 0x0074, 0x00000054, 0x02, 0x00, 0x0000 }, + { 20, 0x0054, 0x00000054, 0x03, 0x00, 0x0000 }, + { 20, 0x0074, 0x04000054, 0x04, 0x00, 0x0000 }, + { 20, 0x0074, 0x04000054, 0x05, 0x00, 0x0000 }, + { 20, 0x0074, 0x04000054, 0x06, 0x00, 0x0000 }, + { 20, 0x0074, 0x04000054, 0x07, 0x00, 0x0000 }, + { 20, 0x0074, 0x08000054, 0x08, 0x00, 0x0000 }, + { 20, 0x0074, 0x08000054, 0x09, 0x00, 0x0000 }, + { 20, 0x0074, 0x08000054, 0x0a, 0x00, 0x0000 }, + { 20, 0x0074, 0x08000054, 0x0b, 0x00, 0x0000 }, + { 20, 0x0074, 0x0c000054, 0x0c, 0x00, 0x0000 }, + { 20, 0x0074, 0x0c000054, 0x0d, 0x00, 0x0000 }, + { 20, 0x0074, 0x0c000054, 0x0e, 0x00, 0x0000 }, + { 20, 0x0074, 0x0c000054, 0x0f, 0x00, 0x0000 }, + { 21, 0x0079, 0x00000059, 0x00, 0x00, 0x0000 }, + { 21, 0x0059, 0x00000059, 0x01, 0x00, 0x0000 }, + { 21, 0x0079, 0x00000059, 0x02, 0x00, 0x0000 }, + { 21, 0x0059, 0x00000059, 0x03, 0x00, 0x0000 }, + { 21, 0x0079, 0x04000059, 0x04, 0x00, 0x0000 }, + { 21, 0x0079, 0x04000059, 0x05, 0x00, 0x0000 }, + { 21, 0x0079, 0x04000059, 0x06, 0x00, 0x0000 }, + { 21, 0x0079, 0x04000059, 0x07, 0x00, 0x0000 }, + { 21, 0x0079, 0x08000059, 0x08, 0x00, 0x0000 }, + { 21, 0x0079, 0x08000059, 0x09, 0x00, 0x0000 }, + { 21, 0x0079, 0x08000059, 0x0a, 0x00, 0x0000 }, + { 21, 0x0079, 0x08000059, 0x0b, 0x00, 0x0000 }, + { 21, 0x0079, 0x0c000059, 0x0c, 0x00, 0x0000 }, + { 21, 0x0079, 0x0c000059, 0x0d, 0x00, 0x0000 }, + { 21, 0x0079, 0x0c000059, 0x0e, 0x00, 0x0000 }, + { 21, 0x0079, 0x0c000059, 0x0f, 0x00, 0x0000 }, + { 22, 0x0075, 0x00000055, 0x00, 0x00, 0x0000 }, + { 22, 0x0055, 0x00000055, 0x01, 0x00, 0x0000 }, + { 22, 0x0075, 0x00000055, 0x02, 0x00, 0x0000 }, + { 22, 0x0055, 0x00000055, 0x03, 0x00, 0x0000 }, + { 22, 0x0075, 0x04000055, 0x04, 0x00, 0x0000 }, + { 22, 0x0075, 0x04000055, 0x05, 0x00, 0x0000 }, + { 22, 0x0075, 0x04000055, 0x06, 0x00, 0x0000 }, + { 22, 0x0075, 0x04000055, 0x07, 0x00, 0x0000 }, + { 22, 0x0075, 0x08000055, 0x08, 0x00, 0x0000 }, + { 22, 0x0075, 0x08000055, 0x09, 0x00, 0x0000 }, + { 22, 0x0075, 0x08000055, 0x0a, 0x00, 0x0000 }, + { 22, 0x0075, 0x08000055, 0x0b, 0x00, 0x0000 }, + { 22, 0x0075, 0x0c000055, 0x0c, 0x00, 0x0000 }, + { 22, 0x0075, 0x0c000055, 0x0d, 0x00, 0x0000 }, + { 22, 0x0075, 0x0c000055, 0x0e, 0x00, 0x0000 }, + { 22, 0x0075, 0x0c000055, 0x0f, 0x00, 0x0000 }, + { 23, 0x0069, 0x00000049, 0x00, 0x00, 0x0000 }, + { 23, 0x0049, 0x00000049, 0x01, 0x00, 0x0000 }, + { 23, 0x0069, 0x00000049, 0x02, 0x00, 0x0000 }, + { 23, 0x0049, 0x00000049, 0x03, 0x00, 0x0000 }, + { 23, 0x0069, 0x04000049, 0x04, 0x00, 0x0000 }, + { 23, 0x0069, 0x04000049, 0x05, 0x00, 0x0000 }, + { 23, 0x0069, 0x04000049, 0x06, 0x00, 0x0000 }, + { 23, 0x0069, 0x04000049, 0x07, 0x00, 0x0000 }, + { 23, 0x0069, 0x08000049, 0x08, 0x00, 0x0000 }, + { 23, 0x0069, 0x08000049, 0x09, 0x00, 0x0000 }, + { 23, 0x0069, 0x08000049, 0x0a, 0x00, 0x0000 }, + { 23, 0x0069, 0x08000049, 0x0b, 0x00, 0x0000 }, + { 23, 0x0069, 0x0c000049, 0x0c, 0x00, 0x0000 }, + { 23, 0x0069, 0x0c000049, 0x0d, 0x00, 0x0000 }, + { 23, 0x0069, 0x0c000049, 0x0e, 0x00, 0x0000 }, + { 23, 0x0069, 0x0c000049, 0x0f, 0x00, 0x0000 }, + { 24, 0x006f, 0x0000004f, 0x00, 0x00, 0x0000 }, + { 24, 0x004f, 0x0000004f, 0x01, 0x00, 0x0000 }, + { 24, 0x006f, 0x0000004f, 0x02, 0x00, 0x0000 }, + { 24, 0x004f, 0x0000004f, 0x03, 0x00, 0x0000 }, + { 24, 0x006f, 0x0400004f, 0x04, 0x00, 0x0000 }, + { 24, 0x006f, 0x0400004f, 0x05, 0x00, 0x0000 }, + { 24, 0x006f, 0x0400004f, 0x06, 0x00, 0x0000 }, + { 24, 0x006f, 0x0400004f, 0x07, 0x00, 0x0000 }, + { 24, 0x006f, 0x0800004f, 0x08, 0x00, 0x0000 }, + { 24, 0x006f, 0x0800004f, 0x09, 0x00, 0x0000 }, + { 24, 0x006f, 0x0800004f, 0x0a, 0x00, 0x0000 }, + { 24, 0x006f, 0x0800004f, 0x0b, 0x00, 0x0000 }, + { 24, 0x006f, 0x0c00004f, 0x0c, 0x00, 0x0000 }, + { 24, 0x006f, 0x0c00004f, 0x0d, 0x00, 0x0000 }, + { 24, 0x006f, 0x0c00004f, 0x0e, 0x00, 0x0000 }, + { 24, 0x006f, 0x0c00004f, 0x0f, 0x00, 0x0000 }, + { 25, 0x0070, 0x00000050, 0x00, 0x00, 0x0000 }, + { 25, 0x0050, 0x00000050, 0x01, 0x00, 0x0000 }, + { 25, 0x0070, 0x00000050, 0x02, 0x00, 0x0000 }, + { 25, 0x0050, 0x00000050, 0x03, 0x00, 0x0000 }, + { 25, 0x0070, 0x04000050, 0x04, 0x00, 0x0000 }, + { 25, 0x0070, 0x04000050, 0x05, 0x00, 0x0000 }, + { 25, 0x0070, 0x04000050, 0x06, 0x00, 0x0000 }, + { 25, 0x0070, 0x04000050, 0x07, 0x00, 0x0000 }, + { 25, 0x0070, 0x08000050, 0x08, 0x00, 0x0000 }, + { 25, 0x0070, 0x08000050, 0x09, 0x00, 0x0000 }, + { 25, 0x0070, 0x08000050, 0x0a, 0x00, 0x0000 }, + { 25, 0x0070, 0x08000050, 0x0b, 0x00, 0x0000 }, + { 25, 0x0070, 0x0c000050, 0x0c, 0x00, 0x0000 }, + { 25, 0x0070, 0x0c000050, 0x0d, 0x00, 0x0000 }, + { 25, 0x0070, 0x0c000050, 0x0e, 0x00, 0x0000 }, + { 25, 0x0070, 0x0c000050, 0x0f, 0x00, 0x0000 }, + { 26, 0x005b, 0x0000005b, 0x00, 0x00, 0x0000 }, + { 26, 0x007b, 0x0000007b, 0x01, 0x00, 0x0000 }, + { 26, 0xffff, 0x01000000, 0x04, 0x00, 0x0000 }, + { 27, 0x005d, 0x0000005d, 0x00, 0x00, 0x0000 }, + { 27, 0x007d, 0x0000007d, 0x01, 0x00, 0x0000 }, + { 27, 0x007e, 0x0000007e, 0x02, 0x00, 0x0000 }, + { 27, 0x005d, 0x0400005d, 0x04, 0x00, 0x0000 }, + { 28, 0xffff, 0x01000004, 0x00, 0x00, 0x0000 }, + { 28, 0x006d, 0x0c00004d, 0x08, 0x00, 0x0000 }, + { 29, 0xffff, 0x01000021, 0x00, 0x04, 0x0004 }, + { 30, 0x0061, 0x00000041, 0x00, 0x00, 0x0000 }, + { 30, 0x0041, 0x00000041, 0x01, 0x00, 0x0000 }, + { 30, 0x0061, 0x00000041, 0x02, 0x00, 0x0000 }, + { 30, 0x0041, 0x00000041, 0x03, 0x00, 0x0000 }, + { 30, 0x0061, 0x04000041, 0x04, 0x00, 0x0000 }, + { 30, 0x0061, 0x04000041, 0x05, 0x00, 0x0000 }, + { 30, 0x0061, 0x04000041, 0x06, 0x00, 0x0000 }, + { 30, 0x0061, 0x04000041, 0x07, 0x00, 0x0000 }, + { 30, 0x0061, 0x08000041, 0x08, 0x00, 0x0000 }, + { 30, 0x0061, 0x08000041, 0x09, 0x00, 0x0000 }, + { 30, 0x0061, 0x08000041, 0x0a, 0x00, 0x0000 }, + { 30, 0x0061, 0x08000041, 0x0b, 0x00, 0x0000 }, + { 30, 0x0061, 0x0c000041, 0x0c, 0x00, 0x0000 }, + { 30, 0x0061, 0x0c000041, 0x0d, 0x00, 0x0000 }, + { 30, 0x0061, 0x0c000041, 0x0e, 0x00, 0x0000 }, + { 30, 0x0061, 0x0c000041, 0x0f, 0x00, 0x0000 }, + { 31, 0x0073, 0x00000053, 0x00, 0x00, 0x0000 }, + { 31, 0x0053, 0x00000053, 0x01, 0x00, 0x0000 }, + { 31, 0x0073, 0x00000053, 0x02, 0x00, 0x0000 }, + { 31, 0x0053, 0x00000053, 0x03, 0x00, 0x0000 }, + { 31, 0x0073, 0x04000053, 0x04, 0x00, 0x0000 }, + { 31, 0x0073, 0x04000053, 0x05, 0x00, 0x0000 }, + { 31, 0x0073, 0x04000053, 0x06, 0x00, 0x0000 }, + { 31, 0x0073, 0x04000053, 0x07, 0x00, 0x0000 }, + { 31, 0x0073, 0x08000053, 0x08, 0x00, 0x0000 }, + { 31, 0x0073, 0x08000053, 0x09, 0x00, 0x0000 }, + { 31, 0x0073, 0x08000053, 0x0a, 0x00, 0x0000 }, + { 31, 0x0073, 0x08000053, 0x0b, 0x00, 0x0000 }, + { 31, 0x0073, 0x0c000053, 0x0c, 0x00, 0x0000 }, + { 31, 0x0073, 0x0c000053, 0x0d, 0x00, 0x0000 }, + { 31, 0x0073, 0x0c000053, 0x0e, 0x00, 0x0000 }, + { 31, 0x0073, 0x0c000053, 0x0f, 0x00, 0x0000 }, + { 32, 0x0064, 0x00000044, 0x00, 0x00, 0x0000 }, + { 32, 0x0044, 0x00000044, 0x01, 0x00, 0x0000 }, + { 32, 0x0064, 0x00000044, 0x02, 0x00, 0x0000 }, + { 32, 0x0044, 0x00000044, 0x03, 0x00, 0x0000 }, + { 32, 0x0064, 0x04000044, 0x04, 0x00, 0x0000 }, + { 32, 0x0064, 0x04000044, 0x05, 0x00, 0x0000 }, + { 32, 0x0064, 0x04000044, 0x06, 0x00, 0x0000 }, + { 32, 0x0064, 0x04000044, 0x07, 0x00, 0x0000 }, + { 32, 0x0064, 0x08000044, 0x08, 0x00, 0x0000 }, + { 32, 0x0064, 0x08000044, 0x09, 0x00, 0x0000 }, + { 32, 0x0064, 0x08000044, 0x0a, 0x00, 0x0000 }, + { 32, 0x0064, 0x08000044, 0x0b, 0x00, 0x0000 }, + { 32, 0x0064, 0x0c000044, 0x0c, 0x00, 0x0000 }, + { 32, 0x0064, 0x0c000044, 0x0d, 0x00, 0x0000 }, + { 32, 0x0064, 0x0c000044, 0x0e, 0x00, 0x0000 }, + { 32, 0x0064, 0x0c000044, 0x0f, 0x00, 0x0000 }, + { 33, 0x0066, 0x00000046, 0x00, 0x00, 0x0000 }, + { 33, 0x0046, 0x00000046, 0x01, 0x00, 0x0000 }, + { 33, 0x0066, 0x00000046, 0x02, 0x00, 0x0000 }, + { 33, 0x0046, 0x00000046, 0x03, 0x00, 0x0000 }, + { 33, 0x0066, 0x04000046, 0x04, 0x00, 0x0000 }, + { 33, 0x0066, 0x04000046, 0x05, 0x00, 0x0000 }, + { 33, 0x0066, 0x04000046, 0x06, 0x00, 0x0000 }, + { 33, 0x0066, 0x04000046, 0x07, 0x00, 0x0000 }, + { 33, 0x0066, 0x08000046, 0x08, 0x00, 0x0000 }, + { 33, 0x0066, 0x08000046, 0x09, 0x00, 0x0000 }, + { 33, 0x0066, 0x08000046, 0x0a, 0x00, 0x0000 }, + { 33, 0x0066, 0x08000046, 0x0b, 0x00, 0x0000 }, + { 33, 0x0066, 0x0c000046, 0x0c, 0x00, 0x0000 }, + { 33, 0x0066, 0x0c000046, 0x0d, 0x00, 0x0000 }, + { 33, 0x0066, 0x0c000046, 0x0e, 0x00, 0x0000 }, + { 33, 0x0066, 0x0c000046, 0x0f, 0x00, 0x0000 }, + { 34, 0x0067, 0x00000047, 0x00, 0x00, 0x0000 }, + { 34, 0x0047, 0x00000047, 0x01, 0x00, 0x0000 }, + { 34, 0x0067, 0x00000047, 0x02, 0x00, 0x0000 }, + { 34, 0x0047, 0x00000047, 0x03, 0x00, 0x0000 }, + { 34, 0x0067, 0x04000047, 0x04, 0x00, 0x0000 }, + { 34, 0x0067, 0x04000047, 0x05, 0x00, 0x0000 }, + { 34, 0x0067, 0x04000047, 0x06, 0x00, 0x0000 }, + { 34, 0x0067, 0x04000047, 0x07, 0x00, 0x0000 }, + { 34, 0x0067, 0x08000047, 0x08, 0x00, 0x0000 }, + { 34, 0x0067, 0x08000047, 0x09, 0x00, 0x0000 }, + { 34, 0x0067, 0x08000047, 0x0a, 0x00, 0x0000 }, + { 34, 0x0067, 0x08000047, 0x0b, 0x00, 0x0000 }, + { 34, 0x0067, 0x0c000047, 0x0c, 0x00, 0x0000 }, + { 34, 0x0067, 0x0c000047, 0x0d, 0x00, 0x0000 }, + { 34, 0x0067, 0x0c000047, 0x0e, 0x00, 0x0000 }, + { 34, 0x0067, 0x0c000047, 0x0f, 0x00, 0x0000 }, + { 35, 0x0068, 0x00000048, 0x00, 0x00, 0x0000 }, + { 35, 0x0048, 0x00000048, 0x01, 0x00, 0x0000 }, + { 35, 0x0068, 0x00000048, 0x02, 0x00, 0x0000 }, + { 35, 0x0048, 0x00000048, 0x03, 0x00, 0x0000 }, + { 35, 0x0068, 0x04000048, 0x04, 0x00, 0x0000 }, + { 35, 0x0068, 0x04000048, 0x05, 0x00, 0x0000 }, + { 35, 0x0068, 0x04000048, 0x06, 0x00, 0x0000 }, + { 35, 0x0068, 0x04000048, 0x07, 0x00, 0x0000 }, + { 35, 0x0068, 0x08000048, 0x08, 0x00, 0x0000 }, + { 35, 0x0068, 0x08000048, 0x09, 0x00, 0x0000 }, + { 35, 0x0068, 0x08000048, 0x0a, 0x00, 0x0000 }, + { 35, 0x0068, 0x08000048, 0x0b, 0x00, 0x0000 }, + { 35, 0x0068, 0x0c000048, 0x0c, 0x00, 0x0000 }, + { 35, 0x0068, 0x0c000048, 0x0d, 0x00, 0x0000 }, + { 35, 0x0068, 0x0c000048, 0x0e, 0x00, 0x0000 }, + { 35, 0x0068, 0x0c000048, 0x0f, 0x00, 0x0000 }, + { 36, 0x006a, 0x0000004a, 0x00, 0x00, 0x0000 }, + { 36, 0x004a, 0x0000004a, 0x01, 0x00, 0x0000 }, + { 36, 0x006a, 0x0000004a, 0x02, 0x00, 0x0000 }, + { 36, 0x004a, 0x0000004a, 0x03, 0x00, 0x0000 }, + { 36, 0x006a, 0x0400004a, 0x04, 0x00, 0x0000 }, + { 36, 0x006a, 0x0400004a, 0x05, 0x00, 0x0000 }, + { 36, 0x006a, 0x0400004a, 0x06, 0x00, 0x0000 }, + { 36, 0x006a, 0x0400004a, 0x07, 0x00, 0x0000 }, + { 36, 0x006a, 0x0800004a, 0x08, 0x00, 0x0000 }, + { 36, 0x006a, 0x0800004a, 0x09, 0x00, 0x0000 }, + { 36, 0x006a, 0x0800004a, 0x0a, 0x00, 0x0000 }, + { 36, 0x006a, 0x0800004a, 0x0b, 0x00, 0x0000 }, + { 36, 0x006a, 0x0c00004a, 0x0c, 0x00, 0x0000 }, + { 36, 0x006a, 0x0c00004a, 0x0d, 0x00, 0x0000 }, + { 36, 0x006a, 0x0c00004a, 0x0e, 0x00, 0x0000 }, + { 36, 0x006a, 0x0c00004a, 0x0f, 0x00, 0x0000 }, + { 37, 0x006b, 0x0000004b, 0x00, 0x00, 0x0000 }, + { 37, 0x004b, 0x0000004b, 0x01, 0x00, 0x0000 }, + { 37, 0x006b, 0x0000004b, 0x02, 0x00, 0x0000 }, + { 37, 0x004b, 0x0000004b, 0x03, 0x00, 0x0000 }, + { 37, 0x006b, 0x0400004b, 0x04, 0x00, 0x0000 }, + { 37, 0x006b, 0x0400004b, 0x05, 0x00, 0x0000 }, + { 37, 0x006b, 0x0400004b, 0x06, 0x00, 0x0000 }, + { 37, 0x006b, 0x0400004b, 0x07, 0x00, 0x0000 }, + { 37, 0x006b, 0x0800004b, 0x08, 0x00, 0x0000 }, + { 37, 0x006b, 0x0800004b, 0x09, 0x00, 0x0000 }, + { 37, 0x006b, 0x0800004b, 0x0a, 0x00, 0x0000 }, + { 37, 0x006b, 0x0800004b, 0x0b, 0x00, 0x0000 }, + { 37, 0x006b, 0x0c00004b, 0x0c, 0x00, 0x0000 }, + { 37, 0x006b, 0x0c00004b, 0x0d, 0x00, 0x0000 }, + { 37, 0x006b, 0x0c00004b, 0x0e, 0x00, 0x0000 }, + { 37, 0x006b, 0x0c00004b, 0x0f, 0x00, 0x0000 }, + { 38, 0x006c, 0x0000004c, 0x00, 0x00, 0x0000 }, + { 38, 0x004c, 0x0000004c, 0x01, 0x00, 0x0000 }, + { 38, 0x006c, 0x0000004c, 0x02, 0x00, 0x0000 }, + { 38, 0x004c, 0x0000004c, 0x03, 0x00, 0x0000 }, + { 38, 0x006c, 0x0400004c, 0x04, 0x00, 0x0000 }, + { 38, 0x006c, 0x0400004c, 0x05, 0x00, 0x0000 }, + { 38, 0x006c, 0x0400004c, 0x06, 0x00, 0x0000 }, + { 38, 0x006c, 0x0400004c, 0x07, 0x00, 0x0000 }, + { 38, 0x006c, 0x0800004c, 0x08, 0x00, 0x0000 }, + { 38, 0x006c, 0x0800004c, 0x09, 0x00, 0x0000 }, + { 38, 0x006c, 0x0800004c, 0x0a, 0x00, 0x0000 }, + { 38, 0x006c, 0x0800004c, 0x0b, 0x00, 0x0000 }, + { 38, 0x006c, 0x0c00004c, 0x0c, 0x00, 0x0000 }, + { 38, 0x006c, 0x0c00004c, 0x0d, 0x00, 0x0000 }, + { 38, 0x006c, 0x0c00004c, 0x0e, 0x00, 0x0000 }, + { 38, 0x006c, 0x0c00004c, 0x0f, 0x00, 0x0000 }, + { 39, 0x003b, 0x0000003b, 0x00, 0x00, 0x0000 }, + { 39, 0x003a, 0x0000003a, 0x01, 0x00, 0x0000 }, + { 40, 0x0027, 0x00000027, 0x00, 0x00, 0x0000 }, + { 40, 0x0022, 0x00000022, 0x01, 0x00, 0x0000 }, + { 40, 0x0027, 0x01001251, 0x02, 0x01, 0x0000 }, + { 40, 0x0022, 0x01001257, 0x03, 0x01, 0x0000 }, + { 40, 0x0067, 0x04000047, 0x04, 0x00, 0x0000 }, + { 41, 0x0060, 0x00000060, 0x00, 0x00, 0x0000 }, + { 41, 0x007e, 0x0000007e, 0x01, 0x00, 0x0000 }, + { 41, 0x0060, 0x01001250, 0x02, 0x01, 0x0000 }, + { 41, 0x007e, 0x01001253, 0x03, 0x01, 0x0000 }, + { 42, 0xffff, 0x01000020, 0x00, 0x04, 0x0001 }, + { 43, 0x005c, 0x0000005c, 0x00, 0x00, 0x0000 }, + { 43, 0x007c, 0x0000007c, 0x01, 0x00, 0x0000 }, + { 43, 0x005c, 0x0400005c, 0x04, 0x00, 0x0000 }, + { 44, 0x007a, 0x0000005a, 0x00, 0x00, 0x0000 }, + { 44, 0x005a, 0x0000005a, 0x01, 0x00, 0x0000 }, + { 44, 0x007a, 0x0000005a, 0x02, 0x00, 0x0000 }, + { 44, 0x005a, 0x0000005a, 0x03, 0x00, 0x0000 }, + { 44, 0x007a, 0x0400005a, 0x04, 0x00, 0x0000 }, + { 44, 0x007a, 0x0400005a, 0x05, 0x00, 0x0000 }, + { 44, 0x007a, 0x0400005a, 0x06, 0x00, 0x0000 }, + { 44, 0x007a, 0x0400005a, 0x07, 0x00, 0x0000 }, + { 44, 0x007a, 0x0800005a, 0x08, 0x00, 0x0000 }, + { 44, 0x007a, 0x0800005a, 0x09, 0x00, 0x0000 }, + { 44, 0x007a, 0x0800005a, 0x0a, 0x00, 0x0000 }, + { 44, 0x007a, 0x0800005a, 0x0b, 0x00, 0x0000 }, + { 44, 0x007a, 0x0c00005a, 0x0c, 0x00, 0x0000 }, + { 44, 0x007a, 0x0c00005a, 0x0d, 0x00, 0x0000 }, + { 44, 0x007a, 0x0c00005a, 0x0e, 0x00, 0x0000 }, + { 44, 0x007a, 0x0c00005a, 0x0f, 0x00, 0x0000 }, + { 45, 0x0078, 0x00000058, 0x00, 0x00, 0x0000 }, + { 45, 0x0058, 0x00000058, 0x01, 0x00, 0x0000 }, + { 45, 0x0078, 0x00000058, 0x02, 0x00, 0x0000 }, + { 45, 0x0058, 0x00000058, 0x03, 0x00, 0x0000 }, + { 45, 0x0078, 0x04000058, 0x04, 0x00, 0x0000 }, + { 45, 0x0078, 0x04000058, 0x05, 0x00, 0x0000 }, + { 45, 0x0078, 0x04000058, 0x06, 0x00, 0x0000 }, + { 45, 0x0078, 0x04000058, 0x07, 0x00, 0x0000 }, + { 45, 0x0078, 0x08000058, 0x08, 0x00, 0x0000 }, + { 45, 0x0078, 0x08000058, 0x09, 0x00, 0x0000 }, + { 45, 0x0078, 0x08000058, 0x0a, 0x00, 0x0000 }, + { 45, 0x0078, 0x08000058, 0x0b, 0x00, 0x0000 }, + { 45, 0x0078, 0x0c000058, 0x0c, 0x00, 0x0000 }, + { 45, 0x0078, 0x0c000058, 0x0d, 0x00, 0x0000 }, + { 45, 0x0078, 0x0c000058, 0x0e, 0x00, 0x0000 }, + { 45, 0x0078, 0x0c000058, 0x0f, 0x00, 0x0000 }, + { 46, 0x0063, 0x00000043, 0x00, 0x00, 0x0000 }, + { 46, 0x0043, 0x00000043, 0x01, 0x00, 0x0000 }, + { 46, 0x0063, 0x00000043, 0x02, 0x00, 0x0000 }, + { 46, 0x0043, 0x00000043, 0x03, 0x00, 0x0000 }, + { 46, 0x0063, 0x04000043, 0x04, 0x00, 0x0000 }, + { 46, 0x0063, 0x04000043, 0x05, 0x00, 0x0000 }, + { 46, 0x0063, 0x04000043, 0x06, 0x00, 0x0000 }, + { 46, 0x0063, 0x04000043, 0x07, 0x00, 0x0000 }, + { 46, 0x0063, 0x08000043, 0x08, 0x00, 0x0000 }, + { 46, 0x0063, 0x08000043, 0x09, 0x00, 0x0000 }, + { 46, 0x0063, 0x08000043, 0x0a, 0x00, 0x0000 }, + { 46, 0x0063, 0x08000043, 0x0b, 0x00, 0x0000 }, + { 46, 0x0063, 0x0c000043, 0x0c, 0x00, 0x0000 }, + { 46, 0x0063, 0x0c000043, 0x0d, 0x00, 0x0000 }, + { 46, 0x0063, 0x0c000043, 0x0e, 0x00, 0x0000 }, + { 46, 0x0063, 0x0c000043, 0x0f, 0x00, 0x0000 }, + { 47, 0x0076, 0x00000056, 0x00, 0x00, 0x0000 }, + { 47, 0x0056, 0x00000056, 0x01, 0x00, 0x0000 }, + { 47, 0x0076, 0x00000056, 0x02, 0x00, 0x0000 }, + { 47, 0x0056, 0x00000056, 0x03, 0x00, 0x0000 }, + { 47, 0x0076, 0x04000056, 0x04, 0x00, 0x0000 }, + { 47, 0x0076, 0x04000056, 0x05, 0x00, 0x0000 }, + { 47, 0x0076, 0x04000056, 0x06, 0x00, 0x0000 }, + { 47, 0x0076, 0x04000056, 0x07, 0x00, 0x0000 }, + { 47, 0x0076, 0x08000056, 0x08, 0x00, 0x0000 }, + { 47, 0x0076, 0x08000056, 0x09, 0x00, 0x0000 }, + { 47, 0x0076, 0x08000056, 0x0a, 0x00, 0x0000 }, + { 47, 0x0076, 0x08000056, 0x0b, 0x00, 0x0000 }, + { 47, 0x0076, 0x0c000056, 0x0c, 0x00, 0x0000 }, + { 47, 0x0076, 0x0c000056, 0x0d, 0x00, 0x0000 }, + { 47, 0x0076, 0x0c000056, 0x0e, 0x00, 0x0000 }, + { 47, 0x0076, 0x0c000056, 0x0f, 0x00, 0x0000 }, + { 48, 0x0062, 0x00000042, 0x00, 0x00, 0x0000 }, + { 48, 0x0042, 0x00000042, 0x01, 0x00, 0x0000 }, + { 48, 0x0062, 0x00000042, 0x02, 0x00, 0x0000 }, + { 48, 0x0042, 0x00000042, 0x03, 0x00, 0x0000 }, + { 48, 0x0062, 0x04000042, 0x04, 0x00, 0x0000 }, + { 48, 0x0062, 0x04000042, 0x05, 0x00, 0x0000 }, + { 48, 0x0062, 0x04000042, 0x06, 0x00, 0x0000 }, + { 48, 0x0062, 0x04000042, 0x07, 0x00, 0x0000 }, + { 48, 0x0062, 0x08000042, 0x08, 0x00, 0x0000 }, + { 48, 0x0062, 0x08000042, 0x09, 0x00, 0x0000 }, + { 48, 0x0062, 0x08000042, 0x0a, 0x00, 0x0000 }, + { 48, 0x0062, 0x08000042, 0x0b, 0x00, 0x0000 }, + { 48, 0x0062, 0x0c000042, 0x0c, 0x00, 0x0000 }, + { 48, 0x0062, 0x0c000042, 0x0d, 0x00, 0x0000 }, + { 48, 0x0062, 0x0c000042, 0x0e, 0x00, 0x0000 }, + { 48, 0x0062, 0x0c000042, 0x0f, 0x00, 0x0000 }, + { 49, 0x006e, 0x0000004e, 0x00, 0x00, 0x0000 }, + { 49, 0x004e, 0x0000004e, 0x01, 0x00, 0x0000 }, + { 49, 0x006e, 0x0000004e, 0x02, 0x00, 0x0000 }, + { 49, 0x004e, 0x0000004e, 0x03, 0x00, 0x0000 }, + { 49, 0x006e, 0x0400004e, 0x04, 0x00, 0x0000 }, + { 49, 0x006e, 0x0400004e, 0x05, 0x00, 0x0000 }, + { 49, 0x006e, 0x0400004e, 0x06, 0x00, 0x0000 }, + { 49, 0x006e, 0x0400004e, 0x07, 0x00, 0x0000 }, + { 49, 0x006e, 0x0800004e, 0x08, 0x00, 0x0000 }, + { 49, 0x006e, 0x0800004e, 0x09, 0x00, 0x0000 }, + { 49, 0x006e, 0x0800004e, 0x0a, 0x00, 0x0000 }, + { 49, 0x006e, 0x0800004e, 0x0b, 0x00, 0x0000 }, + { 49, 0x006e, 0x0c00004e, 0x0c, 0x00, 0x0000 }, + { 49, 0x006e, 0x0c00004e, 0x0d, 0x00, 0x0000 }, + { 49, 0x006e, 0x0c00004e, 0x0e, 0x00, 0x0000 }, + { 49, 0x006e, 0x0c00004e, 0x0f, 0x00, 0x0000 }, + { 50, 0x006d, 0x0000004d, 0x00, 0x00, 0x0000 }, + { 50, 0x004d, 0x0000004d, 0x01, 0x00, 0x0000 }, + { 50, 0x006d, 0x0000004d, 0x02, 0x00, 0x0000 }, + { 50, 0x004d, 0x0000004d, 0x03, 0x00, 0x0000 }, + { 50, 0x006d, 0x0400004d, 0x04, 0x00, 0x0000 }, + { 50, 0x006d, 0x0400004d, 0x05, 0x00, 0x0000 }, + { 50, 0x006d, 0x0400004d, 0x06, 0x00, 0x0000 }, + { 50, 0x006d, 0x0400004d, 0x07, 0x00, 0x0000 }, + { 50, 0x006d, 0x0800004d, 0x08, 0x00, 0x0000 }, + { 50, 0x006d, 0x0800004d, 0x09, 0x00, 0x0000 }, + { 50, 0x006d, 0x0800004d, 0x0a, 0x00, 0x0000 }, + { 50, 0x006d, 0x0800004d, 0x0b, 0x00, 0x0000 }, + { 50, 0x006d, 0x0c00004d, 0x0c, 0x00, 0x0000 }, + { 50, 0x006d, 0x0c00004d, 0x0d, 0x00, 0x0000 }, + { 50, 0x006d, 0x0c00004d, 0x0e, 0x00, 0x0000 }, + { 50, 0x006d, 0x0c00004d, 0x0f, 0x00, 0x0000 }, + { 51, 0x002c, 0x0000002c, 0x00, 0x00, 0x0000 }, + { 51, 0x003c, 0x0000003c, 0x01, 0x00, 0x0000 }, + { 51, 0x002c, 0x0100125b, 0x02, 0x01, 0x0000 }, + { 52, 0x002e, 0x0000002e, 0x00, 0x00, 0x0000 }, + { 52, 0x003e, 0x0000003e, 0x01, 0x00, 0x0000 }, + { 52, 0xffff, 0x01001120, 0x02, 0x00, 0x0000 }, + { 53, 0x002f, 0x0000002f, 0x00, 0x00, 0x0000 }, + { 53, 0x003f, 0x0000003f, 0x01, 0x00, 0x0000 }, + { 53, 0xffff, 0x01000003, 0x04, 0x00, 0x0000 }, + { 54, 0xffff, 0x01000020, 0x00, 0x04, 0x0001 }, + { 55, 0x002a, 0x2000002a, 0x00, 0x00, 0x0000 }, + { 56, 0xffff, 0x01000023, 0x00, 0x04, 0x0008 }, + { 57, 0x0020, 0x00000020, 0x00, 0x00, 0x0000 }, + { 58, 0xffff, 0x01000024, 0x00, 0x00, 0x0000 }, + { 59, 0xffff, 0x01000030, 0x00, 0x00, 0x0000 }, + { 59, 0xffff, 0x0100003c, 0x01, 0x00, 0x0000 }, + { 59, 0xffff, 0x01000048, 0x04, 0x00, 0x0000 }, + { 59, 0xffff, 0x01000000, 0x0c, 0x08, 0x0100 }, + { 60, 0xffff, 0x01000031, 0x00, 0x00, 0x0000 }, + { 60, 0xffff, 0x0100003d, 0x01, 0x00, 0x0000 }, + { 60, 0xffff, 0x01000049, 0x04, 0x00, 0x0000 }, + { 60, 0xffff, 0x01000000, 0x0c, 0x08, 0x0101 }, + { 61, 0xffff, 0x01000032, 0x00, 0x00, 0x0000 }, + { 61, 0xffff, 0x0100003e, 0x01, 0x00, 0x0000 }, + { 61, 0xffff, 0x0100004a, 0x04, 0x00, 0x0000 }, + { 61, 0xffff, 0x01000000, 0x0c, 0x08, 0x0102 }, + { 62, 0xffff, 0x01000033, 0x00, 0x00, 0x0000 }, + { 62, 0xffff, 0x0100003f, 0x01, 0x00, 0x0000 }, + { 62, 0xffff, 0x0100004b, 0x04, 0x00, 0x0000 }, + { 62, 0xffff, 0x01000000, 0x0c, 0x08, 0x0103 }, + { 63, 0xffff, 0x01000034, 0x00, 0x00, 0x0000 }, + { 63, 0xffff, 0x01000040, 0x01, 0x00, 0x0000 }, + { 63, 0xffff, 0x0100004c, 0x04, 0x00, 0x0000 }, + { 63, 0xffff, 0x01000000, 0x0c, 0x08, 0x0104 }, + { 64, 0xffff, 0x01000035, 0x00, 0x00, 0x0000 }, + { 64, 0xffff, 0x01000041, 0x01, 0x00, 0x0000 }, + { 64, 0xffff, 0x0100004d, 0x04, 0x00, 0x0000 }, + { 64, 0xffff, 0x01000000, 0x0c, 0x08, 0x0105 }, + { 65, 0xffff, 0x01000036, 0x00, 0x00, 0x0000 }, + { 65, 0xffff, 0x01000042, 0x01, 0x00, 0x0000 }, + { 65, 0xffff, 0x0100004e, 0x04, 0x00, 0x0000 }, + { 65, 0xffff, 0x01000000, 0x0c, 0x08, 0x0106 }, + { 66, 0xffff, 0x01000037, 0x00, 0x00, 0x0000 }, + { 66, 0xffff, 0x01000043, 0x01, 0x00, 0x0000 }, + { 66, 0xffff, 0x0100004f, 0x04, 0x00, 0x0000 }, + { 66, 0xffff, 0x01000000, 0x0c, 0x08, 0x0107 }, + { 67, 0xffff, 0x01000038, 0x00, 0x00, 0x0000 }, + { 67, 0xffff, 0x01000044, 0x01, 0x00, 0x0000 }, + { 67, 0xffff, 0x01000050, 0x04, 0x00, 0x0000 }, + { 67, 0xffff, 0x01000000, 0x0c, 0x08, 0x0108 }, + { 68, 0xffff, 0x01000039, 0x00, 0x00, 0x0000 }, + { 68, 0xffff, 0x01000045, 0x01, 0x00, 0x0000 }, + { 68, 0xffff, 0x01000051, 0x04, 0x00, 0x0000 }, + { 68, 0xffff, 0x01000000, 0x0c, 0x08, 0x0109 }, + { 69, 0xffff, 0x01000025, 0x00, 0x00, 0x0000 }, + { 70, 0xffff, 0x01000026, 0x00, 0x00, 0x0000 }, + { 70, 0xffff, 0x01000026, 0x08, 0x00, 0x0000 }, + { 71, 0x0037, 0x20000037, 0x00, 0x00, 0x0000 }, + { 72, 0x0038, 0x20000038, 0x00, 0x00, 0x0000 }, + { 73, 0x0039, 0x20000039, 0x00, 0x00, 0x0000 }, + { 74, 0x002d, 0x2000002d, 0x00, 0x00, 0x0000 }, + { 75, 0x0034, 0x20000034, 0x00, 0x00, 0x0000 }, + { 76, 0x0035, 0x20000035, 0x00, 0x00, 0x0000 }, + { 77, 0x0036, 0x20000036, 0x00, 0x00, 0x0000 }, + { 78, 0x002b, 0x2000002b, 0x00, 0x00, 0x0000 }, + { 79, 0x0031, 0x20000031, 0x00, 0x00, 0x0000 }, + { 80, 0x0032, 0x20000032, 0x00, 0x00, 0x0000 }, + { 81, 0x0033, 0x20000033, 0x00, 0x00, 0x0000 }, + { 82, 0x0030, 0x20000030, 0x00, 0x00, 0x0000 }, + { 83, 0x002e, 0x2000002e, 0x00, 0x00, 0x0000 }, + { 83, 0xffff, 0x01000000, 0x06, 0x08, 0x0200 }, + { 83, 0xffff, 0x01000000, 0x0c, 0x08, 0x0200 }, + { 86, 0x003c, 0x0000003c, 0x00, 0x00, 0x0000 }, + { 86, 0x003e, 0x0000003e, 0x01, 0x00, 0x0000 }, + { 86, 0x007c, 0x0000007c, 0x02, 0x00, 0x0000 }, + { 87, 0xffff, 0x0100003a, 0x00, 0x00, 0x0000 }, + { 87, 0xffff, 0x01000046, 0x01, 0x00, 0x0000 }, + { 87, 0xffff, 0x01000052, 0x04, 0x00, 0x0000 }, + { 87, 0xffff, 0x01000000, 0x0c, 0x08, 0x010a }, + { 88, 0xffff, 0x0100003b, 0x00, 0x00, 0x0000 }, + { 88, 0xffff, 0x01000047, 0x01, 0x00, 0x0000 }, + { 88, 0xffff, 0x01000000, 0x0c, 0x08, 0x010b }, + { 96, 0xffff, 0x21000005, 0x00, 0x00, 0x0000 }, + { 97, 0xffff, 0x01000021, 0x00, 0x04, 0x0004 }, + { 98, 0x002f, 0x2000002f, 0x00, 0x00, 0x0000 }, + { 99, 0x005c, 0x0400005c, 0x00, 0x00, 0x0000 }, + { 100, 0xffff, 0x01001103, 0x00, 0x04, 0x0002 }, + { 102, 0xffff, 0x01000010, 0x00, 0x00, 0x0000 }, + { 103, 0xffff, 0x01000013, 0x00, 0x00, 0x0000 }, + { 104, 0xffff, 0x01000016, 0x00, 0x00, 0x0000 }, + { 105, 0xffff, 0x01000012, 0x00, 0x00, 0x0000 }, + { 105, 0xffff, 0x01000000, 0x0c, 0x08, 0x0180 }, + { 106, 0xffff, 0x01000014, 0x00, 0x00, 0x0000 }, + { 106, 0xffff, 0x01000000, 0x0c, 0x08, 0x0181 }, + { 107, 0xffff, 0x01000011, 0x00, 0x00, 0x0000 }, + { 108, 0xffff, 0x01000015, 0x00, 0x00, 0x0000 }, + { 109, 0xffff, 0x01000017, 0x00, 0x00, 0x0000 }, + { 110, 0xffff, 0x01000006, 0x00, 0x00, 0x0000 }, + { 111, 0xffff, 0x01000007, 0x00, 0x00, 0x0000 }, + { 111, 0xffff, 0x01000000, 0x06, 0x08, 0x0200 }, + { 111, 0xffff, 0x01000000, 0x0c, 0x08, 0x0200 }, + { 119, 0xffff, 0x01000008, 0x00, 0x00, 0x0000 }, +}; + +const QEvdevKeyboardMap::Composing QEvdevKeyboardHandler::s_keycompose_default[] = { + { 0x0060, 0x0041, 0x00c0 }, + { 0x0060, 0x0061, 0x00e0 }, + { 0x0027, 0x0041, 0x00c1 }, + { 0x0027, 0x0061, 0x00e1 }, + { 0x005e, 0x0041, 0x00c2 }, + { 0x005e, 0x0061, 0x00e2 }, + { 0x007e, 0x0041, 0x00c3 }, + { 0x007e, 0x0061, 0x00e3 }, + { 0x0022, 0x0041, 0x00c4 }, + { 0x0022, 0x0061, 0x00e4 }, + { 0x002d, 0x0061, 0x00aa }, + { 0x002d, 0x0041, 0x00aa }, + { 0x004f, 0x0041, 0x00c5 }, + { 0x006f, 0x0061, 0x00e5 }, + { 0x0030, 0x0041, 0x00c5 }, + { 0x0030, 0x0061, 0x00e5 }, + { 0x0041, 0x0041, 0x00c5 }, + { 0x0061, 0x0061, 0x00e5 }, + { 0x00b0, 0x0041, 0x00c5 }, + { 0x00b0, 0x0061, 0x00e5 }, + { 0x0041, 0x0045, 0x00c6 }, + { 0x0061, 0x0065, 0x00e6 }, + { 0x002c, 0x0043, 0x00c7 }, + { 0x002c, 0x0063, 0x00e7 }, + { 0x005e, 0x0043, 0x00c7 }, + { 0x005e, 0x0063, 0x00e7 }, + { 0x0060, 0x0045, 0x00c8 }, + { 0x0060, 0x0065, 0x00e8 }, + { 0x0027, 0x0045, 0x00c9 }, + { 0x0027, 0x0065, 0x00e9 }, + { 0x005e, 0x0045, 0x00ca }, + { 0x005e, 0x0065, 0x00ea }, + { 0x0022, 0x0045, 0x00cb }, + { 0x0022, 0x0065, 0x00eb }, + { 0x0060, 0x0049, 0x00cc }, + { 0x0060, 0x0069, 0x00ec }, + { 0x0027, 0x0049, 0x00cd }, + { 0x0027, 0x0069, 0x00ed }, + { 0x005e, 0x0049, 0x00ce }, + { 0x005e, 0x0069, 0x00ee }, + { 0x0022, 0x0049, 0x00cf }, + { 0x0022, 0x0069, 0x00ef }, + { 0x002d, 0x0044, 0x00d0 }, + { 0x002d, 0x0064, 0x00f0 }, + { 0x005e, 0x0044, 0x00d0 }, + { 0x005e, 0x0064, 0x00f0 }, + { 0x007e, 0x004e, 0x00d1 }, + { 0x007e, 0x006e, 0x00f1 }, + { 0x005e, 0x004e, 0x00d1 }, + { 0x005e, 0x006e, 0x00f1 }, + { 0x0060, 0x004f, 0x00d2 }, + { 0x0060, 0x006f, 0x00f2 }, + { 0x0027, 0x004f, 0x00d3 }, + { 0x0027, 0x006f, 0x00f3 }, + { 0x005e, 0x004f, 0x00d4 }, + { 0x005e, 0x006f, 0x00f4 }, + { 0x007e, 0x004f, 0x00d5 }, + { 0x007e, 0x006f, 0x00f5 }, + { 0x0022, 0x004f, 0x00d6 }, + { 0x0022, 0x006f, 0x00f6 }, + { 0x002f, 0x004f, 0x00d8 }, + { 0x002f, 0x006f, 0x00f8 }, + { 0x002d, 0x006f, 0x00ba }, + { 0x002d, 0x004f, 0x00ba }, + { 0x0060, 0x0055, 0x00d9 }, + { 0x0060, 0x0075, 0x00f9 }, + { 0x0027, 0x0055, 0x00da }, + { 0x0027, 0x0075, 0x00fa }, + { 0x005e, 0x0055, 0x00db }, + { 0x005e, 0x0075, 0x00fb }, + { 0x0022, 0x0055, 0x00dc }, + { 0x0022, 0x0075, 0x00fc }, + { 0x0027, 0x0059, 0x00dd }, + { 0x0027, 0x0079, 0x00fd }, + { 0x0054, 0x0048, 0x00de }, + { 0x0074, 0x0068, 0x00fe }, + { 0x0073, 0x0073, 0x00df }, + { 0x0022, 0x0079, 0x00ff }, + { 0x0073, 0x007a, 0x00df }, + { 0x006e, 0x006e, 0x00f1 }, + { 0x006e, 0x0068, 0x00f1 }, + { 0x004e, 0x0059, 0x00d1 }, + { 0x004e, 0x004e, 0x00d1 }, + { 0x004e, 0x0048, 0x00d1 }, + { 0x004e, 0x0079, 0x00d1 }, + { 0x004e, 0x006e, 0x00d1 }, + { 0x004e, 0x0068, 0x00d1 }, + { 0x002d, 0x004c, 0x00a3 }, + { 0x003c, 0x003c, 0x00ab }, + { 0x003e, 0x003e, 0x00bb }, + { 0x003f, 0x003f, 0x00bf }, + { 0x005e, 0x003f, 0x00bf }, + { 0x0021, 0x0021, 0x00a1 }, + { 0x005e, 0x0021, 0x00a1 }, + { 0x005e, 0x0031, 0x00b9 }, + { 0x005e, 0x0032, 0x00b2 }, + { 0x005e, 0x0033, 0x00b3 }, + { 0x002b, 0x002d, 0x00b1 }, + { 0x0063, 0x003d, 0x00a2 }, + { 0x0063, 0x002f, 0x00a2 }, + { 0x002f, 0x0063, 0x00a2 }, + { 0x002d, 0x0063, 0x00a2 }, + { 0x002d, 0x0043, 0x00a2 }, + { 0x004c, 0x003d, 0x00a3 }, + { 0x002d, 0x004c, 0x00a3 }, + { 0x002d, 0x006c, 0x00a3 }, + { 0x005e, 0x002a, 0x00d7 }, + { 0x005e, 0x0078, 0x00d7 }, + { 0x0078, 0x0078, 0x00d7 }, + { 0x005e, 0x002e, 0x00b7 }, + { 0x002e, 0x002e, 0x00b7 }, + { 0x005e, 0x002f, 0x00f7 }, + { 0x005e, 0x003a, 0x00f7 }, + { 0x002d, 0x003a, 0x00f7 }, + { 0x003a, 0x002d, 0x00f7 }, + { 0x0059, 0x003d, 0x00a5 }, + { 0x002d, 0x0059, 0x00a5 }, + { 0x002d, 0x006c, 0x00a5 }, + { 0x0028, 0x0063, 0x00a9 }, + { 0x0022, 0x0063, 0x00a9 }, + { 0x002d, 0x0061, 0x00aa }, + { 0x002d, 0x0041, 0x00aa }, + { 0x002d, 0x006f, 0x00ba }, + { 0x002d, 0x004f, 0x00ba }, + { 0x0028, 0x0072, 0x00ae }, + { 0x0022, 0x0072, 0x00ae }, + { 0x006d, 0x0075, 0x00b5 }, + { 0x0031, 0x0034, 0x0152 }, + { 0x0031, 0x0032, 0x0153 }, + { 0x0033, 0x0034, 0x0178 }, + { 0x0065, 0x003d, 0x20ac }, + { 0x002d, 0x0065, 0x20ac }, + { 0x002d, 0x0045, 0x20ac }, + { 0x0076, 0x0053, 0x0160 }, + { 0x005e, 0x0053, 0x0160 }, + { 0x0076, 0x0073, 0x0161 }, + { 0x005e, 0x0073, 0x0161 }, + { 0x0076, 0x005a, 0x017d }, + { 0x005e, 0x005a, 0x017d }, + { 0x0076, 0x007a, 0x017e }, + { 0x005e, 0x007a, 0x017e }, + { 0x004f, 0x0045, 0x0152 }, + { 0x004f, 0x0065, 0x0152 }, + { 0x006f, 0x0065, 0x0153 }, + { 0x0022, 0x0059, 0x0178 }, + { 0x0069, 0x006a, 0x00ff }, + { 0x0049, 0x004a, 0x0178 }, +}; + +#endif // QEVDEVKEYBOARDHANDLER_DEFAULTMAP_H diff --git a/src/plugins/generic/evdevkeyboard/qevdevkeyboardhandler.cpp b/src/plugins/generic/evdevkeyboard/qevdevkeyboardhandler.cpp new file mode 100644 index 00000000000..f9237e33251 --- /dev/null +++ b/src/plugins/generic/evdevkeyboard/qevdevkeyboardhandler.cpp @@ -0,0 +1,490 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the QtGui module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qevdevkeyboardhandler.h" + +#include + +#include +#include +#include +#include +#include + +#include + +//#define QT_QPA_KEYMAP_DEBUG + +#ifdef QT_QPA_KEYMAP_DEBUG +#include +#endif + +QT_BEGIN_NAMESPACE + +// simple builtin US keymap +#include "qevdevkeyboard_defaultmap.h" + +QEvdevKeyboardHandler::QEvdevKeyboardHandler(int deviceDescriptor, const QString &device, bool disableZap, bool enableCompose, const QString &keymapFile) + : m_fd(deviceDescriptor), m_device(device), + m_modifiers(0), m_composing(0), m_dead_unicode(0xffff), + m_no_zap(disableZap), m_do_compose(enableCompose), + m_keymap(0), m_keymap_size(0), m_keycompose(0), m_keycompose_size(0) +{ +#ifdef QT_QPA_KEYMAP_DEBUG + qWarning() << "Create keyboard handler with for device" << device; +#endif + + setObjectName(QLatin1String("LinuxInput Keyboard Handler")); + + memset(m_locks, 0, sizeof(m_locks)); + + if (keymapFile.isEmpty() || !loadKeymap(keymapFile)) + unloadKeymap(); + + // socket notifier for events on the keyboard device + QSocketNotifier *notifier; + notifier = new QSocketNotifier(m_fd, QSocketNotifier::Read, this); + connect(notifier, SIGNAL(activated(int)), this, SLOT(readKeycode())); +} + +QEvdevKeyboardHandler::~QEvdevKeyboardHandler() +{ + unloadKeymap(); + + if (m_fd >= 0) + qt_safe_close(m_fd); +} + +QEvdevKeyboardHandler *QEvdevKeyboardHandler::createLinuxInputKeyboardHandler(const QString &key, const QString &specification) +{ +#ifdef QT_QPA_KEYMAP_DEBUG + qWarning() << "Try to create keyboard handler with" << key << specification; +#else + Q_UNUSED(key) +#endif + + QString keymapFile; + QString device = "/dev/input/event0"; + int repeatDelay = 400; + int repeatRate = 80; + bool disableZap = false; + bool enableCompose = false; + + QStringList args = specification.split(QLatin1Char(':')); + foreach (const QString &arg, args) { + if (arg.startsWith(QLatin1String("keymap="))) + keymapFile = arg.mid(7); + else if (arg == QLatin1String("disable-zap")) + disableZap = true; + else if (arg == QLatin1String("enable-compose")) + enableCompose = true; + else if (arg.startsWith(QLatin1String("repeat-delay="))) + repeatDelay = arg.mid(13).toInt(); + else if (arg.startsWith(QLatin1String("repeat-rate="))) + repeatRate = arg.mid(12).toInt(); + else if (arg.startsWith(QLatin1String("/dev/"))) + device = arg; + } + +#ifdef QT_QPA_KEYMAP_DEBUG + qWarning() << "Opening keyboard at" << device; +#endif + + int fd; + fd = qt_safe_open(device.toLocal8Bit().constData(), O_RDWR, 0); + if (fd >= 0) { + if (repeatDelay > 0 && repeatRate > 0) { + int kbdrep[2] = { repeatDelay, repeatRate }; + ::ioctl(fd, EVIOCSREP, kbdrep); + } + + return new QEvdevKeyboardHandler(fd, device, disableZap, enableCompose, keymapFile); + } else { + qWarning("Cannot open keyboard input device '%s': %s", qPrintable(device), strerror(errno)); + return 0; + } +} + +void QEvdevKeyboardHandler::switchLed(int led, bool state) +{ +#ifdef QT_QPA_KEYMAP_DEBUG + qWarning() << "switchLed" << led << state; +#endif + + struct ::input_event led_ie; + ::gettimeofday(&led_ie.time, 0); + led_ie.type = EV_LED; + led_ie.code = led; + led_ie.value = state; + + qt_safe_write(m_fd, &led_ie, sizeof(led_ie)); +} + +void QEvdevKeyboardHandler::readKeycode() +{ +#ifdef QT_QPA_KEYMAP_DEBUG + qWarning() << "Read new keycode on" << m_device; +#endif + + struct ::input_event buffer[32]; + int n = 0; + + forever { + n = qt_safe_read(m_fd, reinterpret_cast(buffer) + n, sizeof(buffer) - n); + + if (n == 0) { + qWarning("Got EOF from the input device."); + return; + } else if (n < 0 && (errno != EINTR && errno != EAGAIN)) { + qWarning("Could not read from input device: %s", strerror(errno)); + return; + } else if (n % sizeof(buffer[0]) == 0) { + break; + } + } + + n /= sizeof(buffer[0]); + + for (int i = 0; i < n; ++i) { + if (buffer[i].type != EV_KEY) + continue; + + quint16 code = buffer[i].code; + qint32 value = buffer[i].value; + + QEvdevKeyboardHandler::KeycodeAction ka; + ka = processKeycode(code, value != 0, value == 2); + + switch (ka) { + case QEvdevKeyboardHandler::CapsLockOn: + case QEvdevKeyboardHandler::CapsLockOff: + switchLed(LED_CAPSL, ka == QEvdevKeyboardHandler::CapsLockOn); + break; + + case QEvdevKeyboardHandler::NumLockOn: + case QEvdevKeyboardHandler::NumLockOff: + switchLed(LED_NUML, ka == QEvdevKeyboardHandler::NumLockOn); + break; + + case QEvdevKeyboardHandler::ScrollLockOn: + case QEvdevKeyboardHandler::ScrollLockOff: + switchLed(LED_SCROLLL, ka == QEvdevKeyboardHandler::ScrollLockOn); + break; + + default: + // ignore console switching and reboot + break; + } + } +} + +void QEvdevKeyboardHandler::processKeyEvent(int unicode, int keycode, Qt::KeyboardModifiers modifiers, bool isPress, bool autoRepeat) +{ + QWindowSystemInterface::handleKeyEvent(0, ( isPress ? QEvent::KeyPress : QEvent::KeyRelease ), keycode, modifiers, QString( unicode ), autoRepeat ); +} + +QEvdevKeyboardHandler::KeycodeAction QEvdevKeyboardHandler::processKeycode(quint16 keycode, bool pressed, bool autorepeat) +{ + KeycodeAction result = None; + bool first_press = pressed && !autorepeat; + + const QEvdevKeyboardMap::Mapping *map_plain = 0; + const QEvdevKeyboardMap::Mapping *map_withmod = 0; + + // get a specific and plain mapping for the keycode and the current modifiers + for (int i = 0; i < m_keymap_size && !(map_plain && map_withmod); ++i) { + const QEvdevKeyboardMap::Mapping *m = m_keymap + i; + if (m->keycode == keycode) { + if (m->modifiers == 0) + map_plain = m; + + quint8 testmods = m_modifiers; + if (m_locks[0] /*CapsLock*/ && (m->flags & QEvdevKeyboardMap::IsLetter)) + testmods ^= QEvdevKeyboardMap::ModShift; + if (m->modifiers == testmods) + map_withmod = m; + } + } + +#ifdef QT_QPA_KEYMAP_DEBUG + qWarning("Processing key event: keycode=%3d, modifiers=%02x pressed=%d, autorepeat=%d | plain=%d, withmod=%d, size=%d", \ + keycode, m_modifiers, pressed ? 1 : 0, autorepeat ? 1 : 0, \ + map_plain ? map_plain - m_keymap : -1, \ + map_withmod ? map_withmod - m_keymap : -1, \ + m_keymap_size); +#endif + + const QEvdevKeyboardMap::Mapping *it = map_withmod ? map_withmod : map_plain; + + if (!it) { +#ifdef QT_QPA_KEYMAP_DEBUG + // we couldn't even find a plain mapping + qWarning("Could not find a suitable mapping for keycode: %3d, modifiers: %02x", keycode, m_modifiers); +#endif + return result; + } + + bool skip = false; + quint16 unicode = it->unicode; + quint32 qtcode = it->qtcode; + + if ((it->flags & QEvdevKeyboardMap::IsModifier) && it->special) { + // this is a modifier, i.e. Shift, Alt, ... + if (pressed) + m_modifiers |= quint8(it->special); + else + m_modifiers &= ~quint8(it->special); + } else if (qtcode >= Qt::Key_CapsLock && qtcode <= Qt::Key_ScrollLock) { + // (Caps|Num|Scroll)Lock + if (first_press) { + quint8 &lock = m_locks[qtcode - Qt::Key_CapsLock]; + lock ^= 1; + + switch (qtcode) { + case Qt::Key_CapsLock : result = lock ? CapsLockOn : CapsLockOff; m_modifiers ^= QEvdevKeyboardMap::ModShift; break; + case Qt::Key_NumLock : result = lock ? NumLockOn : NumLockOff; break; + case Qt::Key_ScrollLock: result = lock ? ScrollLockOn : ScrollLockOff; break; + default : break; + } + } + } else if ((it->flags & QEvdevKeyboardMap::IsSystem) && it->special && first_press) { + switch (it->special) { + case QEvdevKeyboardMap::SystemReboot: + result = Reboot; + break; + + case QEvdevKeyboardMap::SystemZap: + if (!m_no_zap) + qApp->quit(); + break; + + case QEvdevKeyboardMap::SystemConsolePrevious: + result = PreviousConsole; + break; + + case QEvdevKeyboardMap::SystemConsoleNext: + result = NextConsole; + break; + + default: + if (it->special >= QEvdevKeyboardMap::SystemConsoleFirst && + it->special <= QEvdevKeyboardMap::SystemConsoleLast) { + result = KeycodeAction(SwitchConsoleFirst + ((it->special & QEvdevKeyboardMap::SystemConsoleMask) & SwitchConsoleMask)); + } + break; + } + + skip = true; // no need to tell Qt about it + } else if ((qtcode == Qt::Key_Multi_key) && m_do_compose) { + // the Compose key was pressed + if (first_press) + m_composing = 2; + skip = true; + } else if ((it->flags & QEvdevKeyboardMap::IsDead) && m_do_compose) { + // a Dead key was pressed + if (first_press && m_composing == 1 && m_dead_unicode == unicode) { // twice + m_composing = 0; + qtcode = Qt::Key_unknown; // otherwise it would be Qt::Key_Dead... + } else if (first_press && unicode != 0xffff) { + m_dead_unicode = unicode; + m_composing = 1; + skip = true; + } else { + skip = true; + } + } + + if (!skip) { + // a normal key was pressed + const int modmask = Qt::ShiftModifier | Qt::ControlModifier | Qt::AltModifier | Qt::MetaModifier | Qt::KeypadModifier; + + // we couldn't find a specific mapping for the current modifiers, + // or that mapping didn't have special modifiers: + // so just report the plain mapping with additional modifiers. + if ((it == map_plain && it != map_withmod) || + (map_withmod && !(map_withmod->qtcode & modmask))) { + qtcode |= QEvdevKeyboardHandler::toQtModifiers(m_modifiers); + } + + if (m_composing == 2 && first_press && !(it->flags & QEvdevKeyboardMap::IsModifier)) { + // the last key press was the Compose key + if (unicode != 0xffff) { + int idx = 0; + // check if this code is in the compose table at all + for ( ; idx < m_keycompose_size; ++idx) { + if (m_keycompose[idx].first == unicode) + break; + } + if (idx < m_keycompose_size) { + // found it -> simulate a Dead key press + m_dead_unicode = unicode; + unicode = 0xffff; + m_composing = 1; + skip = true; + } else { + m_composing = 0; + } + } else { + m_composing = 0; + } + } else if (m_composing == 1 && first_press && !(it->flags & QEvdevKeyboardMap::IsModifier)) { + // the last key press was a Dead key + bool valid = false; + if (unicode != 0xffff) { + int idx = 0; + // check if this code is in the compose table at all + for ( ; idx < m_keycompose_size; ++idx) { + if (m_keycompose[idx].first == m_dead_unicode && m_keycompose[idx].second == unicode) + break; + } + if (idx < m_keycompose_size) { + quint16 composed = m_keycompose[idx].result; + if (composed != 0xffff) { + unicode = composed; + qtcode = Qt::Key_unknown; + valid = true; + } + } + } + if (!valid) { + unicode = m_dead_unicode; + qtcode = Qt::Key_unknown; + } + m_composing = 0; + } + + if (!skip) { +#ifdef QT_QPA_KEYMAP_DEBUG + qWarning("Processing: uni=%04x, qt=%08x, qtmod=%08x", unicode, qtcode & ~modmask, (qtcode & modmask)); +#endif + + // send the result to the server + processKeyEvent(unicode, qtcode & ~modmask, Qt::KeyboardModifiers(qtcode & modmask), pressed, autorepeat); + } + } + return result; +} + +void QEvdevKeyboardHandler::unloadKeymap() +{ +#ifdef QT_QPA_KEYMAP_DEBUG + qWarning() << "Unload current keymap and restore built-in"; +#endif + + if (m_keymap && m_keymap != s_keymap_default) + delete [] m_keymap; + if (m_keycompose && m_keycompose != s_keycompose_default) + delete [] m_keycompose; + + m_keymap = s_keymap_default; + m_keymap_size = sizeof(s_keymap_default) / sizeof(s_keymap_default[0]); + m_keycompose = s_keycompose_default; + m_keycompose_size = sizeof(s_keycompose_default) / sizeof(s_keycompose_default[0]); + + // reset state, so we could switch keymaps at runtime + m_modifiers = 0; + memset(m_locks, 0, sizeof(m_locks)); + m_composing = 0; + m_dead_unicode = 0xffff; +} + +bool QEvdevKeyboardHandler::loadKeymap(const QString &file) +{ +#ifdef QT_QPA_KEYMAP_DEBUG + qWarning() << "Load keymap" << file; +#endif + + QFile f(file); + + if (!f.open(QIODevice::ReadOnly)) { + qWarning("Could not open keymap file '%s'", qPrintable(file)); + return false; + } + + // .qmap files have a very simple structure: + // quint32 magic (QKeyboard::FileMagic) + // quint32 version (1) + // quint32 keymap_size (# of struct QKeyboard::Mappings) + // quint32 keycompose_size (# of struct QKeyboard::Composings) + // all QKeyboard::Mappings via QDataStream::operator(<<|>>) + // all QKeyboard::Composings via QDataStream::operator(<<|>>) + + quint32 qmap_magic, qmap_version, qmap_keymap_size, qmap_keycompose_size; + + QDataStream ds(&f); + + ds >> qmap_magic >> qmap_version >> qmap_keymap_size >> qmap_keycompose_size; + + if (ds.status() != QDataStream::Ok || qmap_magic != QEvdevKeyboardMap::FileMagic || qmap_version != 1 || qmap_keymap_size == 0) { + qWarning("'%s' is ot a valid.qmap keymap file.", qPrintable(file)); + return false; + } + + QEvdevKeyboardMap::Mapping *qmap_keymap = new QEvdevKeyboardMap::Mapping[qmap_keymap_size]; + QEvdevKeyboardMap::Composing *qmap_keycompose = qmap_keycompose_size ? new QEvdevKeyboardMap::Composing[qmap_keycompose_size] : 0; + + for (quint32 i = 0; i < qmap_keymap_size; ++i) + ds >> qmap_keymap[i]; + for (quint32 i = 0; i < qmap_keycompose_size; ++i) + ds >> qmap_keycompose[i]; + + if (ds.status() != QDataStream::Ok) { + delete [] qmap_keymap; + delete [] qmap_keycompose; + + qWarning("Keymap file '%s' can not be loaded.", qPrintable(file)); + return false; + } + + // unload currently active and clear state + unloadKeymap(); + + m_keymap = qmap_keymap; + m_keymap_size = qmap_keymap_size; + m_keycompose = qmap_keycompose; + m_keycompose_size = qmap_keycompose_size; + + m_do_compose = true; + + return true; +} + +QT_END_NAMESPACE diff --git a/src/plugins/generic/evdevkeyboard/qevdevkeyboardhandler.h b/src/plugins/generic/evdevkeyboard/qevdevkeyboardhandler.h new file mode 100644 index 00000000000..76b5c5703be --- /dev/null +++ b/src/plugins/generic/evdevkeyboard/qevdevkeyboardhandler.h @@ -0,0 +1,202 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the QtGui module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QEVDEVKEYBOARDHANDLER_H +#define QEVDEVKEYBOARDHANDLER_H + +#include +#include +#include + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +namespace QEvdevKeyboardMap { + const quint32 FileMagic = 0x514d4150; // 'QMAP' + + struct Mapping { + quint16 keycode; + quint16 unicode; + quint32 qtcode; + quint8 modifiers; + quint8 flags; + quint16 special; + + }; + + enum Flags { + IsDead = 0x01, + IsLetter = 0x02, + IsModifier = 0x04, + IsSystem = 0x08 + }; + + enum System { + SystemConsoleFirst = 0x0100, + SystemConsoleMask = 0x007f, + SystemConsoleLast = 0x017f, + SystemConsolePrevious = 0x0180, + SystemConsoleNext = 0x0181, + SystemReboot = 0x0200, + SystemZap = 0x0300 + }; + + struct Composing { + quint16 first; + quint16 second; + quint16 result; + }; + + enum Modifiers { + ModPlain = 0x00, + ModShift = 0x01, + ModAltGr = 0x02, + ModControl = 0x04, + ModAlt = 0x08, + ModShiftL = 0x10, + ModShiftR = 0x20, + ModCtrlL = 0x40, + ModCtrlR = 0x80 + // ModCapsShift = 0x100, // not supported! + }; +} + +inline QDataStream &operator>>(QDataStream &ds, QEvdevKeyboardMap::Mapping &m) +{ + return ds >> m.keycode >> m.unicode >> m.qtcode >> m.modifiers >> m.flags >> m.special; +} + +inline QDataStream &operator<<(QDataStream &ds, const QEvdevKeyboardMap::Mapping &m) +{ + return ds << m.keycode << m.unicode << m.qtcode << m.modifiers << m.flags << m.special; +} + +inline QDataStream &operator>>(QDataStream &ds, QEvdevKeyboardMap::Composing &c) +{ + return ds >> c.first >> c.second >> c.result; +} + +inline QDataStream &operator<<(QDataStream &ds, const QEvdevKeyboardMap::Composing &c) +{ + return ds << c.first << c.second << c.result; +} + + +class QEvdevKeyboardHandler : public QObject +{ + Q_OBJECT +public: + QEvdevKeyboardHandler(int deviceDescriptor, const QString &device, bool disableZap, bool enableCompose, const QString &keymapFile); + ~QEvdevKeyboardHandler(); + + enum KeycodeAction { + None = 0, + + CapsLockOff = 0x01000000, + CapsLockOn = 0x01000001, + NumLockOff = 0x02000000, + NumLockOn = 0x02000001, + ScrollLockOff = 0x03000000, + ScrollLockOn = 0x03000001, + + Reboot = 0x04000000, + + PreviousConsole = 0x05000000, + NextConsole = 0x05000001, + SwitchConsoleFirst = 0x06000000, + SwitchConsoleLast = 0x0600007f, + SwitchConsoleMask = 0x0000007f + }; + + static QEvdevKeyboardHandler *createLinuxInputKeyboardHandler(const QString &key, const QString &specification); + + static Qt::KeyboardModifiers toQtModifiers(quint8 mod) + { + Qt::KeyboardModifiers qtmod = Qt::NoModifier; + + if (mod & (QEvdevKeyboardMap::ModShift | QEvdevKeyboardMap::ModShiftL | QEvdevKeyboardMap::ModShiftR)) + qtmod |= Qt::ShiftModifier; + if (mod & (QEvdevKeyboardMap::ModControl | QEvdevKeyboardMap::ModCtrlL | QEvdevKeyboardMap::ModCtrlR)) + qtmod |= Qt::ControlModifier; + if (mod & QEvdevKeyboardMap::ModAlt) + qtmod |= Qt::AltModifier; + + return qtmod; + } + +private slots: + void readKeycode(); + KeycodeAction processKeycode(quint16 keycode, bool pressed, bool autorepeat); + +private: + void unloadKeymap(); + bool loadKeymap(const QString &file); + void processKeyEvent(int unicode, int keycode, Qt::KeyboardModifiers modifiers, bool isPress, bool autoRepeat); + void switchLed(int, bool); + + int m_fd; + QString m_device; + + // keymap handling + quint8 m_modifiers; + quint8 m_locks[3]; + int m_composing; + quint16 m_dead_unicode; + + bool m_no_zap; + bool m_do_compose; + + const QEvdevKeyboardMap::Mapping *m_keymap; + int m_keymap_size; + const QEvdevKeyboardMap::Composing *m_keycompose; + int m_keycompose_size; + + static const QEvdevKeyboardMap::Mapping s_keymap_default[]; + static const QEvdevKeyboardMap::Composing s_keycompose_default[]; +}; + + +QT_END_NAMESPACE + +QT_END_HEADER + +#endif // QEVDEVKEYBOARDHANDLER_H diff --git a/src/plugins/generic/evdevkeyboard/qevdevkeyboardmanager.cpp b/src/plugins/generic/evdevkeyboard/qevdevkeyboardmanager.cpp new file mode 100644 index 00000000000..cb23d3a49c1 --- /dev/null +++ b/src/plugins/generic/evdevkeyboard/qevdevkeyboardmanager.cpp @@ -0,0 +1,252 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the QtGui module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qevdevkeyboardmanager.h" + +#include +#include +#include + +#include +#include + +//#define QT_QPA_KEYMAP_DEBUG + +QT_BEGIN_NAMESPACE + +QEvdevKeyboardManager::QEvdevKeyboardManager(const QString &key, const QString &specification) + : m_udev(0), m_udevMonitor(0), m_udevMonitorFileDescriptor(-1), m_udevSocketNotifier(0) +{ + Q_UNUSED(key); + + bool useUDev = false; + QStringList args = specification.split(QLatin1Char(':')); + QStringList devices; + + foreach (const QString &arg, args) { + if (arg.startsWith("udev") && !arg.contains("no")) { + useUDev = true; + } else if (arg.startsWith("/dev/")) { + // if device is specified try to use it + devices.append(arg); + args.removeAll(arg); + } + } + + m_spec = args.join(":"); + + // add all keyboards for devices specified in the argument list + foreach (const QString &device, devices) + addKeyboard(device); + + // no udev and no devices specified, try a fallback + if (!useUDev && devices.isEmpty()) { + addKeyboard(); + return; + } + + m_udev = udev_new(); + if (!m_udev) { + qWarning() << "Failed to read udev configuration. Try to open a keyboard without it"; + addKeyboard(); + } else { + // Look for already attached devices: + parseConnectedDevices(); + // Watch for device add/remove + startWatching(); + } +} + +QEvdevKeyboardManager::~QEvdevKeyboardManager() +{ + // cleanup udev related resources + stopWatching(); + if (m_udev) + udev_unref(m_udev); + + // cleanup all resources of connected keyboards + qDeleteAll(m_keyboards); + m_keyboards.clear(); +} + +void QEvdevKeyboardManager::addKeyboard(const QString &devnode) +{ + QString specification = m_spec; + QString deviceString = devnode; + + if (!deviceString.isEmpty()) { + specification.append(":"); + specification.append(deviceString); + } else { + deviceString = "default"; + } + +#ifdef QT_QPA_KEYMAP_DEBUG + qWarning() << "Adding keyboard at" << deviceString; +#endif + + QEvdevKeyboardHandler *keyboard; + keyboard = QEvdevKeyboardHandler::createLinuxInputKeyboardHandler("EvdevKeyboard", specification); + if (keyboard) + m_keyboards.insert(deviceString, keyboard); + else + qWarning() << "Failed to open keyboard"; +} + +void QEvdevKeyboardManager::removeKeyboard(const QString &devnode) +{ + if (m_keyboards.contains(devnode)) { +#ifdef QT_QPA_KEYMAP_DEBUG + qWarning() << "Removing keyboard at" << devnode; +#endif + QEvdevKeyboardHandler *keyboard = m_keyboards.value(devnode); + m_keyboards.remove(devnode); + delete keyboard; + } +} + +void QEvdevKeyboardManager::startWatching() +{ + m_udevMonitor = udev_monitor_new_from_netlink(m_udev, "udev"); + if (!m_udevMonitor) { +#ifdef QT_QPA_KEYMAP_DEBUG + qWarning("Unable to create an Udev monitor. No devices can be detected."); +#endif + return; + } + + udev_monitor_filter_add_match_subsystem_devtype(m_udevMonitor, "input", NULL); + udev_monitor_enable_receiving(m_udevMonitor); + m_udevMonitorFileDescriptor = udev_monitor_get_fd(m_udevMonitor); + + m_udevSocketNotifier = new QSocketNotifier(m_udevMonitorFileDescriptor, QSocketNotifier::Read, this); + connect(m_udevSocketNotifier, SIGNAL(activated(int)), this, SLOT(deviceDetected())); +} + +void QEvdevKeyboardManager::stopWatching() +{ + if (m_udevSocketNotifier) + delete m_udevSocketNotifier; + + if (m_udevMonitor) + udev_monitor_unref(m_udevMonitor); + + m_udevSocketNotifier = 0; + m_udevMonitor = 0; + m_udevMonitorFileDescriptor = 0; +} + +void QEvdevKeyboardManager::deviceDetected() +{ + if (!m_udevMonitor) + return; + + struct udev_device *dev; + dev = udev_monitor_receive_device(m_udevMonitor); + if (!dev) + return; + + if (qstrcmp(udev_device_get_action(dev), "add") == 0) { + checkDevice(dev); + } else { + // We can't determine what the device was, so we handle false positives outside of this class + QString str = udev_device_get_devnode(dev); + if (!str.isEmpty()) + removeKeyboard(str); + } + + udev_device_unref(dev); +} + +void QEvdevKeyboardManager::parseConnectedDevices() +{ + struct udev_enumerate *enumerate; + struct udev_list_entry *devices; + struct udev_list_entry *dev_list_entry; + struct udev_device *dev; + const char *str; + + enumerate = udev_enumerate_new(m_udev); + udev_enumerate_add_match_subsystem(enumerate, "input"); + udev_enumerate_scan_devices(enumerate); + devices = udev_enumerate_get_list_entry(enumerate); + + udev_list_entry_foreach(dev_list_entry, devices) { + str = udev_list_entry_get_name(dev_list_entry); + dev = udev_device_new_from_syspath(m_udev, str); + checkDevice(dev); + } + + udev_enumerate_unref(enumerate); +} + +void QEvdevKeyboardManager::checkDevice(udev_device *dev) +{ + const char *str; + QString devnode; + + str = udev_device_get_devnode(dev); + if (!str) + return; + + devnode = str; + + dev = udev_device_get_parent_with_subsystem_devtype(dev, "input", NULL); + if (!dev) + return; + + str = udev_device_get_sysattr_value(dev, "capabilities/key"); + QStringList val = QString(str).split(' ', QString::SkipEmptyParts); + + bool ok; + unsigned long long keys = val.last().toULongLong(&ok, 16); + if (!ok) + return; + + // Tests if the letter Q is valid for the device. We may want to alter this test, but it seems mostly reliable. + bool test = (keys >> KEY_Q) & 1; + if (test) { + addKeyboard(devnode); + return; + } +} + +QT_END_NAMESPACE diff --git a/src/plugins/generic/evdevkeyboard/qevdevkeyboardmanager.h b/src/plugins/generic/evdevkeyboard/qevdevkeyboardmanager.h new file mode 100644 index 00000000000..3caed6ff436 --- /dev/null +++ b/src/plugins/generic/evdevkeyboard/qevdevkeyboardmanager.h @@ -0,0 +1,89 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the QtGui module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QEVDEVKEYBOARDMANAGER_H +#define QEVDEVKEYBOARDMANAGER_H + +#include "qevdevkeyboardhandler.h" + +#include +#include +#include + +#include + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +class QEvdevKeyboardManager : public QObject +{ + Q_OBJECT +public: + explicit QEvdevKeyboardManager(const QString &key, const QString &specification); + ~QEvdevKeyboardManager(); + +private slots: + void deviceDetected(); + +private: + void startWatching(); + void stopWatching(); + void parseConnectedDevices(); + void checkDevice(struct udev_device *dev); + + void addKeyboard(const QString &devnode = QString()); + void removeKeyboard(const QString &devnode); + + QString m_spec; + QHash m_keyboards; + + struct udev *m_udev; + struct udev_monitor *m_udevMonitor; + int m_udevMonitorFileDescriptor; + QSocketNotifier *m_udevSocketNotifier; +}; + +QT_END_HEADER + +QT_END_NAMESPACE + +#endif // QEVDEVKEYBOARDMANAGER_H diff --git a/src/plugins/generic/evdevmouse/README b/src/plugins/generic/evdevmouse/README new file mode 100644 index 00000000000..b89c0a70665 --- /dev/null +++ b/src/plugins/generic/evdevmouse/README @@ -0,0 +1,11 @@ +Generic plug-in for absolute & relative evdev pointer events. + +To use it, launch apps with -plugin EvdevMouse + +The plug-in will try to pick a mouse or touchpad device from udev. +If automatic detection does not work, use -plugin +EvdevMouse:/dev/input/eventN to explicitly set the device node. + +The initial cursor position is assumed to be (0, 0). Relative events +will generate Qt mouse events with screen positions relative to this +initial position. diff --git a/src/plugins/generic/evdevmouse/evdevmouse.pro b/src/plugins/generic/evdevmouse/evdevmouse.pro new file mode 100644 index 00000000000..f25199161bb --- /dev/null +++ b/src/plugins/generic/evdevmouse/evdevmouse.pro @@ -0,0 +1,13 @@ +TARGET = qevdevmouseplugin +load(qt_plugin) + +DESTDIR = $$QT.gui.plugins/generic +target.path = $$[QT_INSTALL_PLUGINS]/generic +INSTALLS += target + +HEADERS = qevdevmouse.h + +QT += core-private platformsupport-private + +SOURCES = main.cpp \ + qevdevmouse.cpp diff --git a/src/plugins/generic/evdevmouse/main.cpp b/src/plugins/generic/evdevmouse/main.cpp new file mode 100644 index 00000000000..34ca62f960b --- /dev/null +++ b/src/plugins/generic/evdevmouse/main.cpp @@ -0,0 +1,77 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the plugins of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include +#include "qevdevmouse.h" + +QT_BEGIN_NAMESPACE + +class QEvdevMousePlugin : public QGenericPlugin +{ +public: + QEvdevMousePlugin(); + + QStringList keys() const; + QObject* create(const QString &key, const QString &specification); +}; + +QEvdevMousePlugin::QEvdevMousePlugin() + : QGenericPlugin() +{ +} + +QStringList QEvdevMousePlugin::keys() const +{ + return (QStringList() + << QLatin1String("EvdevMouse")); +} + +QObject* QEvdevMousePlugin::create(const QString &key, + const QString &specification) +{ + if (!key.compare(QLatin1String("EvdevMouse"), Qt::CaseInsensitive)) + return new QEvdevMouseHandler(key, specification); + return 0; +} + +Q_EXPORT_PLUGIN2(qevdevmouseplugin, QEvdevMousePlugin) + +QT_END_NAMESPACE diff --git a/src/plugins/generic/evdevmouse/qevdevmouse.cpp b/src/plugins/generic/evdevmouse/qevdevmouse.cpp new file mode 100644 index 00000000000..0b72123c02f --- /dev/null +++ b/src/plugins/generic/evdevmouse/qevdevmouse.cpp @@ -0,0 +1,214 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the QtGui module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qevdevmouse.h" + +#include +#include +#include +#include + +#include +#include // overrides QT_OPEN +#include + +#include + +#include +#include + +#include + +QT_BEGIN_NAMESPACE + +QEvdevMouseHandler::QEvdevMouseHandler(const QString &key, + const QString &specification) + : m_notify(0), m_x(0), m_y(0), m_prevx(0), m_prevy(0), + m_xoffset(0), m_yoffset(0), m_buttons(0) +{ + Q_UNUSED(key); + setObjectName(QLatin1String("Evdev Mouse Handler")); + + QString dev; + q_udev_devicePath(UDev_Mouse | UDev_Touchpad, &dev); + if (dev.isEmpty()) + dev = QLatin1String("/dev/input/event0"); + + m_compression = true; + m_smooth = false; + int jitterLimit = 0; + + QStringList args = specification.split(QLatin1Char(':')); + foreach (const QString &arg, args) { + if (arg == "nocompress") + m_compression = false; + else if (arg.startsWith("dejitter=")) + jitterLimit = arg.mid(9).toInt(); + else if (arg.startsWith("xoffset=")) + m_xoffset = arg.mid(8).toInt(); + else if (arg.startsWith("yoffset=")) + m_yoffset = arg.mid(8).toInt(); + else if (arg.startsWith(QLatin1String("/dev/"))) + dev = arg; + } + m_jitterLimitSquared = jitterLimit*jitterLimit; + + qDebug("evdevmouse: Using device %s", qPrintable(dev)); + m_fd = QT_OPEN(dev.toLocal8Bit().constData(), O_RDONLY | O_NDELAY, 0); + if (m_fd >= 0) { + m_notify = new QSocketNotifier(m_fd, QSocketNotifier::Read, this); + connect(m_notify, SIGNAL(activated(int)), this, SLOT(readMouseData())); + } else { + qWarning("Cannot open mouse input device '%s': %s", qPrintable(dev), strerror(errno)); + return; + } +} + +QEvdevMouseHandler::~QEvdevMouseHandler() +{ + if (m_fd >= 0) + QT_CLOSE(m_fd); +} + +void QEvdevMouseHandler::sendMouseEvent() +{ + QPoint pos(m_x + m_xoffset, m_y + m_yoffset); + //qDebug("mouse event %d %d %d", pos.x(), pos.y(), int(m_buttons)); + QWindowSystemInterface::handleMouseEvent(0, pos, pos, m_buttons); + m_prevx = m_x; + m_prevy = m_y; +} + +void QEvdevMouseHandler::readMouseData() +{ + struct ::input_event buffer[32]; + int n = 0; + bool posChanged = false; + bool pendingMouseEvent = false; + int eventCompressCount = 0; + forever { + n = QT_READ(m_fd, reinterpret_cast(buffer) + n, sizeof(buffer) - n); + + if (n == 0) { + qWarning("Got EOF from the input device."); + return; + } else if (n < 0 && (errno != EINTR && errno != EAGAIN)) { + qWarning("Could not read from input device: %s", strerror(errno)); + return; + } else if (n % sizeof(buffer[0]) == 0) { + break; + } + } + + n /= sizeof(buffer[0]); + + for (int i = 0; i < n; ++i) { + struct ::input_event *data = &buffer[i]; + //qDebug() << ">>" << hex << data->type << data->code << dec << data->value; + if (data->type == EV_ABS) { + if (data->code == ABS_X && m_x != data->value) { + m_x = data->value; + posChanged = true; + } else if (data->code == ABS_Y && m_y != data->value) { + m_y = data->value; + posChanged = true; + } + } else if (data->type == EV_REL) { + if (data->code == REL_X) { + m_x += data->value; + posChanged = true; + } else if (data->code == REL_Y) { + m_y += data->value; + posChanged = true; + } else if (data->code == ABS_WHEEL) { // vertical scroll + // data->value: 1 == up, -1 == down + int delta = 120 * data->value; + QWindowSystemInterface::handleWheelEvent(0, QPoint(m_x, m_y), + QPoint(m_x, m_y), + delta, Qt::Vertical); + } else if (data->code == ABS_THROTTLE) { // horizontal scroll + // data->value: 1 == right, -1 == left + int delta = 120 * -data->value; + QWindowSystemInterface::handleWheelEvent(0, QPoint(m_x, m_y), + QPoint(m_x, m_y), + delta, Qt::Horizontal); + } + } else if (data->type == EV_KEY && data->code == BTN_TOUCH) { + m_buttons = data->value ? Qt::LeftButton : Qt::NoButton; + + sendMouseEvent(); + pendingMouseEvent = false; + } else if (data->type == EV_KEY && data->code >= BTN_LEFT && data->code <= BTN_MIDDLE) { + Qt::MouseButton button = Qt::NoButton; + switch (data->code) { + case BTN_LEFT: button = Qt::LeftButton; break; + case BTN_MIDDLE: button = Qt::MidButton; break; + case BTN_RIGHT: button = Qt::RightButton; break; + } + if (data->value) + m_buttons |= button; + else + m_buttons &= ~button; + sendMouseEvent(); + pendingMouseEvent = false; + } else if (data->type == EV_SYN && data->code == SYN_REPORT) { + if (posChanged) { + posChanged = false; + if (m_compression) { + pendingMouseEvent = true; + eventCompressCount++; + } else { + sendMouseEvent(); + } + } + } else if (data->type == EV_MSC && data->code == MSC_SCAN) { + // kernel encountered an unmapped key - just ignore it + continue; + } + } + if (m_compression && pendingMouseEvent) { + int distanceSquared = (m_x - m_prevx)*(m_x - m_prevx) + (m_y - m_prevy)*(m_y - m_prevy); + if (distanceSquared > m_jitterLimitSquared) + sendMouseEvent(); + } +} + +QT_END_NAMESPACE diff --git a/src/plugins/generic/linuxinput/qlinuxinput.h b/src/plugins/generic/evdevmouse/qevdevmouse.h similarity index 77% rename from src/plugins/generic/linuxinput/qlinuxinput.h rename to src/plugins/generic/evdevmouse/qevdevmouse.h index a512ad959a2..9542d133f2a 100644 --- a/src/plugins/generic/linuxinput/qlinuxinput.h +++ b/src/plugins/generic/evdevmouse/qevdevmouse.h @@ -39,12 +39,11 @@ ** ****************************************************************************/ -#ifndef QLINUXINPUT_H -#define QLINUXINPUT_H +#ifndef QEVDEVMOUSE_H +#define QEVDEVMOUSE_H -#include -#include -#include +#include +#include QT_BEGIN_HEADER @@ -52,35 +51,34 @@ QT_BEGIN_NAMESPACE class QSocketNotifier; -class QLinuxInputMouseHandlerData; - -class QLinuxInputMouseHandler : public QObject +class QEvdevMouseHandler : public QObject { Q_OBJECT public: - QLinuxInputMouseHandler(const QString &key, const QString &specification); - ~QLinuxInputMouseHandler(); + QEvdevMouseHandler(const QString &key, const QString &specification); + ~QEvdevMouseHandler(); private slots: void readMouseData(); private: - void sendMouseEvent(int x, int y, Qt::MouseButtons buttons); - QSocketNotifier * m_notify; - int m_fd; - int m_x, m_y; + void sendMouseEvent(); + void pathFromUdev(QString *path); + + QSocketNotifier *m_notify; + int m_fd; + int m_x, m_y; int m_prevx, m_prevy; int m_xoffset, m_yoffset; int m_smoothx, m_smoothy; - Qt::MouseButtons m_buttons; + Qt::MouseButtons m_buttons; bool m_compression; bool m_smooth; int m_jitterLimitSquared; - QLinuxInputMouseHandlerData *d; }; QT_END_NAMESPACE QT_END_HEADER -#endif // QLINUXINPUT_H +#endif // QEVDEVMOUSE_H diff --git a/src/plugins/generic/touchscreen/70-qtouchscreen.rules b/src/plugins/generic/evdevtouch/70-qtouchscreen.rules similarity index 100% rename from src/plugins/generic/touchscreen/70-qtouchscreen.rules rename to src/plugins/generic/evdevtouch/70-qtouchscreen.rules diff --git a/src/plugins/generic/evdevtouch/README b/src/plugins/generic/evdevtouch/README new file mode 100644 index 00000000000..4764ef8f708 --- /dev/null +++ b/src/plugins/generic/evdevtouch/README @@ -0,0 +1,36 @@ +Generic plug-in for evdev touch events. (protocol type A) + +Tested with the following drivers: bcm5974, hid_magicmouse. + +To use it, pass -plugin EvdevTouch on the command line. + +If automatic detection does not work, use -plugin +EvdevTouch:/dev/input/eventN to explicitly set the device file +name. + +By default the surface of the touch device is mapped to the entire +screen. If this is not desired, pass force_window in the plugin +specification as shown in the example above. This will cause mapping +the touch surface to the active window instead. For example: +./fingerpaint -plugin EvdevTouch:force_window + +Only touch events are generated, mouse events are not. Be aware however +that ignored touch events will generate a mouse event from the first +touch point by default. See AA_SynthesizeMouseForUnhandledTouchEvents. + +If no evdev events are read, disable the synaptics driver from X or +temporarily disable the device by running +xinput set-prop 0. +Use xinput list and xinput list-props to figure out the values. + +When not running on a windowing system (eglfs, kms, etc.) and having a +touchpad, the evdevmouse and touch plugins can be combined to get both +mouse and touch events: +./app -platform kms -plugin EvdevTouch -plugin EvdevMouse + +If the input device cannot be accessed, set up a udev rule. +For example: + sudo cp 70-qtouchscreen.rules /etc/udev/rules.d + sudo udevadm trigger --subsystem-match=input +The udev rule matches any touchpad or touchscreen device. If there are +multiple ones, specify the device manually as described above. diff --git a/src/plugins/generic/evdevtouch/evdevtouch.pro b/src/plugins/generic/evdevtouch/evdevtouch.pro new file mode 100644 index 00000000000..78fe551aa27 --- /dev/null +++ b/src/plugins/generic/evdevtouch/evdevtouch.pro @@ -0,0 +1,14 @@ +TARGET = qevdevtouchplugin +load(qt_plugin) + +DESTDIR = $$QT.gui.plugins/generic +target.path = $$[QT_INSTALL_PLUGINS]/generic +INSTALLS += target + +HEADERS = \ + qevdevtouch.h + +SOURCES = main.cpp \ + qevdevtouch.cpp + +QT += core-private platformsupport-private diff --git a/src/plugins/generic/touchscreen/main.cpp b/src/plugins/generic/evdevtouch/main.cpp similarity index 81% rename from src/plugins/generic/touchscreen/main.cpp rename to src/plugins/generic/evdevtouch/main.cpp index 1f438ef1e70..526e336fd8d 100644 --- a/src/plugins/generic/touchscreen/main.cpp +++ b/src/plugins/generic/evdevtouch/main.cpp @@ -40,8 +40,7 @@ ****************************************************************************/ #include -#include "qtouchscreen.h" -#include "qtoucheventsenderqpa.h" +#include "qevdevtouch.h" QT_BEGIN_NAMESPACE @@ -60,21 +59,18 @@ QTouchScreenPlugin::QTouchScreenPlugin() QStringList QTouchScreenPlugin::keys() const { - return QStringList() << "LinuxTouchScreen"; + return QStringList() << "EvdevTouch"; } QObject* QTouchScreenPlugin::create(const QString &key, - const QString &spec) + const QString &spec) { - if (!key.compare(QLatin1String("LinuxTouchScreen"), Qt::CaseInsensitive)) { - QTouchScreenObserver *obs = new QTouchEventSenderQPA(spec); - QTouchScreenHandlerThread *h = new QTouchScreenHandlerThread(spec, obs); - return h; - } + if (!key.compare(QLatin1String("EvdevTouch"), Qt::CaseInsensitive)) + return new QTouchScreenHandlerThread(spec); return 0; - } +} -Q_EXPORT_PLUGIN2(qtouchscreenplugin, QTouchScreenPlugin) +Q_EXPORT_PLUGIN2(qevdevtouchplugin, QTouchScreenPlugin) QT_END_NAMESPACE diff --git a/src/plugins/generic/touchscreen/qtouchscreen.cpp b/src/plugins/generic/evdevtouch/qevdevtouch.cpp similarity index 80% rename from src/plugins/generic/touchscreen/qtouchscreen.cpp rename to src/plugins/generic/evdevtouch/qevdevtouch.cpp index 8e04c10b9fd..d508c4a12a2 100644 --- a/src/plugins/generic/touchscreen/qtouchscreen.cpp +++ b/src/plugins/generic/evdevtouch/qevdevtouch.cpp @@ -39,13 +39,15 @@ ** ****************************************************************************/ -#include "qtouchscreen.h" +#include "qevdevtouch.h" #include #include #include +#include +#include #include +#include #include -#include QT_BEGIN_NAMESPACE @@ -77,6 +79,8 @@ public: Contact m_currentData; int findClosestContact(const QHash &contacts, int x, int y, int *dist); + void reportPoints(); + void registerDevice(); int hw_range_x_min; int hw_range_x_max; @@ -85,8 +89,8 @@ public: int hw_pressure_min; int hw_pressure_max; QString hw_name; - - QList m_observers; + bool m_forceToActiveWindow; + QTouchDevice *m_device; }; QTouchScreenData::QTouchScreenData(QTouchScreenHandler *q_ptr, const QStringList &args) @@ -96,23 +100,37 @@ QTouchScreenData::QTouchScreenData(QTouchScreenHandler *q_ptr, const QStringList hw_range_y_min(0), hw_range_y_max(0), hw_pressure_min(0), hw_pressure_max(0) { - Q_UNUSED(args); + m_forceToActiveWindow = args.contains(QLatin1String("force_window")); +} + +void QTouchScreenData::registerDevice() +{ + m_device = new QTouchDevice; + m_device->setName(hw_name); + m_device->setType(QTouchDevice::TouchScreen); + m_device->setCapabilities(QTouchDevice::Position | QTouchDevice::Area); + if (hw_pressure_max > hw_pressure_min) + m_device->setCapabilities(m_device->capabilities() | QTouchDevice::Pressure); + + QWindowSystemInterface::registerTouchDevice(m_device); } QTouchScreenHandler::QTouchScreenHandler(const QString &spec) : m_notify(0), m_fd(-1), d(0) { - setObjectName(QLatin1String("Linux Touch Handler")); + setObjectName(QLatin1String("Evdev Touch Handler")); - QString dev = QLatin1String("/dev/input/event5"); - try_udev(&dev); + QString dev; + q_udev_devicePath(UDev_Touchpad | UDev_Touchscreen, &dev); + if (dev.isEmpty()) + dev = QLatin1String("/dev/input/event0"); QStringList args = spec.split(QLatin1Char(':')); for (int i = 0; i < args.count(); ++i) if (args.at(i).startsWith(QLatin1String("/dev/"))) dev = args.at(i); - qDebug("Using device '%s'", qPrintable(dev)); + qDebug("evdevtouch: Using device %s", qPrintable(dev)); m_fd = QT_OPEN(dev.toLocal8Bit().constData(), O_RDONLY | O_NDELAY, 0); if (m_fd >= 0) { @@ -149,6 +167,8 @@ QTouchScreenHandler::QTouchScreenHandler(const QString &spec) d->hw_name = QString::fromLocal8Bit(name); qDebug("device name: %s", name); } + + d->registerDevice(); } QTouchScreenHandler::~QTouchScreenHandler() @@ -159,38 +179,6 @@ QTouchScreenHandler::~QTouchScreenHandler() delete d; } -void QTouchScreenHandler::addObserver(QTouchScreenObserver *observer) -{ - if (!d || !observer) - return; - d->m_observers.append(observer); - observer->touch_configure(d->hw_range_x_min, d->hw_range_x_max, - d->hw_range_y_min, d->hw_range_y_max, - d->hw_pressure_min, d->hw_pressure_max, - d->hw_name); -} - -void QTouchScreenHandler::try_udev(QString *path) -{ - *path = QString(); - udev *u = udev_new(); - udev_enumerate *ue = udev_enumerate_new(u); - udev_enumerate_add_match_subsystem(ue, "input"); - udev_enumerate_add_match_property(ue, "ID_INPUT_TOUCHPAD", "1"); - udev_enumerate_scan_devices(ue); - udev_list_entry *entry; - udev_list_entry_foreach(entry, udev_enumerate_get_list_entry(ue)) { - const char *syspath = udev_list_entry_get_name(entry); - udev_device *udevice = udev_device_new_from_syspath(u, syspath); - QString candidate = QString::fromLocal8Bit(udev_device_get_devnode(udevice)); - udev_device_unref(udevice); - if (path->isEmpty() && candidate.startsWith("/dev/input/event")) - *path = candidate; - } - udev_enumerate_unref(ue); - udev_unref(u); -} - void QTouchScreenHandler::readData() { ::input_event buffer[32]; @@ -289,7 +277,7 @@ void QTouchScreenData::processInputEvent(input_event *data) tp.state = contact.state; combinedStates |= tp.state; - // Store the HW coordinates. Observers can then map it to screen space or something else. + // Store the HW coordinates for now, will be updated later. tp.area = QRectF(0, 0, contact.maj, contact.maj); tp.area.moveCenter(QPoint(contact.x, contact.y)); tp.pressure = contact.pressure; @@ -307,10 +295,8 @@ void QTouchScreenData::processInputEvent(input_event *data) m_lastContacts = m_contacts; m_contacts.clear(); - if (!m_touchPoints.isEmpty() && combinedStates != Qt::TouchPointStationary) { - for (int i = 0; i < m_observers.count(); ++i) - m_observers.at(i)->touch_point(m_touchPoints); - } + if (!m_touchPoints.isEmpty() && combinedStates != Qt::TouchPointStationary) + reportPoints(); } m_lastEventType = data->type; @@ -369,10 +355,48 @@ void QTouchScreenData::assignIds() m_contacts = newContacts; } +void QTouchScreenData::reportPoints() +{ + QRect winRect; + if (m_forceToActiveWindow) { + QWindow *win = QGuiApplication::activeWindow(); + if (!win) + return; + winRect = win->geometry(); + } else { + winRect = QGuiApplication::primaryScreen()->geometry(); + } -QTouchScreenHandlerThread::QTouchScreenHandlerThread(const QString &spec, - QTouchScreenObserver *observer) - : m_spec(spec), m_handler(0), m_observer(observer) + const int hw_w = hw_range_x_max - hw_range_x_min; + const int hw_h = hw_range_y_max - hw_range_y_min; + + // Map the coordinates based on the normalized position. QPA expects 'area' + // to be in screen coordinates. + const int pointCount = m_touchPoints.count(); + for (int i = 0; i < pointCount; ++i) { + QWindowSystemInterface::TouchPoint &tp(m_touchPoints[i]); + + // Generate a screen position that is always inside the active window + // or the primary screen. + const int wx = winRect.left() + int(tp.normalPosition.x() * winRect.width()); + const int wy = winRect.top() + int(tp.normalPosition.y() * winRect.height()); + const qreal sizeRatio = (winRect.width() + winRect.height()) / qreal(hw_w + hw_h); + tp.area = QRect(0, 0, tp.area.width() * sizeRatio, tp.area.height() * sizeRatio); + tp.area.moveCenter(QPoint(wx, wy)); + + // Calculate normalized pressure. + if (!hw_pressure_min && !hw_pressure_max) + tp.pressure = tp.state == Qt::TouchPointReleased ? 0 : 1; + else + tp.pressure = (tp.pressure - hw_pressure_min) / qreal(hw_pressure_max - hw_pressure_min); + } + + QWindowSystemInterface::handleTouchEvent(0, m_device, m_touchPoints); +} + + +QTouchScreenHandlerThread::QTouchScreenHandlerThread(const QString &spec) + : m_spec(spec), m_handler(0) { start(); } @@ -386,7 +410,6 @@ QTouchScreenHandlerThread::~QTouchScreenHandlerThread() void QTouchScreenHandlerThread::run() { m_handler = new QTouchScreenHandler(m_spec); - m_handler->addObserver(m_observer); exec(); delete m_handler; m_handler = 0; diff --git a/src/plugins/generic/touchscreen/qtouchscreen.h b/src/plugins/generic/evdevtouch/qevdevtouch.h similarity index 80% rename from src/plugins/generic/touchscreen/qtouchscreen.h rename to src/plugins/generic/evdevtouch/qevdevtouch.h index 33a1b0ad2fe..343f6385268 100644 --- a/src/plugins/generic/touchscreen/qtouchscreen.h +++ b/src/plugins/generic/evdevtouch/qevdevtouch.h @@ -39,8 +39,8 @@ ** ****************************************************************************/ -#ifndef QTOUCHSCREEN_H -#define QTOUCHSCREEN_H +#ifndef QEVDEVTOUCH_H +#define QEVDEVTOUCH_H #include #include @@ -55,14 +55,6 @@ QT_BEGIN_NAMESPACE class QSocketNotifier; class QTouchScreenData; -class QTouchScreenObserver -{ -public: - virtual void touch_configure(int x_min, int x_max, int y_min, int y_max, - int pressure_min, int pressure_max, const QString &dev_name) = 0; - virtual void touch_point(const QList &points) = 0; -}; - class QTouchScreenHandler : public QObject { Q_OBJECT @@ -70,13 +62,12 @@ class QTouchScreenHandler : public QObject public: QTouchScreenHandler(const QString &spec = QString()); ~QTouchScreenHandler(); - void addObserver(QTouchScreenObserver *observer); private slots: void readData(); private: - void try_udev(QString *path); + void pathFromUdev(QString *path); QSocketNotifier *m_notify; int m_fd; @@ -86,7 +77,7 @@ private: class QTouchScreenHandlerThread : public QThread { public: - QTouchScreenHandlerThread(const QString &spec, QTouchScreenObserver *observer); + QTouchScreenHandlerThread(const QString &spec); ~QTouchScreenHandlerThread(); void run(); QTouchScreenHandler *handler() { return m_handler; } @@ -94,11 +85,10 @@ public: private: QString m_spec; QTouchScreenHandler *m_handler; - QTouchScreenObserver *m_observer; }; QT_END_NAMESPACE QT_END_HEADER -#endif // QTOUCHSCREEN_H +#endif // QEVDEVTOUCH_H diff --git a/src/plugins/generic/generic.pro b/src/plugins/generic/generic.pro index 68c7636940c..06bc0091f48 100644 --- a/src/plugins/generic/generic.pro +++ b/src/plugins/generic/generic.pro @@ -1,3 +1,9 @@ TEMPLATE = subdirs linux-g++-maemo: SUBDIRS += meego + +contains(QT_CONFIG, evdev) { + contains(QT_CONFIG, libudev) { + SUBDIRS += evdevmouse evdevtouch evdevkeyboard + } +} diff --git a/src/plugins/generic/linuxinput/linuxinput.pro b/src/plugins/generic/linuxinput/linuxinput.pro deleted file mode 100644 index 6ef5f0fb3af..00000000000 --- a/src/plugins/generic/linuxinput/linuxinput.pro +++ /dev/null @@ -1,14 +0,0 @@ -TARGET = qlinuxinputplugin -load(qt_plugin) - -DESTDIR = $$QT.gui.plugins/generic -target.path = $$[QT_INSTALL_PLUGINS]/generic -INSTALLS += target - -HEADERS = qlinuxinput.h - -QT += core-private - -SOURCES = main.cpp \ - qlinuxinput.cpp - diff --git a/src/plugins/generic/linuxinput/qlinuxinput.cpp b/src/plugins/generic/linuxinput/qlinuxinput.cpp deleted file mode 100644 index 04633845cbe..00000000000 --- a/src/plugins/generic/linuxinput/qlinuxinput.cpp +++ /dev/null @@ -1,365 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the QtGui module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - - -#include "qlinuxinput.h" - - -#include -#include -#include -#include - -#include -#include // overrides QT_OPEN - -#include -#include - -#include -#include - -#include - -QT_BEGIN_NAMESPACE - - -//#define QT_QPA_EXPERIMENTAL_TOUCHEVENT - -#ifdef QT_QPA_EXPERIMENTAL_TOUCHEVENT -class QLinuxInputMouseHandlerData -{ -public: - QLinuxInputMouseHandlerData() :seenMT(false), state(QEvent::TouchBegin), currentIdx(0) {} - - void ensureCurrentPoint() { - if (currentIdx >= touchPoints.size()) { - Q_ASSERT(currentIdx == touchPoints.size()); - QWindowSystemInterface::TouchPoint tp; - tp.id = currentIdx; - tp.isPrimary = (currentIdx == 0); - tp.pressure = 1; - tp.area = QRectF(0,0,1,1); - tp.state = Qt::TouchPointReleased; // init in neutral state - touchPoints.append(tp); - } - } - void setCurrentPoint(int i) { - currentIdx = i; - if (currentIdx < touchPoints.size()) { - currentX = int(touchPoints[currentIdx].area.left()); - currentY = int(touchPoints[currentIdx].area.top()); - } else { - currentY = currentX = -999; - } - } - void advanceCurrentPoint() { - setCurrentPoint(currentIdx + 1); - } - int currentPoint() { return currentIdx; } - void setCurrentX(int value) { - ensureCurrentPoint(); - touchPoints[currentIdx].area.moveLeft(value); - } - bool currentMoved() { - return currentX != touchPoints[currentIdx].area.left() || currentY != touchPoints[currentIdx].area.top(); - } - void updateCurrentPos() { - ensureCurrentPoint(); - touchPoints[currentIdx].area.moveTopLeft(QPointF(currentX, currentY)); - } - void setCurrentState(Qt::TouchPointState state) { - ensureCurrentPoint(); - touchPoints[currentIdx].state = state; - } - Qt::TouchPointState currentState() const { - if (currentIdx < touchPoints.size()) - return touchPoints[currentIdx].state; - return Qt::TouchPointReleased; - } - QList touchPoints; - int currentX; - int currentY; - bool seenMT; - QEvent::Type state; -private: - int currentIdx; -}; -#endif - - -QLinuxInputMouseHandler::QLinuxInputMouseHandler(const QString &key, - const QString &specification) - : m_notify(0), m_x(0), m_y(0), m_prevx(0), m_prevy(0), m_xoffset(0), m_yoffset(0), m_buttons(0), d(0) -{ - qDebug() << "QLinuxInputMouseHandler" << key << specification; - - - setObjectName(QLatin1String("LinuxInputSubsystem Mouse Handler")); - - QString dev = QLatin1String("/dev/input/event0"); - m_compression = true; - m_smooth = false; - int jitterLimit = 0; - - QStringList args = specification.split(QLatin1Char(':')); - foreach (const QString &arg, args) { - if (arg == "nocompress") - m_compression = false; - else if (arg.startsWith("dejitter=")) - jitterLimit = arg.mid(9).toInt(); - else if (arg.startsWith("xoffset=")) - m_xoffset = arg.mid(8).toInt(); - else if (arg.startsWith("yoffset=")) - m_yoffset = arg.mid(8).toInt(); - else if (arg.startsWith(QLatin1String("/dev/"))) - dev = arg; - } - m_jitterLimitSquared = jitterLimit*jitterLimit; - - m_fd = QT_OPEN(dev.toLocal8Bit().constData(), O_RDONLY | O_NDELAY, 0); - if (m_fd >= 0) { - m_notify = new QSocketNotifier(m_fd, QSocketNotifier::Read, this); - connect(m_notify, SIGNAL(activated(int)), this, SLOT(readMouseData())); - } else { - qWarning("Cannot open mouse input device '%s': %s", qPrintable(dev), strerror(errno)); - return; - } -#ifdef QT_QPA_EXPERIMENTAL_TOUCHEVENT - d = new QLinuxInputMouseHandlerData; -#endif -} - - -QLinuxInputMouseHandler::~QLinuxInputMouseHandler() -{ - if (m_fd >= 0) - QT_CLOSE(m_fd); -#ifdef QT_QPA_EXPERIMENTAL_TOUCHEVENT - delete d; -#endif -} - -void QLinuxInputMouseHandler::sendMouseEvent(int x, int y, Qt::MouseButtons buttons) -{ - QPoint pos(x+m_xoffset, y+m_yoffset); - QWindowSystemInterface::handleMouseEvent(0, pos, pos, m_buttons); - m_prevx = x; - m_prevy = y; -} - -void QLinuxInputMouseHandler::readMouseData() -{ - struct ::input_event buffer[32]; - int n = 0; - bool posChanged = false; - bool pendingMouseEvent = false; - int eventCompressCount = 0; - forever { - n = QT_READ(m_fd, reinterpret_cast(buffer) + n, sizeof(buffer) - n); - - if (n == 0) { - qWarning("Got EOF from the input device."); - return; - } else if (n < 0 && (errno != EINTR && errno != EAGAIN)) { - qWarning("Could not read from input device: %s", strerror(errno)); - return; - } else if (n % sizeof(buffer[0]) == 0) { - break; - } - } - - n /= sizeof(buffer[0]); - - for (int i = 0; i < n; ++i) { - struct ::input_event *data = &buffer[i]; - //qDebug() << ">>" << hex << data->type << data->code << dec << data->value; - bool unknown = false; - if (data->type == EV_ABS) { - if (data->code == ABS_X && m_x != data->value) { - m_x = data->value; - posChanged = true; - } else if (data->code == ABS_Y && m_y != data->value) { - m_y = data->value; - posChanged = true; - } else if (data->code == ABS_PRESSURE) { - //ignore for now... - } else if (data->code == ABS_TOOL_WIDTH) { - //ignore for now... - } else if (data->code == ABS_HAT0X) { - //ignore for now... - } else if (data->code == ABS_HAT0Y) { - //ignore for now... -#ifdef QT_QPA_EXPERIMENTAL_TOUCHEVENT - } else if (data->code == ABS_MT_POSITION_X) { - d->currentX = data->value; - d->seenMT = true; - } else if (data->code == ABS_MT_POSITION_Y) { - d->currentY = data->value; - d->seenMT = true; - } else if (data->code == ABS_MT_TOUCH_MAJOR) { - if (data->value == 0) - d->setCurrentState(Qt::TouchPointReleased); - //otherwise, ignore for now... - } else if (data->code == ABS_MT_TOUCH_MINOR) { - //ignore for now... -#endif - } else { - unknown = true; - } - } else if (data->type == EV_REL) { - if (data->code == REL_X) { - m_x += data->value; - posChanged = true; - } else if (data->code == REL_Y) { - m_y += data->value; - posChanged = true; - } else if (data->code == ABS_WHEEL) { // vertical scroll - // data->value: 1 == up, -1 == down - int delta = 120 * data->value; - QWindowSystemInterface::handleWheelEvent(0, QPoint(m_x, m_y), - QPoint(m_x, m_y), - delta, Qt::Vertical); - } else if (data->code == ABS_THROTTLE) { // horizontal scroll - // data->value: 1 == right, -1 == left - int delta = 120 * -data->value; - QWindowSystemInterface::handleWheelEvent(0, QPoint(m_x, m_y), - QPoint(m_x, m_y), - delta, Qt::Horizontal); - } else { - unknown = true; - } - } else if (data->type == EV_KEY && data->code == BTN_TOUCH) { - m_buttons = data->value ? Qt::LeftButton : Qt::NoButton; - - sendMouseEvent(m_x, m_y, m_buttons); - pendingMouseEvent = false; - } else if (data->type == EV_KEY && data->code >= BTN_LEFT && data->code <= BTN_MIDDLE) { - Qt::MouseButton button = Qt::NoButton; - switch (data->code) { - case BTN_LEFT: button = Qt::LeftButton; break; - case BTN_MIDDLE: button = Qt::MidButton; break; - case BTN_RIGHT: button = Qt::RightButton; break; - } - if (data->value) - m_buttons |= button; - else - m_buttons &= ~button; - sendMouseEvent(m_x, m_y, m_buttons); - pendingMouseEvent = false; - } else if (data->type == EV_SYN && data->code == SYN_REPORT) { - if (posChanged) { - posChanged = false; - if (m_compression) { - pendingMouseEvent = true; - eventCompressCount++; - } else { - sendMouseEvent(m_x, m_y, m_buttons); - } - } -#ifdef QT_QPA_EXPERIMENTAL_TOUCHEVENT - if (d->state == QEvent::TouchBegin && !d->seenMT) { - //no multipoint-touch events to send - } else { - if (!d->seenMT) - d->state = QEvent::TouchEnd; - - for (int i = d->currentPoint(); i < d->touchPoints.size(); ++i) { - d->touchPoints[i].pressure = 0; - d->touchPoints[i].state = Qt::TouchPointReleased; - } - //qDebug() << "handleTouchEvent" << d->state << d->touchPoints.size() << d->touchPoints[0].state; - QWindowSystemInterface::handleTouchEvent(0, d->state, QTouchEvent::TouchScreen, d->touchPoints); - if (d->seenMT) { - d->state = QEvent::TouchUpdate; - } else { - d->state = QEvent::TouchBegin; - d->touchPoints.clear(); - } - d->setCurrentPoint(0); - d->seenMT = false; - } - } else if (data->type == EV_SYN && data->code == SYN_MT_REPORT) { - //store data for this touch point - - if (!d->seenMT) { - d->setCurrentState(Qt::TouchPointReleased); - } else if (d->currentState() == Qt::TouchPointReleased) { - d->updateCurrentPos(); - d->setCurrentState(Qt::TouchPointPressed); - } else if (d->currentMoved()) { - d->updateCurrentPos(); - d->setCurrentState(Qt::TouchPointMoved); - } else { - d->setCurrentState(Qt::TouchPointStationary); - } - //qDebug() << "end of point" << d->currentPoint() << d->currentX << d->currentY << d->currentState(); - - //advance to next tp: - d->advanceCurrentPoint(); -#endif - } else if (data->type == EV_MSC && data->code == MSC_SCAN) { - // kernel encountered an unmapped key - just ignore it - continue; - } else { - unknown = true; - } -#ifdef QLINUXINPUT_EXTRA_DEBUG - if (unknown) { - qWarning("unknown mouse event type=%x, code=%x, value=%x", data->type, data->code, data->value); - } -#endif - } - if (m_compression && pendingMouseEvent) { - int distanceSquared = (m_x - m_prevx)*(m_x - m_prevx) + (m_y - m_prevy)*(m_y - m_prevy); - if (distanceSquared > m_jitterLimitSquared) - sendMouseEvent(m_x, m_y, m_buttons); - } -} - - - - - - - -QT_END_NAMESPACE - diff --git a/src/plugins/generic/touchscreen/README b/src/plugins/generic/touchscreen/README deleted file mode 100644 index ac73f5f147e..00000000000 --- a/src/plugins/generic/touchscreen/README +++ /dev/null @@ -1,45 +0,0 @@ -Generic plug-in for evdev touch events. - -Tested with the following drivers: bcm5974, hid_magicmouse. - -(1) Using as a QPA generic plug-in - -1. set up and connect the touch device -2. install libudev-dev or similar -3. build this plug-in (qmake && make) -4. sudo cp 70-qtouchscreen.rules /etc/udev/rules.d -5. sudo udevadm trigger --subsystem-match=input -6. ./fingerpaint -plugin LinuxTouchScreen:force_window - -If automatic detection does not work, use -plugin -LinuxTouchScreen:/dev/input/eventN to explicitly set the device file -name. - -By default the surface of the touch device is mapped to the entire -screen. If this is not desired, pass force_window in the plugin -specification as shown in the example above. This will cause mapping -the touch surface to the active window instead. - -Only touch events are generated, mouse events are not. Be aware however -that ignored touch events will generate a mouse event from the first -touch point by default. See AA_SynthesizeMouseForUnhandledTouchEvents. - -(2) Using in a compositor - -The classes (QTouchScreenHandler, QTouchScreenHandlerThread) are also -suitable for direct inclusion into an application, e.g. a Wayland -compositor. The compositor may then register its own -QTouchScreenObserver because relying on the QTouchEvents generated by -the QPA event sender may not always be satisfactory as some low-level -details get lost, and due to performance reasons. - -(3) Possible issues and solutions - -The udev rule matches any touchpad device. If there are multiple ones, -specify the device as described above. - -If no evdev events are read, remove 50-synaptics.conf (or similar) -from /usr/share/X11/xorg.conf.d and restart X. Or at least temporarily -disable the device by running xinput set-prop 0. Use xinput list and xinput list-props to figure out the -values. diff --git a/src/plugins/generic/touchscreen/qtoucheventsenderqpa.cpp b/src/plugins/generic/touchscreen/qtoucheventsenderqpa.cpp deleted file mode 100644 index ac4a12c09a4..00000000000 --- a/src/plugins/generic/touchscreen/qtoucheventsenderqpa.cpp +++ /dev/null @@ -1,116 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the plugins module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qtoucheventsenderqpa.h" -#include -#include -#include -#include - -QT_BEGIN_NAMESPACE - -QTouchEventSenderQPA::QTouchEventSenderQPA(const QString &spec) -{ - m_forceToActiveWindow = spec.split(QLatin1Char(':')).contains(QLatin1String("force_window")); - m_device = new QTouchDevice; - m_device->setType(QTouchDevice::TouchScreen); - m_device->setCapabilities(QTouchDevice::Position | QTouchDevice::Area); - QWindowSystemInterface::registerTouchDevice(m_device); -} - -void QTouchEventSenderQPA::touch_configure(int x_min, int x_max, int y_min, int y_max, - int pressure_min, int pressure_max, - const QString &dev_name) -{ - hw_range_x_min = x_min; - hw_range_x_max = x_max; - hw_range_y_min = y_min; - hw_range_y_max = y_max; - - hw_pressure_min = pressure_min; - hw_pressure_max = pressure_max; - - m_device->setName(dev_name); - - if (hw_pressure_max > hw_pressure_min) - m_device->setCapabilities(m_device->capabilities() | QTouchDevice::Pressure); -} - -void QTouchEventSenderQPA::touch_point(const QList &points) -{ - QRect winRect; - if (m_forceToActiveWindow) { - QWindow *win = QGuiApplication::activeWindow(); - if (!win) - return; - winRect = win->geometry(); - } else { - winRect = QGuiApplication::primaryScreen()->geometry(); - } - - const int hw_w = hw_range_x_max - hw_range_x_min; - const int hw_h = hw_range_y_max - hw_range_y_min; - - QList touchPoints = points; - // Map the coordinates based on the normalized position. QPA expects 'area' - // to be in screen coordinates. - for (int i = 0; i < touchPoints.size(); ++i) { - QWindowSystemInterface::TouchPoint &tp(touchPoints[i]); - - // Generate a screen position that is always inside the active window - // or the primary screen. - const int wx = winRect.left() + int(tp.normalPosition.x() * winRect.width()); - const int wy = winRect.top() + int(tp.normalPosition.y() * winRect.height()); - const qreal sizeRatio = (winRect.width() + winRect.height()) / qreal(hw_w + hw_h); - tp.area = QRect(0, 0, tp.area.width() * sizeRatio, tp.area.height() * sizeRatio); - tp.area.moveCenter(QPoint(wx, wy)); - - // Calculate normalized pressure. - if (!hw_pressure_min && !hw_pressure_max) - tp.pressure = tp.state == Qt::TouchPointReleased ? 0 : 1; - else - tp.pressure = (tp.pressure - hw_pressure_min) / qreal(hw_pressure_max - hw_pressure_min); - } - - QWindowSystemInterface::handleTouchEvent(0, m_device, touchPoints); -} - -QT_END_NAMESPACE diff --git a/src/plugins/generic/touchscreen/touchscreen.pro b/src/plugins/generic/touchscreen/touchscreen.pro deleted file mode 100644 index 60aa29c5ecc..00000000000 --- a/src/plugins/generic/touchscreen/touchscreen.pro +++ /dev/null @@ -1,18 +0,0 @@ -TARGET = qtouchscreenplugin -load(qt_plugin) - -DESTDIR = $$QT.gui.plugins/generic -target.path = $$[QT_INSTALL_PLUGINS]/generic -INSTALLS += target - -HEADERS = \ - qtouchscreen.h \ - qtoucheventsenderqpa.h - -SOURCES = main.cpp \ - qtouchscreen.cpp \ - qtoucheventsenderqpa.cpp - -QT += core-private gui-private - -LIBS += -ludev diff --git a/src/plugins/imageformats/gif/gif.json b/src/plugins/imageformats/gif/gif.json new file mode 100644 index 00000000000..b599b40ffe0 --- /dev/null +++ b/src/plugins/imageformats/gif/gif.json @@ -0,0 +1,3 @@ +{ + "Keys": [ "gif" ] +} diff --git a/src/plugins/imageformats/gif/gif.pro b/src/plugins/imageformats/gif/gif.pro index a4cde20c6fc..b85ee984ac6 100644 --- a/src/plugins/imageformats/gif/gif.pro +++ b/src/plugins/imageformats/gif/gif.pro @@ -3,6 +3,8 @@ load(qt_plugin) include(../../../gui/image/qgifhandler.pri) SOURCES += $$PWD/main.cpp +HEADERS += $$PWD/main.h +OTHER_FILES += gif.json DESTDIR = $$QT.gui.plugins/imageformats target.path += $$[QT_INSTALL_PLUGINS]/imageformats diff --git a/src/plugins/imageformats/gif/main.cpp b/src/plugins/imageformats/gif/main.cpp index 0b6c99a9e4c..9dd61c44996 100644 --- a/src/plugins/imageformats/gif/main.cpp +++ b/src/plugins/imageformats/gif/main.cpp @@ -44,6 +44,8 @@ #ifndef QT_NO_IMAGEFORMATPLUGIN +#include "main.h" + #ifdef QT_NO_IMAGEFORMAT_GIF #undef QT_NO_IMAGEFORMAT_GIF #endif @@ -51,16 +53,6 @@ QT_BEGIN_NAMESPACE -class QGifPlugin : public QImageIOPlugin -{ -public: - QGifPlugin(); - ~QGifPlugin(); - - QStringList keys() const; - Capabilities capabilities(QIODevice *device, const QByteArray &format) const; - QImageIOHandler *create(QIODevice *device, const QByteArray &format = QByteArray()) const; -}; QGifPlugin::QGifPlugin() { @@ -90,9 +82,6 @@ QImageIOHandler *QGifPlugin::create(QIODevice *device, const QByteArray &format) return handler; } -Q_EXPORT_STATIC_PLUGIN(QGifPlugin) -Q_EXPORT_PLUGIN2(qgif, QGifPlugin) - #endif // QT_NO_IMAGEFORMATPLUGIN QT_END_NAMESPACE diff --git a/src/plugins/imageformats/gif/main.h b/src/plugins/imageformats/gif/main.h new file mode 100644 index 00000000000..97335b19685 --- /dev/null +++ b/src/plugins/imageformats/gif/main.h @@ -0,0 +1,65 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the plugins of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include +#include + +#ifdef QT_NO_IMAGEFORMAT_GIF +#undef QT_NO_IMAGEFORMAT_GIF +#endif +#include + +QT_BEGIN_NAMESPACE + +class QGifPlugin : public QImageIOPlugin +{ + Q_OBJECT + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QImageIOHandlerFactoryInterface" FILE "gif.json") +public: + QGifPlugin(); + ~QGifPlugin(); + + QStringList keys() const; + Capabilities capabilities(QIODevice *device, const QByteArray &format) const; + QImageIOHandler *create(QIODevice *device, const QByteArray &format = QByteArray()) const; +}; + +QT_END_NAMESPACE diff --git a/src/plugins/imageformats/ico/ico.json b/src/plugins/imageformats/ico/ico.json new file mode 100644 index 00000000000..d22cb739a1b --- /dev/null +++ b/src/plugins/imageformats/ico/ico.json @@ -0,0 +1,3 @@ +{ + "Keys": [ "ico" ] +} diff --git a/src/plugins/imageformats/ico/ico.pro b/src/plugins/imageformats/ico/ico.pro index c0972fe189c..242e42b8697 100644 --- a/src/plugins/imageformats/ico/ico.pro +++ b/src/plugins/imageformats/ico/ico.pro @@ -3,9 +3,10 @@ load(qt_plugin) QTDIR_build:REQUIRES = "!contains(QT_CONFIG, no-ico)" -HEADERS += qicohandler.h +HEADERS += qicohandler.h main.h SOURCES += main.cpp \ qicohandler.cpp +OTHER_FILES += ico.json DESTDIR = $$QT.gui.plugins/imageformats target.path += $$[QT_INSTALL_PLUGINS]/imageformats diff --git a/src/plugins/imageformats/ico/main.cpp b/src/plugins/imageformats/ico/main.cpp index 5ebb24d06e7..9c9525f48f5 100644 --- a/src/plugins/imageformats/ico/main.cpp +++ b/src/plugins/imageformats/ico/main.cpp @@ -39,26 +39,12 @@ ** ****************************************************************************/ -#include -#include +#include "main.h" #ifndef QT_NO_IMAGEFORMATPLUGIN -#ifdef QT_NO_IMAGEFORMAT_ICO -#undef QT_NO_IMAGEFORMAT_ICO -#endif -#include "qicohandler.h" - QT_BEGIN_NAMESPACE -class QICOPlugin : public QImageIOPlugin -{ -public: - QStringList keys() const; - Capabilities capabilities(QIODevice *device, const QByteArray &format) const; - QImageIOHandler *create(QIODevice *device, const QByteArray &format = QByteArray()) const; -}; - QStringList QICOPlugin::keys() const { return QStringList() << QLatin1String("ico"); @@ -89,8 +75,6 @@ QImageIOHandler *QICOPlugin::create(QIODevice *device, const QByteArray &format) return handler; } -Q_EXPORT_PLUGIN2(qico, QICOPlugin) - QT_END_NAMESPACE #endif /* QT_NO_IMAGEFORMATPLUGIN */ diff --git a/src/plugins/imageformats/ico/main.h b/src/plugins/imageformats/ico/main.h new file mode 100644 index 00000000000..6c7634002a3 --- /dev/null +++ b/src/plugins/imageformats/ico/main.h @@ -0,0 +1,66 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the plugins of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include +#include + +#ifndef QT_NO_IMAGEFORMATPLUGIN + +#ifdef QT_NO_IMAGEFORMAT_ICO +#undef QT_NO_IMAGEFORMAT_ICO +#endif +#include "qicohandler.h" + +QT_BEGIN_NAMESPACE + +class QICOPlugin : public QImageIOPlugin +{ + Q_OBJECT + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QImageIOHandlerFactoryInterface" FILE "ico.json") +public: + QStringList keys() const; + Capabilities capabilities(QIODevice *device, const QByteArray &format) const; + QImageIOHandler *create(QIODevice *device, const QByteArray &format = QByteArray()) const; +}; + +QT_END_NAMESPACE + +#endif diff --git a/src/plugins/imageformats/jpeg/jpeg.json b/src/plugins/imageformats/jpeg/jpeg.json new file mode 100644 index 00000000000..132c642c05b --- /dev/null +++ b/src/plugins/imageformats/jpeg/jpeg.json @@ -0,0 +1,3 @@ +{ + "Keys": [ "jpg", "jpeg" ] +} diff --git a/src/plugins/imageformats/jpeg/jpeg.pro b/src/plugins/imageformats/jpeg/jpeg.pro index aa489729a10..f2a41129d56 100644 --- a/src/plugins/imageformats/jpeg/jpeg.pro +++ b/src/plugins/imageformats/jpeg/jpeg.pro @@ -7,6 +7,8 @@ QTDIR_build:REQUIRES = "!contains(QT_CONFIG, no-jpeg)" include(../../../gui/image/qjpeghandler.pri) SOURCES += main.cpp +HEADERS += main.h +OTHER_FILES += jpeg.json DESTDIR = $$QT.gui.plugins/imageformats target.path += $$[QT_INSTALL_PLUGINS]/imageformats diff --git a/src/plugins/imageformats/jpeg/main.cpp b/src/plugins/imageformats/jpeg/main.cpp index beb3970af14..ecda04864b3 100644 --- a/src/plugins/imageformats/jpeg/main.cpp +++ b/src/plugins/imageformats/jpeg/main.cpp @@ -39,8 +39,7 @@ ** ****************************************************************************/ -#include -#include +#include "main.h" #ifndef QT_NO_IMAGEFORMATPLUGIN @@ -51,14 +50,6 @@ QT_BEGIN_NAMESPACE -class QJpegPlugin : public QImageIOPlugin -{ -public: - QStringList keys() const; - Capabilities capabilities(QIODevice *device, const QByteArray &format) const; - QImageIOHandler *create(QIODevice *device, const QByteArray &format = QByteArray()) const; -}; - QStringList QJpegPlugin::keys() const { return QStringList() << QLatin1String("jpeg") << QLatin1String("jpg"); @@ -89,9 +80,6 @@ QImageIOHandler *QJpegPlugin::create(QIODevice *device, const QByteArray &format return handler; } -Q_EXPORT_STATIC_PLUGIN(QJpegPlugin) -Q_EXPORT_PLUGIN2(qjpeg, QJpegPlugin) - QT_END_NAMESPACE #endif // QT_NO_IMAGEFORMATPLUGIN diff --git a/src/plugins/imageformats/jpeg/main.h b/src/plugins/imageformats/jpeg/main.h new file mode 100644 index 00000000000..8606eabdd94 --- /dev/null +++ b/src/plugins/imageformats/jpeg/main.h @@ -0,0 +1,65 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the plugins of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include +#include + +#ifndef QT_NO_IMAGEFORMATPLUGIN + +#ifdef QT_NO_IMAGEFORMAT_JPEG +#undef QT_NO_IMAGEFORMAT_JPEG +#endif + +QT_BEGIN_NAMESPACE + +class QJpegPlugin : public QImageIOPlugin +{ + Q_OBJECT + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QImageIOHandlerFactoryInterface" FILE "jpeg.json") +public: + QStringList keys() const; + Capabilities capabilities(QIODevice *device, const QByteArray &format) const; + QImageIOHandler *create(QIODevice *device, const QByteArray &format = QByteArray()) const; +}; + +QT_END_NAMESPACE + +#endif diff --git a/src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.cpp b/src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.cpp index 5840415ded1..5579b4cd26e 100644 --- a/src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.cpp +++ b/src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.cpp @@ -103,7 +103,7 @@ bool QIBusPlatformInputContext::isValid() const return d->valid; } -void QIBusPlatformInputContext::invokeAction(QInputMethod::Action a, int x) +void QIBusPlatformInputContext::invokeAction(QInputMethod::Action a, int) { if (!d->valid) return; diff --git a/src/plugins/platforminputcontexts/maliit/qmaliitplatforminputcontext.cpp b/src/plugins/platforminputcontexts/maliit/qmaliitplatforminputcontext.cpp index bd3b914f157..dbb4e6e650f 100644 --- a/src/plugins/platforminputcontexts/maliit/qmaliitplatforminputcontext.cpp +++ b/src/plugins/platforminputcontexts/maliit/qmaliitplatforminputcontext.cpp @@ -287,7 +287,7 @@ void QMaliitPlatformInputContext::activationLostEvent() d->visibility = InputPanelHidden; } -void QMaliitPlatformInputContext::commitString(const QString &string, int replacementStart, int replacementLength, int cursorPos) +void QMaliitPlatformInputContext::commitString(const QString &string, int replacementStart, int replacementLength, int /* cursorPos */) { QObject *input = qApp->inputMethod()->inputItem(); if (!input) diff --git a/src/plugins/platforms/cocoa/cocoa.json b/src/plugins/platforms/cocoa/cocoa.json new file mode 100644 index 00000000000..520c4f5a506 --- /dev/null +++ b/src/plugins/platforms/cocoa/cocoa.json @@ -0,0 +1,3 @@ +{ + "Keys": [ "cocoa" ] +} diff --git a/src/plugins/platforms/cocoa/cocoa.pro b/src/plugins/platforms/cocoa/cocoa.pro index 09b708d9a19..45dd3525d50 100644 --- a/src/plugins/platforms/cocoa/cocoa.pro +++ b/src/plugins/platforms/cocoa/cocoa.pro @@ -23,7 +23,9 @@ OBJECTIVE_SOURCES += main.mm \ qmultitouch_mac.mm \ qcocoaaccessibilityelement.mm \ qcocoaaccessibility.mm \ + qcocoacolordialoghelper.mm \ qcocoafiledialoghelper.mm \ + qcocoafontdialoghelper.mm \ qcocoacursor.mm \ HEADERS += qcocoaintegration.h \ @@ -45,7 +47,9 @@ HEADERS += qcocoaintegration.h \ qmultitouch_mac_p.h \ qcocoaaccessibilityelement.h \ qcocoaaccessibility.h \ + qcocoacolordialoghelper.h \ qcocoafiledialoghelper.h \ + qcocoafontdialoghelper.h \ qcocoacursor.h \ FORMS += $$PWD/../../../widgets/dialogs/qfiledialog.ui @@ -55,6 +59,7 @@ LIBS += -framework Cocoa QT += core-private gui-private widgets-private platformsupport-private +OTHER_FILES += cocoa.json target.path += $$[QT_INSTALL_PLUGINS]/platforms INSTALLS += target diff --git a/src/plugins/platforms/cocoa/main.mm b/src/plugins/platforms/cocoa/main.mm index 334a1fefc3d..9857a4e1771 100644 --- a/src/plugins/platforms/cocoa/main.mm +++ b/src/plugins/platforms/cocoa/main.mm @@ -50,6 +50,8 @@ QT_BEGIN_NAMESPACE class QCocoaIntegrationPlugin : public QPlatformIntegrationPlugin { + Q_OBJECT + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QPlatformIntegrationFactoryInterface" FILE "cocoa.json") public: QStringList keys() const; QPlatformIntegration *create(const QString&, const QStringList&); @@ -71,6 +73,6 @@ QPlatformIntegration * QCocoaIntegrationPlugin::create(const QString& system, co return 0; } -Q_EXPORT_PLUGIN2(CocoaIntegration, QCocoaIntegrationPlugin) - QT_END_NAMESPACE + +#include "main.moc" diff --git a/src/plugins/platforms/cocoa/qcocoacolordialoghelper.h b/src/plugins/platforms/cocoa/qcocoacolordialoghelper.h new file mode 100644 index 00000000000..505fd4f1115 --- /dev/null +++ b/src/plugins/platforms/cocoa/qcocoacolordialoghelper.h @@ -0,0 +1,78 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the QtGui module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QCOCOACOLORDIALOGHELPER_H +#define QCOCOACOLORDIALOGHELPER_H + +#include +#include + +QT_BEGIN_NAMESPACE + +class QCocoaColorDialogHelper : public QPlatformColorDialogHelper +{ +public: + QCocoaColorDialogHelper(); + virtual ~QCocoaColorDialogHelper(); + + void platformNativeDialogModalHelp(); + void _q_platformRunNativeAppModalPanel(); + void deleteNativeDialog_sys(); + bool show_sys(QFlags, Qt::WindowFlags, QWindow*); + void hide_sys(); + + DialogCode dialogResultCode_sys(); + void setCurrentColor_sys(const QColor&); + QColor currentColor_sys() const; + +public: + bool showCocoaColorPanel(QWindow *parent); + bool hideCocoaColorPanel(); + + void createNSColorPanelDelegate(); + +private: + void *mDelegate; +}; + +QT_END_NAMESPACE + +#endif // QCOCOACOLORDIALOGHELPER_H diff --git a/src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm b/src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm new file mode 100644 index 00000000000..bfc626fdbac --- /dev/null +++ b/src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm @@ -0,0 +1,464 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the QtGui module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qcocoacolordialoghelper.h" + +#ifndef QT_NO_COLORDIALOG + +#include +#include +#include +#include + +#include "qcocoahelpers.h" + +#import + +QT_USE_NAMESPACE + +static NSButton *macCreateButton(const char *text, NSView *superview) +{ + static const NSRect buttonFrameRect = { { 0.0, 0.0 }, { 0.0, 0.0 } }; + + NSButton *button = [[NSButton alloc] initWithFrame:buttonFrameRect]; + [button setButtonType:NSMomentaryLightButton]; + [button setBezelStyle:NSRoundedBezelStyle]; + [button setTitle:(NSString*)(CFStringRef)QCFString(QDialogButtonBox::tr(text) + .remove(QLatin1Char('&')))]; + [[button cell] setFont:[NSFont systemFontOfSize: + [NSFont systemFontSizeForControlSize:NSRegularControlSize]]]; + [superview addSubview:button]; + return button; +} + +@class QT_MANGLE_NAMESPACE(QNSColorPanelDelegate); + +@interface QT_MANGLE_NAMESPACE(QNSColorPanelDelegate) : NSObject +{ + @public + NSColorPanel *mColorPanel; + QCocoaColorDialogHelper *mHelper; + NSView *mStolenContentView; + NSButton *mOkButton; + NSButton *mCancelButton; + QColor mQtColor; + NSInteger mResultCode; + BOOL mDialogIsExecuting; + BOOL mResultSet; +}; +- (void)relayout; +- (void)updateQtColor; +- (void)finishOffWithCode:(NSInteger)code; +@end + +@implementation QT_MANGLE_NAMESPACE(QNSColorPanelDelegate) + +- (id)initWithDialogHelper:(QCocoaColorDialogHelper *)helper +{ + self = [super init]; + mColorPanel = [NSColorPanel sharedColorPanel]; + mHelper = helper; + mResultCode = NSCancelButton; + mDialogIsExecuting = false; + mResultSet = false; + + if (mHelper->options()->testOption(QColorDialogOptions::NoButtons)) { + mStolenContentView = 0; + mOkButton = 0; + mCancelButton = 0; + } else { + // steal the color panel's contents view + mStolenContentView = [mColorPanel contentView]; + [mStolenContentView retain]; + [mColorPanel setContentView:0]; + + // create a new content view and add the stolen one as a subview + NSRect frameRect = { { 0.0, 0.0 }, { 0.0, 0.0 } }; + NSView *ourContentView = [[NSView alloc] initWithFrame:frameRect]; + [ourContentView addSubview:mStolenContentView]; + + // create OK and Cancel buttons and add these as subviews + mOkButton = macCreateButton("&OK", ourContentView); + mCancelButton = macCreateButton("Cancel", ourContentView); + + [mColorPanel setContentView:ourContentView]; + [mColorPanel setDefaultButtonCell:[mOkButton cell]]; + [self relayout]; + + [mOkButton setAction:@selector(onOkClicked)]; + [mOkButton setTarget:self]; + + [mCancelButton setAction:@selector(onCancelClicked)]; + [mCancelButton setTarget:self]; + } + + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(colorChanged:) + name:NSColorPanelColorDidChangeNotification + object:mColorPanel]; + + [mColorPanel retain]; + return self; +} + +- (void)dealloc +{ + if (mOkButton) { + NSView *ourContentView = [mColorPanel contentView]; + + // return stolen stuff to its rightful owner + [mStolenContentView removeFromSuperview]; + [mColorPanel setContentView:mStolenContentView]; + [mOkButton release]; + [mCancelButton release]; + [ourContentView release]; + } + + [mColorPanel setDelegate:nil]; + [[NSNotificationCenter defaultCenter] removeObserver:self]; + + [super dealloc]; +} + +- (void)closePanel +{ + [mColorPanel close]; +} + +- (void)windowDidResize:(NSNotification *)notification +{ + Q_UNUSED(notification); + [self relayout]; +} + +- (void)colorChanged:(NSNotification *)notification +{ + Q_UNUSED(notification); + [self updateQtColor]; + emit mHelper->colorSelected(mQtColor); +} + +- (void)relayout +{ + if (!mOkButton) + return; + + NSRect rect = [[mStolenContentView superview] frame]; + + // should a priori be kept in sync with qfontdialog_mac.mm + const CGFloat ButtonMinWidth = 78.0; // 84.0 for Carbon + const CGFloat ButtonMinHeight = 32.0; + const CGFloat ButtonSpacing = 0.0; + const CGFloat ButtonTopMargin = 0.0; + const CGFloat ButtonBottomMargin = 7.0; + const CGFloat ButtonSideMargin = 9.0; + + [mOkButton sizeToFit]; + NSSize okSizeHint = [mOkButton frame].size; + + [mCancelButton sizeToFit]; + NSSize cancelSizeHint = [mCancelButton frame].size; + + const CGFloat ButtonWidth = qMin(qMax(ButtonMinWidth, + qMax(okSizeHint.width, cancelSizeHint.width)), + CGFloat((rect.size.width - 2.0 * ButtonSideMargin - ButtonSpacing) * 0.5)); + const CGFloat ButtonHeight = qMax(ButtonMinHeight, + qMax(okSizeHint.height, cancelSizeHint.height)); + + NSRect okRect = { { rect.size.width - ButtonSideMargin - ButtonWidth, + ButtonBottomMargin }, + { ButtonWidth, ButtonHeight } }; + [mOkButton setFrame:okRect]; + [mOkButton setNeedsDisplay:YES]; + + NSRect cancelRect = { { okRect.origin.x - ButtonSpacing - ButtonWidth, + ButtonBottomMargin }, + { ButtonWidth, ButtonHeight } }; + [mCancelButton setFrame:cancelRect]; + [mCancelButton setNeedsDisplay:YES]; + + const CGFloat Y = ButtonBottomMargin + ButtonHeight + ButtonTopMargin; + NSRect stolenCVRect = { { 0.0, Y }, + { rect.size.width, rect.size.height - Y } }; + [mStolenContentView setFrame:stolenCVRect]; + [mStolenContentView setNeedsDisplay:YES]; + + [[mStolenContentView superview] setNeedsDisplay:YES]; +} + +- (void)onOkClicked +{ + [mColorPanel close]; + [self updateQtColor]; + [self finishOffWithCode:NSOKButton]; +} + +- (void)onCancelClicked +{ + if (mOkButton) { + [mColorPanel close]; + mQtColor = QColor(); + [self finishOffWithCode:NSCancelButton]; + } +} + +- (void)updateQtColor +{ + NSColor *color = [mColorPanel color]; + NSString *colorSpaceName = [color colorSpaceName]; + if (colorSpaceName == NSDeviceCMYKColorSpace) { + CGFloat cyan = 0, magenta = 0, yellow = 0, black = 0, alpha = 0; + [color getCyan:&cyan magenta:&magenta yellow:&yellow black:&black alpha:&alpha]; + mQtColor.setCmykF(cyan, magenta, yellow, black, alpha); + } else if (colorSpaceName == NSCalibratedRGBColorSpace || colorSpaceName == NSDeviceRGBColorSpace) { + CGFloat red = 0, green = 0, blue = 0, alpha = 0; + [color getRed:&red green:&green blue:&blue alpha:&alpha]; + mQtColor.setRgbF(red, green, blue, alpha); + } else if (colorSpaceName == NSNamedColorSpace) { + NSColor *tmpColor = [color colorUsingColorSpaceName:NSCalibratedRGBColorSpace]; + CGFloat red = 0, green = 0, blue = 0, alpha = 0; + [tmpColor getRed:&red green:&green blue:&blue alpha:&alpha]; + mQtColor.setRgbF(red, green, blue, alpha); + } else { + NSColorSpace *colorSpace = [color colorSpace]; + if ([colorSpace colorSpaceModel] == NSCMYKColorSpaceModel && [color numberOfComponents] == 5){ + CGFloat components[5]; + [color getComponents:components]; + mQtColor.setCmykF(components[0], components[1], components[2], components[3], components[4]); + } else { + NSColor *tmpColor = [color colorUsingColorSpaceName:NSCalibratedRGBColorSpace]; + CGFloat red = 0, green = 0, blue = 0, alpha = 0; + [tmpColor getRed:&red green:&green blue:&blue alpha:&alpha]; + mQtColor.setRgbF(red, green, blue, alpha); + } + } + emit mHelper->currentColorChanged(mQtColor); +} + +- (void)showModelessPanel +{ + mDialogIsExecuting = false; + [mColorPanel makeKeyAndOrderFront:mColorPanel]; +} + +- (BOOL)runApplicationModalPanel +{ + mDialogIsExecuting = true; + [mColorPanel setDelegate:self]; + [mColorPanel setContinuous:YES]; + [NSApp runModalForWindow:mColorPanel]; + return (mResultCode == NSOKButton); +} + +- (QT_PREPEND_NAMESPACE(QPlatformDialogHelper::DialogCode))dialogResultCode +{ + return (mResultCode == NSOKButton) ? QT_PREPEND_NAMESPACE(QPlatformDialogHelper::Accepted) : QT_PREPEND_NAMESPACE(QPlatformDialogHelper::Rejected); +} + +- (BOOL)windowShouldClose:(id)window +{ + Q_UNUSED(window); + if (!mOkButton) + [self updateQtColor]; + if (mDialogIsExecuting) { + [self finishOffWithCode:NSCancelButton]; + } else { + mResultSet = true; + emit mHelper->reject(); + } + return true; +} + +- (void)finishOffWithCode:(NSInteger)code +{ + mResultCode = code; + if (mDialogIsExecuting) { + // We stop the current modal event loop. The control + // will then return inside -(void)exec below. + // It's important that the modal event loop is stopped before + // we accept/reject QColorDialog, since QColorDialog has its + // own event loop that needs to be stopped last. + [NSApp stopModalWithCode:code]; + } else { + // Since we are not in a modal event loop, we can safely close + // down QColorDialog + // Calling accept() or reject() can in turn call closeCocoaColorPanel. + // This check will prevent any such recursion. + if (!mResultSet) { + mResultSet = true; + if (mResultCode == NSCancelButton) { + emit mHelper->reject(); + } else { + emit mHelper->accept(); + } + } + } +} + +@end + +QT_BEGIN_NAMESPACE + +QCocoaColorDialogHelper::QCocoaColorDialogHelper() : + mDelegate(0) +{ +} + +QCocoaColorDialogHelper::~QCocoaColorDialogHelper() +{ + deleteNativeDialog_sys(); +} + +void QCocoaColorDialogHelper::platformNativeDialogModalHelp() +{ + // Do a queued meta-call to open the native modal dialog so it opens after the new + // event loop has started to execute (in QDialog::exec). Using a timer rather than + // a queued meta call is intentional to ensure that the call is only delivered when + // [NSApp run] runs (timers are handeled special in cocoa). If NSApp is not + // running (which is the case if e.g a top-most QEventLoop has been + // interrupted, and the second-most event loop has not yet been reactivated (regardless + // if [NSApp run] is still on the stack)), showing a native modal dialog will fail. + QTimer::singleShot(1, this, SIGNAL(launchNativeAppModalPanel())); +} + +void QCocoaColorDialogHelper::_q_platformRunNativeAppModalPanel() +{ + // TODO: +#if 0 + QBoolBlocker nativeDialogOnTop(QApplicationPrivate::native_modal_dialog_active); +#endif + QT_MANGLE_NAMESPACE(QNSColorPanelDelegate) *delegate = static_cast(mDelegate); + [delegate runApplicationModalPanel]; + if (dialogResultCode_sys() == QPlatformDialogHelper::Accepted) + emit accept(); + else + emit reject(); +} + +void QCocoaColorDialogHelper::deleteNativeDialog_sys() +{ + if (!mDelegate) + return; + [reinterpret_cast(mDelegate) release]; + mDelegate = 0; +} + +bool QCocoaColorDialogHelper::show_sys(QFlags, Qt::WindowFlags, QWindow *parent) +{ + return showCocoaColorPanel(parent); +} + +void QCocoaColorDialogHelper::hide_sys() +{ + if (!mDelegate) + return; + [reinterpret_cast(mDelegate)->mColorPanel close]; +} + +QCocoaColorDialogHelper::DialogCode QCocoaColorDialogHelper::dialogResultCode_sys() +{ + QT_MANGLE_NAMESPACE(QNSColorPanelDelegate) *delegate = static_cast(mDelegate); + return [delegate dialogResultCode]; +} + +void QCocoaColorDialogHelper::setCurrentColor_sys(const QColor &color) +{ + if (!mDelegate) + createNSColorPanelDelegate(); + QT_MANGLE_NAMESPACE(QNSColorPanelDelegate) *delegate = static_cast(mDelegate); + NSColor *nsColor; + const QColor::Spec spec = color.spec(); + if (spec == QColor::Cmyk) { + nsColor = [NSColor colorWithDeviceCyan:color.cyanF() + magenta:color.magentaF() + yellow:color.yellowF() + black:color.blackF() + alpha:color.alphaF()]; + } else { + nsColor = [NSColor colorWithCalibratedRed:color.redF() + green:color.greenF() + blue:color.blueF() + alpha:color.alphaF()]; + } + delegate->mQtColor = color; + [delegate->mColorPanel setColor:nsColor]; +} + +QColor QCocoaColorDialogHelper::currentColor_sys() const +{ + return reinterpret_cast(mDelegate)->mQtColor; +} + +void QCocoaColorDialogHelper::createNSColorPanelDelegate() +{ + if (mDelegate) + return; + + QT_MANGLE_NAMESPACE(QNSColorPanelDelegate) *delegate = [[QT_MANGLE_NAMESPACE(QNSColorPanelDelegate) alloc] + initWithDialogHelper:this]; + + mDelegate = delegate; +} + +bool QCocoaColorDialogHelper::showCocoaColorPanel(QWindow *parent) +{ + Q_UNUSED(parent); + createNSColorPanelDelegate(); + QT_MANGLE_NAMESPACE(QNSColorPanelDelegate) *delegate = static_cast(mDelegate); + [delegate->mColorPanel setShowsAlpha:options()->testOption(QColorDialogOptions::ShowAlphaChannel)]; + [delegate showModelessPanel]; + return true; +} + +bool QCocoaColorDialogHelper::hideCocoaColorPanel() +{ + if (!mDelegate){ + return false; + } else { + QT_MANGLE_NAMESPACE(QNSColorPanelDelegate) *delegate = static_cast(mDelegate); + [delegate closePanel]; + return true; + } +} + +QT_END_NAMESPACE + +#endif // QT_NO_COLORDIALOG diff --git a/src/plugins/platforms/cocoa/qcocoaeventdispatcher.mm b/src/plugins/platforms/cocoa/qcocoaeventdispatcher.mm index 6de22cf58cb..305a8ddc953 100644 --- a/src/plugins/platforms/cocoa/qcocoaeventdispatcher.mm +++ b/src/plugins/platforms/cocoa/qcocoaeventdispatcher.mm @@ -569,6 +569,7 @@ bool QCocoaEventDispatcher::processEvents(QEventLoop::ProcessEventsFlags flags) } retVal = true; } else { + int lastSerialCopy = d->lastSerial; bool hadModalSession = d->currentModalSessionCached != 0; // We cannot block the thread (and run in a tight loop). // Instead we will process all current pending events and return. @@ -631,6 +632,14 @@ bool QCocoaEventDispatcher::processEvents(QEventLoop::ProcessEventsFlags flags) } } while (!d->interrupt && event != nil); + if ((flags & QEventLoop::WaitForMoreEvents) == 0) { + // when called "manually", always send posted events + d->processPostedEvents(); + } + + // be sure to return true if the posted event source fired + retVal = retVal || lastSerialCopy != d->lastSerial; + // Since the window that holds modality might have changed while processing // events, we we need to interrupt when we return back the previous process // event recursion to ensure that we spin the correct modal session. diff --git a/src/plugins/platforms/cocoa/qcocoafontdialoghelper.h b/src/plugins/platforms/cocoa/qcocoafontdialoghelper.h new file mode 100644 index 00000000000..8a914bf6329 --- /dev/null +++ b/src/plugins/platforms/cocoa/qcocoafontdialoghelper.h @@ -0,0 +1,82 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the QtGui module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QCOCOAFONTDIALOGHELPER_H +#define QCOCOAFONTDIALOGHELPER_H + +#include +#include + +QT_BEGIN_NAMESPACE + +class QFontDialog; +class QFontDialogPrivate; + +class QCocoaFontDialogHelper : public QPlatformFontDialogHelper +{ +public: + QCocoaFontDialogHelper(); + virtual ~QCocoaFontDialogHelper(); + + void platformNativeDialogModalHelp(); + void _q_platformRunNativeAppModalPanel(); + void deleteNativeDialog_sys(); + + bool show_sys(ShowFlags showFlags, Qt::WindowFlags windowFlags, QWindow *parent); + void hide_sys(); + + QPlatformDialogHelper::DialogCode dialogResultCode_sys(); + + void setCurrentFont_sys(const QFont &); + QFont currentFont_sys() const; + +protected: + void createNSFontPanelDelegate(); + bool showCocoaFontPanel(QWindow *parent); + bool hideCocoaFontPanel(); + +private: + void *mDelegate; +}; + +QT_END_NAMESPACE + +#endif // QCOCOAFONTDIALOGHELPER_H diff --git a/src/plugins/platforms/cocoa/qcocoafontdialoghelper.mm b/src/plugins/platforms/cocoa/qcocoafontdialoghelper.mm new file mode 100644 index 00000000000..d05a0156b13 --- /dev/null +++ b/src/plugins/platforms/cocoa/qcocoafontdialoghelper.mm @@ -0,0 +1,487 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the QtGui module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qcocoafontdialoghelper.h" + +#ifndef QT_NO_FONTDIALOG + +#include +#include +#include +#include + +#include +#include +#include + +#include "qcocoahelpers.h" + +#import + +#if !CGFLOAT_DEFINED +typedef float CGFloat; // Should only not be defined on 32-bit platforms +#endif + +QT_USE_NAMESPACE + +// should a priori be kept in sync with qcolordialog_mac.mm +const CGFloat ButtonMinWidth = 78.0; +const CGFloat ButtonMinHeight = 32.0; +const CGFloat ButtonSpacing = 0.0; +const CGFloat ButtonTopMargin = 0.0; +const CGFloat ButtonBottomMargin = 7.0; +const CGFloat ButtonSideMargin = 9.0; + +// looks better with some margins +const CGFloat DialogTopMargin = 7.0; +const CGFloat DialogSideMargin = 9.0; + +static NSButton *macCreateButton(const char *text, NSView *superview) +{ + static const NSRect buttonFrameRect = { { 0.0, 0.0 }, { 0.0, 0.0 } }; + + NSButton *button = [[NSButton alloc] initWithFrame:buttonFrameRect]; + [button setButtonType:NSMomentaryLightButton]; + [button setBezelStyle:NSRoundedBezelStyle]; + [button setTitle:(NSString*)(CFStringRef)QCFString(QDialogButtonBox::tr(text) + .remove(QLatin1Char('&')))]; + [[button cell] setFont:[NSFont systemFontOfSize: + [NSFont systemFontSizeForControlSize:NSRegularControlSize]]]; + [superview addSubview:button]; + return button; +} + +static QFont qfontForCocoaFont(NSFont *cocoaFont, const QFont &resolveFont) +{ + QFont newFont; + if (cocoaFont) { + int pSize = qRound([cocoaFont pointSize]); + QString family(QCFString::toQString([cocoaFont familyName])); + QString typeface(QCFString::toQString([cocoaFont fontName])); + + int hyphenPos = typeface.indexOf(QLatin1Char('-')); + if (hyphenPos != -1) { + typeface.remove(0, hyphenPos + 1); + } else { + typeface = QLatin1String("Normal"); + } + + newFont = QFontDatabase().font(family, typeface, pSize); + newFont.setUnderline(resolveFont.underline()); + newFont.setStrikeOut(resolveFont.strikeOut()); + + } + return newFont; +} + +@class QT_MANGLE_NAMESPACE(QNSFontPanelDelegate); + +@interface QT_MANGLE_NAMESPACE(QNSFontPanelDelegate) : NSObject +{ + @public + NSFontPanel *mFontPanel; + QCocoaFontDialogHelper *mHelper; + NSView *mStolenContentView; + NSButton *mOkButton; + NSButton *mCancelButton; + QFont mQtFont; + NSInteger mResultCode; + BOOL mDialogIsExecuting; + BOOL mResultSet; +}; +- (void)relayout; +- (void)relayoutToContentSize:(NSSize)frameSize; +- (void)updateQtFont; +- (void)changeFont:(id)sender; +- (void)finishOffWithCode:(NSInteger)code; +@end + +@implementation QT_MANGLE_NAMESPACE(QNSFontPanelDelegate) + +- (id)initWithDialogHelper: + (QCocoaFontDialogHelper *)helper +{ + self = [super init]; + mFontPanel = [NSFontPanel sharedFontPanel]; + mHelper = helper; + mResultCode = NSCancelButton; + mDialogIsExecuting = false; + mResultSet = false; + + [mFontPanel setTitle:QCFString::toNSString(helper->options()->windowTitle())]; + + if (mHelper->options()->testOption(QFontDialogOptions::NoButtons)) { + mStolenContentView = 0; + mOkButton = 0; + mCancelButton = 0; + } else { + // steal the font panel's contents view + mStolenContentView = [mFontPanel contentView]; + [mStolenContentView retain]; + [mFontPanel setContentView:0]; + + // create a new content view and add the stolen one as a subview + NSRect frameRect = { { 0.0, 0.0 }, { 0.0, 0.0 } }; + NSView *ourContentView = [[NSView alloc] initWithFrame:frameRect]; + [ourContentView addSubview:mStolenContentView]; + + // create OK and Cancel buttons and add these as subviews + mOkButton = macCreateButton("&OK", ourContentView); + mCancelButton = macCreateButton("Cancel", ourContentView); + + [mFontPanel setContentView:ourContentView]; + [mFontPanel setDefaultButtonCell:[mOkButton cell]]; + [self relayoutToContentSize:[[mStolenContentView superview] frame].size]; + + [mOkButton setAction:@selector(onOkClicked)]; + [mOkButton setTarget:self]; + + [mCancelButton setAction:@selector(onCancelClicked)]; + [mCancelButton setTarget:self]; + } + + [mFontPanel retain]; + return self; +} + +- (void)dealloc +{ + if (mOkButton) { + NSView *ourContentView = [mFontPanel contentView]; + + // return stolen stuff to its rightful owner + [mStolenContentView removeFromSuperview]; + [mFontPanel setContentView:mStolenContentView]; + [mOkButton release]; + [mCancelButton release]; + [ourContentView release]; + } + + [mFontPanel setDelegate:nil]; + [[NSNotificationCenter defaultCenter] removeObserver:self]; + + [super dealloc]; +} + +- (void)closePanel +{ + [mFontPanel close]; +} + +- (void)windowDidResize:(NSNotification *)notification +{ + Q_UNUSED(notification); + if (mOkButton) + [self relayout]; +} + +- (void)relayout +{ + [self relayoutToContentSize:[[mStolenContentView superview] frame].size]; +} + +- (void)relayoutToContentSize:(NSSize)frameSize +{ + Q_ASSERT(mOkButton); + + [mOkButton sizeToFit]; + NSSize okSizeHint = [mOkButton frame].size; + + [mCancelButton sizeToFit]; + NSSize cancelSizeHint = [mCancelButton frame].size; + + const CGFloat ButtonWidth = qMin(qMax(ButtonMinWidth, + qMax(okSizeHint.width, cancelSizeHint.width)), + CGFloat((frameSize.width - 2.0 * ButtonSideMargin - ButtonSpacing) * 0.5)); + const CGFloat ButtonHeight = qMax(ButtonMinHeight, + qMax(okSizeHint.height, cancelSizeHint.height)); + + const CGFloat X = DialogSideMargin; + const CGFloat Y = ButtonBottomMargin + ButtonHeight + ButtonTopMargin; + + NSRect okRect = { { frameSize.width - ButtonSideMargin - ButtonWidth, + ButtonBottomMargin }, + { ButtonWidth, ButtonHeight } }; + [mOkButton setFrame:okRect]; + [mOkButton setNeedsDisplay:YES]; + + NSRect cancelRect = { { okRect.origin.x - ButtonSpacing - ButtonWidth, + ButtonBottomMargin }, + { ButtonWidth, ButtonHeight } }; + [mCancelButton setFrame:cancelRect]; + [mCancelButton setNeedsDisplay:YES]; + + NSRect stolenCVRect = { { X, Y }, + { frameSize.width - X - X, frameSize.height - Y - DialogTopMargin } }; + [mStolenContentView setFrame:stolenCVRect]; + [mStolenContentView setNeedsDisplay:YES]; + + [[mStolenContentView superview] setNeedsDisplay:YES]; +} + + +- (void)onOkClicked +{ + [mFontPanel close]; + [self finishOffWithCode:NSOKButton]; +} + +- (void)onCancelClicked +{ + if (mOkButton) { + [mFontPanel close]; + mQtFont = QFont(); + [self finishOffWithCode:NSCancelButton]; + } +} + +- (void)changeFont:(id)sender +{ + Q_UNUSED(sender); + [self updateQtFont]; +} + +- (void)updateQtFont +{ + // Get selected font + NSFontManager *fontManager = [NSFontManager sharedFontManager]; + NSFont *selectedFont = [fontManager selectedFont]; + if (selectedFont == nil) { + selectedFont = [NSFont systemFontOfSize:[NSFont systemFontSize]]; + } + NSFont *panelFont = [fontManager convertFont:selectedFont]; + mQtFont = qfontForCocoaFont(panelFont, mQtFont); + + emit mHelper->currentFontChanged(mQtFont); +} + +- (void)showModelessPanel +{ + mDialogIsExecuting = false; + [mFontPanel makeKeyAndOrderFront:mFontPanel]; +} + +- (BOOL)runApplicationModalPanel +{ + mDialogIsExecuting = true; + [mFontPanel setDelegate:self]; + [NSApp runModalForWindow:mFontPanel]; + return (mResultCode == NSOKButton); +} + +- (QT_PREPEND_NAMESPACE(QPlatformDialogHelper::DialogCode))dialogResultCode +{ + return (mResultCode == NSOKButton) ? QT_PREPEND_NAMESPACE(QPlatformDialogHelper::Accepted) : QT_PREPEND_NAMESPACE(QPlatformDialogHelper::Rejected); +} + +- (BOOL)windowShouldClose:(id)window +{ + Q_UNUSED(window); + if (!mOkButton) + [self updateQtFont]; + if (mDialogIsExecuting) { + [self finishOffWithCode:NSCancelButton]; + } else { + mResultSet = true; + emit mHelper->reject(); + } + return true; +} + +- (void)finishOffWithCode:(NSInteger)code +{ + mResultCode = code; + if (mDialogIsExecuting) { + // We stop the current modal event loop. The control + // will then return inside -(void)exec below. + // It's important that the modal event loop is stopped before + // we accept/reject QFontDialog, since QFontDialog has its + // own event loop that needs to be stopped last. + [NSApp stopModalWithCode:code]; + } else { + // Since we are not in a modal event loop, we can safely close + // down QFontDialog + // Calling accept() or reject() can in turn call closeCocoaFontPanel. + // This check will prevent any such recursion. + if (!mResultSet) { + mResultSet = true; + if (mResultCode == NSCancelButton) { + emit mHelper->reject(); + } else { + emit mHelper->accept(); + } + } + } +} + +@end + +QT_BEGIN_NAMESPACE + +QCocoaFontDialogHelper::QCocoaFontDialogHelper() : + mDelegate(0) +{ +} + +QCocoaFontDialogHelper::~QCocoaFontDialogHelper() +{ + deleteNativeDialog_sys(); +} + +void QCocoaFontDialogHelper::platformNativeDialogModalHelp() +{ + // Do a queued meta-call to open the native modal dialog so it opens after the new + // event loop has started to execute (in QDialog::exec). Using a timer rather than + // a queued meta call is intentional to ensure that the call is only delivered when + // [NSApp run] runs (timers are handeled special in cocoa). If NSApp is not + // running (which is the case if e.g a top-most QEventLoop has been + // interrupted, and the second-most event loop has not yet been reactivated (regardless + // if [NSApp run] is still on the stack)), showing a native modal dialog will fail. + QTimer::singleShot(1, this, SIGNAL(launchNativeAppModalPanel())); +} + +void QCocoaFontDialogHelper::_q_platformRunNativeAppModalPanel() +{ + // TODO: +#if 0 + QBoolBlocker nativeDialogOnTop(QApplicationPrivate::native_modal_dialog_active); +#endif + QT_MANGLE_NAMESPACE(QNSFontPanelDelegate) *delegate = static_cast(mDelegate); + [delegate runApplicationModalPanel]; + if (dialogResultCode_sys() == QPlatformDialogHelper::Accepted) + emit accept(); + else + emit reject(); +} + +void QCocoaFontDialogHelper::deleteNativeDialog_sys() +{ + if (!mDelegate) + return; + [reinterpret_cast(mDelegate) release]; + mDelegate = 0; +} + +bool QCocoaFontDialogHelper::show_sys(QFlags, Qt::WindowFlags, QWindow *parent) +{ + return showCocoaFontPanel(parent); +} + +void QCocoaFontDialogHelper::hide_sys() +{ + if (!mDelegate) + return; + [reinterpret_cast(mDelegate)->mFontPanel close]; +} + +QCocoaFontDialogHelper::DialogCode QCocoaFontDialogHelper::dialogResultCode_sys() +{ + QT_MANGLE_NAMESPACE(QNSFontPanelDelegate) *delegate = static_cast(mDelegate); + return [delegate dialogResultCode]; +} + +void QCocoaFontDialogHelper::setCurrentFont_sys(const QFont &font) +{ + NSFontManager *mgr = [NSFontManager sharedFontManager]; + const NSFont *nsFont = 0; + + int weight = 5; + NSFontTraitMask mask = 0; + if (font.style() == QFont::StyleItalic) { + mask |= NSItalicFontMask; + } + if (font.weight() == QFont::Bold) { + weight = 9; + mask |= NSBoldFontMask; + } + + QFontInfo fontInfo(font); + nsFont = [mgr fontWithFamily:QCFString::toNSString(fontInfo.family()) + traits:mask + weight:weight + size:fontInfo.pointSize()]; + + if (!mDelegate) + createNSFontPanelDelegate(); + + [mgr setSelectedFont:const_cast(nsFont) isMultiple:NO]; + static_cast(mDelegate)->mQtFont = font; +} + +QFont QCocoaFontDialogHelper::currentFont_sys() const +{ + return reinterpret_cast(mDelegate)->mQtFont; +} + +void QCocoaFontDialogHelper::createNSFontPanelDelegate() +{ + if (mDelegate) + return; + + QT_MANGLE_NAMESPACE(QNSFontPanelDelegate) *delegate = [[QT_MANGLE_NAMESPACE(QNSFontPanelDelegate) alloc] + initWithDialogHelper:this]; + + mDelegate = delegate; +} + +bool QCocoaFontDialogHelper::showCocoaFontPanel(QWindow *parent) +{ + Q_UNUSED(parent); + createNSFontPanelDelegate(); + QT_MANGLE_NAMESPACE(QNSFontPanelDelegate) *delegate = static_cast(mDelegate); + [delegate showModelessPanel]; + return true; +} + +bool QCocoaFontDialogHelper::hideCocoaFontPanel() +{ + if (!mDelegate){ + return false; + } else { + QT_MANGLE_NAMESPACE(QNSFontPanelDelegate) *delegate = static_cast(mDelegate); + [delegate closePanel]; + return true; + } +} + +QT_END_NAMESPACE + +#endif // QT_NO_FONTDIALOG diff --git a/src/plugins/platforms/cocoa/qcocoahelpers.mm b/src/plugins/platforms/cocoa/qcocoahelpers.mm index f9b62c7a71e..29c505e1aba 100644 --- a/src/plugins/platforms/cocoa/qcocoahelpers.mm +++ b/src/plugins/platforms/cocoa/qcocoahelpers.mm @@ -45,6 +45,7 @@ #include #include +#include #include QT_BEGIN_NAMESPACE diff --git a/src/plugins/platforms/cocoa/qcocoatheme.h b/src/plugins/platforms/cocoa/qcocoatheme.h index 08f813b9066..a7dc9739375 100644 --- a/src/plugins/platforms/cocoa/qcocoatheme.h +++ b/src/plugins/platforms/cocoa/qcocoatheme.h @@ -59,6 +59,8 @@ public: bool usePlatformNativeDialog(DialogType dialogType) const; QPlatformDialogHelper *createPlatformDialogHelper(DialogType dialogType) const; + + QVariant themeHint(ThemeHint hint) const; }; QT_END_NAMESPACE diff --git a/src/plugins/platforms/cocoa/qcocoatheme.mm b/src/plugins/platforms/cocoa/qcocoatheme.mm index f0e58abebd6..ad20c2fb27d 100644 --- a/src/plugins/platforms/cocoa/qcocoatheme.mm +++ b/src/plugins/platforms/cocoa/qcocoatheme.mm @@ -42,8 +42,9 @@ #include "qcocoatheme.h" #include "qmenu_mac.h" +#include "qcocoacolordialoghelper.h" #include "qcocoafiledialoghelper.h" -#include +#include "qcocoafontdialoghelper.h" QT_BEGIN_NAMESPACE @@ -72,15 +73,45 @@ bool QCocoaTheme::usePlatformNativeDialog(DialogType dialogType) const { if (dialogType == QPlatformTheme::FileDialog) return true; +#ifndef QT_NO_COLORDIALOG + if (dialogType == QPlatformTheme::ColorDialog) + return true; +#endif +#ifndef QT_NO_FONTDIALOG + if (dialogType == QPlatformTheme::FontDialog) + return true; +#endif return false; } QPlatformDialogHelper * QCocoaTheme::createPlatformDialogHelper(DialogType dialogType) const { - if (dialogType == QPlatformTheme::FileDialog) { + switch (dialogType) { + case QPlatformTheme::FileDialog: return new QCocoaFileDialogHelper(); +#ifndef QT_NO_COLORDIALOG + case QPlatformTheme::ColorDialog: + return new QCocoaColorDialogHelper(); +#endif +#ifndef QT_NO_FONTDIALOG + case QPlatformTheme::FontDialog: + return new QCocoaFontDialogHelper(); +#endif + default: + return 0; + } +} + +QVariant QCocoaTheme::themeHint(ThemeHint hint) const +{ + switch (hint) { + case QPlatformTheme::StyleNames: + return QStringList() << QLatin1Literal("macintosh"); + break; + default: + return QPlatformTheme::themeHint(hint); + break; } - return 0; } QT_END_NAMESPACE diff --git a/src/plugins/platforms/cocoa/qt_mac_p.h b/src/plugins/platforms/cocoa/qt_mac_p.h index 947097294ae..8e94880c5af 100644 --- a/src/plugins/platforms/cocoa/qt_mac_p.h +++ b/src/plugins/platforms/cocoa/qt_mac_p.h @@ -80,16 +80,6 @@ class QDragMoveEvent; /* Event masks */ // internal Qt types - // Event class for our own Carbon events. -#if defined(QT_NAMESPACE) && defined(QT_NAMESPACE_MAC_CRC) -// Take the CRC we generated at configure time. This *may* result in a -// collision with another value If that is the case, please change the value -// here to something other than 'Cute'. -const UInt32 kEventClassQt = QT_NAMESPACE_MAC_CRC; -#else -const UInt32 kEventClassQt = 'Cute'; -#endif - enum { //AE types typeAEClipboardChanged = 1, diff --git a/src/plugins/platforms/minimal/main.cpp b/src/plugins/platforms/minimal/main.cpp index 4d3b3a1362f..8a6e8fb4b09 100644 --- a/src/plugins/platforms/minimal/main.cpp +++ b/src/plugins/platforms/minimal/main.cpp @@ -47,6 +47,8 @@ QT_BEGIN_NAMESPACE class QMinimalIntegrationPlugin : public QPlatformIntegrationPlugin { + Q_OBJECT + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QPlatformIntegrationFactoryInterface" FILE "minimal.json") public: QStringList keys() const; QPlatformIntegration *create(const QString&, const QStringList&); @@ -68,6 +70,6 @@ QPlatformIntegration *QMinimalIntegrationPlugin::create(const QString& system, c return 0; } -Q_EXPORT_PLUGIN2(minimal, QMinimalIntegrationPlugin) - QT_END_NAMESPACE + +#include "main.moc" diff --git a/src/plugins/platforms/minimal/minimal.json b/src/plugins/platforms/minimal/minimal.json new file mode 100644 index 00000000000..d3cf684b62a --- /dev/null +++ b/src/plugins/platforms/minimal/minimal.json @@ -0,0 +1,3 @@ +{ + "Keys": [ "minimal" ] +} diff --git a/src/plugins/platforms/minimal/minimal.pro b/src/plugins/platforms/minimal/minimal.pro index 392d12d19a5..6430ccde753 100644 --- a/src/plugins/platforms/minimal/minimal.pro +++ b/src/plugins/platforms/minimal/minimal.pro @@ -10,5 +10,7 @@ SOURCES = main.cpp \ HEADERS = qminimalintegration.h \ qminimalbackingstore.h +OTHER_FILES += minimal.json + target.path += $$[QT_INSTALL_PLUGINS]/platforms INSTALLS += target diff --git a/src/plugins/platforms/minimal/qminimalbackingstore.cpp b/src/plugins/platforms/minimal/qminimalbackingstore.cpp index b6b9c0e9798..5336dbf3bd2 100644 --- a/src/plugins/platforms/minimal/qminimalbackingstore.cpp +++ b/src/plugins/platforms/minimal/qminimalbackingstore.cpp @@ -43,6 +43,7 @@ #include "qminimalbackingstore.h" #include "qscreen.h" #include +#include #include QT_BEGIN_NAMESPACE @@ -53,7 +54,7 @@ QMinimalBackingStore::QMinimalBackingStore(QWindow *window) if (QT_PREPEND_NAMESPACE(qgetenv)("QT_DEBUG_BACKINGSTORE").toInt() > 0) mDebug = true; if (mDebug) - qDebug() << "QMinimalBackingStore::QMinimalBackingStore:" << (long)this; + qDebug() << "QMinimalBackingStore::QMinimalBackingStore:" << (quintptr)this; } QMinimalBackingStore::~QMinimalBackingStore() diff --git a/src/plugins/platforms/windows/main.cpp b/src/plugins/platforms/windows/main.cpp index d54a1dbb893..f16eff54497 100644 --- a/src/plugins/platforms/windows/main.cpp +++ b/src/plugins/platforms/windows/main.cpp @@ -100,6 +100,8 @@ QT_BEGIN_NAMESPACE class QWindowsIntegrationPlugin : public QPlatformIntegrationPlugin { + Q_OBJECT + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QPlatformIntegrationFactoryInterface" FILE "windows.json") public: QStringList keys() const; QPlatformIntegration *create(const QString&, const QStringList&); @@ -118,6 +120,6 @@ QPlatformIntegration *QWindowsIntegrationPlugin::create(const QString& system, c return 0; } -Q_EXPORT_PLUGIN2(windows, QWindowsIntegrationPlugin) - QT_END_NAMESPACE + +#include "main.moc" diff --git a/src/plugins/platforms/windows/qtwindows_additional.h b/src/plugins/platforms/windows/qtwindows_additional.h index 864107e392d..d82240255e6 100644 --- a/src/plugins/platforms/windows/qtwindows_additional.h +++ b/src/plugins/platforms/windows/qtwindows_additional.h @@ -45,6 +45,10 @@ #include // get compiler define #include +#ifndef WM_THEMECHANGED +# define WM_THEMECHANGED 0x031A +#endif + /* Complement the definitions and declarations missing * when using MinGW or older Windows SDKs. */ @@ -66,6 +70,11 @@ #define IFACEMETHODIMP STDMETHODIMP #define IFACEMETHODIMP_(type) STDMETHODIMP_(type) +#if !defined(__MINGW64_VERSION_MAJOR) + +#define STATE_SYSTEM_HASPOPUP 0x40000000 +#define STATE_SYSTEM_PROTECTED 0x20000000 + typedef struct tagUPDATELAYEREDWINDOWINFO { DWORD cbSize; HDC hdcDst; @@ -79,6 +88,8 @@ typedef struct tagUPDATELAYEREDWINDOWINFO { const RECT *prcDirty; } UPDATELAYEREDWINDOWINFO, *PUPDATELAYEREDWINDOWINFO; +#endif // if !defined(__MINGW64_VERSION_MAJOR) + // OpenGL Pixelformat flags. #define PFD_SUPPORT_DIRECTDRAW 0x00002000 #define PFD_DIRECT3D_ACCELERATED 0x00004000 diff --git a/src/plugins/platforms/windows/qtwindowsglobal.h b/src/plugins/platforms/windows/qtwindowsglobal.h index f0443622993..27cfbdc662d 100644 --- a/src/plugins/platforms/windows/qtwindowsglobal.h +++ b/src/plugins/platforms/windows/qtwindowsglobal.h @@ -60,7 +60,8 @@ enum KeyDownEventFlag = 0x200000, TouchEventFlag = 0x400000, ClipboardEventFlag = 0x800000, - ApplicationEventFlag = 0x1000000 + ApplicationEventFlag = 0x1000000, + ThemingEventFlag = 0x2000000 }; enum WindowsEventType // Simplify event types @@ -77,6 +78,8 @@ enum WindowsEventType // Simplify event types ResizeEvent = WindowEventFlag + 12, QuerySizeHints = WindowEventFlag + 15, CalculateSize = WindowEventFlag + 16, + FocusInEvent = WindowEventFlag + 17, + FocusOutEvent = WindowEventFlag + 18, MouseEvent = MouseEventFlag + 1, MouseWheelEvent = MouseEventFlag + 2, TouchEvent = TouchEventFlag + 1, @@ -95,6 +98,7 @@ enum WindowsEventType // Simplify event types InputMethodOpenCandidateWindowEvent = InputMethodEventFlag + 4, InputMethodCloseCandidateWindowEvent = InputMethodEventFlag + 5, InputMethodRequest = InputMethodEventFlag + 6, + ThemeChanged = ThemingEventFlag + 1, DisplayChangedEvent = 437, UnknownEvent = 542 }; @@ -170,8 +174,14 @@ inline QtWindows::WindowsEventType windowsEventType(UINT message, WPARAM wParamI } case WM_GETOBJECT: return QtWindows::AccessibleObjectFromWindowRequest; + case WM_SETFOCUS: + return QtWindows::FocusInEvent; + case WM_KILLFOCUS: + return QtWindows::FocusOutEvent; case WM_DISPLAYCHANGE: return QtWindows::DisplayChangedEvent; + case WM_THEMECHANGED: + return QtWindows::ThemeChanged; default: break; } diff --git a/src/plugins/platforms/windows/qwindowsaccessibility.cpp b/src/plugins/platforms/windows/qwindowsaccessibility.cpp index 2678fd7f23c..3ef21fa0b7b 100644 --- a/src/plugins/platforms/windows/qwindowsaccessibility.cpp +++ b/src/plugins/platforms/windows/qwindowsaccessibility.cpp @@ -69,7 +69,7 @@ #include #if !defined(WINABLEAPI) -# if defined(Q_WS_WINCE) +# if defined(Q_OS_WINCE) # include # endif # include @@ -80,10 +80,12 @@ #include #endif -#ifdef Q_WS_WINCE +#ifdef Q_OS_WINCE #include "qguifunctions_wince.h" #endif +#include "qtwindows_additional.h" + QT_BEGIN_NAMESPACE //#define DEBUG_SHOW_ATCLIENT_COMMANDS @@ -988,6 +990,17 @@ HRESULT STDMETHODCALLTYPE QWindowsAccessible::get_accKeyboardShortcut(VARIANT va return *pszKeyboardShortcut ? S_OK : S_FALSE; } +static QAccessibleInterface *relatedInterface(QAccessibleInterface *iface, QAccessible::RelationFlag flag) +{ + typedef QPair RelationPair; + QVector rels = iface->relations(flag); + + for (int i = 1; i < rels.count(); ++i) + delete rels.at(i).first; + + return rels.value(0).first; +} + // moz: [important] HRESULT STDMETHODCALLTYPE QWindowsAccessible::get_accName(VARIANT varID, BSTR* pszName) { @@ -1001,8 +1014,20 @@ HRESULT STDMETHODCALLTYPE QWindowsAccessible::get_accName(VARIANT varID, BSTR* p if (!child) return E_FAIL; name = child->text(QAccessible::Name); + if (name.isEmpty()) { + if (QAccessibleInterface *labelInterface = relatedInterface(child.data(), QAccessible::Label)) { + name = labelInterface->text(QAccessible::Name); + delete labelInterface; + } + } } else { name = accessible->text(QAccessible::Name); + if (name.isEmpty()) { + if (QAccessibleInterface *labelInterface = relatedInterface(accessible, QAccessible::Label)) { + name = labelInterface->text(QAccessible::Name); + delete labelInterface; + } + } } if (name.size()) { *pszName = QStringToBSTR(name); @@ -1189,29 +1214,18 @@ HRESULT STDMETHODCALLTYPE QWindowsAccessible::get_accFocus(VARIANT *pvarID) if (!accessible->isValid()) return E_FAIL; - QAccessibleInterface *acc = 0; - int control = accessible->navigate(QAccessible::FocusChild, 1, &acc); - if (control == -1) { - (*pvarID).vt = VT_EMPTY; - return S_FALSE; + if (QAccessibleInterface *acc = accessible->focusChild()) { + QWindowsAccessible* wacc = new QWindowsAccessible(acc); + IDispatch *iface = 0; + wacc->QueryInterface(IID_IDispatch, (void**)&iface); + if (iface) { + (*pvarID).vt = VT_DISPATCH; + (*pvarID).pdispVal = iface; + return S_OK; + } else { + delete wacc; + } } - if (!acc || control == 0) { - (*pvarID).vt = VT_I4; - (*pvarID).lVal = control ? control : CHILDID_SELF; - return S_OK; - } - - QWindowsAccessible* wacc = new QWindowsAccessible(acc); - IDispatch *iface = 0; - wacc->QueryInterface(IID_IDispatch, (void**)&iface); - if (iface) { - (*pvarID).vt = VT_DISPATCH; - (*pvarID).pdispVal = iface; - return S_OK; - } else { - delete wacc; - } - (*pvarID).vt = VT_EMPTY; return S_FALSE; } @@ -1355,7 +1369,7 @@ void QWindowsAccessibility::notifyAccessibilityUpdate(const QAccessibleEvent &ev typedef void (WINAPI *PtrNotifyWinEvent)(DWORD, HWND, LONG, LONG); -#if defined(Q_WS_WINCE) // ### TODO: check for NotifyWinEvent in CE 6.0 +#if defined(Q_OS_WINCE) // ### TODO: check for NotifyWinEvent in CE 6.0 // There is no user32.lib nor NotifyWinEvent for CE return; #else @@ -1393,7 +1407,7 @@ void QWindowsAccessibility::notifyAccessibilityUpdate(const QAccessibleEvent &ev ++eventNum; } -#endif // Q_WS_WINCE +#endif // Q_OS_WINCE } /* diff --git a/src/plugins/platforms/windows/qwindowsclipboard.cpp b/src/plugins/platforms/windows/qwindowsclipboard.cpp index 521ca3dc074..4f083e93d29 100644 --- a/src/plugins/platforms/windows/qwindowsclipboard.cpp +++ b/src/plugins/platforms/windows/qwindowsclipboard.cpp @@ -283,14 +283,17 @@ bool QWindowsClipboard::clipboardViewerWndProc(HWND hwnd, UINT message, WPARAM w } } return true; - case WM_DRAWCLIPBOARD: + case WM_DRAWCLIPBOARD: { + const bool owned = ownsClipboard(); if (QWindowsContext::verboseOLE) - qDebug("Clipboard changed"); - emitChanged(QClipboard::Clipboard); + qDebug("Clipboard changed owned %d", owned); + if (!owned) // changed is emitted by QClipboard in that case. + emitChanged(QClipboard::Clipboard); // clean up the clipboard object if we no longer own the clipboard - if (!ownsClipboard() && m_data) + if (!owned && m_data) releaseIData(); propagateClipboardMessage(message, wParam, lParam); + } return true; case WM_DESTROY: // Recommended shutdown @@ -326,13 +329,16 @@ void QWindowsClipboard::setMimeData(QMimeData *mimeData, QClipboard::Mode mode) const bool newData = !m_data || m_data->mimeData() != mimeData; if (newData) { releaseIData(); - m_data = new QWindowsOleDataObject(mimeData); + if (mimeData) + m_data = new QWindowsOleDataObject(mimeData); } const HRESULT src = OleSetClipboard(m_data); if (src != S_OK) { + QString mimeDataFormats = mimeData ? + mimeData->formats().join(QStringLiteral(", ")) : QString(QStringLiteral("NULL")); qErrnoWarning("OleSetClipboard: Failed to set mime data (%s) on clipboard: %s", - qPrintable(mimeData->formats().join(QStringLiteral(", "))), + qPrintable(mimeDataFormats), QWindowsContext::comErrorString(src).constData()); releaseIData(); return; diff --git a/src/plugins/platforms/windows/qwindowscontext.cpp b/src/plugins/platforms/windows/qwindowscontext.cpp index 5f7dfb1b10e..2706e02cf89 100644 --- a/src/plugins/platforms/windows/qwindowscontext.cpp +++ b/src/plugins/platforms/windows/qwindowscontext.cpp @@ -49,6 +49,7 @@ #include "qwindowsinputcontext.h" #include "qwindowsaccessibility.h" #include "qwindowsscreen.h" +#include "qwindowstheme.h" #include #include @@ -78,6 +79,7 @@ int QWindowsContext::verboseGL = 0; int QWindowsContext::verboseOLE = 0; int QWindowsContext::verboseInputMethods = 0; int QWindowsContext::verboseDialogs = 0; +int QWindowsContext::verboseTheming = 0; // Get verbosity of components from "foo:2,bar:3" static inline int componentVerbose(const char *v, const char *keyWord) @@ -284,6 +286,7 @@ QWindowsContext::QWindowsContext() : QWindowsContext::verboseOLE = componentVerbose(v, "ole"); QWindowsContext::verboseInputMethods = componentVerbose(v, "im"); QWindowsContext::verboseDialogs = componentVerbose(v, "dialogs"); + QWindowsContext::verboseTheming = componentVerbose(v, "theming"); } } @@ -676,10 +679,6 @@ bool QWindowsContext::windowsProc(HWND hwnd, UINT message, } // Events without an associated QWindow or events we are not interested in. switch (et) { - case QtWindows::DeactivateApplicationEvent: - case QtWindows::DeactivateWindowEvent: - QWindowSystemInterface::handleWindowActivated(0); - return true; case QtWindows::InputMethodStartCompositionEvent: return QWindowsInputContext::instance()->startComposition(hwnd); case QtWindows::InputMethodCompositionEvent: @@ -773,9 +772,12 @@ bool QWindowsContext::windowsProc(HWND hwnd, UINT message, return d->m_mouseHandler.translateMouseEvent(platformWindow->window(), hwnd, et, msg, result); case QtWindows::TouchEvent: return d->m_mouseHandler.translateTouchEvent(platformWindow->window(), hwnd, et, msg, result); - case QtWindows::ActivateWindowEvent: + case QtWindows::FocusInEvent: // see QWindowsWindow::requestActivateWindow(). QWindowSystemInterface::handleWindowActivated(platformWindow->window()); return true; + case QtWindows::FocusOutEvent: + QWindowSystemInterface::handleWindowActivated(0); + return true; case QtWindows::ShowEvent: platformWindow->handleShown(); return true; @@ -785,6 +787,9 @@ bool QWindowsContext::windowsProc(HWND hwnd, UINT message, case QtWindows::CloseEvent: QWindowSystemInterface::handleCloseEvent(platformWindow->window()); return true; + case QtWindows::ThemeChanged: // ### fixme: Compress these events? + QWindowsTheme::instance()->windowsThemeChanged(platformWindow->window()); + return true; default: break; } diff --git a/src/plugins/platforms/windows/qwindowscontext.h b/src/plugins/platforms/windows/qwindowscontext.h index b5a36c3fe9e..9f16ed232b5 100644 --- a/src/plugins/platforms/windows/qwindowscontext.h +++ b/src/plugins/platforms/windows/qwindowscontext.h @@ -121,6 +121,7 @@ public: static int verboseOLE; static int verboseInputMethods; static int verboseDialogs; + static int verboseTheming; explicit QWindowsContext(); ~QWindowsContext(); diff --git a/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp b/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp index f7863ae4277..25b93363615 100644 --- a/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp +++ b/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp @@ -43,6 +43,7 @@ #include "qwindowscontext.h" #include "qwindowswindow.h" +#include "qwindowstheme.h" // Color conversion helpers #include #include @@ -76,7 +77,12 @@ static const IID IID_IFileOpenDialog = {0xd57c7288, 0xd4ad, 0x4768, {0xbe, 0x02, 0x9d, 0x96, 0x95, 0x32, 0xd9, 0x60}}; static const IID IID_IFileSaveDialog = {0x84bccd23, 0x5fde, 0x4cdb,{0xae, 0xa4, 0xaf, 0x64, 0xb8, 0x3d, 0x78, 0xab}}; +#ifdef __MINGW64_VERSION_MAJOR +static const IID q_IID_IShellItem = {0x43826d1e, 0xe718, 0x42ee, {0xbc, 0x55, 0xa1, 0xe2, 0x61, 0xc3, 0x7b, 0xfe}}; +#define IID_IShellItem q_IID_IShellItem +#else static const IID IID_IShellItem = {0x43826d1e, 0xe718, 0x42ee, {0xbc, 0x55, 0xa1, 0xe2, 0x61, 0xc3, 0x7b, 0xfe}}; +#endif static const IID IID_IFileDialogEvents = {0x973510db, 0x7d7f, 0x452b,{0x89, 0x75, 0x74, 0xa8, 0x58, 0x28, 0xd3, 0x54}}; static const CLSID CLSID_FileOpenDialog = {0xdc1c5a9c, 0xe88a, 0x4dde, {0xa5, 0xa1, 0x60, 0xf8, 0x2a, 0x20, 0xae, 0xf7}}; static const CLSID CLSID_FileSaveDialog = {0xc0b4e2f3, 0xba21, 0x4773,{0x8d, 0xba, 0x33, 0x5e, 0xc9, 0x46, 0xeb, 0x8b}}; @@ -141,6 +147,7 @@ typedef enum { SIATTRIBFLAGS_APPCOMPAT = 0x3, SIATTRIBFLAGS_MASK = 0x3 } SIATTRIBFLAGS; +#ifndef __MINGW64_VERSION_MAJOR typedef enum { SIGDN_NORMALDISPLAY = 0x00000000, SIGDN_PARENTRELATIVEPARSING = 0x80018001, @@ -151,6 +158,7 @@ typedef enum { SIGDN_FILESYSPATH = 0x80058000, SIGDN_URL = 0x80068000 } SIGDN; +#endif typedef enum { FDAP_BOTTOM = 0x00000000, FDAP_TOP = 0x00000001 @@ -193,6 +201,7 @@ typedef struct { DECLARE_INTERFACE(IFileDialogEvents); +#ifndef __MINGW64_VERSION_MAJOR DECLARE_INTERFACE_(IShellItem, IUnknown) { STDMETHOD(BindToHandler)(THIS_ IBindCtx *pbc, REFGUID bhid, REFIID riid, void **ppv) PURE; @@ -201,6 +210,7 @@ DECLARE_INTERFACE_(IShellItem, IUnknown) STDMETHOD(GetAttributes)(THIS_ ULONG sfgaoMask, ULONG *psfgaoAttribs) PURE; STDMETHOD(Compare)(THIS_ IShellItem *psi, DWORD hint, int *piOrder) PURE; }; +#endif DECLARE_INTERFACE_(IShellItemFilter, IUnknown) { @@ -227,10 +237,12 @@ DECLARE_INTERFACE_(IShellItemArray, IUnknown) STDMETHOD(EnumItems)(THIS_ IEnumShellItems **ppenumShellItems) PURE; }; +#ifndef __MINGW64_VERSION_MAJOR DECLARE_INTERFACE_(IModalWindow, IUnknown) { STDMETHOD(Show)(THIS_ HWND hwndParent) PURE; }; +#endif DECLARE_INTERFACE_(IFileDialog, IModalWindow) { @@ -754,7 +766,7 @@ void QWindowsNativeFileDialogBase::setDirectory(const QString &directory) QString QWindowsNativeFileDialogBase::directory() const { IShellItem *item = 0; - return (SUCCEEDED(m_fileDialog) && item) ? + return (m_fileDialog && item) ? QWindowsNativeFileDialogBase::itemPath(item) : QString(); } @@ -1257,12 +1269,6 @@ QWindowsNativeColorDialog::QWindowsNativeColorDialog(const SharedPointerColor &c qFill(m_customColors, m_customColors + 16, COLORREF(0)); } -static inline COLORREF qColorToCOLORREF(const QColor &color) -{ return RGB(color.red(), color.green(), color.blue()); } - -static inline QColor COLORREFToQColor(COLORREF cr) -{ return QColor(GetRValue(cr), GetGValue(cr), GetBValue(cr)); } - void QWindowsNativeColorDialog::exec(HWND owner) { typedef BOOL (WINAPI *ChooseColorWType)(LPCHOOSECOLORW); diff --git a/src/plugins/platforms/windows/qwindowsfontdatabase.cpp b/src/plugins/platforms/windows/qwindowsfontdatabase.cpp index fa95f4f529a..1df985c8a78 100644 --- a/src/plugins/platforms/windows/qwindowsfontdatabase.cpp +++ b/src/plugins/platforms/windows/qwindowsfontdatabase.cpp @@ -329,6 +329,11 @@ static inline QFontDatabase::WritingSystem writingSystemFromScript(const QString return QFontDatabase::Any; } +extern bool localizedName(const QString &name); +extern QString getEnglishName(const QString &familyName); + +Q_GUI_EXPORT void qt_registerAliasToFontFamily(const QString &familyName, const QString &alias); + static bool addFontToDatabase(QString familyName, const QString &scriptName, const TEXTMETRIC *textmetric, const FONTSIGNATURE *signature, @@ -365,10 +370,10 @@ static bool addFontToDatabase(QString familyName, const QString &scriptName, << " stretch=" << stretch; } -/* Fixme: omitted for the moment - if(ttf && localizedName(familyName) && family->english_name.isEmpty()) - family->english_name = getEnglishName(familyName); -*/ + QString englishName; + if (ttf && localizedName(familyName)) + englishName = getEnglishName(familyName); + QSupportedWritingSystems writingSystems; if (type & TRUETYPE_FONTTYPE) { quint32 unicodeRange[4] = { @@ -405,6 +410,10 @@ static bool addFontToDatabase(QString familyName, const QString &scriptName, if (weight <= QFont::DemiBold && style != QFont::StyleItalic) QPlatformFontDatabase::registerFont(familyName, foundryName, QFont::Bold, QFont::StyleItalic, stretch, antialias, scalable, size, fixed, writingSystems, 0); + + if (!englishName.isEmpty()) + qt_registerAliasToFontFamily(familyName, englishName); + return true; } diff --git a/src/plugins/platforms/windows/qwindowsfontdatabase_ft.cpp b/src/plugins/platforms/windows/qwindowsfontdatabase_ft.cpp index f397e9cb922..031d6ad1a66 100644 --- a/src/plugins/platforms/windows/qwindowsfontdatabase_ft.cpp +++ b/src/plugins/platforms/windows/qwindowsfontdatabase_ft.cpp @@ -53,6 +53,8 @@ #include +QT_BEGIN_NAMESPACE + static inline QFontDatabase::WritingSystem writingSystemFromScript(const QString &scriptName) { if (scriptName == QStringLiteral("Western") @@ -100,6 +102,194 @@ static inline QFont::Weight weightFromInteger(long weight) return QFont::Black; } +#ifdef MAKE_TAG +#undef MAKE_TAG +#endif +// GetFontData expects the tags in little endian ;( +#define MAKE_TAG(ch1, ch2, ch3, ch4) (\ + (((quint32)(ch4)) << 24) | \ + (((quint32)(ch3)) << 16) | \ + (((quint32)(ch2)) << 8) | \ + ((quint32)(ch1)) \ + ) + +bool localizedName(const QString &name) +{ + const QChar *c = name.unicode(); + for (int i = 0; i < name.length(); ++i) { + if (c[i].unicode() >= 0x100) + return true; + } + return false; +} + +static inline quint16 getUShort(const unsigned char *p) +{ + quint16 val; + val = *p++ << 8; + val |= *p; + + return val; +} + +static QString getEnglishName(const uchar *table, quint32 bytes) +{ + QString i18n_name; + enum { + NameRecordSize = 12, + FamilyId = 1, + MS_LangIdEnglish = 0x009 + }; + + // get the name table + quint16 count; + quint16 string_offset; + const unsigned char *names; + + int microsoft_id = -1; + int apple_id = -1; + int unicode_id = -1; + + if (getUShort(table) != 0) + goto error; + + count = getUShort(table+2); + string_offset = getUShort(table+4); + names = table + 6; + + if (string_offset >= bytes || 6 + count*NameRecordSize > string_offset) + goto error; + + for (int i = 0; i < count; ++i) { + // search for the correct name entry + + quint16 platform_id = getUShort(names + i*NameRecordSize); + quint16 encoding_id = getUShort(names + 2 + i*NameRecordSize); + quint16 language_id = getUShort(names + 4 + i*NameRecordSize); + quint16 name_id = getUShort(names + 6 + i*NameRecordSize); + + if (name_id != FamilyId) + continue; + + enum { + PlatformId_Unicode = 0, + PlatformId_Apple = 1, + PlatformId_Microsoft = 3 + }; + + quint16 length = getUShort(names + 8 + i*NameRecordSize); + quint16 offset = getUShort(names + 10 + i*NameRecordSize); + if (DWORD(string_offset + offset + length) >= bytes) + continue; + + if ((platform_id == PlatformId_Microsoft + && (encoding_id == 0 || encoding_id == 1)) + && (language_id & 0x3ff) == MS_LangIdEnglish + && microsoft_id == -1) + microsoft_id = i; + // not sure if encoding id 4 for Unicode is utf16 or ucs4... + else if (platform_id == PlatformId_Unicode && encoding_id < 4 && unicode_id == -1) + unicode_id = i; + else if (platform_id == PlatformId_Apple && encoding_id == 0 && language_id == 0) + apple_id = i; + } + { + bool unicode = false; + int id = -1; + if (microsoft_id != -1) { + id = microsoft_id; + unicode = true; + } else if (apple_id != -1) { + id = apple_id; + unicode = false; + } else if (unicode_id != -1) { + id = unicode_id; + unicode = true; + } + if (id != -1) { + quint16 length = getUShort(names + 8 + id*NameRecordSize); + quint16 offset = getUShort(names + 10 + id*NameRecordSize); + if (unicode) { + // utf16 + + length /= 2; + i18n_name.resize(length); + QChar *uc = (QChar *) i18n_name.unicode(); + const unsigned char *string = table + string_offset + offset; + for (int i = 0; i < length; ++i) + uc[i] = getUShort(string + 2*i); + } else { + // Apple Roman + + i18n_name.resize(length); + QChar *uc = (QChar *) i18n_name.unicode(); + const unsigned char *string = table + string_offset + offset; + for (int i = 0; i < length; ++i) + uc[i] = QLatin1Char(string[i]); + } + } + } +error: + //qDebug("got i18n name of '%s' for font '%s'", i18n_name.latin1(), familyName.toLocal8Bit().data()); + return i18n_name; +} + +QString getEnglishName(const QString &familyName) +{ + QString i18n_name; + + HDC hdc = GetDC( 0 ); + LOGFONT lf; + memset(&lf, 0, sizeof(LOGFONT)); + memcpy(lf.lfFaceName, familyName.utf16(), qMin(LF_FACESIZE, familyName.length()) * sizeof(wchar_t)); + lf.lfCharSet = DEFAULT_CHARSET; + HFONT hfont = CreateFontIndirect(&lf); + + if (!hfont) { + ReleaseDC(0, hdc); + return QString(); + } + + HGDIOBJ oldobj = SelectObject( hdc, hfont ); + + const DWORD name_tag = MAKE_TAG( 'n', 'a', 'm', 'e' ); + + // get the name table + unsigned char *table = 0; + + DWORD bytes = GetFontData( hdc, name_tag, 0, 0, 0 ); + if ( bytes == GDI_ERROR ) { + // ### Unused variable + // int err = GetLastError(); + goto error; + } + + table = new unsigned char[bytes]; + GetFontData(hdc, name_tag, 0, table, bytes); + if ( bytes == GDI_ERROR ) + goto error; + + i18n_name = getEnglishName(table, bytes); +error: + delete [] table; + SelectObject( hdc, oldobj ); + DeleteObject( hfont ); + ReleaseDC( 0, hdc ); + + //qDebug("got i18n name of '%s' for font '%s'", i18n_name.latin1(), familyName.toLocal8Bit().data()); + return i18n_name; +} + +static FontFile * createFontFile(const QString &fileName, int index) +{ + FontFile *fontFile = new FontFile; + fontFile->fileName = fileName; + fontFile->indexValue = index; + return fontFile; +} + +Q_GUI_EXPORT void qt_registerAliasToFontFamily(const QString &familyName, const QString &alias); + static bool addFontToDatabase(QString familyName, const QString &scriptName, const TEXTMETRIC *textmetric, const FONTSIGNATURE *signature, @@ -143,10 +333,10 @@ static bool addFontToDatabase(QString familyName, const QString &scriptName, << " stretch=" << stretch; } -/* Fixme: omitted for the moment - if(ttf && localizedName(faceName) && family->english_name.isEmpty()) - family->english_name = getEnglishName(faceName); -*/ + QString englishName; + if (ttf && localizedName(faceName)) + englishName = getEnglishName(faceName); + QSupportedWritingSystems writingSystems; if (type & TRUETYPE_FONTTYPE) { quint32 unicodeRange[4] = { @@ -196,7 +386,7 @@ static bool addFontToDatabase(QString familyName, const QString &scriptName, const FontKey &fontKey = allFonts.at(k); for (int i = 0; i < fontKey.second.length(); ++i) { const QString &font = fontKey.second.at(i); - if (font == faceName || (faceName != fullName && fullName == font)) { + if (font == faceName || fullName == font || englishName == font) { value = fontRegistry.value(fontKey.first).toString(); index = i; break; @@ -212,23 +402,25 @@ static bool addFontToDatabase(QString familyName, const QString &scriptName, if (!QDir::isAbsolutePath(value)) value.prepend(QString::fromLocal8Bit(qgetenv("windir") + "\\Fonts\\")); - // Pointer is deleted in QBasicFontDatabase::releaseHandle(void *handle) - FontFile *fontFile = new FontFile; - fontFile->fileName = value; - fontFile->indexValue = index; + QPlatformFontDatabase::registerFont(faceName, foundryName, weight, style, stretch, + antialias, scalable, size, fixed, writingSystems, createFontFile(value, index)); - QPlatformFontDatabase::registerFont(faceName, foundryName, weight, - style, stretch, antialias, scalable, size, fixed, writingSystems, fontFile); // add fonts windows can generate for us: if (weight <= QFont::DemiBold) - QPlatformFontDatabase::registerFont(faceName, foundryName, QFont::Bold, - style, stretch, antialias, scalable, size, fixed, writingSystems, fontFile); + QPlatformFontDatabase::registerFont(faceName, foundryName, QFont::Bold, style, stretch, + antialias, scalable, size, fixed, writingSystems, createFontFile(value, index)); + if (style != QFont::StyleItalic) - QPlatformFontDatabase::registerFont(faceName, foundryName, weight, - QFont::StyleItalic, stretch, antialias, scalable, size, fixed, writingSystems, fontFile); + QPlatformFontDatabase::registerFont(faceName, foundryName, weight, QFont::StyleItalic, stretch, + antialias, scalable, size, fixed, writingSystems, createFontFile(value, index)); + if (weight <= QFont::DemiBold && style != QFont::StyleItalic) - QPlatformFontDatabase::registerFont(faceName, foundryName, QFont::Bold, - QFont::StyleItalic, stretch, antialias, scalable, size, fixed, writingSystems, fontFile); + QPlatformFontDatabase::registerFont(faceName, foundryName, QFont::Bold, QFont::StyleItalic, stretch, + antialias, scalable, size, fixed, writingSystems, createFontFile(value, index)); + + if (!englishName.isEmpty()) + qt_registerAliasToFontFamily(faceName, englishName); + return true; } @@ -509,3 +701,5 @@ QFont QWindowsFontDatabaseFT::LOGFONT_to_QFont(const LOGFONT& logFont, int verti qFont.setStrikeOut(logFont.lfStrikeOut); return qFont; } + +QT_END_NAMESPACE diff --git a/src/plugins/platforms/windows/qwindowsfontdatabase_ft.h b/src/plugins/platforms/windows/qwindowsfontdatabase_ft.h index b12c1067fdc..5a0c4c6377b 100644 --- a/src/plugins/platforms/windows/qwindowsfontdatabase_ft.h +++ b/src/plugins/platforms/windows/qwindowsfontdatabase_ft.h @@ -46,6 +46,8 @@ #include #include "qtwindows_additional.h" +QT_BEGIN_NAMESPACE + class QWindowsFontDatabaseFT : public QBasicFontDatabase { public: @@ -68,4 +70,6 @@ private: QSet m_families; }; +QT_END_NAMESPACE + #endif // QWINDOWSFONTDATABASEFT_H diff --git a/src/plugins/platforms/windows/qwindowsfontengine.cpp b/src/plugins/platforms/windows/qwindowsfontengine.cpp index ffa57ad58f5..007f6d597a5 100644 --- a/src/plugins/platforms/windows/qwindowsfontengine.cpp +++ b/src/plugins/platforms/windows/qwindowsfontengine.cpp @@ -517,9 +517,7 @@ QFixed QWindowsFontEngine::ascent() const QFixed QWindowsFontEngine::descent() const { - // ### we subtract 1 to even out the historical +1 in QFontMetrics' - // ### height=asc+desc+1 equation. Fix in Qt5. - return tm.tmDescent - 1; + return tm.tmDescent; } QFixed QWindowsFontEngine::leading() const diff --git a/src/plugins/platforms/windows/qwindowsguieventdispatcher.cpp b/src/plugins/platforms/windows/qwindowsguieventdispatcher.cpp index 34ab1665d8b..49158dce48e 100644 --- a/src/plugins/platforms/windows/qwindowsguieventdispatcher.cpp +++ b/src/plugins/platforms/windows/qwindowsguieventdispatcher.cpp @@ -203,7 +203,8 @@ messageDebugEntries[] = { {WM_IME_ENDCOMPOSITION, "WM_IME_ENDCOMPOSITION"}, {WM_IME_NOTIFY, "WM_IME_NOTIFY"}, {WM_IME_REQUEST, "WM_IME_REQUEST"}, - {WM_DISPLAYCHANGE, "WM_DISPLAYCHANGE"} + {WM_DISPLAYCHANGE, "WM_DISPLAYCHANGE"}, + {WM_THEMECHANGED , "WM_THEMECHANGED"} }; static inline const MessageDebugEntry *messageDebugEntry(UINT msg) diff --git a/src/plugins/platforms/windows/qwindowsintegration.cpp b/src/plugins/platforms/windows/qwindowsintegration.cpp index 2771ec7e8a9..3e98be47419 100644 --- a/src/plugins/platforms/windows/qwindowsintegration.cpp +++ b/src/plugins/platforms/windows/qwindowsintegration.cpp @@ -46,6 +46,7 @@ #include "qwindowsglcontext.h" #include "qwindowsscreen.h" #include "qwindowstheme.h" +#include "qwindowsservices.h" #ifndef QT_NO_FREETYPE #include "qwindowsfontdatabase_ft.h" #endif @@ -162,6 +163,7 @@ struct QWindowsIntegrationPrivate QWindowsInputContext m_inputContext; QWindowsAccessibility m_accessibility; QWindowsTheme m_theme; + QWindowsServices m_services; }; QWindowsIntegrationPrivate::QWindowsIntegrationPrivate() @@ -339,4 +341,9 @@ QPlatformTheme *QWindowsIntegration::platformTheme() const return &d->m_theme; } +QPlatformServices *QWindowsIntegration::services() const +{ + return &d->m_services; +} + QT_END_NAMESPACE diff --git a/src/plugins/platforms/windows/qwindowsintegration.h b/src/plugins/platforms/windows/qwindowsintegration.h index a96605f259b..ba5fafbbb5b 100644 --- a/src/plugins/platforms/windows/qwindowsintegration.h +++ b/src/plugins/platforms/windows/qwindowsintegration.h @@ -70,6 +70,7 @@ public: virtual QPlatformNativeInterface *nativeInterface() const; virtual QPlatformFontDatabase *fontDatabase() const; virtual QPlatformTheme *platformTheme() const; + QPlatformServices *services() const; virtual QVariant styleHint(StyleHint hint) const; static QWindowsIntegration *instance(); diff --git a/src/plugins/platforms/windows/qwindowsservices.cpp b/src/plugins/platforms/windows/qwindowsservices.cpp new file mode 100644 index 00000000000..905a1bd12c7 --- /dev/null +++ b/src/plugins/platforms/windows/qwindowsservices.cpp @@ -0,0 +1,154 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the plugins of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qwindowsservices.h" +#include "qtwindows_additional.h" + +#include +#include + +#include +#include + +QT_BEGIN_NAMESPACE + +enum { debug = 0 }; + +static inline bool shellExecute(const QString &file) +{ + const quintptr result = (quintptr)ShellExecute(0, 0, (wchar_t*)file.utf16(), 0, 0, SW_SHOWNORMAL); + // ShellExecute returns a value greater than 32 if successful + if (result <= 32) { + qWarning("ShellExecute '%s' failed (error %s).", qPrintable(file), qPrintable(QString::number(result))); + return false; + } + return true; +} + +// Retrieve the commandline for the default mail client. It contains a +// placeholder %1 for the URL. The default key used below is the +// command line for the mailto: shell command. +static inline QString mailCommand() +{ + enum { BufferSize = sizeof(wchar_t) * MAX_PATH }; + + const wchar_t mailUserKey[] = L"Software\\Microsoft\\Windows\\Shell\\Associations\\UrlAssociations\\mailto\\UserChoice"; + + wchar_t command[MAX_PATH] = {0}; + // Check if user has set preference, otherwise use default. + HKEY handle; + QString keyName; + if (!RegOpenKeyEx(HKEY_CURRENT_USER, mailUserKey, 0, KEY_READ, &handle)) { + DWORD bufferSize = BufferSize; + if (!RegQueryValueEx(handle, L"Progid", 0, 0, reinterpret_cast(command), &bufferSize)) + keyName = QString::fromWCharArray(command); + RegCloseKey(handle); + } + if (keyName.isEmpty()) + keyName = QStringLiteral("mailto"); + keyName += QStringLiteral("\\Shell\\Open\\Command"); + if (debug) + qDebug() << __FUNCTION__ << "keyName=" << keyName; + command[0] = 0; + if (!RegOpenKeyExW(HKEY_CLASSES_ROOT, (const wchar_t*)keyName.utf16(), 0, KEY_READ, &handle)) { + DWORD bufferSize = BufferSize; + RegQueryValueEx(handle, L"", 0, 0, reinterpret_cast(command), &bufferSize); + RegCloseKey(handle); + } + if (!command[0]) + return QString(); + wchar_t expandedCommand[MAX_PATH] = {0}; + return ExpandEnvironmentStrings(command, expandedCommand, MAX_PATH) ? + QString::fromWCharArray(expandedCommand) : QString::fromWCharArray(command); +} + +static inline bool launchMail(const QUrl &url) +{ + QString command = mailCommand(); + if (command.isEmpty()) { + qWarning("Cannot launch '%s': There is no mail program installed.", qPrintable(url.toString())); + return false; + } + //Make sure the path for the process is in quotes + const QChar doubleQuote = QLatin1Char('"'); + if (!command.startsWith(doubleQuote)) { + const int exeIndex = command.indexOf(QStringLiteral(".exe "), 0, Qt::CaseInsensitive); + if (exeIndex != -1) { + command.insert(exeIndex + 4, doubleQuote); + command.prepend(doubleQuote); + } + } + // Pass the url as the parameter. Should use QProcess::startDetached(), + // but that cannot handle a Windows command line [yet]. + command.replace(QStringLiteral("%1"), url.toString()); + if (debug) + qDebug() << __FUNCTION__ << "Launching" << command; + //start the process + PROCESS_INFORMATION pi; + ZeroMemory(&pi, sizeof(pi)); + STARTUPINFO si; + ZeroMemory(&si, sizeof(si)); + si.cb = sizeof(si); + if (!CreateProcess(NULL, (wchar_t*)command.utf16(), NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi)) { + qErrnoWarning("Unable to launch '%s'", qPrintable(command)); + return false; + } + CloseHandle(pi.hProcess); + CloseHandle(pi.hThread); + return true; +} + +bool QWindowsServices::openUrl(const QUrl &url) +{ + const QString scheme = url.scheme(); + if (scheme.isEmpty()) + return openDocument(url); + if (scheme == QStringLiteral("mailto") && launchMail(url)) + return true; + return shellExecute(QLatin1String(url.toEncoded())); +} + +bool QWindowsServices::openDocument(const QUrl &url) +{ + return shellExecute(url.isLocalFile() ? url.toLocalFile() : url.toString()); +} + +QT_END_NAMESPACE diff --git a/src/plugins/platforms/windows/qwindowsservices.h b/src/plugins/platforms/windows/qwindowsservices.h new file mode 100644 index 00000000000..d979ed1af13 --- /dev/null +++ b/src/plugins/platforms/windows/qwindowsservices.h @@ -0,0 +1,58 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the plugins of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QWINDOWSDESKTOPSERVICES_H +#define QWINDOWSDESKTOPSERVICES_H + +#include + +QT_BEGIN_NAMESPACE + +class QWindowsServices : public QPlatformServices +{ +public: + bool openUrl(const QUrl &url); + bool openDocument(const QUrl &url); +}; + +QT_END_NAMESPACE + +#endif // QWINDOWSDESKTOPSERVICES_H diff --git a/src/plugins/platforms/windows/qwindowstheme.cpp b/src/plugins/platforms/windows/qwindowstheme.cpp index 73cff3c9cef..a59b74cef38 100644 --- a/src/plugins/platforms/windows/qwindowstheme.cpp +++ b/src/plugins/platforms/windows/qwindowstheme.cpp @@ -42,12 +42,126 @@ #include "qwindowstheme.h" #include "qwindowsdialoghelpers.h" #include "qwindowscontext.h" +#include "qwindowsintegration.h" #include "qt_windows.h" #include +#include +#include +#include +#include +#include +#include QT_BEGIN_NAMESPACE +static inline QTextStream& operator<<(QTextStream &str, const QColor &c) +{ + str.setIntegerBase(16); + str.setFieldWidth(2); + str.setPadChar(QLatin1Char('0')); + str << " rgb: #" << c.red() << c.green() << c.blue(); + str.setIntegerBase(10); + str.setFieldWidth(0); + return str; +} + +static inline QString paletteToString(const QPalette &palette) +{ + QString result; + QTextStream str(&result); + str << "text=" << palette.color(QPalette::WindowText) + << " background=" << palette.color(QPalette::Window); + return result; +} + +static inline QColor mixColors(const QColor &c1, const QColor &c2) +{ + return QColor ((c1.red() + c2.red()) / 2, + (c1.green() + c2.green()) / 2, + (c1.blue() + c2.blue()) / 2); +} + +static inline QColor getSysColor(int index) +{ + return qColorToCOLORREF(GetSysColor(index)); +} + +static inline QPalette systemPalette() +{ + QPalette result; + result.setColor(QPalette::WindowText, getSysColor(COLOR_WINDOWTEXT)); + result.setColor(QPalette::Button, getSysColor(COLOR_BTNFACE)); + result.setColor(QPalette::Light, getSysColor(COLOR_BTNHIGHLIGHT)); + result.setColor(QPalette::Dark, getSysColor(COLOR_BTNSHADOW)); + result.setColor(QPalette::Mid, result.button().color().darker(150)); + result.setColor(QPalette::Text, getSysColor(COLOR_WINDOWTEXT)); + result.setColor(QPalette::BrightText, getSysColor(COLOR_BTNHIGHLIGHT)); + result.setColor(QPalette::Base, getSysColor(COLOR_WINDOW)); + result.setColor(QPalette::Window, getSysColor(COLOR_BTNFACE)); + result.setColor(QPalette::ButtonText, getSysColor(COLOR_BTNTEXT)); + result.setColor(QPalette::Midlight, getSysColor(COLOR_3DLIGHT)); + result.setColor(QPalette::Shadow, getSysColor(COLOR_3DDKSHADOW)); + result.setColor(QPalette::Highlight, getSysColor(COLOR_HIGHLIGHT)); + result.setColor(QPalette::HighlightedText, getSysColor(COLOR_HIGHLIGHTTEXT)); + result.setColor(QPalette::Link, Qt::blue); + result.setColor(QPalette::LinkVisited, Qt::magenta); + result.setColor(QPalette::Inactive, QPalette::Button, result.button().color()); + result.setColor(QPalette::Inactive, QPalette::Window, result.background().color()); + result.setColor(QPalette::Inactive, QPalette::Light, result.light().color()); + result.setColor(QPalette::Inactive, QPalette::Dark, result.dark().color()); + + if (result.midlight() == result.button()) + result.setColor(QPalette::Midlight, result.button().color().lighter(110)); + if (result.background() != result.base()) { + result.setColor(QPalette::Inactive, QPalette::Highlight, result.color(QPalette::Inactive, QPalette::Window)); + result.setColor(QPalette::Inactive, QPalette::HighlightedText, result.color(QPalette::Inactive, QPalette::Text)); + } + + const QColor disabled = + mixColors(result.foreground().color(), result.button().color()); + + result.setColorGroup(QPalette::Disabled, result.foreground(), result.button(), + result.light(), result.dark(), result.mid(), + result.text(), result.brightText(), result.base(), + result.background()); + result.setColor(QPalette::Disabled, QPalette::WindowText, disabled); + result.setColor(QPalette::Disabled, QPalette::Text, disabled); + result.setColor(QPalette::Disabled, QPalette::ButtonText, disabled); + result.setColor(QPalette::Disabled, QPalette::Highlight, + getSysColor(COLOR_HIGHLIGHT)); + result.setColor(QPalette::Disabled, QPalette::HighlightedText, + getSysColor(COLOR_HIGHLIGHTTEXT)); + result.setColor(QPalette::Disabled, QPalette::Base, + result.background().color()); + return result; +} + +QPalette toolTipPalette(const QPalette &systemPalette) +{ + QPalette result(systemPalette); + const QColor tipBgColor(getSysColor(COLOR_INFOBK)); + const QColor tipTextColor(getSysColor(COLOR_INFOTEXT)); + + result.setColor(QPalette::All, QPalette::Button, tipBgColor); + result.setColor(QPalette::All, QPalette::Window, tipBgColor); + result.setColor(QPalette::All, QPalette::Text, tipTextColor); + result.setColor(QPalette::All, QPalette::WindowText, tipTextColor); + result.setColor(QPalette::All, QPalette::ButtonText, tipTextColor); + result.setColor(QPalette::All, QPalette::Button, tipBgColor); + result.setColor(QPalette::All, QPalette::Window, tipBgColor); + result.setColor(QPalette::All, QPalette::Text, tipTextColor); + result.setColor(QPalette::All, QPalette::WindowText, tipTextColor); + result.setColor(QPalette::All, QPalette::ButtonText, tipTextColor); + const QColor disabled = + mixColors(result.foreground().color(), result.button().color()); + result.setColor(QPalette::Disabled, QPalette::WindowText, disabled); + result.setColor(QPalette::Disabled, QPalette::Text, disabled); + result.setColor(QPalette::Disabled, QPalette::Base, Qt::white); + result.setColor(QPalette::Disabled, QPalette::BrightText, Qt::white); + return result; +} + static inline bool booleanSystemParametersInfo(UINT what, bool defaultValue) { BOOL result; @@ -66,11 +180,53 @@ static inline bool dWordSystemParametersInfo(UINT what, DWORD defaultValue) QWindowsTheme::QWindowsTheme() { + qFill(m_palettes, m_palettes + NPalettes, static_cast(0)); + refresh(); +} + +QWindowsTheme::~QWindowsTheme() +{ + clearPalettes(); +} + +void QWindowsTheme::clearPalettes() +{ + qDeleteAll(m_palettes, m_palettes + NPalettes); + qFill(m_palettes, m_palettes + NPalettes, static_cast(0)); +} + +QWindowsTheme *QWindowsTheme::instance() +{ + return static_cast(QWindowsIntegration::instance()->platformTheme()); +} + +static inline QStringList iconThemeSearchPaths() +{ + const QFileInfo appDir(QCoreApplication::applicationDirPath() + QStringLiteral("/icons")); + return appDir.isDir() ? QStringList(appDir.absoluteFilePath()) : QStringList(); +} + +static inline QStringList styleNames() +{ + QStringList result; + if (QSysInfo::WindowsVersion >= QSysInfo::WV_VISTA) + result.append(QStringLiteral("WindowsVista")); + if (QSysInfo::WindowsVersion >= QSysInfo::WV_XP) + result.append(QStringLiteral("WindowsXP")); + result.append(QStringLiteral("Windows")); + return result; } QVariant QWindowsTheme::themeHint(ThemeHint hint) const { switch (hint) { + case SystemIconThemeName: + break; + case IconThemeSearchPaths: + return QVariant(iconThemeSearchPaths()); + break; + case StyleNames: + return QVariant(styleNames()); case TextCursorWidth: return QVariant(int(dWordSystemParametersInfo(SPI_GETCARETWIDTH, 1u))); case DropShadow: @@ -81,6 +237,19 @@ QVariant QWindowsTheme::themeHint(ThemeHint hint) const return QVariant(); } +void QWindowsTheme::refresh() +{ + clearPalettes(); + if (QGuiApplication::desktopSettingsAware()) { + m_palettes[SystemPalette] = new QPalette(systemPalette()); + m_palettes[ToolTipPalette] = new QPalette(toolTipPalette(*m_palettes[SystemPalette])); + if (QWindowsContext::verboseTheming) + qDebug() << __FUNCTION__ << '\n' + << " system=" << paletteToString(*m_palettes[SystemPalette]) + << " tooltip=" << paletteToString(*m_palettes[ToolTipPalette]); + } +} + bool QWindowsTheme::usePlatformNativeDialog(DialogType type) const { return QWindowsDialogs::useHelper(type); @@ -91,4 +260,10 @@ QPlatformDialogHelper *QWindowsTheme::createPlatformDialogHelper(DialogType type return QWindowsDialogs::createHelper(type); } +void QWindowsTheme::windowsThemeChanged(QWindow * /* window */) +{ + refresh(); + // QWindowSystemInterface::handleThemeChange(window); +} + QT_END_NAMESPACE diff --git a/src/plugins/platforms/windows/qwindowstheme.h b/src/plugins/platforms/windows/qwindowstheme.h index 77c85b2d6e1..950c380737f 100644 --- a/src/plugins/platforms/windows/qwindowstheme.h +++ b/src/plugins/platforms/windows/qwindowstheme.h @@ -43,19 +43,43 @@ #define QWINDOWSTHEME_H #include +#include + +#include "qtwindows_additional.h" QT_BEGIN_NAMESPACE +class QWindow; + class QWindowsTheme : public QPlatformTheme { public: QWindowsTheme(); + ~QWindowsTheme(); + + static QWindowsTheme *instance(); virtual bool usePlatformNativeDialog(DialogType type) const; virtual QPlatformDialogHelper *createPlatformDialogHelper(DialogType type) const; virtual QVariant themeHint(ThemeHint) const; + virtual const QPalette *palette(Palette type = SystemPalette) const + { return m_palettes[type]; } + + void windowsThemeChanged(QWindow *window); + +private: + void refresh(); + void clearPalettes(); + + QPalette *m_palettes[NPalettes]; }; +static inline COLORREF qColorToCOLORREF(const QColor &color) +{ return RGB(color.red(), color.green(), color.blue()); } + +static inline QColor COLORREFToQColor(COLORREF cr) +{ return QColor(GetRValue(cr), GetGValue(cr), GetBValue(cr)); } + QT_END_NAMESPACE #endif // QWINDOWSTHEME_H diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp index 5d8de2e01d7..3e0bec8d461 100644 --- a/src/plugins/platforms/windows/qwindowswindow.cpp +++ b/src/plugins/platforms/windows/qwindowswindow.cpp @@ -49,6 +49,7 @@ #include #include #include +#include #include #include @@ -618,7 +619,8 @@ QWindowsWindow::QWindowsWindow(QWindow *aWindow, const WindowData &data) : m_opacity(1.0), m_mouseGrab(false), m_cursor(QWindowsScreen::screenOf(aWindow)->cursor().standardWindowCursor()), - m_dropTarget(0) + m_dropTarget(0), + m_savedStyle(0) { if (aWindow->surfaceType() == QWindow::OpenGLSurface) setFlag(OpenGLSurface); @@ -706,6 +708,7 @@ void QWindowsWindow::setVisible(bool visible) hide_sys(); } } + QWindowSystemInterface::handleSynchronousExposeEvent(window(), QRect(QPoint(), geometry().size())); } bool QWindowsWindow::isVisible() const @@ -809,8 +812,15 @@ void QWindowsWindow::handleHidden() QWindowSystemInterface::handleUnmapEvent(window()); } -void QWindowsWindow::setGeometry(const QRect &rect) +void QWindowsWindow::setGeometry(const QRect &rectIn) { + QRect rect = rectIn; + // This means it is a call from QWindow::setFramePos() and + // the coordinates include the frame (size is still the contents rectangle). + if (qt_window_private(window())->positionPolicy == QWindowPrivate::WindowFrameInclusive) { + const QMargins margins = frameMargins(); + rect.moveTopLeft(rect.topLeft() + QPoint(margins.left(), margins.top())); + } const QSize oldSize = m_data.geometry.size(); m_data.geometry = rect; const QSize newSize = rect.size(); @@ -904,11 +914,15 @@ void QWindowsWindow::setGeometry_sys(const QRect &rect) const << " \n resulting " << rc << geometry_sys(); } -QRect QWindowsWindow::geometry_sys() const +QRect QWindowsWindow::frameGeometry_sys() const { // Warning: Returns bogus values when minimized. - QRect result = frameGeometry(m_data.hwnd, window()->isTopLevel()) - frameMargins(); - return result; + return frameGeometry(m_data.hwnd, window()->isTopLevel()); +} + +QRect QWindowsWindow::geometry_sys() const +{ + return frameGeometry_sys() - frameMargins(); } /*! @@ -1098,7 +1112,12 @@ void QWindowsWindow::setWindowState_sys(Qt::WindowState newState) #else UINT newStyle = WS_POPUP; #endif - if (style() & WS_SYSMENU) + // Save geometry and style to be restored when fullscreen + // is turned off again, since on Windows, it is not a real + // Window state but emulated by changing geometry and style. + m_savedStyle = style(); + m_savedFrameGeometry = frameGeometry_sys(); + if (m_savedStyle & WS_SYSMENU) newStyle |= WS_SYSMENU; if (visible) newStyle |= WS_VISIBLE; @@ -1108,19 +1127,26 @@ void QWindowsWindow::setWindowState_sys(Qt::WindowState newState) UINT swpf = SWP_FRAMECHANGED; if (newStates & Qt::WindowActive) swpf |= SWP_NOACTIVATE; - SetWindowPos(m_data.hwnd, HWND_TOP, r.left(), r.top(), r.width(), r.height(), swpf); } else { + // Restore saved state. + unsigned newStyle = m_savedStyle ? m_savedStyle : style(); if (visible) - setStyle(style() | WS_VISIBLE); - UINT swpf = SWP_FRAMECHANGED | SWP_NOZORDER | SWP_NOSIZE | SWP_NOMOVE; + newStyle |= WS_VISIBLE; + setStyle(newStyle); + + UINT swpf = SWP_FRAMECHANGED | SWP_NOZORDER; if (newStates & Qt::WindowActive) swpf |= SWP_NOACTIVATE; - SetWindowPos(m_data.hwnd, 0, 0, 0, 0, 0, swpf); - + if (!m_savedFrameGeometry.isValid()) + swpf |= SWP_NOSIZE | SWP_NOMOVE; + SetWindowPos(m_data.hwnd, 0, m_savedFrameGeometry.x(), m_savedFrameGeometry.y(), + m_savedFrameGeometry.width(), m_savedFrameGeometry.height(), swpf); // preserve maximized state if (visible) ShowWindow(m_data.hwnd, (newStates & Qt::WindowMaximized) ? max : normal); + m_savedStyle = 0; + m_savedFrameGeometry = QRect(); } } @@ -1220,8 +1246,12 @@ void QWindowsWindow::requestActivateWindow() { if (QWindowsContext::verboseWindows) qDebug() << __FUNCTION__ << this << window(); - if (m_data.hwnd) + // 'Active' state handling is based in focus since it needs to work for + // child windows as well. + if (m_data.hwnd) { SetForegroundWindow(m_data.hwnd); + SetFocus(m_data.hwnd); + } } bool QWindowsWindow::setKeyboardGrabEnabled(bool grab) diff --git a/src/plugins/platforms/windows/qwindowswindow.h b/src/plugins/platforms/windows/qwindowswindow.h index 1d5f3c29d66..e3336d1c3a1 100644 --- a/src/plugins/platforms/windows/qwindowswindow.h +++ b/src/plugins/platforms/windows/qwindowswindow.h @@ -193,6 +193,7 @@ private: inline void show_sys() const; inline void hide_sys() const; inline void setGeometry_sys(const QRect &rect) const; + inline QRect frameGeometry_sys() const; inline QRect geometry_sys() const; inline WindowData setWindowFlags_sys(Qt::WindowFlags wt, unsigned flags = 0) const; inline void setWindowState_sys(Qt::WindowState newState); @@ -213,6 +214,8 @@ private: bool m_mouseGrab; QWindowsWindowCursor m_cursor; QWindowsOleDropTarget *m_dropTarget; + unsigned m_savedStyle; + QRect m_savedFrameGeometry; }; // Conveniences for window frames. diff --git a/src/plugins/platforms/windows/windows.json b/src/plugins/platforms/windows/windows.json new file mode 100644 index 00000000000..05032c1b72a --- /dev/null +++ b/src/plugins/platforms/windows/windows.json @@ -0,0 +1,3 @@ +{ + "Keys": [ "windows" ] +} diff --git a/src/plugins/platforms/windows/windows.pro b/src/plugins/platforms/windows/windows.pro index 453265405a1..bb41fe87fc7 100644 --- a/src/plugins/platforms/windows/windows.pro +++ b/src/plugins/platforms/windows/windows.pro @@ -13,6 +13,7 @@ LIBS *= -lOpenGL32 -lGdi32 -lUser32 -lOle32 -lWinspool -lImm32 -lWinmm -lOleaut win32-g++: LIBS *= -luuid # For the dialog helpers: LIBS *= -lshlwapi -lShell32 +LIBS *= -lAdvapi32 DEFINES *= QT_NO_CAST_FROM_ASCII @@ -46,7 +47,8 @@ SOURCES += \ qwindowsinputcontext.cpp \ qwindowsaccessibility.cpp \ qwindowstheme.cpp \ - qwindowsdialoghelpers.cpp + qwindowsdialoghelpers.cpp \ + qwindowsservices.cpp HEADERS += \ qwindowsnativeimage.h \ @@ -73,7 +75,11 @@ HEADERS += \ qwindowsinputcontext.h \ qwindowsaccessibility.h \ qwindowstheme.h \ - qwindowsdialoghelpers.h + qwindowsdialoghelpers.h \ + qwindowsservices.h + +# Enable access to HB_Face in harfbuzz includes included by qfontengine_p.h. +DEFINES *= QT_COMPILES_IN_HARFBUZZ contains(QT_CONFIG, freetype) { DEFINES *= QT_NO_FONTCONFIG @@ -143,5 +149,7 @@ contains(QT_CONFIG, freetype) { } } +OTHER_FILES += windows.json + target.path += $$[QT_INSTALL_PLUGINS]/platforms INSTALLS += target diff --git a/src/plugins/platforms/xcb/main.cpp b/src/plugins/platforms/xcb/main.cpp index 5aa3e921f37..50c5a1a0178 100644 --- a/src/plugins/platforms/xcb/main.cpp +++ b/src/plugins/platforms/xcb/main.cpp @@ -46,6 +46,8 @@ QT_BEGIN_NAMESPACE class QXcbIntegrationPlugin : public QPlatformIntegrationPlugin { + Q_OBJECT + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QPlatformIntegrationFactoryInterface" FILE "xcb.json") public: QStringList keys() const; QPlatformIntegration *create(const QString&, const QStringList&); @@ -66,6 +68,6 @@ QPlatformIntegration* QXcbIntegrationPlugin::create(const QString& system, const return 0; } -Q_EXPORT_PLUGIN2(xcb, QXcbIntegrationPlugin) - QT_END_NAMESPACE + +#include "main.moc" diff --git a/src/plugins/platforms/xcb/qglxintegration.cpp b/src/plugins/platforms/xcb/qglxintegration.cpp index 6ada127beb4..0144caae3de 100644 --- a/src/plugins/platforms/xcb/qglxintegration.cpp +++ b/src/plugins/platforms/xcb/qglxintegration.cpp @@ -64,6 +64,7 @@ QGLXContext::QGLXContext(QXcbScreen *screen, const QSurfaceFormat &format, QPlat : QPlatformOpenGLContext() , m_screen(screen) , m_context(0) + , m_format(format) { m_shareContext = 0; if (share) @@ -82,7 +83,7 @@ QGLXContext::QGLXContext(QXcbScreen *screen, const QSurfaceFormat &format, QPlat if (m_context) m_format = qglx_surfaceFormatFromGLXFBConfig(DISPLAY_FROM_XCB(screen), config, m_context); } else { - XVisualInfo *visualInfo = qglx_findVisualInfo(DISPLAY_FROM_XCB(m_screen), screen->screenNumber(), format); + XVisualInfo *visualInfo = qglx_findVisualInfo(DISPLAY_FROM_XCB(m_screen), screen->screenNumber(), &m_format); if (!visualInfo) qFatal("Could not initialize GLX"); m_context = glXCreateContext(DISPLAY_FROM_XCB(screen), visualInfo, m_shareContext, true); diff --git a/src/plugins/platforms/xcb/qxcbdrag.cpp b/src/plugins/platforms/xcb/qxcbdrag.cpp index a05fc780bcf..e928fe2d0a7 100644 --- a/src/plugins/platforms/xcb/qxcbdrag.cpp +++ b/src/plugins/platforms/xcb/qxcbdrag.cpp @@ -234,6 +234,7 @@ xcb_window_t QXcbDrag::findRealWindow(const QPoint & pos, xcb_window_t w, int md xcb_get_geometry_cookie_t gcookie = xcb_get_geometry(xcb_connection(), w); xcb_get_geometry_reply_t *greply = xcb_get_geometry_reply(xcb_connection(), gcookie, 0); if (reply && QRect(greply->x, greply->y, greply->width, greply->height).contains(pos)) { + bool windowContainsMouse = true; { xcb_get_property_cookie_t cookie = Q_XCB_CALL(xcb_get_property(xcb_connection(), false, w, connection()->atom(QXcbAtom::XdndAware), @@ -242,8 +243,26 @@ xcb_window_t QXcbDrag::findRealWindow(const QPoint & pos, xcb_window_t w, int md bool isAware = reply && reply->type != XCB_NONE; free(reply); - if (isAware) - return w; + if (isAware) { + xcb_xfixes_region_t region = xcb_generate_id(xcb_connection()); + xcb_xfixes_create_region_from_window(xcb_connection(), region, w, XCB_SHAPE_SK_BOUNDING); + xcb_xfixes_fetch_region_reply_t *reply = xcb_xfixes_fetch_region_reply(xcb_connection(), xcb_xfixes_fetch_region(xcb_connection(), region), NULL); + if (reply) { + xcb_rectangle_t *rectangles = xcb_xfixes_fetch_region_rectangles(reply); + if (rectangles) { + windowContainsMouse = false; + const int nRectangles = xcb_xfixes_fetch_region_rectangles_length(reply); + for (int i = 0; !windowContainsMouse && i < nRectangles; ++i) { + windowContainsMouse = QRect(rectangles[i].x, rectangles[i].y, rectangles[i].width, rectangles[i].height).contains(pos); + } + } + free(reply); + } + xcb_xfixes_destroy_region(xcb_connection(), region); + + if (windowContainsMouse) + return w; + } } xcb_query_tree_cookie_t cookie = xcb_query_tree (xcb_connection(), w); @@ -266,7 +285,10 @@ xcb_window_t QXcbDrag::findRealWindow(const QPoint & pos, xcb_window_t w, int md // innermost window. // No children! - return w; + if (!windowContainsMouse) + return 0; + else + return w; } } return 0; diff --git a/src/plugins/platforms/xcb/qxcbintegration.cpp b/src/plugins/platforms/xcb/qxcbintegration.cpp index 40359169cae..e7cdef4da9f 100644 --- a/src/plugins/platforms/xcb/qxcbintegration.cpp +++ b/src/plugins/platforms/xcb/qxcbintegration.cpp @@ -53,6 +53,8 @@ #include #include +#include +#include #include @@ -68,6 +70,7 @@ #endif #include +#include #include #if defined(XCB_USE_GLX) @@ -84,7 +87,9 @@ QT_BEGIN_NAMESPACE QXcbIntegration::QXcbIntegration(const QStringList ¶meters) - : m_eventDispatcher(createUnixEventDispatcher()) + : m_eventDispatcher(createUnixEventDispatcher()), + m_services(new QGenericUnixServices), + m_theme(QGenericUnixTheme::createUnixTheme()) { QGuiApplicationPrivate::instance()->setEventDispatcher(m_eventDispatcher); @@ -168,6 +173,7 @@ private: }; #endif +#ifndef QT_NO_OPENGL QPlatformOpenGLContext *QXcbIntegration::createPlatformOpenGLContext(QOpenGLContext *context) const { QXcbScreen *screen = static_cast(context->screen()->handle()); @@ -182,6 +188,7 @@ QPlatformOpenGLContext *QXcbIntegration::createPlatformOpenGLContext(QOpenGLCont qWarning("Cannot create platform GL context, none of GLX, EGL, DRI2 is enabled"); return 0; } +#endif QPlatformBackingStore *QXcbIntegration::createPlatformBackingStore(QWindow *window) const { @@ -268,4 +275,14 @@ QPlatformSharedGraphicsCache *QXcbIntegration::createPlatformSharedGraphicsCache } #endif +QPlatformServices *QXcbIntegration::services() const +{ + return m_services.data(); +} + +QPlatformTheme *QXcbIntegration::platformTheme() const +{ + return m_theme.data(); +} + QT_END_NAMESPACE diff --git a/src/plugins/platforms/xcb/qxcbintegration.h b/src/plugins/platforms/xcb/qxcbintegration.h index eefecd509b7..457f90d6e07 100644 --- a/src/plugins/platforms/xcb/qxcbintegration.h +++ b/src/plugins/platforms/xcb/qxcbintegration.h @@ -58,7 +58,9 @@ public: ~QXcbIntegration(); QPlatformWindow *createPlatformWindow(QWindow *window) const; +#ifndef QT_NO_OPENGL QPlatformOpenGLContext *createPlatformOpenGLContext(QOpenGLContext *context) const; +#endif QPlatformBackingStore *createPlatformBackingStore(QWindow *window) const; bool hasCapability(Capability cap) const; @@ -81,6 +83,10 @@ public: QPlatformSharedGraphicsCache *createPlatformSharedGraphicsCache(const char *cacheId) const; #endif + QPlatformServices *services() const; + + QPlatformTheme *platformTheme() const; + private: QList m_connections; @@ -95,6 +101,9 @@ private: #if defined(QT_USE_XCB_SHARED_GRAPHICS_CACHE) QScopedPointer m_sharedGraphicsCache; #endif + + QScopedPointer m_services; + QScopedPointer m_theme; }; QT_END_NAMESPACE diff --git a/src/plugins/platforms/xcb/qxcbkeyboard.cpp b/src/plugins/platforms/xcb/qxcbkeyboard.cpp index 8c86d43f171..b682b87bc33 100644 --- a/src/plugins/platforms/xcb/qxcbkeyboard.cpp +++ b/src/plugins/platforms/xcb/qxcbkeyboard.cpp @@ -50,6 +50,7 @@ #include #include +#include #ifndef XK_ISO_Left_Tab #define XK_ISO_Left_Tab 0xFE20 @@ -939,38 +940,35 @@ void QXcbKeyboard::setupModifiers() return; } - // Figure out the modifier mapping, ICCCM 6.6 - typedef QPair SymCodes; - QList modKeyCodes; - // for Alt and Meta L and R are the same - modKeyCodes << SymCodes(XK_Alt_L, xcb_key_symbols_get_keycode(m_key_symbols, XK_Alt_L)); - modKeyCodes << SymCodes(XK_Meta_L, xcb_key_symbols_get_keycode(m_key_symbols, XK_Meta_L)); - modKeyCodes << SymCodes(XK_Super_L, xcb_key_symbols_get_keycode(m_key_symbols, XK_Super_L)); - modKeyCodes << SymCodes(XK_Super_R, xcb_key_symbols_get_keycode(m_key_symbols, XK_Super_R)); - modKeyCodes << SymCodes(XK_Hyper_L, xcb_key_symbols_get_keycode(m_key_symbols, XK_Hyper_L)); - modKeyCodes << SymCodes(XK_Hyper_R, xcb_key_symbols_get_keycode(m_key_symbols, XK_Hyper_R)); - modKeyCodes << SymCodes(XK_Num_Lock, xcb_key_symbols_get_keycode(m_key_symbols, XK_Num_Lock)); - modKeyCodes << SymCodes(XK_Mode_switch, xcb_key_symbols_get_keycode(m_key_symbols, XK_Mode_switch)); - modKeyCodes << SymCodes(XK_Caps_Lock, xcb_key_symbols_get_keycode(m_key_symbols, XK_Caps_Lock)); + static const xcb_keysym_t symbols[] = { + XK_Alt_L, XK_Meta_L, XK_Super_L, XK_Super_R, + XK_Hyper_L, XK_Hyper_R, XK_Num_Lock, XK_Mode_switch, XK_Caps_Lock, + }; + static const size_t numSymbols = sizeof symbols / sizeof *symbols; + + // Figure out the modifier mapping, ICCCM 6.6 + xcb_keycode_t* modKeyCodes[numSymbols]; + for (size_t i = 0; i < numSymbols; ++i) + modKeyCodes[i] = xcb_key_symbols_get_keycode(m_key_symbols, symbols[i]); xcb_keycode_t *modMap = xcb_get_modifier_mapping_keycodes(modMapReply); const int w = modMapReply->keycodes_per_modifier; - for (int i = 0; i < modKeyCodes.count(); ++i) { + for (size_t i = 0; i < numSymbols; ++i) { for (int bit = 0; bit < 8; ++bit) { uint mask = 1 << bit; for (int x = 0; x < w; ++x) { xcb_keycode_t keyCode = modMap[x + bit * w]; - xcb_keycode_t *itk = modKeyCodes.at(i).second; + xcb_keycode_t *itk = modKeyCodes[i]; while (itk && *itk != XCB_NO_SYMBOL) if (*itk++ == keyCode) - setMask(modKeyCodes.at(i).first, mask); + setMask(symbols[i], mask); } } } - for (int i = 0; i < modKeyCodes.count(); ++i) - free(modKeyCodes.at(i).second); + for (size_t i = 0; i < numSymbols; ++i) + free(modKeyCodes[i]); free(modMapReply); } diff --git a/src/plugins/platforms/xcb/qxcbnativeinterface.cpp b/src/plugins/platforms/xcb/qxcbnativeinterface.cpp index b7403cfdced..406f9c24bdb 100644 --- a/src/plugins/platforms/xcb/qxcbnativeinterface.cpp +++ b/src/plugins/platforms/xcb/qxcbnativeinterface.cpp @@ -84,6 +84,9 @@ QXcbNativeInterface::QXcbNativeInterface() void *QXcbNativeInterface::nativeResourceForContext(const QByteArray &resourceString, QOpenGLContext *context) { QByteArray lowerCaseResource = resourceString.toLower(); + if (!qXcbResourceMap()->contains(lowerCaseResource)) + return 0; + ResourceType resource = qXcbResourceMap()->value(lowerCaseResource); void *result = 0; switch(resource) { @@ -91,14 +94,18 @@ void *QXcbNativeInterface::nativeResourceForContext(const QByteArray &resourceSt result = eglContextForContext(context); break; default: - result = 0; + break; } + return result; } void *QXcbNativeInterface::nativeResourceForWindow(const QByteArray &resourceString, QWindow *window) { QByteArray lowerCaseResource = resourceString.toLower(); + if (!qXcbResourceMap()->contains(lowerCaseResource)) + return 0; + ResourceType resource = qXcbResourceMap()->value(lowerCaseResource); void *result = 0; switch(resource) { @@ -118,8 +125,9 @@ void *QXcbNativeInterface::nativeResourceForWindow(const QByteArray &resourceStr result = graphicsDeviceForWindow(window); break; default: - result = 0; + break; } + return result; } diff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp index 959209dd33b..be3d527cfc5 100644 --- a/src/plugins/platforms/xcb/qxcbwindow.cpp +++ b/src/plugins/platforms/xcb/qxcbwindow.cpp @@ -50,6 +50,8 @@ #include "qxcbkeyboard.h" #include "qxcbwmsupport.h" +#include + #ifdef XCB_USE_DRI2 #include "qdri2context.h" #endif @@ -201,19 +203,21 @@ void QXcbWindow::create() if (parent()) xcb_parent_id = static_cast(parent())->xcb_window(); - m_requestedFormat = window()->format(); + m_format = window()->requestedFormat(); #if (defined(XCB_USE_GLX) || defined(XCB_USE_EGL)) && defined(XCB_USE_XLIB) if (QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::OpenGL) - || window()->format().hasAlpha()) + || m_format.hasAlpha()) { #if defined(XCB_USE_GLX) - XVisualInfo *visualInfo = qglx_findVisualInfo(DISPLAY_FROM_XCB(m_screen),m_screen->screenNumber(), window()->format()); + XVisualInfo *visualInfo = qglx_findVisualInfo(DISPLAY_FROM_XCB(m_screen), m_screen->screenNumber(), &m_format); if (!visualInfo) qFatal("Could not initialize GLX"); #elif defined(XCB_USE_EGL) EGLDisplay eglDisplay = connection()->egl_display(); - EGLConfig eglConfig = q_configFromGLFormat(eglDisplay, window()->format(), true); + EGLConfig eglConfig = q_configFromGLFormat(eglDisplay, m_format, true); + m_format = q_glFormatFromConfig(eglDisplay, eglConfig); + VisualID id = QXlibEglIntegration::getCompatibleVisualId(DISPLAY_FROM_XCB(this), eglDisplay, eglConfig); XVisualInfo visualInfoTemplate; @@ -1167,7 +1171,7 @@ void QXcbWindow::setOrientation(Qt::ScreenOrientation orientation) QSurfaceFormat QXcbWindow::format() const { // ### return actual format - return m_requestedFormat; + return m_format; } #if defined(XCB_USE_EGL) diff --git a/src/plugins/platforms/xcb/qxcbwindow.h b/src/plugins/platforms/xcb/qxcbwindow.h index 3cbf9e7e0d3..365c8b05492 100644 --- a/src/plugins/platforms/xcb/qxcbwindow.h +++ b/src/plugins/platforms/xcb/qxcbwindow.h @@ -155,7 +155,7 @@ private: bool m_transparent; xcb_window_t m_netWmUserTimeWindow; - QSurfaceFormat m_requestedFormat; + QSurfaceFormat m_format; mutable bool m_dirtyFrameMargins; mutable QMargins m_frameMargins; diff --git a/src/plugins/platforms/xcb/xcb.json b/src/plugins/platforms/xcb/xcb.json new file mode 100644 index 00000000000..dc09d7b54f8 --- /dev/null +++ b/src/plugins/platforms/xcb/xcb.json @@ -0,0 +1,3 @@ +{ + "Keys": [ "xcb" ] +} diff --git a/src/plugins/platforms/xcb/xcb.pro b/src/plugins/platforms/xcb/xcb.pro index d80a6df0b65..7bad2b4dadc 100644 --- a/src/plugins/platforms/xcb/xcb.pro +++ b/src/plugins/platforms/xcb/xcb.pro @@ -78,7 +78,7 @@ contains(DEFINES, XCB_USE_DRI2) { HEADERS += qdri2context.h SOURCES += qdri2context.cpp -} else { +} else:contains(QT_CONFIG, opengl) { contains(QT_CONFIG, opengles2) { DEFINES += XCB_USE_EGL LIBS += -lEGL @@ -108,5 +108,7 @@ QT += dbus LIBS += -ldbus-1 } +OTHER_FILES += xcb.json + target.path += $$[QT_INSTALL_PLUGINS]/platforms INSTALLS += target diff --git a/src/plugins/platforms/xlib/qglxintegration.cpp b/src/plugins/platforms/xlib/qglxintegration.cpp index e78689374a6..51621408b9d 100644 --- a/src/plugins/platforms/xlib/qglxintegration.cpp +++ b/src/plugins/platforms/xlib/qglxintegration.cpp @@ -65,6 +65,7 @@ QGLXContext::QGLXContext(QXlibScreen *screen, const QSurfaceFormat &format, QPla : QPlatformOpenGLContext() , m_screen(screen) , m_context(0) + , m_windowFormat(format) { GLXContext shareGlxContext = 0; if (share) @@ -77,7 +78,7 @@ QGLXContext::QGLXContext(QXlibScreen *screen, const QSurfaceFormat &format, QPla m_context = glXCreateNewContext(xDisplay,config,GLX_RGBA_TYPE,shareGlxContext,TRUE); m_windowFormat = qglx_surfaceFormatFromGLXFBConfig(xDisplay,config,m_context); } else { - XVisualInfo *visualInfo = qglx_findVisualInfo(xDisplay, screen->xScreenNumber(), format); + XVisualInfo *visualInfo = qglx_findVisualInfo(xDisplay, screen->xScreenNumber(), &m_windowFormat); if (!visualInfo) qFatal("Could not initialize GLX"); m_context = glXCreateContext(xDisplay, visualInfo, shareGlxContext, true); diff --git a/src/plugins/platforms/xlib/qxlibintegration.cpp b/src/plugins/platforms/xlib/qxlibintegration.cpp index 965f6ffcc51..65d4d231c8b 100644 --- a/src/plugins/platforms/xlib/qxlibintegration.cpp +++ b/src/plugins/platforms/xlib/qxlibintegration.cpp @@ -68,7 +68,7 @@ QXlibIntegration::QXlibIntegration() XInitThreads(); - mPrimaryScreen = new QXlibScreen(); + mPrimaryScreen = new QXlibScreen(mNativeInterface); mScreens.append(mPrimaryScreen); screenAdded(mPrimaryScreen); } diff --git a/src/plugins/platforms/xlib/qxlibintegration.h b/src/plugins/platforms/xlib/qxlibintegration.h index b76c6e85d8c..76c3f13ff65 100644 --- a/src/plugins/platforms/xlib/qxlibintegration.h +++ b/src/plugins/platforms/xlib/qxlibintegration.h @@ -54,6 +54,7 @@ QT_BEGIN_NAMESPACE class QXlibScreen; +class QXlibNativeInterface; class QXlibIntegration : public QPlatformIntegration { @@ -82,7 +83,7 @@ private: QList mScreens; QPlatformFontDatabase *mFontDb; QPlatformClipboard *mClipboard; - QPlatformNativeInterface *mNativeInterface; + QXlibNativeInterface *mNativeInterface; QAbstractEventDispatcher *mEventDispatcher; }; diff --git a/src/plugins/platforms/xlib/qxlibnativeinterface.cpp b/src/plugins/platforms/xlib/qxlibnativeinterface.cpp index 06f11773bbb..0519a365cff 100644 --- a/src/plugins/platforms/xlib/qxlibnativeinterface.cpp +++ b/src/plugins/platforms/xlib/qxlibnativeinterface.cpp @@ -92,6 +92,17 @@ void * QXlibNativeInterface::nativeResourceForWindow(const QByteArray &resourceS } return result; } +QPlatformNativeInterface::EventFilter QXlibNativeInterface::setEventFilter(const QByteArray &eventType, QPlatformNativeInterface::EventFilter filter) +{ + EventFilter oldFilter = m_eventFilters.value(eventType); + m_eventFilters.insert(eventType, filter); + return oldFilter; +} + +QPlatformNativeInterface::EventFilter QXlibNativeInterface::eventFilterForEventType(const QByteArray& eventType) const +{ + return m_eventFilters.value(eventType); +} void * QXlibNativeInterface::displayForWindow(QWindow *window) { diff --git a/src/plugins/platforms/xlib/qxlibnativeinterface.h b/src/plugins/platforms/xlib/qxlibnativeinterface.h index 8f68e61caff..9ec4ab51c81 100644 --- a/src/plugins/platforms/xlib/qxlibnativeinterface.h +++ b/src/plugins/platforms/xlib/qxlibnativeinterface.h @@ -60,6 +60,9 @@ public: void *nativeResourceForWindow(const QByteArray &resourceString, QWindow *window); + EventFilter setEventFilter(const QByteArray &eventType, EventFilter filter); + EventFilter eventFilterForEventType(const QByteArray& eventType) const; + void *displayForWindow(QWindow *window); void *eglDisplayForWindow(QWindow *window); void *connectionForWindow(QWindow *window); @@ -68,6 +71,7 @@ public: void *eglContextForWindow(QWindow *window); private: + QHash m_eventFilters; static QXlibScreen *qPlatformScreenForWindow(QWindow *window); }; diff --git a/src/plugins/platforms/xlib/qxlibscreen.cpp b/src/plugins/platforms/xlib/qxlibscreen.cpp index ed6f77d830b..fc903708b36 100644 --- a/src/plugins/platforms/xlib/qxlibscreen.cpp +++ b/src/plugins/platforms/xlib/qxlibscreen.cpp @@ -50,6 +50,7 @@ #include "qxlibstatic.h" #include "qxlibclipboard.h" #include "qxlibdisplay.h" +#include "qxlibnativeinterface.h" #include #include @@ -190,8 +191,9 @@ qDebug() << "qt_x_errhandler" << err->error_code; return 0; } -QXlibScreen::QXlibScreen() - : mFormat(QImage::Format_RGB32) +QXlibScreen::QXlibScreen(QXlibNativeInterface *nativeInterface) + : mNativeInterface(nativeInterface) + , mFormat(QImage::Format_RGB32) #if !defined(QT_NO_OPENGL) && defined(QT_OPENGL_ES_2) , mEGLDisplay(0) #endif @@ -263,6 +265,11 @@ unsigned long QXlibScreen::whitePixel() bool QXlibScreen::handleEvent(XEvent *xe) { + if (QPlatformNativeInterface::EventFilter filter = mNativeInterface->eventFilterForEventType(QByteArrayLiteral("XEvent"))) { + if (filter(xe, 0)) + return true; + } + int quit = false; QXlibWindow *platformWindow = QXlibWindow::platformWindowForXWindow(xe->xany.window); if (!platformWindow) diff --git a/src/plugins/platforms/xlib/qxlibscreen.h b/src/plugins/platforms/xlib/qxlibscreen.h index 3404243c2c1..c6672c35400 100644 --- a/src/plugins/platforms/xlib/qxlibscreen.h +++ b/src/plugins/platforms/xlib/qxlibscreen.h @@ -55,7 +55,7 @@ class QXlibScreen : public QObject, public QPlatformScreen { Q_OBJECT public: - QXlibScreen(); + QXlibScreen(QXlibNativeInterface *nativeInterface); ~QXlibScreen(); @@ -93,6 +93,7 @@ public slots: private: void handleSelectionRequest(XEvent *event); + QXlibNativeInterface *mNativeInterface; QRect mGeometry; QSizeF mPhysicalSize; int mDepth; diff --git a/src/plugins/platforms/xlib/qxlibwindow.cpp b/src/plugins/platforms/xlib/qxlibwindow.cpp index 635caf81f89..94c4332e657 100644 --- a/src/plugins/platforms/xlib/qxlibwindow.cpp +++ b/src/plugins/platforms/xlib/qxlibwindow.cpp @@ -82,11 +82,12 @@ QXlibWindow::QXlibWindow(QWindow *window) int w = window->width(); int h = window->height(); + mSurfaceFormat = window->requestedFormat(); + #if !defined(QT_NO_OPENGL) if(window->surfaceType() == QWindow::OpenGLSurface) { #if !defined(QT_OPENGL_ES_2) - XVisualInfo *visualInfo = qglx_findVisualInfo(mScreen->display()->nativeDisplay(), mScreen->xScreenNumber(), - window->format()); + XVisualInfo *visualInfo = qglx_findVisualInfo(mScreen->display()->nativeDisplay(), mScreen->xScreenNumber(), &mSurfaceFormat); if (!visualInfo) qFatal("Could not initialize GLX"); #else @@ -694,7 +695,7 @@ void QXlibWindow::setCursor(const Cursor &cursor) QSurfaceFormat QXlibWindow::format() const { - return window()->format(); + return mSurfaceFormat; } diff --git a/src/plugins/platforms/xlib/qxlibwindow.h b/src/plugins/platforms/xlib/qxlibwindow.h index 8287f3a8a2d..6b9e2d63bde 100644 --- a/src/plugins/platforms/xlib/qxlibwindow.h +++ b/src/plugins/platforms/xlib/qxlibwindow.h @@ -143,6 +143,8 @@ private: QImage::Format mFormat; Visual* mVisual; + QSurfaceFormat mSurfaceFormat; + GC createGC(); QPlatformOpenGLContext *mGLContext; diff --git a/src/plugins/plugins.pro b/src/plugins/plugins.pro index b92ccff9859..177f64c71b6 100644 --- a/src/plugins/plugins.pro +++ b/src/plugins/plugins.pro @@ -4,4 +4,6 @@ SUBDIRS *= sqldrivers bearer !contains(QT_CONFIG, no-gui): SUBDIRS *= imageformats !isEmpty(QT.widgets.name): SUBDIRS += accessible -SUBDIRS += platforms platforminputcontexts printsupport generic +SUBDIRS += platforms platforminputcontexts generic + +!wince*:SUBDIRS += printsupport diff --git a/src/sql/drivers/psql/qsql_psql.cpp b/src/sql/drivers/psql/qsql_psql.cpp index e3533581baf..ec31d54f0f1 100644 --- a/src/sql/drivers/psql/qsql_psql.cpp +++ b/src/sql/drivers/psql/qsql_psql.cpp @@ -107,18 +107,10 @@ template inline void PQfreemem(T *t, int = 0) { free(t); } -QT_BEGIN_NAMESPACE namespace QtPrivate { -template <> struct IsPointerToTypeDerivedFromQObject { - enum { Value = false }; -}; -} QT_END_NAMESPACE +Q_DECLARE_OPAQUE_POINTER(PGconn*) Q_DECLARE_METATYPE(PGconn*) -QT_BEGIN_NAMESPACE namespace QtPrivate { -template <> struct IsPointerToTypeDerivedFromQObject { - enum { Value = false }; -}; -} QT_END_NAMESPACE +Q_DECLARE_OPAQUE_POINTER(PGresult*) Q_DECLARE_METATYPE(PGresult*) QT_BEGIN_NAMESPACE diff --git a/src/sql/drivers/sqlite/qsql_sqlite.cpp b/src/sql/drivers/sqlite/qsql_sqlite.cpp index 962fc97dfc2..d2dc5af0703 100644 --- a/src/sql/drivers/sqlite/qsql_sqlite.cpp +++ b/src/sql/drivers/sqlite/qsql_sqlite.cpp @@ -59,18 +59,10 @@ #include -QT_BEGIN_NAMESPACE namespace QtPrivate { -template <> struct IsPointerToTypeDerivedFromQObject { - enum { Value = false }; -}; -} QT_END_NAMESPACE +Q_DECLARE_OPAQUE_POINTER(sqlite3*) Q_DECLARE_METATYPE(sqlite3*) -QT_BEGIN_NAMESPACE namespace QtPrivate { -template <> struct IsPointerToTypeDerivedFromQObject { - enum { Value = false }; -}; -} QT_END_NAMESPACE +Q_DECLARE_OPAQUE_POINTER(sqlite3_stmt*) Q_DECLARE_METATYPE(sqlite3_stmt*) QT_BEGIN_NAMESPACE diff --git a/src/sql/drivers/sqlite2/qsql_sqlite2.cpp b/src/sql/drivers/sqlite2/qsql_sqlite2.cpp index 46127923bf8..b42f82e8008 100644 --- a/src/sql/drivers/sqlite2/qsql_sqlite2.cpp +++ b/src/sql/drivers/sqlite2/qsql_sqlite2.cpp @@ -60,15 +60,10 @@ typedef struct sqlite_vm sqlite_vm; -QT_BEGIN_NAMESPACE namespace QtPrivate { -template <> struct IsPointerToTypeDerivedFromQObject { - enum { Value = false }; -}; -template <> struct IsPointerToTypeDerivedFromQObject { - enum { Value = false }; -}; -} QT_END_NAMESPACE +Q_DECLARE_OPAQUE_POINTER(sqlite_vm*) Q_DECLARE_METATYPE(sqlite_vm*) + +Q_DECLARE_OPAQUE_POINTER(sqlite*) Q_DECLARE_METATYPE(sqlite*) QT_BEGIN_NAMESPACE diff --git a/src/sql/drivers/tds/qsql_tds.cpp b/src/sql/drivers/tds/qsql_tds.cpp index 2a97a3c392f..b9414499d8f 100644 --- a/src/sql/drivers/tds/qsql_tds.cpp +++ b/src/sql/drivers/tds/qsql_tds.cpp @@ -63,6 +63,9 @@ #include +Q_DECLARE_OPAQUE_POINTER(LOGINREC*) +Q_DECLARE_OPAQUE_POINTER(DBPROCESS*) + QT_BEGIN_NAMESPACE #ifdef DBNTWIN32 @@ -127,18 +130,6 @@ QT_BEGIN_NAMESPACE #define CS_PUBLIC #endif -namespace QtPrivate { -template <> struct IsPointerToTypeDerivedFromQObject { - enum { Value = false }; -}; -} - -namespace QtPrivate { -template <> struct IsPointerToTypeDerivedFromQObject { - enum { Value = false }; -}; -} - QSqlError qMakeError(const QString& err, QSqlError::ErrorType type, int errNo = -1) { return QSqlError(QLatin1String("QTDS: ") + err, QString(), type, errNo); diff --git a/src/sql/kernel/qsqldatabase.cpp b/src/sql/kernel/qsqldatabase.cpp index d260588dd53..7b6a2b8c128 100644 --- a/src/sql/kernel/qsqldatabase.cpp +++ b/src/sql/kernel/qsqldatabase.cpp @@ -138,10 +138,7 @@ public: driver(dr), port(-1) { - if(driver) - precisionPolicy = driver->numericalPrecisionPolicy(); - else - precisionPolicy= QSql::LowPrecisionDouble; + precisionPolicy = QSql::LowPrecisionDouble; } QSqlDatabasePrivate(const QSqlDatabasePrivate &other); ~QSqlDatabasePrivate(); diff --git a/src/sql/models/qsqlquerymodel.h b/src/sql/models/qsqlquerymodel.h index 7db973b0d42..b5e1a7a7468 100644 --- a/src/sql/models/qsqlquerymodel.h +++ b/src/sql/models/qsqlquerymodel.h @@ -92,7 +92,7 @@ public: protected: virtual void queryChange(); - QModelIndex indexInQuery(const QModelIndex &item) const; + virtual QModelIndex indexInQuery(const QModelIndex &item) const; void setLastError(const QSqlError &error); QSqlQueryModel(QSqlQueryModelPrivate &dd, QObject *parent = 0); }; diff --git a/src/sql/models/qsqlrelationaltablemodel.cpp b/src/sql/models/qsqlrelationaltablemodel.cpp index e12976ef245..8dd18ca1d04 100644 --- a/src/sql/models/qsqlrelationaltablemodel.cpp +++ b/src/sql/models/qsqlrelationaltablemodel.cpp @@ -268,7 +268,7 @@ public: void clearCache(); void revertCachedRow(int row); - void translateFieldNames(int row, QSqlRecord &values) const; + void translateFieldNames(QSqlRecord &values) const; QSqlRelationalTableModel::JoinMode joinMode; }; @@ -299,9 +299,7 @@ void QSqlRelationalTableModelPrivate::revertCachedRow(int row) int QSqlRelationalTableModelPrivate::nameToIndex(const QString &name) const { - QString fieldname = name; - if (db.driver()->isIdentifierEscaped(fieldname, QSqlDriver::FieldName)) - fieldname = db.driver()->stripDelimiters(fieldname, QSqlDriver::FieldName); + QString fieldname = strippedFieldName(name); int idx = baseRec.indexOf(fieldname); if (idx == -1) { // If the name is an alias we can find it here. @@ -440,9 +438,9 @@ QVariant QSqlRelationalTableModel::data(const QModelIndex &index, int role) cons //already have the correct display value. if (d->strategy != OnFieldChange) { const QSqlTableModelPrivate::ModifiedRow row = d->cache.value(index.row()); - if (row.op != QSqlTableModelPrivate::None && row.rec.isGenerated(index.column())) { - if (d->strategy == OnManualSubmit || row.op != QSqlTableModelPrivate::Delete) { - QVariant v = row.rec.value(index.column()); + if (row.op() != QSqlTableModelPrivate::None && row.rec().isGenerated(index.column())) { + if (d->strategy == OnManualSubmit || row.op() != QSqlTableModelPrivate::Delete) { + QVariant v = row.rec().value(index.column()); if (v.isValid()) return relation.dictionary[v.toString()]; } @@ -746,16 +744,13 @@ void QSqlRelationalTableModel::setTable(const QString &table) /*! \internal */ -void QSqlRelationalTableModelPrivate::translateFieldNames(int row, QSqlRecord &values) const +void QSqlRelationalTableModelPrivate::translateFieldNames(QSqlRecord &values) const { - Q_Q(const QSqlRelationalTableModel); - for (int i = 0; i < values.count(); ++i) { - int realCol = q->indexInQuery(q->createIndex(row, i)).column(); - if (realCol != -1 && relations.value(realCol).isValid()) { + if (relations.value(i).isValid()) { QVariant v = values.value(i); bool gen = values.isGenerated(i); - values.replace(i, baseRec.field(realCol)); + values.replace(i, baseRec.field(i)); values.setValue(i, v); values.setGenerated(i, gen); } @@ -770,7 +765,7 @@ bool QSqlRelationalTableModel::updateRowInTable(int row, const QSqlRecord &value Q_D(QSqlRelationalTableModel); QSqlRecord rec = values; - d->translateFieldNames(row, rec); + d->translateFieldNames(rec); return QSqlTableModel::updateRowInTable(row, rec); } @@ -783,7 +778,7 @@ bool QSqlRelationalTableModel::insertRowIntoTable(const QSqlRecord &values) Q_D(QSqlRelationalTableModel); QSqlRecord rec = values; - d->translateFieldNames(0, rec); + d->translateFieldNames(rec); return QSqlTableModel::insertRowIntoTable(rec); } diff --git a/src/sql/models/qsqltablemodel.cpp b/src/sql/models/qsqltablemodel.cpp index ff325334408..932bbbfd6b0 100644 --- a/src/sql/models/qsqltablemodel.cpp +++ b/src/sql/models/qsqltablemodel.cpp @@ -67,11 +67,31 @@ QSqlRecord QSqlTableModelPrivate::record(const QVector &values) const } int QSqlTableModelPrivate::nameToIndex(const QString &name) const +{ + return rec.indexOf(strippedFieldName(name)); +} + +QString QSqlTableModelPrivate::strippedFieldName(const QString &name) const { QString fieldname = name; if (db.driver()->isIdentifierEscaped(fieldname, QSqlDriver::FieldName)) fieldname = db.driver()->stripDelimiters(fieldname, QSqlDriver::FieldName); - return rec.indexOf(fieldname); + return fieldname; +} + +int QSqlTableModelPrivate::insertCount(int maxRow) const +{ + int cnt = 0; + CacheMap::ConstIterator i = cache.constBegin(); + const CacheMap::ConstIterator e = cache.constEnd(); + for (; + i != e && (maxRow < 0 || i.key() <= maxRow); + ++i) { + if (i.value().op() == Insert) + ++cnt; + } + + return cnt; } void QSqlTableModelPrivate::initRecordAndPrimaryIndex() @@ -101,7 +121,12 @@ void QSqlTableModelPrivate::revertCachedRow(int row) { Q_Q(QSqlTableModel); ModifiedRow r = cache.value(row); - switch (r.op) { + + // cannot revert a committed change + if (r.submitted()) + return; + + switch (r.op()) { case QSqlTableModelPrivate::None: Q_ASSERT_X(false, "QSqlTableModelPrivate::revertCachedRow()", "Invalid entry in cache map"); return; @@ -174,23 +199,18 @@ bool QSqlTableModelPrivate::exec(const QString &stmt, bool prepStatement, return true; } -QSqlRecord QSqlTableModelPrivate::primaryValues(int row) +QSqlRecord QSqlTableModelPrivate::primaryValues(int row) const { - QSqlRecord record; - if (!query.seek(row)) { - error = query.lastError(); - return record; - } - if (primaryIndex.isEmpty()) { - record = rec; - for (int i = 0; i < record.count(); ++i) - record.setValue(i, query.value(i)); - } else { - record = primaryIndex; - for (int i = 0; i < record.count(); ++i) - record.setValue(i, query.value(rec.indexOf(record.fieldName(i)))); - } - return record; + Q_Q(const QSqlTableModel); + if (cache.value(row).op() == Insert) + return QSqlRecord(); + + QSqlRecord values(primaryIndex.isEmpty() ? rec : primaryIndex); + + for (int i = 0; i < values.count(); ++i) + values.setValue(i, q->QSqlQueryModel::data(createIndex(row, rec.indexOf(values.fieldName(i))), Qt::EditRole)); + + return values; } /*! @@ -251,7 +271,9 @@ QSqlRecord QSqlTableModelPrivate::primaryValues(int row) initiated in the given \a row of the currently active database table. The \a record parameter can be written to (since it is a reference), for example to populate some fields with default - values. + values and set the generated flags of the fields. Do not try to + edit the record via other means such as setData() or setRecord() + while handling this signal. */ /*! @@ -356,6 +378,12 @@ bool QSqlTableModel::select() if (query.isEmpty()) return false; + // clear the submitted flags so revertAll can do its job + for (QSqlTableModelPrivate::CacheMap::Iterator it = d->cache.begin(); + it != d->cache.constEnd(); + ++it) + it.value().setSubmitted(false); + revertAll(); QSqlQuery qu(query, d->db); setQuery(qu); @@ -377,38 +405,31 @@ QVariant QSqlTableModel::data(const QModelIndex &index, int role) const if (!index.isValid() || (role != Qt::DisplayRole && role != Qt::EditRole)) return QVariant(); - // Problem.. we need to use QSQM::indexInQuery to handle inserted columns - // but inserted rows we need to handle - // and indexInQuery is not virtual (grrr) so any values we pass to QSQM need - // to handle the insertedRows - QModelIndex item = indexInQuery(index); - if (d->cache.contains(index.row())) { const QSqlTableModelPrivate::ModifiedRow row = d->cache.value(index.row()); switch (d->strategy) { case OnFieldChange: case OnRowChange: - if (row.op == QSqlTableModelPrivate::Insert) { - if (item.column() < 0 || item.column() >= row.rec.count()) + if (row.op() == QSqlTableModelPrivate::Insert) { + if (index.column() < 0 || index.column() >= row.rec().count()) return QVariant(); - return row.rec.value(item.column()); - } else if (row.op == QSqlTableModelPrivate::Update) { - if (row.rec.isGenerated(item.column())) - return row.rec.value(item.column()); + return row.rec().value(index.column()); + } else if (row.op() == QSqlTableModelPrivate::Update) { + if (row.rec().isGenerated(index.column())) + return row.rec().value(index.column()); } break; case OnManualSubmit: - if (row.op == QSqlTableModelPrivate::Insert - || (row.op != QSqlTableModelPrivate::None - && row.rec.isGenerated(item.column()))) - return row.rec.value(item.column()); + if (row.op() == QSqlTableModelPrivate::Insert + || (row.op() != QSqlTableModelPrivate::None + && row.rec().isGenerated(index.column()))) + return row.rec().value(index.column()); break; } } - // We need to handle row mapping here, but not column mapping - return QSqlQueryModel::data(index.sibling(item.row(), index.column()), role); + return QSqlQueryModel::data(index, role); } /*! @@ -419,7 +440,7 @@ QVariant QSqlTableModel::headerData(int section, Qt::Orientation orientation, in Q_D(const QSqlTableModel); if (orientation == Qt::Vertical && role == Qt::DisplayRole) { if (d->cache.contains(section)) { - const QSqlTableModelPrivate::Op op = d->cache.value(section).op; + const QSqlTableModelPrivate::Op op = d->cache.value(section).op(); if (op == QSqlTableModelPrivate::Insert) return QLatin1String("*"); else if (op == QSqlTableModelPrivate::Delete) @@ -447,15 +468,15 @@ bool QSqlTableModel::isDirty(const QModelIndex &index) const return false; case OnRowChange: { const QSqlTableModelPrivate::ModifiedRow row = d->cache.value(index.row()); - return row.op == QSqlTableModelPrivate::Update - && row.rec.isGenerated(index.column()); + return row.op() == QSqlTableModelPrivate::Update + && row.rec().isGenerated(index.column()); } case OnManualSubmit: { const QSqlTableModelPrivate::ModifiedRow row = d->cache.value(index.row()); - return row.op == QSqlTableModelPrivate::Insert - || row.op == QSqlTableModelPrivate::Delete - || (row.op == QSqlTableModelPrivate::Update - && row.rec.isGenerated(index.column())); + return row.op() == QSqlTableModelPrivate::Insert + || row.op() == QSqlTableModelPrivate::Delete + || (row.op() == QSqlTableModelPrivate::Update + && row.rec().isGenerated(index.column())); } } return false; @@ -474,13 +495,16 @@ bool QSqlTableModel::isDirty(const QModelIndex &index) const bool QSqlTableModel::setData(const QModelIndex &index, const QVariant &value, int role) { Q_D(QSqlTableModel); + if (d->busyInsertingRows) + return false; + if (role != Qt::EditRole) return QSqlQueryModel::setData(index, value, role); if (!index.isValid() || index.column() >= d->rec.count() || index.row() >= rowCount()) return false; - if (d->strategy == OnFieldChange && d->cache.value(index.row()).op != QSqlTableModelPrivate::Insert) { + if (d->strategy == OnFieldChange && d->cache.value(index.row()).op() != QSqlTableModelPrivate::Insert) { d->cache.clear(); } else if (d->strategy == OnRowChange && !d->cache.isEmpty() && !d->cache.contains(index.row())) { submit(); @@ -489,39 +513,18 @@ bool QSqlTableModel::setData(const QModelIndex &index, const QVariant &value, in QSqlTableModelPrivate::ModifiedRow &row = d->cache[index.row()]; - if (row.op == QSqlTableModelPrivate::None) { + if (row.op() == QSqlTableModelPrivate::None) { row = QSqlTableModelPrivate::ModifiedRow(QSqlTableModelPrivate::Update, - d->rec, - d->primaryValues(indexInQuery(index).row())); + d->rec); } row.setValue(index.column(), value); + emit dataChanged(index, index); - bool isOk = true; - if (d->strategy == OnFieldChange && row.op != QSqlTableModelPrivate::Insert) { - // historical bug: bad style to call updateRowInTable. - // Should call submit(), but maybe the author wanted to avoid - // clearing the cache on failure. - isOk = updateRowInTable(index.row(), row.rec); - if (isOk) - select(); - } + if (d->strategy == OnFieldChange && row.op() != QSqlTableModelPrivate::Insert) + return submit(); - // historical bug: dataChanged() is suppressed for OnFieldChange and OnRowChange - // when operating on an "insert" record. This is to accomodate - // applications that call setData() while handling primeInsert(). - // Otherwise dataChanged() would be emitted between beginInsert() - // and endInsert(). - // The price of this workaround is that, although the view making - // the change will already display the new value, other views connected - // to the model probably will not. - // It's not clear why OnManualSubmit is excluded from this workaround. - // Calling setData() while handling primeInsert() is arguably very wrong anyway. - // primeInsert() provides a ref to the record for settings values. - if (d->strategy == OnManualSubmit || row.op != QSqlTableModelPrivate::Insert) - emit dataChanged(index, index); - - return isOk; + return true; } /*! @@ -558,7 +561,7 @@ bool QSqlTableModel::updateRowInTable(int row, const QSqlRecord &values) QSqlRecord rec(values); emit beforeUpdate(row, rec); - const QSqlRecord whereValues = d->strategy == OnManualSubmit ? d->cache[row].primaryValues : d->primaryValues(row); + const QSqlRecord whereValues = d->primaryValues(row); bool prepStatement = d->db.driver()->hasFeature(QSqlDriver::PreparedQueries); QString stmt = d->db.driver()->sqlStatement(QSqlDriver::UpdateStatement, d->tableName, rec, prepStatement); @@ -625,7 +628,7 @@ bool QSqlTableModel::deleteRowFromTable(int row) Q_D(QSqlTableModel); emit beforeDelete(row); - const QSqlRecord whereValues = d->strategy == OnManualSubmit ? d->cache[row].primaryValues : d->primaryValues(row); + const QSqlRecord whereValues = d->primaryValues(row); bool prepStatement = d->db.driver()->hasFeature(QSqlDriver::PreparedQueries); QString stmt = d->db.driver()->sqlStatement(QSqlDriver::DeleteStatement, d->tableName, @@ -665,16 +668,18 @@ bool QSqlTableModel::submitAll() { Q_D(QSqlTableModel); - for (QSqlTableModelPrivate::CacheMap::ConstIterator it = d->cache.constBegin(); + for (QSqlTableModelPrivate::CacheMap::Iterator it = d->cache.begin(); it != d->cache.constEnd(); ++it) { - switch (it.value().op) { + if (it.value().submitted()) + continue; + + switch (it.value().op()) { case QSqlTableModelPrivate::Insert: - if (!insertRowIntoTable(it.value().rec)) + if (!insertRowIntoTable(it.value().rec())) return false; - d->bottom = d->bottom.sibling(d->bottom.row() + 1, d->bottom.column()); break; case QSqlTableModelPrivate::Update: - if (!updateRowInTable(it.key(), it.value().rec)) + if (!updateRowInTable(it.key(), it.value().rec())) return false; break; case QSqlTableModelPrivate::Delete: @@ -685,6 +690,20 @@ bool QSqlTableModel::submitAll() Q_ASSERT_X(false, "QSqlTableModel::submitAll()", "Invalid cache operation"); break; } + it.value().setSubmitted(true); + } + + // all changes have been committed + + // clean up inserted rows + QSqlTableModelPrivate::CacheMap::Iterator it = d->cache.end(); + while (it != d->cache.constBegin()) { + --it; + if (it.value().op() == QSqlTableModelPrivate::Insert) { + beginRemoveRows(QModelIndex(), it.key(), it.key()); + it = d->cache.erase(it); + endRemoveRows(); + } } d->clearCache(); return select(); @@ -969,13 +988,20 @@ bool QSqlTableModel::removeColumns(int column, int count, const QModelIndex &par does not support hierarchical structures, \a parent must be an invalid model index. - Emits the beforeDelete() signal before a row is deleted. When - the edit strategy is OnManualSubmit signal emission is delayed - until submitAll() is called. + When the edit strategy is OnManualSubmit, deletion of rows from + the database is delayed until submitAll() is called; otherwise, + deletions are immediate. - Returns true if all rows could be removed; otherwise returns - false. Detailed error information can be retrieved using - lastError(). + Inserted but not yet submitted rows in the range to be removed + are immediately removed from the model. + + Before a row is deleted from the database, the beforeDelete() + signal is emitted. + + If row < 0 or row + count > rowCount(), no action is taken and + false is returned. Returns true if all rows could be removed; + otherwise returns false. Detailed database error information + can be retrieved using lastError(). \sa removeColumns(), insertRows() */ @@ -984,37 +1010,27 @@ bool QSqlTableModel::removeRows(int row, int count, const QModelIndex &parent) Q_D(QSqlTableModel); if (parent.isValid() || row < 0 || count <= 0) return false; + else if (row + count > rowCount()) + return false; + else if (!count) + return true; - int initialRowCount = rowCount(); - - int i; - for (i = 0; i < count && row + i < rowCount(); ++i) { + for (int i = 0; i < count; ++i) { int idx = row + i; - if (d->cache.value(idx).op == QSqlTableModelPrivate::Insert) { + if (d->cache.value(idx).op() == QSqlTableModelPrivate::Insert) { revertRow(idx); // Reverting a row means all the other cache entries have been adjusted downwards // so fake this by adjusting row --row; } else { - d->cache[idx] = QSqlTableModelPrivate::ModifiedRow(QSqlTableModelPrivate::Delete, - QSqlRecord(), - d->primaryValues(indexInQuery(createIndex(idx, 0)).row())); + d->cache[idx] = QSqlTableModelPrivate::ModifiedRow(QSqlTableModelPrivate::Delete); if (d->strategy == OnManualSubmit) emit headerDataChanged(Qt::Vertical, idx, idx); } } - if (d->strategy != OnManualSubmit && i > 0) - submit(); - - // historical bug: emit beforeDelete for 1st row beyond end - if (d->strategy != OnManualSubmit) { - if (row + count > initialRowCount) - emit beforeDelete(qMax(initialRowCount, row)); - } - - if (i < count) - return false; + if (d->strategy != OnManualSubmit) + return submit(); return true; } @@ -1045,6 +1061,7 @@ bool QSqlTableModel::insertRows(int row, int count, const QModelIndex &parent) if (d->strategy != OnManualSubmit && count != 1) return false; + d->busyInsertingRows = true; beginInsertRows(parent, row, row + count - 1); if (d->strategy != OnManualSubmit) @@ -1063,19 +1080,22 @@ bool QSqlTableModel::insertRows(int row, int count, const QModelIndex &parent) for (int i = 0; i < count; ++i) { d->cache[row + i] = QSqlTableModelPrivate::ModifiedRow(QSqlTableModelPrivate::Insert, d->rec); - emit primeInsert(row + i, d->cache[row + i].rec); + emit primeInsert(row + i, d->cache[row + i].recRef()); } endInsertRows(); + d->busyInsertingRows = false; return true; } /*! - Inserts the \a record after \a row. If \a row is negative, the - record will be appended to the end. Calls insertRows() and + Inserts the \a record at position \a row. If \a row is negative, + the record will be appended to the end. Calls insertRows() and setRecord() internally. - Returns true if the row could be inserted, otherwise false. + Only fields where the generated flag is true will be included. + + Returns true if the record could be inserted, otherwise false. \sa insertRows(), removeRows() */ @@ -1086,8 +1106,11 @@ bool QSqlTableModel::insertRecord(int row, const QSqlRecord &record) row = rowCount(); if (!insertRow(row, QModelIndex())) return false; - if (!setRecord(row, record)) + if (!setRecord(row, record)) { + if (d->strategy == OnManualSubmit) + revertRow(row); return false; + } if (d->strategy == OnFieldChange || d->strategy == OnRowChange) return submit(); return true; @@ -1102,13 +1125,7 @@ int QSqlTableModel::rowCount(const QModelIndex &parent) const if (parent.isValid()) return 0; - int rc = QSqlQueryModel::rowCount(); - for (QSqlTableModelPrivate::CacheMap::ConstIterator it = d->cache.constBegin(); - it != d->cache.constEnd(); ++it) { - if (it.value().op == QSqlTableModelPrivate::Insert) - ++rc; - } - return rc; + return QSqlQueryModel::rowCount() + d->insertCount(); } /*! @@ -1126,15 +1143,11 @@ int QSqlTableModel::rowCount(const QModelIndex &parent) const QModelIndex QSqlTableModel::indexInQuery(const QModelIndex &item) const { Q_D(const QSqlTableModel); - const QModelIndex it = QSqlQueryModel::indexInQuery(item); // this adjusts columns only - int rowOffset = 0; - QSqlTableModelPrivate::CacheMap::ConstIterator i = d->cache.constBegin(); - while (i != d->cache.constEnd() && i.key() <= it.row()) { - if (i.value().op == QSqlTableModelPrivate::Insert) - ++rowOffset; - ++i; - } - return createIndex(it.row() - rowOffset, it.column(), it.internalPointer()); + if (d->cache.value(item.row()).op() == QSqlTableModelPrivate::Insert) + return QModelIndex(); + + const int rowOffset = d->insertCount(item.row()); + return QSqlQueryModel::indexInQuery(createIndex(item.row() - rowOffset, item.column(), item.internalPointer())); } /*! @@ -1192,8 +1205,10 @@ Qt::ItemFlags QSqlTableModel::flags(const QModelIndex &index) const /*! Sets the values at the specified \a row to the values of \a - record. Returns true if all the values could be set; otherwise - returns false. + record for fields where generated flag is true. + + Returns true if all the values could be set; otherwise returns + false. \sa record() */ @@ -1201,50 +1216,44 @@ bool QSqlTableModel::setRecord(int row, const QSqlRecord &record) { Q_D(QSqlTableModel); Q_ASSERT_X(row >= 0, "QSqlTableModel::setRecord()", "Cannot set a record to a row less than 0"); + if (d->busyInsertingRows) + return false; + if (row >= rowCount()) return false; - if (d->strategy == OnFieldChange && d->cache.value(row).op != QSqlTableModelPrivate::Insert) + if (d->strategy == OnFieldChange && d->cache.value(row).op() != QSqlTableModelPrivate::Insert) d->cache.clear(); else if (d->strategy == OnRowChange && !d->cache.isEmpty() && !d->cache.contains(row)) submit(); - QSqlTableModelPrivate::ModifiedRow &mrow = d->cache[row]; - if (mrow.op == QSqlTableModelPrivate::None) - mrow = QSqlTableModelPrivate::ModifiedRow(QSqlTableModelPrivate::Update, - d->rec, - d->primaryValues(indexInQuery(createIndex(row, 0)).row())); - - bool isOk = true; + // Check field names and remember mapping + typedef QMap Map; + Map map; for (int i = 0; i < record.count(); ++i) { - int idx = d->nameToIndex(record.fieldName(i)); - if (idx == -1) { - isOk = false; - } else if (d->strategy != OnManualSubmit) { - // historical bug: this could all be simple like OnManualSubmit, but isn't - const QModelIndex cIndex = createIndex(row, idx); - // historical bug: comparing EditRole with DisplayRole values here - const QVariant oldValue = data(cIndex); - const QVariant value = record.value(i); - // historical bug: it's a bad idea to check for change here - // historical bug: should test oldValue.isNull() != value.isNull() - if (oldValue.isNull() || oldValue != value) { - // historical bug: dataChanged() is suppressed for Insert. See also setData(). - mrow.setValue(idx, record.value(i)); - if (mrow.op != QSqlTableModelPrivate::Insert) - emit dataChanged(cIndex, cIndex); - } - } else { - mrow.setValue(idx, record.value(i)); + if (record.isGenerated(i)) { + int idx = d->nameToIndex(record.fieldName(i)); + if (idx == -1) + return false; + map[i] = idx; } } - if (d->strategy == OnManualSubmit && isOk) + QSqlTableModelPrivate::ModifiedRow &mrow = d->cache[row]; + if (mrow.op() == QSqlTableModelPrivate::None) + mrow = QSqlTableModelPrivate::ModifiedRow(QSqlTableModelPrivate::Update, + d->rec); + + Map::const_iterator i = map.constBegin(); + const Map::const_iterator e = map.constEnd(); + for ( ; i != e; ++i) + mrow.setValue(i.value(), record.value(i.key())); + + if (columnCount()) emit dataChanged(createIndex(row, 0), createIndex(row, columnCount() - 1)); - else if (d->strategy == OnFieldChange) - return submitAll(); - else if (d->strategy == OnManualSubmit) - return isOk; + + if (d->strategy == OnFieldChange) + return submit(); return true; } diff --git a/src/sql/models/qsqltablemodel_p.h b/src/sql/models/qsqltablemodel_p.h index 56fd839a0ce..0ae6b53742f 100644 --- a/src/sql/models/qsqltablemodel_p.h +++ b/src/sql/models/qsqltablemodel_p.h @@ -66,10 +66,11 @@ public: QSqlTableModelPrivate() : sortColumn(-1), sortOrder(Qt::AscendingOrder), - strategy(QSqlTableModel::OnRowChange) + strategy(QSqlTableModel::OnRowChange), + busyInsertingRows(false) {} void clear(); - QSqlRecord primaryValues(int index); + QSqlRecord primaryValues(int index) const; virtual void clearCache(); QSqlRecord record(const QVector &values) const; @@ -77,6 +78,8 @@ public: const QSqlRecord &rec, const QSqlRecord &whereValues); virtual void revertCachedRow(int row); virtual int nameToIndex(const QString &name) const; + QString strippedFieldName(const QString &name) const; + int insertCount(int maxRow = -1) const; void initRecordAndPrimaryIndex(); QSqlDatabase db; @@ -85,6 +88,7 @@ public: Qt::SortOrder sortOrder; QSqlTableModel::EditStrategy strategy; + bool busyInsertingRows; QSqlQuery editQuery; QSqlIndex primaryIndex; @@ -93,22 +97,29 @@ public: enum Op { None, Insert, Update, Delete }; - struct ModifiedRow + class ModifiedRow { - inline ModifiedRow(Op o = None, const QSqlRecord &r = QSqlRecord(), const QSqlRecord &pVals = QSqlRecord()) - : op(o), rec(r), primaryValues(pVals) + public: + inline ModifiedRow(Op o = None, const QSqlRecord &r = QSqlRecord()) + : m_op(o), m_rec(r), m_submitted(false) { - for (int i = rec.count() - 1; i >= 0; --i) - rec.setGenerated(i, false); + for (int i = m_rec.count() - 1; i >= 0; --i) + m_rec.setGenerated(i, false); } + inline Op op() const { return m_op; } + inline QSqlRecord rec() const { return m_rec; } + inline QSqlRecord& recRef() { return m_rec; } inline void setValue(int c, const QVariant &v) { - rec.setValue(c, v); - rec.setGenerated(c, true); + m_rec.setValue(c, v); + m_rec.setGenerated(c, true); } - Op op; - QSqlRecord rec; - QSqlRecord primaryValues; + inline bool submitted() const { return m_submitted; } + inline void setSubmitted(bool b) { m_submitted = b; } + private: + Op m_op; + QSqlRecord m_rec; + bool m_submitted; }; typedef QMap CacheMap; diff --git a/src/src.pro b/src/src.pro index 9ef8bf43628..f3f6937c506 100644 --- a/src/src.pro +++ b/src/src.pro @@ -5,7 +5,8 @@ unset(SRC_SUBDIRS) win32:SRC_SUBDIRS += src_winmain !wince*:include(tools/tools.pro) SRC_SUBDIRS += src_corelib -SRC_SUBDIRS += src_network src_sql src_gui src_xml src_widgets src_printsupport src_testlib src_platformsupport +SRC_SUBDIRS += src_network src_sql src_gui src_xml src_widgets src_testlib src_platformsupport +!wince*:SRC_SUBDIRS += src_printsupport nacl: SRC_SUBDIRS -= src_network src_testlib contains(QT_CONFIG, dbus):SRC_SUBDIRS += src_dbus contains(QT_CONFIG, concurrent):SRC_SUBDIRS += src_concurrent @@ -35,8 +36,10 @@ src_plugins.subdir = $$QT_SOURCE_TREE/src/plugins src_plugins.target = sub-plugins src_widgets.subdir = $$QT_SOURCE_TREE/src/widgets src_widgets.target = sub-widgets -src_printsupport.subdir = $$QT_SOURCE_TREE/src/printsupport -src_printsupport.target = sub-printsupport +!wince*: { + src_printsupport.subdir = $$QT_SOURCE_TREE/src/printsupport + src_printsupport.target = sub-printsupport +} src_testlib.subdir = $$QT_SOURCE_TREE/src/testlib src_testlib.target = sub-testlib src_platformsupport.subdir = $$QT_SOURCE_TREE/src/platformsupport diff --git a/src/testlib/qsignaldumper.cpp b/src/testlib/qsignaldumper.cpp index d0a3af67646..4fd870b6446 100644 --- a/src/testlib/qsignaldumper.cpp +++ b/src/testlib/qsignaldumper.cpp @@ -76,7 +76,7 @@ static void qSignalDumperCallback(QObject *caller, int method_index, void **argv const QMetaObject *mo = caller->metaObject(); Q_ASSERT(mo); QMetaMethod member = mo->method(method_index); - Q_ASSERT(member.signature()); + Q_ASSERT(member.isValid()); if (QTest::ignoreClasses() && QTest::ignoreClasses()->contains(mo->className())) { ++QTest::ignoreLevel; @@ -132,7 +132,7 @@ static void qSignalDumperCallbackSlot(QObject *caller, int method_index, void ** const QMetaObject *mo = caller->metaObject(); Q_ASSERT(mo); QMetaMethod member = mo->method(method_index); - if (!member.signature()) + if (!member.isValid()) return; if (QTest::ignoreLevel || diff --git a/src/testlib/qtestcase.cpp b/src/testlib/qtestcase.cpp index 8a1d4bf44a6..56959ba62db 100644 --- a/src/testlib/qtestcase.cpp +++ b/src/testlib/qtestcase.cpp @@ -69,6 +69,11 @@ #include #ifdef Q_OS_WIN +#ifndef Q_OS_WINCE +# if !defined(Q_CC_MINGW) || (defined(Q_CC_MINGW) && defined(__MINGW64_VERSION_MAJOR)) +# include +# endif +#endif #include // for Sleep #endif #ifdef Q_OS_UNIX @@ -934,32 +939,24 @@ QT_BEGIN_NAMESPACE QTouchEventSequence is called (ie when the object returned runs out of scope). */ -static void installCoverageTool(const char * appname, const char * testname) +static bool installCoverageTool(const char * appname, const char * testname) { #ifdef __COVERAGESCANNER__ + if (!qgetenv("QT_TESTCOCOON_ACTIVE").isEmpty()) + return false; + // Set environment variable QT_TESTCOCOON_ACTIVE to prevent an eventual subtest from + // being considered as a stand-alone test regarding the coverage analysis. + qputenv("QT_TESTCOCOON_ACTIVE", "1"); + // Install Coverage Tool __coveragescanner_install(appname); __coveragescanner_testname(testname); __coveragescanner_clear(); + return true; #else Q_UNUSED(appname); Q_UNUSED(testname); -#endif -} - -static void saveCoverageTool(const char * appname, bool testfailed) -{ -#ifdef __COVERAGESCANNER__ - // install again to make sure the filename is correct. - // without this, a plugin or similar may have changed the filename. - __coveragescanner_install(appname); - __coveragescanner_teststate(testfailed ? "FAILED" : "PASSED"); - __coveragescanner_save(); - __coveragescanner_testname(""); - __coveragescanner_clear(); -#else - Q_UNUSED(appname); - Q_UNUSED(testfailed); + return false; #endif } @@ -1493,6 +1490,7 @@ static void qInvokeTestMethodDataEntry(char *slot) { /* Benchmarking: for each median iteration*/ + bool isBenchmark = false; int i = (QBenchmarkGlobalData::current->measurer->needsWarmupIteration()) ? -1 : 0; QList results; @@ -1502,13 +1500,10 @@ static void qInvokeTestMethodDataEntry(char *slot) /* Benchmarking: for each accumulation iteration*/ bool invokeOk; do { - QTestResult::setCurrentTestLocation(QTestResult::InitFunc); invokeMethod(QTest::currentTestObject, "init()"); - if (QTestResult::skipCurrentTest()) + if (QTestResult::skipCurrentTest() || QTestResult::currentTestFailed()) break; - QTestResult::setCurrentTestLocation(QTestResult::Func); - QBenchmarkTestMethodData::current->result = QBenchmarkResult(); QBenchmarkTestMethodData::current->resultAccepted = false; @@ -1522,24 +1517,30 @@ static void qInvokeTestMethodDataEntry(char *slot) if (!invokeOk) QTestResult::addFailure("Unable to execute slot", __FILE__, __LINE__); - QTestResult::setCurrentTestLocation(QTestResult::CleanupFunc); + isBenchmark = QBenchmarkTestMethodData::current->isBenchmark(); + + QTestResult::finishedCurrentTestData(); + invokeMethod(QTest::currentTestObject, "cleanup()"); - QTestResult::setCurrentTestLocation(QTestResult::NoWhere); + + // If the test isn't a benchmark, finalize the result after cleanup() has finished. + if (!isBenchmark) + QTestResult::finishedCurrentTestDataCleanup(); // If this test method has a benchmark, repeat until all measurements are // acceptable. // The QBENCHMARK macro increases the number of iterations for each run until // this happens. - } while (invokeOk - && QBenchmarkTestMethodData::current->isBenchmark() - && QBenchmarkTestMethodData::current->resultsAccepted() == false); + } while (invokeOk && isBenchmark + && QBenchmarkTestMethodData::current->resultsAccepted() == false + && !QTestResult::skipCurrentTest() && !QTestResult::currentTestFailed()); QBenchmarkTestMethodData::current->endDataRun(); - if (i > -1) // iteration -1 is the warmup iteration. - results.append(QBenchmarkTestMethodData::current->result); + if (!QTestResult::skipCurrentTest() && !QTestResult::currentTestFailed()) { + if (i > -1) // iteration -1 is the warmup iteration. + results.append(QBenchmarkTestMethodData::current->result); - if (QBenchmarkTestMethodData::current->isBenchmark() && - QBenchmarkGlobalData::current->verboseOutput) { + if (isBenchmark && QBenchmarkGlobalData::current->verboseOutput) { if (i == -1) { QTestLog::info(qPrintable( QString::fromLatin1("warmup stage result : %1") @@ -1550,12 +1551,19 @@ static void qInvokeTestMethodDataEntry(char *slot) .arg(QBenchmarkTestMethodData::current->result.value)), 0, 0); } } - } while (QBenchmarkTestMethodData::current->isBenchmark() - && (++i < QBenchmarkGlobalData::current->adjustMedianIterationCount())); + } + } while (isBenchmark + && (++i < QBenchmarkGlobalData::current->adjustMedianIterationCount()) + && !QTestResult::skipCurrentTest() && !QTestResult::currentTestFailed()); - if (QBenchmarkTestMethodData::current->isBenchmark() - && QBenchmarkTestMethodData::current->resultsAccepted()) - QTestLog::addBenchmarkResult(qMedian(results)); + // If the test is a benchmark, finalize the result after all iterations have finished. + if (isBenchmark) { + bool testPassed = !QTestResult::skipCurrentTest() && !QTestResult::currentTestFailed(); + QTestResult::finishedCurrentTestDataCleanup(); + // Only report benchmark figures if the test passed + if (testPassed && QBenchmarkTestMethodData::current->resultsAccepted()) + QTestLog::addBenchmarkResult(qMedian(results)); + } } /*! @@ -1593,7 +1601,6 @@ static bool qInvokeTestMethod(const char *slotName, const char *data=0) QTestResult::setCurrentGlobalTestData(gTable->testData(curGlobalDataIndex)); if (curGlobalDataIndex == 0) { - QTestResult::setCurrentTestLocation(QTestResult::DataFunc); qsnprintf(member, 512, "%s_data()", slot); invokeMethod(QTest::currentTestObject, member); } @@ -1747,16 +1754,16 @@ static void qInvokeTestMethods(QObject *testObject) QTEST_ASSERT(metaObject); QTestLog::startLogging(); QTestResult::setCurrentTestFunction("initTestCase"); - QTestResult::setCurrentTestLocation(QTestResult::DataFunc); QTestTable::globalTestTable(); invokeMethod(testObject, "initTestCase_data()"); if (!QTestResult::skipCurrentTest() && !QTest::currentTestFailed()) { - QTestResult::setCurrentTestLocation(QTestResult::InitFunc); invokeMethod(testObject, "initTestCase()"); - // finishedCurrentTestFunction() resets QTestResult::testFailed(), so use a local copy. - const bool previousFailed = QTestResult::testFailed(); + // finishedCurrentTestDataCleanup() resets QTestResult::currentTestFailed(), so use a local copy. + const bool previousFailed = QTestResult::currentTestFailed(); + QTestResult::finishedCurrentTestData(); + QTestResult::finishedCurrentTestDataCleanup(); QTestResult::finishedCurrentTestFunction(); if (!QTestResult::skipCurrentTest() && !previousFailed) { @@ -1788,6 +1795,8 @@ static void qInvokeTestMethods(QObject *testObject) QTestResult::setSkipCurrentTest(false); QTestResult::setCurrentTestFunction("cleanupTestCase"); invokeMethod(testObject, "cleanupTestCase()"); + QTestResult::finishedCurrentTestData(); + QTestResult::finishedCurrentTestDataCleanup(); } QTestResult::finishedCurrentTestFunction(); QTestResult::setCurrentTestFunction(0); @@ -1945,6 +1954,9 @@ int QTest::qExec(QObject *testObject, int argc, char **argv) #endif #if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) +# if !defined(Q_CC_MINGW) || (defined(Q_CC_MINGW) && defined(__MINGW64_VERSION_MAJOR)) + _CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_DEBUG); +# endif SetErrorMode(SetErrorMode(0) | SEM_NOGPFAULTERRORBOX); #endif @@ -1970,10 +1982,14 @@ int QTest::qExec(QObject *testObject, int argc, char **argv) const QMetaObject *metaObject = testObject->metaObject(); QTEST_ASSERT(metaObject); - installCoverageTool(argv[0], metaObject->className()); - QTestResult::setCurrentTestObject(metaObject->className()); + QTestResult::setCurrentAppname(argv[0]); + qtest_qParseArgs(argc, argv, false); + + bool installedTestCoverage = installCoverageTool(argv[0], metaObject->className()); + QTestLog::setInstalledTestCoverage(installedTestCoverage); + #ifdef QTESTLIB_USE_VALGRIND if (QBenchmarkGlobalData::current->mode() == QBenchmarkGlobalData::CallgrindParentProcess) { const QStringList origAppArgs(QCoreApplication::arguments()); @@ -2025,8 +2041,6 @@ int QTest::qExec(QObject *testObject, int argc, char **argv) } #endif - saveCoverageTool(argv[0], QTestLog::failCount()); - #ifdef QTESTLIB_USE_VALGRIND if (QBenchmarkGlobalData::current->mode() == QBenchmarkGlobalData::CallgrindParentProcess) return callgrindChildExitCode; diff --git a/src/testlib/qtestcase.h b/src/testlib/qtestcase.h index c721dfd0d94..e4f40204617 100644 --- a/src/testlib/qtestcase.h +++ b/src/testlib/qtestcase.h @@ -117,22 +117,11 @@ do { \ #define QTRY_COMPARE(__expr, __expected) QTRY_COMPARE_WITH_TIMEOUT(__expr, __expected, 5000) -#ifdef Q_CC_MSVC #define QSKIP(statement) \ do {\ QTest::qSkip(statement, __FILE__, __LINE__);\ return;\ } while (0) -#else -#define QSKIP(statement, ...) \ -do {\ - if (strcmp(#__VA_ARGS__, "") != 0)\ - QTest::qFail("The two argument version of QSKIP is no longer available. "\ - "Please update this test by removing the second argument in each QSKIP.", __FILE__, __LINE__);\ - QTest::qSkip(statement, __FILE__, __LINE__);\ - return;\ -} while (0) -#endif #define QEXPECT_FAIL(dataIndex, comment, mode)\ do {\ @@ -275,7 +264,7 @@ namespace QTest template bool qCompare(T1 const &, T2 const &, const char *, const char *, const char *, int); -#if defined(QT_COORD_TYPE) && (defined(QT_ARCH_ARM) || defined(QT_NO_FPU) || defined(QT_ARCH_WINDOWSCE)) +#if defined(QT_COORD_TYPE) && (defined(Q_PROCESSOR_ARM) || defined(QT_NO_FPU) || defined(Q_OS_WINCE)) template <> inline bool qCompare(qreal const &t1, float const &t2, const char *actual, const char *expected, const char *file, int line) @@ -290,7 +279,7 @@ namespace QTest return qCompare(qreal(t1), t2, actual, expected, file, line); } -#elif defined(QT_COORD_TYPE) || defined(QT_ARCH_ARM) || defined(QT_NO_FPU) || defined(QT_ARCH_WINDOWSCE) +#elif defined(QT_COORD_TYPE) || defined(Q_PROCESSOR_ARM) || defined(QT_NO_FPU) || defined(Q_OS_WINCE) template <> inline bool qCompare(qreal const &t1, double const &t2, const char *actual, const char *expected, const char *file, int line) diff --git a/src/testlib/qtestlog.cpp b/src/testlib/qtestlog.cpp index 7a4358a393a..c8487a2c54d 100644 --- a/src/testlib/qtestlog.cpp +++ b/src/testlib/qtestlog.cpp @@ -56,6 +56,26 @@ QT_BEGIN_NAMESPACE +static void saveCoverageTool(const char * appname, bool testfailed, bool installedTestCoverage) +{ +#ifdef __COVERAGESCANNER__ + if (!installedTestCoverage) + return; + // install again to make sure the filename is correct. + // without this, a plugin or similar may have changed the filename. + __coveragescanner_install(appname); + __coveragescanner_teststate(testfailed ? "FAILED" : "PASSED"); + __coveragescanner_save(); + __coveragescanner_testname(""); + __coveragescanner_clear(); + unsetenv("QT_TESTCOCOON_ACTIVE"); +#else + Q_UNUSED(appname); + Q_UNUSED(testfailed); + Q_UNUSED(installedTestCoverage); +#endif +} + namespace QTest { int fails = 0; @@ -182,6 +202,7 @@ namespace QTest { static int verbosity = 0; static int maxWarnings = 2002; + static bool installedTestCoverage = true; static QtMsgHandler oldMessageHandler; @@ -286,7 +307,6 @@ void QTestLog::leaveTestFunction() if (printAvailableTags) return; - QTest::IgnoreResultList::clearList(QTest::ignoreResultList); QTest::TestLoggers::leaveTestFunction(); } @@ -302,6 +322,11 @@ void QTestLog::printUnhandledIgnoreMessages() } } +void QTestLog::clearIgnoreMessages() +{ + QTest::IgnoreResultList::clearList(QTest::ignoreResultList); +} + void QTestLog::addPass(const char *msg) { if (printAvailableTags) @@ -368,6 +393,7 @@ void QTestLog::stopLogging() QTest::TestLoggers::stopLogging(); QTest::TestLoggers::destroyLoggers(); QTest::loggerUsingStdout = false; + saveCoverageTool(QTestResult::currentAppname(), failCount() != 0, QTestLog::installedTestCoverage()); } void QTestLog::addLogger(LogMode mode, const char *filename) @@ -481,4 +507,14 @@ void QTestLog::resetCounters() QTest::skips = 0; } +void QTestLog::setInstalledTestCoverage(bool installed) +{ + QTest::installedTestCoverage = installed; +} + +bool QTestLog::installedTestCoverage() +{ + return QTest::installedTestCoverage; +} + QT_END_NAMESPACE diff --git a/src/testlib/qtestlog_p.h b/src/testlib/qtestlog_p.h index e45d9c9626d..1a9754e4606 100644 --- a/src/testlib/qtestlog_p.h +++ b/src/testlib/qtestlog_p.h @@ -77,6 +77,7 @@ public: static void ignoreMessage(QtMsgType type, const char *msg); static int unhandledIgnoreMessages(); static void printUnhandledIgnoreMessages(); + static void clearIgnoreMessages(); static void warn(const char *msg, const char *file, int line); static void info(const char *msg, const char *file, int line); @@ -102,6 +103,9 @@ public: static void resetCounters(); + static void setInstalledTestCoverage(bool installed); + static bool installedTestCoverage(); + private: QTestLog(); ~QTestLog(); diff --git a/src/testlib/qtestresult.cpp b/src/testlib/qtestresult.cpp index 1fb5bddcbbd..14ab29af2b4 100644 --- a/src/testlib/qtestresult.cpp +++ b/src/testlib/qtestresult.cpp @@ -58,12 +58,12 @@ namespace QTest static const char *currentTestFunc = 0; static const char *currentTestObjectName = 0; static bool failed = false; - static bool dataFailed = false; static bool skipCurrentTest = false; - static QTestResult::TestLocation location = QTestResult::NoWhere; static const char *expectFailComment = 0; static int expectFailMode = 0; + + static const char *currentAppname = 0; } void QTestResult::reset() @@ -73,8 +73,6 @@ void QTestResult::reset() QTest::currentTestFunc = 0; QTest::currentTestObjectName = 0; QTest::failed = false; - QTest::dataFailed = false; - QTest::location = QTestResult::NoWhere; QTest::expectFailComment = 0; QTest::expectFailMode = 0; @@ -84,7 +82,7 @@ void QTestResult::reset() bool QTestResult::currentTestFailed() { - return QTest::dataFailed; + return QTest::failed; } QTestData *QTestResult::currentGlobalTestData() @@ -105,15 +103,13 @@ void QTestResult::setCurrentGlobalTestData(QTestData *data) void QTestResult::setCurrentTestData(QTestData *data) { QTest::currentTestData = data; - QTest::dataFailed = false; + QTest::failed = false; } void QTestResult::setCurrentTestFunction(const char *func) { QTest::currentTestFunc = func; QTest::failed = false; - if (!func) - QTest::location = NoWhere; if (func) QTestLog::enterTestFunction(func); } @@ -125,24 +121,35 @@ static void clearExpectFail() QTest::expectFailComment = 0; } -void QTestResult::finishedCurrentTestFunction() +void QTestResult::finishedCurrentTestData() { + if (QTest::expectFailMode) + addFailure("QEXPECT_FAIL was called without any subsequent verification statements", 0, 0); + clearExpectFail(); + if (!QTest::failed && QTestLog::unhandledIgnoreMessages()) { QTestLog::printUnhandledIgnoreMessages(); addFailure("Not all expected messages were received", 0, 0); } + QTestLog::clearIgnoreMessages(); +} +void QTestResult::finishedCurrentTestDataCleanup() +{ + // If the current test hasn't failed or been skipped, then it passes. if (!QTest::failed && !QTest::skipCurrentTest) { QTestLog::addPass(""); } + + QTest::failed = false; +} + +void QTestResult::finishedCurrentTestFunction() +{ QTest::currentTestFunc = 0; QTest::failed = false; - QTest::dataFailed = false; - QTest::location = NoWhere; QTestLog::leaveTestFunction(); - - clearExpectFail(); } const char *QTestResult::currentTestFunction() @@ -230,7 +237,10 @@ bool QTestResult::verify(bool statement, const char *statementStr, QTestLog::info(msg, file, line); } - qsnprintf(msg, 1024, "'%s' returned FALSE. (%s)", statementStr, description); + const char * format = QTest::expectFailMode + ? "'%s' returned TRUE unexpectedly. (%s)" + : "'%s' returned FALSE. (%s)"; + qsnprintf(msg, 1024, format, statementStr, description); return checkStatement(statement, msg, file, line); } @@ -268,7 +278,6 @@ void QTestResult::addFailure(const char *message, const char *file, int line) QTestLog::addFail(message, file, line); QTest::failed = true; - QTest::dataFailed = true; } void QTestResult::addSkip(const char *message, const char *file, int line) @@ -278,16 +287,6 @@ void QTestResult::addSkip(const char *message, const char *file, int line) QTestLog::addSkip(message, file, line); } -QTestResult::TestLocation QTestResult::currentTestLocation() -{ - return QTest::location; -} - -void QTestResult::setCurrentTestLocation(TestLocation loc) -{ - QTest::location = loc; -} - void QTestResult::setCurrentTestObject(const char *name) { QTest::currentTestObjectName = name; @@ -298,11 +297,6 @@ const char *QTestResult::currentTestObjectName() return QTest::currentTestObjectName ? QTest::currentTestObjectName : ""; } -bool QTestResult::testFailed() -{ - return QTest::failed; -} - void QTestResult::setSkipCurrentTest(bool value) { QTest::skipCurrentTest = value; @@ -313,4 +307,14 @@ bool QTestResult::skipCurrentTest() return QTest::skipCurrentTest; } +void QTestResult::setCurrentAppname(const char *appname) +{ + QTest::currentAppname = appname; +} + +const char *QTestResult::currentAppname() +{ + return QTest::currentAppname; +} + QT_END_NAMESPACE diff --git a/src/testlib/qtestresult_p.h b/src/testlib/qtestresult_p.h index fc7f8347562..b060926f2ae 100644 --- a/src/testlib/qtestresult_p.h +++ b/src/testlib/qtestresult_p.h @@ -63,16 +63,15 @@ class QTestData; class Q_TESTLIB_EXPORT QTestResult { public: - enum TestLocation { NoWhere = 0, DataFunc = 1, InitFunc = 2, Func = 3, CleanupFunc = 4 }; - static const char *currentTestObjectName(); static bool currentTestFailed(); static QTestData *currentTestData(); static QTestData *currentGlobalTestData(); static const char *currentTestFunction(); - static TestLocation currentTestLocation(); static const char *currentDataTag(); static const char *currentGlobalDataTag(); + static void finishedCurrentTestData(); + static void finishedCurrentTestDataCleanup(); static void finishedCurrentTestFunction(); static void reset(); @@ -84,17 +83,18 @@ public: static void setCurrentGlobalTestData(QTestData *data); static void setCurrentTestData(QTestData *data); static void setCurrentTestFunction(const char *func); - static void setCurrentTestLocation(TestLocation loc); static void setCurrentTestObject(const char *name); static void addSkip(const char *message, const char *file, int line); static bool expectFail(const char *dataIndex, const char *comment, QTest::TestFailMode mode, const char *file, int line); static bool verify(bool statement, const char *statementStr, const char *extraInfo, const char *file, int line); - static bool testFailed(); static void setSkipCurrentTest(bool value); static bool skipCurrentTest(); + static void setCurrentAppname(const char *appname); + static const char *currentAppname(); + private: Q_DISABLE_COPY(QTestResult) }; diff --git a/src/testlib/qxmltestlogger.cpp b/src/testlib/qxmltestlogger.cpp index 28ae6ff0954..7e5da206806 100644 --- a/src/testlib/qxmltestlogger.cpp +++ b/src/testlib/qxmltestlogger.cpp @@ -118,7 +118,7 @@ void QXmlTestLogger::startLogging() QTest::qt_asprintf(&buf, "\n" " %s\n" - " "QTEST_VERSION_STR"\n" + " " QTEST_VERSION_STR "\n" "\n", qVersion()); outputString(buf.constData()); } diff --git a/src/tools/bootstrap/bootstrap.pri b/src/tools/bootstrap/bootstrap.pri index 8a368cb228b..e34cc5c0330 100644 --- a/src/tools/bootstrap/bootstrap.pri +++ b/src/tools/bootstrap/bootstrap.pri @@ -60,7 +60,7 @@ hpux-acc*|hpuxi-acc* { else:if(unix|win32-g++*):LIBS_PRIVATE += -lz else:LIBS += zdll.lib } -win32:LIBS += -luser32 +win32:LIBS += -luser32 -lole32 mac { CONFIG -= incremental diff --git a/src/tools/bootstrap/bootstrap.pro b/src/tools/bootstrap/bootstrap.pro index fdf41c55c24..1d641d23018 100644 --- a/src/tools/bootstrap/bootstrap.pro +++ b/src/tools/bootstrap/bootstrap.pro @@ -43,6 +43,7 @@ DEPENDPATH += $$INCLUDEPATH \ ../../corelib/tools \ ../../corelib/io \ ../../corelib/codecs \ + ../../corelib/json \ ../../xml SOURCES += \ @@ -72,6 +73,7 @@ SOURCES += \ ../../corelib/kernel/qmetatype.cpp \ ../../corelib/kernel/qvariant.cpp \ ../../corelib/kernel/qsystemerror.cpp \ + ../../corelib/plugin/quuid.cpp \ ../../corelib/tools/qbitarray.cpp \ ../../corelib/tools/qbytearray.cpp \ ../../corelib/tools/qbytearraymatcher.cpp \ @@ -88,6 +90,13 @@ SOURCES += \ ../../corelib/tools/qvsnprintf.cpp \ ../../corelib/xml/qxmlutils.cpp \ ../../corelib/xml/qxmlstream.cpp \ + ../../corelib/json/qjson.cpp \ + ../../corelib/json/qjsondocument.cpp \ + ../../corelib/json/qjsonobject.cpp \ + ../../corelib/json/qjsonarray.cpp \ + ../../corelib/json/qjsonvalue.cpp \ + ../../corelib/json/qjsonparser.cpp \ + ../../corelib/json/qjsonwriter.cpp \ ../../xml/dom/qdom.cpp \ ../../xml/sax/qxml.cpp diff --git a/src/tools/moc/generator.cpp b/src/tools/moc/generator.cpp index b4f3d23f4e7..3362a1abc1d 100644 --- a/src/tools/moc/generator.cpp +++ b/src/tools/moc/generator.cpp @@ -43,25 +43,30 @@ #include "outputrevision.h" #include "utils.h" #include +#include +#include +#include +#include +#include #include #include //for the flags. QT_BEGIN_NAMESPACE -uint qvariant_nameToType(const char* name) +uint qvariant_nameToType(const QByteArray &name) { - if (!name) + if (name.isEmpty()) return 0; - uint tp = QMetaType::type(name); + uint tp = QMetaType::type(name.constData()); return tp < QMetaType::User ? tp : 0; } /* Returns true if the type is a QVariant types. */ -bool isVariantType(const char* type) +bool isVariantType(const QByteArray &type) { return qvariant_nameToType(type) != 0; } @@ -69,9 +74,9 @@ bool isVariantType(const char* type) /*! Returns true if the type is qreal. */ -static bool isQRealType(const char *type) +static bool isQRealType(const QByteArray &type) { - return strcmp(type, "qreal") == 0; + return (type == "qreal"); } Generator::Generator(ClassDef *classDef, const QList &metaTypes, FILE *outfile) @@ -104,11 +109,9 @@ static inline int lengthOfEscapeSequence(const QByteArray &s, int i) return i - startPos; } -int Generator::strreg(const char *s) +int Generator::strreg(const QByteArray &s) { int idx = 0; - if (!s) - s = ""; for (int i = 0; i < strings.size(); ++i) { const QByteArray &str = strings.at(i); if (str == s) @@ -135,13 +138,11 @@ void Generator::generateCode() // // build the data array // - int i = 0; - // filter out undeclared enumerators and sets { QList enumList; - for (i = 0; i < cdef->enumList.count(); ++i) { + for (int i = 0; i < cdef->enumList.count(); ++i) { EnumDef def = cdef->enumList.at(i); if (cdef->enumDeclarations.contains(def.name)) { enumList += def; @@ -159,7 +160,7 @@ void Generator::generateCode() QByteArray qualifiedClassNameIdentifier = cdef->qualified; qualifiedClassNameIdentifier.replace(':', '_'); - int index = 14; + int index = MetaObjectPrivateFieldCount; fprintf(out, "static const uint qt_meta_data_%s[] = {\n", qualifiedClassNameIdentifier.constData()); fprintf(out, "\n // content:\n"); fprintf(out, " %4d, // revision\n", int(QMetaObjectPrivate::OutputRevision)); @@ -181,7 +182,7 @@ void Generator::generateCode() fprintf(out, " %4d, %4d, // enums/sets\n", cdef->enumList.count(), cdef->enumList.count() ? index : 0); int enumsIndex = index; - for (i = 0; i < cdef->enumList.count(); ++i) + for (int i = 0; i < cdef->enumList.count(); ++i) index += 4 + (cdef->enumList.at(i).values.count() * 2); fprintf(out, " %4d, %4d, // constructors\n", isConstructible ? cdef->constructorList.count() : 0, isConstructible ? index : 0); @@ -247,7 +248,7 @@ void Generator::generateCode() fprintf(out, " \""); int col = 0; int len = 0; - for (i = 0; i < strings.size(); ++i) { + for (int i = 0; i < strings.size(); ++i) { QByteArray s = strings.at(i); len = s.length(); if (col && col + len >= 72) { @@ -384,7 +385,7 @@ void Generator::generateCode() for (int i = 1; i < cdef->superclassList.size(); ++i) { // for all superclasses but the first one if (cdef->superclassList.at(i).second == FunctionDef::Private) continue; - const char *cname = cdef->superclassList.at(i).first; + const char *cname = cdef->superclassList.at(i).first.constData(); fprintf(out, " if (!strcmp(_clname, \"%s\"))\n return static_cast< %s*>(const_cast< %s*>(this));\n", cname, cname, cdef->classname.constData()); } @@ -421,6 +422,11 @@ void Generator::generateCode() // for (int signalindex = 0; signalindex < cdef->signalList.size(); ++signalindex) generateSignal(&cdef->signalList[signalindex], signalindex); + +// +// Generate plugin meta data +// + generatePluginMetaData(); } @@ -437,7 +443,7 @@ void Generator::generateClassInfos() } } -void Generator::generateFunctions(QList& list, const char *functype, int type) +void Generator::generateFunctions(const QList& list, const char *functype, int type) { if (list.isEmpty()) return; @@ -486,7 +492,7 @@ void Generator::generateFunctions(QList& list, const char *functype } } -void Generator::generateFunctionRevisions(QList& list, const char *functype) +void Generator::generateFunctionRevisions(const QList& list, const char *functype) { if (list.count()) fprintf(out, "\n // %ss: revision\n", functype); @@ -1051,4 +1057,46 @@ void Generator::generateSignal(FunctionDef *def,int index) fprintf(out, "}\n"); } +void Generator::generatePluginMetaData() +{ + if (cdef->pluginData.iid.isEmpty()) + return; + + QJsonObject data; + data.insert(QLatin1String("IID"), QLatin1String(cdef->pluginData.iid.constData())); + data.insert(QLatin1String("className"), QLatin1String(cdef->classname.constData())); + data.insert(QLatin1String("version"), (int)QT_VERSION); + data.insert(QLatin1String("debug"), +#ifdef QT_NO_DEBUG + false +#else + true +#endif + ); + data.insert(QLatin1String("MetaData"), cdef->pluginData.metaData.object()); + QJsonDocument doc(data); + + fprintf(out, "\nQT_PLUGIN_METADATA_SECTION const uint qt_section_alignment_dummy = 42;\n"); + fprintf(out, + "\nQT_PLUGIN_METADATA_SECTION\n" + "static const unsigned char qt_pluginMetaData[] = {\n" + " 'Q', 'T', 'M', 'E', 'T', 'A', 'D', 'A', 'T', 'A', ' ', ' ',\n "); +#if 0 + fprintf(out, "\"%s\";\n", doc.toJson().constData()); +#else + QByteArray binary = doc.toBinaryData(); + for (int i = 0; i < binary.size() - 1; ++i) { + fprintf(out, " 0x%02x,", (uchar)binary.at(i)); + if (!((i + 1) % 8)) + fprintf(out, "\n "); + } + fprintf(out, " 0x%02x\n};\n", (uchar)binary.at(binary.size() - 1)); +#endif + // 'Use' all namespaces. + int pos = cdef->qualified.indexOf("::"); + for ( ; pos != -1 ; pos = cdef->qualified.indexOf("::", pos + 2) ) + fprintf(out, "using namespace %s;\n", cdef->qualified.left(pos).constData()); + fprintf(out, "QT_MOC_EXPORT_PLUGIN(%s)\n\n", cdef->classname.constData()); +} + QT_END_NAMESPACE diff --git a/src/tools/moc/generator.h b/src/tools/moc/generator.h index a3dc3d00418..46eee4ca06c 100644 --- a/src/tools/moc/generator.h +++ b/src/tools/moc/generator.h @@ -56,15 +56,16 @@ public: void generateCode(); private: void generateClassInfos(); - void generateFunctions(QList &list, const char *functype, int type); - void generateFunctionRevisions(QList& list, const char *functype); + void generateFunctions(const QList &list, const char *functype, int type); + void generateFunctionRevisions(const QList& list, const char *functype); void generateEnums(int index); void generateProperties(); void generateMetacall(); void generateStaticMetacall(); void generateSignal(FunctionDef *def, int index); + void generatePluginMetaData(); - int strreg(const char *); // registers a string and returns its id + int strreg(const QByteArray &); // registers a string and returns its id QList strings; QByteArray purestSuperClass; QList metaTypes; diff --git a/src/tools/moc/keywords.cpp b/src/tools/moc/keywords.cpp index 7a6b44074b5..f6151bdbf5b 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,532,529,0,0,0,0,0, + {0,0,0,0,0,0,0,0,0,546,543,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 532,252,530,533,0,38,239,531,25,26,236,234,30,235,27,237, + 546,252,544,547,0,38,239,545,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,534,32,238,8, + 8,21,8,8,8,8,8,8,8,8,8,31,548,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, @@ -129,7 +129,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,290,222,0,0,461,0,0,0, + 0,0,0,0,0,0,0,0,290,222,0,0,475,0,0,0, 0,0,0,0,55,0,0,330,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, @@ -168,7 +168,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,485,0,0,0,0,0,0,0,0,0,0,357, + 0,0,0,0,499,0,0,0,0,0,0,0,0,0,0,357, 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, @@ -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, - 537,537,537,537,537,537,537,537,537,537,0,0,0,0,0,0, + 551,551,551,551,551,551,551,551,551,551,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,536,0,0,0,0,535, + 0,0,0,0,0,0,0,0,0,0,550,0,0,0,0,549, 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, @@ -385,21 +385,29 @@ 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,458,0,0,0,300,0,0,0,0,0,0,0,0,0,0, + 0,472,0,0,0,300,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,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,521,436,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,453,402,392,397,364,0,462,0,0,0,0,0,358, + 370,0,535,450,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, 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,475,0,0,0,0,0,372, + 0,0,0,0,0,0,0,0,0,0,0,0,378,0,0,0, + 0,0,371,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,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,489,0,0,0,0,0,372, 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}, @@ -407,7 +415,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,418,396,0,0,401,0,0,0,410,0,0, + 0,0,0,0,0,432,410,0,0,415,0,0,0,424,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}, @@ -415,7 +423,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,504,0,437,0,0,0,465,0,0,471,0,0,0, + 0,0,0,518,0,451,0,0,0,479,0,0,485,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}, @@ -424,7 +432,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,450,0,497,0,0,0,0,0,0,0,0,0, + 0,0,0,0,464,0,511,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, @@ -432,7 +440,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, - 513,0,0,481,0,0,0,0,0,0,0,0,0,0,0,0, + 527,0,0,495,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} }; @@ -815,164 +823,178 @@ static const struct {CHARACTER, 0, 69, 368, CHARACTER}, {CHARACTER, 0, 84, 369, CHARACTER}, {Q_GADGET_TOKEN, 0, 0, 0, CHARACTER}, - {CHARACTER, 0, 82, 371, CHARACTER}, {CHARACTER, 44, 0, 0, CHARACTER}, + {CHARACTER, 45, 0, 0, CHARACTER}, {CHARACTER, 0, 80, 373, CHARACTER}, {CHARACTER, 0, 69, 374, CHARACTER}, {CHARACTER, 0, 82, 375, CHARACTER}, {CHARACTER, 0, 84, 376, CHARACTER}, {CHARACTER, 0, 89, 377, CHARACTER}, {Q_PROPERTY_TOKEN, 0, 0, 0, CHARACTER}, - {CHARACTER, 0, 78, 379, CHARACTER}, - {CHARACTER, 0, 85, 380, CHARACTER}, - {CHARACTER, 0, 77, 381, CHARACTER}, - {CHARACTER, 0, 83, 382, CHARACTER}, + {CHARACTER, 0, 85, 379, CHARACTER}, + {CHARACTER, 0, 71, 380, CHARACTER}, + {CHARACTER, 0, 73, 381, CHARACTER}, + {CHARACTER, 0, 78, 382, CHARACTER}, + {CHARACTER, 0, 95, 383, CHARACTER}, + {CHARACTER, 0, 77, 384, CHARACTER}, + {CHARACTER, 0, 69, 385, CHARACTER}, + {CHARACTER, 0, 84, 386, CHARACTER}, + {CHARACTER, 0, 65, 387, CHARACTER}, + {CHARACTER, 0, 68, 388, CHARACTER}, + {CHARACTER, 0, 65, 389, CHARACTER}, + {CHARACTER, 0, 84, 390, CHARACTER}, + {CHARACTER, 0, 65, 391, CHARACTER}, + {Q_PLUGIN_METADATA_TOKEN, 0, 0, 0, CHARACTER}, + {CHARACTER, 0, 78, 393, CHARACTER}, + {CHARACTER, 0, 85, 394, CHARACTER}, + {CHARACTER, 0, 77, 395, CHARACTER}, + {CHARACTER, 0, 83, 396, CHARACTER}, {Q_ENUMS_TOKEN, 0, 0, 0, CHARACTER}, - {CHARACTER, 0, 76, 384, CHARACTER}, - {CHARACTER, 0, 65, 385, CHARACTER}, - {CHARACTER, 0, 71, 386, CHARACTER}, - {CHARACTER, 0, 83, 387, CHARACTER}, + {CHARACTER, 0, 76, 398, CHARACTER}, + {CHARACTER, 0, 65, 399, CHARACTER}, + {CHARACTER, 0, 71, 400, CHARACTER}, + {CHARACTER, 0, 83, 401, CHARACTER}, {Q_FLAGS_TOKEN, 0, 0, 0, CHARACTER}, - {CHARACTER, 0, 69, 389, CHARACTER}, - {CHARACTER, 0, 67, 390, CHARACTER}, - {CHARACTER, 0, 76, 391, CHARACTER}, - {CHARACTER, 0, 65, 392, CHARACTER}, - {CHARACTER, 0, 82, 393, CHARACTER}, - {CHARACTER, 0, 69, 394, CHARACTER}, - {CHARACTER, 0, 95, 395, CHARACTER}, - {CHARACTER, 45, 0, 0, CHARACTER}, - {CHARACTER, 0, 76, 397, CHARACTER}, - {CHARACTER, 0, 65, 398, CHARACTER}, - {CHARACTER, 0, 71, 399, CHARACTER}, - {CHARACTER, 0, 83, 400, CHARACTER}, - {Q_DECLARE_FLAGS_TOKEN, 0, 0, 0, CHARACTER}, - {CHARACTER, 0, 78, 402, CHARACTER}, - {CHARACTER, 0, 84, 403, CHARACTER}, - {CHARACTER, 0, 69, 404, CHARACTER}, - {CHARACTER, 0, 82, 405, CHARACTER}, - {CHARACTER, 0, 70, 406, CHARACTER}, - {CHARACTER, 0, 65, 407, CHARACTER}, - {CHARACTER, 0, 67, 408, CHARACTER}, - {CHARACTER, 0, 69, 409, CHARACTER}, - {Q_DECLARE_INTERFACE_TOKEN, 0, 0, 0, CHARACTER}, - {CHARACTER, 0, 69, 411, CHARACTER}, - {CHARACTER, 0, 84, 412, CHARACTER}, - {CHARACTER, 0, 65, 413, CHARACTER}, - {CHARACTER, 0, 84, 414, CHARACTER}, - {CHARACTER, 0, 89, 415, CHARACTER}, - {CHARACTER, 0, 80, 416, CHARACTER}, - {CHARACTER, 0, 69, 417, CHARACTER}, - {Q_DECLARE_METATYPE_TOKEN, 0, 0, 0, CHARACTER}, - {CHARACTER, 0, 88, 419, CHARACTER}, - {CHARACTER, 0, 84, 420, CHARACTER}, - {CHARACTER, 0, 69, 421, CHARACTER}, - {CHARACTER, 0, 78, 422, CHARACTER}, - {CHARACTER, 0, 83, 423, CHARACTER}, - {CHARACTER, 0, 73, 424, CHARACTER}, - {CHARACTER, 0, 79, 425, CHARACTER}, - {CHARACTER, 0, 78, 426, CHARACTER}, - {CHARACTER, 0, 95, 427, CHARACTER}, - {CHARACTER, 0, 73, 428, CHARACTER}, - {CHARACTER, 0, 78, 429, CHARACTER}, - {CHARACTER, 0, 84, 430, CHARACTER}, - {CHARACTER, 0, 69, 431, CHARACTER}, - {CHARACTER, 0, 82, 432, CHARACTER}, - {CHARACTER, 0, 70, 433, CHARACTER}, - {CHARACTER, 0, 65, 434, CHARACTER}, - {CHARACTER, 0, 67, 435, CHARACTER}, - {CHARACTER, 0, 69, 409, CHARACTER}, + {CHARACTER, 0, 69, 403, CHARACTER}, + {CHARACTER, 0, 67, 404, CHARACTER}, + {CHARACTER, 0, 76, 405, CHARACTER}, + {CHARACTER, 0, 65, 406, CHARACTER}, + {CHARACTER, 0, 82, 407, CHARACTER}, + {CHARACTER, 0, 69, 408, CHARACTER}, + {CHARACTER, 0, 95, 409, CHARACTER}, {CHARACTER, 46, 0, 0, CHARACTER}, - {CHARACTER, 0, 84, 438, CHARACTER}, - {CHARACTER, 0, 83, 387, CHARACTER}, - {CHARACTER, 0, 76, 440, CHARACTER}, - {CHARACTER, 0, 65, 441, CHARACTER}, - {CHARACTER, 0, 83, 442, CHARACTER}, - {CHARACTER, 0, 83, 443, CHARACTER}, - {CHARACTER, 0, 73, 444, CHARACTER}, - {CHARACTER, 0, 78, 445, CHARACTER}, - {CHARACTER, 0, 70, 446, CHARACTER}, - {CHARACTER, 0, 79, 447, CHARACTER}, - {Q_CLASSINFO_TOKEN, 0, 0, 0, CHARACTER}, - {CHARACTER, 0, 78, 449, CHARACTER}, + {CHARACTER, 0, 76, 411, CHARACTER}, + {CHARACTER, 0, 65, 412, CHARACTER}, + {CHARACTER, 0, 71, 413, CHARACTER}, + {CHARACTER, 0, 83, 414, CHARACTER}, + {Q_DECLARE_FLAGS_TOKEN, 0, 0, 0, CHARACTER}, + {CHARACTER, 0, 78, 416, CHARACTER}, + {CHARACTER, 0, 84, 417, CHARACTER}, + {CHARACTER, 0, 69, 418, CHARACTER}, + {CHARACTER, 0, 82, 419, CHARACTER}, + {CHARACTER, 0, 70, 420, CHARACTER}, + {CHARACTER, 0, 65, 421, CHARACTER}, + {CHARACTER, 0, 67, 422, CHARACTER}, + {CHARACTER, 0, 69, 423, CHARACTER}, + {Q_DECLARE_INTERFACE_TOKEN, 0, 0, 0, CHARACTER}, + {CHARACTER, 0, 69, 425, CHARACTER}, + {CHARACTER, 0, 84, 426, CHARACTER}, + {CHARACTER, 0, 65, 427, CHARACTER}, + {CHARACTER, 0, 84, 428, CHARACTER}, + {CHARACTER, 0, 89, 429, CHARACTER}, + {CHARACTER, 0, 80, 430, CHARACTER}, + {CHARACTER, 0, 69, 431, CHARACTER}, + {Q_DECLARE_METATYPE_TOKEN, 0, 0, 0, CHARACTER}, + {CHARACTER, 0, 88, 433, CHARACTER}, + {CHARACTER, 0, 84, 434, CHARACTER}, + {CHARACTER, 0, 69, 435, CHARACTER}, + {CHARACTER, 0, 78, 436, CHARACTER}, + {CHARACTER, 0, 83, 437, CHARACTER}, + {CHARACTER, 0, 73, 438, CHARACTER}, + {CHARACTER, 0, 79, 439, CHARACTER}, + {CHARACTER, 0, 78, 440, CHARACTER}, + {CHARACTER, 0, 95, 441, CHARACTER}, + {CHARACTER, 0, 73, 442, CHARACTER}, + {CHARACTER, 0, 78, 443, CHARACTER}, + {CHARACTER, 0, 84, 444, CHARACTER}, + {CHARACTER, 0, 69, 445, CHARACTER}, + {CHARACTER, 0, 82, 446, CHARACTER}, + {CHARACTER, 0, 70, 447, CHARACTER}, + {CHARACTER, 0, 65, 448, CHARACTER}, + {CHARACTER, 0, 67, 449, CHARACTER}, + {CHARACTER, 0, 69, 423, CHARACTER}, {CHARACTER, 47, 0, 0, CHARACTER}, - {CHARACTER, 0, 69, 451, CHARACTER}, - {CHARACTER, 0, 82, 452, CHARACTER}, - {CHARACTER, 0, 70, 453, CHARACTER}, - {CHARACTER, 0, 65, 454, CHARACTER}, - {CHARACTER, 0, 67, 455, CHARACTER}, - {CHARACTER, 0, 69, 456, CHARACTER}, + {CHARACTER, 0, 84, 452, CHARACTER}, + {CHARACTER, 0, 83, 401, CHARACTER}, + {CHARACTER, 0, 76, 454, CHARACTER}, + {CHARACTER, 0, 65, 455, CHARACTER}, + {CHARACTER, 0, 83, 456, CHARACTER}, {CHARACTER, 0, 83, 457, CHARACTER}, - {Q_INTERFACES_TOKEN, 0, 0, 0, CHARACTER}, - {CHARACTER, 0, 108, 459, CHARACTER}, - {CHARACTER, 0, 115, 460, CHARACTER}, - {SIGNALS, 0, 0, 0, CHARACTER}, - {CHARACTER, 0, 111, 462, CHARACTER}, - {CHARACTER, 0, 116, 463, CHARACTER}, - {CHARACTER, 0, 115, 464, CHARACTER}, - {SLOTS, 0, 0, 0, CHARACTER}, - {CHARACTER, 0, 71, 466, CHARACTER}, - {CHARACTER, 0, 78, 467, CHARACTER}, - {CHARACTER, 0, 65, 468, CHARACTER}, - {CHARACTER, 0, 76, 469, CHARACTER}, - {Q_SIGNAL_TOKEN, 0, 83, 470, CHARACTER}, - {Q_SIGNALS_TOKEN, 0, 0, 0, CHARACTER}, - {CHARACTER, 0, 79, 472, CHARACTER}, - {CHARACTER, 0, 84, 473, CHARACTER}, - {Q_SLOT_TOKEN, 0, 83, 474, CHARACTER}, - {Q_SLOTS_TOKEN, 0, 0, 0, CHARACTER}, - {CHARACTER, 0, 86, 476, CHARACTER}, - {CHARACTER, 0, 65, 477, CHARACTER}, - {CHARACTER, 0, 84, 478, CHARACTER}, - {CHARACTER, 0, 69, 479, CHARACTER}, - {CHARACTER, 0, 95, 480, CHARACTER}, + {CHARACTER, 0, 73, 458, CHARACTER}, + {CHARACTER, 0, 78, 459, CHARACTER}, + {CHARACTER, 0, 70, 460, CHARACTER}, + {CHARACTER, 0, 79, 461, CHARACTER}, + {Q_CLASSINFO_TOKEN, 0, 0, 0, CHARACTER}, + {CHARACTER, 0, 78, 463, CHARACTER}, {CHARACTER, 48, 0, 0, CHARACTER}, - {CHARACTER, 0, 76, 482, CHARACTER}, - {CHARACTER, 0, 79, 483, CHARACTER}, - {CHARACTER, 0, 84, 484, CHARACTER}, + {CHARACTER, 0, 69, 465, CHARACTER}, + {CHARACTER, 0, 82, 466, CHARACTER}, + {CHARACTER, 0, 70, 467, CHARACTER}, + {CHARACTER, 0, 65, 468, CHARACTER}, + {CHARACTER, 0, 67, 469, CHARACTER}, + {CHARACTER, 0, 69, 470, CHARACTER}, + {CHARACTER, 0, 83, 471, CHARACTER}, + {Q_INTERFACES_TOKEN, 0, 0, 0, CHARACTER}, + {CHARACTER, 0, 108, 473, CHARACTER}, + {CHARACTER, 0, 115, 474, CHARACTER}, + {SIGNALS, 0, 0, 0, CHARACTER}, + {CHARACTER, 0, 111, 476, CHARACTER}, + {CHARACTER, 0, 116, 477, CHARACTER}, + {CHARACTER, 0, 115, 478, CHARACTER}, + {SLOTS, 0, 0, 0, CHARACTER}, + {CHARACTER, 0, 71, 480, CHARACTER}, + {CHARACTER, 0, 78, 481, CHARACTER}, + {CHARACTER, 0, 65, 482, CHARACTER}, + {CHARACTER, 0, 76, 483, CHARACTER}, + {Q_SIGNAL_TOKEN, 0, 83, 484, CHARACTER}, + {Q_SIGNALS_TOKEN, 0, 0, 0, CHARACTER}, + {CHARACTER, 0, 79, 486, CHARACTER}, + {CHARACTER, 0, 84, 487, CHARACTER}, + {Q_SLOT_TOKEN, 0, 83, 488, CHARACTER}, + {Q_SLOTS_TOKEN, 0, 0, 0, CHARACTER}, + {CHARACTER, 0, 86, 490, CHARACTER}, + {CHARACTER, 0, 65, 491, CHARACTER}, + {CHARACTER, 0, 84, 492, CHARACTER}, + {CHARACTER, 0, 69, 493, CHARACTER}, + {CHARACTER, 0, 95, 494, CHARACTER}, + {CHARACTER, 49, 0, 0, CHARACTER}, + {CHARACTER, 0, 76, 496, CHARACTER}, + {CHARACTER, 0, 79, 497, CHARACTER}, + {CHARACTER, 0, 84, 498, CHARACTER}, {Q_PRIVATE_SLOT_TOKEN, 0, 0, 0, CHARACTER}, - {CHARACTER, 0, 95, 486, CHARACTER}, - {CHARACTER, 0, 77, 487, CHARACTER}, - {CHARACTER, 0, 79, 488, CHARACTER}, - {CHARACTER, 0, 67, 489, CHARACTER}, - {CHARACTER, 0, 95, 490, CHARACTER}, - {CHARACTER, 0, 67, 491, CHARACTER}, - {CHARACTER, 0, 79, 492, CHARACTER}, - {CHARACTER, 0, 77, 493, CHARACTER}, - {CHARACTER, 0, 80, 494, CHARACTER}, - {CHARACTER, 0, 65, 495, CHARACTER}, - {CHARACTER, 0, 84, 496, CHARACTER}, - {Q_MOC_COMPAT_TOKEN, 0, 0, 0, CHARACTER}, - {CHARACTER, 0, 79, 498, CHARACTER}, - {CHARACTER, 0, 75, 499, CHARACTER}, - {CHARACTER, 0, 65, 500, CHARACTER}, - {CHARACTER, 0, 66, 501, CHARACTER}, - {CHARACTER, 0, 76, 502, CHARACTER}, - {CHARACTER, 0, 69, 503, CHARACTER}, - {Q_INVOKABLE_TOKEN, 0, 0, 0, CHARACTER}, - {CHARACTER, 0, 82, 505, CHARACTER}, - {CHARACTER, 0, 73, 506, CHARACTER}, - {CHARACTER, 0, 80, 507, CHARACTER}, - {CHARACTER, 0, 84, 508, CHARACTER}, + {CHARACTER, 0, 95, 500, CHARACTER}, + {CHARACTER, 0, 77, 501, CHARACTER}, + {CHARACTER, 0, 79, 502, CHARACTER}, + {CHARACTER, 0, 67, 503, CHARACTER}, + {CHARACTER, 0, 95, 504, CHARACTER}, + {CHARACTER, 0, 67, 505, CHARACTER}, + {CHARACTER, 0, 79, 506, CHARACTER}, + {CHARACTER, 0, 77, 507, CHARACTER}, + {CHARACTER, 0, 80, 508, CHARACTER}, {CHARACTER, 0, 65, 509, CHARACTER}, - {CHARACTER, 0, 66, 510, CHARACTER}, - {CHARACTER, 0, 76, 511, CHARACTER}, - {CHARACTER, 0, 69, 512, CHARACTER}, - {Q_SCRIPTABLE_TOKEN, 0, 0, 0, CHARACTER}, - {CHARACTER, 0, 82, 514, CHARACTER}, - {CHARACTER, 0, 79, 515, CHARACTER}, - {CHARACTER, 0, 80, 516, CHARACTER}, + {CHARACTER, 0, 84, 510, CHARACTER}, + {Q_MOC_COMPAT_TOKEN, 0, 0, 0, CHARACTER}, + {CHARACTER, 0, 79, 512, CHARACTER}, + {CHARACTER, 0, 75, 513, CHARACTER}, + {CHARACTER, 0, 65, 514, CHARACTER}, + {CHARACTER, 0, 66, 515, CHARACTER}, + {CHARACTER, 0, 76, 516, CHARACTER}, {CHARACTER, 0, 69, 517, CHARACTER}, - {CHARACTER, 0, 82, 518, CHARACTER}, - {CHARACTER, 0, 84, 519, CHARACTER}, - {CHARACTER, 0, 89, 520, CHARACTER}, + {Q_INVOKABLE_TOKEN, 0, 0, 0, CHARACTER}, + {CHARACTER, 0, 82, 519, CHARACTER}, + {CHARACTER, 0, 73, 520, CHARACTER}, + {CHARACTER, 0, 80, 521, CHARACTER}, + {CHARACTER, 0, 84, 522, CHARACTER}, + {CHARACTER, 0, 65, 523, CHARACTER}, + {CHARACTER, 0, 66, 524, CHARACTER}, + {CHARACTER, 0, 76, 525, CHARACTER}, + {CHARACTER, 0, 69, 526, CHARACTER}, + {Q_SCRIPTABLE_TOKEN, 0, 0, 0, CHARACTER}, + {CHARACTER, 0, 82, 528, CHARACTER}, + {CHARACTER, 0, 79, 529, CHARACTER}, + {CHARACTER, 0, 80, 530, CHARACTER}, + {CHARACTER, 0, 69, 531, CHARACTER}, + {CHARACTER, 0, 82, 532, CHARACTER}, + {CHARACTER, 0, 84, 533, CHARACTER}, + {CHARACTER, 0, 89, 534, CHARACTER}, {Q_PRIVATE_PROPERTY_TOKEN, 0, 0, 0, CHARACTER}, - {CHARACTER, 0, 69, 522, CHARACTER}, - {CHARACTER, 0, 86, 523, CHARACTER}, - {CHARACTER, 0, 73, 524, CHARACTER}, - {CHARACTER, 0, 83, 525, CHARACTER}, - {CHARACTER, 0, 73, 526, CHARACTER}, - {CHARACTER, 0, 79, 527, CHARACTER}, - {CHARACTER, 0, 78, 528, CHARACTER}, + {CHARACTER, 0, 69, 536, CHARACTER}, + {CHARACTER, 0, 86, 537, CHARACTER}, + {CHARACTER, 0, 73, 538, CHARACTER}, + {CHARACTER, 0, 83, 539, CHARACTER}, + {CHARACTER, 0, 73, 540, CHARACTER}, + {CHARACTER, 0, 79, 541, CHARACTER}, + {CHARACTER, 0, 78, 542, CHARACTER}, {Q_REVISION_TOKEN, 0, 0, 0, CHARACTER}, {NEWLINE, 0, 0, 0, NOTOKEN}, {QUOTE, 0, 0, 0, NOTOKEN}, diff --git a/src/tools/moc/main.cpp b/src/tools/moc/main.cpp index 512d0212b78..772df1feece 100644 --- a/src/tools/moc/main.cpp +++ b/src/tools/moc/main.cpp @@ -63,7 +63,7 @@ QT_BEGIN_NAMESPACE /tmp/abc, xyz/klm -> /tmp/abc */ -static QByteArray combinePath(const char *infile, const char *outfile) +static QByteArray combinePath(const QByteArray &infile, const QByteArray &outfile) { QFileInfo inFileInfo(QDir::current(), QFile::decodeName(infile)); QFileInfo outFileInfo(QDir::current(), QFile::decodeName(outfile)); @@ -379,7 +379,7 @@ int runMoc(int _argc, char **_argv) in = fopen(filename.data(), "rb"); if (!in) { #endif - fprintf(stderr, "moc: %s: No such file\n", (const char*)filename); + fprintf(stderr, "moc: %s: No such file\n", filename.constData()); return 1; } moc.filename = filename; @@ -406,7 +406,7 @@ int runMoc(int _argc, char **_argv) if (!out) #endif { - fprintf(stderr, "moc: Cannot create %s\n", (const char*)output); + fprintf(stderr, "moc: Cannot create %s\n", output.constData()); return 1; } } else { // use stdout diff --git a/src/tools/moc/moc.cpp b/src/tools/moc/moc.cpp index 5c9e1ee8386..7b358c1ae81 100644 --- a/src/tools/moc/moc.cpp +++ b/src/tools/moc/moc.cpp @@ -44,6 +44,9 @@ #include "qdatetime.h" #include "utils.h" #include "outputrevision.h" +#include +#include +#include // for normalizeTypeInternal #include @@ -51,9 +54,10 @@ QT_BEGIN_NAMESPACE // only moc needs this function -static QByteArray normalizeType(const char *s, bool fixScope = false) +static QByteArray normalizeType(const QByteArray &ba, bool fixScope = false) { - int len = qstrlen(s); + const char *s = ba.constData(); + int len = ba.size(); char stackbuf[64]; char *buf = (len >= 64 ? new char[len + 1] : stackbuf); char *d = buf; @@ -673,6 +677,9 @@ void Moc::parse() case Q_PROPERTY_TOKEN: parseProperty(&def); break; + case Q_PLUGIN_METADATA_TOKEN: + parsePluginData(&def); + break; case Q_ENUMS_TOKEN: parseEnumOrFlag(&def, false); break; @@ -788,7 +795,7 @@ void Moc::generate(FILE *out) if (i >= 0) fn = filename.mid(i); fprintf(out, "/****************************************************************************\n" - "** Meta object code from reading C++ file '%s'\n**\n" , (const char*)fn); + "** Meta object code from reading C++ file '%s'\n**\n" , fn.constData()); fprintf(out, "** Created: %s\n" "** by: The Qt Meta Object Compiler version %d (Qt %s)\n**\n" , dstr.data(), mocOutputRevision, QT_VERSION_STR); fprintf(out, "** WARNING! All changes made in this file will be lost!\n" @@ -813,9 +820,11 @@ void Moc::generate(FILE *out) if (mustIncludeQMetaTypeH) fprintf(out, "#include \n"); + if (mustIncludeQPluginH) + fprintf(out, "#include \n"); fprintf(out, "#if !defined(Q_MOC_OUTPUT_REVISION)\n" - "#error \"The header file '%s' doesn't include .\"\n", (const char *)fn); + "#error \"The header file '%s' doesn't include .\"\n", fn.constData()); fprintf(out, "#elif Q_MOC_OUTPUT_REVISION != %d\n", mocOutputRevision); fprintf(out, "#error \"This file was generated using the moc from %s." " It\"\n#error \"cannot be used with the include files from" @@ -1080,6 +1089,50 @@ void Moc::parseProperty(ClassDef *def) def->propertyList += propDef; } +void Moc::parsePluginData(ClassDef *def) +{ + next(LPAREN); + QByteArray metaData; + while (test(IDENTIFIER)) { + QByteArray l = lexem(); + if (l == "IID") { + next(STRING_LITERAL); + def->pluginData.iid = unquotedLexem(); + } else if (l == "FILE") { + next(STRING_LITERAL); + QByteArray metaDataFile = unquotedLexem(); + QFileInfo fi(QFileInfo(QString::fromLocal8Bit(currentFilenames.top().constData())).dir(), QString::fromLocal8Bit(metaDataFile.constData())); + if (!fi.exists()) { + QByteArray msg; + msg += "Plugin Metadata file "; + msg += lexem(); + msg += " does not exist. Declaration will be ignored"; + warning(msg.constData()); + return; + } + QFile file(fi.canonicalFilePath()); + file.open(QFile::ReadOnly); + metaData = file.readAll(); + } + } + + if (!metaData.isEmpty()) { + def->pluginData.metaData = QJsonDocument::fromJson(metaData); + if (!def->pluginData.metaData.isObject()) { + QByteArray msg; + msg += "Plugin Metadata file "; + msg += lexem(); + msg += " does not contain a valid JSON object. Declaration will be ignored"; + warning(msg.constData()); + def->pluginData.iid = QByteArray(); + return; + } + } + + mustIncludeQPluginH = true; + next(RPAREN); +} + void Moc::parsePrivateProperty(ClassDef *def) { next(LPAREN); diff --git a/src/tools/moc/moc.h b/src/tools/moc/moc.h index b780272dff7..aedb97b2349 100644 --- a/src/tools/moc/moc.h +++ b/src/tools/moc/moc.h @@ -46,6 +46,7 @@ #include #include #include +#include #include #include @@ -167,6 +168,11 @@ struct ClassDef { bool hasQObject; bool hasQGadget; + struct PluginData { + QByteArray iid; + QJsonDocument metaData; + } pluginData; + QList constructorList; QList signalList, slotList, methodList, publicList; int notifyableProperties; @@ -192,7 +198,7 @@ class Moc : public Parser { public: Moc() - : noInclude(false), generatedCode(false), mustIncludeQMetaTypeH(false) + : noInclude(false), generatedCode(false), mustIncludeQMetaTypeH(false), mustIncludeQPluginH(false) {} QByteArray filename; @@ -200,6 +206,7 @@ public: bool noInclude; bool generatedCode; bool mustIncludeQMetaTypeH; + bool mustIncludeQPluginH; QByteArray includePath; QList includeFiles; QList classList; @@ -229,6 +236,7 @@ public: void parseSlots(ClassDef *def, FunctionDef::Access access); void parseSignals(ClassDef *def); void parseProperty(ClassDef *def); + void parsePluginData(ClassDef *def); void createPropertyDef(PropertyDef &def); void parseEnumOrFlag(ClassDef *def, bool isFlag); void parseFlag(ClassDef *def); diff --git a/src/tools/moc/moc.pro b/src/tools/moc/moc.pro index 8e2e76d4b93..3ee507855c9 100644 --- a/src/tools/moc/moc.pro +++ b/src/tools/moc/moc.pro @@ -1,7 +1,7 @@ TEMPLATE = app TARGET = moc -DEFINES += QT_MOC +DEFINES += QT_MOC QT_NO_CAST_FROM_BYTEARRAY DESTDIR = ../../../bin INCLUDEPATH += . DEPENDPATH += . diff --git a/src/tools/moc/preprocessor.cpp b/src/tools/moc/preprocessor.cpp index 07b9e4c5004..07986a71e67 100644 --- a/src/tools/moc/preprocessor.cpp +++ b/src/tools/moc/preprocessor.cpp @@ -58,7 +58,7 @@ static QByteArray cleaned(const QByteArray &input) { QByteArray result; result.reserve(input.size()); - const char *data = input; + const char *data = input.constData(); char *output = result.data(); int newlines = 0; @@ -161,7 +161,7 @@ enum TokenizeMode { TokenizeCpp, TokenizePreprocessor, PreparePreprocessorStatem static Symbols tokenize(const QByteArray &input, int lineNum = 1, TokenizeMode mode = TokenizeCpp) { Symbols symbols; - const char *begin = input; + const char *begin = input.constData(); const char *data = begin; while (*data) { if (mode == TokenizeCpp) { @@ -799,7 +799,7 @@ void Preprocessor::preprocess(const QByteArray &filename, Symbols &preprocessed) // #### stringery QFileInfo fi; if (local) - fi.setFile(QFileInfo(QString::fromLocal8Bit(filename)).dir(), QString::fromLocal8Bit(include)); + fi.setFile(QFileInfo(QString::fromLocal8Bit(filename.constData())).dir(), QString::fromLocal8Bit(include.constData())); for (int j = 0; j < Preprocessor::includes.size() && !fi.exists(); ++j) { const IncludePath &p = Preprocessor::includes.at(j); if (p.isFrameworkPath) { @@ -808,9 +808,9 @@ void Preprocessor::preprocess(const QByteArray &filename, Symbols &preprocessed) continue; QByteArray frameworkCandidate = include.left(slashPos); frameworkCandidate.append(".framework/Headers/"); - fi.setFile(QString::fromLocal8Bit(QByteArray(p.path + '/' + frameworkCandidate)), QString::fromLocal8Bit(include.mid(slashPos + 1))); + fi.setFile(QString::fromLocal8Bit(QByteArray(p.path + '/' + frameworkCandidate).constData()), QString::fromLocal8Bit(include.mid(slashPos + 1).constData())); } else { - fi.setFile(QString::fromLocal8Bit(p.path), QString::fromLocal8Bit(include)); + fi.setFile(QString::fromLocal8Bit(p.path.constData()), QString::fromLocal8Bit(include.constData())); } // try again, maybe there's a file later in the include paths with the same name // (186067) @@ -828,7 +828,7 @@ void Preprocessor::preprocess(const QByteArray &filename, Symbols &preprocessed) continue; Preprocessor::preprocessedIncludes.insert(include); - QFile file(QString::fromLocal8Bit(include)); + QFile file(QString::fromLocal8Bit(include.constData())); if (!file.open(QFile::ReadOnly)) continue; diff --git a/src/tools/moc/token.h b/src/tools/moc/token.h index a694ff4eb22..a9f028f20ae 100644 --- a/src/tools/moc/token.h +++ b/src/tools/moc/token.h @@ -169,6 +169,7 @@ enum Token { Q_OBJECT_TOKEN = Q_META_TOKEN_BEGIN, Q_GADGET_TOKEN, Q_PROPERTY_TOKEN, + Q_PLUGIN_METADATA_TOKEN, Q_ENUMS_TOKEN, Q_FLAGS_TOKEN, Q_DECLARE_FLAGS_TOKEN, diff --git a/src/tools/moc/util/generate_keywords.cpp b/src/tools/moc/util/generate_keywords.cpp index eb06315fed7..4560944a47c 100644 --- a/src/tools/moc/util/generate_keywords.cpp +++ b/src/tools/moc/util/generate_keywords.cpp @@ -228,6 +228,7 @@ static const Keyword keywords[] = { { "Q_OBJECT", "Q_OBJECT_TOKEN" }, { "Q_GADGET", "Q_GADGET_TOKEN" }, { "Q_PROPERTY", "Q_PROPERTY_TOKEN" }, + { "Q_PLUGIN_METADATA", "Q_PLUGIN_METADATA_TOKEN" }, { "Q_ENUMS", "Q_ENUMS_TOKEN" }, { "Q_FLAGS", "Q_FLAGS_TOKEN" }, { "Q_DECLARE_FLAGS", "Q_DECLARE_FLAGS_TOKEN" }, diff --git a/src/tools/uic/cpp/cppwriteinitialization.cpp b/src/tools/uic/cpp/cppwriteinitialization.cpp index 91f2f2558be..5762c175cc5 100644 --- a/src/tools/uic/cpp/cppwriteinitialization.cpp +++ b/src/tools/uic/cpp/cppwriteinitialization.cpp @@ -537,7 +537,7 @@ void WriteInitialization::acceptUI(DomUI *node) continue; const QString varConn = connection + QLatin1String("Connection"); - m_output << m_indent << varConn << " = QSqlDatabase::database(" << fixString(connection, m_dindent) << ");\n"; + m_output << m_indent << varConn << " = QSqlDatabase::database(" << writeString(connection, m_dindent) << ");\n"; } acceptWidget(node->elementWidget()); @@ -1143,7 +1143,7 @@ QString WriteInitialization::writeStringListProperty(const DomStringList *list) str << '\n' << m_indent << " << " << trCall(values.at(i), comment); } else { for (int i = 0; i < values.size(); ++i) - str << " << QString::fromUtf8(" << fixString(values.at(i), m_dindent) << ')'; + str << " << " << writeString(values.at(i), m_dindent); } return propertyValue; } @@ -1159,8 +1159,8 @@ void WriteInitialization::writeProperties(const QString &varName, DomPropertyMap properties = propertyMap(lst); if (properties.contains(QLatin1String("control"))) { DomProperty *p = properties.value(QLatin1String("control")); - m_output << m_indent << varName << "->setControl(QString::fromUtf8(" - << fixString(toString(p->elementString()), m_dindent) << "));\n"; + m_output << m_indent << varName << "->setControl(" + << writeString(toString(p->elementString()), m_dindent) << ");\n"; } } @@ -1171,7 +1171,7 @@ void WriteInitialization::writeProperties(const QString &varName, } if (!(flags & WritePropertyIgnoreObjectName)) m_output << m_indent << indent << varName - << "->setObjectName(QString::fromUtf8(" << fixString(varName, m_dindent) << "));\n"; + << "->setObjectName(" << writeString(varName, m_dindent) << ");\n"; int leftMargin, topMargin, rightMargin, bottomMargin; leftMargin = topMargin = rightMargin = bottomMargin = -1; @@ -1459,8 +1459,8 @@ void WriteInitialization::writeProperties(const QString &varName, case DomProperty::Url: { const DomUrl* u = p->elementUrl(); - propertyValue = QString::fromLatin1("QUrl(QString::fromUtf8(%1))") - .arg(fixString(u->elementString()->text(), m_dindent)); + propertyValue = QString::fromLatin1("QUrl(%1)") + .arg(writeString(u->elementString()->text(), m_dindent)); break; } case DomProperty::Brush: @@ -1562,8 +1562,8 @@ QString WriteInitialization::writeFontProperties(const DomFont *f) m_output << m_indent << "QFont " << fontName << ";\n"; if (f->hasElementFamily() && !f->elementFamily().isEmpty()) { - m_output << m_indent << fontName << ".setFamily(QString::fromUtf8(" << fixString(f->elementFamily(), m_dindent) - << "));\n"; + m_output << m_indent << fontName << ".setFamily(" << writeString(f->elementFamily(), m_dindent) + << ");\n"; } if (f->hasElementPointSize() && f->elementPointSize() > 0) { m_output << m_indent << fontName << ".setPointSize(" << f->elementPointSize() @@ -1612,21 +1612,21 @@ static void writeResourceIcon(QTextStream &output, const DomResourceIcon *i) { if (i->hasElementNormalOff()) - output << indent << iconName << ".addFile(QString::fromUtf8(" << fixString(i->elementNormalOff()->text(), indent) << "), QSize(), QIcon::Normal, QIcon::Off);\n"; + output << indent << iconName << ".addFile(" << writeString(i->elementNormalOff()->text(), indent) << ", QSize(), QIcon::Normal, QIcon::Off);\n"; if (i->hasElementNormalOn()) - output << indent << iconName << ".addFile(QString::fromUtf8(" << fixString(i->elementNormalOn()->text(), indent) << "), QSize(), QIcon::Normal, QIcon::On);\n"; + output << indent << iconName << ".addFile(" << writeString(i->elementNormalOn()->text(), indent) << ", QSize(), QIcon::Normal, QIcon::On);\n"; if (i->hasElementDisabledOff()) - output << indent << iconName << ".addFile(QString::fromUtf8(" << fixString(i->elementDisabledOff()->text(), indent) << "), QSize(), QIcon::Disabled, QIcon::Off);\n"; + output << indent << iconName << ".addFile(" << writeString(i->elementDisabledOff()->text(), indent) << ", QSize(), QIcon::Disabled, QIcon::Off);\n"; if (i->hasElementDisabledOn()) - output << indent << iconName << ".addFile(QString::fromUtf8(" << fixString(i->elementDisabledOn()->text(), indent) << "), QSize(), QIcon::Disabled, QIcon::On);\n"; + output << indent << iconName << ".addFile(" << writeString(i->elementDisabledOn()->text(), indent) << ", QSize(), QIcon::Disabled, QIcon::On);\n"; if (i->hasElementActiveOff()) - output << indent << iconName << ".addFile(QString::fromUtf8(" << fixString(i->elementActiveOff()->text(), indent) << "), QSize(), QIcon::Active, QIcon::Off);\n"; + output << indent << iconName << ".addFile(" << writeString(i->elementActiveOff()->text(), indent) << ", QSize(), QIcon::Active, QIcon::Off);\n"; if (i->hasElementActiveOn()) - output << indent << iconName << ".addFile(QString::fromUtf8(" << fixString(i->elementActiveOn()->text(), indent) << "), QSize(), QIcon::Active, QIcon::On);\n"; + output << indent << iconName << ".addFile(" << writeString(i->elementActiveOn()->text(), indent) << ", QSize(), QIcon::Active, QIcon::On);\n"; if (i->hasElementSelectedOff()) - output << indent << iconName << ".addFile(QString::fromUtf8(" << fixString(i->elementSelectedOff()->text(), indent) << "), QSize(), QIcon::Selected, QIcon::Off);\n"; + output << indent << iconName << ".addFile(" << writeString(i->elementSelectedOff()->text(), indent) << ", QSize(), QIcon::Selected, QIcon::Off);\n"; if (i->hasElementSelectedOn()) - output << indent << iconName << ".addFile(QString::fromUtf8(" << fixString(i->elementSelectedOn()->text(), indent) << "), QSize(), QIcon::Selected, QIcon::On);\n"; + output << indent << iconName << ".addFile(" << writeString(i->elementSelectedOn()->text(), indent) << ", QSize(), QIcon::Selected, QIcon::On);\n"; } QString WriteInitialization::writeIconProperties(const DomResourceIcon *i) @@ -1648,7 +1648,7 @@ QString WriteInitialization::writeIconProperties(const DomResourceIcon *i) writeResourceIcon(m_output, iconName, m_indent, i); } else { // Theme: Generate code to check the theme and default to resource - const QString themeIconName = fixString(i->attributeTheme(), QString()); + const QString themeIconName = writeString(i->attributeTheme(), QString()); if (iconHasStatePixmaps(i)) { // Theme + default state pixmaps: // Generate code to check the theme and default to state pixmaps @@ -1660,8 +1660,8 @@ QString WriteInitialization::writeIconProperties(const DomResourceIcon *i) m_output << "QString "; m_firstThemeIcon = false; } - m_output << themeNameStringVariableC << " = QString::fromUtf8(" - << themeIconName << ");\n"; + m_output << themeNameStringVariableC << " = " + << themeIconName << ";\n"; m_output << m_indent << "if (QIcon::hasThemeIcon(" << themeNameStringVariableC << ")) {\n" @@ -1672,8 +1672,8 @@ QString WriteInitialization::writeIconProperties(const DomResourceIcon *i) } else { // Theme, but no state pixmaps: Construct from theme directly. m_output << m_indent << "QIcon " << iconName - << "(QIcon::fromTheme(QString::fromUtf8(" - << themeIconName << ")));\n"; + << "(QIcon::fromTheme(" + << themeIconName << "));\n"; } // Theme, but not state } // >= 4.4 } else { // pre-4.4 legacy @@ -2356,10 +2356,7 @@ QString WriteInitialization::noTrCall(DomString *str, const QString &defaultStri return QString(); if (str) value = str->text(); - QString ret = QLatin1String("QString::fromUtf8("); - ret += fixString(value, m_dindent); - ret += QLatin1Char(')'); - return ret; + return writeString(value, m_dindent); } QString WriteInitialization::autoTrCall(DomString *str, const QString &defaultString) const @@ -2481,8 +2478,8 @@ void WriteInitialization::acceptWidgetScripts(const DomScripts &widgetScripts, D } m_output << ";\n"; } - m_output << m_indent << "scriptContext.run(QString::fromUtf8(" - << fixString(script, m_dindent) << "), " + m_output << m_indent << "scriptContext.run(" + << writeString(script, m_dindent) << ", " << m_driver->findOrInsertWidget(node) << ", childWidgets);\n"; } diff --git a/src/tools/uic/uic.pro b/src/tools/uic/uic.pro index 6598180e45e..7a95db861f3 100644 --- a/src/tools/uic/uic.pro +++ b/src/tools/uic/uic.pro @@ -14,7 +14,7 @@ HEADERS += uic.h SOURCES += main.cpp \ uic.cpp -linux-g++-maemo:contains(QT_ARCH, arm) { +linux-g++-maemo { # UIC will crash when running inside QEMU if built with -O2 QMAKE_CFLAGS_RELEASE -= -O2 QMAKE_CXXFLAGS_RELEASE -= -O2 diff --git a/src/tools/uic/utils.h b/src/tools/uic/utils.h index c864305891b..c6dbe548cb6 100644 --- a/src/tools/uic/utils.h +++ b/src/tools/uic/utils.h @@ -55,18 +55,21 @@ inline bool toBool(const QString &str) inline QString toString(const DomString *str) { return str ? str->text() : QString(); } -inline QString fixString(const QString &str, const QString &indent) +inline QString fixString(const QString &str, const QString &indent, bool *isUtf8Ret=0) { QString cursegment; QStringList result; const QByteArray utf8 = str.toUtf8(); const int utf8Length = utf8.length(); + bool isUtf8 = false; + for (int i = 0; i < utf8Length; ++i) { const uchar cbyte = utf8.at(i); if (cbyte >= 0x80) { cursegment += QLatin1Char('\\'); cursegment += QString::number(cbyte, 8); + isUtf8 = true; } else { switch(cbyte) { case '\\': @@ -100,9 +103,21 @@ inline QString fixString(const QString &str, const QString &indent) QString rc(QLatin1Char('"')); rc += result.join(joinstr); rc += QLatin1Char('"'); + if (isUtf8Ret) + *isUtf8Ret = isUtf8; return rc; } +inline QString writeString(const QString &s, const QString &indent) +{ + bool isUtf8 = false; + const QString ret = fixString(s, indent, &isUtf8); + if (isUtf8) + return QLatin1String("QString::fromUtf8(") + ret + QLatin1Char(')'); + else + return QLatin1String("QStringLiteral(") + ret + QLatin1Char(')'); +} + inline QHash propertyMap(const QList &properties) { QHash map; diff --git a/src/widgets/accessible/qaccessiblewidget.cpp b/src/widgets/accessible/qaccessiblewidget.cpp index a4a86e5d31a..feac42780dc 100644 --- a/src/widgets/accessible/qaccessiblewidget.cpp +++ b/src/widgets/accessible/qaccessiblewidget.cpp @@ -327,41 +327,76 @@ static inline bool isAncestor(const QObject *obj, const QObject *child) return false; } - /*! \reimp */ -QAccessible::Relation QAccessibleWidget::relationTo(const QAccessibleInterface *other) const +QVector > +QAccessibleWidget::relations(QAccessible::Relation match /*= QAccessible::AllRelations*/) const { - QAccessible::Relation relation = QAccessible::Unrelated; - if (d->asking == this) // recursive call - return relation; - - QObject *o = other ? other->object() : 0; - if (!o) - return relation; - - QWidget *focus = widget()->focusWidget(); - if (object() == focus && isAncestor(o, focus)) - relation |= QAccessible::FocusChild; - - QACConnectionObject *connectionObject = (QACConnectionObject*)object(); - for (int sig = 0; sig < d->primarySignals.count(); ++sig) { - if (connectionObject->isSender(o, d->primarySignals.at(sig).toAscii())) { - relation |= QAccessible::Controller; - break; + QVector > rels; + if (match & QAccessible::Label) { + const QAccessible::Relation rel = QAccessible::Label; + if (QWidget *parent = widget()->parentWidget()) { +#ifndef QT_NO_SHORTCUT + // first check for all siblings that are labels to us + // ideally we would go through all objects and check, but that + // will be too expensive + const QList kids = childWidgets(parent); + for (int i = 0; i < kids.count(); ++i) { + if (QLabel *labelSibling = qobject_cast(kids.at(i))) { + if (labelSibling->buddy() == widget()) { + QAccessibleInterface *iface = QAccessible::queryAccessibleInterface(labelSibling); + rels.append(qMakePair(iface, rel)); + } + } + } +#endif +#ifndef QT_NO_GROUPBOX + QGroupBox *groupbox = qobject_cast(parent); + if (groupbox && !groupbox->title().isEmpty()) { + QAccessibleInterface *iface = QAccessible::queryAccessibleInterface(groupbox); + rels.append(qMakePair(iface, rel)); + } +#endif } } - // test for passive relationships. - // d->asking protects from endless recursion. - d->asking = this; - int inverse = other->relationTo(this); - d->asking = 0; - if (inverse & QAccessible::Controller) - relation |= QAccessible::Controlled; - if (inverse & QAccessible::Label) - relation |= QAccessible::Labelled; + if (match & QAccessible::Controller) { + const QAccessible::Relation rel = QAccessible::Controller; + QACConnectionObject *connectionObject = (QACConnectionObject*)object(); + const QObjectList senderList = connectionObject->senderList(); + for (int s = 0; s < senderList.count(); ++s) { + QObject *sender = senderList.at(s); + if (sender->isWidgetType() && sender != object()) { + QAccessibleInterface *iface = QAccessible::queryAccessibleInterface(sender); + QACConnectionObject *connectionSender = (QACConnectionObject*)sender; + QStringList senderPrimarySignals = static_cast(iface)->d->primarySignals; + for (int sig = 0; sig < senderPrimarySignals.count(); ++sig) { + const QByteArray strSignal = senderPrimarySignals.at(sig).toAscii(); + if (connectionSender->isSender(object(), strSignal.constData())) + rels.append(qMakePair(iface, rel)); + } + } + } + } - return relation; + if (match & QAccessible::Controlled) { + QObjectList allReceivers; + QACConnectionObject *connectionObject = (QACConnectionObject*)object(); + for (int sig = 0; sig < d->primarySignals.count(); ++sig) { + const QObjectList receivers = connectionObject->receiverList(d->primarySignals.at(sig).toAscii()); + allReceivers += receivers; + } + + allReceivers.removeAll(object()); //### The object might connect to itself internally + + for (int i = 0; i < allReceivers.count(); ++i) { + const QAccessible::Relation rel = QAccessible::Controlled; + QAccessibleInterface *iface = QAccessible::queryAccessibleInterface(allReceivers.at(i)); + if (iface) + rels.append(qMakePair(iface, rel)); + } + } + + return rels; } /*! \reimp */ @@ -383,116 +418,18 @@ QAccessibleInterface *QAccessibleWidget::child(int index) const } /*! \reimp */ -int QAccessibleWidget::navigate(QAccessible::RelationFlag relation, int entry, - QAccessibleInterface **target) const +QAccessibleInterface *QAccessibleWidget::focusChild() const { - if (!target) - return -1; + if (widget()->hasFocus()) + return QAccessible::queryAccessibleInterface(object()); - *target = 0; - QObject *targetObject = 0; + QWidget *fw = widget()->focusWidget(); + if (!fw) + return 0; - switch (relation) { - // Logical - case QAccessible::FocusChild: - { - if (widget()->hasFocus()) { - targetObject = object(); - break; - } - - QWidget *fw = widget()->focusWidget(); - if (!fw) - return -1; - - if (isAncestor(widget(), fw) || fw == widget()) - targetObject = fw; - /* ### - QWidget *parent = fw; - while (parent && !targetObject) { - parent = parent->parentWidget(); - if (parent == widget()) - targetObject = fw; - } - */ - } - break; - case QAccessible::Label: - if (entry > 0) { - QAccessibleInterface *pIface = QAccessible::queryAccessibleInterface(parentObject()); - if (!pIface) - return -1; - - // first check for all siblings that are labels to us - // ideally we would go through all objects and check, but that - // will be too expensive - int sibCount = pIface->childCount(); - QAccessibleInterface *candidate = 0; - for (int i = 0; i < sibCount && entry; ++i) { - candidate = pIface->child(i); - Q_ASSERT(candidate); - if (candidate->relationTo(this) & QAccessible::Label) - --entry; - if (!entry) - break; - - delete candidate; - candidate = 0; - } - if (!candidate) { - if (pIface->relationTo(this) & QAccessible::Label) - --entry; - if (!entry) - candidate = pIface; - } - if (pIface != candidate) - delete pIface; - - *target = candidate; - if (*target) - return 0; - } - break; - case QAccessible::Labelled: // only implemented in subclasses - break; - case QAccessible::Controller: - if (entry > 0) { - // check all senders we are connected to, - // and figure out which one are controllers to us - QACConnectionObject *connectionObject = (QACConnectionObject*)object(); - QObjectList allSenders = connectionObject->senderList(); - QObjectList senders; - for (int s = 0; s < allSenders.size(); ++s) { - QObject *sender = allSenders.at(s); - QAccessibleInterface *candidate = QAccessible::queryAccessibleInterface(sender); - if (!candidate) - continue; - if (candidate->relationTo(this) & QAccessible::Controller) - senders << sender; - delete candidate; - } - if (entry <= senders.size()) - targetObject = senders.at(entry-1); - } - break; - case QAccessible::Controlled: - if (entry > 0) { - QObjectList allReceivers; - QACConnectionObject *connectionObject = (QACConnectionObject*)object(); - for (int sig = 0; sig < d->primarySignals.count(); ++sig) { - QObjectList receivers = connectionObject->receiverList(d->primarySignals.at(sig).toAscii()); - allReceivers += receivers; - } - if (entry <= allReceivers.size()) - targetObject = allReceivers.at(entry-1); - } - break; - default: - break; - } - - *target = QAccessible::queryAccessibleInterface(targetObject); - return *target ? 0 : -1; + if (isAncestor(widget(), fw) || fw == widget()) + return QAccessible::queryAccessibleInterface(fw); + return 0; } /*! \reimp */ @@ -609,7 +546,7 @@ QAccessible::State QAccessibleWidget::state() const QWidget *w = widget(); if (w->testAttribute(Qt::WA_WState_Visible) == false) state.invisible = true; - if (w->focusPolicy() != Qt::NoFocus && w->isActiveWindow()) + if (w->focusPolicy() != Qt::NoFocus) state.focusable = true; if (w->hasFocus()) state.focused = true; diff --git a/src/widgets/accessible/qaccessiblewidget.h b/src/widgets/accessible/qaccessiblewidget.h index f96d298f90e..4b480ca0ee7 100644 --- a/src/widgets/accessible/qaccessiblewidget.h +++ b/src/widgets/accessible/qaccessiblewidget.h @@ -61,13 +61,13 @@ public: QWindow *window() const; int childCount() const; int indexOfChild(const QAccessibleInterface *child) const; - QAccessible::Relation relationTo(const QAccessibleInterface *other) const; + QVector > relations(QAccessible::Relation match = QAccessible::AllRelations) const; + QAccessibleInterface *focusChild() const; QRect rect() const; QAccessibleInterface *parent() const; QAccessibleInterface *child(int index) const; - int navigate(QAccessible::RelationFlag rel, int entry, QAccessibleInterface **target) const; QString text(QAccessible::Text t) const; QAccessible::Role role() const; diff --git a/src/widgets/dialogs/qcolordialog.cpp b/src/widgets/dialogs/qcolordialog.cpp index e592f147049..263d3a623c2 100644 --- a/src/widgets/dialogs/qcolordialog.cpp +++ b/src/widgets/dialogs/qcolordialog.cpp @@ -1060,7 +1060,7 @@ QColorShower::QColorShower(QColorDialog *parent) gl->setMargin(gl->spacing()); lab = new QColorShowLabel(this); -#ifndef Q_WS_WINCE +#ifndef Q_OS_WINCE #ifdef QT_SMALL_COLORDIALOG lab->setMinimumHeight(60); #endif @@ -1440,7 +1440,7 @@ void QColorDialogPrivate::init(const QColor &initial) q->setSizeGripEnabled(false); q->setWindowTitle(QColorDialog::tr("Select Color")); - nativeDialogInUse = false; + nativeDialogInUse = (platformColorDialogHelper() != 0); nextCust = 0; QVBoxLayout *mainLay = new QVBoxLayout(q); @@ -1452,7 +1452,7 @@ void QColorDialogPrivate::init(const QColor &initial) leftLay = 0; -#if defined(Q_WS_WINCE) || defined(QT_SMALL_COLORDIALOG) +#if defined(Q_OS_WINCE) || defined(QT_SMALL_COLORDIALOG) smallDisplay = true; const int lumSpace = 20; #else @@ -1477,7 +1477,7 @@ void QColorDialogPrivate::init(const QColor &initial) leftLay->addWidget(lblBasicColors); leftLay->addWidget(standard); -#if !defined(Q_WS_WINCE) +#if !defined(Q_OS_WINCE) leftLay->addStretch(); #endif @@ -1697,10 +1697,6 @@ void QColorDialog::setCurrentColor(const QColor &color) d->selectColor(color); d->setCurrentAlpha(color.alpha()); -#ifdef Q_WS_MAC - d->setCurrentQColor(color); - d->setCocoaPanelColor(color); -#endif // ### fixme: Call helper if (d->nativeDialogInUse) d->platformColorDialogHelper()->setCurrentColor_sys(color); diff --git a/src/widgets/dialogs/qdialog.cpp b/src/widgets/dialogs/qdialog.cpp index f462a362ca3..49b4dd3a23f 100644 --- a/src/widgets/dialogs/qdialog.cpp +++ b/src/widgets/dialogs/qdialog.cpp @@ -52,6 +52,7 @@ #include "qwhatsthis.h" #include "qmenu.h" #include "qcursor.h" +#include "qplatformtheme_qpa.h" #include "private/qdialog_p.h" #include "private/qguiapplication_p.h" #ifndef QT_NO_ACCESSIBILITY @@ -404,8 +405,8 @@ void QDialogPrivate::resetModalitySetByOpen() resetModalityTo = -1; } -#if defined(Q_WS_WINCE) -#ifdef Q_WS_WINCE_WM +#if defined(Q_OS_WINCE) +#ifdef Q_OS_WINCE_WM void QDialogPrivate::_q_doneAction() { //Done... @@ -419,7 +420,7 @@ void QDialogPrivate::_q_doneAction() bool QDialog::event(QEvent *e) { bool result = QWidget::event(e); -#ifdef Q_WS_WINCE +#ifdef Q_OS_WINCE if (e->type() == QEvent::OkRequest) { accept(); result = true; @@ -430,7 +431,11 @@ bool QDialog::event(QEvent *e) #endif /*! - Returns the modal dialog's result code, \c Accepted or \c Rejected. + In general returns the modal dialog's result code, \c Accepted or + \c Rejected. + + \note When called on a QMessageBox instance, the returned value is a + value of the \l QMessageBox::StandardButton enum. Do not call this function if the dialog was constructed with the Qt::WA_DeleteOnClose attribute. diff --git a/src/widgets/dialogs/qdialog.h b/src/widgets/dialogs/qdialog.h index 40bfbb63ee3..7d3052a782c 100644 --- a/src/widgets/dialogs/qdialog.h +++ b/src/widgets/dialogs/qdialog.h @@ -102,7 +102,7 @@ public Q_SLOTS: protected: QDialog(QDialogPrivate &, QWidget *parent, Qt::WindowFlags f = 0); -#if defined(Q_WS_WINCE) +#if defined(Q_OS_WINCE) bool event(QEvent *e); #endif void keyPressEvent(QKeyEvent *); @@ -119,7 +119,7 @@ private: Q_DISABLE_COPY(QDialog) Q_PRIVATE_SLOT(d_func(), void _q_platformRunNativeAppModalPanel()) -#ifdef Q_WS_WINCE_WM +#ifdef Q_OS_WINCE_WM Q_PRIVATE_SLOT(d_func(), void _q_doneAction()) #endif }; diff --git a/src/widgets/dialogs/qdialog_p.h b/src/widgets/dialogs/qdialog_p.h index ca996004892..c40a885f86c 100644 --- a/src/widgets/dialogs/qdialog_p.h +++ b/src/widgets/dialogs/qdialog_p.h @@ -101,7 +101,7 @@ public: void hideDefault(); void resetModalitySetByOpen(); -#ifdef Q_WS_WINCE_WM +#ifdef Q_OS_WINCE_WM void _q_doneAction(); #endif diff --git a/src/widgets/dialogs/qerrormessage.cpp b/src/widgets/dialogs/qerrormessage.cpp index 4993a6d80f5..094c35b1073 100644 --- a/src/widgets/dialogs/qerrormessage.cpp +++ b/src/widgets/dialogs/qerrormessage.cpp @@ -61,11 +61,9 @@ #include #include -#ifdef Q_WS_WINCE +#ifdef Q_OS_WINCE extern bool qt_wince_is_mobile(); //defined in qguifunctions_wince.cpp extern bool qt_wince_is_high_dpi(); //defined in qguifunctions_wince.cpp - -#include "qguifunctions_wince.h" #endif #if defined(QT_SOFTKEYS_ENABLED) @@ -107,7 +105,7 @@ public: QSize QErrorMessageTextView::minimumSizeHint() const { -#ifdef Q_WS_WINCE +#ifdef Q_OS_WINCE if (qt_wince_is_mobile()) if (qt_wince_is_high_dpi()) return QSize(200, 200); @@ -122,7 +120,7 @@ QSize QErrorMessageTextView::minimumSizeHint() const QSize QErrorMessageTextView::sizeHint() const { -#ifdef Q_WS_WINCE +#ifdef Q_OS_WINCE if (qt_wince_is_mobile()) if (qt_wince_is_high_dpi()) return QSize(400, 200); @@ -132,7 +130,7 @@ QSize QErrorMessageTextView::sizeHint() const return QSize(300, 100); #else return QSize(250, 75); -#endif //Q_WS_WINCE +#endif //Q_OS_WINCE } /*! @@ -255,7 +253,7 @@ QErrorMessage::QErrorMessage(QWidget * parent) #endif -#if defined(Q_WS_WINCE) +#if defined(Q_OS_WINCE) d->ok->setFixedSize(0,0); #endif connect(d->ok, SIGNAL(clicked()), this, SLOT(accept())); diff --git a/src/widgets/dialogs/qfiledialog.cpp b/src/widgets/dialogs/qfiledialog.cpp index db13cfea0f1..84fdef67022 100644 --- a/src/widgets/dialogs/qfiledialog.cpp +++ b/src/widgets/dialogs/qfiledialog.cpp @@ -59,7 +59,7 @@ #include #include #include -#if !defined(Q_WS_WINCE) +#if !defined(Q_OS_WINCE) #include "ui_qfiledialog.h" #else #define Q_EMBEDDED_SMALLSCREEN @@ -482,9 +482,20 @@ bool QFileDialog::restoreState(const QByteArray &state) history.pop_front(); setHistory(history); setDirectory(lastVisitedDir()->isEmpty() ? currentDirectory : *lastVisitedDir()); - if (!d->qFileDialogUi->treeView->header()->restoreState(headerData)) + QHeaderView *headerView = d->qFileDialogUi->treeView->header(); + if (!headerView->restoreState(headerData)) return false; + QList actions = headerView->actions(); + QAbstractItemModel *abstractModel = d->model; +#ifndef QT_NO_PROXYMODEL + if (d->proxyModel) + abstractModel = d->proxyModel; +#endif + int total = qMin(abstractModel->columnCount(QModelIndex()), actions.count() + 1); + for (int i = 1; i < total; ++i) + actions.at(i - 1)->setChecked(!headerView->isSectionHidden(i)); + setViewMode(ViewMode(viewMode)); return true; } @@ -2002,7 +2013,7 @@ QString QFileDialog::getExistingDirectory(QWidget *parent, #if defined(Q_WS_WIN) if (QGuiApplicationPrivate::platformIntegration()->usePlatformNativeDialog() && !(args.options & DontUseNativeDialog) && (options & ShowDirsOnly) -#if defined(Q_WS_WINCE) +#if defined(Q_OS_WINCE) && qt_priv_ptr_valid #endif ) { diff --git a/src/widgets/dialogs/qfileinfogatherer_p.h b/src/widgets/dialogs/qfileinfogatherer_p.h index 3e5d1be384c..c07c908a556 100644 --- a/src/widgets/dialogs/qfileinfogatherer_p.h +++ b/src/widgets/dialogs/qfileinfogatherer_p.h @@ -58,13 +58,14 @@ #include #include #include -#include #include #include #include #include #include +#include + QT_BEGIN_NAMESPACE class QExtendedInformation { @@ -86,8 +87,7 @@ public: #ifndef QT_NO_FSFILEENGINE bool isCaseSensitive() const { - QFSFileEngine fe(mFileInfo.absoluteFilePath()); - return fe.caseSensitive(); + return QFileSystemEngine::isCaseSensitive(); } #endif diff --git a/src/widgets/dialogs/qfontdialog.cpp b/src/widgets/dialogs/qfontdialog.cpp index 2402f2a9557..7e71cd7cd44 100644 --- a/src/widgets/dialogs/qfontdialog.cpp +++ b/src/widgets/dialogs/qfontdialog.cpp @@ -316,11 +316,11 @@ void QFontDialogPrivate::init() buttonBox->addButton(QDialogButtonBox::Cancel); QObject::connect(buttonBox, SIGNAL(rejected()), q, SLOT(reject())); -#if defined(Q_WS_WINCE) +#if defined(Q_OS_WINCE) q->resize(180, 120); #else q->resize(500, 360); -#endif // Q_WS_WINCE +#endif // Q_OS_WINCE sizeEdit->installEventFilter(q); familyList->installEventFilter(q); diff --git a/src/widgets/dialogs/qmessagebox.cpp b/src/widgets/dialogs/qmessagebox.cpp index 0f57fa67e1f..634e911cd14 100644 --- a/src/widgets/dialogs/qmessagebox.cpp +++ b/src/widgets/dialogs/qmessagebox.cpp @@ -189,7 +189,7 @@ public: int layoutMinimumWidth(); void retranslateStrings(); -#ifdef Q_WS_WINCE +#ifdef Q_OS_WINCE void hideSpecial(); #endif @@ -307,7 +307,7 @@ void QMessageBoxPrivate::updateSize() return; QSize screenSize = QApplication::desktop()->availableGeometry(QCursor::pos()).size(); -#if defined(Q_WS_QWS) || defined(Q_WS_WINCE) +#if defined(Q_WS_QWS) || defined(Q_OS_WINCE) // the width of the screen, less the window border. int hardLimit = screenSize.width() - (q->frameGeometry().width() - q->geometry().width()); #else @@ -322,11 +322,11 @@ void QMessageBoxPrivate::updateSize() int softLimit = qMin(hardLimit, 500); #else // note: ideally on windows, hard and soft limits but it breaks compat -#ifndef Q_WS_WINCE +#ifndef Q_OS_WINCE int softLimit = qMin(screenSize.width()/2, 500); #else int softLimit = qMin(screenSize.width() * 3 / 4, 500); -#endif //Q_WS_WINCE +#endif //Q_OS_WINCE #endif if (informativeLabel) @@ -384,7 +384,7 @@ void QMessageBoxPrivate::updateSize() } -#ifdef Q_WS_WINCE +#ifdef Q_OS_WINCE /*! \internal Hides special buttons which are rather shown in the title bar @@ -1239,7 +1239,7 @@ bool QMessageBox::event(QEvent *e) case QEvent::LanguageChange: d_func()->retranslateStrings(); break; -#ifdef Q_WS_WINCE +#ifdef Q_OS_WINCE case QEvent::OkRequest: case QEvent::HelpRequest: { QString bName = @@ -1382,7 +1382,7 @@ void QMessageBox::keyPressEvent(QKeyEvent *e) QDialog::keyPressEvent(e); } -#ifdef Q_WS_WINCE +#ifdef Q_OS_WINCE /*! \reimp */ @@ -1453,7 +1453,7 @@ void QMessageBox::showEvent(QShowEvent *e) Q_D(QMessageBox); if (d->autoAddOkButton) { addButton(Ok); -#if defined(Q_WS_WINCE) +#if defined(Q_OS_WINCE) d->hideSpecial(); #endif } @@ -1773,7 +1773,7 @@ void QMessageBox::aboutQt(QWidget *parent, const QString &title) QPixmap pm(QLatin1String(":/trolltech/qmessagebox/images/qtlogo-64.png")); if (!pm.isNull()) msgBox->setIconPixmap(pm); -#if defined(Q_WS_WINCE) +#if defined(Q_OS_WINCE) msgBox->setDefaultButton(msgBox->addButton(QMessageBox::Ok)); #endif @@ -2597,6 +2597,9 @@ QPixmap QMessageBox::standardIcon(Icon icon) When using QMessageBox with custom buttons, this function returns an opaque value; use clickedButton() to determine which button was clicked. + \note The result() function returns also \l StandardButton value instead + of \l QDialog::DialogCode. + Users cannot interact with any other window in the same application until they close the dialog, either by clicking a button or by using a mechanism provided by the window system. diff --git a/src/widgets/dialogs/qmessagebox.h b/src/widgets/dialogs/qmessagebox.h index b42681a5657..37dfd96514d 100644 --- a/src/widgets/dialogs/qmessagebox.h +++ b/src/widgets/dialogs/qmessagebox.h @@ -143,7 +143,7 @@ public: QPushButton *addButton(StandardButton button); void removeButton(QAbstractButton *button); -#ifdef Q_WS_WINCE +#ifdef Q_OS_WINCE void setVisible(bool visible); #endif diff --git a/src/widgets/dialogs/qwizard.cpp b/src/widgets/dialogs/qwizard.cpp index 629b6828b7a..324831ea52d 100644 --- a/src/widgets/dialogs/qwizard.cpp +++ b/src/widgets/dialogs/qwizard.cpp @@ -69,7 +69,7 @@ #include "private/qdialog_p.h" #include -#ifdef Q_WS_WINCE +#ifdef Q_OS_WINCE extern bool qt_wince_is_mobile(); //defined in qguifunctions_wce.cpp #endif @@ -2178,7 +2178,7 @@ QWizard::QWizard(QWidget *parent, Qt::WindowFlags flags) { Q_D(QWizard); d->init(); -#ifdef Q_WS_WINCE +#ifdef Q_OS_WINCE if (!qt_wince_is_mobile()) setWindowFlags(windowFlags() & ~Qt::WindowOkButtonHint); #endif diff --git a/src/widgets/graphicsview/qgraphicsitem.cpp b/src/widgets/graphicsview/qgraphicsitem.cpp index ba3b4962e7b..ab03ff7a9e2 100644 --- a/src/widgets/graphicsview/qgraphicsitem.cpp +++ b/src/widgets/graphicsview/qgraphicsitem.cpp @@ -11064,9 +11064,9 @@ QGraphicsItemGroup::~QGraphicsItemGroup() } /*! - Adds the given \a item to this item group. The item will be - reparented to this group, but its position and transformation - relative to the scene will stay intact. + Adds the given \a item and item's child items to this item group. + The item and child items will be reparented to this group, but its + position and transformation relative to the scene will stay intact. \sa removeFromGroup(), QGraphicsScene::createItemGroup() */ diff --git a/src/widgets/graphicsview/qgraphicslayout.cpp b/src/widgets/graphicsview/qgraphicslayout.cpp index cec5ba57a3f..63f04f67bc7 100644 --- a/src/widgets/graphicsview/qgraphicslayout.cpp +++ b/src/widgets/graphicsview/qgraphicslayout.cpp @@ -103,6 +103,10 @@ QT_BEGIN_NAMESPACE any way, but for a linear layout, the order is essential. When writing your own layout subclass, you are free to choose the API that best suits your layout. + QGraphicsLayout provides the addChildLayoutItem() convenience function to add + layout items to a custom layout. The function will automatically reparent + graphics items, if required. + \section1 Activating the Layout When the layout's geometry changes, QGraphicsLayout immediately rearranges diff --git a/src/widgets/itemviews/qfileiconprovider.cpp b/src/widgets/itemviews/qfileiconprovider.cpp index dd52aebea59..b6669c0784d 100644 --- a/src/widgets/itemviews/qfileiconprovider.cpp +++ b/src/widgets/itemviews/qfileiconprovider.cpp @@ -47,7 +47,6 @@ #include #include #include -#include #if defined(Q_OS_WIN) # define _WIN32_IE 0x0500 @@ -288,11 +287,7 @@ QIcon QFileIconProviderPrivate::getWinIcon(const QFileInfo &fileInfo) const } } if (pixmap.isNull()) { -#ifndef Q_OS_WINCE pixmap = qt_pixmapFromWinHICON(info.hIcon); -#else - pixmap = QPixmap::fromWinHICON(ImageList_GetIcon((HIMAGELIST) val, info.iIcon, ILD_NORMAL)); -#endif if (!pixmap.isNull()) { retIcon.addPixmap(pixmap); if (!key.isEmpty()) @@ -318,11 +313,7 @@ QIcon QFileIconProviderPrivate::getWinIcon(const QFileInfo &fileInfo) const //using the unique icon index provided by windows save us from duplicate keys key = QString::fromLatin1("qt_dir_%1").arg(info.iIcon); } -#ifndef Q_OS_WINCE pixmap = qt_pixmapFromWinHICON(info.hIcon); -#else - pixmap = QPixmap::fromWinHICON(ImageList_GetIcon((HIMAGELIST) val, info.iIcon, ILD_NORMAL)); -#endif if (!pixmap.isNull()) { retIcon.addPixmap(pixmap); if (!key.isEmpty()) @@ -407,10 +398,6 @@ QIcon QFileIconProvider::icon(const QFileInfo &info) const { Q_D(const QFileIconProvider); - QIcon platformIcon = qt_guiPlatformPlugin()->fileSystemIcon(info); - if (!platformIcon.isNull()) - return platformIcon; - #if defined(Q_WS_X11) && !defined(QT_NO_STYLE_GTK) if (X11->desktopEnvironment == DE_GNOME) { QIcon gtkIcon = QGtkStylePrivate::getFilesystemIcon(info); @@ -429,7 +416,7 @@ QIcon QFileIconProvider::icon(const QFileInfo &info) const return icon; #endif if (info.isRoot()) -#if defined (Q_OS_WIN) && !defined(Q_WS_WINCE) +#if defined (Q_OS_WIN) && !defined(Q_OS_WINCE) { UINT type = GetDriveType((wchar_t *)info.absoluteFilePath().utf16()); diff --git a/src/widgets/itemviews/qheaderview.cpp b/src/widgets/itemviews/qheaderview.cpp index 33c8da4f698..299dcb3dd4f 100644 --- a/src/widgets/itemviews/qheaderview.cpp +++ b/src/widgets/itemviews/qheaderview.cpp @@ -1660,31 +1660,22 @@ void QHeaderView::sectionsInserted(const QModelIndex &parent, d->invalidateCachedSizeHint(); // add the new sections - int insertAt = 0; - for (int spanStart = 0; insertAt < d->sectionSpans.count() && spanStart < logicalFirst; ++insertAt) - spanStart += d->sectionSpans.at(insertAt).count; + int insertAt = logicalFirst; int insertCount = logicalLast - logicalFirst + 1; d->sectionCount += insertCount; + QHeaderViewPrivate::SectionSpan span(d->defaultSectionSize, d->globalResizeMode); + d->sectionStartposRecalc = true; if (d->sectionSpans.isEmpty() || insertAt >= d->sectionSpans.count()) { int insertLength = d->defaultSectionSize * insertCount; d->length += insertLength; - QHeaderViewPrivate::SectionSpan span(insertLength, insertCount, d->globalResizeMode); - d->sectionSpans.append(span); - } else if ((d->sectionSpans.at(insertAt).sectionSize() == d->defaultSectionSize) - && d->sectionSpans.at(insertAt).resizeMode == d->globalResizeMode) { - // add the new sections to an existing span - int insertLength = d->sectionSpans.at(insertAt).sectionSize() * insertCount; - d->length += insertLength; - d->sectionSpans[insertAt].size += insertLength; - d->sectionSpans[insertAt].count += insertCount; + d->sectionSpans.insert(d->sectionSpans.count(), insertCount, span); // append } else { - // separate them out into their own span + // separate them out into their own spans int insertLength = d->defaultSectionSize * insertCount; d->length += insertLength; - QHeaderViewPrivate::SectionSpan span(insertLength, insertCount, d->globalResizeMode); - d->sectionSpans.insert(insertAt, span); + d->sectionSpans.insert(insertAt, insertCount, span); } // update sorting column @@ -3112,177 +3103,27 @@ void QHeaderViewPrivate::resizeSections(QHeaderView::ResizeMode globalMode, bool void QHeaderViewPrivate::createSectionSpan(int start, int end, int size, QHeaderView::ResizeMode mode) { - // ### the code for merging spans does not merge at all opertuneties - // ### what if the number of sections is reduced ? - - SectionSpan span(size, (end - start) + 1, mode); - int start_section = 0; -#if !defined(QT_NO_DEBUG) || defined(QT_FORCE_ASSERTS) - int initial_section_count = headerSectionCount(); // ### debug code -#endif - - QList spansToRemove; - for (int i = 0; i < sectionSpans.count(); ++i) { - int end_section = start_section + sectionSpans.at(i).count - 1; - int section_count = sectionSpans.at(i).count; - if (start <= start_section && end > end_section) { - // the existing span is entirely coveded by the new span - spansToRemove.append(i); - } else if (start < start_section && end >= end_section) { - // the existing span is entirely coveded by the new span - spansToRemove.append(i); - } else if (start == start_section && end == end_section) { - // the new span is covered by an existin span - length -= sectionSpans.at(i).size; - length += size; - sectionSpans[i].size = size; - sectionSpans[i].resizeMode = mode; - // ### check if we can merge the section with any of its neighbours - removeSpans(spansToRemove); - Q_ASSERT(initial_section_count == headerSectionCount()); - return; - } else if (start > start_section && end < end_section) { - if (sectionSpans.at(i).sectionSize() == span.sectionSize() - && sectionSpans.at(i).resizeMode == span.resizeMode) { - Q_ASSERT(initial_section_count == headerSectionCount()); - return; - } - // the new span is in the middle of the old span, so we have to split it - length -= sectionSpans.at(i).size; - int section_size = sectionSpans.at(i).sectionSize(); -#if !defined(QT_NO_DEBUG) || defined(QT_FORCE_ASSERTS) - const int span_count = sectionSpans.at(i).count; -#endif - QHeaderView::ResizeMode span_mode = sectionSpans.at(i).resizeMode; - // first span - int first_span_count = start - start_section; - int first_span_size = section_size * first_span_count; - sectionSpans[i].count = first_span_count; - sectionSpans[i].size = first_span_size; - sectionSpans[i].resizeMode = span_mode; - length += first_span_size; - // middle span (the new span) -#if !defined(QT_NO_DEBUG) || defined(QT_FORCE_ASSERTS) - const int mid_span_count = span.count; -#endif - int mid_span_size = span.size; - sectionSpans.insert(i + 1, span); - length += mid_span_size; - // last span - int last_span_count = end_section - end; - int last_span_size = section_size * last_span_count; - sectionSpans.insert(i + 2, SectionSpan(last_span_size, last_span_count, span_mode)); - length += last_span_size; - Q_ASSERT(span_count == first_span_count + mid_span_count + last_span_count); - removeSpans(spansToRemove); - Q_ASSERT(initial_section_count == headerSectionCount()); - return; - } else if (start > start_section && start <= end_section && end >= end_section) { - // the new span covers the last part of the existing span - length -= sectionSpans.at(i).size; - int removed_count = (end_section - start + 1); - int span_count = sectionSpans.at(i).count - removed_count; - int section_size = sectionSpans.at(i).sectionSize(); - int span_size = section_size * span_count; - sectionSpans[i].count = span_count; - sectionSpans[i].size = span_size; - length += span_size; - if (end == end_section) { - sectionSpans.insert(i + 1, span); // insert after - length += span.size; - removeSpans(spansToRemove); - Q_ASSERT(initial_section_count == headerSectionCount()); - return; - } - } else if (end < end_section && end >= start_section && start <= start_section) { - // the new span covers the first part of the existing span - length -= sectionSpans.at(i).size; - int removed_count = (end - start_section + 1); - int section_size = sectionSpans.at(i).sectionSize(); - int span_count = sectionSpans.at(i).count - removed_count; - int span_size = section_size * span_count; - sectionSpans[i].count = span_count; - sectionSpans[i].size = span_size; - length += span_size; - sectionSpans.insert(i, span); // insert before - length += span.size; - removeSpans(spansToRemove); - Q_ASSERT(initial_section_count == headerSectionCount()); - return; - } - start_section += section_count; - } - - // ### adding and removing _ sections_ in addition to spans - // ### add some more checks here - - if (spansToRemove.isEmpty()) { - if (!sectionSpans.isEmpty() - && sectionSpans.last().sectionSize() == span.sectionSize() - && sectionSpans.last().resizeMode == span.resizeMode) { - length += span.size; - int last = sectionSpans.count() - 1; - sectionSpans[last].count += span.count; - sectionSpans[last].size += span.size; - sectionSpans[last].resizeMode = span.resizeMode; - } else { - length += span.size; - sectionSpans.append(span); - } - } else { - removeSpans(spansToRemove); - length += span.size; - sectionSpans.insert(spansToRemove.first(), span); - //Q_ASSERT(initial_section_count == headerSectionCount()); + int sizePerSection = size / (end - start + 1); + if (end >= sectionSpans.count()) + sectionSpans.resize(end + 1); + SectionSpan *sectiondata = sectionSpans.data(); + for (int i = start; i <= end; ++i) { + length += (sizePerSection - sectiondata[i].size); + sectionStartposRecalc |= (sectiondata[i].size != sizePerSection); + sectiondata[i].size = sizePerSection; + sectiondata[i].resizeMode = mode; } } void QHeaderViewPrivate::removeSectionsFromSpans(int start, int end) { // remove sections - int start_section = 0; - QList spansToRemove; - for (int i = 0; i < sectionSpans.count(); ++i) { - int end_section = start_section + sectionSpans.at(i).count - 1; - int section_size = sectionSpans.at(i).sectionSize(); - int section_count = sectionSpans.at(i).count; - if (start <= start_section && end >= end_section) { - // the change covers the entire span - spansToRemove.append(i); - if (end == end_section) - break; - } else if (start > start_section && end < end_section) { - // all the removed sections are inside the span - int change = (end - start + 1); - sectionSpans[i].count -= change; - sectionSpans[i].size = section_size * sectionSpans.at(i).count; - length -= (change * section_size); - break; - } else if (start >= start_section && start <= end_section) { - // the some of the removed sections are inside the span,at the end - int change = qMin(end_section - start + 1, end - start + 1); - sectionSpans[i].count -= change; - sectionSpans[i].size = section_size * sectionSpans.at(i).count; - start += change; - length -= (change * section_size); - // the change affects several spans - } else if (end >= start_section && end <= end_section) { - // the some of the removed sections are inside the span, at the beginning - int change = qMin((end - start_section + 1), end - start + 1); - sectionSpans[i].count -= change; - sectionSpans[i].size = section_size * sectionSpans.at(i).count; - length -= (change * section_size); - break; - } - start_section += section_count; - } - - for (int i = spansToRemove.count() - 1; i >= 0; --i) { - int s = spansToRemove.at(i); - length -= sectionSpans.at(s).size; - sectionSpans.remove(s); - // ### merge remaining spans - } + sectionStartposRecalc |= (end != sectionSpans.count() - 1); + int removedlength = 0; + for (int u = start; u <= end; ++u) + removedlength += sectionSpans.at(u).size; + length -= removedlength; + sectionSpans.remove(start, end - start + 1); } void QHeaderViewPrivate::clear() @@ -3427,25 +3268,31 @@ void QHeaderViewPrivate::setDefaultSectionSize(int size) { Q_Q(QHeaderView); defaultSectionSize = size; - int currentVisualIndex = 0; for (int i = 0; i < sectionSpans.count(); ++i) { QHeaderViewPrivate::SectionSpan &span = sectionSpans[i]; if (span.size > 0) { //we resize it if it is not hidden (ie size > 0) - const int newSize = span.count * size; + const int newSize = size; if (newSize != span.size) { length += newSize - span.size; //the whole length is changed const int oldSectionSize = span.sectionSize(); - span.size = span.count * size; - for (int i = currentVisualIndex; i < currentVisualIndex + span.count; ++i) { - emit q->sectionResized(logicalIndex(i), oldSectionSize, size); - } + span.size = size; + emit q->sectionResized(logicalIndex(i), oldSectionSize, size); } } - currentVisualIndex += span.count; } } +void QHeaderViewPrivate::recalcSectionStartPos() const // linear (but fast) +{ + int pixelpos = 0; + for (QVector::const_iterator i = sectionSpans.constBegin(); i != sectionSpans.constEnd(); ++i) { + i->calculated_startpos = pixelpos; // write into const mutable + pixelpos += i->size; + } + sectionStartposRecalc = false; +} + void QHeaderViewPrivate::resizeSectionSpan(int visualIndex, int oldSize, int newSize) { Q_Q(QHeaderView); @@ -3456,54 +3303,37 @@ void QHeaderViewPrivate::resizeSectionSpan(int visualIndex, int oldSize, int new int QHeaderViewPrivate::headerSectionSize(int visual) const { - // ### stupid iteration - int section_start = 0; - const int sectionSpansCount = sectionSpans.count(); - for (int i = 0; i < sectionSpansCount; ++i) { - const QHeaderViewPrivate::SectionSpan ¤tSection = sectionSpans.at(i); - int section_end = section_start + currentSection.count - 1; - if (visual >= section_start && visual <= section_end) - return currentSection.sectionSize(); - section_start = section_end + 1; - } + if (visual < sectionCount && visual >= 0) + return sectionSpans.at(visual).sectionSize(); return -1; } int QHeaderViewPrivate::headerSectionPosition(int visual) const { - // ### stupid iteration - int section_start = 0; - int span_position = 0; - const int sectionSpansCount = sectionSpans.count(); - for (int i = 0; i < sectionSpansCount; ++i) { - const QHeaderViewPrivate::SectionSpan ¤tSection = sectionSpans.at(i); - int section_end = section_start + currentSection.count - 1; - if (visual >= section_start && visual <= section_end) - return span_position + (visual - section_start) * currentSection.sectionSize(); - section_start = section_end + 1; - span_position += currentSection.size; + if (visual < sectionCount && visual >= 0) { + if (sectionStartposRecalc) + recalcSectionStartPos(); + return sectionSpans.at(visual).calculated_startpos; } return -1; } int QHeaderViewPrivate::headerVisualIndexAt(int position) const { - // ### stupid iteration - int span_start_section = 0; - int span_position = 0; - const int sectionSpansCount = sectionSpans.count(); - for (int i = 0; i < sectionSpansCount; ++i) { - const QHeaderViewPrivate::SectionSpan ¤tSection = sectionSpans.at(i); - int next_span_start_section = span_start_section + currentSection.count; - int next_span_position = span_position + currentSection.size; - if (position == span_position) - return span_start_section; // spans with no size - if (position > span_position && position < next_span_position) { - int position_in_span = position - span_position; - return span_start_section + (position_in_span / currentSection.sectionSize()); + if (sectionStartposRecalc) + recalcSectionStartPos(); + int startidx = 0; + int endidx = sectionSpans.count() - 1; + while (startidx <= endidx) { + int middle = (endidx + startidx) / 2; + if (sectionSpans.at(middle).calculated_startpos > position) { + endidx = middle - 1; + } else { + if (sectionSpans.at(middle).calculatedEndPos() <= position) + startidx = middle + 1; + else // we found it. + return middle; } - span_start_section = next_span_start_section; - span_position = next_span_position; } return -1; } @@ -3546,9 +3376,9 @@ int QHeaderViewPrivate::adjustedVisualIndex(int visualIndex) const int currentVisualIndex = 0; for (int i = 0; i < sectionSpans.count(); ++i) { if (sectionSpans.at(i).size == 0) - adjustedVisualIndex += sectionSpans.at(i).count; + ++adjustedVisualIndex; else - currentVisualIndex += sectionSpans.at(i).count; + ++currentVisualIndex; if (currentVisualIndex >= visualIndex) break; } @@ -3626,7 +3456,15 @@ bool QHeaderViewPrivate::read(QDataStream &in) globalResizeMode = (QHeaderView::ResizeMode)global; in >> sectionSpans; - + // Spans in Qt5 only contains one element - but for backward compability with Qt4 we do the following + QVector newSectionSpans; + for (int u = 0; u < sectionSpans.count(); ++u) { + int count = sectionSpans.at(u).tmpDataStreamSectionCount; + for (int n = 0; n < count; ++n) + newSectionSpans.append(sectionSpans[u]); + } + sectionSpans = newSectionSpans; + recalcSectionStartPos(); return true; } diff --git a/src/widgets/itemviews/qheaderview_p.h b/src/widgets/itemviews/qheaderview_p.h index e26c4a64759..9d7d97f5828 100644 --- a/src/widgets/itemviews/qheaderview_p.h +++ b/src/widgets/itemviews/qheaderview_p.h @@ -97,7 +97,8 @@ public: lastSectionSize(0), sectionIndicatorOffset(0), sectionIndicator(0), - globalResizeMode(QHeaderView::Interactive) + globalResizeMode(QHeaderView::Interactive), + sectionStartposRecalc(true) {} @@ -281,22 +282,24 @@ public: QLabel *sectionIndicator; QHeaderView::ResizeMode globalResizeMode; QList persistentHiddenSections; - + mutable bool sectionStartposRecalc; // header section spans struct SectionSpan { int size; - int count; + mutable int calculated_startpos; QHeaderView::ResizeMode resizeMode; - inline SectionSpan() : size(0), count(0), resizeMode(QHeaderView::Interactive) {} - inline SectionSpan(int length, int sections, QHeaderView::ResizeMode mode) - : size(length), count(sections), resizeMode(mode) {} - inline int sectionSize() const { return (count > 0 ? size / count : 0); } + inline SectionSpan() : size(0), resizeMode(QHeaderView::Interactive) {} + inline SectionSpan(int length, QHeaderView::ResizeMode mode) + : size(length), calculated_startpos(-1), resizeMode(mode) {} + inline int sectionSize() const { return size; } + inline int calculatedEndPos() const { return calculated_startpos + size; } #ifndef QT_NO_DATASTREAM + int tmpDataStreamSectionCount; inline void write(QDataStream &out) const - { out << size; out << count; out << (int)resizeMode; } + { out << size; out << 1; out << (int)resizeMode; } inline void read(QDataStream &in) - { in >> size; in >> count; int m; in >> m; resizeMode = (QHeaderView::ResizeMode)m; } + { in >> size; in >> tmpDataStreamSectionCount; int m; in >> m; resizeMode = (QHeaderView::ResizeMode)m; } #endif }; @@ -306,12 +309,10 @@ public: void removeSectionsFromSpans(int start, int end); void resizeSectionSpan(int visualIndex, int oldSize, int newSize); void setDefaultSectionSize(int size); + void recalcSectionStartPos() const; // not really const inline int headerSectionCount() const { // for debugging - int count = 0; - for (int i = 0; i < sectionSpans.count(); ++i) - count += sectionSpans.at(i).count; - return count; + return sectionSpans.count(); } inline int headerLength() const { // for debugging @@ -329,12 +330,8 @@ public: } inline int sectionSpanIndex(int visual) const { - int section_start = 0; - for (int i = 0; i < sectionSpans.count(); ++i) { - int section_end = section_start + sectionSpans.at(i).count - 1; - if (visual >= section_start && visual <= section_end) - return i; - section_start = section_end + 1; + if (visual < sectionSpans.count() && visual >= 0) { + return visual; } return -1; } diff --git a/src/widgets/itemviews/qlistwidget.cpp b/src/widgets/itemviews/qlistwidget.cpp index c8a7c664b01..97fbea6c3d9 100644 --- a/src/widgets/itemviews/qlistwidget.cpp +++ b/src/widgets/itemviews/qlistwidget.cpp @@ -1167,10 +1167,10 @@ void QListWidgetPrivate::_q_dataChanged(const QModelIndex &topLeft, \snippet doc/src/snippets/qlistwidget-using/mainwindow.cpp 1 - If you need to insert a new item into the list at a particular position, it - is more required to construct the item without a parent widget and use the - insertItem() function to place it within the list. The list widget will - take ownership of the item. + If you need to insert a new item into the list at a particular position, + then it should be constructed without a parent widget. The insertItem() + function should then be used to place it within the list. The list widget + will take ownership of the item. \snippet doc/src/snippets/qlistwidget-using/mainwindow.cpp 6 \snippet doc/src/snippets/qlistwidget-using/mainwindow.cpp 7 diff --git a/src/widgets/itemviews/qtreeview.cpp b/src/widgets/itemviews/qtreeview.cpp index 179b1228054..7f5e5964ab6 100644 --- a/src/widgets/itemviews/qtreeview.cpp +++ b/src/widgets/itemviews/qtreeview.cpp @@ -83,7 +83,7 @@ QT_BEGIN_NAMESPACE It is simple to construct a tree view displaying data from a model. In the following example, the contents of a directory are - supplied by a QDirModel and displayed as a tree: + supplied by a QFileSystemModel and displayed as a tree: \snippet doc/src/snippets/shareddirmodel/main.cpp 3 \snippet doc/src/snippets/shareddirmodel/main.cpp 6 diff --git a/src/widgets/kernel/kernel.pri b/src/widgets/kernel/kernel.pri index 32934dc7059..97430babd34 100644 --- a/src/widgets/kernel/kernel.pri +++ b/src/widgets/kernel/kernel.pri @@ -40,7 +40,6 @@ HEADERS += \ kernel/qgesturemanager_p.h \ kernel/qsoftkeymanager_p.h \ kernel/qsoftkeymanager_common_p.h \ - kernel/qguiplatformplugin_p.h \ kernel/qdesktopwidget_qpa_p.h \ kernel/qwidgetwindow_qpa_p.h \ kernel/qplatformmenu_qpa.h @@ -72,7 +71,6 @@ SOURCES += \ kernel/qgesturemanager.cpp \ kernel/qsoftkeymanager.cpp \ kernel/qdesktopwidget.cpp \ - kernel/qguiplatformplugin.cpp \ kernel/qwidgetsvariant.cpp \ kernel/qapplication_qpa.cpp \ kernel/qdesktopwidget_qpa.cpp \ @@ -137,9 +135,8 @@ false:!x11:mac { wince*: { HEADERS += \ ../corelib/kernel/qfunctions_wince.h \ - kernel/qguifunctions_wince.h + kernel/qwidgetsfunctions_wince.h SOURCES += \ - ../corelib/kernel/qfunctions_wince.cpp \ - kernel/qguifunctions_wince.cpp + kernel/qwidgetsfunctions_wince.cpp } diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp index ae15c9f62ac..f7153a0f329 100644 --- a/src/widgets/kernel/qapplication.cpp +++ b/src/widgets/kernel/qapplication.cpp @@ -62,14 +62,17 @@ #include "qvariant.h" #include "qwidget.h" #include "private/qdnd_p.h" +#include "private/qguiapplication_p.h" #include "qcolormap.h" #include "qdebug.h" #include "private/qstylesheetstyle_p.h" #include "private/qstyle_p.h" #include "qmessagebox.h" +#include "qwidgetwindow_qpa_p.h" #include #include #include +#include #include "private/qkeymapper_p.h" @@ -77,8 +80,6 @@ #include #endif -#include "qguiplatformplugin_p.h" - #include #include @@ -104,9 +105,8 @@ #include "qlibrary.h" #endif -#ifdef Q_WS_WINCE +#ifdef Q_OS_WINCE #include "qdatetime.h" -#include "qguifunctions_wince.h" extern bool qt_wince_is_smartphone(); //qguifunctions_wince.cpp extern bool qt_wince_is_mobile(); //qguifunctions_wince.cpp extern bool qt_wince_is_pocket_pc(); //qguifunctions_wince.cpp @@ -122,7 +122,7 @@ extern bool qt_wince_is_pocket_pc(); //qguifunctions_wince.cpp static void initResources() { -#if defined(Q_WS_WINCE) +#if defined(Q_OS_WINCE) Q_INIT_RESOURCE_EXTERN(qstyle_wince) Q_INIT_RESOURCE(qstyle_wince); #else @@ -140,7 +140,7 @@ Q_CORE_EXPORT void qt_call_post_routines(); QApplicationPrivate *QApplicationPrivate::self = 0; -#ifdef Q_WS_WINCE +#ifdef Q_OS_WINCE int QApplicationPrivate::autoMaximizeThreshold = -1; bool QApplicationPrivate::autoSipEnabled = false; #else @@ -420,7 +420,6 @@ QWidget *QApplicationPrivate::main_widget = 0; // main application widget QWidget *QApplicationPrivate::focus_widget = 0; // has keyboard input focus QWidget *QApplicationPrivate::hidden_focus_widget = 0; // will get keyboard input focus after show() QWidget *QApplicationPrivate::active_window = 0; // toplevel with keyboard focus -bool QApplicationPrivate::obey_desktop_settings = true; // use winsys resources #ifndef QT_NO_WHEELEVENT int QApplicationPrivate::wheel_scroll_lines; // number of lines to scroll #endif @@ -757,10 +756,6 @@ void QApplicationPrivate::construct( qCritical("Library qttestability load failed!"); } } - - //make sure the plugin is loaded - if (qt_is_gui_used) - qt_guiPlatformPlugin(); #endif } @@ -873,7 +868,7 @@ void QApplicationPrivate::initialize() if (qgetenv("QT_USE_NATIVE_WINDOWS").toInt() > 0) q->setAttribute(Qt::AA_NativeWindows); -#ifdef Q_WS_WINCE +#ifdef Q_OS_WINCE #ifdef QT_AUTO_MAXIMIZE_THRESHOLD autoMaximizeThreshold = QT_AUTO_MAXIMIZE_THRESHOLD; #else @@ -882,7 +877,7 @@ void QApplicationPrivate::initialize() else autoMaximizeThreshold = -1; #endif //QT_AUTO_MAXIMIZE_THRESHOLD -#endif //Q_WS_WINCE +#endif //Q_OS_WINCE #ifndef QT_NO_WHEELEVENT QApplicationPrivate::wheel_scroll_lines = 3; @@ -1202,7 +1197,7 @@ bool QApplication::compressEvent(QEvent *event, QObject *receiver, QPostEventLis The default is platform dependent. */ -#ifdef Q_WS_WINCE +#ifdef Q_OS_WINCE void QApplication::setAutoMaximizeThreshold(const int threshold) { QApplicationPrivate::autoMaximizeThreshold = threshold; @@ -1298,6 +1293,9 @@ QStyle *QApplication::style() // take ownership of the style QApplicationPrivate::app_style->setParent(qApp); + if (!QApplicationPrivate::sys_pal) + if (const QPalette *themePalette = QGuiApplicationPrivate::platformTheme()->palette()) + QApplicationPrivate::setSystemPalette(*themePalette); if (!QApplicationPrivate::sys_pal) QApplicationPrivate::setSystemPalette(QApplicationPrivate::app_style->standardPalette()); if (QApplicationPrivate::set_pal) // repolish set palette with the new style @@ -1851,7 +1849,15 @@ void QApplicationPrivate::setSystemFont(const QFont &font) */ QString QApplicationPrivate::desktopStyleKey() { - return qt_guiPlatformPlugin()->styleName(); + // The platform theme might return a style that is not available, find + // first valid one. + if (const QPlatformTheme *theme = QGuiApplicationPrivate::platformTheme()) { + const QStringList availableKeys = QStyleFactory::keys(); + foreach (const QString &style, theme->themeHint(QPlatformTheme::StyleNames).toStringList()) + if (availableKeys.contains(style, Qt::CaseInsensitive)) + return style; + } + return QString(); } /*! @@ -2911,33 +2917,6 @@ QDesktopWidget *QApplication::desktop() return qt_desktopWidget; } -/*! - Sets whether Qt should use the system's standard colors, fonts, etc., to - \a on. By default, this is true. - - This function must be called before creating the QApplication object, like - this: - - \snippet doc/src/snippets/code/src_gui_kernel_qapplication.cpp 6 - - \sa desktopSettingsAware() -*/ -void QApplication::setDesktopSettingsAware(bool on) -{ - QApplicationPrivate::obey_desktop_settings = on; -} - -/*! - Returns true if Qt is set to use the system's standard colors, fonts, etc.; - otherwise returns false. The default is true. - - \sa setDesktopSettingsAware() -*/ -bool QApplication::desktopSettingsAware() -{ - return QApplicationPrivate::obey_desktop_settings; -} - /*! Returns the current state of the modifier keys on the keyboard. The current state is updated sychronously as the event queue is emptied of events that @@ -3318,6 +3297,20 @@ int QApplication::exec() return QGuiApplication::exec(); } +bool QApplicationPrivate::shouldQuit() +{ + /* if there is no non-withdrawn primary window left (except + the ones without QuitOnClose), we emit the lastWindowClosed + signal */ + QWidgetList list = QApplication::topLevelWidgets(); + for (int i = 0; i < list.size(); ++i) { + QWidget *w = list.at(i); + if (w->isVisible() && !w->parentWidget() && w->testAttribute(Qt::WA_QuitOnClose)) + return false; + } + return true; +} + /*! \reimp */ bool QApplication::notify(QObject *receiver, QEvent *e) @@ -3993,7 +3986,7 @@ bool QApplicationPrivate::notify_helper(QObject *receiver, QEvent * e) if (receiver->isWidgetType()) { QWidget *widget = static_cast(receiver); -#if !defined(Q_WS_WINCE) || (defined(GWES_ICONCURS) && !defined(QT_NO_CURSOR)) +#if !defined(Q_OS_WINCE) || (defined(GWES_ICONCURS) && !defined(QT_NO_CURSOR)) // toggle HasMouse widget state on enter and leave if ((e->type() == QEvent::Enter || e->type() == QEvent::DragEnter) && (!QApplication::activePopupWidget() || QApplication::activePopupWidget() == widget->window())) @@ -5201,6 +5194,28 @@ void QApplicationPrivate::translateRawTouchEvent(QWidget *window, } } +void QApplicationPrivate::translateTouchCancel(QTouchDevice *device, ulong timestamp) +{ + QTouchEvent touchEvent(QEvent::TouchCancel, device, QApplication::keyboardModifiers()); + touchEvent.setTimestamp(timestamp); + QHash::const_iterator it + = self->activeTouchPoints.constBegin(), ite = self->activeTouchPoints.constEnd(); + QSet widgetsNeedingCancel; + while (it != ite) { + QWidget *widget = static_cast(it->target.data()); + if (widget) + widgetsNeedingCancel.insert(widget); + ++it; + } + for (QSet::const_iterator widIt = widgetsNeedingCancel.constBegin(), + widItEnd = widgetsNeedingCancel.constEnd(); widIt != widItEnd; ++widIt) { + QWidget *widget = *widIt; + touchEvent.setWindow(widget->windowHandle()); + touchEvent.setTarget(widget); + QApplication::sendSpontaneousEvent(widget, &touchEvent); + } +} + #ifndef QT_NO_GESTURES QGestureManager* QGestureManager::instance() { diff --git a/src/widgets/kernel/qapplication.h b/src/widgets/kernel/qapplication.h index b613b0f7c03..503b36aec67 100644 --- a/src/widgets/kernel/qapplication.h +++ b/src/widgets/kernel/qapplication.h @@ -89,7 +89,7 @@ class Q_WIDGETS_EXPORT QApplication : public QGuiApplication #ifndef QT_NO_STYLE_STYLESHEET Q_PROPERTY(QString styleSheet READ styleSheet WRITE setStyleSheet) #endif -#ifdef Q_WS_WINCE +#ifdef Q_OS_WINCE Q_PROPERTY(int autoMaximizeThreshold READ autoMaximizeThreshold WRITE setAutoMaximizeThreshold) #endif Q_PROPERTY(bool autoSipEnabled READ autoSipEnabled WRITE setAutoSipEnabled) @@ -158,9 +158,6 @@ public: static Qt::KeyboardModifiers queryKeyboardModifiers(); static Qt::MouseButtons mouseButtons(); - static void setDesktopSettingsAware(bool); - static bool desktopSettingsAware(); - static void setCursorFlashTime(int); static int cursorFlashTime(); @@ -245,7 +242,7 @@ public Q_SLOTS: #ifndef QT_NO_STYLE_STYLESHEET void setStyleSheet(const QString& sheet); #endif -#ifdef Q_WS_WINCE +#ifdef Q_OS_WINCE void setAutoMaximizeThreshold(const int threshold); int autoMaximizeThreshold() const; #endif diff --git a/src/widgets/kernel/qapplication_p.h b/src/widgets/kernel/qapplication_p.h index 601c5114386..e7288681829 100644 --- a/src/widgets/kernel/qapplication_p.h +++ b/src/widgets/kernel/qapplication_p.h @@ -178,6 +178,8 @@ public: virtual void notifyLayoutDirectionChange(); virtual void notifyActiveWindowChange(QWindow *); + virtual bool shouldQuit(); + #if defined(Q_WS_X11) #ifndef QT_NO_SETTINGS static bool x11_apply_settings(); @@ -187,7 +189,7 @@ public: static bool qws_apply_settings(); static QWidget *findWidget(const QObjectList&, const QPoint &, bool rec); #endif -#ifdef Q_WS_WINCE +#ifdef Q_OS_WINCE static int autoMaximizeThreshold; #endif static bool autoSipEnabled; @@ -267,7 +269,6 @@ public: static QWidget *hidden_focus_widget; static QWidget *active_window; static QIcon *app_icon; - static bool obey_desktop_settings; #ifndef QT_NO_WHEELEVENT static int wheel_scroll_lines; #endif @@ -386,6 +387,7 @@ public: QTouchDevice *device, const QList &touchPoints, ulong timestamp); + static void translateTouchCancel(QTouchDevice *device, ulong timestamp); private: #ifdef Q_WS_QWS diff --git a/src/widgets/kernel/qapplication_qpa.cpp b/src/widgets/kernel/qapplication_qpa.cpp index e221df7ef76..54c5c393964 100644 --- a/src/widgets/kernel/qapplication_qpa.cpp +++ b/src/widgets/kernel/qapplication_qpa.cpp @@ -41,6 +41,7 @@ #include "qapplication_p.h" #include "qcolormap.h" +#include "qpalette.h" #include "qpixmapcache.h" #ifndef QT_NO_CURSOR #include "private/qcursor_p.h" @@ -53,8 +54,9 @@ #include "qgenericpluginfactory_qpa.h" #include "private/qplatformintegrationfactory_qpa_p.h" #include - #include +#include + #include #include #include "private/qwindowsysteminterface_qpa_p.h" @@ -62,6 +64,7 @@ #include "qdesktopwidget_qpa_p.h" #include "qwidgetwindow_qpa_p.h" +#include "qtooltip.h" #ifdef Q_OS_WIN # include // for qt_win_display_dc() @@ -393,6 +396,8 @@ void qt_init(QApplicationPrivate *priv, int type) qApp->setAttribute(Qt::AA_DontCreateNativeWidgetSiblings); QColormap::initialize(); + if (const QPalette *toolTipPalette = QGuiApplicationPrivate::platformTheme()->palette(QPlatformTheme::ToolTipPalette)) + QToolTip::setPalette(*toolTipPalette); qApp->setObjectName(appName); } diff --git a/src/widgets/kernel/qguiplatformplugin.cpp b/src/widgets/kernel/qguiplatformplugin.cpp deleted file mode 100644 index f5f00cc7693..00000000000 --- a/src/widgets/kernel/qguiplatformplugin.cpp +++ /dev/null @@ -1,294 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the QtGui module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qguiplatformplugin_p.h" -#include -#include -#include -#include -#include "private/qfactoryloader_p.h" -#include "qstylefactory.h" -#include "qapplication.h" -#include "qplatformdefs.h" -#include "qicon.h" - -#ifdef Q_WS_WINCE -#include "qguifunctions_wince.h" -extern bool qt_wince_is_smartphone(); //qguifunctions_wince.cpp -extern bool qt_wince_is_mobile(); //qguifunctions_wince.cpp -extern bool qt_wince_is_pocket_pc(); //qguifunctions_wince.cpp -#endif - - -#if defined(Q_WS_X11) -#include -#include -#include -#endif - - -QT_BEGIN_NAMESPACE - - -/*! \internal - Return (an construct if necesseray) the Gui Platform plugin. - - The plugin key to be loaded is inside the QT_PLATFORM_PLUGIN environment variable. - If it is not set, it will be the DESKTOP_SESSION on X11. - - If no plugin can be loaded, the default one is returned. - */ -QGuiPlatformPlugin *qt_guiPlatformPlugin() -{ - static QGuiPlatformPlugin *plugin; - if (!plugin) - { -#ifndef QT_NO_LIBRARY - - QString key = QString::fromLocal8Bit(qgetenv("QT_PLATFORM_PLUGIN")); -#ifdef Q_WS_X11 - if (key.isEmpty()) { - switch(X11->desktopEnvironment) { - case DE_KDE: - key = QString::fromLatin1("kde"); - break; - default: - key = QString::fromLocal8Bit(qgetenv("DESKTOP_SESSION")); - break; - } - } -#endif - - if (!key.isEmpty() && QApplication::desktopSettingsAware()) { - QFactoryLoader loader(QGuiPlatformPluginInterface_iid, QLatin1String("/gui_platform")); - plugin = qobject_cast(loader.instance(key)); - } -#endif // QT_NO_LIBRARY - - if(!plugin) { - static QGuiPlatformPlugin def; - plugin = &def; - } - } - return plugin; -} - - -/* \class QPlatformPlugin - QGuiPlatformPlugin can be used to integrate Qt applications in a platform built on top of Qt. - The application developer should not know or use the plugin, it is only used by Qt internaly. - - But full platforms that are built on top of Qt may provide a plugin so 3rd party Qt applications - running on the platform are integrated. - */ - -/* - The constructor can be used to install hooks in Qt - */ -QGuiPlatformPlugin::QGuiPlatformPlugin(QObject *parent) : QObject(parent) {} -QGuiPlatformPlugin::~QGuiPlatformPlugin() {} - - -/* return the string key to be used by default the application */ -QString QGuiPlatformPlugin::styleName() -{ -#if defined(Q_WS_WIN) && defined(Q_WS_WINCE) - if (qt_wince_is_smartphone() || qt_wince_is_pocket_pc()) - return QLatin1String("WindowsMobile"); - else - return QLatin1String("WindowsCE"); -#elif defined(Q_OS_WIN) - if ((QSysInfo::WindowsVersion >= QSysInfo::WV_VISTA - && QSysInfo::WindowsVersion < QSysInfo::WV_NT_based)) - return QLatin1String("WindowsVista"); - else if ((QSysInfo::WindowsVersion >= QSysInfo::WV_XP - && QSysInfo::WindowsVersion < QSysInfo::WV_NT_based)) - return QLatin1String("WindowsXP"); - else - return QLatin1String("Windows"); // default styles for Windows -#elif defined(Q_WS_X11) && defined(Q_OS_SOLARIS) - return QLatin1String("CDE"); // default style for X11 on Solaris -#elif defined(Q_WS_X11) && defined(Q_OS_IRIX) - return QLatin1String("SGI"); // default style for X11 on IRIX -#elif defined(Q_OS_MAC) - return QLatin1String("Macintosh"); // default style for all Mac's -#elif defined(Q_WS_X11) - QString stylename; - switch(X11->desktopEnvironment) { - case DE_KDE: - stylename = QKde::kdeStyle(); - break; - case DE_GNOME: { - QStringList availableStyles = QStyleFactory::keys(); - // Set QGtkStyle for GNOME if available - QString gtkStyleKey = QString::fromLatin1("GTK+"); - if (availableStyles.contains(gtkStyleKey)) { - stylename = gtkStyleKey; - break; - } - if (X11->use_xrender) - stylename = QLatin1String("cleanlooks"); - else - stylename = QLatin1String("windows"); - break; - } - case DE_CDE: - stylename = QLatin1String("cde"); - break; - default: - // Don't do anything - break; - } - return stylename; -#else - return QLatin1String("Plastique"); // default style for X11 and small devices -#endif -} - -/* return an additional default palette (only work on X11) */ -QPalette QGuiPlatformPlugin::palette() -{ -#ifdef Q_WS_X11 - if (QApplication::desktopSettingsAware() && X11->desktopEnvironment == DE_KDE) - return QKde::kdePalette(); -#endif - - return QPalette(); -} - -/* the default icon theme name for QIcon::fromTheme. */ -QString QGuiPlatformPlugin::systemIconThemeName() -{ - QString result; -#ifdef Q_WS_X11 - if (X11->desktopEnvironment == DE_GNOME) { - result = QString::fromLatin1("gnome"); -#ifndef QT_NO_STYLE_GTK - result = QGtkStylePrivate::getGConfString(QLatin1String("/desktop/gnome/interface/icon_theme"), result); -#endif - } else if (X11->desktopEnvironment == DE_KDE) { - result = X11->desktopVersion >= 4 ? QString::fromLatin1("oxygen") : QString::fromLatin1("crystalsvg"); - QSettings settings(QKde::kdeHome() + QLatin1String("/share/config/kdeglobals"), QSettings::IniFormat); - settings.beginGroup(QLatin1String("Icons")); - result = settings.value(QLatin1String("Theme"), result).toString(); - } -#endif - return result; -} - - -QStringList QGuiPlatformPlugin::iconThemeSearchPaths() -{ - QStringList paths; -#if defined(Q_WS_X11) - QString xdgDirString = QFile::decodeName(getenv("XDG_DATA_DIRS")); - if (xdgDirString.isEmpty()) - xdgDirString = QLatin1String("/usr/local/share/:/usr/share/"); - - QStringList xdgDirs = xdgDirString.split(QLatin1Char(':')); - - for (int i = 0 ; i < xdgDirs.size() ; ++i) { - QDir dir(xdgDirs[i]); - if (dir.exists()) - paths.append(dir.path() + QLatin1String("/icons")); - } - if (X11->desktopEnvironment == DE_KDE) { - paths << QLatin1Char(':') + QKde::kdeHome() + QLatin1String("/share/icons"); - QStringList kdeDirs = QFile::decodeName(getenv("KDEDIRS")).split(QLatin1Char(':')); - for (int i = 0 ; i< kdeDirs.count() ; ++i) { - QDir dir(QLatin1Char(':') + kdeDirs.at(i) + QLatin1String("/share/icons")); - if (dir.exists()) - paths.append(dir.path()); - } - } - - // Add home directory first in search path - QDir homeDir(QDir::homePath() + QLatin1String("/.icons")); - if (homeDir.exists()) - paths.prepend(homeDir.path()); -#endif - -#if defined(Q_WS_WIN) - paths.append(qApp->applicationDirPath() + QLatin1String("/icons")); -#elif defined(Q_WS_MAC) - paths.append(qApp->applicationDirPath() + QLatin1String("/../Resources/icons")); -#endif - return paths; -} - -/* backend for QFileIconProvider, null icon means default */ -QIcon QGuiPlatformPlugin::fileSystemIcon(const QFileInfo &) -{ - return QIcon(); -} - -/* Like QStyle::styleHint */ -int QGuiPlatformPlugin::platformHint(PlatformHint hint) -{ - int ret = 0; - switch(hint) - { - case PH_ToolButtonStyle: - ret = Qt::ToolButtonIconOnly; -#ifdef Q_WS_X11 - if (X11->desktopEnvironment == DE_KDE && X11->desktopVersion >= 4 - && QApplication::desktopSettingsAware()) { - ret = QKde::kdeToolButtonStyle(); - } -#endif - break; - case PH_ToolBarIconSize: -#ifdef Q_WS_X11 - if (X11->desktopEnvironment == DE_KDE && X11->desktopVersion >= 4 - && QApplication::desktopSettingsAware()) { - ret = QKde::kdeToolBarIconSize(); - } -#endif - //by default keep ret = 0 so QCommonStyle will use the style default - break; - default: - break; - } - return ret; -} - - -QT_END_NAMESPACE diff --git a/src/widgets/kernel/qicon.cpp b/src/widgets/kernel/qicon.cpp index 1d3236aa467..e579fac4f4f 100644 --- a/src/widgets/kernel/qicon.cpp +++ b/src/widgets/kernel/qicon.cpp @@ -53,7 +53,6 @@ #include "qvariant.h" #include "qcache.h" #include "qdebug.h" -#include "private/qguiplatformplugin_p.h" #include "qapplication.h" #ifdef Q_WS_MAC diff --git a/src/widgets/kernel/qiconloader.cpp b/src/widgets/kernel/qiconloader.cpp index 0b86189b5ec..2f9576f864a 100644 --- a/src/widgets/kernel/qiconloader.cpp +++ b/src/widgets/kernel/qiconloader.cpp @@ -43,11 +43,12 @@ #include #include -#include +#include #include #include #include +#include #include #include #include @@ -73,17 +74,11 @@ Q_GLOBAL_STATIC(QIconLoader, iconLoaderInstance) /* Theme to use in last resort, if the theme does not have the icon, neither the parents */ static QString fallbackTheme() { -#ifdef Q_WS_X11 - if (X11->desktopEnvironment == DE_GNOME) { - return QLatin1String("gnome"); - } else if (X11->desktopEnvironment == DE_KDE) { - return X11->desktopVersion >= 4 - ? QString::fromLatin1("oxygen") - : QString::fromLatin1("crystalsvg"); - } else { - return QLatin1String("hicolor"); + if (const QPlatformTheme *theme = QGuiApplicationPrivate::platformTheme()) { + const QVariant themeHint = theme->themeHint(QPlatformTheme::SystemIconThemeName); + if (themeHint.isValid()) + return themeHint.toString(); } -#endif return QString(); } @@ -94,6 +89,27 @@ QIconLoader::QIconLoader() : // We lazily initialize the loader to make static icons // work. Though we do not officially support this. + +static inline QString systemThemeName() +{ + if (const QPlatformTheme *theme = QGuiApplicationPrivate::platformTheme()) { + const QVariant themeHint = theme->themeHint(QPlatformTheme::SystemIconThemeName); + if (themeHint.isValid()) + return themeHint.toString(); + } + return QString(); +} + +static inline QStringList systemIconSearchPaths() +{ + if (const QPlatformTheme *theme = QGuiApplicationPrivate::platformTheme()) { + const QVariant themeHint = theme->themeHint(QPlatformTheme::IconThemeSearchPaths); + if (themeHint.isValid()) + return themeHint.toStringList(); + } + return QStringList(); +} + void QIconLoader::ensureInitialized() { if (!m_initialized) { @@ -101,7 +117,8 @@ void QIconLoader::ensureInitialized() Q_ASSERT(qApp); - m_systemTheme = qt_guiPlatformPlugin()->systemIconThemeName(); + m_systemTheme = systemThemeName(); + if (m_systemTheme.isEmpty()) m_systemTheme = fallbackTheme(); #ifndef QT_NO_LIBRARY @@ -125,7 +142,7 @@ void QIconLoader::updateSystemTheme() { // Only change if this is not explicitly set by the user if (m_userTheme.isEmpty()) { - QString theme = qt_guiPlatformPlugin()->systemIconThemeName(); + QString theme = systemThemeName(); if (theme.isEmpty()) theme = fallbackTheme(); if (theme != m_systemTheme) { @@ -151,7 +168,7 @@ void QIconLoader::setThemeSearchPath(const QStringList &searchPaths) QStringList QIconLoader::themeSearchPaths() const { if (m_iconDirs.isEmpty()) { - m_iconDirs = qt_guiPlatformPlugin()->iconThemeSearchPaths(); + m_iconDirs = systemIconSearchPaths(); // Always add resource directory as search path m_iconDirs.append(QLatin1String(":/icons")); } @@ -221,8 +238,11 @@ QIconTheme::QIconTheme(const QString &themeName) QLatin1String("Icon Theme/Inherits")).toStringList(); // Ensure a default platform fallback for all themes - if (m_parents.isEmpty()) - m_parents.append(fallbackTheme()); + if (m_parents.isEmpty()) { + const QString fallback = fallbackTheme(); + if (!fallback.isEmpty()) + m_parents.append(fallback); + } // Ensure that all themes fall back to hicolor if (!m_parents.contains(QLatin1String("hicolor"))) diff --git a/src/widgets/kernel/qlayoutitem.cpp b/src/widgets/kernel/qlayoutitem.cpp index 860f1cc1932..664334d7258 100644 --- a/src/widgets/kernel/qlayoutitem.cpp +++ b/src/widgets/kernel/qlayoutitem.cpp @@ -522,7 +522,7 @@ bool QWidgetItem::hasHeightForWidth() const { if (isEmpty()) return false; - return wid->d_func()->hasHeightForWidth(); + return wid->hasHeightForWidth(); } /*! diff --git a/src/widgets/kernel/qwhatsthis.cpp b/src/widgets/kernel/qwhatsthis.cpp index 3d8bb5e4bfd..4a6f3518d02 100644 --- a/src/widgets/kernel/qwhatsthis.cpp +++ b/src/widgets/kernel/qwhatsthis.cpp @@ -54,6 +54,7 @@ #include "qcursor.h" #include "qbitmap.h" #include "qtextdocument.h" +#include "qplatformtheme_qpa.h" #include "private/qtextdocumentlayout_p.h" #include "qtoolbutton.h" #include "qdebug.h" diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp index 4709a89d273..44995f09596 100644 --- a/src/widgets/kernel/qwidget.cpp +++ b/src/widgets/kernel/qwidget.cpp @@ -1095,7 +1095,7 @@ void QWidgetPrivate::adjustFlags(Qt::WindowFlags &flags, QWidget *w) if (customize) ; // don't modify window flags if the user explicitly set them. else if (type == Qt::Dialog || type == Qt::Sheet) -#ifndef Q_WS_WINCE +#ifndef Q_OS_WINCE flags |= Qt::WindowTitleHint | Qt::WindowSystemMenuHint | Qt::WindowContextHelpButtonHint | Qt::WindowCloseButtonHint; #else flags |= Qt::WindowTitleHint | Qt::WindowSystemMenuHint | Qt::WindowCloseButtonHint; @@ -3018,8 +3018,8 @@ QList QWidget::actions() const \property QWidget::enabled \brief whether the widget is enabled - An enabled widget handles keyboard and mouse events; a disabled - widget does not. + In general an enabled widget handles keyboard and mouse events; a disabled + widget does not. An exception is made with \l{QAbstractButton}. Some widgets display themselves differently when they are disabled. For example a button might draw its label grayed out. If @@ -4150,7 +4150,7 @@ const QPalette &QWidget::palette() const if (!isEnabled()) { data->pal.setCurrentColorGroup(QPalette::Disabled); } else if ((!isVisible() || isActiveWindow()) -#if defined(Q_OS_WIN) && !defined(Q_WS_WINCE) +#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !QApplicationPrivate::isBlockedByModal(const_cast(this)) #endif ) { @@ -7245,9 +7245,6 @@ void QWidget::setVisible(bool visible) setAttribute(Qt::WA_KeyboardFocusChange, false); if (isWindow() || parentWidget()->isVisible()) { - // remove posted quit events when showing a new window - QCoreApplication::removePostedEvents(qApp, QEvent::Quit); - d->show_helper(); qApp->d_func()->sendSyntheticEnterLeave(this); @@ -7413,8 +7410,24 @@ bool QWidgetPrivate::close_helper(CloseMode mode) // Attempt to close the application only if this has WA_QuitOnClose set and a non-visible parent quitOnClose = quitOnClose && (parentWidget.isNull() || !parentWidget->isVisible()); - if (quitOnClose && q->windowHandle()) { - static_cast(QObjectPrivate::get(q->windowHandle()))->maybeQuitOnLastWindowClosed(); + if (quitOnClose) { + /* if there is no non-withdrawn primary window left (except + the ones without QuitOnClose), we emit the lastWindowClosed + signal */ + QWidgetList list = QApplication::topLevelWidgets(); + bool lastWindowClosed = true; + for (int i = 0; i < list.size(); ++i) { + QWidget *w = list.at(i); + if (!w->isVisible() || w->parentWidget() || !w->testAttribute(Qt::WA_QuitOnClose)) + continue; + lastWindowClosed = false; + break; + } + if (lastWindowClosed) { + QGuiApplicationPrivate::emitLastWindowClosed(); + QCoreApplicationPrivate *applicationPrivate = static_cast(QObjectPrivate::get(QCoreApplication::instance())); + applicationPrivate->maybeQuit(); + } } @@ -7579,7 +7592,7 @@ QSize QWidgetPrivate::adjustedSize() const #else // all others QRect screen = QApplication::desktop()->screenGeometry(q->pos()); #endif -#if defined (Q_WS_WINCE) +#if defined (Q_OS_WINCE) s.setWidth(qMin(s.width(), screen.width())); s.setHeight(qMin(s.height(), screen.height())); #else @@ -7776,6 +7789,7 @@ bool QWidget::event(QEvent *event) case QEvent::TouchBegin: case QEvent::TouchUpdate: case QEvent::TouchEnd: + case QEvent::TouchCancel: case QEvent::ContextMenu: #ifndef QT_NO_WHEELEVENT case QEvent::Wheel: @@ -8048,6 +8062,7 @@ bool QWidget::event(QEvent *event) case QEvent::LocaleChange: case QEvent::MacSizeChange: case QEvent::ContentsRectChange: + case QEvent::ThemeChange: changeEvent(event); break; @@ -8178,6 +8193,7 @@ bool QWidget::event(QEvent *event) case QEvent::TouchBegin: case QEvent::TouchUpdate: case QEvent::TouchEnd: + case QEvent::TouchCancel: { event->ignore(); break; @@ -8250,6 +8266,20 @@ void QWidget::changeEvent(QEvent * event) update(); break; + case QEvent::ThemeChange: + if (QApplication::desktopSettingsAware() && windowType() != Qt::Desktop + && qApp && !QApplication::closingDown()) { + if (testAttribute(Qt::WA_WState_Polished)) + QApplication::style()->unpolish(this); + if (testAttribute(Qt::WA_WState_Polished)) + QApplication::style()->polish(this); + QEvent styleChangedEvent(QEvent::StyleChange); + QCoreApplication::sendEvent(this, &styleChangedEvent); + if (isVisible()) + update(); + } + break; + #ifdef Q_WS_MAC case QEvent::MacSizeChange: updateGeometry(); @@ -9196,19 +9226,12 @@ int QWidget::heightForWidth(int w) const /*! - \internal - - *virtual private* - - This is a bit hackish, but ideally we would have created a virtual function - in the public API (however, too late...) so that subclasses could reimplement - their own function. - Instead we add a virtual function to QWidgetPrivate. - ### Qt5: move to public class and make virtual + Returns true if the widget's preferred height depends on its width; otherwise returns false. */ -bool QWidgetPrivate::hasHeightForWidth() const +bool QWidget::hasHeightForWidth() const { - return layout ? layout->hasHeightForWidth() : size_policy.hasHeightForWidth(); + Q_D(const QWidget); + return d->layout ? d->layout->hasHeightForWidth() : d->size_policy.hasHeightForWidth(); } /*! diff --git a/src/widgets/kernel/qwidget.h b/src/widgets/kernel/qwidget.h index 0f13d0b7f6f..78b693c78d6 100644 --- a/src/widgets/kernel/qwidget.h +++ b/src/widgets/kernel/qwidget.h @@ -481,11 +481,7 @@ public Q_SLOTS: virtual void setVisible(bool visible); inline void setHidden(bool hidden) { setVisible(!hidden); } -#ifndef Q_WS_WINCE inline void show() { setVisible(true); } -#else - void show(); -#endif inline void hide() { setVisible(false); } void showMinimized(); @@ -528,6 +524,7 @@ public: void setSizePolicy(QSizePolicy); inline void setSizePolicy(QSizePolicy::Policy horizontal, QSizePolicy::Policy vertical); virtual int heightForWidth(int) const; + virtual bool hasHeightForWidth() const; QRegion visibleRegion() const; diff --git a/src/widgets/kernel/qwidget_p.h b/src/widgets/kernel/qwidget_p.h index 0da0c65aaa4..38314c234bf 100644 --- a/src/widgets/kernel/qwidget_p.h +++ b/src/widgets/kernel/qwidget_p.h @@ -283,9 +283,8 @@ public: DrawRecursive = 0x04, DrawInvisible = 0x08, DontSubtractOpaqueChildren = 0x10, - DontSetCompositionMode = 0x20, - DontDrawOpaqueChildren = 0x40, - DontDrawNativeChildren = 0x80 + DontDrawOpaqueChildren = 0x20, + DontDrawNativeChildren = 0x40 }; enum CloseMode { @@ -468,7 +467,6 @@ public: bool setMinimumSize_helper(int &minw, int &minh); bool setMaximumSize_helper(int &maxw, int &maxh); - virtual bool hasHeightForWidth() const; void setConstraints_sys(); bool pointInsideRectAndMask(const QPoint &) const; QWidget *childAt_helper(const QPoint &, bool) const; diff --git a/src/widgets/kernel/qwidget_qpa.cpp b/src/widgets/kernel/qwidget_qpa.cpp index 289b332a133..a37de8547ad 100644 --- a/src/widgets/kernel/qwidget_qpa.cpp +++ b/src/widgets/kernel/qwidget_qpa.cpp @@ -424,6 +424,19 @@ void QWidget::activateWindow() windowHandle()->requestActivateWindow(); } +// Position top level windows at the center, avoid showing +// Windows at the default 0,0 position excluding the frame. +static inline QRect positionTopLevelWindow(QRect geometry, const QScreen *screen) +{ + if (screen && geometry.x() == 0 && geometry.y() == 0) { + const QRect availableGeometry = screen->availableGeometry(); + if (availableGeometry.width() > geometry.width() + && availableGeometry.height() > geometry.height()) + geometry.moveCenter(availableGeometry.center()); + } + return geometry; +} + void QWidgetPrivate::show_sys() { Q_Q(QWidget); @@ -441,7 +454,10 @@ void QWidgetPrivate::show_sys() QWindow *window = q->windowHandle(); if (window) { QRect geomRect = q->geometry(); - if (!q->isWindow()) { + if (q->isWindow()) { + if (!q->testAttribute(Qt::WA_Moved)) + geomRect = positionTopLevelWindow(geomRect, window->screen()); + } else { QPoint topLeftOfWindow = q->mapTo(q->nativeParentWidget(),QPoint()); geomRect.moveTopLeft(topLeftOfWindow); } @@ -483,7 +499,15 @@ void QWidgetPrivate::hide_sys() void QWidgetPrivate::setMaxWindowState_helper() { - setFullScreenSize_helper(); //### decoration size + Q_Q(QWidget); + + const uint old_state = data.in_set_window_state; + data.in_set_window_state = 1; + + const QRect desktop = qApp->desktop()->availableGeometry(qApp->desktop()->screenNumber(q)); + q->setGeometry(desktop); + + data.in_set_window_state = old_state; } void QWidgetPrivate::setFullScreenSize_helper() diff --git a/src/widgets/kernel/qwidgetsfunctions_wince.cpp b/src/widgets/kernel/qwidgetsfunctions_wince.cpp new file mode 100644 index 00000000000..a45694177e9 --- /dev/null +++ b/src/widgets/kernel/qwidgetsfunctions_wince.cpp @@ -0,0 +1,126 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the QtWidgets module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +#include "qwidgetsfunctions_wince.h" +#include + +QT_USE_NAMESPACE + +#ifndef ShellExecute +HINSTANCE qt_wince_ShellExecute(HWND hwnd, LPCWSTR, LPCWSTR file, LPCWSTR params, LPCWSTR dir, int showCmd) +{ + SHELLEXECUTEINFO info; + info.hwnd = hwnd; + info.lpVerb = L"Open"; + info.lpFile = file; + info.lpParameters = params; + info.lpDirectory = dir; + info.nShow = showCmd; + info.cbSize = sizeof(info); + ShellExecuteEx(&info); + return info.hInstApp; +} +#endif + +#ifndef SPI_GETPLATFORMTYPE +#define SPI_GETPLATFORMTYPE 257 +#endif + +// Internal Qt ----------------------------------------------------- +bool qt_wince_is_platform(const QString &platformString) { + wchar_t tszPlatform[64]; + if (SystemParametersInfo(SPI_GETPLATFORMTYPE, sizeof(tszPlatform) / sizeof(wchar_t), tszPlatform, 0)) + if (0 == _tcsicmp(reinterpret_cast (platformString.utf16()), tszPlatform)) + return true; + return false; +} + +int qt_wince_get_build() +{ + OSVERSIONINFO osvi; + osvi.dwOSVersionInfoSize = sizeof(osvi); + if (GetVersionEx(&osvi)) + return osvi.dwBuildNumber; + return 0; +} + +int qt_wince_get_version() +{ + OSVERSIONINFO osvi; + osvi.dwOSVersionInfoSize = sizeof(osvi); + if (GetVersionEx(&osvi)) + return (osvi.dwMajorVersion * 10 + osvi.dwMinorVersion); + return 0; +} + +bool qt_wince_is_windows_mobile_65() +{ + const DWORD dwFirstWM65BuildNumber = 21139; + OSVERSIONINFO osvi; + osvi.dwOSVersionInfoSize = sizeof(osvi); + if (!GetVersionEx(&osvi)) + return false; + return osvi.dwMajorVersion > 5 + || (osvi.dwMajorVersion == 5 && (osvi.dwMinorVersion > 2 || + (osvi.dwMinorVersion == 2 && osvi.dwBuildNumber >= dwFirstWM65BuildNumber))); +} + +bool qt_wince_is_pocket_pc() { + return qt_wince_is_platform(QString::fromLatin1("PocketPC")); +} + +bool qt_wince_is_smartphone() { + return qt_wince_is_platform(QString::fromLatin1("Smartphone")); +} +bool qt_wince_is_mobile() { + return (qt_wince_is_smartphone() || qt_wince_is_pocket_pc()); +} + +bool qt_wince_is_high_dpi() { + if (!qt_wince_is_pocket_pc()) + return false; + HDC deviceContext = GetDC(0); + int dpi = GetDeviceCaps(deviceContext, LOGPIXELSX); + ReleaseDC(0, deviceContext); + if ((dpi < 1000) && (dpi > 0)) + return dpi > 96; + else + return false; +} diff --git a/src/corelib/arch/sh/qatomic_sh.cpp b/src/widgets/kernel/qwidgetsfunctions_wince.h similarity index 75% rename from src/corelib/arch/sh/qatomic_sh.cpp rename to src/widgets/kernel/qwidgetsfunctions_wince.h index 5cd1b593d8c..8223b0fb68a 100644 --- a/src/corelib/arch/sh/qatomic_sh.cpp +++ b/src/widgets/kernel/qwidgetsfunctions_wince.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtCore module of the Qt Toolkit. +** This file is part of the QtWidgets module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -38,35 +38,25 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ +#ifndef QWIDGETSFUNCTIONS_WCE_H +#define QWIDGETSFUNCTIONS_WCE_H +#ifdef Q_OS_WINCE +#include -#include - -#include -#ifdef _POSIX_PRIORITY_SCHEDULING -# include -#endif -#include - +#ifdef QT_BUILD_GUI_LIB +QT_BEGIN_HEADER QT_BEGIN_NAMESPACE - -QT_USE_NAMESPACE - -Q_CORE_EXPORT volatile char qt_atomic_lock = 0; - -Q_CORE_EXPORT void qt_atomic_yield(int *count) -{ -#ifdef _POSIX_PRIORITY_SCHEDULING - if((*count)++ < 50) { - sched_yield(); - } else -#endif - { - struct timespec tm; - tm.tv_sec = 0; - tm.tv_nsec = 2000001; - nanosleep(&tm, NULL); - *count = 0; - } -} - +QT_MODULE(Gui) QT_END_NAMESPACE +QT_END_HEADER +#endif + + +//WinCe 7 has shell support +#ifndef ShellExecute +HINSTANCE qt_wince_ShellExecute(HWND hwnd, LPCWSTR operation, LPCWSTR file, LPCWSTR params, LPCWSTR dir, int showCmd); +#define ShellExecute(a,b,c,d,e,f) qt_wince_ShellExecute(a,b,c,d,e,f) +#endif + +#endif // Q_OS_WINCE +#endif // QWIDGETSFUNCTIONS_WCE_H \ No newline at end of file diff --git a/src/widgets/kernel/qwidgetwindow_qpa.cpp b/src/widgets/kernel/qwidgetwindow_qpa.cpp index e7ba4853a08..c04d8a9dc3e 100644 --- a/src/widgets/kernel/qwidgetwindow_qpa.cpp +++ b/src/widgets/kernel/qwidgetwindow_qpa.cpp @@ -110,6 +110,7 @@ bool QWidgetWindow::event(QEvent *event) case QEvent::TouchBegin: case QEvent::TouchUpdate: case QEvent::TouchEnd: + case QEvent::TouchCancel: handleTouchEvent(static_cast(event)); return true; @@ -149,6 +150,12 @@ bool QWidgetWindow::event(QEvent *event) handleWindowStateChangedEvent(static_cast(event)); return true; + case QEvent::ThemeChange: { + QEvent widgetEvent(QEvent::ThemeChange); + QGuiApplication::sendSpontaneousEvent(m_widget, &widgetEvent); + } + return true; + default: break; } @@ -289,7 +296,10 @@ void QWidgetWindow::handleMouseEvent(QMouseEvent *event) void QWidgetWindow::handleTouchEvent(QTouchEvent *event) { - QApplicationPrivate::translateRawTouchEvent(m_widget, event->device(), event->touchPoints(), event->timestamp()); + if (event->type() == QEvent::TouchCancel) + QApplicationPrivate::translateTouchCancel(event->device(), event->timestamp()); + else + QApplicationPrivate::translateRawTouchEvent(m_widget, event->device(), event->touchPoints(), event->timestamp()); } void QWidgetWindow::handleKeyEvent(QKeyEvent *event) diff --git a/src/widgets/kernel/win.pri b/src/widgets/kernel/win.pri index 4288e09ecb3..dd47664c286 100644 --- a/src/widgets/kernel/win.pri +++ b/src/widgets/kernel/win.pri @@ -2,4 +2,6 @@ # -------------------------------------------------------------------- INCLUDEPATH += ../3rdparty/wintab -LIBS *= -lshell32 +!wince* { + LIBS *= -lshell32 +} diff --git a/src/widgets/styles/qcommonstyle.cpp b/src/widgets/styles/qcommonstyle.cpp index db783d14d40..75476faeeb7 100644 --- a/src/widgets/styles/qcommonstyle.cpp +++ b/src/widgets/styles/qcommonstyle.cpp @@ -45,6 +45,7 @@ #include #include #include +#include #include #include #include @@ -75,7 +76,6 @@ #include #include #include -#include #include @@ -4509,9 +4509,11 @@ int QCommonStyle::pixelMetric(PixelMetric m, const QStyleOption *opt, const QWid break; case PM_ToolBarIconSize: - ret = qt_guiPlatformPlugin()->platformHint(QGuiPlatformPlugin::PH_ToolBarIconSize); - if (!ret) - ret = int(QStyleHelper::dpiScaled(24.)); + ret = 0; + if (const QPlatformTheme *theme = QGuiApplicationPrivate::platformTheme()) + ret = theme->themeHint(QPlatformTheme::ToolBarIconSize).toInt(); + if (ret <= 0) + ret = int(QStyleHelper::dpiScaled(24.)); break; case PM_TabBarIconSize: @@ -4903,9 +4905,10 @@ int QCommonStyle::styleHint(StyleHint sh, const QStyleOption *opt, const QWidget break; case SH_ItemView_ActivateItemOnSingleClick: - ret = qt_guiPlatformPlugin()->platformHint(QGuiPlatformPlugin::PH_ItemView_ActivateItemOnSingleClick); + ret = 0; + if (const QPlatformTheme *theme = QGuiApplicationPrivate::platformTheme()) + ret = theme->themeHint(QPlatformTheme::ToolButtonStyle).toBool() ? 1 : 0; break; - case SH_TitleBar_ModifyNotification: ret = true; break; @@ -4997,7 +5000,9 @@ int QCommonStyle::styleHint(StyleHint sh, const QStyleOption *opt, const QWidget ret = true; break; case SH_ToolButtonStyle: - ret = qt_guiPlatformPlugin()->platformHint(QGuiPlatformPlugin::PH_ToolButtonStyle); + ret = 0; + if (const QPlatformTheme *theme = QGuiApplicationPrivate::platformTheme()) + ret = theme->themeHint(QPlatformTheme::ToolButtonStyle).toInt(); break; case SH_RequestSoftwareInputPanel: ret = RSIP_OnMouseClickAndAlreadyFocused; diff --git a/src/widgets/styles/qgtkstyle_p.cpp b/src/widgets/styles/qgtkstyle_p.cpp index 40ad9f2a954..18e120a4eb3 100644 --- a/src/widgets/styles/qgtkstyle_p.cpp +++ b/src/widgets/styles/qgtkstyle_p.cpp @@ -661,7 +661,7 @@ QString QGtkStylePrivate::getThemeName() foreach (const QString &rcPath, paths) { if (!rcPath.isEmpty()) { QFile rcFile(rcPath); - if (rcFile.exists() && rcFile.open(QIODevice::ReadOnly | QIODevice::Text)) { + if (rcFile.open(QIODevice::ReadOnly | QIODevice::Text)) { QTextStream in(&rcFile); while(!in.atEnd()) { QString line = in.readLine(); diff --git a/src/widgets/styles/qstylehelper.cpp b/src/widgets/styles/qstylehelper.cpp index 818671f85f7..3fdbc98323f 100644 --- a/src/widgets/styles/qstylehelper.cpp +++ b/src/widgets/styles/qstylehelper.cpp @@ -159,7 +159,9 @@ QPolygonF calcLines(const QStyleOptionSlider *dial) qreal xc = width / 2 + 0.5; qreal yc = height / 2 + 0.5; - int ns = dial->tickInterval; + const int ns = dial->tickInterval; + if (!ns) // Invalid values may be set by Qt Designer. + return poly; int notches = (dial->maximum + ns - 1 - dial->minimum) / ns; if (notches <= 0) return poly; diff --git a/src/widgets/styles/qwindowscestyle.cpp b/src/widgets/styles/qwindowscestyle.cpp index 72f74262687..5bd2de290a7 100644 --- a/src/widgets/styles/qwindowscestyle.cpp +++ b/src/widgets/styles/qwindowscestyle.cpp @@ -52,6 +52,7 @@ #include "qstyleoption.h" #include "qwindowscestyle_p.h" #include "qdebug.h" +#include "qdrawutil.h" QT_BEGIN_NAMESPACE diff --git a/src/widgets/styles/qwindowsmobilestyle.cpp b/src/widgets/styles/qwindowsmobilestyle.cpp index 284d42dacc9..30269751caa 100644 --- a/src/widgets/styles/qwindowsmobilestyle.cpp +++ b/src/widgets/styles/qwindowsmobilestyle.cpp @@ -72,13 +72,12 @@ #include "qdebug.h" #include "qtabwidget.h" -#ifdef Q_WS_WINCE +#ifdef Q_OS_WINCE #include "qt_windows.h" -#include "qguifunctions_wince.h" extern bool qt_wince_is_high_dpi(); //defined in qguifunctions_wince.cpp extern bool qt_wince_is_smartphone(); //defined in qguifunctions_wince.cpp extern bool qt_wince_is_windows_mobile_65(); //defined in qguifunctions_wince.cpp -#endif // Q_WS_WINCE +#endif // Q_OS_WINCE #include "qstylehelper_p.h" @@ -667,7 +666,7 @@ static const char * const min_small_xpm[] = { " ++++++++++++ ", " "}; -#ifdef Q_WS_WINCE_WM +#ifdef Q_OS_WINCE_WM static char * sbhandleup_xpm[] = { "26 41 45 1", @@ -4033,12 +4032,12 @@ void tintImage(QImage *image, QColor color, qreal saturation) } } -#endif //Q_WS_WINCE_WM +#endif //Q_OS_WINCE_WM enum QSliderDirection { SliderUp, SliderDown, SliderLeft, SliderRight }; -#ifdef Q_WS_WINCE_WM +#ifdef Q_OS_WINCE_WM void QWindowsMobileStylePrivate::tintImagesButton(QColor color) { @@ -4096,11 +4095,11 @@ void QWindowsMobileStylePrivate::tintListViewHighlight(QColor color) } } -#endif //Q_WS_WINCE_WM +#endif //Q_OS_WINCE_WM void QWindowsMobileStylePrivate::setupWindowsMobileStyle65() { -#ifdef Q_WS_WINCE_WM +#ifdef Q_OS_WINCE_WM wm65 = qt_wince_is_windows_mobile_65(); if (wm65) { imageScrollbarHandleUp = QImage(sbhandleup_xpm); @@ -4119,13 +4118,13 @@ void QWindowsMobileStylePrivate::setupWindowsMobileStyle65() } tintImagesHigh(Qt::blue); } -#endif //Q_WS_WINCE_WM +#endif //Q_OS_WINCE_WM } void QWindowsMobileStylePrivate::drawTabBarTab(QPainter *painter, const QStyleOptionTab *tab) { #ifndef QT_NO_TABBAR -#ifdef Q_WS_WINCE_WM +#ifdef Q_OS_WINCE_WM if (wm65) { tintImagesButton(tab->palette.button().color()); QRect r; @@ -4154,7 +4153,7 @@ void QWindowsMobileStylePrivate::drawTabBarTab(QPainter *painter, const QStyleOp //imageTabBarBig return; } -#endif //Q_WS_WINCE_WM +#endif //Q_OS_WINCE_WM painter->save(); painter->setPen(tab->palette.shadow().color()); if (doubleControls) { @@ -4216,7 +4215,7 @@ void QWindowsMobileStylePrivate::drawTabBarTab(QPainter *painter, const QStyleOp void QWindowsMobileStylePrivate::drawPanelItemViewSelected(QPainter *painter, const QStyleOptionViewItemV4 *option, QRect rect) { -#ifdef Q_WS_WINCE_WM +#ifdef Q_OS_WINCE_WM if (wm65) { QRect r; if (rect.isValid()) @@ -4257,7 +4256,7 @@ void QWindowsMobileStylePrivate::drawPanelItemViewSelected(QPainter *painter, co } return; } -#endif //Q_WS_WINCE_WM +#endif //Q_OS_WINCE_WM QPalette::ColorGroup cg = option->state & QStyle::State_Enabled ? QPalette::Normal : QPalette::Disabled; @@ -4269,7 +4268,7 @@ void QWindowsMobileStylePrivate::drawPanelItemViewSelected(QPainter *painter, co void QWindowsMobileStylePrivate::drawScrollbarGrip(QPainter *p, QStyleOptionSlider *newScrollbar, const QStyleOptionComplex *option, bool drawCompleteFrame) { -#ifdef Q_WS_WINCE_WM +#ifdef Q_OS_WINCE_WM if (wm65) { if (newScrollbar->orientation == Qt::Horizontal) { QTransform transform; @@ -4361,7 +4360,7 @@ void QWindowsMobileStylePrivate::drawScrollbarGrip(QPainter *p, QStyleOptionSlid void QWindowsMobileStylePrivate::drawScrollbarHandleUp(QPainter *p, QStyleOptionSlider *opt, bool completeFrame, bool ) { -#ifdef Q_WS_WINCE_WM +#ifdef Q_OS_WINCE_WM if (wm65) { tintImagesHigh(opt->palette.highlight().color()); QRect r = opt->rect; @@ -4380,7 +4379,7 @@ void QWindowsMobileStylePrivate::drawScrollbarHandleUp(QPainter *p, QStyleOption } return ; } -#endif //Q_WS_WINCE_WM +#endif //Q_OS_WINCE_WM QBrush fill = opt->palette.button(); if (opt->state & QStyle::State_Sunken) @@ -4418,7 +4417,7 @@ void QWindowsMobileStylePrivate::drawScrollbarHandleUp(QPainter *p, QStyleOption void QWindowsMobileStylePrivate::drawScrollbarHandleDown(QPainter *p, QStyleOptionSlider *opt, bool completeFrame, bool secondScrollBar) { #ifndef QT_NO_SCROLLBAR -#ifdef Q_WS_WINCE_WM +#ifdef Q_OS_WINCE_WM if (wm65) { tintImagesHigh(opt->palette.highlight().color()); QRect r = opt->rect; @@ -4437,7 +4436,7 @@ void QWindowsMobileStylePrivate::drawScrollbarHandleDown(QPainter *p, QStyleOpti } return ; } -#endif //Q_WS_WINCE_WM +#endif //Q_OS_WINCE_WM QBrush fill = opt->palette.button(); if (opt->state & QStyle::State_Sunken) @@ -4520,13 +4519,13 @@ QWindowsMobileStyle::QWindowsMobileStyle() : QWindowsStyle(*new QWindowsMobileSt QWindowsMobileStylePrivate::QWindowsMobileStylePrivate() :QWindowsStylePrivate() { -#ifdef Q_WS_WINCE +#ifdef Q_OS_WINCE doubleControls = qt_wince_is_high_dpi(); smartphone = qt_wince_is_smartphone(); #else doubleControls = false; smartphone = false; -#endif //Q_WS_WINCE +#endif //Q_OS_WINCE #ifndef QT_NO_IMAGEFORMAT_XPM @@ -5215,7 +5214,7 @@ void QWindowsMobileStyle::drawPrimitive(PrimitiveElement element, const QStyleOp } switch (tab->shape) { case QTabBar::RoundedNorth: -#ifdef Q_WS_WINCE_WM +#ifdef Q_OS_WINCE_WM if (!d->wm65) #endif { @@ -5226,7 +5225,7 @@ void QWindowsMobileStyle::drawPrimitive(PrimitiveElement element, const QStyleOp } break; case QTabBar::RoundedSouth: -#ifdef Q_WS_WINCE_WM +#ifdef Q_OS_WINCE_WM if (!d->wm65) #endif { @@ -5237,13 +5236,13 @@ void QWindowsMobileStyle::drawPrimitive(PrimitiveElement element, const QStyleOp } break; case QTabBar::RoundedEast: -#ifdef Q_WS_WINCE_WM +#ifdef Q_OS_WINCE_WM if (!d->wm65) #endif painter->drawLine(rect.topRight(), rect.bottomRight()); break; case QTabBar::RoundedWest: -#ifdef Q_WS_WINCE_WM +#ifdef Q_OS_WINCE_WM if (!d->wm65) #endif painter->drawLine(rect.topLeft(), rect.bottomLeft()); @@ -6458,7 +6457,7 @@ QSize QWindowsMobileStyle::sizeFromContents(ContentsType type, const QStyleOptio newSize += QSize(4, 2); break; #ifndef QT_NO_ITEMVIEWS -#ifdef Q_WS_WINCE_WM +#ifdef Q_OS_WINCE_WM case CT_ItemViewItem: if (d_func()->wm65) if (d_func()->doubleControls) @@ -6466,7 +6465,7 @@ QSize QWindowsMobileStyle::sizeFromContents(ContentsType type, const QStyleOptio else newSize.setHeight(23); break; -#endif //Q_WS_WINCE_WM +#endif //Q_OS_WINCE_WM #endif //QT_NO_ITEMVIEWS default: break; @@ -6508,7 +6507,7 @@ QRect QWindowsMobileStyle::subElementRect(SubElement element, const QStyleOption #endif // QT_NO_SLIDER #ifndef QT_NO_ITEMVIEWS case SE_ItemViewItemFocusRect: -#ifdef Q_WS_WINCE_WM +#ifdef Q_OS_WINCE_WM if (d->wm65) rect = QRect(); #endif @@ -6533,13 +6532,13 @@ QRect QWindowsMobileStyle::subControlRect(ComplexControl control, const QStyleOp float stretchFactor = 1.4f; int sliderButtonExtentDir = int (sliderButtonExtent * stretchFactor); -#ifdef Q_WS_WINCE_WM +#ifdef Q_OS_WINCE_WM if (d->wm65) { sliderButtonExtent = d->imageScrollbarHandleUp.width(); sliderButtonExtentDir = d->imageScrollbarHandleUp.height(); } -#endif //Q_WS_WINCE_WM +#endif //Q_OS_WINCE_WM int sliderlen; int maxlen = ((scrollbar->orientation == Qt::Horizontal) ? @@ -7067,7 +7066,7 @@ int QWindowsMobileStyle::pixelMetric(PixelMetric pm, const QStyleOption *opt, co d->doubleControls ? ret = 42 : ret = 21; break; case PM_ScrollBarSliderMin: -#ifdef Q_WS_WINCE_WM +#ifdef Q_OS_WINCE_WM if (d->wm65) #else if (false) @@ -7085,7 +7084,7 @@ int QWindowsMobileStyle::pixelMetric(PixelMetric pm, const QStyleOption *opt, co else d->doubleControls ? ret = 25 : ret = 13; -#ifdef Q_WS_WINCE_WM +#ifdef Q_OS_WINCE_WM if (d->wm65) #else if (false) @@ -7239,10 +7238,10 @@ QPixmap QWindowsMobileStyle::generatedIconPixmap(QIcon::Mode iconMode, const QPi switch (iconMode) { case QIcon::Selected: { -#ifdef Q_WS_WINCE_WM +#ifdef Q_OS_WINCE_WM if (d_func()->wm65) return pixmap; -#endif //Q_WS_WINCE_WM +#endif //Q_OS_WINCE_WM QImage img = pixmap.toImage().convertToFormat(QImage::Format_ARGB32); int imgh = img.height(); int imgw = img.width(); diff --git a/src/widgets/styles/qwindowsmobilestyle_p.h b/src/widgets/styles/qwindowsmobilestyle_p.h index d536afe50e6..3efbe535c27 100644 --- a/src/widgets/styles/qwindowsmobilestyle_p.h +++ b/src/widgets/styles/qwindowsmobilestyle_p.h @@ -62,7 +62,6 @@ QT_BEGIN_NAMESPACE class QStyleOptionTab; class QStyleOptionSlider; -class QStyleOptionViewItemV4; class QWindowsMobileStylePrivate : public QWindowsStylePrivate { @@ -71,7 +70,7 @@ public: QWindowsMobileStylePrivate(); bool doubleControls; bool smartphone; -#ifdef Q_WS_WINCE_WM +#ifdef Q_OS_WINCE_WM bool wm65; #endif @@ -95,7 +94,7 @@ public: void setupWindowsMobileStyle65(); -#ifdef Q_WS_WINCE_WM +#ifdef Q_OS_WINCE_WM //Windows Mobile 6.5 images QImage imageScrollbarHandleUp; QImage imageScrollbarHandleDown; @@ -119,7 +118,7 @@ public: void tintImagesButton(QColor color); void tintListViewHighlight(QColor color); -#endif //Q_WS_WINCE_WM +#endif //Q_OS_WINCE_WM void drawScrollbarHandleUp(QPainter *p, QStyleOptionSlider *opt, bool completeFrame = false, bool secondScrollBar = false); void drawScrollbarHandleDown(QPainter *p, QStyleOptionSlider *opt, bool completeFrame = false, bool secondScrollBar = false); diff --git a/src/widgets/styles/qwindowsxpstyle.cpp b/src/widgets/styles/qwindowsxpstyle.cpp index 63d275a3914..a24f42c5f1f 100644 --- a/src/widgets/styles/qwindowsxpstyle.cpp +++ b/src/widgets/styles/qwindowsxpstyle.cpp @@ -337,10 +337,11 @@ HWND QWindowsXPStylePrivate::winId(const QWidget *widget) if (const HWND hwnd = QApplicationPrivate::getHWNDForWidget(const_cast(widget))) return hwnd; - const QWidgetList toplevels = QApplication::topLevelWidgets(); - if (!toplevels.isEmpty()) - if (const HWND topLevelHwnd = QApplicationPrivate::getHWNDForWidget(toplevels.front())) - return topLevelHwnd; + // Find top level with native window (there might be dialogs that do not have one). + foreach (const QWidget *toplevel, QApplication::topLevelWidgets()) + if (toplevel->windowHandle()) + if (const HWND topLevelHwnd = QApplicationPrivate::getHWNDForWidget(toplevel)) + return topLevelHwnd; if (QDesktopWidget *desktop = qApp->desktop()) if (const HWND desktopHwnd = QApplicationPrivate::getHWNDForWidget(desktop)) diff --git a/src/widgets/util/qsystemtrayicon.cpp b/src/widgets/util/qsystemtrayicon.cpp index 321323733b4..bed8dc2eaea 100644 --- a/src/widgets/util/qsystemtrayicon.cpp +++ b/src/widgets/util/qsystemtrayicon.cpp @@ -434,13 +434,13 @@ QBalloonTip::QBalloonTip(QSystemTrayIcon::MessageIcon icon, const QString& title titleLabel->setText(title); QFont f = titleLabel->font(); f.setBold(true); -#ifdef Q_WS_WINCE +#ifdef Q_OS_WINCE f.setPointSize(f.pointSize() - 2); #endif titleLabel->setFont(f); titleLabel->setTextFormat(Qt::PlainText); // to maintain compat with windows -#ifdef Q_WS_WINCE +#ifdef Q_OS_WINCE const int iconSize = style()->pixelMetric(QStyle::PM_SmallIconSize); const int closeButtonSize = style()->pixelMetric(QStyle::PM_SmallIconSize) - 2; #else @@ -456,7 +456,7 @@ QBalloonTip::QBalloonTip(QSystemTrayIcon::MessageIcon icon, const QString& title QObject::connect(closeButton, SIGNAL(clicked()), this, SLOT(close())); QLabel *msgLabel = new QLabel; -#ifdef Q_WS_WINCE +#ifdef Q_OS_WINCE f.setBold(false); msgLabel->setFont(f); #endif @@ -466,7 +466,7 @@ QBalloonTip::QBalloonTip(QSystemTrayIcon::MessageIcon icon, const QString& title msgLabel->setAlignment(Qt::AlignTop | Qt::AlignLeft); // smart size for the message label -#ifdef Q_WS_WINCE +#ifdef Q_OS_WINCE int limit = QApplication::desktop()->availableGeometry(msgLabel).size().width() / 2; #else int limit = QApplication::desktop()->availableGeometry(msgLabel).size().width() / 3; @@ -481,7 +481,7 @@ QBalloonTip::QBalloonTip(QSystemTrayIcon::MessageIcon icon, const QString& title control->document()->setDefaultTextOption(opt); } } -#ifdef Q_WS_WINCE +#ifdef Q_OS_WINCE // Make sure that the text isn't wrapped "somewhere" in the balloon widget // in the case that we have a long title label. setMaximumWidth(limit); diff --git a/src/widgets/widgets/qabstractbutton.cpp b/src/widgets/widgets/qabstractbutton.cpp index a398cc15679..be250c54e15 100644 --- a/src/widgets/widgets/qabstractbutton.cpp +++ b/src/widgets/widgets/qabstractbutton.cpp @@ -115,7 +115,9 @@ Q_WIDGETS_EXPORT extern bool qt_tab_all_widgets; checkable buttons can be checked and unchecked (see below). \o isEnabled() indicates whether the button can be pressed by the - user. + user. \note As opposed to other widgets, buttons derived from + QAbstractButton accepts mouse and context menu events + when disabled. \o setAutoRepeat() sets whether the button will auto-repeat if the user holds it down. \l autoRepeatDelay and \l autoRepeatInterval diff --git a/src/widgets/widgets/qdockwidget.cpp b/src/widgets/widgets/qdockwidget.cpp index 6da7605f4cc..a90c754cee4 100644 --- a/src/widgets/widgets/qdockwidget.cpp +++ b/src/widgets/widgets/qdockwidget.cpp @@ -207,7 +207,7 @@ bool QDockWidgetLayout::nativeWindowDeco() const bool QDockWidgetLayout::nativeWindowDeco(bool floating) const { -#if defined(Q_WS_X11) || defined(Q_WS_QWS) || defined(Q_WS_WINCE) +#if defined(Q_WS_X11) || defined(Q_WS_QWS) || defined(Q_OS_WINCE) Q_UNUSED(floating); return false; #else diff --git a/src/widgets/widgets/qeffects.cpp b/src/widgets/widgets/qeffects.cpp index 486905658d1..84823675dd3 100644 --- a/src/widgets/widgets/qeffects.cpp +++ b/src/widgets/widgets/qeffects.cpp @@ -111,7 +111,7 @@ QAlphaWidget::QAlphaWidget(QWidget* w, Qt::WindowFlags f) QAlphaWidget::~QAlphaWidget() { -#if defined(Q_WS_WIN) && !defined(Q_WS_WINCE) +#if defined(Q_WS_WIN) && !defined(Q_OS_WINCE) // Restore user-defined opacity value if (widget) widget->setWindowOpacity(1); diff --git a/src/widgets/widgets/qmdisubwindow.cpp b/src/widgets/widgets/qmdisubwindow.cpp index cca39a65025..b42fedf0be7 100644 --- a/src/widgets/widgets/qmdisubwindow.cpp +++ b/src/widgets/widgets/qmdisubwindow.cpp @@ -1772,7 +1772,7 @@ bool QMdiSubWindowPrivate::drawTitleBarWhenMaximized() const if (isChildOfTabbedQMdiArea(q)) return false; -#if defined(Q_WS_MAC) && !defined(QT_NO_STYLE_MAC) || defined(Q_WS_WINCE_WM) +#if defined(Q_WS_MAC) && !defined(QT_NO_STYLE_MAC) || defined(Q_OS_WINCE_WM) return true; #else if (q->style()->styleHint(QStyle::SH_Workspace_FillSpaceOnMaximize, 0, q)) diff --git a/src/widgets/widgets/qmenu.cpp b/src/widgets/widgets/qmenu.cpp index 1ad697c4304..e8415e3a9cb 100644 --- a/src/widgets/widgets/qmenu.cpp +++ b/src/widgets/widgets/qmenu.cpp @@ -49,6 +49,7 @@ #include "qtimer.h" #include "qlayout.h" #include "qpainter.h" +#include "qplatformtheme_qpa.h" #include "qapplication.h" #include "qdesktopwidget.h" #ifndef QT_NO_ACCESSIBILITY @@ -2882,7 +2883,7 @@ void QMenu::actionEvent(QActionEvent *e) d->platformMenu->syncAction(e->action()); } -#if defined(Q_WS_WINCE) && !defined(QT_NO_MENUBAR) +#if defined(Q_OS_WINCE) && !defined(QT_NO_MENUBAR) if (!d->wce_menu) d->wce_menu = new QMenuPrivate::QWceMenuPrivate; if (e->type() == QEvent::ActionAdded) diff --git a/src/widgets/widgets/qmenu.h b/src/widgets/widgets/qmenu.h index fa0542b6c27..182b0bc2b85 100644 --- a/src/widgets/widgets/qmenu.h +++ b/src/widgets/widgets/qmenu.h @@ -48,7 +48,7 @@ #include #include -#ifdef Q_WS_WINCE +#ifdef Q_OS_WINCE #include // for HMENU #endif @@ -136,7 +136,7 @@ public: void setNoReplayFor(QWidget *widget); QPlatformMenu *platformMenu(); -#ifdef Q_WS_WINCE +#ifdef Q_OS_WINCE HMENU wceMenu(); #endif @@ -170,7 +170,7 @@ protected: bool focusNextPrevChild(bool next); void initStyleOption(QStyleOptionMenuItem *option, const QAction *action) const; -#ifdef Q_WS_WINCE +#ifdef Q_OS_WINCE QAction* wceCommands(uint command); #endif diff --git a/src/widgets/widgets/qmenu_p.h b/src/widgets/widgets/qmenu_p.h index af236c1c8f1..ee6e62653fc 100644 --- a/src/widgets/widgets/qmenu_p.h +++ b/src/widgets/widgets/qmenu_p.h @@ -68,7 +68,7 @@ QT_BEGIN_NAMESPACE class QTornOffMenu; class QEventLoop; -#ifdef Q_WS_WINCE +#ifdef Q_OS_WINCE struct QWceMenuAction { uint command; QPointer action; @@ -91,7 +91,7 @@ public: scroll(0), eventLoop(0), tearoff(0), tornoff(0), tearoffHighlighted(0), hasCheckableItems(0), sloppyAction(0), doChildEffects(false), platformMenu(0) -#if defined(Q_WS_WINCE) && !defined(QT_NO_MENUBAR) +#if defined(Q_OS_WINCE) && !defined(QT_NO_MENUBAR) ,wce_menu(0) #endif { } @@ -99,7 +99,7 @@ public: { delete scroll; delete platformMenu; -#if defined(Q_WS_WINCE) && !defined(QT_NO_MENUBAR) +#if defined(Q_OS_WINCE) && !defined(QT_NO_MENUBAR) delete wce_menu; #endif } @@ -228,7 +228,7 @@ public: QPointer actionAboutToTrigger; -#if defined(Q_WS_WINCE) && !defined(QT_NO_MENUBAR) +#if defined(Q_OS_WINCE) && !defined(QT_NO_MENUBAR) struct QWceMenuPrivate { QList actionItems; HMENU menuHandle; diff --git a/src/widgets/widgets/qmenu_wince.cpp b/src/widgets/widgets/qmenu_wince.cpp index ae90d23b28e..dae0a67e110 100644 --- a/src/widgets/widgets/qmenu_wince.cpp +++ b/src/widgets/widgets/qmenu_wince.cpp @@ -40,7 +40,7 @@ ****************************************************************************/ //Native menubars are only supported for Windows Mobile not the standard SDK/generic WinCE -#ifdef Q_WS_WINCE +#ifdef Q_OS_WINCE #include "qmenu.h" #include "qt_windows.h" #include "qapplication.h" @@ -62,8 +62,6 @@ # include #endif -#include "qguifunctions_wince.h" - #ifndef QT_NO_MENUBAR #ifndef SHCMBF_EMPTYBAR @@ -377,7 +375,8 @@ void QMenuBarPrivate::wceCreateMenuBar(QWidget *parent) Q_Q(QMenuBar); wce_menubar = new QWceMenuBarPrivate(this); - wce_menubar->parentWindowHandle = parent ? parent->winId() : q->winId(); + wce_menubar->parentWindowHandle = parent ? QApplicationPrivate::getHWNDForWidget(parent) : + QApplicationPrivate::getHWNDForWidget(q); wce_menubar->leftButtonAction = defaultAction; wce_menubar->menubarHandle = qt_wce_create_menubar(wce_menubar->parentWindowHandle, (HINSTANCE)qWinAppInst(), 0, SHCMBF_EMPTYBAR); @@ -547,7 +546,8 @@ void QMenuBarPrivate::_q_updateDefaultAction() void QMenuBarPrivate::QWceMenuBarPrivate::rebuild() { d->q_func()->resize(0,0); - parentWindowHandle = d->q_func()->parentWidget() ? d->q_func()->parentWidget()->winId() : d->q_func()->winId(); + parentWindowHandle = d->q_func()->parentWidget() ? QApplicationPrivate::getHWNDForWidget(d->q_func()->parentWidget()) : + QApplicationPrivate::getHWNDForWidget(d->q_func()); if (d->wceClassicMenu) { QList actions = d->actions; int maxEntries; @@ -665,4 +665,4 @@ void QMenuBarPrivate::QWceMenuBarPrivate::rebuild() QT_END_NAMESPACE #endif //QT_NO_MENUBAR -#endif //Q_WS_WINCE +#endif //Q_OS_WINCE diff --git a/src/widgets/widgets/qmenu_wince.rc b/src/widgets/widgets/qmenu_wince.rc index 2540d9f43a6..497c5491373 100644 --- a/src/widgets/widgets/qmenu_wince.rc +++ b/src/widgets/widgets/qmenu_wince.rc @@ -4,9 +4,9 @@ #include "winuser.h" #if defined (_DEBUG) && defined(QT_DLL) -#include "QtGuid_resource.rc" +#include "QtWidgetsd_resource.rc" #elif defined(QT_DLL) -#include "QtGui_resource.rc" +#include "QtWidgets_resource.rc" #endif #define DIALOGEX DIALOG DISCARDABLE diff --git a/src/widgets/widgets/qmenubar.cpp b/src/widgets/widgets/qmenubar.cpp index f1269fde0f8..d797a4e315e 100644 --- a/src/widgets/widgets/qmenubar.cpp +++ b/src/widgets/widgets/qmenubar.cpp @@ -55,6 +55,7 @@ #include #include #include +#include #include "private/qguiapplication_p.h" #ifndef QT_NO_MENUBAR @@ -64,7 +65,7 @@ #include "qmenubar_p.h" #include "qdebug.h" -#ifdef Q_WS_WINCE +#ifdef Q_OS_WINCE extern bool qt_wince_is_mobile(); //defined in qguifunctions_wce.cpp #endif @@ -719,7 +720,7 @@ void QMenuBarPrivate::init() if (platformMenuBar) q->hide(); -#ifdef Q_WS_WINCE +#ifdef Q_OS_WINCE if (qt_wince_is_mobile()) { wceCreateMenuBar(q->parentWidget()); if(wce_menubar) @@ -783,8 +784,7 @@ QMenuBar::~QMenuBar() delete d->platformMenuBar; d->platformMenuBar = 0; -#ifdef Q_WS_WINCE - Q_D(QMenuBar); +#ifdef Q_OS_WINCE if (qt_wince_is_mobile()) d->wceDestroyMenuBar(); #endif @@ -1244,8 +1244,9 @@ void QMenuBar::actionEvent(QActionEvent *e) d->itemsDirty = true; if (d->platformMenuBar) { +#if !defined(Q_OS_WINCE) QPlatformMenuBar *nativeMenuBar = d->platformMenuBar; -#if defined(Q_WS_WINCE) +#else QMenuBarPrivate::QWceMenuBarPrivate *nativeMenuBar = d->wce_menubar; #endif if (!nativeMenuBar) @@ -1338,7 +1339,7 @@ void QMenuBarPrivate::handleReparent() if (platformMenuBar) platformMenuBar->handleReparent(newParent); -#ifdef Q_WS_WINCE +#ifdef Q_OS_WINCE if (qt_wince_is_mobile() && wce_menubar) wce_menubar->rebuild(); #endif @@ -1526,7 +1527,7 @@ QRect QMenuBar::actionGeometry(QAction *act) const QSize QMenuBar::minimumSizeHint() const { Q_D(const QMenuBar); -#if defined(Q_OS_MAC) || defined(Q_WS_WINCE) +#if defined(Q_OS_MAC) || defined(Q_OS_WINCE) const bool as_gui_menubar = !isNativeMenuBar(); #else const bool as_gui_menubar = true; @@ -1582,7 +1583,7 @@ QSize QMenuBar::minimumSizeHint() const QSize QMenuBar::sizeHint() const { Q_D(const QMenuBar); -#if defined(Q_OS_MAC) || defined(Q_WS_WINCE) +#if defined(Q_OS_MAC) || defined(Q_OS_WINCE) const bool as_gui_menubar = !isNativeMenuBar(); #else const bool as_gui_menubar = true; @@ -1641,7 +1642,7 @@ QSize QMenuBar::sizeHint() const int QMenuBar::heightForWidth(int) const { Q_D(const QMenuBar); -#if defined(Q_OS_MAC) || defined(Q_WS_WINCE) +#if defined(Q_OS_MAC) || defined(Q_OS_WINCE) const bool as_gui_menubar = !isNativeMenuBar(); #else const bool as_gui_menubar = true; @@ -1838,13 +1839,13 @@ QPlatformMenuBar *QMenuBar::platformMenuBar() \sa defaultAction() */ -#ifdef Q_WS_WINCE +#ifdef Q_OS_WINCE void QMenuBar::setDefaultAction(QAction *act) { Q_D(QMenuBar); if (d->defaultAction == act) return; -#ifdef Q_WS_WINCE +#ifdef Q_OS_WINCE if (qt_wince_is_mobile()) if (d->defaultAction) { disconnect(d->defaultAction, SIGNAL(changed()), this, SLOT(_q_updateDefaultAction())); @@ -1852,7 +1853,7 @@ void QMenuBar::setDefaultAction(QAction *act) } #endif d->defaultAction = act; -#ifdef Q_WS_WINCE +#ifdef Q_OS_WINCE if (qt_wince_is_mobile()) if (d->defaultAction) { connect(d->defaultAction, SIGNAL(changed()), this, SLOT(_q_updateDefaultAction())); diff --git a/src/widgets/widgets/qmenubar.h b/src/widgets/widgets/qmenubar.h index b20682ef6c6..98185265438 100644 --- a/src/widgets/widgets/qmenubar.h +++ b/src/widgets/widgets/qmenubar.h @@ -102,7 +102,7 @@ public: void setCornerWidget(QWidget *w, Qt::Corner corner = Qt::TopRightCorner); QWidget *cornerWidget(Qt::Corner corner = Qt::TopRightCorner) const; -#ifdef Q_WS_WINCE +#ifdef Q_OS_WINCE void setDefaultAction(QAction *); QAction *defaultAction() const; @@ -145,7 +145,7 @@ private: Q_PRIVATE_SLOT(d_func(), void _q_internalShortcutActivated(int)) Q_PRIVATE_SLOT(d_func(), void _q_updateLayout()) -#ifdef Q_WS_WINCE +#ifdef Q_OS_WINCE Q_PRIVATE_SLOT(d_func(), void _q_updateDefaultAction()) #endif diff --git a/src/widgets/widgets/qmenubar_p.h b/src/widgets/widgets/qmenubar_p.h index a15a1e432e4..9e1d3179c7e 100644 --- a/src/widgets/widgets/qmenubar_p.h +++ b/src/widgets/widgets/qmenubar_p.h @@ -57,10 +57,6 @@ #include "QtWidgets/qstyleoption.h" #include // Mac needs what in this file! -#ifdef Q_WS_WINCE -#include "qguifunctions_wince.h" -#endif - QT_BEGIN_NAMESPACE #ifndef QT_NO_MENUBAR @@ -73,14 +69,14 @@ public: closePopupMode(0), defaultPopDown(1), popupState(0), keyboardState(0), altPressed(0), nativeMenuBar(-1), doChildEffects(false), platformMenuBar(0) -#ifdef Q_WS_WINCE +#ifdef Q_OS_WINCE , wce_menubar(0), wceClassicMenu(false) #endif { } ~QMenuBarPrivate() { delete platformMenuBar; -#ifdef Q_WS_WINCE +#ifdef Q_OS_WINCE delete wce_menubar; #endif } @@ -124,7 +120,7 @@ public: void _q_internalShortcutActivated(int); void _q_updateLayout(); -#ifdef Q_WS_WINCE +#ifdef Q_OS_WINCE void _q_updateDefaultAction(); #endif @@ -150,7 +146,7 @@ public: QBasicTimer autoReleaseTimer; QPlatformMenuBar *platformMenuBar; -#ifdef Q_WS_WINCE +#ifdef Q_OS_WINCE void wceCreateMenuBar(QWidget *); void wceDestroyMenuBar(); struct QWceMenuBarPrivate { @@ -168,6 +164,7 @@ public: QWceMenuBarPrivate(QMenuBarPrivate *menubar); ~QWceMenuBarPrivate(); + void addAction(QAction *, QAction *); void addAction(QAction *, QWceMenuAction* =0); void addAction(QWceMenuAction *, QWceMenuAction* =0); void syncAction(QWceMenuAction *); diff --git a/src/widgets/widgets/qplaintextedit.cpp b/src/widgets/widgets/qplaintextedit.cpp index 674a8180529..de6cb6a283a 100644 --- a/src/widgets/widgets/qplaintextedit.cpp +++ b/src/widgets/widgets/qplaintextedit.cpp @@ -2519,11 +2519,13 @@ bool QPlainTextEdit::canPaste() const \sa QTextDocument::print() */ +#ifndef QT_NO_PRINTER void QPlainTextEdit::print(QPagedPaintDevice *printer) const { Q_D(const QPlainTextEdit); d->control->print(printer); } +#endif /*! \property QPlainTextEdit::tabChangesFocus \brief whether \gui Tab changes focus or is accepted as input diff --git a/src/widgets/widgets/qscrollbar.cpp b/src/widgets/widgets/qscrollbar.cpp index bca5517d8ab..cb3126e5665 100644 --- a/src/widgets/widgets/qscrollbar.cpp +++ b/src/widgets/widgets/qscrollbar.cpp @@ -387,7 +387,7 @@ void QScrollBarPrivate::init() q->setAttribute(Qt::WA_WState_OwnSizePolicy, false); q->setAttribute(Qt::WA_OpaquePaintEvent); -#if !defined(QT_NO_CONTEXTMENU) && defined(Q_WS_WINCE) +#if !defined(QT_NO_CONTEXTMENU) && defined(Q_OS_WINCE) if (!q->style()->styleHint(QStyle::SH_ScrollBar_ContextMenu, 0, q)) { q->setContextMenuPolicy(Qt::PreventContextMenu); } diff --git a/src/widgets/widgets/qsizegrip.cpp b/src/widgets/widgets/qsizegrip.cpp index 145bdf02d41..09557a3c909 100644 --- a/src/widgets/widgets/qsizegrip.cpp +++ b/src/widgets/widgets/qsizegrip.cpp @@ -301,7 +301,7 @@ void QSizeGrip::mousePressEvent(QMouseEvent * e) // Use a native X11 sizegrip for "real" top-level windows if supported. if (tlw->isWindow() && X11->isSupportedByWM(ATOM(_NET_WM_MOVERESIZE)) && !(tlw->windowFlags() & Qt::X11BypassWindowManagerHint) - && !tlw->testAttribute(Qt::WA_DontShowOnScreen) && !qt_widget_private(tlw)->hasHeightForWidth()) { + && !tlw->testAttribute(Qt::WA_DontShowOnScreen) && !tlw->hasHeightForWidth()) { XEvent xev; xev.xclient.type = ClientMessage; xev.xclient.message_type = ATOM(_NET_WM_MOVERESIZE); @@ -323,7 +323,7 @@ void QSizeGrip::mousePressEvent(QMouseEvent * e) } #endif // Q_WS_X11 #ifdef Q_OS_WIN - if (tlw->isWindow() && !tlw->testAttribute(Qt::WA_DontShowOnScreen) && !qt_widget_private(tlw)->hasHeightForWidth()) { + if (tlw->isWindow() && !tlw->testAttribute(Qt::WA_DontShowOnScreen) && !tlw->hasHeightForWidth()) { uint orientation = 0; if (d->atBottom()) orientation = d->atLeft() ? SZ_SIZEBOTTOMLEFT : SZ_SIZEBOTTOMRIGHT; @@ -413,11 +413,11 @@ void QSizeGrip::mouseMoveEvent(QMouseEvent * e) #ifdef Q_WS_X11 if (tlw->isWindow() && X11->isSupportedByWM(ATOM(_NET_WM_MOVERESIZE)) && tlw->isTopLevel() && !(tlw->windowFlags() & Qt::X11BypassWindowManagerHint) - && !tlw->testAttribute(Qt::WA_DontShowOnScreen) && !qt_widget_private(tlw)->hasHeightForWidth()) + && !tlw->testAttribute(Qt::WA_DontShowOnScreen) && !tlw->hasHeightForWidth()) return; #endif #ifdef Q_OS_WIN - if (tlw->isWindow() && qt_getWindowsSystemMenu(tlw) && !tlw->testAttribute(Qt::WA_DontShowOnScreen) && !qt_widget_private(tlw)->hasHeightForWidth()) { + if (tlw->isWindow() && qt_getWindowsSystemMenu(tlw) && !tlw->testAttribute(Qt::WA_DontShowOnScreen) && !tlw->hasHeightForWidth()) { if (const HWND hwnd = QApplicationPrivate::getHWNDForWidget(tlw)) { MSG msg; while (PeekMessage(&msg, hwnd, WM_MOUSEMOVE, WM_MOUSEMOVE, PM_REMOVE)) ; diff --git a/src/widgets/widgets/qtabwidget.cpp b/src/widgets/widgets/qtabwidget.cpp index 66d31e72c72..612d51826c2 100644 --- a/src/widgets/widgets/qtabwidget.cpp +++ b/src/widgets/widgets/qtabwidget.cpp @@ -186,7 +186,6 @@ public: void _q_removeTab(int); void _q_tabMoved(int from, int to); void init(); - bool hasHeightForWidth() const; QTabBar *tabs; QStackedWidget *stack; @@ -238,11 +237,16 @@ void QTabWidgetPrivate::init() } -bool QTabWidgetPrivate::hasHeightForWidth() const +/*! + \reimp +*/ + +bool QTabWidget::hasHeightForWidth() const { - bool has = size_policy.hasHeightForWidth(); - if (!has && stack) - has = qt_widget_private(stack)->hasHeightForWidth(); + Q_D(const QTabWidget); + bool has = d->size_policy.hasHeightForWidth(); + if (!has && d->stack) + has = d->stack->hasHeightForWidth(); return has; } diff --git a/src/widgets/widgets/qtabwidget.h b/src/widgets/widgets/qtabwidget.h index 1865ddf8979..26d9243eb97 100644 --- a/src/widgets/widgets/qtabwidget.h +++ b/src/widgets/widgets/qtabwidget.h @@ -125,6 +125,7 @@ public: QSize sizeHint() const; QSize minimumSizeHint() const; int heightForWidth(int width) const; + bool hasHeightForWidth() const; void setCornerWidget(QWidget * w, Qt::Corner corner = Qt::TopRightCorner); QWidget * cornerWidget(Qt::Corner corner = Qt::TopRightCorner) const; diff --git a/src/widgets/widgets/qtextedit.cpp b/src/widgets/widgets/qtextedit.cpp index 002d7860cd1..d0065aacb90 100644 --- a/src/widgets/widgets/qtextedit.cpp +++ b/src/widgets/widgets/qtextedit.cpp @@ -404,7 +404,7 @@ void QTextEditPrivate::_q_ensureVisible(const QRectF &_rect) within the text. If you want to limit the total number of paragraphs in a QTextEdit, - as it is for example open useful in a log viewer, then you can use + as for example it is often useful in a log viewer, then you can use QTextDocument's maximumBlockCount property for that. \section2 Read-only Key Bindings @@ -2264,11 +2264,13 @@ bool QTextEdit::canPaste() const \sa QTextDocument::print() */ +#ifndef QT_NO_PRINTER void QTextEdit::print(QPagedPaintDevice *printer) const { Q_D(const QTextEdit); d->control->print(printer); } +#endif /*! \property QTextEdit::tabChangesFocus \brief whether \gui Tab changes focus or is accepted as input diff --git a/src/widgets/widgets/qtoolbar.cpp b/src/widgets/widgets/qtoolbar.cpp index c9fe4f7cc28..84cb5fd10c2 100644 --- a/src/widgets/widgets/qtoolbar.cpp +++ b/src/widgets/widgets/qtoolbar.cpp @@ -1163,7 +1163,7 @@ bool QToolBar::event(QEvent *event) if (d->mouseMoveEvent(static_cast(event))) return true; break; -#ifdef Q_WS_WINCE +#ifdef Q_OS_WINCE case QEvent::ContextMenu: { QContextMenuEvent* contextMenuEvent = static_cast(event); diff --git a/src/widgets/widgets/qwidgettextcontrol.cpp b/src/widgets/widgets/qwidgettextcontrol.cpp index 96389b83333..a2c7915a5ea 100644 --- a/src/widgets/widgets/qwidgettextcontrol.cpp +++ b/src/widgets/widgets/qwidgettextcontrol.cpp @@ -2441,6 +2441,7 @@ bool QWidgetTextControl::isWordSelectionEnabled() const return d->wordSelectionEnabled; } +#ifndef QT_NO_PRINTER void QWidgetTextControl::print(QPagedPaintDevice *printer) const { Q_D(const QWidgetTextControl); @@ -2465,6 +2466,7 @@ void QWidgetTextControl::print(QPagedPaintDevice *printer) const doc->print(printer); delete tempDoc; } +#endif QMimeData *QWidgetTextControl::createMimeDataFromSelection() const { diff --git a/src/xml/dom/qdom.cpp b/src/xml/dom/qdom.cpp index c84b1f63195..c16fd036138 100644 --- a/src/xml/dom/qdom.cpp +++ b/src/xml/dom/qdom.cpp @@ -80,8 +80,6 @@ QT_BEGIN_NAMESPACE Make a lot of the (mostly empty) methods in the public classes inline. Specially constructors assignment operators and comparison operators are candidates. - - The virtual isXxx functions in *Private can probably be replaced by inline methods checking the nodeType(). */ /* @@ -167,19 +165,22 @@ public: } // Dynamic cast - virtual bool isAttr() const { return false; } - virtual bool isCDATASection() const { return false; } - virtual bool isDocumentFragment() const { return false; } - virtual bool isDocument() const { return false; } - virtual bool isDocumentType() const { return false; } - virtual bool isElement() const { return false; } - virtual bool isEntityReference() const { return false; } - virtual bool isText() const { return false; } - virtual bool isEntity() const { return false; } - virtual bool isNotation() const { return false; } - virtual bool isProcessingInstruction() const { return false; } - virtual bool isCharacterData() const { return false; } - virtual bool isComment() const { return false; } + bool isAttr() const { return nodeType() == QDomNode::AttributeNode; } + bool isCDATASection() const { return nodeType() == QDomNode::CDATASectionNode; } + bool isDocumentFragment() const { return nodeType() == QDomNode::DocumentFragmentNode; } + bool isDocument() const { return nodeType() == QDomNode::DocumentNode; } + bool isDocumentType() const { return nodeType() == QDomNode::DocumentTypeNode; } + bool isElement() const { return nodeType() == QDomNode::ElementNode; } + bool isEntityReference() const { return nodeType() == QDomNode::EntityReferenceNode; } + bool isText() const { return (nodeType() == QDomNode::TextNode) + || (nodeType() == QDomNode::CDATASectionNode); } + bool isEntity() const { return nodeType() == QDomNode::EntityNode; } + bool isNotation() const { return nodeType() == QDomNode::NotationNode; } + bool isProcessingInstruction() const { return nodeType() == QDomNode::ProcessingInstructionNode; } + bool isCharacterData() const { return (nodeType() == QDomNode::CharacterDataNode) + || (nodeType() == QDomNode::TextNode) + || (nodeType() == QDomNode::CommentNode); } + bool isComment() const { return nodeType() == QDomNode::CommentNode; } virtual QDomNode::NodeType nodeType() const { return QDomNode::BaseNode; } @@ -219,7 +220,7 @@ public: void createList(); QDomNodePrivate* item(int index); - uint length() const; + int length() const; QAtomicInt ref; /* @@ -244,7 +245,7 @@ public: QDomNodePrivate* setNamedItemNS(QDomNodePrivate* arg); QDomNodePrivate* removeNamedItem(const QString& name); QDomNodePrivate* item(int index) const; - uint length() const; + int length() const; bool contains(const QString& name) const; bool containsNS(const QString& nsURI, const QString & localName) const; @@ -296,7 +297,6 @@ public: QDomNodePrivate* removeChild(QDomNodePrivate* oldChild); QDomNodePrivate* appendChild(QDomNodePrivate* newChild); - virtual bool isDocumentType() const { return true; } QDomNode::NodeType nodeType() const { return QDomNode::DocumentTypeNode; } void save(QTextStream& s, int, int) const; @@ -317,7 +317,6 @@ public: // Reimplemented from QDomNodePrivate virtual QDomNodePrivate* cloneNode(bool deep = true); - virtual bool isDocumentFragment() const { return true; } QDomNode::NodeType nodeType() const { return QDomNode::DocumentFragmentNode; } }; @@ -327,7 +326,7 @@ public: QDomCharacterDataPrivate(QDomDocumentPrivate*, QDomNodePrivate* parent, const QString& data); QDomCharacterDataPrivate(QDomCharacterDataPrivate* n, bool deep); - uint dataLength() const; + int dataLength() const; QString substringData(unsigned long offset, unsigned long count) const; void appendData(const QString& arg); void insertData(unsigned long offset, const QString& arg); @@ -335,7 +334,6 @@ public: void replaceData(unsigned long offset, unsigned long count, const QString& arg); // Reimplemented from QDomNodePrivate - virtual bool isCharacterData() const { return true; } QDomNode::NodeType nodeType() const { return QDomNode::CharacterDataNode; } QDomNodePrivate* cloneNode(bool deep = true); }; @@ -350,7 +348,6 @@ public: // Reimplemented from QDomNodePrivate QDomNodePrivate* cloneNode(bool deep = true); - virtual bool isText() const { return true; } QDomNode::NodeType nodeType() const { return QDomNode::TextNode; } virtual void save(QTextStream& s, int, int) const; }; @@ -367,7 +364,6 @@ public: // Reimplemented from QDomNodePrivate void setNodeValue(const QString& v); QDomNodePrivate* cloneNode(bool deep = true); - virtual bool isAttr() const { return true; } QDomNode::NodeType nodeType() const { return QDomNode::AttributeNode; } virtual void save(QTextStream& s, int, int) const; @@ -401,7 +397,6 @@ public: // Reimplemented from QDomNodePrivate QDomNamedNodeMapPrivate* attributes() { return m_attr; } bool hasAttributes() { return (m_attr->length() > 0); } - virtual bool isElement() const { return true; } QDomNode::NodeType nodeType() const { return QDomNode::ElementNode; } QDomNodePrivate* cloneNode(bool deep = true); virtual void save(QTextStream& s, int, int) const; @@ -419,7 +414,6 @@ public: // Reimplemented from QDomNodePrivate QDomNodePrivate* cloneNode(bool deep = true); - virtual bool isComment() const { return true; } QDomNode::NodeType nodeType() const { return QDomNode::CommentNode; } virtual void save(QTextStream& s, int, int) const; }; @@ -432,7 +426,6 @@ public: // Reimplemented from QDomNodePrivate QDomNodePrivate* cloneNode(bool deep = true); - virtual bool isCDATASection() const { return true; } QDomNode::NodeType nodeType() const { return QDomNode::CDATASectionNode; } virtual void save(QTextStream& s, int, int) const; }; @@ -446,7 +439,6 @@ public: // Reimplemented from QDomNodePrivate QDomNodePrivate* cloneNode(bool deep = true); - virtual bool isNotation() const { return true; } QDomNode::NodeType nodeType() const { return QDomNode::NotationNode; } virtual void save(QTextStream& s, int, int) const; @@ -464,7 +456,6 @@ public: // Reimplemented from QDomNodePrivate QDomNodePrivate* cloneNode(bool deep = true); - virtual bool isEntity() const { return true; } QDomNode::NodeType nodeType() const { return QDomNode::EntityNode; } virtual void save(QTextStream& s, int, int) const; @@ -482,7 +473,6 @@ public: // Reimplemented from QDomNodePrivate QDomNodePrivate* cloneNode(bool deep = true); - bool isEntityReference() const { return true; } QDomNode::NodeType nodeType() const { return QDomNode::EntityReferenceNode; } virtual void save(QTextStream& s, int, int) const; }; @@ -496,7 +486,6 @@ public: // Reimplemented from QDomNodePrivate QDomNodePrivate* cloneNode(bool deep = true); - virtual bool isProcessingInstruction() const { return true; } QDomNode::NodeType nodeType() const { return QDomNode::ProcessingInstructionNode; } virtual void save(QTextStream& s, int, int) const; }; @@ -534,7 +523,6 @@ public: // Reimplemented from QDomNodePrivate QDomNodePrivate* cloneNode(bool deep = true); - bool isDocument() const { return true; } QDomNode::NodeType nodeType() const { return QDomNode::DocumentNode; } void clear(); @@ -1262,7 +1250,7 @@ QDomNodePrivate* QDomNodeListPrivate::item(int index) return list.at(index); } -uint QDomNodeListPrivate::length() const +int QDomNodeListPrivate::length() const { if (!node_impl) return 0; @@ -1394,7 +1382,7 @@ QDomNode QDomNodeList::item(int index) const /*! Returns the number of nodes in the list. */ -uint QDomNodeList::length() const +int QDomNodeList::length() const { if (!impl) return 0; @@ -2668,23 +2656,16 @@ QDomNode QDomNode::namedItem(const QString& name) const the stream \a str. This function uses \a indent as the amount of space to indent the node. - If this node is a document node, the encoding of text stream \a str's encoding is - set by treating a processing instruction by name "xml" as an XML declaration, if such a one exists, - and otherwise defaults to UTF-8. XML declarations are not processing instructions, but this - behavior exists for historical reasons. If this node is not a document node, - the text stream's encoding is used. - If the document contains invalid XML characters or characters that cannot be encoded in the given encoding, the result and behavior is undefined. -*/ -void QDomNode::save(QTextStream& str, int indent) const -{ - save(str, indent, QDomNode::EncodingFromDocument); -} - -/*! - If \a encodingPolicy is QDomNode::EncodingFromDocument, this function behaves as save(QTextStream &str, int indent). + If \a encodingPolicy is QDomNode::EncodingFromDocument and this node is a + document node, the encoding of text stream \a str's encoding is set by + treating a processing instruction by name "xml" as an XML declaration, if + one exists, and otherwise defaults to UTF-8. XML declarations are not + processing instructions, but this behavior exists for historical + reasons. If this node is not a document node, the text stream's encoding + is used. If \a encodingPolicy is EncodingFromTextStream and this node is a document node, this function behaves as save(QTextStream &str, int indent) with the exception that the encoding @@ -2695,15 +2676,15 @@ void QDomNode::save(QTextStream& str, int indent) const \since 4.2 */ -void QDomNode::save(QTextStream& str, int indent, EncodingPolicy encodingPolicy) const +void QDomNode::save(QTextStream& stream, int indent, EncodingPolicy encodingPolicy) const { if (!impl) return; if(isDocument()) - static_cast(impl)->saveDocument(str, indent, encodingPolicy); + static_cast(impl)->saveDocument(stream, indent, encodingPolicy); else - IMPL->save(str, 1, indent); + IMPL->save(stream, 1, indent); } /*! @@ -2951,7 +2932,7 @@ QDomElement QDomNode::firstChildElement(const QString &tagName) const /*! Returns the last child element with tag name \a tagName if tagName is non-empty; - otherwise returns the first child element. Returns a null element if no + otherwise returns the last child element. Returns a null element if no such child exists. \sa firstChildElement() previousSiblingElement() nextSiblingElement() @@ -3162,13 +3143,12 @@ QDomNodePrivate* QDomNamedNodeMapPrivate::removeNamedItem(const QString& name) QDomNodePrivate* QDomNamedNodeMapPrivate::item(int index) const { - if ((uint)index >= length()) + if (index >= length()) return 0; return *(map.constBegin() + index); } -// ### Qt 5: convert all length/size() functions in QDom to use int instead of uint. -uint QDomNamedNodeMapPrivate::length() const +int QDomNamedNodeMapPrivate::length() const { return map.count(); } @@ -3415,7 +3395,7 @@ QDomNode QDomNamedNodeMap::removeNamedItemNS(const QString& nsURI, const QString \sa item() */ -uint QDomNamedNodeMap::length() const +int QDomNamedNodeMap::length() const { if (!impl) return 0; @@ -3903,7 +3883,7 @@ QDomNodePrivate* QDomCharacterDataPrivate::cloneNode(bool deep) return p; } -uint QDomCharacterDataPrivate::dataLength() const +int QDomCharacterDataPrivate::dataLength() const { return value.length(); } @@ -4027,7 +4007,7 @@ void QDomCharacterData::setData(const QString& v) /*! Returns the length of the stored string. */ -uint QDomCharacterData::length() const +int QDomCharacterData::length() const { if (impl) return IMPL->dataLength(); @@ -5700,8 +5680,8 @@ QDomNodePrivate* QDomEntityPrivate::cloneNode(bool deep) static QByteArray encodeEntity(const QByteArray& str) { QByteArray tmp(str); - uint len = tmp.size(); - uint i = 0; + int len = tmp.size(); + int i = 0; const char* d = tmp.data(); while (i < len) { if (d[i] == '%'){ @@ -6561,6 +6541,10 @@ void QDomDocumentPrivate::saveDocument(QTextStream& s, const int indent, QDomNod element is available using documentElement(). The textual representation of the document can be obtained using toString(). + \note The DOM tree might end up reserving a lot of memory if the XML + document is big. For such documents, the QXmlStreamReader or the + QXmlQuery classes might be better solutions. + It is possible to insert a node from another document into the document using importNode(). diff --git a/src/xml/dom/qdom.h b/src/xml/dom/qdom.h index 8b049b211bf..34c4b006368 100644 --- a/src/xml/dom/qdom.h +++ b/src/xml/dom/qdom.h @@ -227,8 +227,7 @@ public: QDomCharacterData toCharacterData() const; QDomComment toComment() const; - void save(QTextStream&, int) const; - void save(QTextStream&, int, EncodingPolicy) const; // ### Qt 5: Merge overload(if we at all keep this) + void save(QTextStream&, int, EncodingPolicy=QDomNode::EncodingFromDocument) const; QDomElement firstChildElement(const QString &tagName = QString()) const; QDomElement lastChildElement(const QString &tagName = QString()) const; @@ -264,7 +263,7 @@ public: inline QDomNode at(int index) const { return item(index); } // Qt API consistency // DOM read only attributes - uint length() const; + int length() const; inline int count() const { return length(); } // Qt API consitancy inline int size() const { return length(); } // Qt API consistency inline bool isEmpty() const { return length() == 0; } // Qt API consistency @@ -378,7 +377,7 @@ public: QDomNode removeNamedItemNS(const QString& nsURI, const QString& localName); // DOM read only attributes - uint length() const; + int length() const; int count() const { return length(); } // Qt API consitancy inline int size() const { return length(); } // Qt API consistency inline bool isEmpty() const { return length() == 0; } // Qt API consistency @@ -427,7 +426,7 @@ public: void replaceData(unsigned long offset, unsigned long count, const QString& arg); // DOM read only attributes - uint length() const; + int length() const; // DOM attributes QString data() const; diff --git a/sync.profile b/sync.profile index 446f8f40fa2..cc681b0ebec 100644 --- a/sync.profile +++ b/sync.profile @@ -77,7 +77,7 @@ ); @ignore_for_master_contents = ( "qt.h", "qpaintdevicedefs.h" ); -@ignore_for_include_check = ( "qatomic.h" ); +@ignore_for_include_check = ( "qsystemdetection.h", "qcompilerdetection.h", "qprocessordetection.h" ); @ignore_for_qt_begin_header_check = ( "qiconset.h", "qconfig.h", "qconfig-dist.h", "qconfig-large.h", "qconfig-medium.h", "qconfig-minimal.h", "qconfig-small.h", "qfeatures.h", "qt_windows.h" ); @ignore_for_qt_begin_namespace_check = ( "qconfig.h", "qconfig-dist.h", "qconfig-large.h", "qconfig-medium.h", "qconfig-minimal.h", "qconfig-small.h", "qfeatures.h", "qatomic_arch.h", "qatomic_windowsce.h", "qt_windows.h", "qatomic_macosx.h" ); @ignore_for_qt_module_check = ( "$modules{QtCore}/arch", "$modules{QtCore}/global", "$modules{QtTest}", "$modules{QtDBus}" ); diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro index 1796fa2db92..63c4ca6a48d 100644 --- a/tests/auto/auto.pro +++ b/tests/auto/auto.pro @@ -18,8 +18,8 @@ cross_compile: SUBDIRS -= tools !contains(QT_CONFIG, opengl): SUBDIRS -= opengl !unix|embedded|!contains(QT_CONFIG, dbus): SUBDIRS -= dbus -# disable 'make check' on Mac OS X for the following subdirs for the time being -mac { +# disable 'make check' on Mac OS X and Windows for the following subdirs for the time being +mac|win32 { network.CONFIG += no_check_target } diff --git a/tests/auto/concurrent/qfuture/qfuture.pro b/tests/auto/concurrent/qfuture/qfuture.pro index a4c706129d9..c0fe7ec5a3b 100644 --- a/tests/auto/concurrent/qfuture/qfuture.pro +++ b/tests/auto/concurrent/qfuture/qfuture.pro @@ -1,5 +1,5 @@ CONFIG += testcase parallel_test TARGET = tst_qfuture -QT = concurrent-private testlib concurrent +QT = core concurrent-private testlib concurrent SOURCES = tst_qfuture.cpp DEFINES += QT_STRICT_ITERATORS diff --git a/tests/auto/concurrent/qfuturewatcher/qfuturewatcher.pro b/tests/auto/concurrent/qfuturewatcher/qfuturewatcher.pro index 3b8ebda4a4f..e9caf5494ac 100644 --- a/tests/auto/concurrent/qfuturewatcher/qfuturewatcher.pro +++ b/tests/auto/concurrent/qfuturewatcher/qfuturewatcher.pro @@ -1,4 +1,4 @@ CONFIG += testcase parallel_test TARGET = tst_qfuturewatcher -QT = concurrent-private testlib concurrent +QT = core concurrent-private testlib concurrent SOURCES = tst_qfuturewatcher.cpp diff --git a/tests/auto/corelib/codecs/qtextcodec/tst_qtextcodec.cpp b/tests/auto/corelib/codecs/qtextcodec/tst_qtextcodec.cpp index 7daed397d52..4144e82a29c 100644 --- a/tests/auto/corelib/codecs/qtextcodec/tst_qtextcodec.cpp +++ b/tests/auto/corelib/codecs/qtextcodec/tst_qtextcodec.cpp @@ -172,75 +172,72 @@ void tst_QTextCodec::fromUnicode_data() QTest::addColumn("codecName"); QTest::addColumn("eightBit"); - QTest::newRow("data1") << "ISO-8859-1" << true; - QTest::newRow("data2") << "ISO-8859-2" << true; - QTest::newRow("data3") << "ISO-8859-3" << true; - QTest::newRow("data4") << "ISO-8859-4" << true; - QTest::newRow("data5") << "ISO-8859-5" << true; - QTest::newRow("data6") << "ISO-8859-6" << true; - QTest::newRow("data7") << "ISO-8859-7" << true; - QTest::newRow("data8") << "ISO-8859-8" << true; - QTest::newRow("data9") << "ISO-8859-9" << true; - QTest::newRow("data10") << "ISO-8859-10" << true; - QTest::newRow("data13") << "ISO-8859-13" << true; - QTest::newRow("data14") << "ISO-8859-14" << true; - QTest::newRow("data15") << "ISO-8859-15" << true; - QTest::newRow("data16") << "ISO-8859-16" << true; + QTest::newRow("ISO-8859-1") << "ISO-8859-1" << true; + QTest::newRow("ISO-8859-2") << "ISO-8859-2" << true; + QTest::newRow("ISO-8859-3") << "ISO-8859-3" << true; + QTest::newRow("ISO-8859-4") << "ISO-8859-4" << true; + QTest::newRow("ISO-8859-5") << "ISO-8859-5" << true; + QTest::newRow("ISO-8859-6") << "ISO-8859-6" << true; + QTest::newRow("ISO-8859-7") << "ISO-8859-7" << true; + QTest::newRow("ISO-8859-8") << "ISO-8859-8" << true; + QTest::newRow("ISO-8859-9") << "ISO-8859-9" << true; + QTest::newRow("ISO-8859-10") << "ISO-8859-10" << true; + QTest::newRow("ISO-8859-13") << "ISO-8859-13" << true; + QTest::newRow("ISO-8859-14") << "ISO-8859-14" << true; + QTest::newRow("ISO-8859-15") << "ISO-8859-15" << true; + QTest::newRow("ISO-8859-16") << "ISO-8859-16" << true; - QTest::newRow("data18") << "IBM850" << true; - QTest::newRow("data19") << "IBM874" << true; - QTest::newRow("data20") << "IBM866" << true; + QTest::newRow("IBM850") << "IBM850" << true; + QTest::newRow("IBM874") << "IBM874" << true; + QTest::newRow("IBM866") << "IBM866" << true; - QTest::newRow("data21") << "windows-1250" << true; - QTest::newRow("data22") << "windows-1251" << true; - QTest::newRow("data23") << "windows-1252" << true; - QTest::newRow("data24") << "windows-1253" << true; - QTest::newRow("data25") << "windows-1254" << true; - QTest::newRow("data26") << "windows-1255" << true; - QTest::newRow("data27") << "windows-1256" << true; - QTest::newRow("data28") << "windows-1257" << true; - QTest::newRow("data28") << "windows-1258" << true; + QTest::newRow("windows-1250") << "windows-1250" << true; + QTest::newRow("windows-1251") << "windows-1251" << true; + QTest::newRow("windows-1252") << "windows-1252" << true; + QTest::newRow("windows-1253") << "windows-1253" << true; + QTest::newRow("windows-1254") << "windows-1254" << true; + QTest::newRow("windows-1255") << "windows-1255" << true; + QTest::newRow("windows-1256") << "windows-1256" << true; + QTest::newRow("windows-1257") << "windows-1257" << true; + QTest::newRow("windows-1258") << "windows-1258" << true; - QTest::newRow("data29") << "Apple Roman" << true; - QTest::newRow("data29") << "WINSAMI2" << true; - QTest::newRow("data30") << "TIS-620" << true; - QTest::newRow("data31") << "roman8" << true; - - QTest::newRow("data32") << "SJIS" << false; - QTest::newRow("data33") << "EUC-KR" << false; + QTest::newRow("Apple Roman") << "Apple Roman" << true; + QTest::newRow("WINSAMI2") << "WINSAMI2" << true; + QTest::newRow("TIS-620") << "TIS-620" << true; + QTest::newRow("roman8") << "roman8" << true; + QTest::newRow("SJIS") << "SJIS" << false; // all codecs from documentation - QTest::newRow("doc2") << "Big5" << false; - QTest::newRow("doc3") << "Big5-HKSCS" << false; - QTest::newRow("doc4") << "CP949" << false; - QTest::newRow("doc5") << "EUC-JP" << false; - QTest::newRow("doc6") << "EUC-KR" << false; - //QTest::newRow("doc7") << "GB18030-0" << false; // only GB18030 works - QTest::newRow("doc7-bis") << "GB18030" << false; - QTest::newRow("doc8") << "IBM 850" << false; - QTest::newRow("doc9") << "IBM 866" << false; - QTest::newRow("doc10") << "IBM 874" << false; - QTest::newRow("doc11") << "ISO 2022-JP" << false; + QTest::newRow("Big5") << "Big5" << false; + QTest::newRow("Big5-HKSCS") << "Big5-HKSCS" << false; + QTest::newRow("CP949") << "CP949" << false; + QTest::newRow("EUC-JP") << "EUC-JP" << false; + QTest::newRow("EUC-KR") << "EUC-KR" << false; + //QTest::newRow("GB18030-0") << "GB18030-0" << false; // only GB18030 works + QTest::newRow("GB18030") << "GB18030" << false; + QTest::newRow("IBM 850") << "IBM 850" << false; + QTest::newRow("IBM 866") << "IBM 866" << false; + QTest::newRow("IBM 874") << "IBM 874" << false; + QTest::newRow("ISO 2022-JP") << "ISO 2022-JP" << false; //ISO 8859-1 to 10 and ISO 8859-13 to 16 tested previously // Iscii-Bng, Dev, Gjr, Knd, Mlm, Ori, Pnj, Tlg, and Tml tested in Iscii test - //QTest::newRow("doc12") << "JIS X 0201" << false; //actually not there - //QTest::newRow("doc13") << "JIS X 0208" << false; // actually not there - QTest::newRow("doc14") << "KOI8-R" << false; - QTest::newRow("doc15") << "KOI8-U" << false; - //QTest::newRow("doc16") << "MuleLao-1" << false; //only on x11 - QTest::newRow("doc17") << "ROMAN8" << false; - QTest::newRow("doc18") << "Shift-JIS" << false; - QTest::newRow("doc19") << "TIS-620" << false; - QTest::newRow("doc20") << "TSCII" << false; - QTest::newRow("doc21") << "UTF-8" << false; - QTest::newRow("doc22") << "UTF-16" << false; - QTest::newRow("doc23") << "UTF-16BE" << false; - QTest::newRow("doc24") << "UTF-16LE" << false; - QTest::newRow("doc25") << "UTF-32" << false; - QTest::newRow("doc26") << "UTF-32BE" << false; - QTest::newRow("doc27") << "UTF-32LE" << false; + //QTest::newRow("JIS X 0201") << "JIS X 0201" << false; // actually not there + //QTest::newRow("JIS X 0208") << "JIS X 0208" << false; // actually not there + QTest::newRow("KOI8-R") << "KOI8-R" << false; + QTest::newRow("KOI8-U") << "KOI8-U" << false; + //QTest::newRow("MuleLao-1") << "MuleLao-1" << false; //only on x11 + QTest::newRow("ROMAN8") << "ROMAN8" << false; + QTest::newRow("Shift-JIS") << "Shift-JIS" << false; + QTest::newRow("TIS-620") << "TIS-620" << false; + QTest::newRow("TSCII") << "TSCII" << false; + QTest::newRow("UTF-8") << "UTF-8" << false; + QTest::newRow("UTF-16") << "UTF-16" << false; + QTest::newRow("UTF-16BE") << "UTF-16BE" << false; + QTest::newRow("UTF-16LE") << "UTF-16LE" << false; + QTest::newRow("UTF-32") << "UTF-32" << false; + QTest::newRow("UTF-32BE") << "UTF-32BE" << false; + QTest::newRow("UTF-32LE") << "UTF-32LE" << false; //Windows-1250 to 1258 tested previously - QTest::newRow("doc3") << "WINSAMI2" << false; } void tst_QTextCodec::fromUnicode() @@ -1222,7 +1219,7 @@ void tst_QTextCodec::utf8Codec_data() utf8.clear(); utf8 += char(0xff); str = fromInvalidUtf8Sequence(utf8); - QTest::newRow("http://www.w3.org/2001/06/utf-8-wrong/UTF-8-test.html 3.5.1") << utf8 << str << -1; + QTest::newRow("http://www.w3.org/2001/06/utf-8-wrong/UTF-8-test.html 3.5.2") << utf8 << str << -1; // 3.5.2 utf8.clear(); @@ -1230,7 +1227,7 @@ void tst_QTextCodec::utf8Codec_data() utf8 += char(0xfe); utf8 += char(0xff); str = fromInvalidUtf8Sequence(utf8); - QTest::newRow("http://www.w3.org/2001/06/utf-8-wrong/UTF-8-test.html 3.5.1") << utf8 << str << -1; + QTest::newRow("http://www.w3.org/2001/06/utf-8-wrong/UTF-8-test.html 3.5.2-1") << utf8 << str << -1; // 4.1.1 utf8.clear(); diff --git a/tests/auto/corelib/codecs/utf8/tst_utf8.cpp b/tests/auto/corelib/codecs/utf8/tst_utf8.cpp index 69b91683d4a..e07b7cb2391 100644 --- a/tests/auto/corelib/codecs/utf8/tst_utf8.cpp +++ b/tests/auto/corelib/codecs/utf8/tst_utf8.cpp @@ -239,7 +239,7 @@ void tst_Utf8::invalidUtf8_data() QTest::newRow("non-unicode-3") << QByteArray("\xFC\x84\x80\x80\x80\x80"); // 0x7fffffff: 1 11 1111 11 1111 11 1111 11 1111 11 1111 // encoding: xxxx:xxz0 xz00:0100 xz00:0000 xz00:0000 xz00:0001 xz00:0001 - QTest::newRow("non-unicode-3") << QByteArray("\xFD\xBF\xBF\xBF\xBF\xBF"); + QTest::newRow("non-unicode-4") << QByteArray("\xFD\xBF\xBF\xBF\xBF\xBF"); // As seen above, 0xFE and 0xFF never appear: QTest::newRow("fe") << QByteArray("\xFE"); @@ -269,9 +269,9 @@ void tst_Utf8::invalidUtf8_data() // overlong 4: xxxx:z000 xz00:0000 xz00:0010 xz00:0000 QTest::newRow("overlong-2-4") << QByteArray("\xF0\x80\x82\x80"); // overlong 5: xxxx:xz00 xz00:0000 xz00:0000 xz00:0010 xz00:0000 - QTest::newRow("overlong-2-4") << QByteArray("\xF8\x80\x80\x82\x80"); + QTest::newRow("overlong-2-5") << QByteArray("\xF8\x80\x80\x82\x80"); // overlong 6: xxxx:xxz0 xz00:0000 xz00:0000 xz00:0000 xz00:0010 xz00:0000 - QTest::newRow("overlong-2-4") << QByteArray("\xFC\x80\x80\x80\x82\x80"); + QTest::newRow("overlong-2-6") << QByteArray("\xFC\x80\x80\x80\x82\x80"); // U+0800: 10 0000 00 0000 // proper encoding: xxxz:0000 xz10:0000 xz00:0000 diff --git a/tests/auto/corelib/corelib.pro b/tests/auto/corelib/corelib.pro index 4f284ac21e2..a85a385f80d 100644 --- a/tests/auto/corelib/corelib.pro +++ b/tests/auto/corelib/corelib.pro @@ -7,6 +7,7 @@ SUBDIRS=\ itemmodels \ json \ kernel \ + mimetypes \ plugin \ statemachine \ thread \ diff --git a/tests/auto/corelib/global/global.pro b/tests/auto/corelib/global/global.pro index a6c638f530e..d4293a896cc 100644 --- a/tests/auto/corelib/global/global.pro +++ b/tests/auto/corelib/global/global.pro @@ -6,4 +6,4 @@ SUBDIRS=\ qglobal \ qnumeric \ qrand \ - qmessagehandler + qlogging diff --git a/tests/auto/corelib/global/qlogging/app/app.pro b/tests/auto/corelib/global/qlogging/app/app.pro new file mode 100644 index 00000000000..1088d08a587 --- /dev/null +++ b/tests/auto/corelib/global/qlogging/app/app.pro @@ -0,0 +1,11 @@ +TEMPLATE = app + +TARGET = app +QT = core + +DESTDIR = ./ + +CONFIG -= app_bundle +CONFIG += console + +SOURCES += main.cpp diff --git a/tests/auto/corelib/global/qlogging/app/main.cpp b/tests/auto/corelib/global/qlogging/app/main.cpp new file mode 100644 index 00000000000..dfa52315c7f --- /dev/null +++ b/tests/auto/corelib/global/qlogging/app/main.cpp @@ -0,0 +1,58 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include + +struct T { + T() { qDebug("static constructor"); } + ~T() { qDebug("static destructor"); } +} t; + +int main(int argc, char **argv) +{ + QCoreApplication app(argc, argv); + app.setApplicationName("tst_qlogging"); + + qDebug("qDebug"); + qWarning("qWarning"); + qCritical("qCritical"); + return 0; +} diff --git a/tests/auto/corelib/global/qlogging/qlogging.pro b/tests/auto/corelib/global/qlogging/qlogging.pro new file mode 100644 index 00000000000..1d5e7681df8 --- /dev/null +++ b/tests/auto/corelib/global/qlogging/qlogging.pro @@ -0,0 +1,6 @@ +TEMPLATE = subdirs +CONFIG += ordered + +SUBDIRS += \ + app \ + tst_qlogging.pro diff --git a/tests/auto/corelib/global/qlogging/tst_qlogging.cpp b/tests/auto/corelib/global/qlogging/tst_qlogging.cpp new file mode 100644 index 00000000000..aaec46fe646 --- /dev/null +++ b/tests/auto/corelib/global/qlogging/tst_qlogging.cpp @@ -0,0 +1,674 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include +#include +#include +#include + +class tst_qmessagehandler : public QObject +{ + Q_OBJECT +public slots: + void initTestCase(); + +private slots: + void cleanup(); + + void defaultHandler(); + void installMessageHandler(); + void installMsgHandler(); + void installBothHandler(); + + void cleanupFuncinfo_data(); + void cleanupFuncinfo(); + + void qMessagePattern(); + +private: + QString m_appDir; +}; + +static QtMsgType s_type; +const char *s_file; +int s_line; +const char *s_function; +static QString s_message; + +void customMessageHandler(QtMsgType type, const QMessageLogContext &context, const char *msg) +{ + s_type = type; + s_file = context.file; + s_line = context.line; + s_function = context.function; + s_message = QString::fromLocal8Bit(msg); +} + +void customMsgHandler(QtMsgType type, const char *msg) +{ + s_type = type; + s_file = 0; + s_line = 0; + s_function = 0; + s_message = QString::fromLocal8Bit(msg); +} + +void tst_qmessagehandler::initTestCase() +{ + m_appDir = QFINDTESTDATA("app"); + QVERIFY2(!m_appDir.isEmpty(), qPrintable( + QString::fromLatin1("Couldn't find helper app dir starting from %1.").arg(QDir::currentPath()))); +} + +void tst_qmessagehandler::cleanup() +{ + qInstallMsgHandler(0); + qInstallMessageHandler(0); + s_type = QtFatalMsg; + s_file = 0; + s_line = 0; + s_function = 0; +} + +void tst_qmessagehandler::defaultHandler() +{ + // check that the default works + QTest::ignoreMessage(QtDebugMsg, "defaultHandler"); + qDebug("defaultHandler"); +} + +void tst_qmessagehandler::installMessageHandler() +{ + QMessageHandler oldHandler = qInstallMessageHandler(customMessageHandler); + + qDebug("installMessageHandler"); int line = __LINE__; + + QCOMPARE(s_type, QtDebugMsg); + QCOMPARE(s_message, QString::fromLocal8Bit("installMessageHandler")); + QCOMPARE(s_file, __FILE__); + QCOMPARE(s_function, Q_FUNC_INFO); + QCOMPARE(s_line, line); + + QMessageHandler myHandler = qInstallMessageHandler(oldHandler); + QCOMPARE((void*)myHandler, (void*)customMessageHandler); +} + +void tst_qmessagehandler::installMsgHandler() +{ + QtMsgHandler oldHandler = qInstallMsgHandler(customMsgHandler); + + qDebug("installMsgHandler"); + + QCOMPARE(s_type, QtDebugMsg); + QCOMPARE(s_message, QString::fromLocal8Bit("installMsgHandler")); + QCOMPARE(s_file, (const char*)0); + QCOMPARE(s_function, (const char*)0); + QCOMPARE(s_line, 0); + + QtMsgHandler myHandler = qInstallMsgHandler(oldHandler); + QCOMPARE((void*)myHandler, (void*)customMsgHandler); +} + +void tst_qmessagehandler::installBothHandler() +{ + qInstallMessageHandler(customMessageHandler); + qInstallMsgHandler(customMsgHandler); + + qDebug("installBothHandler"); int line = __LINE__; + + QCOMPARE(s_type, QtDebugMsg); + QCOMPARE(s_message, QString::fromLocal8Bit("installBothHandler")); + QCOMPARE(s_file, __FILE__); + QCOMPARE(s_function, Q_FUNC_INFO); + QCOMPARE(s_line, line); +} + +# define ADD(x) QTest::newRow(x) << Q_FUNC_INFO << x; + +class TestClass1 +{ +public: + enum Something { foo }; + char c; + + void func_void() { ADD("TestClass1::func_void"); } + int func_int() { ADD("TestClass1::func_int"); return 0; } + unsigned func_unsigned() { ADD("TestClass1::func_unsigned"); return 0; } + long func_long() { ADD("TestClass1::func_long"); return 0; } + long long func_ll() { ADD("TestClass1::func_ll"); return 0; } + unsigned long long func_ull() { ADD("TestClass1::func_ull"); return 0; } + char func_char() { ADD("TestClass1::func_char"); return 0; } + signed char func_schar() { ADD("TestClass1::func_schar"); return 0; } + unsigned char func_uchar() { ADD("TestClass1::func_uchar"); return 0; } + char &func_Rchar() { ADD("TestClass1::func_Rchar"); return c; } + char *func_Pchar() { ADD("TestClass1::func_Pchar"); return 0; } + const char *func_KPchar() { ADD("TestClass1::func_KPchar"); return 0; } + const volatile char *func_VKPchar() { ADD("TestClass1::func_VKPchar"); return 0; } + const volatile unsigned long long * const volatile func_KVPKVull() { ADD("TestClass1::func_KVPKVull"); return 0; } + const void * const volatile *func_KPKVvoid() { ADD("TestClass1::func_KPKVvoid"); return 0; } + + QList func_ai() { ADD("TestClass1::func_ai"); return QList(); } + QList func_aptr() { ADD("TestClass1::func_aptr"); return QList(); } + + QList func_aenum() { ADD("TestClass1::func_aenum"); return QList(); } + QList > func_aaptr() { ADD("TestClass1::func_aaptr"); return QList >(); } + + QMap func_ienummap() { ADD("TestClass1::func_ienummap"); return QMap(); } + + template + T* func_template1() { ADD("TestClass1::func_template1"); return 0; } + template + long func_template2() { ADD("TestClass1::func_template2"); return long(val); } + + typedef unsigned long long * ( *fptr)(); + typedef unsigned long long * (TestClass1::* pmf)(); + typedef fptr (TestClass1::* uglypmf)(); + fptr func_fptr() { ADD("TestClass1::func_fptr"); return 0; } + pmf func_pmf() { ADD("TestClass1::func_pmf"); return 0; } + uglypmf func_uglypmf(uglypmf = 0) { ADD("TestClass1::func_uglypmf"); return 0; } + QMap func_uglypmf2() { ADD("TestClass1::func_uglypmf2"); return QMap(); } + + void operator()() { ADD("TestClass1::operator()"); } + int operator<(int) { ADD("TestClass1::operator<"); return 0; } + int operator>(int) { ADD("TestClass1::operator>"); return 0; } + int operator<=(int) { ADD("TestClass1::operator<="); return 0; } + int operator>=(int) { ADD("TestClass1::operator>="); return 0; } + int operator=(int) { ADD("TestClass1::operator="); return 0; } + int operator+(int) { ADD("TestClass1::operator+"); return 0; } + int operator-(int) { ADD("TestClass1::operator-"); return 0; } + int operator*(int) { ADD("TestClass1::operator*"); return 0; } + int operator/(int) { ADD("TestClass1::operator/"); return 0; } + int operator%(int) { ADD("TestClass1::operator%"); return 0; } + int x; + int &operator++() { ADD("TestClass1::operator++"); return x; } + int operator++(int) { ADD("TestClass1::operator++"); return 0; } + int &operator--() { ADD("TestClass1::operator--"); return x; } + int operator--(int) { ADD("TestClass1::operator--"); return 0; } + +public: + TestClass1() + { + // instantiate + func_void(); + func_int(); + func_unsigned(); + func_long(); + func_ll(); + func_ull(); + func_char(); + func_schar(); + func_uchar(); + func_Rchar(); + func_Pchar(); + func_KPchar(); + func_VKPchar(); + func_KVPKVull(); + func_KPKVvoid(); + func_ai(); + func_aptr(); + func_aenum(); + func_aaptr(); + func_ienummap(); + func_template1(); + func_template2(); + func_fptr(); + func_pmf(); + func_uglypmf(); + func_uglypmf2(); + operator()(); + operator<(0); + operator>(0); + operator<=(0); + operator>=(0); + operator=(0); + operator+(0); + operator-(0); + operator*(0); + operator/(0); + operator%(0); + operator++(); + operator++(0); + operator--(); + operator--(0); + } +}; + +template class TestClass2 +{ + long func_long() { ADD("TestClass2::func_long"); return 0; } + template + T* func_template1() { ADD("TestClass2::func_template1"); return 0; } + template + long func_template2() { ADD("TestClass2::func_template2"); return long(val); } +public: + TestClass2() + { + func_long(); + func_template1(); + func_template2(); + } +}; + +template class TestClass3 +{ + long func_long() { ADD("TestClass3::func_long"); return 0; } + template + S* func_template1() { ADD("TestClass3::func_template1"); return 0; } + template + long func_template2() { ADD("TestClass3::func_template2"); return long(val); } +public: + struct Foo { TestClass3 foo; }; + TestClass3() + { + func_long(); + func_template1 >(); + func_template2(); + } +}; + +class TestClass4 +{ + TestClass1 c1; + + TestClass2 > func2() + { ADD("TestClass4::func2"); return TestClass2 >(); } + TestClass3, const void *>, TestClass1::foo>::Foo func3() + { ADD("TestClass4::func3"); return TestClass3, const void *>, TestClass1::foo>::Foo(); } +public: + TestClass4() + { + func2(); + func3(); + ADD("TestClass4::TestClass4"); + } + ~TestClass4() + { + ADD("TestClass4::~TestClass4"); + } +}; + + +void tst_qmessagehandler::cleanupFuncinfo_data() +{ +#ifndef QT_BUILD_INTERNAL + QSKIP("Requires -developer-build"); +#endif + QTest::addColumn("funcinfo"); + QTest::addColumn("expected"); + + TestClass4 c4; + + QTest::newRow("msvc_01") + << "void __thiscall TestClass1::func_void(void)" + << "TestClass1::func_void"; + QTest::newRow("gcc_01") + << "void TestClass1::func_void()" + << "TestClass1::func_void"; + + QTest::newRow("msvc_02") + << "int __thiscall TestClass1::func_int(void)" + << "TestClass1::func_int"; + QTest::newRow("gcc_02") + << "int TestClass1::func_int()" + << "TestClass1::func_int"; + + QTest::newRow("msvc_03") + << "unsigned int __thiscall TestClass1::func_unsigned(void)" + << "TestClass1::func_unsigned"; + QTest::newRow("gcc_03") + << "unsigned int TestClass1::func_unsigned()" + << "TestClass1::func_unsigned"; + + QTest::newRow("msvc_04") + << "long __thiscall TestClass1::func_long(void)" + << "TestClass1::func_long"; + QTest::newRow("gcc_04") + << "long int TestClass1::func_long()" + << "TestClass1::func_long"; + + QTest::newRow("msvc_05") + << "__int64 __thiscall TestClass1::func_ll(void)" + << "TestClass1::func_ll"; + QTest::newRow("gcc_05") + << "long long int TestClass1::func_ll()" + << "TestClass1::func_ll"; + + QTest::newRow("msvc_06") + << "unsigned __int64 __thiscall TestClass1::func_ull(void)" + << "TestClass1::func_ull"; + QTest::newRow("gcc_06") + << "long long unsigned int TestClass1::func_ull()" + << "TestClass1::func_ull"; + + QTest::newRow("msvc_07") + << "char __thiscall TestClass1::func_char(void)" + << "TestClass1::func_char"; + QTest::newRow("gcc_07") + << "char TestClass1::func_char()" + << "TestClass1::func_char"; + + QTest::newRow("msvc_08") + << "signed char __thiscall TestClass1::func_schar(void)" + << "TestClass1::func_schar"; + QTest::newRow("gcc_08") + << "signed char TestClass1::func_schar()" + << "TestClass1::func_schar"; + + QTest::newRow("msvc_09") + << "unsigned char __thiscall TestClass1::func_uchar(void)" + << "TestClass1::func_uchar"; + QTest::newRow("gcc_09") + << "unsigned char TestClass1::func_uchar()" + << "TestClass1::func_uchar"; + + QTest::newRow("msvc_09a") + << "char &__thiscall TestClass1::func_Rchar(void)" + << "TestClass1::func_Rchar"; + QTest::newRow("gcc_09a") + << "char& TestClass1::func_Rchar()" + << "TestClass1::func_Rchar"; + QTest::newRow("clang_09a") + << "char &TestClass1::func_Rchar()" + << "TestClass1::func_Rchar"; + + QTest::newRow("msvc_10") + << "char *__thiscall TestClass1::func_Pchar(void)" + << "TestClass1::func_Pchar"; + QTest::newRow("gcc_10") + << "char* TestClass1::func_Pchar()" + << "TestClass1::func_Pchar"; + QTest::newRow("clang_10") + << "char *TestClass1::func_Pchar()" + << "TestClass1::func_Pchar"; + + QTest::newRow("msvc_11") + << "const char *__thiscall TestClass1::func_KPchar(void)" + << "TestClass1::func_KPchar"; + QTest::newRow("gcc_11") + << "const char* TestClass1::func_KPchar()" + << "TestClass1::func_KPchar"; + + QTest::newRow("msvc_12") + << "volatile const char *__thiscall TestClass1::func_VKPchar(void)" + << "TestClass1::func_VKPchar"; + QTest::newRow("gcc_12") + << "const volatile char* TestClass1::func_VKPchar()" + << "TestClass1::func_VKPchar"; + + QTest::newRow("msvc_13") + << "volatile const unsigned __int64 *volatile const __thiscall TestClass1::func_KVPKVull(void)" + << "TestClass1::func_KVPKVull"; + QTest::newRow("gcc_13") + << "const volatile long long unsigned int* const volatile TestClass1::func_KVPKVull()" + << "TestClass1::func_KVPKVull"; + + QTest::newRow("msvc_14") + << "const void *volatile const *__thiscall TestClass1::func_KPKVvoid(void)" + << "TestClass1::func_KPKVvoid"; + QTest::newRow("gcc_14") + << "const void* const volatile* TestClass1::func_KPKVvoid()" + << "TestClass1::func_KPKVvoid"; + + QTest::newRow("msvc_15") + << "class QList __thiscall TestClass1::func_ai(void)" + << "TestClass1::func_ai"; + QTest::newRow("gcc_15") + << "QList TestClass1::func_ai()" + << "TestClass1::func_ai"; + + QTest::newRow("msvc_16") + << "class QList __thiscall TestClass1::func_aptr(void)" + << "TestClass1::func_aptr"; + QTest::newRow("gcc_16") + << "QList TestClass1::func_aptr()" + << "TestClass1::func_aptr"; + + QTest::newRow("msvc_17") + << "class QList __thiscall TestClass1::func_aenum(void)" + << "TestClass1::func_aenum"; + QTest::newRow("gcc_17") + << "QList TestClass1::func_aenum()" + << "TestClass1::func_aenum"; + + QTest::newRow("msvc_18") + << "class QList > __thiscall TestClass1::func_aaptr(void)" + << "TestClass1::func_aaptr"; + QTest::newRow("gcc_18") + << "QList > TestClass1::func_aaptr()" + << "TestClass1::func_aaptr"; + + QTest::newRow("msvc_19") + << "class QMap __thiscall TestClass1::func_ienummap(void)" + << "TestClass1::func_ienummap"; + QTest::newRow("gcc_19") + << "QMap TestClass1::func_ienummap()" + << "TestClass1::func_ienummap"; + + QTest::newRow("msvc_20") + << "class TestClass1 *__thiscall TestClass1::func_template1(void)" + << "TestClass1::func_template1"; + QTest::newRow("gcc_20") + << "T* TestClass1::func_template1() [with T = TestClass1]" + << "TestClass1::func_template1"; + + QTest::newRow("msvc_21") + << "long __thiscall TestClass1::func_template2(void)" + << "TestClass1::func_template2"; + QTest::newRow("gcc_21") + << "long int TestClass1::func_template2() [with TestClass1::Something val = foo]" + << "TestClass1::func_template2"; + + QTest::newRow("msvc_22") + << "unsigned __int64 *(__cdecl *__thiscall TestClass1::func_fptr(void))(void)" + << "TestClass1::func_fptr"; + QTest::newRow("gcc_22") + << "long long unsigned int* (* TestClass1::func_fptr())()" + << "TestClass1::func_fptr"; + + QTest::newRow("msvc_23") + << "unsigned __int64 *(__thiscall TestClass1::* __thiscall TestClass1::func_pmf(void))(void)" + << "TestClass1::func_pmf"; + QTest::newRow("gcc_23") + << "long long unsigned int* (TestClass1::* TestClass1::func_pmf())()" + << "TestClass1::func_pmf"; + + QTest::newRow("msvc_24") + << "unsigned __int64 *(__cdecl *(__thiscall TestClass1::* __thiscall TestClass1::func_uglypmf(unsigned __int64 *(__cdecl *(__thiscall TestClass1::* )(void))(void)))(void))(void)" + << "TestClass1::func_uglypmf"; + QTest::newRow("gcc_24") + << "long long unsigned int* (* (TestClass1::* TestClass1::func_uglypmf(long long unsigned int* (* (TestClass1::*)())()))())()" + << "TestClass1::func_uglypmf"; + + QTest::newRow("msvc_25") + << "class QMap __thiscall TestClass1::func_uglypmf2(void)" + << "TestClass1::func_uglypmf2"; + QTest::newRow("gcc_25") + << "QMap TestClass1::func_uglypmf2()" + << "TestClass1::func_uglypmf2"; + + QTest::newRow("msvc_26") + << "class TestClass2,class std::allocator > > > __thiscall TestClass4::func2(void)" + << "TestClass4::func2"; + QTest::newRow("gcc_26") + << "TestClass2, std::allocator > > > TestClass4::func2()" + << "TestClass4::func2"; + + QTest::newRow("msvc_27") + << "long __thiscall TestClass2,class std::allocator > > >::func_long(void)" + << "TestClass2::func_long"; + QTest::newRow("gcc_27") + << "long int TestClass2::func_long() [with T = std::map, std::allocator > >]" + << "TestClass2::func_long"; + + QTest::newRow("msvc_28") + << "class std::map,class std::allocator > > *__thiscall TestClass2,class std::allocator > > >::func_template1,class std::allocator > > >>(void)" + << "TestClass2::func_template1"; + QTest::newRow("gcc_21") + << "T* TestClass2::func_template1() [with S = TestClass2, std::allocator > > >, T = std::map, std::allocator > >]" + << "TestClass2::func_template1"; + + QTest::newRow("msvc_29") + << "long __thiscall TestClass2,class std::allocator > > >::func_template2(void)" + << "TestClass2::func_template2"; + QTest::newRow("gcc_29") + << "long int TestClass2::func_template2() [with TestClass1::Something val = foo, T = std::map, std::allocator > >]" + << "TestClass2::func_template2"; + + QTest::newRow("msvc_30") + << "struct TestClass3 >,void const *,struct std::less > >,class std::allocator > const ,void const *> > >,0>::Foo __thiscall TestClass4::func3(void)" + << "TestClass4::func3"; + QTest::newRow("gcc_30") + << "TestClass3 >, const void*, std::less > >, std::allocator >, const void*> > >, foo>::Foo TestClass4::func3()" + << "TestClass4::func3"; + + QTest::newRow("msvc_31") + << "long __thiscall TestClass3 >,void const *,struct std::less > >,class std::allocator > const ,void const *> > >,0>::func_long(void)" + << "TestClass3::func_long"; + QTest::newRow("gcc_31") + << "long int TestClass3::func_long() [with T = std::map >, const void*, std::less > >, std::allocator >, const void*> > >, TestClass1::Something v = foo]" + << "TestClass3::func_long"; + + QTest::newRow("msvc_32") + << "class TestClass2 >,void const *,struct std::less > >,class std::allocator > const ,void const *> > > > *__thiscall TestClass3 >,void const *,struct std::less > >,class std::allocator > const ,void const *> > >,0>::func_template1 >,void const *,struct std::less > >,class std::allocator > const ,void const *> > > >>(void)" + << "TestClass3::func_template1"; + QTest::newRow("gcc_32") + << "S* TestClass3::func_template1() [with S = TestClass2 >, const void*, std::less > >, std::allocator >, const void*> > > >, T = std::map >, const void*, std::less > >, std::allocator >, const void*> > >, TestClass1::Something v = foo]" + << "TestClass3::func_template1"; + + QTest::newRow("msvc_33") + << "long __thiscall TestClass3 >,void const *,struct std::less > >,class std::allocator > const ,void const *> > >,0>::func_template2(void)" + << "TestClass3::func_template2"; + QTest::newRow("gcc_33") + << "long int TestClass3::func_template2() [with TestClass1::Something val = foo, T = std::map >, const void*, std::less > >, std::allocator >, const void*> > >, TestClass1::Something v = foo]" + << "TestClass3::func_template2"; + + QTest::newRow("msvc_34") + << "__thiscall TestClass4::TestClass4(void)" + << "TestClass4::TestClass4"; + QTest::newRow("gcc_34") + << "TestClass4::TestClass4()" + << "TestClass4::TestClass4"; + + QTest::newRow("msvc_35") + << "__thiscall TestClass4::~TestClass4(void)" + << "TestClass4::~TestClass4"; + QTest::newRow("gcc_35") + << "TestClass4::~TestClass4()" + << "TestClass4::~TestClass4"; + + QTest::newRow("gcc_36") + << "void TestClass1::operator()()" + << "TestClass1::operator()"; + + QTest::newRow("gcc_37") + << "long int TestClass1::func_template2() [with TestClass1::Something val = (TestClass1::Something)0u]" + << "TestClass1::func_template2"; + + QTest::newRow("gcc_38") + << "int TestClass1::operator<(int)" + << "TestClass1::operator<"; + + QTest::newRow("gcc_39") + << "int TestClass1::operator>(int)" + << "TestClass1::operator>";} + +#ifdef QT_BUILD_INTERNAL +QT_BEGIN_NAMESPACE +extern QByteArray qCleanupFuncinfo(QByteArray); +QT_END_NAMESPACE +#endif + +void tst_qmessagehandler::cleanupFuncinfo() +{ +#ifdef QT_BUILD_INTERNAL + QFETCH(QString, funcinfo); + +// qDebug() << funcinfo.toLatin1(); + QByteArray result = qCleanupFuncinfo(funcinfo.toLatin1()); + QTEST(QString::fromLatin1(result), "expected"); +#endif +} + +void tst_qmessagehandler::qMessagePattern() +{ + QProcess process; + + QStringList environment = QProcess::systemEnvironment(); + // %{file} is tricky because of shadow builds + environment.prepend("QT_MESSAGE_PATTERN=\"%{type} %{appname} %{line} %{function} %{message}\""); + process.setEnvironment(environment); + + QString appExe = m_appDir + "/app"; + process.start(appExe); + QVERIFY2(process.waitForStarted(), qPrintable( + QString::fromLatin1("Could not start %1: %2").arg(appExe, process.errorString()))); + process.waitForFinished(); + + QByteArray output = process.readAllStandardError(); +// qDebug() << output; + QVERIFY(!output.isEmpty()); + + QVERIFY(output.contains("debug 45 T::T static constructor")); + // we can't be sure whether the QT_MESSAGE_PATTERN is already destructed + QVERIFY(output.contains("static destructor")); + QVERIFY(output.contains("debug tst_qlogging 54 main qDebug")); + QVERIFY(output.contains("warning tst_qlogging 55 main qWarning")); + QVERIFY(output.contains("critical tst_qlogging 56 main qCritical")); + + environment = QProcess::systemEnvironment(); + environment.prepend("QT_MESSAGE_PATTERN=\"PREFIX: %{unknown} %{message}\""); + process.setEnvironment(environment); + + process.start(appExe); + QVERIFY2(process.waitForStarted(), qPrintable( + QString::fromLatin1("Could not start %1: %2").arg(appExe, process.errorString()))); + process.waitForFinished(); + + output = process.readAllStandardError(); +// qDebug() << output; + QVERIFY(!output.isEmpty()); + + QVERIFY(output.contains("QT_MESSAGE_PATTERN: Unknown placeholder %{unknown}")); + QVERIFY(output.contains("PREFIX: qDebug")); +} + +QTEST_MAIN(tst_qmessagehandler) +#include "tst_qlogging.moc" diff --git a/tests/auto/corelib/global/qlogging/tst_qlogging.pro b/tests/auto/corelib/global/qlogging/tst_qlogging.pro new file mode 100644 index 00000000000..60377e0fdc9 --- /dev/null +++ b/tests/auto/corelib/global/qlogging/tst_qlogging.pro @@ -0,0 +1,4 @@ +CONFIG += testcase parallel_test +TARGET = tst_qlogging +QT = core testlib +SOURCES = tst_qlogging.cpp diff --git a/tests/auto/corelib/global/qmessagehandler/qmessagehandler.pro b/tests/auto/corelib/global/qmessagehandler/qmessagehandler.pro deleted file mode 100644 index 8bdba4bfc42..00000000000 --- a/tests/auto/corelib/global/qmessagehandler/qmessagehandler.pro +++ /dev/null @@ -1,4 +0,0 @@ -CONFIG += testcase parallel_test -TARGET = tst_qmessagehandler -QT = core testlib -SOURCES = tst_qmessagehandler.cpp diff --git a/tests/auto/corelib/global/qmessagehandler/tst_qmessagehandler.cpp b/tests/auto/corelib/global/qmessagehandler/tst_qmessagehandler.cpp deleted file mode 100644 index 39bd0986a5e..00000000000 --- a/tests/auto/corelib/global/qmessagehandler/tst_qmessagehandler.cpp +++ /dev/null @@ -1,147 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include -#include - -#include - -class tst_qmessagehandler : public QObject -{ - Q_OBJECT -private slots: - void cleanup(); - - void defaultHandler(); - void installMessageHandler(); - void installMsgHandler(); - void installBothHandler(); -}; - -static QtMsgType s_type; -const char *s_file; -int s_line; -const char *s_function; -static QString s_message; - -void customMessageHandler(QtMsgType type, const QMessageLogContext &context, const char *msg) -{ - s_type = type; - s_file = context.file; - s_line = context.line; - s_function = context.function; - s_message = QString::fromLocal8Bit(msg); -} - -void customMsgHandler(QtMsgType type, const char *msg) -{ - s_type = type; - s_file = 0; - s_line = 0; - s_function = 0; - s_message = QString::fromLocal8Bit(msg); -} - -void tst_qmessagehandler::cleanup() -{ - qInstallMsgHandler(0); - qInstallMessageHandler(0); - s_type = QtFatalMsg; - s_file = 0; - s_line = 0; - s_function = 0; -} - -void tst_qmessagehandler::defaultHandler() -{ - // check that the default works - QTest::ignoreMessage(QtDebugMsg, "defaultHandler"); - qDebug("defaultHandler"); -} - -void tst_qmessagehandler::installMessageHandler() -{ - QMessageHandler oldHandler = qInstallMessageHandler(customMessageHandler); - - qDebug("installMessageHandler"); int line = __LINE__; - - QCOMPARE(s_type, QtDebugMsg); - QCOMPARE(s_message, QString::fromLocal8Bit("installMessageHandler")); - QCOMPARE(s_file, __FILE__); - QCOMPARE(s_function, Q_FUNC_INFO); - QCOMPARE(s_line, line); - - QMessageHandler myHandler = qInstallMessageHandler(oldHandler); - QCOMPARE((void*)myHandler, (void*)customMessageHandler); -} - -void tst_qmessagehandler::installMsgHandler() -{ - QtMsgHandler oldHandler = qInstallMsgHandler(customMsgHandler); - - qDebug("installMsgHandler"); - - QCOMPARE(s_type, QtDebugMsg); - QCOMPARE(s_message, QString::fromLocal8Bit("installMsgHandler")); - QCOMPARE(s_file, (const char*)0); - QCOMPARE(s_function, (const char*)0); - QCOMPARE(s_line, 0); - - QtMsgHandler myHandler = qInstallMsgHandler(oldHandler); - QCOMPARE((void*)myHandler, (void*)customMsgHandler); -} - -void tst_qmessagehandler::installBothHandler() -{ - qInstallMessageHandler(customMessageHandler); - qInstallMsgHandler(customMsgHandler); - - qDebug("installBothHandler"); int line = __LINE__; - - QCOMPARE(s_type, QtDebugMsg); - QCOMPARE(s_message, QString::fromLocal8Bit("installBothHandler")); - QCOMPARE(s_file, __FILE__); - QCOMPARE(s_function, Q_FUNC_INFO); - QCOMPARE(s_line, line); -} - -QTEST_MAIN(tst_qmessagehandler) -#include "tst_qmessagehandler.moc" diff --git a/tests/auto/corelib/global/qnumeric/tst_qnumeric.cpp b/tests/auto/corelib/global/qnumeric/tst_qnumeric.cpp index 064724e8887..899efc11d9f 100644 --- a/tests/auto/corelib/global/qnumeric/tst_qnumeric.cpp +++ b/tests/auto/corelib/global/qnumeric/tst_qnumeric.cpp @@ -72,7 +72,7 @@ void tst_QNumeric::fuzzyCompare_data() QTest::newRow("mis2") << 0.0 << 10000000.0 << false; QTest::newRow("mis3") << 0.0 << 0.000000001 << false; QTest::newRow("mis4") << 100000000.0 << 0.000000001 << false; - QTest::newRow("mis4") << 0.0000000001 << 0.000000001 << false; + QTest::newRow("mis5") << 0.0000000001 << 0.000000001 << false; } void tst_QNumeric::fuzzyCompare() diff --git a/tests/auto/corelib/io/qdatastream/tst_qdatastream.cpp b/tests/auto/corelib/io/qdatastream/tst_qdatastream.cpp index eb227625a72..79c96fbdc9d 100644 --- a/tests/auto/corelib/io/qdatastream/tst_qdatastream.cpp +++ b/tests/auto/corelib/io/qdatastream/tst_qdatastream.cpp @@ -2680,8 +2680,8 @@ void tst_QDataStream::status_QBitArray_data() // past end QTest::newRow("empty") << QByteArray() << (int) QDataStream::ReadPastEnd << QBitArray(); QTest::newRow("badsize 0a") << QByteArray("\x00", 1) << (int) QDataStream::ReadPastEnd << QBitArray(); - QTest::newRow("badsize 0a") << QByteArray("\x00\x00", 2) << (int) QDataStream::ReadPastEnd << QBitArray(); - QTest::newRow("badsize 0a") << QByteArray("\x00\x00\x00", 3) << (int) QDataStream::ReadPastEnd << QBitArray(); + QTest::newRow("badsize 0b") << QByteArray("\x00\x00", 2) << (int) QDataStream::ReadPastEnd << QBitArray(); + QTest::newRow("badsize 0c") << QByteArray("\x00\x00\x00", 3) << (int) QDataStream::ReadPastEnd << QBitArray(); QTest::newRow("badsize 1") << QByteArray("\x00\x00\x00\x01", 4) << (int) QDataStream::ReadPastEnd << QBitArray(); QTest::newRow("badsize 2") << QByteArray("\x00\x00\x00\x02", 4) << (int) QDataStream::ReadPastEnd << QBitArray(); QTest::newRow("badsize 3") << QByteArray("\x00\x00\x00\x03", 4) << (int) QDataStream::ReadPastEnd << QBitArray(); diff --git a/tests/auto/corelib/io/qdir/tst_qdir.cpp b/tests/auto/corelib/io/qdir/tst_qdir.cpp index f1c9015092e..6a48d7e60fa 100644 --- a/tests/auto/corelib/io/qdir/tst_qdir.cpp +++ b/tests/auto/corelib/io/qdir/tst_qdir.cpp @@ -190,6 +190,8 @@ private slots: void isReadable(); + void cdBelowRoot(); + private: QString m_dataPath; }; @@ -383,6 +385,10 @@ void tst_QDir::removeRecursively() void tst_QDir::removeRecursivelyFailure() { +#ifdef Q_OS_UNIX + if (::getuid() == 0) + QSKIP("Running this test as root doesn't make sense"); +#endif const QString tmpdir = QDir::currentPath() + "/tmpdir/"; const QString path = tmpdir + "undeletable"; QDir().mkpath(path); @@ -1930,6 +1936,10 @@ void tst_QDir::isRelative() void tst_QDir::isReadable() { +#ifdef Q_OS_UNIX + if (::getuid() == 0) + QSKIP("Running this test as root doesn't make sense"); +#endif QDir dir; QVERIFY(dir.isReadable()); @@ -1942,6 +1952,36 @@ void tst_QDir::isReadable() #endif } +void tst_QDir::cdBelowRoot() +{ +#if defined (Q_OS_UNIX) +#define ROOT QString("/") +#define DIR QString("/tmp") +#define CD_INTO "tmp" +#else +#define ROOT QString::fromLocal8Bit(qgetenv("SystemDrive"))+"/" +#define DIR QString::fromLocal8Bit(qgetenv("SystemRoot")).replace('\\', '/') +#define CD_INTO QString::fromLocal8Bit(qgetenv("SystemRoot")).mid(3) +#endif + + QDir root(ROOT); + QVERIFY(!root.cd("..")); + QCOMPARE(root.path(), ROOT); + QVERIFY(root.cd(CD_INTO)); + QCOMPARE(root.path(), DIR); +#ifdef Q_OS_UNIX + if (::getuid() == 0) + QSKIP("Running this test as root doesn't make sense"); +#endif + QDir dir(DIR); + QVERIFY(!dir.cd("../..")); + QCOMPARE(dir.path(), DIR); + QVERIFY(!dir.cd("../abs/../..")); + QCOMPARE(dir.path(), DIR); + QVERIFY(dir.cd("..")); + QCOMPARE(dir.path(), ROOT); +} + QTEST_MAIN(tst_QDir) #include "tst_qdir.moc" diff --git a/tests/auto/corelib/io/qdiriterator/tst_qdiriterator.cpp b/tests/auto/corelib/io/qdiriterator/tst_qdiriterator.cpp index ad61db51d6e..d5d490dc295 100644 --- a/tests/auto/corelib/io/qdiriterator/tst_qdiriterator.cpp +++ b/tests/auto/corelib/io/qdiriterator/tst_qdiriterator.cpp @@ -403,8 +403,11 @@ void tst_QDirIterator::iterateResource() QDirIterator it(dirName, nameFilters, filters, flags); QStringList list; - while (it.hasNext()) - list << it.next(); + while (it.hasNext()) { + const QString dir = it.next(); + if (!dir.startsWith(":/qt-project.org")) + list << dir; + } list.sort(); QStringList sortedEntries = entries; diff --git a/tests/auto/corelib/io/qfile/tst_qfile.cpp b/tests/auto/corelib/io/qfile/tst_qfile.cpp index 00e45354ba3..d1a0debf4d2 100644 --- a/tests/auto/corelib/io/qfile/tst_qfile.cpp +++ b/tests/auto/corelib/io/qfile/tst_qfile.cpp @@ -53,7 +53,9 @@ #include #endif #include -#ifndef Q_OS_WIN +#ifdef Q_OS_WIN +# include +#else # include # include #endif @@ -476,8 +478,16 @@ void tst_QFile::open_data() QTest::newRow("noreadfile") << QString("noreadfile") << int(QIODevice::ReadOnly) << false << QFile::OpenError; #if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) - QTest::newRow("//./PhysicalDrive0") << QString("//./PhysicalDrive0") << int(QIODevice::ReadOnly) - << true << QFile::NoError; + //opening devices requires administrative privileges (and elevation). + HANDLE hTest = CreateFile(_T("\\\\.\\PhysicalDrive0"), GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, NULL); + if (hTest != INVALID_HANDLE_VALUE) { + CloseHandle(hTest); + QTest::newRow("//./PhysicalDrive0") << QString("//./PhysicalDrive0") << int(QIODevice::ReadOnly) + << true << QFile::NoError; + } else { + QTest::newRow("//./PhysicalDrive0") << QString("//./PhysicalDrive0") << int(QIODevice::ReadOnly) + << false << QFile::OpenError; + } QTest::newRow("uncFile") << "//" + QtNetworkSettings::winServerName() + "/testshare/test.pri" << int(QIODevice::ReadOnly) << true << QFile::NoError; #endif @@ -2339,6 +2349,13 @@ void tst_QFile::rename() QFETCH(QString, destination); QFETCH(bool, result); +#if defined(Q_OS_UNIX) + if (strcmp(QTest::currentDataTag(), "renamefile -> /etc/renamefile") == 0) { + if (::getuid() == 0) + QSKIP("Running this test as root doesn't make sense"); + } +#endif + QFile::remove("renamedfile"); QFile f("renamefile"); f.open(QFile::WriteOnly); @@ -3011,25 +3028,28 @@ void tst_QFile::openStandardStreamsBufferedStreams() { QFile in; in.open(stdin, QIODevice::ReadOnly); + if (!in.isSequential()) + QSKIP("Standard input redirected."); QCOMPARE( in.pos(), (qint64)0 ); QCOMPARE( in.size(), (qint64)0 ); - QVERIFY( in.isSequential() ); } { QFile out; out.open(stdout, QIODevice::WriteOnly); + if (!out.isSequential()) + QSKIP("Standard output redirected."); QCOMPARE( out.pos(), (qint64)0 ); QCOMPARE( out.size(), (qint64)0 ); - QVERIFY( out.isSequential() ); } { QFile err; err.open(stderr, QIODevice::WriteOnly); + if (!err.isSequential()) + QSKIP("Standard error redirected."); QCOMPARE( err.pos(), (qint64)0 ); QCOMPARE( err.size(), (qint64)0 ); - QVERIFY( err.isSequential() ); } } diff --git a/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp b/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp index 7b80152b624..797d5ff5e35 100644 --- a/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp +++ b/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp @@ -159,8 +159,8 @@ private slots: void isBundle_data(); void isBundle(); - void isLocalFs_data(); - void isLocalFs(); + void isNativePath_data(); + void isNativePath(); void refresh(); @@ -1222,10 +1222,13 @@ void tst_QFileInfo::isBundle() QCOMPARE(fi.isBundle(), isBundle); } -void tst_QFileInfo::isLocalFs_data() +void tst_QFileInfo::isNativePath_data() { QTest::addColumn("path"); - QTest::addColumn("isLocalFs"); + QTest::addColumn("isNativePath"); + + QTest::newRow("default-constructed") << QString() << false; + QTest::newRow("empty") << QString("") << true; QTest::newRow("local root") << QString::fromLatin1("/") << true; QTest::newRow("local non-existent file") << QString::fromLatin1("/abrakadabra.boo") << true; @@ -1233,17 +1236,15 @@ void tst_QFileInfo::isLocalFs_data() QTest::newRow("qresource root") << QString::fromLatin1(":/") << false; } -void tst_QFileInfo::isLocalFs() +void tst_QFileInfo::isNativePath() { QFETCH(QString, path); - QFETCH(bool, isLocalFs); + QFETCH(bool, isNativePath); QFileInfo info(path); - QFileInfoPrivate *privateInfo = getPrivate(info); - QCOMPARE((privateInfo->fileEngine == 0), isLocalFs); - if (privateInfo->fileEngine) - QCOMPARE(bool(privateInfo->fileEngine->fileFlags(QAbstractFileEngine::LocalDiskFlag) - & QAbstractFileEngine::LocalDiskFlag), isLocalFs); + if (path.isNull()) + info = QFileInfo(); + QCOMPARE(info.isNativePath(), isNativePath); } void tst_QFileInfo::refresh() @@ -1722,7 +1723,13 @@ void tst_QFileInfo::group() #if defined(Q_OS_UNIX) struct group *gr; gid_t gid = getegid(); + + errno = 0; gr = getgrgid(gid); + + QVERIFY2(gr, qPrintable( + QString("getgrgid returned 0: %1, cannot determine my own group") + .arg(QString::fromLocal8Bit(strerror(errno))))); expected = QString::fromLocal8Bit(gr->gr_name); #endif diff --git a/tests/auto/corelib/io/qfilesystementry/tst_qfilesystementry.cpp b/tests/auto/corelib/io/qfilesystementry/tst_qfilesystementry.cpp index fe2e30a95c1..b083d3b1c3e 100644 --- a/tests/auto/corelib/io/qfilesystementry/tst_qfilesystementry.cpp +++ b/tests/auto/corelib/io/qfilesystementry/tst_qfilesystementry.cpp @@ -241,15 +241,15 @@ void tst_QFileSystemEntry::suffix_data() QTest::newRow("data1") << "file.tar.gz" << "gz"; QTest::newRow("data2") << "/path/file/file.tar.gz" << "gz"; QTest::newRow("data3") << "/path/file.tar" << "tar"; - QTest::newRow("hidden1") << ".ext1" << "ext1"; - QTest::newRow("hidden1") << ".ext" << "ext"; - QTest::newRow("hidden1") << ".ex" << "ex"; - QTest::newRow("hidden1") << ".e" << "e"; - QTest::newRow("hidden2") << ".ext1.ext2" << "ext2"; - QTest::newRow("hidden2") << ".ext.ext2" << "ext2"; - QTest::newRow("hidden2") << ".ex.ext2" << "ext2"; - QTest::newRow("hidden2") << ".e.ext2" << "ext2"; - QTest::newRow("hidden2") << "..ext2" << "ext2"; + QTest::newRow("hidden1-1") << ".ext1" << "ext1"; + QTest::newRow("hidden1-2") << ".ext" << "ext"; + QTest::newRow("hidden1-3") << ".ex" << "ex"; + QTest::newRow("hidden1-4") << ".e" << "e"; + QTest::newRow("hidden2-1") << ".ext1.ext2" << "ext2"; + QTest::newRow("hidden2-2") << ".ext.ext2" << "ext2"; + QTest::newRow("hidden2-3") << ".ex.ext2" << "ext2"; + QTest::newRow("hidden2-4") << ".e.ext2" << "ext2"; + QTest::newRow("hidden2-5") << "..ext2" << "ext2"; QTest::newRow("dots") << "/path/file.with.dots/file..ext2" << "ext2"; QTest::newRow("dots2") << "/path/file.with.dots/.file..ext2" << "ext2"; } diff --git a/tests/auto/corelib/io/qfilesystemwatcher/qfilesystemwatcher.pro b/tests/auto/corelib/io/qfilesystemwatcher/qfilesystemwatcher.pro index e712a6ad5f5..8ada44fdf75 100644 --- a/tests/auto/corelib/io/qfilesystemwatcher/qfilesystemwatcher.pro +++ b/tests/auto/corelib/io/qfilesystemwatcher/qfilesystemwatcher.pro @@ -2,5 +2,3 @@ CONFIG += testcase parallel_test TARGET = tst_qfilesystemwatcher QT = core testlib SOURCES = tst_qfilesystemwatcher.cpp - -mac: CONFIG += insignificant_test # QTBUG-22744 diff --git a/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp b/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp index 5e5a99f9371..8caccb6da9d 100644 --- a/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp +++ b/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp @@ -42,6 +42,7 @@ #include +#include #include #ifdef Q_OS_LINUX @@ -52,9 +53,15 @@ # endif #endif +/* All tests need to run in temporary directories not used + * by the application to avoid non-deterministic failures on Windows + * due to locked directories and left-overs from previous tests. */ + class tst_QFileSystemWatcher : public QObject { Q_OBJECT +public: + tst_QFileSystemWatcher(); private slots: void basicTest_data(); @@ -75,11 +82,20 @@ private slots: void removeFileAndUnWatch(); - void cleanup(); - void destroyAfterQCoreApplication(); + +private: + QString m_tempDirPattern; }; +tst_QFileSystemWatcher::tst_QFileSystemWatcher() +{ + m_tempDirPattern = QDir::tempPath(); + if (!m_tempDirPattern.endsWith(QLatin1Char('/'))) + m_tempDirPattern += QLatin1Char('/'); + m_tempDirPattern += QStringLiteral("tst_qfilesystemwatcherXXXXXX"); +} + void tst_QFileSystemWatcher::basicTest_data() { QTest::addColumn("backend"); @@ -92,7 +108,9 @@ void tst_QFileSystemWatcher::basicTest() QFETCH(QString, backend); // create test file - QFile testFile("testfile.txt"); + QTemporaryDir temporaryDirectory(m_tempDirPattern); + QVERIFY(temporaryDirectory.isValid()); + QFile testFile(temporaryDirectory.path() + QStringLiteral("/testfile.txt")); testFile.setPermissions(QFile::ReadOwner | QFile::WriteOwner); testFile.remove(); QVERIFY(testFile.open(QIODevice::WriteOnly | QIODevice::Truncate)); @@ -151,14 +169,16 @@ void tst_QFileSystemWatcher::basicTest() QCOMPARE(changedSpy.count(), 0); // readd the file watch with a relative path - QVERIFY(watcher.addPath(testFile.fileName().prepend("./"))); + const QString relativeTestFileName = QDir::current().relativeFilePath(testFile.fileName()); + QVERIFY(!relativeTestFileName.isEmpty()); + QVERIFY(watcher.addPath(relativeTestFileName)); testFile.open(QIODevice::WriteOnly | QIODevice::Truncate); testFile.write(QByteArray("hello multiverse!")); testFile.close(); QTRY_VERIFY(changedSpy.count() > 0); - QVERIFY(watcher.removePath(testFile.fileName().prepend("./"))); + QVERIFY(watcher.removePath(relativeTestFileName)); changedSpy.clear(); @@ -222,15 +242,21 @@ void tst_QFileSystemWatcher::watchDirectory() { QFETCH(QString, backend); - QDir().mkdir("testDir"); - QDir testDir("testDir"); + QTemporaryDir temporaryDirectory(m_tempDirPattern); + QVERIFY(temporaryDirectory.isValid()); + + QDir temporaryDir(temporaryDirectory.path()); + const QString testDirName = QStringLiteral("testDir"); + QVERIFY(temporaryDir.mkdir(testDirName)); + QDir testDir = temporaryDir; + QVERIFY(testDir.cd(testDirName)); QString testFileName = testDir.filePath("testFile.txt"); QFile::remove(testFileName); QFileSystemWatcher watcher; watcher.setObjectName(QLatin1String("_qt_autotest_force_engine_") + backend); - QVERIFY(watcher.addPath(testDir.dirName())); + QVERIFY(watcher.addPath(testDir.absolutePath())); QSignalSpy changedSpy(&watcher, SIGNAL(directoryChanged(const QString &))); QVERIFY(changedSpy.isValid()); @@ -246,7 +272,7 @@ void tst_QFileSystemWatcher::watchDirectory() QString fileName; // remove the watch, should not get notification of a new file - QVERIFY(watcher.removePath(testDir.dirName())); + QVERIFY(watcher.removePath(testDir.absolutePath())); QVERIFY(testFile.open(QIODevice::WriteOnly | QIODevice::Truncate)); testFile.close(); @@ -256,7 +282,7 @@ void tst_QFileSystemWatcher::watchDirectory() QCOMPARE(changedSpy.count(), 0); - QVERIFY(watcher.addPath(testDir.dirName())); + QVERIFY(watcher.addPath(testDir.absolutePath())); // remove the file again, should get a signal from the watcher QVERIFY(testFile.remove()); @@ -265,7 +291,7 @@ void tst_QFileSystemWatcher::watchDirectory() eventLoop.exec(); // remove the directory, should get a signal from the watcher - QVERIFY(QDir().rmdir("testDir")); + QVERIFY(temporaryDir.rmdir(testDirName)); // waiting max 5 seconds for notification for directory removal to trigger #ifdef Q_OS_WINCE @@ -276,15 +302,16 @@ void tst_QFileSystemWatcher::watchDirectory() QCOMPARE(changedSpy.at(1).count(), 1); fileName = changedSpy.at(0).at(0).toString(); - QCOMPARE(fileName, testDir.dirName()); + QCOMPARE(fileName, testDir.absolutePath()); fileName = changedSpy.at(1).at(0).toString(); - QCOMPARE(fileName, testDir.dirName()); + QCOMPARE(fileName, testDir.absolutePath()); changedSpy.clear(); // recreate the file, we should not get any notification - if (!QDir().mkdir("testDir")) - QSKIP("Failed to recreate directory, skipping final test."); + if (!temporaryDir.mkdir(testDirName)) + QSKIP(qPrintable(QString::fromLatin1("Failed to recreate directory '%1' under '%2', skipping final test."). + arg(testDirName, temporaryDir.absolutePath()))); // waiting max 5 seconds for notification for dir recreation to trigger timer.start(5000); @@ -292,7 +319,7 @@ void tst_QFileSystemWatcher::watchDirectory() QCOMPARE(changedSpy.count(), 0); - QVERIFY(QDir().rmdir("testDir")); + QVERIFY(temporaryDir.rmdir(testDirName)); } void tst_QFileSystemWatcher::addPath() @@ -360,8 +387,15 @@ void tst_QFileSystemWatcher::removePaths() void tst_QFileSystemWatcher::watchFileAndItsDirectory() { QFETCH(QString, backend); - QDir().mkdir("testDir"); - QDir testDir("testDir"); + + QTemporaryDir temporaryDirectory(m_tempDirPattern); + QVERIFY(temporaryDirectory.isValid()); + + QDir temporaryDir(temporaryDirectory.path()); + const QString testDirName = QStringLiteral("testDir"); + QVERIFY(temporaryDir.mkdir(testDirName)); + QDir testDir = temporaryDir; + QVERIFY(testDir.cd(testDirName)); QString testFileName = testDir.filePath("testFile.txt"); QString secondFileName = testDir.filePath("testFile2.txt"); @@ -378,7 +412,7 @@ void tst_QFileSystemWatcher::watchFileAndItsDirectory() QFileSystemWatcher watcher; watcher.setObjectName(QLatin1String("_qt_autotest_force_engine_") + backend); - QVERIFY(watcher.addPath(testDir.dirName())); + QVERIFY(watcher.addPath(testDir.absolutePath())); QVERIFY(watcher.addPath(testFileName)); QSignalSpy fileChangedSpy(&watcher, SIGNAL(fileChanged(const QString &))); @@ -398,6 +432,11 @@ void tst_QFileSystemWatcher::watchFileAndItsDirectory() testFile.write(QByteArray("hello again")); testFile.close(); +#ifdef Q_OS_MAC + // wait again for the file's atime to be updated + QTest::qWait(2000); +#endif + QTRY_VERIFY(fileChangedSpy.count() > 0); //according to Qt 4 documentation: @@ -443,17 +482,7 @@ void tst_QFileSystemWatcher::watchFileAndItsDirectory() QCOMPARE(fileChangedSpy.count(), 0); QCOMPARE(dirChangedSpy.count(), 1); - QVERIFY(QDir().rmdir("testDir")); -} - -void tst_QFileSystemWatcher::cleanup() -{ - QDir testDir("testDir"); - QString testFileName = testDir.filePath("testFile.txt"); - QString secondFileName = testDir.filePath("testFile2.txt"); - QFile::remove(testFileName); - QFile::remove(secondFileName); - QDir().rmdir("testDir"); + QVERIFY(temporaryDir.rmdir(testDirName)); } void tst_QFileSystemWatcher::nonExistingFile() @@ -475,22 +504,33 @@ void tst_QFileSystemWatcher::nonExistingFile() void tst_QFileSystemWatcher::removeFileAndUnWatch() { - static const char * const filename = "foo.txt"; + QTemporaryDir temporaryDirectory(m_tempDirPattern); + QVERIFY(temporaryDirectory.isValid()); + + const QString filename = temporaryDirectory.path() + QStringLiteral("/foo.txt"); + QFileSystemWatcher watcher; { QFile testFile(filename); - testFile.open(QIODevice::WriteOnly); + QVERIFY2(testFile.open(QIODevice::WriteOnly), + qPrintable(QString::fromLatin1("Cannot open %1 for writing: %2").arg(filename, testFile.errorString()))); testFile.close(); } QVERIFY(watcher.addPath(filename)); QFile::remove(filename); - QVERIFY(watcher.removePath(filename)); + /* There are potential race conditions here; the watcher thread might remove the file from its list + * before the call to watcher.removePath(), which then fails. When that happens, the auto-signal + * notification to remove the file from the watcher's main list will not be delivered before the next + * event loop such that the call to watcher.addPath() fails since the file is still in the main list. */ + if (!watcher.removePath(filename)) + QSKIP("Skipping remaining test due to race condition."); { QFile testFile(filename); - testFile.open(QIODevice::WriteOnly); + QVERIFY2(testFile.open(QIODevice::WriteOnly), + qPrintable(QString::fromLatin1("Cannot open %1 for writing: %2").arg(filename, testFile.errorString()))); testFile.close(); } QVERIFY(watcher.addPath(filename)); diff --git a/tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp b/tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp index fa72083dcc7..796282d6d8c 100644 --- a/tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp +++ b/tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp @@ -92,6 +92,7 @@ void tst_QResourceEngine::checkStructure_data() << QString() << (QStringList() << "search_file.txt") << (QStringList() << QLatin1String("aliasdir") << QLatin1String("otherdir") + << QLatin1String("qt-project.org") << QLatin1String("runtime_resource") << QLatin1String("searchpath1") << QLatin1String("searchpath2") << QLatin1String("secondary_root") diff --git a/tests/auto/corelib/io/qsettings/qsettings.pro b/tests/auto/corelib/io/qsettings/qsettings.pro index ed3be0f23f0..9de476fe134 100644 --- a/tests/auto/corelib/io/qsettings/qsettings.pro +++ b/tests/auto/corelib/io/qsettings/qsettings.pro @@ -6,4 +6,4 @@ RESOURCES += qsettings.qrc win32-msvc*:LIBS += advapi32.lib -mac: CONFIG += insignificant_test # QTBUG-22745 +win32: CONFIG += insignificant_test # QTBUG-24145 diff --git a/tests/auto/corelib/io/qsettings/tst_qsettings.cpp b/tests/auto/corelib/io/qsettings/tst_qsettings.cpp index 0d6443c5ac9..df8e97ab9c9 100644 --- a/tests/auto/corelib/io/qsettings/tst_qsettings.cpp +++ b/tests/auto/corelib/io/qsettings/tst_qsettings.cpp @@ -580,6 +580,9 @@ void tst_QSettings::ctor() QCoreApplication::instance()->setOrganizationName(""); QCoreApplication::instance()->setApplicationName(""); QSettings settings; +#ifdef Q_OS_MAC + QEXPECT_FAIL("native", "Default settings on Mac are valid, despite organization domain, name, and app name being null", Continue); +#endif QCOMPARE(settings.status(), QSettings::AccessError); QCoreApplication::instance()->setOrganizationName("software.org"); QCoreApplication::instance()->setApplicationName("KillerAPP"); @@ -592,6 +595,9 @@ void tst_QSettings::ctor() } QSettings settings(format, QSettings::UserScope, "", ""); +#ifdef Q_OS_MAC + QEXPECT_FAIL("native", "Default settings on Mac are valid, despite organization domain, name, and app name being null", Continue); +#endif QCOMPARE(settings.status(), QSettings::AccessError); QSettings settings2(format, QSettings::UserScope, "software.org", "KillerAPP"); QCOMPARE(settings2.status(), QSettings::NoError); diff --git a/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp b/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp index 1e288e24186..ebfd640dfb4 100644 --- a/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp +++ b/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp @@ -229,6 +229,11 @@ void tst_qstandardpaths::testRuntimeDirectory() void tst_qstandardpaths::testCustomRuntimeDirectory() { +#if defined(Q_OS_UNIX) + if (::getuid() == 0) + QSKIP("Running this test as root doesn't make sense"); +#endif + #ifdef Q_XDG_PLATFORM qputenv("XDG_RUNTIME_DIR", QFile::encodeName("/tmp")); // It's very unlikely that /tmp is 0600 or that we can chmod it diff --git a/tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp b/tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp index 46d2fa2bde0..0b2e1e19028 100644 --- a/tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp +++ b/tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp @@ -50,6 +50,10 @@ #ifdef Q_OS_WIN # include #endif +#ifdef Q_OS_UNIX // for geteuid() +# include +# include +#endif class tst_QTemporaryDir : public QObject { diff --git a/tests/auto/corelib/io/qtextstream/tst_qtextstream.cpp b/tests/auto/corelib/io/qtextstream/tst_qtextstream.cpp index 01aecc2a216..37a1556cf9c 100644 --- a/tests/auto/corelib/io/qtextstream/tst_qtextstream.cpp +++ b/tests/auto/corelib/io/qtextstream/tst_qtextstream.cpp @@ -2755,7 +2755,7 @@ void tst_QTextStream::double_write_with_flags_data() QTest::newRow("inf uppercase") << qInf() << QString("INF") << (int)QTextStream::UppercaseDigits << 0; QTest::newRow("-inf uppercase") << -qInf() << QString("-INF") << (int)QTextStream::UppercaseDigits << 0; QTest::newRow("nan") << qQNaN() << QString("nan") << 0 << 0; - QTest::newRow("nan") << qQNaN() << QString("NAN") << (int)QTextStream::UppercaseDigits << 0; + QTest::newRow("NAN") << qQNaN() << QString("NAN") << (int)QTextStream::UppercaseDigits << 0; QTest::newRow("scientific") << 1.234567e+02 << QString("1.234567e+02") << 0 << (int)QTextStream::ScientificNotation; QTest::newRow("scientific2") << 1.234567e+02 << QString("1.234567e+02") << (int)QTextStream::UppercaseBase << (int)QTextStream::ScientificNotation; QTest::newRow("scientific uppercase") << 1.234567e+02 << QString("1.234567E+02") << (int)QTextStream::UppercaseDigits << (int)QTextStream::ScientificNotation; diff --git a/tests/auto/corelib/io/qurl/tst_qurl.cpp b/tests/auto/corelib/io/qurl/tst_qurl.cpp index 611847852f4..a74d817b8ae 100644 --- a/tests/auto/corelib/io/qurl/tst_qurl.cpp +++ b/tests/auto/corelib/io/qurl/tst_qurl.cpp @@ -350,6 +350,8 @@ void tst_QUrl::setUrl() QVERIFY(url.authority().isEmpty()); QVERIFY(url.fragment().isEmpty()); QCOMPARE(url.port(), -1); + QCOMPARE(url.toString(), QString::fromLatin1("file:///")); + QCOMPARE(url.toDisplayString(), QString::fromLatin1("file:///")); } { @@ -363,6 +365,8 @@ void tst_QUrl::setUrl() QCOMPARE(url.host(), QString::fromLatin1("www.foo.bar")); QCOMPARE(url.authority(), QString::fromLatin1("www.foo.bar:80")); QCOMPARE(url.port(), 80); + QCOMPARE(url.toString(), QString::fromLatin1("http://www.foo.bar:80")); + QCOMPARE(url.toDisplayString(), QString::fromLatin1("http://www.foo.bar:80")); QUrl url2("//www1.foo.bar"); QCOMPARE(url.resolved(url2).toString(), QString::fromLatin1("http://www1.foo.bar")); @@ -379,6 +383,8 @@ void tst_QUrl::setUrl() QCOMPARE(url.host(), QString::fromLatin1("56::56:56:56:127.0.0.1")); QCOMPARE(url.authority(), QString::fromLatin1("user:pass@[56::56:56:56:127.0.0.1]:99")); QCOMPARE(url.port(), 99); + QCOMPARE(url.url(), QString::fromLatin1("http://user:pass@[56::56:56:56:127.0.0.1]:99")); + QCOMPARE(url.toDisplayString(), QString::fromLatin1("http://user@[56::56:56:56:127.0.0.1]:99")); } { @@ -3114,8 +3120,8 @@ void tst_QUrl::fromUserInput_data() QTest::newRow("port-0") << "example.org:80" << portUrl; QTest::newRow("port-1") << "http://example.org:80" << portUrl; portUrl.setPath("path"); - QTest::newRow("port-1") << "example.org:80/path" << portUrl; - QTest::newRow("port-1") << "http://example.org:80/path" << portUrl; + QTest::newRow("port-2") << "example.org:80/path" << portUrl; + QTest::newRow("port-3") << "http://example.org:80/path" << portUrl; // mailto doesn't have a ://, but is valid QUrl mailto("ben@example.net"); diff --git a/tests/auto/corelib/itemmodels/qabstractitemmodel/tst_qabstractitemmodel.cpp b/tests/auto/corelib/itemmodels/qabstractitemmodel/tst_qabstractitemmodel.cpp index 2ca5df477bf..8d451dbff9a 100644 --- a/tests/auto/corelib/itemmodels/qabstractitemmodel/tst_qabstractitemmodel.cpp +++ b/tests/auto/corelib/itemmodels/qabstractitemmodel/tst_qabstractitemmodel.cpp @@ -1257,13 +1257,13 @@ void tst_QAbstractItemModel::testMoveToGrandParent_data() QTest::newRow("move09") << 8 << 8 << 8; // Moving to the row of my parent and its neighbours doesn't confuse things - QTest::newRow("move09") << 8 << 8 << 4; - QTest::newRow("move10") << 8 << 8 << 5; - QTest::newRow("move11") << 8 << 8 << 6; + QTest::newRow("move10") << 8 << 8 << 4; + QTest::newRow("move11") << 8 << 8 << 5; + QTest::newRow("move12") << 8 << 8 << 6; // Moving everything from one parent to another - QTest::newRow("move12") << 0 << 9 << 10; - QTest::newRow("move13") << 0 << 9 << 0; + QTest::newRow("move13") << 0 << 9 << 10; + QTest::newRow("move14") << 0 << 9 << 0; } void tst_QAbstractItemModel::testMoveToGrandParent() @@ -1397,14 +1397,14 @@ void tst_QAbstractItemModel::testMoveToSibling_data() QTest::newRow("move09") << 8 << 8 << 8; // Moving to the row of my target and its neighbours doesn't confuse things - QTest::newRow("move09") << 8 << 8 << 4; - QTest::newRow("move10") << 8 << 8 << 5; - QTest::newRow("move11") << 8 << 8 << 6; + QTest::newRow("move10") << 8 << 8 << 4; + QTest::newRow("move11") << 8 << 8 << 5; + QTest::newRow("move12") << 8 << 8 << 6; // Move such that the destination parent no longer valid after the move. // The destination parent is always QMI(5, 0), but after this move the // row count is 5, so (5, 0) (used internally in QAIM) no longer refers to a valid index. - QTest::newRow("move12") << 0 << 4 << 0; + QTest::newRow("move13") << 0 << 4 << 0; } void tst_QAbstractItemModel::testMoveToSibling() @@ -1541,12 +1541,12 @@ void tst_QAbstractItemModel::testMoveToUncle_data() QTest::newRow("move09") << 8 << 8 << 8; // Moving to the row of my parent and its neighbours doesn't confuse things - QTest::newRow("move09") << 8 << 8 << 4; - QTest::newRow("move10") << 8 << 8 << 5; - QTest::newRow("move11") << 8 << 8 << 6; + QTest::newRow("move10") << 8 << 8 << 4; + QTest::newRow("move11") << 8 << 8 << 5; + QTest::newRow("move12") << 8 << 8 << 6; // Moving everything from one parent to another - QTest::newRow("move12") << 0 << 9 << 10; + QTest::newRow("move13") << 0 << 9 << 10; } void tst_QAbstractItemModel::testMoveToUncle() @@ -1734,22 +1734,22 @@ void tst_QAbstractItemModel::testMoveWithinOwnRange_data() QTest::newRow("move07") << 0 << 5 << 4; QTest::newRow("move08") << 0 << 5 << 5; QTest::newRow("move09") << 0 << 5 << 6; - QTest::newRow("move08") << 3 << 5 << 5; - QTest::newRow("move08") << 3 << 5 << 6; - QTest::newRow("move09") << 4 << 5 << 5; - QTest::newRow("move10") << 4 << 5 << 6; - QTest::newRow("move11") << 5 << 5 << 5; - QTest::newRow("move12") << 5 << 5 << 6; - QTest::newRow("move13") << 5 << 9 << 9; - QTest::newRow("move14") << 5 << 9 << 10; - QTest::newRow("move15") << 6 << 9 << 9; - QTest::newRow("move16") << 6 << 9 << 10; - QTest::newRow("move17") << 7 << 9 << 9; - QTest::newRow("move18") << 7 << 9 << 10; - QTest::newRow("move19") << 8 << 9 << 9; - QTest::newRow("move20") << 8 << 9 << 10; - QTest::newRow("move21") << 9 << 9 << 9; - QTest::newRow("move22") << 0 << 9 << 10; + QTest::newRow("move10") << 3 << 5 << 5; + QTest::newRow("move11") << 3 << 5 << 6; + QTest::newRow("move12") << 4 << 5 << 5; + QTest::newRow("move13") << 4 << 5 << 6; + QTest::newRow("move14") << 5 << 5 << 5; + QTest::newRow("move15") << 5 << 5 << 6; + QTest::newRow("move16") << 5 << 9 << 9; + QTest::newRow("move17") << 5 << 9 << 10; + QTest::newRow("move18") << 6 << 9 << 9; + QTest::newRow("move19") << 6 << 9 << 10; + QTest::newRow("move20") << 7 << 9 << 9; + QTest::newRow("move21") << 7 << 9 << 10; + QTest::newRow("move22") << 8 << 9 << 9; + QTest::newRow("move23") << 8 << 9 << 10; + QTest::newRow("move24") << 9 << 9 << 9; + QTest::newRow("move25") << 0 << 9 << 10; } void tst_QAbstractItemModel::testMoveWithinOwnRange() diff --git a/tests/auto/corelib/itemmodels/qitemmodel/tst_qitemmodel.cpp b/tests/auto/corelib/itemmodels/qitemmodel/tst_qitemmodel.cpp index cbe7da11ad7..d27d685f37c 100644 --- a/tests/auto/corelib/itemmodels/qitemmodel/tst_qitemmodel.cpp +++ b/tests/auto/corelib/itemmodels/qitemmodel/tst_qitemmodel.cpp @@ -779,19 +779,19 @@ void tst_QItemModel::remove_data() makeTestRow(":none at the middle", MIDDLE, 0, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL); makeTestRow(":none at the end", END, 0, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL); - makeTestRow(":invalid start, valid count", -99, 0, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL); - makeTestRow(":invalid start, valid count", 9999, 0, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL); - makeTestRow(":invalid start, valid count", -99, 1, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL); - makeTestRow(":invalid start, valid count", 9999, 1, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL); - makeTestRow(":invalid start, valid count", -99, MANY, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL); - makeTestRow(":invalid start, valid count", 9999, MANY, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL); + makeTestRow(":invalid start, valid count 1", -99, 0, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL); + makeTestRow(":invalid start, valid count 2", 9999, 0, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL); + makeTestRow(":invalid start, valid count 3", -99, 1, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL); + makeTestRow(":invalid start, valid count 4", 9999, 1, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL); + makeTestRow(":invalid start, valid count 5", -99, MANY, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL); + makeTestRow(":invalid start, valid count 6", 9999, MANY, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL); - makeTestRow(":valid start, invalid count", START, -2, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL); - makeTestRow(":valid start, invalid count", MIDDLE, -2, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL); - makeTestRow(":valid start, invalid count", END, -2, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL); - makeTestRow(":valid start, invalid count", START, 9999, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL); - makeTestRow(":valid start, invalid count", MIDDLE, 9999, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL); - makeTestRow(":valid start, invalid count", END, 9999, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL); + makeTestRow(":valid start, invalid count 1", START, -2, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL); + makeTestRow(":valid start, invalid count 2", MIDDLE, -2, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL); + makeTestRow(":valid start, invalid count 3", END, -2, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL); + makeTestRow(":valid start, invalid count 4", START, 9999, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL); + makeTestRow(":valid start, invalid count 5", MIDDLE, 9999, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL); + makeTestRow(":valid start, invalid count 6", END, 9999, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL); // Recursive remove's might assert, haven't decided yet... //makeTestRow(":one at the start recursivly", START, DEFAULTCOUNT, 2, DNS, 2, DNS, RECURSIVE, START, DEFAULTCOUNT, FAIL); @@ -1126,16 +1126,16 @@ void tst_QItemModel::insert_data() makeTestRow(":none at the middle", MIDDLE, 0, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL); makeTestRow(":none at the end", END, 0, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL); - makeTestRow(":invalid start, valid count", -99, 0, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL); - makeTestRow(":invalid start, valid count", 9999, 0, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL); - makeTestRow(":invalid start, valid count", -99, 1, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL); - makeTestRow(":invalid start, valid count", 9999, 1, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL); - makeTestRow(":invalid start, valid count", -99, MANY, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL); - makeTestRow(":invalid start, valid count", 9999, MANY, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL); + makeTestRow(":invalid start, valid count 1", -99, 0, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL); + makeTestRow(":invalid start, valid count 2", 9999, 0, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL); + makeTestRow(":invalid start, valid count 3", -99, 1, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL); + makeTestRow(":invalid start, valid count 4", 9999, 1, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL); + makeTestRow(":invalid start, valid count 5", -99, MANY, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL); + makeTestRow(":invalid start, valid count 6", 9999, MANY, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL); - makeTestRow(":valid start, invalid count", START, -2, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL); - makeTestRow(":valid start, invalid count", MIDDLE, -2, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL); - makeTestRow(":valid start, invalid count", END, -2, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL); + makeTestRow(":valid start, invalid count 1", START, -2, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL); + makeTestRow(":valid start, invalid count 2", MIDDLE, -2, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL); + makeTestRow(":valid start, invalid count 3", END, -2, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL); // Recursive insert's might assert, haven't decided yet... //makeTestRow(":one at the start recursivly", START, DEFAULTCOUNT, 2, DNS, 2, DNS, RECURSIVE, START, DEFAULTCOUNT, FAIL); diff --git a/tests/auto/corelib/json/json.pro b/tests/auto/corelib/json/json.pro index 5158b7337ab..7978a742783 100644 --- a/tests/auto/corelib/json/json.pro +++ b/tests/auto/corelib/json/json.pro @@ -3,6 +3,6 @@ QT = core testlib CONFIG -= app_bundle CONFIG += testcase -DEFINES += SRCDIR=\\\"$$PWD/\\\" +TESTDATA += test.json test.bjson test3.json test2.json SOURCES += tst_qtjson.cpp diff --git a/tests/auto/corelib/json/tst_qtjson.cpp b/tests/auto/corelib/json/tst_qtjson.cpp index e35f645ef61..2ac0574ec56 100644 --- a/tests/auto/corelib/json/tst_qtjson.cpp +++ b/tests/auto/corelib/json/tst_qtjson.cpp @@ -92,6 +92,7 @@ private Q_SLOTS: void toJson(); void fromJson(); + void fromJsonErrors(); void fromBinary(); void toAndFromBinary_data(); void toAndFromBinary(); @@ -111,6 +112,8 @@ private Q_SLOTS: void testCompaction(); void testDebugStream(); void testCompactionError(); +private: + QString testDataDir; }; TestQtJson::TestQtJson(QObject *parent) : QObject(parent) @@ -119,6 +122,9 @@ TestQtJson::TestQtJson(QObject *parent) : QObject(parent) void TestQtJson::initTestCase() { + testDataDir = QFileInfo(QFINDTESTDATA("test.json")).absolutePath(); + if (testDataDir.isEmpty()) + testDataDir = QCoreApplication::applicationDirPath(); } void TestQtJson::cleanupTestCase() @@ -1075,9 +1081,173 @@ void TestQtJson::fromJson() } } +void TestQtJson::fromJsonErrors() +{ + { + QJsonParseError error; + QByteArray json = "{\n \n\n"; + QJsonDocument doc = QJsonDocument::fromJson(json, &error); + QVERIFY(doc.isEmpty()); + QCOMPARE(error.error, QJsonParseError::UnterminatedObject); + QCOMPARE(error.offset, 8); + } + { + QJsonParseError error; + QByteArray json = "{\n \"key\" 10\n"; + QJsonDocument doc = QJsonDocument::fromJson(json, &error); + QVERIFY(doc.isEmpty()); + QCOMPARE(error.error, QJsonParseError::MissingNameSeparator); + QCOMPARE(error.offset, 13); + } + { + QJsonParseError error; + QByteArray json = "[\n \n\n"; + QJsonDocument doc = QJsonDocument::fromJson(json, &error); + QVERIFY(doc.isEmpty()); + QCOMPARE(error.error, QJsonParseError::UnterminatedArray); + QCOMPARE(error.offset, 8); + } + { + QJsonParseError error; + QByteArray json = "[\n 1, true\n\n"; + QJsonDocument doc = QJsonDocument::fromJson(json, &error); + QVERIFY(doc.isEmpty()); + QCOMPARE(error.error, QJsonParseError::UnterminatedArray); + QCOMPARE(error.offset, 14); + } + { + QJsonParseError error; + QByteArray json = "[\n 1 true\n\n"; + QJsonDocument doc = QJsonDocument::fromJson(json, &error); + QVERIFY(doc.isEmpty()); + QCOMPARE(error.error, QJsonParseError::MissingValueSeparator); + QCOMPARE(error.offset, 7); + } + { + QJsonParseError error; + QByteArray json = "[\n nul"; + QJsonDocument doc = QJsonDocument::fromJson(json, &error); + QVERIFY(doc.isEmpty()); + QCOMPARE(error.error, QJsonParseError::IllegalValue); + QCOMPARE(error.offset, 7); + } + { + QJsonParseError error; + QByteArray json = "[\n nulzz"; + QJsonDocument doc = QJsonDocument::fromJson(json, &error); + QVERIFY(doc.isEmpty()); + QCOMPARE(error.error, QJsonParseError::IllegalValue); + QCOMPARE(error.offset, 10); + } + { + QJsonParseError error; + QByteArray json = "[\n tru"; + QJsonDocument doc = QJsonDocument::fromJson(json, &error); + QVERIFY(doc.isEmpty()); + QCOMPARE(error.error, QJsonParseError::IllegalValue); + QCOMPARE(error.offset, 7); + } + { + QJsonParseError error; + QByteArray json = "[\n trud]"; + QJsonDocument doc = QJsonDocument::fromJson(json, &error); + QVERIFY(doc.isEmpty()); + QCOMPARE(error.error, QJsonParseError::IllegalValue); + QCOMPARE(error.offset, 10); + } + { + QJsonParseError error; + QByteArray json = "[\n fal"; + QJsonDocument doc = QJsonDocument::fromJson(json, &error); + QVERIFY(doc.isEmpty()); + QCOMPARE(error.error, QJsonParseError::IllegalValue); + QCOMPARE(error.offset, 7); + } + { + QJsonParseError error; + QByteArray json = "[\n falsd]"; + QJsonDocument doc = QJsonDocument::fromJson(json, &error); + QVERIFY(doc.isEmpty()); + QCOMPARE(error.error, QJsonParseError::IllegalValue); + QCOMPARE(error.offset, 11); + } + { + QJsonParseError error; + QByteArray json = "[\n 11111"; + QJsonDocument doc = QJsonDocument::fromJson(json, &error); + QVERIFY(doc.isEmpty()); + QCOMPARE(error.error, QJsonParseError::EndOfNumber); + QCOMPARE(error.offset, 11); + } + { + QJsonParseError error; + QByteArray json = "[\n -1E10000]"; + QJsonDocument doc = QJsonDocument::fromJson(json, &error); + QVERIFY(doc.isEmpty()); + QCOMPARE(error.error, QJsonParseError::IllegalNumber); + QCOMPARE(error.offset, 14); + } + { + QJsonParseError error; + QByteArray json = "[\n -1e-10000]"; + QJsonDocument doc = QJsonDocument::fromJson(json, &error); + QVERIFY(doc.isEmpty()); + QCOMPARE(error.error, QJsonParseError::IllegalNumber); + QCOMPARE(error.offset, 15); + } + { + QJsonParseError error; + QByteArray json = "[\n \"\\u12\"]"; + QJsonDocument doc = QJsonDocument::fromJson(json, &error); + QVERIFY(doc.isEmpty()); + QCOMPARE(error.error, QJsonParseError::StringEscapeSequence); + QCOMPARE(error.offset, 11); + } + { + QJsonParseError error; + QByteArray json = "[\n \"foo\uffffbar\"]"; + QJsonDocument doc = QJsonDocument::fromJson(json, &error); + QVERIFY(doc.isEmpty()); + QCOMPARE(error.error, QJsonParseError::StringUTF8Scan); + QCOMPARE(error.offset, 13); + } + { + QJsonParseError error; + QByteArray json = "[\n \""; + QJsonDocument doc = QJsonDocument::fromJson(json, &error); + QVERIFY(doc.isEmpty()); + QCOMPARE(error.error, QJsonParseError::EndOfString); + QCOMPARE(error.offset, 8); + } + { + QJsonParseError error; + QByteArray json = "[\n \"cЂa\\u12\"]"; + QJsonDocument doc = QJsonDocument::fromJson(json, &error); + QVERIFY(doc.isEmpty()); + QCOMPARE(error.error, QJsonParseError::StringEscapeSequence); + QCOMPARE(error.offset, 15); + } + { + QJsonParseError error; + QByteArray json = "[\n \"cЂa\uffffbar\"]"; + QJsonDocument doc = QJsonDocument::fromJson(json, &error); + QVERIFY(doc.isEmpty()); + QCOMPARE(error.error, QJsonParseError::StringUTF8Scan); + QCOMPARE(error.offset, 14); + } + { + QJsonParseError error; + QByteArray json = "[\n \"cЂa ]"; + QJsonDocument doc = QJsonDocument::fromJson(json, &error); + QVERIFY(doc.isEmpty()); + QCOMPARE(error.error, QJsonParseError::EndOfString); + QCOMPARE(error.offset, 14); + } +} + void TestQtJson::fromBinary() { - QFile file(QLatin1String(SRCDIR "test.json")); + QFile file(testDataDir + "/test.json"); file.open(QFile::ReadOnly); QByteArray testJson = file.readAll(); @@ -1086,7 +1256,7 @@ void TestQtJson::fromBinary() QVERIFY(!outdoc.isNull()); QVERIFY(doc == outdoc); - QFile bfile(QLatin1String(SRCDIR "test.bjson")); + QFile bfile(testDataDir + "/test.bjson"); bfile.open(QFile::ReadOnly); QByteArray binary = bfile.readAll(); @@ -1099,8 +1269,8 @@ void TestQtJson::fromBinary() void TestQtJson::toAndFromBinary_data() { QTest::addColumn("filename"); - QTest::newRow("test.json") << QString::fromLatin1(SRCDIR "test.json"); - QTest::newRow("test2.json") << QString::fromLatin1(SRCDIR "test2.json"); + QTest::newRow("test.json") << (testDataDir + "/test.json"); + QTest::newRow("test2.json") << (testDataDir + "/test2.json"); } void TestQtJson::toAndFromBinary() @@ -1279,7 +1449,7 @@ void TestQtJson::parseDuplicateKeys() void TestQtJson::testParser() { - QFile file(QLatin1String(SRCDIR "test.json")); + QFile file(testDataDir + "/test.json"); file.open(QFile::ReadOnly); QByteArray testJson = file.readAll(); @@ -1364,7 +1534,7 @@ void TestQtJson::compactObject() void TestQtJson::validation() { // this basically tests that we don't crash on corrupt data - QFile file(QLatin1String(SRCDIR "test.json")); + QFile file(testDataDir + "/test.json"); QVERIFY(file.open(QFile::ReadOnly)); QByteArray testJson = file.readAll(); QVERIFY(!testJson.isEmpty()); @@ -1385,7 +1555,7 @@ void TestQtJson::validation() } - QFile file2(QLatin1String(SRCDIR "test3.json")); + QFile file2(testDataDir + "/test3.json"); file2.open(QFile::ReadOnly); testJson = file2.readAll(); QVERIFY(!testJson.isEmpty()); diff --git a/tests/auto/corelib/kernel/kernel.pro b/tests/auto/corelib/kernel/kernel.pro index 3c697f4149b..7ec01d4a360 100644 --- a/tests/auto/corelib/kernel/kernel.pro +++ b/tests/auto/corelib/kernel/kernel.pro @@ -1,10 +1,12 @@ TEMPLATE=subdirs SUBDIRS=\ qcoreapplication \ + qeventdispatcher \ qeventloop \ qmath \ qmetaobject \ qmetaobjectbuilder \ + qmetamethod \ qmetaproperty \ qmetatype \ qmimedata \ diff --git a/tests/auto/corelib/kernel/qcoreapplication/tst_qcoreapplication.cpp b/tests/auto/corelib/kernel/qcoreapplication/tst_qcoreapplication.cpp index 97c9757107e..572c2fdfd10 100644 --- a/tests/auto/corelib/kernel/qcoreapplication/tst_qcoreapplication.cpp +++ b/tests/auto/corelib/kernel/qcoreapplication/tst_qcoreapplication.cpp @@ -126,6 +126,9 @@ void tst_QCoreApplication::qAppName() void tst_QCoreApplication::argc() { +#ifdef Q_OS_WIN + QSKIP("QCoreApplication::arguments() always parses arguments from actual command line in Windows, making this test invalid."); +#endif { int argc = 1; char *argv[] = { "tst_qcoreapplication" }; diff --git a/tests/auto/corelib/kernel/qeventdispatcher/qeventdispatcher.pro b/tests/auto/corelib/kernel/qeventdispatcher/qeventdispatcher.pro new file mode 100644 index 00000000000..ff048d0429d --- /dev/null +++ b/tests/auto/corelib/kernel/qeventdispatcher/qeventdispatcher.pro @@ -0,0 +1,4 @@ +CONFIG += testcase +TARGET = tst_qeventdispatcher +QT = core testlib +SOURCES += tst_qeventdispatcher.cpp diff --git a/tests/auto/corelib/kernel/qeventdispatcher/tst_qeventdispatcher.cpp b/tests/auto/corelib/kernel/qeventdispatcher/tst_qeventdispatcher.cpp new file mode 100644 index 00000000000..bc6d6bfaddf --- /dev/null +++ b/tests/auto/corelib/kernel/qeventdispatcher/tst_qeventdispatcher.cpp @@ -0,0 +1,213 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifdef QT_GUI_LIB +# include +#else +# include +#endif +#include + +enum { + PreciseTimerInterval = 10, + CoarseTimerInterval = 200, + VeryCoarseTimerInterval = 1000 +}; + +class tst_QEventDispatcher : public QObject +{ + Q_OBJECT + + QAbstractEventDispatcher *eventDispatcher; + int receivedEventType; + int timerIdFromEvent; + +protected: + bool event(QEvent *e); + +public: + inline tst_QEventDispatcher() + : QObject(), + eventDispatcher(QAbstractEventDispatcher::instance(thread())), + receivedEventType(-1), + timerIdFromEvent(-1) + { } + +private slots: + void initTestCase(); + void registerTimer(); + /* void registerSocketNotifier(); */ // Not implemented here, see tst_QSocketNotifier instead + /* void registerEventNotifiier(); */ // Not implemented here, see tst_QWinEventNotifier instead + void sendPostedEvents_data(); + void sendPostedEvents(); +}; + +bool tst_QEventDispatcher::event(QEvent *e) +{ + switch (receivedEventType = e->type()) { + case QEvent::Timer: + { + timerIdFromEvent = static_cast(e)->timerId(); + return true; + } + default: + break; + } + return QObject::event(e); +} + +// drain the system event queue after the test starts to avoid destabilizing the test functions +void tst_QEventDispatcher::initTestCase() +{ + QElapsedTimer elapsedTimer; + elapsedTimer.start(); + while (!elapsedTimer.hasExpired(CoarseTimerInterval) && eventDispatcher->processEvents(QEventLoop::AllEvents)) { + ; + } +} + +// test that the eventDispatcher's timer implementation is complete and working +void tst_QEventDispatcher::registerTimer() +{ +#define FIND_TIMERS() \ + do { \ + foundPrecise = false; \ + foundCoarse = false; \ + foundVeryCoarse = false; \ + for (int i = 0; i < registeredTimers.count(); ++i) { \ + const QAbstractEventDispatcher::TimerInfo &timerInfo = registeredTimers.at(i); \ + if (timerInfo.timerId == preciseTimerId) { \ + QCOMPARE(timerInfo.interval, int(PreciseTimerInterval)); \ + QCOMPARE(timerInfo.timerType, Qt::PreciseTimer); \ + foundPrecise = true; \ + } else if (timerInfo.timerId == coarseTimerId) { \ + QCOMPARE(timerInfo.interval, int(CoarseTimerInterval)); \ + QCOMPARE(timerInfo.timerType, Qt::CoarseTimer); \ + foundCoarse = true; \ + } else if (timerInfo.timerId == veryCoarseTimerId) { \ + QCOMPARE(timerInfo.interval, int(VeryCoarseTimerInterval)); \ + QCOMPARE(timerInfo.timerType, Qt::VeryCoarseTimer); \ + foundVeryCoarse = true; \ + } \ + } \ + } while (0) + + // start 3 timers, each with the different timer types and different intervals + int preciseTimerId = eventDispatcher->registerTimer(PreciseTimerInterval, Qt::PreciseTimer, this); + int coarseTimerId = eventDispatcher->registerTimer(CoarseTimerInterval, Qt::CoarseTimer, this); + int veryCoarseTimerId = eventDispatcher->registerTimer(VeryCoarseTimerInterval, Qt::VeryCoarseTimer, this); + QVERIFY(preciseTimerId > 0); + QVERIFY(coarseTimerId > 0); + QVERIFY(veryCoarseTimerId > 0); + + // check that all 3 are present in the eventDispatcher's registeredTimer() list + QList registeredTimers = eventDispatcher->registeredTimers(this); + QCOMPARE(registeredTimers.count(), 3); + bool foundPrecise, foundCoarse, foundVeryCoarse; + FIND_TIMERS(); + QVERIFY(foundPrecise && foundCoarse && foundVeryCoarse); + + // process events, waiting for the next event... this should only fire the precise timer + receivedEventType = -1; + timerIdFromEvent = -1; + QVERIFY(eventDispatcher->processEvents(QEventLoop::WaitForMoreEvents)); + QCOMPARE(receivedEventType, int(QEvent::Timer)); + QCOMPARE(timerIdFromEvent, preciseTimerId); + // now unregister it and make sure it's gone + eventDispatcher->unregisterTimer(preciseTimerId); + registeredTimers = eventDispatcher->registeredTimers(this); + QCOMPARE(registeredTimers.count(), 2); + FIND_TIMERS(); + QVERIFY(!foundPrecise && foundCoarse && foundVeryCoarse); + + // do the same again for the coarse timer + receivedEventType = -1; + timerIdFromEvent = -1; + QVERIFY(eventDispatcher->processEvents(QEventLoop::WaitForMoreEvents)); + QCOMPARE(receivedEventType, int(QEvent::Timer)); + QCOMPARE(timerIdFromEvent, coarseTimerId); + // now unregister it and make sure it's gone + eventDispatcher->unregisterTimer(coarseTimerId); + registeredTimers = eventDispatcher->registeredTimers(this); + QCOMPARE(registeredTimers.count(), 1); + FIND_TIMERS(); + QVERIFY(!foundPrecise && !foundCoarse && foundVeryCoarse); + + // not going to wait for the VeryCoarseTimer, would take too long, just unregister it + eventDispatcher->unregisterTimers(this); + registeredTimers = eventDispatcher->registeredTimers(this); + QVERIFY(registeredTimers.isEmpty()); + +#undef FIND_TIMERS +} + +void tst_QEventDispatcher::sendPostedEvents_data() +{ + QTest::addColumn("processEventsFlagsInt"); + + QTest::newRow("WaitForMoreEvents") << int(QEventLoop::WaitForMoreEvents); + QTest::newRow("AllEvents") << int(QEventLoop::AllEvents); +} + +// test that the eventDispatcher sends posted events correctly +void tst_QEventDispatcher::sendPostedEvents() +{ + QFETCH(int, processEventsFlagsInt); + QEventLoop::ProcessEventsFlags processEventsFlags = QEventLoop::ProcessEventsFlags(processEventsFlagsInt); + + QElapsedTimer elapsedTimer; + elapsedTimer.start(); + while (!elapsedTimer.hasExpired(200)) { + receivedEventType = -1; + QCoreApplication::postEvent(this, new QEvent(QEvent::User)); + + // event shouldn't be delivered as a result of posting + QCOMPARE(receivedEventType, -1); + + // since there is a pending posted event, this should not actually block, it should send the posted event and return + QVERIFY(eventDispatcher->processEvents(processEventsFlags)); + // event shouldn't be delivered as a result of posting + QCOMPARE(receivedEventType, int(QEvent::User)); + } +} + +QTEST_MAIN(tst_QEventDispatcher) +#include "tst_qeventdispatcher.moc" diff --git a/tests/auto/corelib/kernel/qmetamethod/qmetamethod.pro b/tests/auto/corelib/kernel/qmetamethod/qmetamethod.pro new file mode 100644 index 00000000000..f9097427487 --- /dev/null +++ b/tests/auto/corelib/kernel/qmetamethod/qmetamethod.pro @@ -0,0 +1,5 @@ +CONFIG += testcase +TARGET = tst_qmetamethod +QT = core testlib +SOURCES = tst_qmetamethod.cpp +macx:CONFIG -= app_bundle diff --git a/tests/auto/corelib/kernel/qmetamethod/tst_qmetamethod.cpp b/tests/auto/corelib/kernel/qmetamethod/tst_qmetamethod.cpp new file mode 100644 index 00000000000..1651d007388 --- /dev/null +++ b/tests/auto/corelib/kernel/qmetamethod/tst_qmetamethod.cpp @@ -0,0 +1,630 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +#include + +#include +#include + +class tst_QMetaMethod : public QObject +{ + Q_OBJECT + +private slots: + void method_data(); + void method(); + + void invalidMethod(); +}; + +struct CustomType { }; +Q_DECLARE_METATYPE(CustomType) + +struct CustomUnregisteredType { }; + +Q_DECLARE_METATYPE(QMetaMethod::Access) +Q_DECLARE_METATYPE(QMetaMethod::MethodType) + +class MethodTestObject : public QObject +{ + Q_OBJECT +public: + Q_INVOKABLE MethodTestObject(); + Q_INVOKABLE MethodTestObject(int constructorIntArg); + Q_INVOKABLE MethodTestObject(qreal constructorQRealArg); + Q_INVOKABLE MethodTestObject(const QString &constructorQStringArg); + Q_INVOKABLE MethodTestObject(CustomType constructorCustomTypeArg); + Q_INVOKABLE MethodTestObject(CustomUnregisteredType constructorCustomUnregisteredTypeArg); + Q_INVOKABLE MethodTestObject(bool boolArg, int intArg, uint uintArg, + qlonglong longlongArg, qulonglong ulonglongArg, + double doubleArg, long longArg, short shortArg, + char charArg, ulong ulongArg, ushort ushortArg, + uchar ucharArg, float floatArg); + Q_INVOKABLE MethodTestObject(bool, int); + + Q_INVOKABLE void voidInvokable(); + Q_INVOKABLE void voidInvokableInt(int voidInvokableIntArg); + Q_INVOKABLE void voidInvokableQReal(qreal voidInvokableQRealArg); + Q_INVOKABLE void voidInvokableQString(const QString &voidInvokableQStringArg); + Q_INVOKABLE void voidInvokableCustomType(CustomType voidInvokableCustomTypeArg); + Q_INVOKABLE void voidInvokableCustomUnregisteredType(CustomUnregisteredType voidInvokableCustomUnregisteredTypeArg); + Q_INVOKABLE bool boolInvokable(); + Q_INVOKABLE qreal qrealInvokable(); + Q_INVOKABLE QString qstringInvokable(); + Q_INVOKABLE CustomType customTypeInvokable(); + Q_INVOKABLE CustomUnregisteredType customUnregisteredTypeInvokable(); + Q_INVOKABLE QVariant qvariantInvokableBoolIntUIntLonglongULonglongDoubleLongShortCharUlongUshortUcharFloat( + bool boolArg, int intArg, uint uintArg, qlonglong longlongArg, qulonglong ulonglongArg, double doubleArg, + long longArg, short shortArg, char charArg, ulong ulongArg, ushort ushortArg, uchar ucharArg, float floatArg); + Q_INVOKABLE void voidInvokableNoParameterNames(bool, int); +public slots: + void voidSlot(); + void voidSlotInt(int voidSlotIntArg); + void voidSlotQReal(qreal voidSlotQRealArg); + void voidSlotQString(const QString &voidSlotQStringArg); + void voidSlotCustomType(CustomType voidSlotCustomTypeArg); + void voidSlotCustomUnregisteredType(CustomUnregisteredType voidSlotCustomUnregisteredTypeArg); + bool boolSlot(); + qreal qrealSlot(); + QString qstringSlot(); + CustomType customTypeSlot(); + CustomUnregisteredType customUnregisteredTypeSlot(); + QVariant qvariantSlotBoolIntUIntLonglongULonglongDoubleLongShortCharUlongUshortUcharFloat( + bool boolArg, int intArg, uint uintArg, qlonglong longlongArg, qulonglong ulonglongArg, double doubleArg, + long longArg, short shortArg, char charArg, ulong ulongArg, ushort ushortArg, uchar ucharArg, float floatArg); + void voidSlotNoParameterNames(bool, int); +signals: + void voidSignal(); + void voidSignalInt(int voidSignalIntArg); + void voidSignalQReal(qreal voidSignalQRealArg); + void voidSignalQString(const QString &voidSignalQStringArg); + void voidSignalCustomType(CustomType voidSignalCustomTypeArg); + void voidSignalCustomUnregisteredType(CustomUnregisteredType voidSignalCustomUnregisteredTypeArg); + bool boolSignal(); + qreal qrealSignal(); + QString qstringSignal(); + CustomType customTypeSignal(); + CustomUnregisteredType customUnregisteredTypeSignal(); + QVariant qvariantSignalBoolIntUIntLonglongULonglongDoubleLongShortCharUlongUshortUcharFloat( + bool boolArg, int intArg, uint uintArg, qlonglong longlongArg, qulonglong ulonglongArg, double doubleArg, + long longArg, short shortArg, char charArg, ulong ulongArg, ushort ushortArg, uchar ucharArg, float floatArg); + void voidSignalNoParameterNames(bool, int); +}; + +MethodTestObject::MethodTestObject() {} +MethodTestObject::MethodTestObject(int) {} +MethodTestObject::MethodTestObject(qreal) {} +MethodTestObject::MethodTestObject(const QString &) {} +MethodTestObject::MethodTestObject(CustomType) {} +MethodTestObject::MethodTestObject(CustomUnregisteredType) {} +MethodTestObject::MethodTestObject(bool, int, uint, qlonglong, qulonglong, + double, long, short, char, ulong, ushort, + uchar, float) {} +MethodTestObject::MethodTestObject(bool, int) {} + +void MethodTestObject::voidInvokable() {} +void MethodTestObject::voidInvokableInt(int) {} +void MethodTestObject::voidInvokableQReal(qreal) {} +void MethodTestObject::voidInvokableQString(const QString &) {} +void MethodTestObject::voidInvokableCustomType(CustomType) {} +void MethodTestObject::voidInvokableCustomUnregisteredType(CustomUnregisteredType) {} +bool MethodTestObject::boolInvokable() { return true; } +qreal MethodTestObject::qrealInvokable() { return 1.0; } +QString MethodTestObject::qstringInvokable() { return QString(); } +CustomType MethodTestObject::customTypeInvokable() { return CustomType(); } +CustomUnregisteredType MethodTestObject::customUnregisteredTypeInvokable() +{ + return CustomUnregisteredType(); +} +QVariant MethodTestObject::qvariantInvokableBoolIntUIntLonglongULonglongDoubleLongShortCharUlongUshortUcharFloat( + bool, int, uint, qlonglong, qulonglong, double, long, short, char, ulong, ushort, uchar, float) +{ + return QVariant(); +} +void MethodTestObject::voidInvokableNoParameterNames(bool, int) {} + +void MethodTestObject::voidSlot() {} +void MethodTestObject::voidSlotInt(int) {} +void MethodTestObject::voidSlotQReal(qreal) {} +void MethodTestObject::voidSlotQString(const QString &) {} +void MethodTestObject::voidSlotCustomType(CustomType) {} +void MethodTestObject::voidSlotCustomUnregisteredType(CustomUnregisteredType) {} +bool MethodTestObject::boolSlot() { return true; } +qreal MethodTestObject::qrealSlot() { return 1.0; } +QString MethodTestObject::qstringSlot() { return QString(); } +CustomType MethodTestObject::customTypeSlot() { return CustomType(); } +CustomUnregisteredType MethodTestObject::customUnregisteredTypeSlot() +{ + return CustomUnregisteredType(); +} +QVariant MethodTestObject::qvariantSlotBoolIntUIntLonglongULonglongDoubleLongShortCharUlongUshortUcharFloat( + bool, int, uint, qlonglong, qulonglong, double, long, short, char, ulong, ushort, uchar, float) +{ + return QVariant(); +} +void MethodTestObject::voidSlotNoParameterNames(bool, int) {} + +void tst_QMetaMethod::method_data() +{ + QTest::addColumn("signature"); + QTest::addColumn("returnType"); + QTest::addColumn("returnTypeName"); + QTest::addColumn >("parameterTypes"); + QTest::addColumn >("parameterTypeNames"); + QTest::addColumn >("parameterNames"); + QTest::addColumn("access"); + QTest::addColumn("methodType"); + + QTest::newRow("voidSignal") + << QByteArray("voidSignal()") + << int(QMetaType::Void) << QByteArray("") + << (QList()) + << (QList()) + << (QList()) + << QMetaMethod::Protected + << QMetaMethod::Signal; + + QTest::newRow("voidInvokable") + << QByteArray("voidInvokable()") + << int(QMetaType::Void) << QByteArray("") + << (QList()) + << (QList()) + << (QList()) + << QMetaMethod::Public + << QMetaMethod::Method; + + QTest::newRow("voidSlot") + << QByteArray("voidSlot()") + << int(QMetaType::Void) << QByteArray("") + << (QList()) + << (QList()) + << (QList()) + << QMetaMethod::Public + << QMetaMethod::Slot; + + QTest::newRow("MethodTestObject()") + << QByteArray("MethodTestObject()") + << int(QMetaType::Void) << QByteArray("") + << (QList()) + << (QList()) + << (QList()) + << QMetaMethod::Public + << QMetaMethod::Constructor; + + QTest::newRow("voidSignalInt") + << QByteArray("voidSignalInt(int)") + << int(QMetaType::Void) << QByteArray("") + << (QList() << int(QMetaType::Int)) + << (QList() << QByteArray("int")) + << (QList() << QByteArray("voidSignalIntArg")) + << QMetaMethod::Protected + << QMetaMethod::Signal; + + QTest::newRow("voidInvokableInt") + << QByteArray("voidInvokableInt(int)") + << int(QMetaType::Void) << QByteArray("") + << (QList() << int(QMetaType::Int)) + << (QList() << QByteArray("int")) + << (QList() << QByteArray("voidInvokableIntArg")) + << QMetaMethod::Public + << QMetaMethod::Method; + + QTest::newRow("voidSlotInt") + << QByteArray("voidSlotInt(int)") + << int(QMetaType::Void) << QByteArray("") + << (QList() << int(QMetaType::Int)) + << (QList() << QByteArray("int")) + << (QList() << QByteArray("voidSlotIntArg")) + << QMetaMethod::Public + << QMetaMethod::Slot; + + QTest::newRow("MethodTestObject(int)") + << QByteArray("MethodTestObject(int)") + << int(QMetaType::Void) << QByteArray("") + << (QList() << int(QMetaType::Int)) + << (QList() << QByteArray("int")) + << (QList() << QByteArray("constructorIntArg")) + << QMetaMethod::Public + << QMetaMethod::Constructor; + + QTest::newRow("voidSignalQReal") + << QByteArray("voidSignalQReal(qreal)") + << int(QMetaType::Void) << QByteArray("") + << (QList() << qMetaTypeId()) + << (QList() << QByteArray("qreal")) + << (QList() << QByteArray("voidSignalQRealArg")) + << QMetaMethod::Protected + << QMetaMethod::Signal; + + QTest::newRow("voidInvokableQReal") + << QByteArray("voidInvokableQReal(qreal)") + << int(QMetaType::Void) << QByteArray("") + << (QList() << qMetaTypeId()) + << (QList() << QByteArray("qreal")) + << (QList() << QByteArray("voidInvokableQRealArg")) + << QMetaMethod::Public + << QMetaMethod::Method; + + QTest::newRow("voidSlotQReal") + << QByteArray("voidSlotQReal(qreal)") + << int(QMetaType::Void) << QByteArray("") + << (QList() << qMetaTypeId()) + << (QList() << QByteArray("qreal")) + << (QList() << QByteArray("voidSlotQRealArg")) + << QMetaMethod::Public + << QMetaMethod::Slot; + + QTest::newRow("MethodTestObject(qreal)") + << QByteArray("MethodTestObject(qreal)") + << int(QMetaType::Void) << QByteArray("") + << (QList() << qMetaTypeId()) + << (QList() << QByteArray("qreal")) + << (QList() << QByteArray("constructorQRealArg")) + << QMetaMethod::Public + << QMetaMethod::Constructor; + + QTest::newRow("voidSignalQString") + << QByteArray("voidSignalQString(QString)") + << int(QMetaType::Void) << QByteArray("") + << (QList() << int(QMetaType::QString)) + << (QList() << QByteArray("QString")) + << (QList() << QByteArray("voidSignalQStringArg")) + << QMetaMethod::Protected + << QMetaMethod::Signal; + + QTest::newRow("voidInvokableQString") + << QByteArray("voidInvokableQString(QString)") + << int(QMetaType::Void) << QByteArray("") + << (QList() << int(QMetaType::QString)) + << (QList() << QByteArray("QString")) + << (QList() << QByteArray("voidInvokableQStringArg")) + << QMetaMethod::Public + << QMetaMethod::Method; + + QTest::newRow("voidSlotQString") + << QByteArray("voidSlotQString(QString)") + << int(QMetaType::Void) << QByteArray("") + << (QList() << int(QMetaType::QString)) + << (QList() << QByteArray("QString")) + << (QList() << QByteArray("voidSlotQStringArg")) + << QMetaMethod::Public + << QMetaMethod::Slot; + + QTest::newRow("MethodTestObject(QString)") + << QByteArray("MethodTestObject(QString)") + << int(QMetaType::Void) << QByteArray("") + << (QList() << int(QMetaType::QString)) + << (QList() << QByteArray("QString")) + << (QList() << QByteArray("constructorQStringArg")) + << QMetaMethod::Public + << QMetaMethod::Constructor; + + QTest::newRow("voidSignalCustomType") + << QByteArray("voidSignalCustomType(CustomType)") + << int(QMetaType::Void) << QByteArray("") + << (QList() << qMetaTypeId()) + << (QList() << QByteArray("CustomType")) + << (QList() << QByteArray("voidSignalCustomTypeArg")) + << QMetaMethod::Protected + << QMetaMethod::Signal; + + QTest::newRow("voidInvokableCustomType") + << QByteArray("voidInvokableCustomType(CustomType)") + << int(QMetaType::Void) << QByteArray("") + << (QList() << qMetaTypeId()) + << (QList() << QByteArray("CustomType")) + << (QList() << QByteArray("voidInvokableCustomTypeArg")) + << QMetaMethod::Public + << QMetaMethod::Method; + + QTest::newRow("voidSlotCustomType") + << QByteArray("voidSlotCustomType(CustomType)") + << int(QMetaType::Void) << QByteArray("") + << (QList() << qMetaTypeId()) + << (QList() << QByteArray("CustomType")) + << (QList() << QByteArray("voidSlotCustomTypeArg")) + << QMetaMethod::Public + << QMetaMethod::Slot; + + QTest::newRow("MethodTestObject(CustomType)") + << QByteArray("MethodTestObject(CustomType)") + << int(QMetaType::Void) << QByteArray("") + << (QList() << qMetaTypeId()) + << (QList() << QByteArray("CustomType")) + << (QList() << QByteArray("constructorCustomTypeArg")) + << QMetaMethod::Public + << QMetaMethod::Constructor; + + QTest::newRow("voidSignalCustomUnregisteredType") + << QByteArray("voidSignalCustomUnregisteredType(CustomUnregisteredType)") + << int(QMetaType::Void) << QByteArray("") + << (QList() << 0) + << (QList() << QByteArray("CustomUnregisteredType")) + << (QList() << QByteArray("voidSignalCustomUnregisteredTypeArg")) + << QMetaMethod::Protected + << QMetaMethod::Signal; + + QTest::newRow("voidInvokableCustomUnregisteredType") + << QByteArray("voidInvokableCustomUnregisteredType(CustomUnregisteredType)") + << int(QMetaType::Void) << QByteArray("") + << (QList() << 0) + << (QList() << QByteArray("CustomUnregisteredType")) + << (QList() << QByteArray("voidInvokableCustomUnregisteredTypeArg")) + << QMetaMethod::Public + << QMetaMethod::Method; + + QTest::newRow("voidSlotCustomUnregisteredType") + << QByteArray("voidSlotCustomUnregisteredType(CustomUnregisteredType)") + << int(QMetaType::Void) << QByteArray("") + << (QList() << 0) + << (QList() << QByteArray("CustomUnregisteredType")) + << (QList() << QByteArray("voidSlotCustomUnregisteredTypeArg")) + << QMetaMethod::Public + << QMetaMethod::Slot; + + QTest::newRow("MethodTestObject(CustomUnregisteredType)") + << QByteArray("MethodTestObject(CustomUnregisteredType)") + << int(QMetaType::Void) << QByteArray("") + << (QList() << 0) + << (QList() << QByteArray("CustomUnregisteredType")) + << (QList() << QByteArray("constructorCustomUnregisteredTypeArg")) + << QMetaMethod::Public + << QMetaMethod::Constructor; + + QTest::newRow("boolSignal") + << QByteArray("boolSignal()") + << int(QMetaType::Bool) << QByteArray("bool") + << (QList()) + << (QList()) + << (QList()) + << QMetaMethod::Protected + << QMetaMethod::Signal; + + QTest::newRow("boolInvokable") + << QByteArray("boolInvokable()") + << int(QMetaType::Bool) << QByteArray("bool") + << (QList()) + << (QList()) + << (QList()) + << QMetaMethod::Public + << QMetaMethod::Method; + + QTest::newRow("boolSlot") + << QByteArray("boolSlot()") + << int(QMetaType::Bool) << QByteArray("bool") + << (QList()) + << (QList()) + << (QList()) + << QMetaMethod::Public + << QMetaMethod::Slot; + + QTest::newRow("qrealSignal") + << QByteArray("qrealSignal()") + << int(QMetaType::QReal) << QByteArray("qreal") + << (QList()) + << (QList()) + << (QList()) + << QMetaMethod::Protected + << QMetaMethod::Signal; + + QTest::newRow("qrealInvokable") + << QByteArray("qrealInvokable()") + << int(QMetaType::QReal) << QByteArray("qreal") + << (QList()) + << (QList()) + << (QList()) + << QMetaMethod::Public + << QMetaMethod::Method; + + QTest::newRow("qrealSlot") + << QByteArray("qrealSlot()") + << int(QMetaType::QReal) << QByteArray("qreal") + << (QList()) + << (QList()) + << (QList()) + << QMetaMethod::Public + << QMetaMethod::Slot; + + QTest::newRow("qstringSignal") + << QByteArray("qstringSignal()") + << int(QMetaType::QString) << QByteArray("QString") + << (QList()) + << (QList()) + << (QList()) + << QMetaMethod::Protected + << QMetaMethod::Signal; + + QTest::newRow("qstringInvokable") + << QByteArray("qstringInvokable()") + << int(QMetaType::QString) << QByteArray("QString") + << (QList()) + << (QList()) + << (QList()) + << QMetaMethod::Public + << QMetaMethod::Method; + + QTest::newRow("qstringSlot") + << QByteArray("qstringSlot()") + << int(QMetaType::QString) << QByteArray("QString") + << (QList()) + << (QList()) + << (QList()) + << QMetaMethod::Public + << QMetaMethod::Slot; + + { + QList parameterTypes = QList() + << int(QMetaType::Bool) << int(QMetaType::Int) << int(QMetaType::UInt) + << int(QMetaType::LongLong) << int(QMetaType::ULongLong) << int(QMetaType::Double) + << int(QMetaType::Long) << int(QMetaType::Short) << int(QMetaType::Char) + << int(QMetaType::ULong) << int(QMetaType::UShort) << int(QMetaType::UChar) + << int(QMetaType::Float); + QList parameterTypeNames = QList() + << QByteArray("bool") << QByteArray("int") << QByteArray("uint") + << QByteArray("qlonglong") << QByteArray("qulonglong") << QByteArray("double") + << QByteArray("long") << QByteArray("short") << QByteArray("char") << QByteArray("ulong") + << QByteArray("ushort") << QByteArray("uchar") << QByteArray("float"); + QList parameterNames = QList() + << QByteArray("boolArg") << QByteArray("intArg") << QByteArray("uintArg") + << QByteArray("longlongArg") << QByteArray("ulonglongArg") << QByteArray("doubleArg") + << QByteArray("longArg") << QByteArray("shortArg") << QByteArray("charArg") + << QByteArray("ulongArg") << QByteArray("ushortArg") << QByteArray("ucharArg") + << QByteArray("floatArg"); + + QTest::newRow("qvariantSignalBoolIntUIntLonglongULonglongDoubleLongShortCharUlongUshortUcharFloat") + << QByteArray("qvariantSignalBoolIntUIntLonglongULonglongDoubleLongShortCharUlongUshortUcharFloat(" + "bool,int,uint,qlonglong,qulonglong,double,long,short,char,ulong,ushort,uchar,float)") + << int(QMetaType::QVariant) << QByteArray("QVariant") + << parameterTypes << parameterTypeNames << parameterNames + << QMetaMethod::Protected + << QMetaMethod::Signal; + + QTest::newRow("qvariantInvokableBoolIntUIntLonglongULonglongDoubleLongShortCharUlongUshortUcharFloat") + << QByteArray("qvariantInvokableBoolIntUIntLonglongULonglongDoubleLongShortCharUlongUshortUcharFloat(" + "bool,int,uint,qlonglong,qulonglong,double,long,short,char,ulong,ushort,uchar,float)") + << int(QMetaType::QVariant) << QByteArray("QVariant") + << parameterTypes << parameterTypeNames << parameterNames + << QMetaMethod::Public + << QMetaMethod::Method; + + QTest::newRow("qvariantSlotBoolIntUIntLonglongULonglongDoubleLongShortCharUlongUshortUcharFloat") + << QByteArray("qvariantSlotBoolIntUIntLonglongULonglongDoubleLongShortCharUlongUshortUcharFloat(" + "bool,int,uint,qlonglong,qulonglong,double,long,short,char,ulong,ushort,uchar,float)") + << int(QMetaType::QVariant) << QByteArray("QVariant") + << parameterTypes << parameterTypeNames << parameterNames + << QMetaMethod::Public + << QMetaMethod::Slot; + + QTest::newRow("MethodTestObject(bool,int,uint,qlonglong,qulonglong,double,long,short,char,ulong,ushort,uchar,float)") + << QByteArray("MethodTestObject(bool,int,uint,qlonglong,qulonglong,double,long,short,char,ulong,ushort,uchar,float)") + << int(QMetaType::Void) << QByteArray("") + << parameterTypes << parameterTypeNames << parameterNames + << QMetaMethod::Public + << QMetaMethod::Constructor; + } + + QTest::newRow("voidSignalNoParameterNames") + << QByteArray("voidSignalNoParameterNames(bool,int)") + << int(QMetaType::Void) << QByteArray("") + << (QList() << int(QMetaType::Bool) << int(QMetaType::Int)) + << (QList() << QByteArray("bool") << QByteArray("int")) + << (QList() << QByteArray("") << QByteArray("")) + << QMetaMethod::Protected + << QMetaMethod::Signal; + + QTest::newRow("voidInvokableNoParameterNames") + << QByteArray("voidInvokableNoParameterNames(bool,int)") + << int(QMetaType::Void) << QByteArray("") + << (QList() << int(QMetaType::Bool) << int(QMetaType::Int)) + << (QList() << QByteArray("bool") << QByteArray("int")) + << (QList() << QByteArray("") << QByteArray("")) + << QMetaMethod::Public + << QMetaMethod::Method; + + QTest::newRow("voidSlotNoParameterNames") + << QByteArray("voidSlotNoParameterNames(bool,int)") + << int(QMetaType::Void) << QByteArray("") + << (QList() << int(QMetaType::Bool) << int(QMetaType::Int)) + << (QList() << QByteArray("bool") << QByteArray("int")) + << (QList() << QByteArray("") << QByteArray("")) + << QMetaMethod::Public + << QMetaMethod::Slot; + + QTest::newRow("MethodTestObject(bool,int)") + << QByteArray("MethodTestObject(bool,int)") + << int(QMetaType::Void) << QByteArray("") + << (QList() << int(QMetaType::Bool) << int(QMetaType::Int)) + << (QList() << QByteArray("bool") << QByteArray("int")) + << (QList() << QByteArray("") << QByteArray("")) + << QMetaMethod::Public + << QMetaMethod::Constructor; +} + +void tst_QMetaMethod::method() +{ + QFETCH(QByteArray, signature); + QFETCH(int, returnType); + QFETCH(QByteArray, returnTypeName); + QFETCH(QList, parameterTypes); + QFETCH(QList, parameterTypeNames); + QFETCH(QList, parameterNames); + QFETCH(QMetaMethod::MethodType, methodType); + QFETCH(QMetaMethod::Access, access); + + QVERIFY(parameterTypes.size() == parameterTypeNames.size()); + QVERIFY(parameterTypes.size() == parameterNames.size()); + + const QMetaObject *mo = &MethodTestObject::staticMetaObject; + int index = (methodType == QMetaMethod::Constructor) + ? mo->indexOfConstructor(signature) : mo->indexOfMethod(signature); + QVERIFY(index != -1); + QMetaMethod method = (methodType == QMetaMethod::Constructor) + ? mo->constructor(index) : mo->method(index); + QVERIFY(method.isValid()); + QCOMPARE(method.methodType(), methodType); + QCOMPARE(method.access(), access); + + QCOMPARE(method.signature(), signature.constData()); + + QCOMPARE(method.tag(), ""); + + QCOMPARE(method.typeName(), returnTypeName.constData()); + QCOMPARE(QMetaType::type(method.typeName()), returnType); + + QCOMPARE(method.parameterTypes(), parameterTypeNames); + QCOMPARE(method.parameterNames(), parameterNames); +} + +void tst_QMetaMethod::invalidMethod() +{ + QMetaMethod method; + QVERIFY(!method.isValid()); + + QMetaMethod method2 = staticMetaObject.method(staticMetaObject.methodCount()); + QVERIFY(!method2.isValid()); + + QMetaMethod method3 = staticMetaObject.method(-1); + QVERIFY(!method3.isValid()); +} + +QTEST_MAIN(tst_QMetaMethod) +#include "tst_qmetamethod.moc" diff --git a/tests/auto/corelib/kernel/qmetaobjectbuilder/tst_qmetaobjectbuilder.cpp b/tests/auto/corelib/kernel/qmetaobjectbuilder/tst_qmetaobjectbuilder.cpp index def1b74ea48..97b14a374e8 100644 --- a/tests/auto/corelib/kernel/qmetaobjectbuilder/tst_qmetaobjectbuilder.cpp +++ b/tests/auto/corelib/kernel/qmetaobjectbuilder/tst_qmetaobjectbuilder.cpp @@ -64,6 +64,7 @@ private slots: void staticMetacall(); void copyMetaObject(); void serialize(); + void relocatableData(); void removeNotifySignal(); void usage_signal(); @@ -90,6 +91,7 @@ class SomethingOfEverything : public QObject Q_CLASSINFO("ci_bar", "DEF") Q_PROPERTY(QString prop READ prop WRITE setProp NOTIFY propChanged) Q_PROPERTY(QString prop2 READ prop WRITE setProp) + Q_PROPERTY(QString revisionProp READ prop WRITE setProp REVISION 42) Q_PROPERTY(SomethingEnum eprop READ eprop) Q_PROPERTY(SomethingFlagEnum fprop READ fprop) Q_PROPERTY(QLocale::Language language READ language) @@ -123,6 +125,7 @@ public: public slots: void slot1(const QString&) {} void slot2(int, const QString&) {} + Q_REVISION(24) void revisionSlot() {} private slots: void slot3() {} @@ -218,6 +221,7 @@ void tst_QMetaObjectBuilder::method() QVERIFY(nullMethod.tag().isEmpty()); QVERIFY(nullMethod.access() == QMetaMethod::Public); QCOMPARE(nullMethod.attributes(), 0); + QCOMPARE(nullMethod.revision(), 0); QCOMPARE(nullMethod.index(), 0); // Add a method and check its attributes. @@ -229,6 +233,7 @@ void tst_QMetaObjectBuilder::method() QVERIFY(method1.tag().isEmpty()); QVERIFY(method1.access() == QMetaMethod::Public); QCOMPARE(method1.attributes(), 0); + QCOMPARE(method1.revision(), 0); QCOMPARE(method1.index(), 0); QCOMPARE(builder.methodCount(), 1); @@ -241,6 +246,7 @@ void tst_QMetaObjectBuilder::method() QVERIFY(method2.tag().isEmpty()); QVERIFY(method2.access() == QMetaMethod::Public); QCOMPARE(method2.attributes(), 0); + QCOMPARE(method2.revision(), 0); QCOMPARE(method2.index(), 1); QCOMPARE(builder.methodCount(), 2); @@ -255,6 +261,7 @@ void tst_QMetaObjectBuilder::method() method1.setTag("tag"); method1.setAccess(QMetaMethod::Private); method1.setAttributes(42); + method1.setRevision(123); // Check that method1 is changed, but method2 is not. QCOMPARE(method1.signature(), QByteArray("foo(QString,int)")); @@ -264,6 +271,7 @@ void tst_QMetaObjectBuilder::method() QCOMPARE(method1.tag(), QByteArray("tag")); QVERIFY(method1.access() == QMetaMethod::Private); QCOMPARE(method1.attributes(), 42); + QCOMPARE(method1.revision(), 123); QCOMPARE(method1.index(), 0); QCOMPARE(method2.signature(), QByteArray("bar(QString)")); QVERIFY(method2.methodType() == QMetaMethod::Method); @@ -272,6 +280,7 @@ void tst_QMetaObjectBuilder::method() QVERIFY(method2.tag().isEmpty()); QVERIFY(method2.access() == QMetaMethod::Public); QCOMPARE(method2.attributes(), 0); + QCOMPARE(method2.revision(), 0); QCOMPARE(method2.index(), 1); QCOMPARE(builder.methodCount(), 2); @@ -281,6 +290,7 @@ void tst_QMetaObjectBuilder::method() method2.setTag("Q_FOO"); method2.setAccess(QMetaMethod::Protected); method2.setAttributes(24); + method2.setRevision(321); // This time check that only method2 changed. QCOMPARE(method1.signature(), QByteArray("foo(QString,int)")); @@ -290,6 +300,7 @@ void tst_QMetaObjectBuilder::method() QCOMPARE(method1.tag(), QByteArray("tag")); QVERIFY(method1.access() == QMetaMethod::Private); QCOMPARE(method1.attributes(), 42); + QCOMPARE(method1.revision(), 123); QCOMPARE(method1.index(), 0); QCOMPARE(method2.signature(), QByteArray("bar(QString)")); QVERIFY(method2.methodType() == QMetaMethod::Method); @@ -298,6 +309,7 @@ void tst_QMetaObjectBuilder::method() QCOMPARE(method2.tag(), QByteArray("Q_FOO")); QVERIFY(method2.access() == QMetaMethod::Protected); QCOMPARE(method2.attributes(), 24); + QCOMPARE(method2.revision(), 321); QCOMPARE(method2.index(), 1); QCOMPARE(builder.methodCount(), 2); @@ -312,6 +324,7 @@ void tst_QMetaObjectBuilder::method() QCOMPARE(method2.tag(), QByteArray("Q_FOO")); QVERIFY(method2.access() == QMetaMethod::Protected); QCOMPARE(method2.attributes(), 24); + QCOMPARE(method2.revision(), 321); QCOMPARE(method2.index(), 0); // Perform index-based lookup again. @@ -541,6 +554,7 @@ void tst_QMetaObjectBuilder::property() QVERIFY(!nullProp.isConstant()); QVERIFY(!nullProp.isFinal()); QCOMPARE(nullProp.index(), 0); + QCOMPARE(nullProp.revision(), 0); // Add a property and check its attributes. QMetaPropertyBuilder prop1 = builder.addProperty("foo", "const QString &"); @@ -559,6 +573,7 @@ void tst_QMetaObjectBuilder::property() QVERIFY(!prop1.isEnumOrFlag()); QVERIFY(!prop1.isConstant()); QVERIFY(!prop1.isFinal()); + QCOMPARE(prop1.revision(), 0); QCOMPARE(prop1.index(), 0); QCOMPARE(builder.propertyCount(), 1); @@ -579,6 +594,7 @@ void tst_QMetaObjectBuilder::property() QVERIFY(!prop2.isEnumOrFlag()); QVERIFY(!prop2.isConstant()); QVERIFY(!prop2.isFinal()); + QCOMPARE(prop2.revision(), 0); QCOMPARE(prop2.index(), 1); QCOMPARE(builder.propertyCount(), 2); @@ -602,6 +618,7 @@ void tst_QMetaObjectBuilder::property() prop1.setEnumOrFlag(true); prop1.setConstant(true); prop1.setFinal(true); + prop1.setRevision(123); // Check that prop1 is changed, but prop2 is not. QCOMPARE(prop1.name(), QByteArray("foo")); @@ -618,6 +635,7 @@ void tst_QMetaObjectBuilder::property() QVERIFY(prop1.isEnumOrFlag()); QVERIFY(prop1.isConstant()); QVERIFY(prop1.isFinal()); + QCOMPARE(prop1.revision(), 123); QVERIFY(prop2.isReadable()); QVERIFY(prop2.isWritable()); QCOMPARE(prop2.name(), QByteArray("bar")); @@ -632,6 +650,7 @@ void tst_QMetaObjectBuilder::property() QVERIFY(!prop2.isEnumOrFlag()); QVERIFY(!prop2.isConstant()); QVERIFY(!prop2.isFinal()); + QCOMPARE(prop2.revision(), 0); // Remove prop1 and check that prop2 becomes index 0. builder.removeProperty(0); @@ -649,6 +668,7 @@ void tst_QMetaObjectBuilder::property() QVERIFY(!prop2.isEnumOrFlag()); QVERIFY(!prop2.isConstant()); QVERIFY(!prop2.isFinal()); + QCOMPARE(prop2.revision(), 0); QCOMPARE(prop2.index(), 0); // Perform index-based lookup again. @@ -1028,6 +1048,39 @@ void tst_QMetaObjectBuilder::serialize() } } +void tst_QMetaObjectBuilder::relocatableData() +{ + QMetaObjectBuilder builder; + builder.setClassName("TestObject"); + + QMetaMethodBuilder intPropChanged = builder.addSignal("intPropChanged(int)"); + intPropChanged.setParameterNames(QList() << "newIntPropValue"); + + QMetaPropertyBuilder prop = builder.addProperty("intProp", "int"); + prop.setNotifySignal(intPropChanged); + + QMetaMethodBuilder voidSlotInt = builder.addSlot("voidSlotInt(int)"); + voidSlotInt.setParameterNames(QList() << "slotIntArg"); + + QMetaMethodBuilder listInvokableQRealQString = builder.addMethod("listInvokableQRealQString(qreal,QString)"); + listInvokableQRealQString.setReturnType("QVariantList"); + listInvokableQRealQString.setParameterNames(QList() << "qrealArg" << "qstringArg"); + + bool ok = false; + QByteArray data = builder.toRelocatableData(&ok); + QVERIFY(ok); + + QMetaObjectBuilder builder2; + QMetaObject meta2; + builder2.fromRelocatableData(&meta2, &QObject::staticMetaObject, data); + + QMetaObject *meta = builder.toMetaObject(); + + QVERIFY(sameMetaObject(meta, &meta2)); + free(meta); +} + + // Check that removing a method updates notify signals appropriately void tst_QMetaObjectBuilder::removeNotifySignal() { @@ -1129,6 +1182,9 @@ static bool sameMethod(const QMetaMethod& method1, const QMetaMethod& method2) if (method1.attributes() != method2.attributes()) return false; + if (method1.revision() != method2.revision()) + return false; + return true; } @@ -1159,6 +1215,9 @@ static bool sameProperty(const QMetaProperty& prop1, const QMetaProperty& prop2) return false; } + if (prop1.revision() != prop2.revision()) + return false; + return true; } @@ -1282,11 +1341,11 @@ class TestObject : public QObject // Manually expanded from Q_OBJECT macro public: Q_OBJECT_CHECK + static QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); virtual int qt_metacall(QMetaObject::Call, int, void **); private: - Q_DECL_HIDDEN static const QMetaObjectExtraData staticMetaObjectExtraData; Q_DECL_HIDDEN static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **); //Q_PROPERTY(int intProp READ intProp WRITE setIntProp NOTIFY intPropChanged) @@ -1319,14 +1378,15 @@ private: int m_voidSlotIntArg; }; -const QMetaObjectExtraData TestObject::staticMetaObjectExtraData = { - 0, qt_static_metacall +QMetaObject TestObject::staticMetaObject = { + { 0, 0, 0, 0 } }; TestObject::TestObject(QObject *parent) : QObject(parent), m_metaObject(buildMetaObject()), m_intProp(-1), m_voidSlotIntArg(-1) { + staticMetaObject = *m_metaObject; } TestObject::~TestObject() @@ -1422,9 +1482,6 @@ void TestObject::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, } } } else if (_c == QMetaObject::IndexOfMethod) { - // This code is currently unreachable because it's only used by the - // template-based versions of connect() and disconnect(), which don't - // work with dynamically generated meta-objects (see test). int *result = reinterpret_cast(_a[0]); void **func = reinterpret_cast(_a[1]); { @@ -1445,7 +1502,6 @@ void TestObject::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, *result = 2; } } - qFatal("You forgot to add one or more IndexOfMethod cases"); } } @@ -1609,11 +1665,22 @@ void tst_QMetaObjectBuilder::usage_templateConnect() { QScopedPointer testObject(new TestObject); - QTest::ignoreMessage(QtWarningMsg, "QObject::connect: signal not found in QObject"); QMetaObject::Connection con = QObject::connect(testObject.data(), &TestObject::intPropChanged, testObject.data(), &TestObject::voidSlotInt); - QEXPECT_FAIL("", "template-based connect() fails because meta-object is deduced at compile-time", Abort); QVERIFY(con); + + QVERIFY(testObject->voidSlotIntArgument() == -1); + testObject->setProperty("intProp", 123); + QCOMPARE(testObject->voidSlotIntArgument(), 123); + + QVERIFY(QObject::disconnect(testObject.data(), &TestObject::intPropChanged, + testObject.data(), &TestObject::voidSlotInt)); + + // Something that isn't a signal + QTest::ignoreMessage(QtWarningMsg, "QObject::connect: signal not found in TestObject"); + con = QObject::connect(testObject.data(), &TestObject::setIntProp, + testObject.data(), &TestObject::intPropChanged); + QVERIFY(!con); } QTEST_MAIN(tst_QMetaObjectBuilder) diff --git a/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp b/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp index be13b39e7ea..72913d10f27 100644 --- a/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp +++ b/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp @@ -78,16 +78,22 @@ private slots: void createCopy(); void sizeOf_data(); void sizeOf(); + void sizeOfStaticLess_data(); + void sizeOfStaticLess(); void flags_data(); void flags(); + void flagsStaticLess_data(); + void flagsStaticLess(); void construct_data(); void construct(); void constructCopy_data(); void constructCopy(); void typedefs(); + void registerType(); void isRegistered_data(); void isRegistered(); - void unregisterType(); + void isRegisteredStaticLess_data(); + void isRegisteredStaticLess(); void registerStreamBuiltin(); void automaticTemplateRegistration(); }; @@ -125,6 +131,9 @@ class MetaTypeTorturer: public QThread protected: void run() { + Bar space[1]; + space[0].~Bar(); + for (int i = 0; i < 1000; ++i) { const QByteArray name = QString("Bar%1_%2").arg(i).arg((size_t)QThread::currentThreadId()).toLatin1(); const char *nm = name.constData(); @@ -132,6 +141,15 @@ protected: #ifdef Q_OS_LINUX pthread_yield(); #endif + QMetaType info(tp); + if (!info.isValid()) { + ++failureCount; + qWarning() << "Wrong typeInfo returned for" << tp; + } + if (!info.isRegistered()) { + ++failureCount; + qWarning() << name << "is not a registered metatype"; + } if (QMetaType::typeFlags(tp) != (QMetaType::NeedsConstruction | QMetaType::NeedsDestruction)) { ++failureCount; qWarning() << "Wrong typeInfo returned for" << tp; @@ -148,9 +166,22 @@ protected: ++failureCount; qWarning() << "Wrong typeName returned for" << tp; } - void *buf = QMetaType::create(tp, 0); - void *buf2 = QMetaType::create(tp, buf); - if (!buf) { + void *buf1 = QMetaType::create(tp, 0); + void *buf2 = QMetaType::create(tp, buf1); + void *buf3 = info.create(tp, 0); + void *buf4 = info.create(tp, buf1); + + QMetaType::construct(tp, space, 0); + QMetaType::destruct(tp, space); + QMetaType::construct(tp, space, buf1); + QMetaType::destruct(tp, space); + + info.construct(space, 0); + info.destruct(space); + info.construct(space, buf1); + info.destruct(space); + + if (!buf1) { ++failureCount; qWarning() << "Null buffer returned by QMetaType::create(tp, 0)"; } @@ -158,9 +189,20 @@ protected: ++failureCount; qWarning() << "Null buffer returned by QMetaType::create(tp, buf)"; } - QMetaType::destroy(tp, buf); + if (!buf3) { + ++failureCount; + qWarning() << "Null buffer returned by info.create(tp, 0)"; + } + if (!buf4) { + ++failureCount; + qWarning() << "Null buffer returned by infocreate(tp, buf)"; + } + QMetaType::destroy(tp, buf1); QMetaType::destroy(tp, buf2); + info.destroy(buf3); + info.destroy(buf4); } + new (space) Bar; } public: MetaTypeTorturer() : failureCount(0) { } @@ -480,13 +522,17 @@ template static void testCreateHelper() { typedef typename MetaEnumToType::Type Type; - void *actual = QMetaType::create(ID); + QMetaType info(ID); + void *actual1 = QMetaType::create(ID); + void *actual2 = info.create(); if (DefaultValueTraits::IsInitialized) { Type *expected = DefaultValueFactory::create(); - QCOMPARE(*static_cast(actual), *expected); + QCOMPARE(*static_cast(actual1), *expected); + QCOMPARE(*static_cast(actual2), *expected); delete expected; } - QMetaType::destroy(ID, actual); + QMetaType::destroy(ID, actual1); + info.destroy(actual2); } template<> @@ -529,9 +575,13 @@ static void testCreateCopyHelper() { typedef typename MetaEnumToType::Type Type; Type *expected = TestValueFactory::create(); - void *actual = QMetaType::create(ID, expected); - QCOMPARE(*static_cast(actual), *expected); - QMetaType::destroy(ID, actual); + QMetaType info(ID); + void *actual1 = QMetaType::create(ID, expected); + void *actual2 = info.create(expected); + QCOMPARE(*static_cast(actual1), *expected); + QCOMPARE(*static_cast(actual2), *expected); + QMetaType::destroy(ID, actual1); + info.destroy(actual2); delete expected; } @@ -588,6 +638,18 @@ void tst_QMetaType::sizeOf() QCOMPARE(QMetaType::sizeOf(type), size); } +void tst_QMetaType::sizeOfStaticLess_data() +{ + sizeOf_data(); +} + +void tst_QMetaType::sizeOfStaticLess() +{ + QFETCH(QMetaType::Type, type); + QFETCH(int, size); + QCOMPARE(QMetaType(type).sizeOf(), size); +} + struct CustomMovable {}; QT_BEGIN_NAMESPACE Q_DECLARE_TYPEINFO(CustomMovable, Q_MOVABLE_TYPE); @@ -653,6 +715,23 @@ void tst_QMetaType::flags() QCOMPARE(bool(QMetaType::typeFlags(type) & QMetaType::PointerToQObject), isPointerToQObject); } +void tst_QMetaType::flagsStaticLess_data() +{ + flags_data(); +} + +void tst_QMetaType::flagsStaticLess() +{ + QFETCH(int, type); + QFETCH(bool, isMovable); + QFETCH(bool, isComplex); + + int flags = QMetaType(type).flags(); + QCOMPARE(bool(flags & QMetaType::NeedsConstruction), isComplex); + QCOMPARE(bool(flags & QMetaType::NeedsDestruction), isComplex); + QCOMPARE(bool(flags & QMetaType::MovableType), isMovable); +} + void tst_QMetaType::construct_data() { create_data(); @@ -688,20 +767,30 @@ template static void testConstructHelper() { typedef typename MetaEnumToType::Type Type; - int size = QMetaType::sizeOf(ID); - void *storage = qMallocAligned(size, TypeAlignment::Value); - void *actual = QMetaType::construct(ID, storage, /*copy=*/0); - QCOMPARE(actual, storage); + QMetaType info(ID); + int size = info.sizeOf(); + void *storage1 = qMallocAligned(size, TypeAlignment::Value); + void *actual1 = QMetaType::construct(ID, storage1, /*copy=*/0); + void *storage2 = qMallocAligned(size, TypeAlignment::Value); + void *actual2 = info.construct(storage2, /*copy=*/0); + QCOMPARE(actual1, storage1); + QCOMPARE(actual2, storage2); if (DefaultValueTraits::IsInitialized) { Type *expected = DefaultValueFactory::create(); - QCOMPARE(*static_cast(actual), *expected); + QCOMPARE(*static_cast(actual1), *expected); + QCOMPARE(*static_cast(actual2), *expected); delete expected; } - QMetaType::destruct(ID, actual); - qFreeAligned(storage); + QMetaType::destruct(ID, actual1); + qFreeAligned(storage1); + info.destruct(actual2); + qFreeAligned(storage2); QVERIFY(QMetaType::construct(ID, 0, /*copy=*/0) == 0); QMetaType::destruct(ID, 0); + + QVERIFY(info.construct(0, /*copy=*/0) == 0); + info.destruct(0); } template<> @@ -748,15 +837,24 @@ static void testConstructCopyHelper() { typedef typename MetaEnumToType::Type Type; Type *expected = TestValueFactory::create(); + QMetaType info(ID); int size = QMetaType::sizeOf(ID); - void *storage = qMallocAligned(size, TypeAlignment::Value); - void *actual = QMetaType::construct(ID, storage, expected); - QCOMPARE(actual, storage); - QCOMPARE(*static_cast(actual), *expected); - QMetaType::destruct(ID, actual); - qFreeAligned(storage); + QCOMPARE(info.sizeOf(), size); + void *storage1 = qMallocAligned(size, TypeAlignment::Value); + void *actual1 = QMetaType::construct(ID, storage1, expected); + void *storage2 = qMallocAligned(size, TypeAlignment::Value); + void *actual2 = info.construct(storage2, expected); + QCOMPARE(actual1, storage1); + QCOMPARE(actual2, storage2); + QCOMPARE(*static_cast(actual1), *expected); + QCOMPARE(*static_cast(actual2), *expected); + QMetaType::destruct(ID, actual1); + qFreeAligned(storage1); + info.destruct(actual2); + qFreeAligned(storage2); QVERIFY(QMetaType::construct(ID, 0, expected) == 0); + QVERIFY(info.construct(0, expected) == 0); delete expected; } @@ -829,6 +927,44 @@ void tst_QMetaType::typedefs() QCOMPARE(QMetaType::type("WhityDouble"), ::qMetaTypeId()); } +void tst_QMetaType::registerType() +{ + // Built-in + QCOMPARE(qRegisterMetaType("QString"), int(QMetaType::QString)); + QCOMPARE(qRegisterMetaType("QString"), int(QMetaType::QString)); + + // Custom + int fooId = qRegisterMetaType("TestSpace::Foo"); + QVERIFY(fooId >= int(QMetaType::User)); + QCOMPARE(qRegisterMetaType("TestSpace::Foo"), fooId); + + int movableId = qRegisterMetaType("CustomMovable"); + QVERIFY(movableId >= int(QMetaType::User)); + QCOMPARE(qRegisterMetaType("CustomMovable"), movableId); + + // Alias to built-in + typedef QString MyString; + + QCOMPARE(qRegisterMetaType("MyString"), int(QMetaType::QString)); + QCOMPARE(qRegisterMetaType("MyString"), int(QMetaType::QString)); + + QCOMPARE(QMetaType::type("MyString"), int(QMetaType::QString)); + + // Alias to custom type + typedef CustomMovable MyMovable; + typedef TestSpace::Foo MyFoo; + + QCOMPARE(qRegisterMetaType("MyMovable"), movableId); + QCOMPARE(qRegisterMetaType("MyMovable"), movableId); + + QCOMPARE(QMetaType::type("MyMovable"), movableId); + + QCOMPARE(qRegisterMetaType("MyFoo"), fooId); + QCOMPARE(qRegisterMetaType("MyFoo"), fooId); + + QCOMPARE(QMetaType::type("MyFoo"), fooId); +} + class IsRegisteredDummyType { }; void tst_QMetaType::isRegistered_data() @@ -857,26 +993,16 @@ void tst_QMetaType::isRegistered() QCOMPARE(QMetaType::isRegistered(typeId), registered); } -class RegUnreg +void tst_QMetaType::isRegisteredStaticLess_data() { -public: - RegUnreg() {}; - RegUnreg(const RegUnreg &) {}; - ~RegUnreg() {}; -}; + isRegistered_data(); +} -void tst_QMetaType::unregisterType() +void tst_QMetaType::isRegisteredStaticLess() { - // cannot unregister standard types - int typeId = qRegisterMetaType >("QList"); - QCOMPARE(QMetaType::isRegistered(typeId), true); - QMetaType::unregisterType("QList"); - QCOMPARE(QMetaType::isRegistered(typeId), true); - // allow unregister user types - typeId = qRegisterMetaType("RegUnreg"); - QCOMPARE(QMetaType::isRegistered(typeId), true); - QMetaType::unregisterType("RegUnreg"); - QCOMPARE(QMetaType::isRegistered(typeId), false); + QFETCH(int, typeId); + QFETCH(bool, registered); + QCOMPARE(QMetaType(typeId).isRegistered(), registered); } void tst_QMetaType::registerStreamBuiltin() diff --git a/tests/auto/corelib/kernel/qmimedata/tst_qmimedata.cpp b/tests/auto/corelib/kernel/qmimedata/tst_qmimedata.cpp index 09f17602b3f..f9a6bae0877 100644 --- a/tests/auto/corelib/kernel/qmimedata/tst_qmimedata.cpp +++ b/tests/auto/corelib/kernel/qmimedata/tst_qmimedata.cpp @@ -317,19 +317,22 @@ void tst_QMimeData::setUrls() const longUrlList += QUrl("http://www.google.com"); // verify initial state - QVERIFY(mimeData.hasUrls() == false); + QCOMPARE(mimeData.hasUrls(), false); // set a few, verify mimeData.setUrls(shortUrlList); QCOMPARE(mimeData.urls(), shortUrlList); + QCOMPARE(mimeData.text(), QString("http://qt.nokia.com")); // change them, verify mimeData.setUrls(longUrlList); QCOMPARE(mimeData.urls(), longUrlList); + QCOMPARE(mimeData.text(), QString("http://qt.nokia.com\nhttp://www.google.com\n")); // clear, verify mimeData.clear(); - QVERIFY(mimeData.hasUrls() == false); + QCOMPARE(mimeData.hasUrls(), false); + QCOMPARE(mimeData.hasText(), false); } QTEST_MAIN(tst_QMimeData) diff --git a/tests/auto/corelib/kernel/qobject/qobject.pro b/tests/auto/corelib/kernel/qobject/qobject.pro index ee48f56b1de..0f86408fc93 100644 --- a/tests/auto/corelib/kernel/qobject/qobject.pro +++ b/tests/auto/corelib/kernel/qobject/qobject.pro @@ -1,3 +1,4 @@ TEMPLATE = subdirs -SUBDIRS = signalbug tst_qobject.pro -CONFIG += parallel_test +SUBDIRS = signalbug +tst_qobject.pro.depends = $$SUBDIRS +SUBDIRS += tst_qobject.pro diff --git a/tests/auto/corelib/kernel/qobject/tst_qobject.cpp b/tests/auto/corelib/kernel/qobject/tst_qobject.cpp index 7f95f680754..a6ad1d53bca 100644 --- a/tests/auto/corelib/kernel/qobject/tst_qobject.cpp +++ b/tests/auto/corelib/kernel/qobject/tst_qobject.cpp @@ -1703,7 +1703,9 @@ void tst_QObject::property() QVERIFY(property.isWritable()); QVERIFY(!property.isEnumType()); QCOMPARE(property.typeName(), "CustomType*"); + qRegisterMetaType(); QCOMPARE(property.type(), QVariant::UserType); + QCOMPARE(property.userType(), qMetaTypeId()); CustomType *customPointer = 0; QVariant customVariant = object.property("custom"); @@ -1718,6 +1720,7 @@ void tst_QObject::property() QVERIFY(property.isWritable()); QCOMPARE(property.typeName(), "CustomType*"); QCOMPARE(property.type(), QVariant::UserType); + QCOMPARE(property.userType(), qMetaTypeId()); QVERIFY(object.setProperty("custom", customVariant)); QCOMPARE(object.custom(), customPointer); @@ -3183,6 +3186,14 @@ void tst_QObject::dumpObjectInfo() QObject a, b; QObject::connect(&a, SIGNAL(destroyed(QObject *)), &b, SLOT(deleteLater())); a.disconnect(&b); +#ifdef QT_DEBUG + QTest::ignoreMessage(QtDebugMsg, "OBJECT QObject::unnamed"); + QTest::ignoreMessage(QtDebugMsg, " SIGNALS OUT"); + QTest::ignoreMessage(QtDebugMsg, " signal: destroyed(QObject*)"); + QTest::ignoreMessage(QtDebugMsg, " "); + QTest::ignoreMessage(QtDebugMsg, " SIGNALS IN"); + QTest::ignoreMessage(QtDebugMsg, " "); +#endif a.dumpObjectInfo(); // should not crash } @@ -3810,12 +3821,18 @@ void tst_QObject::sameName() c2.emitSignal1(); QCOMPARE(c1.s, 2); +#ifndef QT_NO_DEBUG + QTest::ignoreMessage(QtWarningMsg, "QMetaObject::indexOfSignal: signal aPublicSlot() from SenderObject redefined in ConfusingObject"); +#endif QVERIFY(connect(&c2, SIGNAL(aPublicSlot()), &c1, SLOT(signal1()))); c2.aPublicSlot(); QCOMPARE(c2.aPublicSlotCalled, 0); QCOMPARE(c1.aPublicSlotCalled, 0); QCOMPARE(c1.s, 3); +#ifndef QT_NO_DEBUG + QTest::ignoreMessage(QtWarningMsg, "QMetaObject::indexOfSignal: signal aPublicSlot() from SenderObject redefined in ConfusingObject"); +#endif QVERIFY(connect(&c2, SIGNAL(aPublicSlot()), &c1, SLOT(aPublicSlot()))); c2.aPublicSlot(); QCOMPARE(c2.aPublicSlotCalled, 0); @@ -4149,9 +4166,6 @@ void tst_QObject::pointerConnect() QVERIFY( connect( s, &SenderObject::signal1 , r2, &ReceiverObject::slot1 ) ); QVERIFY( connect( s, &SenderObject::signal1 , r1, &ReceiverObject::slot3 ) ); QVERIFY( connect( s, &SenderObject::signal3 , r1, &ReceiverObject::slot3 ) ); -#if defined(Q_CC_GNU) && defined(Q_OS_UNIX) - QEXPECT_FAIL("", "Test may fail due to failing comparison of pointers to member functions caused by problems with -reduce-relocations on this platform.", Continue); -#endif QVERIFY2( connect( &timer, &QTimer::timeout, r1, &ReceiverObject::deleteLater ), "Signal connection failed most likely due to failing comparison of pointers to member functions caused by problems with -reduce-relocations on this platform."); diff --git a/tests/auto/corelib/kernel/qobject/tst_qobject.pro b/tests/auto/corelib/kernel/qobject/tst_qobject.pro index d74f2bcb0f5..30fd810a2e1 100644 --- a/tests/auto/corelib/kernel/qobject/tst_qobject.pro +++ b/tests/auto/corelib/kernel/qobject/tst_qobject.pro @@ -6,3 +6,6 @@ SOURCES = tst_qobject.cpp # this is here for a reason, moc_oldnormalizedobject.cpp is not auto-generated, it was generated by # moc from Qt 4.6, and should *not* be generated by the current moc SOURCES += moc_oldnormalizeobject.cpp + +load(testcase) # for target.path and installTestHelperApp() +installTestHelperApp("signalbug/signalbug",signalbug,signalbug) diff --git a/tests/auto/corelib/kernel/qsocketnotifier/qsocketnotifier.pro b/tests/auto/corelib/kernel/qsocketnotifier/qsocketnotifier.pro index 55f6934fc92..58e4b98af73 100644 --- a/tests/auto/corelib/kernel/qsocketnotifier/qsocketnotifier.pro +++ b/tests/auto/corelib/kernel/qsocketnotifier/qsocketnotifier.pro @@ -6,5 +6,3 @@ SOURCES = tst_qsocketnotifier.cpp requires(contains(QT_CONFIG,private_tests)) include(../../../network/socket/platformsocketengine/platformsocketengine.pri) - -mac: CONFIG += insignificant_test # QTBUG-22746 diff --git a/tests/auto/corelib/kernel/qsocketnotifier/tst_qsocketnotifier.cpp b/tests/auto/corelib/kernel/qsocketnotifier/tst_qsocketnotifier.cpp index e3bfe3bc6d9..5442303e7e0 100644 --- a/tests/auto/corelib/kernel/qsocketnotifier/tst_qsocketnotifier.cpp +++ b/tests/auto/corelib/kernel/qsocketnotifier/tst_qsocketnotifier.cpp @@ -237,7 +237,7 @@ void tst_QSocketNotifier::mixingWithTimers() QCoreApplication::processEvents(); QCOMPARE(helper.timerActivated, true); - QCOMPARE(helper.socketActivated, true); + QTRY_COMPARE(helper.socketActivated, true); } void tst_QSocketNotifier::posixSockets() @@ -264,10 +264,7 @@ void tst_QSocketNotifier::posixSockets() connect(&rn, SIGNAL(activated(int)), &QTestEventLoop::instance(), SLOT(exitLoop())); QSignalSpy readSpy(&rn, SIGNAL(activated(int))); QVERIFY(readSpy.isValid()); - QSocketNotifier wn(posixSocket, QSocketNotifier::Write); - connect(&wn, SIGNAL(activated(int)), &QTestEventLoop::instance(), SLOT(exitLoop())); - QSignalSpy writeSpy(&wn, SIGNAL(activated(int))); - QVERIFY(writeSpy.isValid()); + // No write notifier, some systems trigger write notification on socket creation, but not all QSocketNotifier en(posixSocket, QSocketNotifier::Exception); connect(&en, SIGNAL(activated(int)), &QTestEventLoop::instance(), SLOT(exitLoop())); QSignalSpy errorSpy(&en, SIGNAL(activated(int))); @@ -278,19 +275,27 @@ void tst_QSocketNotifier::posixSockets() QTestEventLoop::instance().enterLoop(3); QCOMPARE(readSpy.count(), 1); - writeSpy.clear(); //depending on OS, write notifier triggers on creation or not. QCOMPARE(errorSpy.count(), 0); char buffer[100]; - qt_safe_read(posixSocket, buffer, 100); + int r = qt_safe_read(posixSocket, buffer, 100); + QCOMPARE(r, 6); QCOMPARE(buffer, "hello"); + QSocketNotifier wn(posixSocket, QSocketNotifier::Write); + connect(&wn, SIGNAL(activated(int)), &QTestEventLoop::instance(), SLOT(exitLoop())); + QSignalSpy writeSpy(&wn, SIGNAL(activated(int))); + QVERIFY(writeSpy.isValid()); qt_safe_write(posixSocket, "goodbye", 8); QTestEventLoop::instance().enterLoop(3); QCOMPARE(readSpy.count(), 1); QCOMPARE(writeSpy.count(), 1); QCOMPARE(errorSpy.count(), 0); + + // Write notifier may have fired before the read notifier inside + // QTcpSocket, give QTcpSocket a chance to see the incoming data + passive->waitForReadyRead(100); QCOMPARE(passive->readAll(), QByteArray("goodbye",8)); } qt_safe_close(posixSocket); diff --git a/tests/auto/corelib/kernel/qvariant/qvariant.pro b/tests/auto/corelib/kernel/qvariant/qvariant.pro index 48229ee140b..9b4b346d357 100644 --- a/tests/auto/corelib/kernel/qvariant/qvariant.pro +++ b/tests/auto/corelib/kernel/qvariant/qvariant.pro @@ -3,5 +3,3 @@ TARGET = tst_qvariant QT += widgets network testlib SOURCES = tst_qvariant.cpp RESOURCES += qvariant.qrc - -mac: CONFIG += insignificant_test # QTBUG-QTBUG-22747 diff --git a/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp b/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp index 2bf554dd782..ccdab176680 100644 --- a/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp +++ b/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp @@ -83,11 +83,22 @@ Q_DECLARE_METATYPE(QFont) Q_DECLARE_METATYPE(QColor) Q_DECLARE_METATYPE(QKeySequence) +class CustomNonQObject; + class tst_QVariant : public QObject { Q_OBJECT +public: + tst_QVariant(QObject *parent = 0) + : QObject(parent), customNonQObjectPointer(0) + { + + } + private slots: + void cleanupTestCase(); + void constructor(); void copy_constructor(); void isNull(); @@ -176,6 +187,7 @@ private slots: void qvariant_cast_QObject_data(); void qvariant_cast_QObject(); + void qvariant_cast_QObject_derived(); void toLocale(); @@ -275,6 +287,9 @@ private: void dataStream_data(QDataStream::Version version); void loadQVariantFromDataStream(QDataStream::Version version); void saveQVariantFromDataStream(QDataStream::Version version); + + CustomNonQObject *customNonQObjectPointer; + QVector objectPointerTestData; }; Q_DECLARE_METATYPE(QDate) @@ -1842,10 +1857,6 @@ void tst_QVariant::operator_eq_eq_data() QTest::newRow("HashSecondLarger") << QVariant(hash1) << QVariant(hash2) << false; } - - QTest::newRow( "UserType" ) << QVariant(QVariant::UserType) << QVariant(QVariant::UserType) << true; - QVariant mUserType(QVariant::UserType); - QTest::newRow( "Shared UserType" ) << mUserType << mUserType << true; } void tst_QVariant::operator_eq_eq() @@ -1919,7 +1930,6 @@ void tst_QVariant::typeName_data() QTest::newRow("39") << int(QVariant::RectF) << QByteArray("QRectF"); QTest::newRow("40") << int(QVariant::PointF) << QByteArray("QPointF"); QTest::newRow("41") << int(QVariant::RegExp) << QByteArray("QRegExp"); - QTest::newRow("42") << int(QVariant::UserType) << QByteArray(); QTest::newRow("43") << int(QVariant::Matrix) << QByteArray("QMatrix"); QTest::newRow("44") << int(QVariant::Transform) << QByteArray("QTransform"); QTest::newRow("45") << int(QVariant::Hash) << QByteArray("QVariantHash"); @@ -2031,10 +2041,10 @@ void tst_QVariant::userType() qVariantSetValue(userVar, data); QCOMPARE(userVar.type(), QVariant::UserType); + QCOMPARE(userVar.userType(), qMetaTypeId()); QCOMPARE(userVar.typeName(), "MyType"); QVERIFY(!userVar.isNull()); QVERIFY(!userVar.canConvert(QVariant::String)); - QVERIFY(!userVar.canConvert(QVariant::UserType)); QVariant userVar2(userVar); QVERIFY(userVar == userVar2); @@ -2060,10 +2070,10 @@ void tst_QVariant::userType() qVariantSetValue(userVar, &data); QCOMPARE(userVar.type(), QVariant::UserType); + QCOMPARE(userVar.userType(), qMetaTypeId()); QCOMPARE(userVar.typeName(), "MyType*"); QVERIFY(!userVar.isNull()); QVERIFY(!userVar.canConvert(QVariant::String)); - QVERIFY(!userVar.canConvert(QVariant::UserType)); QVariant userVar2(userVar); QVERIFY(userVar == userVar2); @@ -2457,20 +2467,63 @@ void tst_QVariant::invalidQColor() const QVERIFY(!qvariant_cast(va).isValid()); } -void tst_QVariant::qvariant_cast_QObject_data() { +class CustomQObject : public QObject { + Q_OBJECT +public: + CustomQObject(QObject *parent = 0) : QObject(parent) {} +}; +class CustomQWidget : public QWidget { + Q_OBJECT +public: + CustomQWidget(QWidget *parent = 0) : QWidget(parent) {} +}; +Q_DECLARE_METATYPE(CustomQObject*) +Q_DECLARE_METATYPE(CustomQWidget*) +class CustomNonQObject { }; +Q_DECLARE_METATYPE(CustomNonQObject) +Q_DECLARE_METATYPE(CustomNonQObject*) + +void tst_QVariant::cleanupTestCase() +{ + delete customNonQObjectPointer; + qDeleteAll(objectPointerTestData); +} + +void tst_QVariant::qvariant_cast_QObject_data() +{ QTest::addColumn("data"); QTest::addColumn("success"); - QObject *obj = new QObject(this); + QObject *obj = new QObject; obj->setObjectName(QString::fromLatin1("Hello")); QTest::newRow("from QObject") << QVariant(QMetaType::QObjectStar, &obj) << true; QTest::newRow("from QObject2") << QVariant::fromValue(obj) << true; QTest::newRow("from String") << QVariant(QLatin1String("1, 2, 3")) << false; QTest::newRow("from int") << QVariant((int) 123) << false; + QWidget *widget = new QWidget; + widget->setObjectName(QString::fromLatin1("Hello")); + QTest::newRow("from QWidget") << QVariant::fromValue(widget) << true; + CustomQObject *customObject = new CustomQObject(this); + customObject->setObjectName(QString::fromLatin1("Hello")); + QTest::newRow("from Derived QObject") << QVariant::fromValue(customObject) << true; + CustomQWidget *customWidget = new CustomQWidget; + customWidget->setObjectName(QString::fromLatin1("Hello")); + QTest::newRow("from Derived QWidget") << QVariant::fromValue(customWidget) << true; + QTest::newRow("from custom Object") << QVariant::fromValue(CustomNonQObject()) << false; + + // Deleted in cleanupTestCase. + customNonQObjectPointer = new CustomNonQObject; + QTest::newRow("from custom ObjectStar") << QVariant::fromValue(customNonQObjectPointer) << false; + + // Deleted in cleanupTestCase. + objectPointerTestData.push_back(obj); + objectPointerTestData.push_back(widget); + objectPointerTestData.push_back(customObject); + objectPointerTestData.push_back(customWidget); } - -void tst_QVariant::qvariant_cast_QObject() { +void tst_QVariant::qvariant_cast_QObject() +{ QFETCH(QVariant, data); QFETCH(bool, success); @@ -2481,6 +2534,38 @@ void tst_QVariant::qvariant_cast_QObject() { } } +class CustomQObjectDerived : public CustomQObject { + Q_OBJECT +public: + CustomQObjectDerived(QObject *parent = 0) : CustomQObject(parent) {} +}; +Q_DECLARE_METATYPE(CustomQObjectDerived*) + +void tst_QVariant::qvariant_cast_QObject_derived() +{ + { + CustomQObjectDerived *object = new CustomQObjectDerived(this); + QVariant data = QVariant::fromValue(object); + + QVERIFY(data.userType() == qMetaTypeId()); + + QCOMPARE(data.value(), object); + QCOMPARE(data.value(), object); + QCOMPARE(data.value(), object); + QVERIFY(data.value() == 0); + } + { + CustomQWidget customWidget; + QWidget *widget = &customWidget; + QVariant data = QVariant::fromValue(widget); + QVERIFY(data.userType() == QMetaType::QWidgetStar); + + QCOMPARE(data.value(), widget); + QCOMPARE(data.value(), widget); + QCOMPARE(data.value(), widget); + } +} + Q_DECLARE_METATYPE(qint8); void tst_QVariant::convertToQUint8() const @@ -2696,7 +2781,7 @@ Q_DECLARE_METATYPE( MyClass ) void tst_QVariant::loadUnknownUserType() { qRegisterMetaType("MyClass"); - char data[] = {0, 0, 0, 127, 0, 0, 0, 0, 8, 77, 121, 67, 108, 97, 115, 115, 0}; + char data[] = {0, 0, 1, 0, 0, 0, 0, 0, 8, 77, 121, 67, 108, 97, 115, 115, 0}; QByteArray ba(data, sizeof(data)); QDataStream ds(&ba, QIODevice::ReadOnly); @@ -3306,6 +3391,7 @@ void tst_QVariant::movabilityTest() memcpy(buffer, &variant, sizeof(QVariant)); QCOMPARE(buffer[0].type(), QVariant::UserType); + QCOMPARE(buffer[0].userType(), qMetaTypeId()); MyNotMovable tmp(buffer[0].value()); new (&variant) QVariant(); @@ -3365,12 +3451,8 @@ void tst_QVariant::colorInteger() } class Forward; -QT_BEGIN_NAMESPACE namespace QtPrivate { -template <> struct IsPointerToTypeDerivedFromQObject { - enum { Value = false }; -}; -} QT_END_NAMESPACE -Q_DECLARE_METATYPE(Forward*); +Q_DECLARE_OPAQUE_POINTER(Forward*) +Q_DECLARE_METATYPE(Forward*) void tst_QVariant::forwardDeclare() { @@ -3460,6 +3542,7 @@ void tst_QVariant::loadQVariantFromDataStream(QDataStream::Version version) stream >> typeName >> loadedVariant; const int id = QMetaType::type(typeName.toLatin1()); + QVariant constructedVariant(static_cast(id)); QCOMPARE(constructedVariant.userType(), id); QCOMPARE(QMetaType::typeName(loadedVariant.userType()), typeName.toLatin1().constData()); @@ -3534,7 +3617,7 @@ void tst_QVariant::debugStream_data() { QTest::addColumn("variant"); QTest::addColumn("typeId"); - for (int id = QMetaType::Void; id < QMetaType::User; ++id) { + for (int id = 0; id < QMetaType::User; ++id) { const char *tagName = QMetaType::typeName(id); if (!tagName) continue; diff --git a/tests/auto/corelib/mimetypes/mimetypes.pro b/tests/auto/corelib/mimetypes/mimetypes.pro new file mode 100644 index 00000000000..9063d677e73 --- /dev/null +++ b/tests/auto/corelib/mimetypes/mimetypes.pro @@ -0,0 +1,8 @@ +TEMPLATE=subdirs + +SUBDIRS = \ + qmimetype \ + qmimedatabase + +!contains(QT_CONFIG, private_tests): SUBDIRS -= \ + qmimetype diff --git a/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-cache/qmimedatabase-cache.pro b/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-cache/qmimedatabase-cache.pro new file mode 100644 index 00000000000..815401ce1e1 --- /dev/null +++ b/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-cache/qmimedatabase-cache.pro @@ -0,0 +1,12 @@ +CONFIG += testcase parallel_test + +TARGET = tst_qmimedatabase-cache + +QT = core testlib concurrent + +SOURCES = tst_qmimedatabase-cache.cpp +HEADERS = ../tst_qmimedatabase.h + +DEFINES += SRCDIR='"\\"$$PWD/../\\""' + +*-g++*:QMAKE_CXXFLAGS += -W -Wall -Wextra -Werror -Wshadow -Wno-long-long -Wnon-virtual-dtor diff --git a/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-cache/tst_qmimedatabase-cache.cpp b/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-cache/tst_qmimedatabase-cache.cpp new file mode 100644 index 00000000000..205331d4ddc --- /dev/null +++ b/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-cache/tst_qmimedatabase-cache.cpp @@ -0,0 +1,56 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "../tst_qmimedatabase.h" +#include +#include +#include +#include + +#include "../tst_qmimedatabase.cpp" + +tst_QMimeDatabase::tst_QMimeDatabase() +{ + QDir here = QDir::currentPath(); + const QString tempMime = here.absolutePath() + QString::fromLatin1("/mime"); + runUpdateMimeDatabase(tempMime); + QVERIFY(QFile::exists(tempMime + QString::fromLatin1("/mime.cache"))); +} diff --git a/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-xml/qmimedatabase-xml.pro b/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-xml/qmimedatabase-xml.pro new file mode 100644 index 00000000000..ac7515f7819 --- /dev/null +++ b/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-xml/qmimedatabase-xml.pro @@ -0,0 +1,14 @@ +CONFIG += testcase parallel_test + +TARGET = tst_qmimedatabase-xml + +QT = core testlib concurrent + +CONFIG += depend_includepath + +SOURCES += tst_qmimedatabase-xml.cpp +HEADERS += ../tst_qmimedatabase.h + +DEFINES += SRCDIR='"\\"$$PWD/../\\""' + +*-g++*:QMAKE_CXXFLAGS += -W -Wall -Wextra -Werror -Wshadow -Wno-long-long -Wnon-virtual-dtor diff --git a/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-xml/tst_qmimedatabase-xml.cpp b/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-xml/tst_qmimedatabase-xml.cpp new file mode 100644 index 00000000000..13ca372290a --- /dev/null +++ b/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-xml/tst_qmimedatabase-xml.cpp @@ -0,0 +1,51 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "../tst_qmimedatabase.h" +#include +#include + +tst_QMimeDatabase::tst_QMimeDatabase() +{ + qputenv("QT_NO_MIME_CACHE", "1"); +} + +#include "../tst_qmimedatabase.cpp" diff --git a/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase.pro b/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase.pro new file mode 100644 index 00000000000..876b4377dd0 --- /dev/null +++ b/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase.pro @@ -0,0 +1,3 @@ +TEMPLATE = subdirs +SUBDIRS = qmimedatabase-xml +unix: SUBDIRS += qmimedatabase-cache diff --git a/tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp b/tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp new file mode 100644 index 00000000000..fc86fa5431d --- /dev/null +++ b/tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp @@ -0,0 +1,834 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include + +#include "qstandardpaths.h" + +#include +#include +#include + +#include + +void initializeLang() +{ + qputenv("LANG", "en_US"); +} + +// Set LANG before QCoreApplication is created +Q_CONSTRUCTOR_FUNCTION(initializeLang) + +void tst_QMimeDatabase::initTestCase() +{ + // Create a "global" and a "local" XDG data dir, right here. + // The local dir will be empty initially, while the global dir will contain a copy of freedesktop.org.xml + + QDir here = QDir::currentPath(); + + qputenv("XDG_DATA_DIRS", QFile::encodeName(here.absolutePath())); + QDir(here.absolutePath() + "/mime").removeRecursively(); + here.mkpath(QString::fromLatin1("mime/packages")); + + QFile xml(QFile::decodeName(SRCDIR "../../../src/mimetypes/mime/packages/freedesktop.org.xml")); + const QString mimeDir = here.absolutePath() + QLatin1String("/mime"); + xml.copy(mimeDir + QLatin1String("/packages/freedesktop.org.xml")); + + m_dataHome = here.absolutePath() + QLatin1String("/../datahome"); + qputenv("XDG_DATA_HOME", QFile::encodeName(m_dataHome)); + //qDebug() << "XDG_DATA_HOME=" << m_dataHome; + + // Make sure we start clean + cleanupTestCase(); +} + +void tst_QMimeDatabase::cleanupTestCase() +{ + QDir here = QDir::currentPath(); + here.remove(QString::fromLatin1("mime/packages/yast2-metapackage-handler-mimetypes.xml")); + + QDir(m_dataHome).removeRecursively(); +} + +void tst_QMimeDatabase::mimeTypeForName() +{ + QMimeDatabase db; + QMimeType s0 = db.mimeTypeForName(QString::fromLatin1("application/x-zerosize")); + QVERIFY(s0.isValid()); + QCOMPARE(s0.name(), QString::fromLatin1("application/x-zerosize")); + QCOMPARE(s0.comment(), QString::fromLatin1("empty document")); + + QMimeType s0Again = db.mimeTypeForName(QString::fromLatin1("application/x-zerosize")); + QCOMPARE(s0Again.name(), s0.name()); + + QMimeType s1 = db.mimeTypeForName(QString::fromLatin1("text/plain")); + QVERIFY(s1.isValid()); + QCOMPARE(s1.name(), QString::fromLatin1("text/plain")); + //qDebug("Comment is %s", qPrintable(s1.comment())); + + QMimeType krita = db.mimeTypeForName(QString::fromLatin1("application/x-krita")); + QVERIFY(krita.isValid()); + + // Test parsing with application/rdf+xml which has the english comment after the other ones + QMimeType rdf = db.mimeTypeForName(QString::fromLatin1("application/rdf+xml")); + QVERIFY(rdf.isValid()); + QCOMPARE(rdf.comment(), QString::fromLatin1("RDF file")); + + QMimeType bzip2 = db.mimeTypeForName(QString::fromLatin1("application/x-bzip2")); + QVERIFY(bzip2.isValid()); + QCOMPARE(bzip2.comment(), QString::fromLatin1("Bzip archive")); + + QMimeType defaultMime = db.mimeTypeForName(QString::fromLatin1("application/octet-stream")); + QVERIFY(defaultMime.isValid()); + QVERIFY(defaultMime.isDefault()); + + QMimeType doesNotExist = db.mimeTypeForName(QString::fromLatin1("foobar/x-doesnot-exist")); + QVERIFY(!doesNotExist.isValid()); + + // TODO move to findByFile +#ifdef Q_OS_LINUX + QString exePath = QStandardPaths::findExecutable(QLatin1String("ls")); + if (exePath.isEmpty()) + qWarning() << "ls not found"; + else { + const QString executableType = QString::fromLatin1("application/x-executable"); + //QTest::newRow("executable") << exePath << executableType; + QCOMPARE(db.mimeTypeForFile(exePath).name(), executableType); + } +#endif + +} + +void tst_QMimeDatabase::mimeTypeForFileName_data() +{ + QTest::addColumn("fileName"); + QTest::addColumn("expectedMimeType"); + + QTest::newRow("text") << "textfile.txt" << "text/plain"; + QTest::newRow("case-insensitive search") << "textfile.TxT" << "text/plain"; + + // Needs shared-mime-info > 0.91. Earlier versions wrote .Z to the mime.cache file... + //QTest::newRow("case-insensitive match on a non-lowercase glob") << "foo.z" << "application/x-compress"; + + QTest::newRow("case-sensitive uppercase match") << "textfile.C" << "text/x-c++src"; + QTest::newRow("case-sensitive lowercase match") << "textfile.c" << "text/x-csrc"; + QTest::newRow("case-sensitive long-extension match") << "foo.PS.gz" << "application/x-gzpostscript"; + QTest::newRow("case-sensitive-only match") << "core" << "application/x-core"; + QTest::newRow("case-sensitive-only match") << "Core" << "application/octet-stream"; // #198477 + + QTest::newRow("desktop file") << "foo.desktop" << "application/x-desktop"; + QTest::newRow("old kdelnk file is x-desktop too") << "foo.kdelnk" << "application/x-desktop"; + QTest::newRow("double-extension file") << "foo.tar.bz2" << "application/x-bzip-compressed-tar"; + QTest::newRow("single-extension file") << "foo.bz2" << "application/x-bzip"; + QTest::newRow(".doc should assume msword") << "somefile.doc" << "application/msword"; // #204139 + QTest::newRow("glob that uses [] syntax, 1") << "Makefile" << "text/x-makefile"; + QTest::newRow("glob that uses [] syntax, 2") << "makefile" << "text/x-makefile"; + QTest::newRow("glob that ends with *, no extension") << "README" << "text/x-readme"; + QTest::newRow("glob that ends with *, extension") << "README.foo" << "text/x-readme"; + QTest::newRow("glob that ends with *, also matches *.txt. Higher weight wins.") << "README.txt" << "text/plain"; + QTest::newRow("glob that ends with *, also matches *.nfo. Higher weight wins.") << "README.nfo" << "text/x-nfo"; + // fdo bug 15436, needs shared-mime-info >= 0.40 (and this tests the globs2-parsing code). + QTest::newRow("glob that ends with *, also matches *.pdf. *.pdf has higher weight") << "README.pdf" << "application/pdf"; + QTest::newRow("directory") << "/" << "inode/directory"; + QTest::newRow("doesn't exist, no extension") << "IDontExist" << "application/octet-stream"; + QTest::newRow("doesn't exist but has known extension") << "IDontExist.txt" << "text/plain"; +} + +void tst_QMimeDatabase::mimeTypeForFileName() +{ + QFETCH(QString, fileName); + QFETCH(QString, expectedMimeType); + QMimeDatabase db; + QMimeType mime = db.mimeTypeForFile(fileName, QMimeDatabase::MatchExtension); + QVERIFY(mime.isValid()); + QCOMPARE(mime.name(), expectedMimeType); + + QList mimes = db.mimeTypesForFileName(fileName); + if (expectedMimeType == "application/octet-stream") { + QVERIFY(mimes.isEmpty()); + } else { + QVERIFY(!mimes.isEmpty()); + QCOMPARE(mimes.count(), 1); + QCOMPARE(mimes.first().name(), expectedMimeType); + } +} + +void tst_QMimeDatabase::mimeTypesForFileName_data() +{ + QTest::addColumn("fileName"); + QTest::addColumn("expectedMimeTypes"); + + QTest::newRow("txt, 1 hit") << "foo.txt" << (QStringList() << "text/plain"); + QTest::newRow("txtfoobar, 0 hit") << "foo.foobar" << QStringList(); + QTest::newRow("m, 2 hits") << "foo.m" << (QStringList() << "text/x-matlab" << "text/x-objcsrc"); + QTest::newRow("sub, 3 hits") << "foo.sub" << (QStringList() << "text/x-microdvd" << "text/x-mpsub" << "text/x-subviewer"); +} + +void tst_QMimeDatabase::mimeTypesForFileName() +{ + QFETCH(QString, fileName); + QFETCH(QStringList, expectedMimeTypes); + QMimeDatabase db; + QList mimes = db.mimeTypesForFileName(fileName); + QStringList mimeNames; + foreach (const QMimeType &mime, mimes) + mimeNames.append(mime.name()); + QCOMPARE(mimeNames, expectedMimeTypes); +} + +void tst_QMimeDatabase::inheritance() +{ + QMimeDatabase db; + + // All file-like mimetypes inherit from octet-stream + const QMimeType wordperfect = db.mimeTypeForName(QString::fromLatin1("application/vnd.wordperfect")); + QVERIFY(wordperfect.isValid()); + QCOMPARE(wordperfect.parentMimeTypes().join(QString::fromLatin1(",")), QString::fromLatin1("application/octet-stream")); + QVERIFY(wordperfect.inherits(QLatin1String("application/octet-stream"))); + + QVERIFY(db.mimeTypeForName(QString::fromLatin1("image/svg+xml-compressed")).inherits(QLatin1String("application/x-gzip"))); + + // Check that msword derives from ole-storage + const QMimeType msword = db.mimeTypeForName(QString::fromLatin1("application/msword")); + QVERIFY(msword.isValid()); + const QMimeType olestorage = db.mimeTypeForName(QString::fromLatin1("application/x-ole-storage")); + QVERIFY(olestorage.isValid()); + QVERIFY(msword.inherits(olestorage.name())); + QVERIFY(msword.inherits(QLatin1String("application/octet-stream"))); + + const QMimeType directory = db.mimeTypeForName(QString::fromLatin1("inode/directory")); + QVERIFY(directory.isValid()); + QCOMPARE(directory.parentMimeTypes().count(), 0); + QVERIFY(!directory.inherits(QLatin1String("application/octet-stream"))); + + // Check that text/x-patch knows that it inherits from text/plain (it says so explicitly) + const QMimeType plain = db.mimeTypeForName(QString::fromLatin1("text/plain")); + const QMimeType derived = db.mimeTypeForName(QString::fromLatin1("text/x-patch")); + QVERIFY(derived.isValid()); + QCOMPARE(derived.parentMimeTypes().join(QString::fromLatin1(",")), plain.name()); + QVERIFY(derived.inherits(QLatin1String("text/plain"))); + QVERIFY(derived.inherits(QLatin1String("application/octet-stream"))); + + // Check that application/x-shellscript inherits from application/x-executable + // (Otherwise KRun cannot start shellscripts...) + // This is a test for multiple inheritance... + const QMimeType shellscript = db.mimeTypeForName(QString::fromLatin1("application/x-shellscript")); + QVERIFY(shellscript.isValid()); + QVERIFY(shellscript.inherits(QLatin1String("text/plain"))); + QVERIFY(shellscript.inherits(QLatin1String("application/x-executable"))); + const QStringList shellParents = shellscript.parentMimeTypes(); + QVERIFY(shellParents.contains(QLatin1String("text/plain"))); + QVERIFY(shellParents.contains(QLatin1String("application/x-executable"))); + QCOMPARE(shellParents.count(), 2); // only the above two + const QStringList allShellAncestors = shellscript.allAncestors(); + QVERIFY(allShellAncestors.contains(QLatin1String("text/plain"))); + QVERIFY(allShellAncestors.contains(QLatin1String("application/x-executable"))); + QVERIFY(allShellAncestors.contains(QLatin1String("application/octet-stream"))); + // Must be least-specific last, i.e. breadth first. + QCOMPARE(allShellAncestors.last(), QString::fromLatin1("application/octet-stream")); + + const QStringList allSvgAncestors = db.mimeTypeForName(QString::fromLatin1("image/svg+xml")).allAncestors(); + QCOMPARE(allSvgAncestors, QStringList() << QLatin1String("application/xml") << QLatin1String("text/plain") << QLatin1String("application/octet-stream")); + + // Check that text/x-mrml knows that it inherits from text/plain (implicitly) + const QMimeType mrml = db.mimeTypeForName(QString::fromLatin1("text/x-mrml")); + QVERIFY(mrml.isValid()); + QVERIFY(mrml.inherits(QLatin1String("text/plain"))); + QVERIFY(mrml.inherits(QLatin1String("application/octet-stream"))); + + // Check that msword-template inherits msword + const QMimeType mswordTemplate = db.mimeTypeForName(QString::fromLatin1("application/msword-template")); + QVERIFY(mswordTemplate.isValid()); + QVERIFY(mswordTemplate.inherits(QLatin1String("application/msword"))); +} + +void tst_QMimeDatabase::aliases() +{ + QMimeDatabase db; + + const QMimeType canonical = db.mimeTypeForName(QString::fromLatin1("application/xml")); + QVERIFY(canonical.isValid()); + + QMimeType resolvedAlias = db.mimeTypeForName(QString::fromLatin1("text/xml")); + QVERIFY(resolvedAlias.isValid()); + QCOMPARE(resolvedAlias.name(), QString::fromLatin1("application/xml")); + + QVERIFY(resolvedAlias.inherits(QLatin1String("application/xml"))); + QVERIFY(canonical.inherits(QLatin1String("text/xml"))); + + // Test for kde bug 197346: does nspluginscan see that audio/mp3 already exists? + bool mustWriteMimeType = !db.mimeTypeForName(QString::fromLatin1("audio/mp3")).isValid(); + QVERIFY(!mustWriteMimeType); +} + +void tst_QMimeDatabase::icons() +{ + QMimeDatabase db; + QMimeType directory = db.mimeTypeForFile(QString::fromLatin1("/")); + QCOMPARE(directory.name(), QString::fromLatin1("inode/directory")); + QCOMPARE(directory.iconName(), QString::fromLatin1("inode-directory")); + QCOMPARE(directory.genericIconName(), QString::fromLatin1("inode-x-generic")); + + QMimeType pub = db.mimeTypeForFile(QString::fromLatin1("foo.epub"), QMimeDatabase::MatchExtension); + QCOMPARE(pub.name(), QString::fromLatin1("application/epub+zip")); + QCOMPARE(pub.iconName(), QString::fromLatin1("application-epub+zip")); + QCOMPARE(pub.genericIconName(), QString::fromLatin1("x-office-document")); +} + +// In here we do the tests that need some content in a temporary file. +// This could also be added to shared-mime-info's testsuite... +void tst_QMimeDatabase::mimeTypeForFileWithContent() +{ + QMimeDatabase db; + QMimeType mime; + + // Test a real PDF file. + // If we find x-matlab because it starts with '%' then we are not ordering by priority. + QTemporaryFile tempFile; + QVERIFY(tempFile.open()); + QString tempFileName = tempFile.fileName(); + tempFile.write("%PDF-"); + tempFile.close(); + mime = db.mimeTypeForFile(tempFileName); + QCOMPARE(mime.name(), QString::fromLatin1("application/pdf")); + QFile file(tempFileName); + mime = db.mimeTypeForData(&file); // QIODevice ctor + QCOMPARE(mime.name(), QString::fromLatin1("application/pdf")); + // by name only, we cannot find the mimetype + mime = db.mimeTypeForFile(tempFileName, QMimeDatabase::MatchExtension); + QVERIFY(mime.isValid()); + QVERIFY(mime.isDefault()); + + // Test the case where the extension doesn't match the contents: extension wins + { + QTemporaryFile txtTempFile(QDir::tempPath() + QLatin1String("/tst_QMimeDatabase_XXXXXX.txt")); + QVERIFY(txtTempFile.open()); + txtTempFile.write("%PDF-"); + QString txtTempFileName = txtTempFile.fileName(); + txtTempFile.close(); + mime = db.mimeTypeForFile(txtTempFileName); + QCOMPARE(mime.name(), QString::fromLatin1("text/plain")); + // fast mode finds the same + mime = db.mimeTypeForFile(txtTempFileName, QMimeDatabase::MatchExtension); + QCOMPARE(mime.name(), QString::fromLatin1("text/plain")); + } + + // Now the case where extension differs from contents, but contents has >80 magic rule + // XDG spec says: contents wins. But we can't sniff all files... + { + QTemporaryFile txtTempFile(QDir::tempPath() + QLatin1String("/tst_QMimeDatabase_XXXXXX.txt")); + QVERIFY(txtTempFile.open()); + txtTempFile.write("("data"); + QTest::addColumn("expectedMimeTypeName"); + + QTest::newRow("tnef data, needs smi >= 0.20") << QByteArray("\x78\x9f\x3e\x22") << "application/vnd.ms-tnef"; + QTest::newRow("PDF magic") << QByteArray("%PDF-") << "application/pdf"; + QTest::newRow("PHP, High-priority rule") << QByteArray("("name"); + QTest::addColumn("data"); + QTest::addColumn("expectedMimeTypeName"); + + QTest::newRow("plain text, no extension") << QString::fromLatin1("textfile") << QByteArray("Hello world") << "text/plain"; + QTest::newRow("plain text, unknown extension") << QString::fromLatin1("textfile.foo") << QByteArray("Hello world") << "text/plain"; + // Needs kde/mimetypes.xml + //QTest::newRow("plain text, doc extension") << QString::fromLatin1("textfile.doc") << QByteArray("Hello world") << "text/plain"; + + // If you get powerpoint instead, then you're hit by https://bugs.freedesktop.org/show_bug.cgi?id=435, + // upgrade to shared-mime-info >= 0.22 + const QByteArray oleData("\320\317\021\340\241\261\032\341"); // same as \xD0\xCF\x11\xE0 \xA1\xB1\x1A\xE1 + QTest::newRow("msword file, unknown extension") << QString::fromLatin1("mswordfile") << oleData << "application/x-ole-storage"; + QTest::newRow("excel file, found by extension") << QString::fromLatin1("excelfile.xls") << oleData << "application/vnd.ms-excel"; + QTest::newRow("text.xls, found by extension, user is in control") << QString::fromLatin1("text.xls") << oleData << "application/vnd.ms-excel"; +} + +void tst_QMimeDatabase::mimeTypeForFileAndContent() +{ + QFETCH(QString, name); + QFETCH(QByteArray, data); + QFETCH(QString, expectedMimeTypeName); + + QMimeDatabase db; + QCOMPARE(db.mimeTypeForNameAndData(name, data).name(), expectedMimeTypeName); + + QBuffer buffer(&data); + QCOMPARE(db.mimeTypeForNameAndData(name, &buffer).name(), expectedMimeTypeName); + QVERIFY(!buffer.isOpen()); // initial state was restored + + QVERIFY(buffer.open(QIODevice::ReadOnly)); + QCOMPARE(db.mimeTypeForNameAndData(name, &buffer).name(), expectedMimeTypeName); + QVERIFY(buffer.isOpen()); + QCOMPARE(buffer.pos(), qint64(0)); +} + +void tst_QMimeDatabase::allMimeTypes() +{ + QMimeDatabase db; + const QList lst = db.allMimeTypes(); // does NOT include aliases + QVERIFY(!lst.isEmpty()); + + // Hardcoding this is the only way to check both providers find the same number of mimetypes. + QCOMPARE(lst.count(), 661); + + foreach (const QMimeType &mime, lst) { + const QString name = mime.name(); + QVERIFY(!name.isEmpty()); + QCOMPARE(name.count(QLatin1Char('/')), 1); + const QMimeType lookedupMime = db.mimeTypeForName(name); + QVERIFY(lookedupMime.isValid()); + QCOMPARE(lookedupMime.name(), name); // if this fails, you have an alias defined as a real mimetype too! + } +} + +void tst_QMimeDatabase::inheritsPerformance() +{ + // Check performance of inherits(). + // This benchmark (which started in 2009 in kmimetypetest.cpp) uses 40 mimetypes. + QStringList mimeTypes; mimeTypes << QLatin1String("image/jpeg") << QLatin1String("image/png") << QLatin1String("image/tiff") << QLatin1String("text/plain") << QLatin1String("text/html"); + mimeTypes += mimeTypes; + mimeTypes += mimeTypes; + mimeTypes += mimeTypes; + QCOMPARE(mimeTypes.count(), 40); + QMimeDatabase db; + QMimeType mime = db.mimeTypeForName(QString::fromLatin1("text/x-chdr")); + QVERIFY(mime.isValid()); + QBENCHMARK { + QString match; + foreach (const QString &mt, mimeTypes) { + if (mime.inherits(mt)) { + match = mt; + // of course there would normally be a "break" here, but we're testing worse-case + // performance here + } + } + QCOMPARE(match, QString::fromLatin1("text/plain")); + } + // Numbers from 2011, in release mode: + // KDE 4.7 numbers: 0.21 msec / 494,000 ticks / 568,345 instr. loads per iteration + // QMimeBinaryProvider (with Qt 5): 0.16 msec / NA / 416,049 instr. reads per iteration + // QMimeXmlProvider (with Qt 5): 0.062 msec / NA / 172,889 instr. reads per iteration + // (but the startup time is way higher) + // And memory usage is flat at 200K with QMimeBinaryProvider, while it peaks at 6 MB when + // parsing XML, and then keeps being around 4.5 MB for all the in-memory hashes. +} + +void tst_QMimeDatabase::suffixes_data() +{ + QTest::addColumn("mimeType"); + QTest::addColumn("patterns"); + QTest::addColumn("preferredSuffix"); + + QTest::newRow("mimetype with a single pattern") << "application/pdf" << "*.pdf" << "pdf"; + QTest::newRow("mimetype with multiple patterns") << "application/x-kpresenter" << "*.kpr;*.kpt" << "kpr"; + //if (KMimeType::sharedMimeInfoVersion() > KDE_MAKE_VERSION(0, 60, 0)) { + QTest::newRow("mimetype with many patterns") << "application/vnd.wordperfect" << "*.wp;*.wp4;*.wp5;*.wp6;*.wpd;*.wpp" << "wp"; + //} + QTest::newRow("oasis text mimetype") << "application/vnd.oasis.opendocument.text" << "*.odt" << "odt"; + QTest::newRow("oasis presentation mimetype") << "application/vnd.oasis.opendocument.presentation" << "*.odp" << "odp"; + QTest::newRow("mimetype with multiple patterns") << "text/plain" << "*.asc;*.txt;*,v" << "txt"; + QTest::newRow("mimetype with uncommon pattern") << "text/x-readme" << "README*" << QString(); + QTest::newRow("mimetype with no patterns") << "application/x-ole-storage" << QString() << QString(); +} + +void tst_QMimeDatabase::suffixes() +{ + QFETCH(QString, mimeType); + QFETCH(QString, patterns); + QFETCH(QString, preferredSuffix); + QMimeDatabase db; + QMimeType mime = db.mimeTypeForName(mimeType); + QVERIFY(mime.isValid()); + // Sort both lists; order is unreliable since shared-mime-info uses hashes internally. + QStringList expectedPatterns = patterns.split(QLatin1Char(';')); + expectedPatterns.sort(); + QStringList mimePatterns = mime.globPatterns(); + mimePatterns.sort(); + QCOMPARE(mimePatterns.join(QLatin1String(";")), expectedPatterns.join(QLatin1String(";"))); + QCOMPARE(mime.preferredSuffix(), preferredSuffix); +} + +void tst_QMimeDatabase::knownSuffix() +{ + QMimeDatabase db; + QCOMPARE(db.suffixForFileName(QString::fromLatin1("foo.tar")), QString::fromLatin1("tar")); + QCOMPARE(db.suffixForFileName(QString::fromLatin1("foo.bz2")), QString::fromLatin1("bz2")); + QCOMPARE(db.suffixForFileName(QString::fromLatin1("foo.bar.bz2")), QString::fromLatin1("bz2")); + QCOMPARE(db.suffixForFileName(QString::fromLatin1("foo.tar.bz2")), QString::fromLatin1("tar.bz2")); +} + +void tst_QMimeDatabase::findByFileName_data() +{ + QTest::addColumn("filePath"); + QTest::addColumn("mimeTypeName"); + QTest::addColumn("xFail"); + + QString prefix = QLatin1String(SRCDIR "testfiles/"); + + QFile f(prefix + QLatin1String("list")); + if (!f.open(QIODevice::ReadOnly)) { + const QString warning = QString::fromLatin1( + "Please download the shared-mime-info test suite:\n" + "cd tests/auto/corelib/mimetypes/qmimedatabase\n" + "wget http://cgit.freedesktop.org/xdg/shared-mime-info/snapshot/Release-1-0.zip\n" + "unzip Release-1-0.zip\n" + "ln -s Release-1-0/tests testfiles\n" + ); + qWarning() << warning; + QSKIP("shared-mime-info test suite not available."); + } + + QByteArray line(1024, Qt::Uninitialized); + + while (!f.atEnd()) { + int len = f.readLine(line.data(), 1023); + + if (len <= 2 || line.at(0) == '#') + continue; + + QString string = QString::fromLatin1(line.constData(), len - 1).trimmed(); + QStringList list = string.split(QLatin1Char(' '), QString::SkipEmptyParts); + QVERIFY(list.size() >= 2); + + QString filePath = list.at(0); + QString mimeTypeType = list.at(1); + QString xFail; + if (list.size() >= 3) + xFail = list.at(2); + + QTest::newRow(filePath.toLatin1().constData()) << QString(prefix + filePath) << mimeTypeType << xFail; + } +} + +void tst_QMimeDatabase::findByFileName() +{ + QFETCH(QString, filePath); + QFETCH(QString, mimeTypeName); + QFETCH(QString, xFail); + + QMimeDatabase database; + + //qDebug() << Q_FUNC_INFO << filePath; + + const QMimeType resultMimeType(database.mimeTypeForFile(filePath, QMimeDatabase::MatchExtension)); + if (resultMimeType.isValid()) { + //qDebug() << Q_FUNC_INFO << "MIME type" << resultMimeType.name() << "has generic icon name" << resultMimeType.genericIconName() << "and icon name" << resultMimeType.iconName(); + +// Loading icons depend on the icon theme, we can't enable this test +#if 0 + QCOMPARE(resultMimeType.genericIconName(), QIcon::fromTheme(resultMimeType.genericIconName()).name()); + QVERIFY2(!QIcon::fromTheme(resultMimeType.genericIconName()).isNull(), qPrintable(resultMimeType.genericIconName())); + QVERIFY2(QIcon::hasThemeIcon(resultMimeType.genericIconName()), qPrintable(resultMimeType.genericIconName())); + + QCOMPARE(resultMimeType.iconName(), QIcon::fromTheme(resultMimeType.iconName()).name()); + QVERIFY2(!QIcon::fromTheme(resultMimeType.iconName()).isNull(), qPrintable(resultMimeType.iconName())); + QVERIFY2(QIcon::hasThemeIcon(resultMimeType.iconName()), qPrintable(resultMimeType.iconName())); +#endif + } + const QString resultMimeTypeName = resultMimeType.name(); + //qDebug() << Q_FUNC_INFO << "mimeTypeForFile() returned" << resultMimeTypeName; + + const bool failed = resultMimeTypeName != mimeTypeName; + const bool shouldFail = (xFail.length() >= 1 && xFail.at(0) == QLatin1Char('x')); + if (shouldFail != failed) { + // Results are ambiguous when multiple MIME types have the same glob + // -> accept the current result if the found MIME type actually + // matches the file's extension. + // TODO: a better file format in testfiles/list! + const QMimeType foundMimeType = database.mimeTypeForName(resultMimeTypeName); + QVERIFY2(resultMimeType == foundMimeType, qPrintable(resultMimeType.name() + QString::fromLatin1(" vs. ") + foundMimeType.name())); + if (foundMimeType.isValid()) { + const QString extension = QFileInfo(filePath).suffix(); + //qDebug() << Q_FUNC_INFO << "globPatterns:" << foundMimeType.globPatterns() << "- extension:" << QString() + "*." + extension; + if (foundMimeType.globPatterns().contains(QString::fromLatin1("*.") + extension)) + return; + } + } + if (shouldFail) { + // Expected to fail + QVERIFY2(resultMimeTypeName != mimeTypeName, qPrintable(resultMimeTypeName)); + } else { + QCOMPARE(resultMimeTypeName, mimeTypeName); + } + + // Test QFileInfo overload + const QMimeType mimeForFileInfo = database.mimeTypeForFile(QFileInfo(filePath), QMimeDatabase::MatchExtension); + QCOMPARE(mimeForFileInfo.name(), resultMimeTypeName); +} + +void tst_QMimeDatabase::findByData_data() +{ + findByFileName_data(); +} + +void tst_QMimeDatabase::findByData() +{ + QFETCH(QString, filePath); + QFETCH(QString, mimeTypeName); + QFETCH(QString, xFail); + + QMimeDatabase database; + QFile f(filePath); + QVERIFY(f.open(QIODevice::ReadOnly)); + QByteArray data = f.read(16384); + + const QString resultMimeTypeName = database.mimeTypeForData(data).name(); + if (xFail.length() >= 2 && xFail.at(1) == QLatin1Char('x')) { + // Expected to fail + QVERIFY2(resultMimeTypeName != mimeTypeName, qPrintable(resultMimeTypeName)); + } else { + QCOMPARE(resultMimeTypeName, mimeTypeName); + } + + QFileInfo info(filePath); + QString mimeForInfo = database.mimeTypeForFile(info, QMimeDatabase::MatchContent).name(); + QCOMPARE(mimeForInfo, resultMimeTypeName); +} + +void tst_QMimeDatabase::findByFile_data() +{ + findByFileName_data(); +} + +void tst_QMimeDatabase::findByFile() +{ + QFETCH(QString, filePath); + QFETCH(QString, mimeTypeName); + QFETCH(QString, xFail); + + QMimeDatabase database; + const QString resultMimeTypeName = database.mimeTypeForFile(filePath).name(); + //qDebug() << Q_FUNC_INFO << filePath << "->" << resultMimeTypeName; + if (xFail.length() >= 3 && xFail.at(2) == QLatin1Char('x')) { + // Expected to fail + QVERIFY2(resultMimeTypeName != mimeTypeName, qPrintable(resultMimeTypeName)); + } else { + QCOMPARE(resultMimeTypeName, mimeTypeName); + } + + // Test QFileInfo overload + const QMimeType mimeForFileInfo = database.mimeTypeForFile(QFileInfo(filePath)); + QCOMPARE(mimeForFileInfo.name(), resultMimeTypeName); +} + + +void tst_QMimeDatabase::fromThreads() +{ + QThreadPool::globalInstance()->setMaxThreadCount(20); + // Note that data-based tests cannot be used here (QTest::fetchData asserts). + QList > futures; + futures << QtConcurrent::run(this, &tst_QMimeDatabase::mimeTypeForName); + futures << QtConcurrent::run(this, &tst_QMimeDatabase::aliases); + futures << QtConcurrent::run(this, &tst_QMimeDatabase::allMimeTypes); + futures << QtConcurrent::run(this, &tst_QMimeDatabase::icons); + futures << QtConcurrent::run(this, &tst_QMimeDatabase::inheritance); + futures << QtConcurrent::run(this, &tst_QMimeDatabase::knownSuffix); + futures << QtConcurrent::run(this, &tst_QMimeDatabase::mimeTypeForFileWithContent); + futures << QtConcurrent::run(this, &tst_QMimeDatabase::allMimeTypes); // a second time + Q_FOREACH (QFuture f, futures) + f.waitForFinished(); +} + +static bool runUpdateMimeDatabase(const QString &path) // TODO make it a QMimeDatabase method? +{ + const QString umd = QStandardPaths::findExecutable(QString::fromLatin1("update-mime-database")); + if (umd.isEmpty()) + return false; + + QProcess proc; + proc.setProcessChannelMode(QProcess::MergedChannels); // silence output + proc.start(umd, QStringList() << path); + proc.waitForFinished(); + //qDebug() << "runUpdateMimeDatabase" << path; + return true; +} + +static bool waitAndRunUpdateMimeDatabase(const QString &path) +{ + QFileInfo mimeCacheInfo(path + QString::fromLatin1("/mime.cache")); + if (mimeCacheInfo.exists()) { + // Wait until the begining of the next second + while (mimeCacheInfo.lastModified().secsTo(QDateTime::currentDateTime()) == 0) { + QTest::qSleep(200); + } + } + return runUpdateMimeDatabase(path); +} + +static void checkHasMimeType(const QString &mimeType) +{ + QMimeDatabase db; + QVERIFY(db.mimeTypeForName(mimeType).isValid()); + + bool found = false; + foreach (const QMimeType &mt, db.allMimeTypes()) { + if (mt.name() == mimeType) { + found = true; + break; + } + } + QVERIFY(found); +} + +QT_BEGIN_NAMESPACE +extern Q_CORE_EXPORT int qmime_secondsBetweenChecks; // see qmimeprovider.cpp +QT_END_NAMESPACE + +void tst_QMimeDatabase::installNewGlobalMimeType() +{ + qmime_secondsBetweenChecks = 0; + + QMimeDatabase db; + QVERIFY(!db.mimeTypeForName(QLatin1String("text/x-suse-ymp")).isValid()); + + const QString fileName = QLatin1String("yast2-metapackage-handler-mimetypes.xml"); + const QString srcFile = QFile::decodeName(SRCDIR) + fileName; + + QDir here = QDir::currentPath(); + const QString mimeDir = here.absolutePath() + QLatin1String("/mime"); + const QString destDir = mimeDir + QLatin1String("/packages/"); + const QString destFile = destDir + fileName; + QFile::remove(destFile); + //qDebug() << destFile; + QVERIFY(QFile::copy(srcFile, destFile)); + if (!waitAndRunUpdateMimeDatabase(mimeDir)) + QSKIP("shared-mime-info not found, skipping mime.cache test"); + + QCOMPARE(db.mimeTypeForFile(QLatin1String("foo.ymu"), QMimeDatabase::MatchExtension).name(), + QString::fromLatin1("text/x-suse-ymu")); + QVERIFY(db.mimeTypeForName(QLatin1String("text/x-suse-ymp")).isValid()); + checkHasMimeType("text/x-suse-ymp"); + + // Now test removing it again + QFile::remove(destFile); + if (!waitAndRunUpdateMimeDatabase(mimeDir)) + QSKIP("shared-mime-info not found, skipping mime.cache test"); + QCOMPARE(db.mimeTypeForFile(QLatin1String("foo.ymu"), QMimeDatabase::MatchExtension).name(), + QString::fromLatin1("application/octet-stream")); + QVERIFY(!db.mimeTypeForName(QLatin1String("text/x-suse-ymp")).isValid()); +} + +void tst_QMimeDatabase::installNewLocalMimeType() +{ + qmime_secondsBetweenChecks = 0; + + QMimeDatabase db; + QVERIFY(!db.mimeTypeForName(QLatin1String("text/x-suse-ymp")).isValid()); + + const QString fileName = QLatin1String("yast2-metapackage-handler-mimetypes.xml"); + const QString srcFile = QFile::decodeName(SRCDIR) + fileName; + const QString mimeDir = m_dataHome + QLatin1String("/mime"); + const QString destDir = mimeDir + QLatin1String("/packages/"); + QDir().mkpath(destDir); + const QString destFile = destDir + fileName; + QFile::remove(destFile); + QVERIFY(QFile::copy(srcFile, destFile)); + if (!runUpdateMimeDatabase(mimeDir)) + QSKIP("shared-mime-info not found, skipping mime.cache test");; + + QCOMPARE(db.mimeTypeForFile(QLatin1String("foo.ymu"), QMimeDatabase::MatchExtension).name(), + QString::fromLatin1("text/x-suse-ymu")); + QVERIFY(db.mimeTypeForName(QLatin1String("text/x-suse-ymp")).isValid()); + checkHasMimeType("text/x-suse-ymp"); + + // Now test removing it again (note, this leaves a mostly-empty mime.cache file) + QFile::remove(destFile); + if (!waitAndRunUpdateMimeDatabase(mimeDir)) + QSKIP("shared-mime-info not found, skipping mime.cache test"); + QCOMPARE(db.mimeTypeForFile(QLatin1String("foo.ymu"), QMimeDatabase::MatchExtension).name(), + QString::fromLatin1("application/octet-stream")); + QVERIFY(!db.mimeTypeForName(QLatin1String("text/x-suse-ymp")).isValid()); + + // And now the user goes wild and uses rm -rf + QFile::remove(mimeDir + QString::fromLatin1("/mime.cache")); + QCOMPARE(db.mimeTypeForFile(QLatin1String("foo.ymu"), QMimeDatabase::MatchExtension).name(), + QString::fromLatin1("application/octet-stream")); + QVERIFY(!db.mimeTypeForName(QLatin1String("text/x-suse-ymp")).isValid()); +} + +QTEST_GUILESS_MAIN(tst_QMimeDatabase) diff --git a/tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.h b/tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.h new file mode 100644 index 00000000000..869990401c5 --- /dev/null +++ b/tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.h @@ -0,0 +1,99 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef TST_QMIMEDATABASE_H +#define TST_QMIMEDATABASE_H + +#include + +class tst_QMimeDatabase : public QObject +{ + Q_OBJECT + +public: + tst_QMimeDatabase(); + +private slots: + void initTestCase(); + void cleanupTestCase(); + + void mimeTypeForName(); + void mimeTypeForFileName_data(); + void mimeTypeForFileName(); + void mimeTypesForFileName_data(); + void mimeTypesForFileName(); + void inheritance(); + void aliases(); + void icons(); + void mimeTypeForFileWithContent(); + void mimeTypeForUrl(); + void mimeTypeForData_data(); + void mimeTypeForData(); + void mimeTypeForFileAndContent_data(); + void mimeTypeForFileAndContent(); + void allMimeTypes(); + void inheritsPerformance(); + void suffixes_data(); + void suffixes(); + void knownSuffix(); + void fromThreads(); + + // shared-mime-info test suite + + void findByFileName_data(); + void findByFileName(); + + void findByData_data(); + void findByData(); + + void findByFile_data(); + void findByFile(); + + // + + void installNewGlobalMimeType(); + void installNewLocalMimeType(); + +private: + QString m_dataHome; +}; + +#endif // TST_QMIMEDATABASE_H diff --git a/tests/auto/corelib/mimetypes/qmimedatabase/yast2-metapackage-handler-mimetypes.xml b/tests/auto/corelib/mimetypes/qmimedatabase/yast2-metapackage-handler-mimetypes.xml new file mode 100644 index 00000000000..ef3035ef4a3 --- /dev/null +++ b/tests/auto/corelib/mimetypes/qmimedatabase/yast2-metapackage-handler-mimetypes.xml @@ -0,0 +1,15 @@ + + + + + + YaST Meta Package + + + + + URL of a YaST Meta Package + + + + diff --git a/tests/auto/corelib/mimetypes/qmimetype/qmimetype.pro b/tests/auto/corelib/mimetypes/qmimetype/qmimetype.pro new file mode 100644 index 00000000000..125d0d280fe --- /dev/null +++ b/tests/auto/corelib/mimetypes/qmimetype/qmimetype.pro @@ -0,0 +1,7 @@ +CONFIG += testcase parallel_test +TARGET = tst_qmimetype +QT = core-private testlib + +*-g++*:QMAKE_CXXFLAGS += -W -Wall -Wextra -Werror -Wshadow -Wno-long-long -Wnon-virtual-dtor + +SOURCES = tst_qmimetype.cpp diff --git a/tests/auto/corelib/mimetypes/qmimetype/tst_qmimetype.cpp b/tests/auto/corelib/mimetypes/qmimetype/tst_qmimetype.cpp new file mode 100644 index 00000000000..6f24bfe6f12 --- /dev/null +++ b/tests/auto/corelib/mimetypes/qmimetype/tst_qmimetype.cpp @@ -0,0 +1,257 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include + +#include +#include + +#include + + +class tst_qmimetype : public QObject +{ + Q_OBJECT + +private slots: + void initTestCase(); + + void isValid(); + void name(); + void genericIconName(); + void iconName(); + void suffixes(); +}; + +// ------------------------------------------------------------------------------------------------ + +void tst_qmimetype::initTestCase() +{ + qputenv("XDG_DATA_DIRS", "doesnotexist"); +} + +// ------------------------------------------------------------------------------------------------ + +static QString qMimeTypeName() +{ + static const QString result ("No name of the MIME type"); + return result; +} + +static QString qMimeTypeGenericIconName() +{ + static const QString result ("No file name of an icon image that represents the MIME type"); + return result; +} + +static QString qMimeTypeIconName() +{ + static const QString result ("No file name of an icon image that represents the MIME type"); + return result; +} + +static QStringList buildQMimeTypeFilenameExtensions() +{ + QStringList result; + result << QString::fromLatin1("*.png"); + return result; +} + +static QStringList qMimeTypeGlobPatterns() +{ + static const QStringList result (buildQMimeTypeFilenameExtensions()); + return result; +} + +// ------------------------------------------------------------------------------------------------ + +#ifndef Q_COMPILER_RVALUE_REFS +QMIMETYPE_BUILDER +#else +QMIMETYPE_BUILDER_FROM_RVALUE_REFS +#endif + +// ------------------------------------------------------------------------------------------------ + +void tst_qmimetype::isValid() +{ + QMimeType instantiatedQMimeType ( + buildQMimeType ( + qMimeTypeName(), + qMimeTypeGenericIconName(), + qMimeTypeIconName(), + qMimeTypeGlobPatterns() + ) + ); + + QVERIFY(instantiatedQMimeType.isValid()); + + QMimeType otherQMimeType (instantiatedQMimeType); + + QVERIFY(otherQMimeType.isValid()); + QCOMPARE(instantiatedQMimeType, otherQMimeType); + + QMimeType defaultQMimeType; + + QVERIFY(!defaultQMimeType.isValid()); +} + +// ------------------------------------------------------------------------------------------------ + +void tst_qmimetype::name() +{ + QMimeType instantiatedQMimeType ( + buildQMimeType ( + qMimeTypeName(), + qMimeTypeGenericIconName(), + qMimeTypeIconName(), + qMimeTypeGlobPatterns() + ) + ); + + QMimeType otherQMimeType ( + buildQMimeType ( + QString(), + qMimeTypeGenericIconName(), + qMimeTypeIconName(), + qMimeTypeGlobPatterns() + ) + ); + + // Verify that the Name is part of the equality test: + QCOMPARE(instantiatedQMimeType.name(), qMimeTypeName()); + + QVERIFY(instantiatedQMimeType != otherQMimeType); + QVERIFY(!(instantiatedQMimeType == otherQMimeType)); +} + +// ------------------------------------------------------------------------------------------------ + +void tst_qmimetype::genericIconName() +{ + QMimeType instantiatedQMimeType ( + buildQMimeType ( + qMimeTypeName(), + qMimeTypeGenericIconName(), + qMimeTypeIconName(), + qMimeTypeGlobPatterns() + ) + ); + + QMimeType otherQMimeType ( + buildQMimeType ( + qMimeTypeName(), + QString(), + qMimeTypeGenericIconName(), + qMimeTypeGlobPatterns() + ) + ); + + // Verify that the GenericIconName is part of the equality test: + QCOMPARE(instantiatedQMimeType.genericIconName(), qMimeTypeGenericIconName()); + + QVERIFY(instantiatedQMimeType != otherQMimeType); + QVERIFY(!(instantiatedQMimeType == otherQMimeType)); +} + +// ------------------------------------------------------------------------------------------------ + +void tst_qmimetype::iconName() +{ + QMimeType instantiatedQMimeType ( + buildQMimeType ( + qMimeTypeName(), + qMimeTypeGenericIconName(), + qMimeTypeIconName(), + qMimeTypeGlobPatterns() + ) + ); + + QMimeType otherQMimeType ( + buildQMimeType ( + qMimeTypeName(), + qMimeTypeGenericIconName(), + QString(), + qMimeTypeGlobPatterns() + ) + ); + + // Verify that the IconName is part of the equality test: + QCOMPARE(instantiatedQMimeType.iconName(), qMimeTypeIconName()); + + QVERIFY(instantiatedQMimeType != otherQMimeType); + QVERIFY(!(instantiatedQMimeType == otherQMimeType)); +} + +// ------------------------------------------------------------------------------------------------ + +void tst_qmimetype::suffixes() +{ + QMimeType instantiatedQMimeType ( + buildQMimeType ( + qMimeTypeName(), + qMimeTypeGenericIconName(), + qMimeTypeIconName(), + qMimeTypeGlobPatterns() + ) + ); + + QMimeType otherQMimeType ( + buildQMimeType ( + qMimeTypeName(), + qMimeTypeGenericIconName(), + qMimeTypeIconName(), + QStringList() + ) + ); + + // Verify that the Suffixes are part of the equality test: + QCOMPARE(instantiatedQMimeType.globPatterns(), qMimeTypeGlobPatterns()); + QCOMPARE(instantiatedQMimeType.suffixes(), QStringList() << QString::fromLatin1("png")); + + QVERIFY(instantiatedQMimeType != otherQMimeType); + QVERIFY(!(instantiatedQMimeType == otherQMimeType)); +} + +// ------------------------------------------------------------------------------------------------ + +QTEST_GUILESS_MAIN(tst_qmimetype) +#include "tst_qmimetype.moc" diff --git a/tests/auto/corelib/plugin/qlibrary/tst/tst.pro b/tests/auto/corelib/plugin/qlibrary/tst/tst.pro index 6e71ec8ff93..ae6cf97891d 100644 --- a/tests/auto/corelib/plugin/qlibrary/tst/tst.pro +++ b/tests/auto/corelib/plugin/qlibrary/tst/tst.pro @@ -1,4 +1,5 @@ CONFIG += testcase +CONFIG -= app_bundle TARGET = ../tst_qlibrary QT = core testlib SOURCES = ../tst_qlibrary.cpp @@ -12,3 +13,5 @@ win32 { } TESTDATA += ../library_path/invalid.so + +win32:CONFIG += insignificant_test # QTBUG-24151 diff --git a/tests/auto/corelib/plugin/qlibrary/tst_qlibrary.cpp b/tests/auto/corelib/plugin/qlibrary/tst_qlibrary.cpp index cff98de54ff..efbc89880f4 100644 --- a/tests/auto/corelib/plugin/qlibrary/tst_qlibrary.cpp +++ b/tests/auto/corelib/plugin/qlibrary/tst_qlibrary.cpp @@ -258,7 +258,7 @@ void tst_QLibrary::unload() void tst_QLibrary::unload_after_implicit_load() { - QLibrary library( "./mylib" ); + QLibrary library( QCoreApplication::applicationDirPath() + "/mylib" ); QFunctionPointer p = library.resolve("mylibversion"); QVERIFY(p); // Check if it was loaded QVERIFY(library.isLoaded()); diff --git a/tests/auto/corelib/thread/qsemaphore/qsemaphore.pro b/tests/auto/corelib/thread/qsemaphore/qsemaphore.pro index cd87e688485..0ad311de994 100644 --- a/tests/auto/corelib/thread/qsemaphore/qsemaphore.pro +++ b/tests/auto/corelib/thread/qsemaphore/qsemaphore.pro @@ -2,5 +2,3 @@ CONFIG += testcase parallel_test TARGET = tst_qsemaphore QT = core testlib SOURCES = tst_qsemaphore.cpp - -mac*:CONFIG+=insignificant_test diff --git a/tests/auto/corelib/thread/qsemaphore/tst_qsemaphore.cpp b/tests/auto/corelib/thread/qsemaphore/tst_qsemaphore.cpp index 1d54c8e036d..884e8718cb2 100644 --- a/tests/auto/corelib/thread/qsemaphore/tst_qsemaphore.cpp +++ b/tests/auto/corelib/thread/qsemaphore/tst_qsemaphore.cpp @@ -223,11 +223,21 @@ void tst_QSemaphore::tryAcquireWithTimeout() { QFETCH(int, timeout); + // timers are not guaranteed to be accurate down to the last millisecond, + // so we permit the elapsed times to be up to this far from the expected value. + int fuzz = 10; + QSemaphore semaphore; QTime time; -#define QVERIFYGE(a,b) QVERIFY2(a >= b, qPrintable(QString("%1 = %2 !>= %3 = %4").arg(#a).arg(a).arg(#b).arg(b))); -#define QVERIFYLE(a,b) QVERIFY2(a <= b, qPrintable(QString("%1 = %2 !<= %3 = %4").arg(#a).arg(a).arg(#b).arg(b))); +#define FUZZYCOMPARE(a,e) \ + do { \ + int a1 = a; \ + int e1 = e; \ + QVERIFY2(qAbs(a1-e1) < fuzz, \ + qPrintable(QString("(%1=%2) is more than %3 milliseconds different from (%4=%5)") \ + .arg(#a).arg(a1).arg(fuzz).arg(#e).arg(e1))); \ + } while (0) QCOMPARE(semaphore.available(), 0); @@ -235,73 +245,72 @@ void tst_QSemaphore::tryAcquireWithTimeout() QCOMPARE(semaphore.available(), 1); time.start(); QVERIFY(!semaphore.tryAcquire(2, timeout)); - QVERIFYGE(time.elapsed(), timeout); + FUZZYCOMPARE(time.elapsed(), timeout); QCOMPARE(semaphore.available(), 1); semaphore.release(); QCOMPARE(semaphore.available(), 2); time.start(); QVERIFY(!semaphore.tryAcquire(3, timeout)); - QVERIFYGE(time.elapsed(), timeout); + FUZZYCOMPARE(time.elapsed(), timeout); QCOMPARE(semaphore.available(), 2); semaphore.release(10); QCOMPARE(semaphore.available(), 12); time.start(); QVERIFY(!semaphore.tryAcquire(100, timeout)); - QVERIFYGE(time.elapsed(), timeout); + FUZZYCOMPARE(time.elapsed(), timeout); QCOMPARE(semaphore.available(), 12); semaphore.release(10); QCOMPARE(semaphore.available(), 22); time.start(); QVERIFY(!semaphore.tryAcquire(100, timeout)); - QVERIFYGE(time.elapsed(), timeout); + FUZZYCOMPARE(time.elapsed(), timeout); QCOMPARE(semaphore.available(), 22); time.start(); QVERIFY(semaphore.tryAcquire(1, timeout)); - QVERIFYLE(time.elapsed(), timeout); + FUZZYCOMPARE(time.elapsed(), 0); QCOMPARE(semaphore.available(), 21); time.start(); QVERIFY(semaphore.tryAcquire(1, timeout)); - QVERIFYLE(time.elapsed(), timeout); + FUZZYCOMPARE(time.elapsed(), 0); QCOMPARE(semaphore.available(), 20); time.start(); QVERIFY(semaphore.tryAcquire(10, timeout)); - QVERIFYLE(time.elapsed(), timeout); + FUZZYCOMPARE(time.elapsed(), 0); QCOMPARE(semaphore.available(), 10); time.start(); QVERIFY(semaphore.tryAcquire(10, timeout)); - QVERIFYLE(time.elapsed(), timeout); + FUZZYCOMPARE(time.elapsed(), 0); QCOMPARE(semaphore.available(), 0); // should not be able to acquire more time.start(); QVERIFY(!semaphore.tryAcquire(1, timeout)); - QVERIFYGE(time.elapsed(), timeout); + FUZZYCOMPARE(time.elapsed(), timeout); QCOMPARE(semaphore.available(), 0); time.start(); QVERIFY(!semaphore.tryAcquire(1, timeout)); - QVERIFYGE(time.elapsed(), timeout); + FUZZYCOMPARE(time.elapsed(), timeout); QCOMPARE(semaphore.available(), 0); time.start(); QVERIFY(!semaphore.tryAcquire(10, timeout)); - QVERIFYGE(time.elapsed(), timeout); + FUZZYCOMPARE(time.elapsed(), timeout); QCOMPARE(semaphore.available(), 0); time.start(); QVERIFY(!semaphore.tryAcquire(10, timeout)); - QVERIFYGE(time.elapsed(), timeout); + FUZZYCOMPARE(time.elapsed(), timeout); QCOMPARE(semaphore.available(), 0); -#undef QVERIFYGE -#undef QVERIFYLE +#undef FUZZYCOMPARE } void tst_QSemaphore::tryAcquireWithTimeoutStarvation() diff --git a/tests/auto/corelib/thread/qthreadpool/tst_qthreadpool.cpp b/tests/auto/corelib/thread/qthreadpool/tst_qthreadpool.cpp index 1dd0410f411..aa4d163fc4a 100644 --- a/tests/auto/corelib/thread/qthreadpool/tst_qthreadpool.cpp +++ b/tests/auto/corelib/thread/qthreadpool/tst_qthreadpool.cpp @@ -367,17 +367,17 @@ void tst_QThreadPool::setMaxThreadCount_data() { QTest::addColumn("limit"); - QTest::newRow("") << 1; - QTest::newRow("") << -1; - QTest::newRow("") << 2; - QTest::newRow("") << -2; - QTest::newRow("") << 4; - QTest::newRow("") << -4; - QTest::newRow("") << 0; - QTest::newRow("") << 12345; - QTest::newRow("") << -6789; - QTest::newRow("") << 42; - QTest::newRow("") << -666; + QTest::newRow("1") << 1; + QTest::newRow("-1") << -1; + QTest::newRow("2") << 2; + QTest::newRow("-2") << -2; + QTest::newRow("4") << 4; + QTest::newRow("-4") << -4; + QTest::newRow("0") << 0; + QTest::newRow("12345") << 12345; + QTest::newRow("-6789") << -6789; + QTest::newRow("42") << 42; + QTest::newRow("-666") << -666; } void tst_QThreadPool::setMaxThreadCount() diff --git a/tests/auto/corelib/thread/qwaitcondition/tst_qwaitcondition.cpp b/tests/auto/corelib/thread/qwaitcondition/tst_qwaitcondition.cpp index 578f8670321..0e1fa47a3e5 100644 --- a/tests/auto/corelib/thread/qwaitcondition/tst_qwaitcondition.cpp +++ b/tests/auto/corelib/thread/qwaitcondition/tst_qwaitcondition.cpp @@ -59,14 +59,8 @@ private slots: void wait_RaceCondition(); }; -static const int iterations = 10; - -// Note: some tests rely on ThreadCount being multiple of 2 -#if defined(Q_OS_SOLARIS) || ( defined(Q_OS_LINUX) && defined(QT_ARCH_ARMV6) ) +static const int iterations = 4; static const int ThreadCount = 4; -#else -static const int ThreadCount = 10; -#endif class wait_QMutex_Thread_1 : public QThread { diff --git a/tests/auto/corelib/tools/qbytearray/tst_qbytearray.cpp b/tests/auto/corelib/tools/qbytearray/tst_qbytearray.cpp index e442aa7e1ab..13a6b3d471a 100644 --- a/tests/auto/corelib/tools/qbytearray/tst_qbytearray.cpp +++ b/tests/auto/corelib/tools/qbytearray/tst_qbytearray.cpp @@ -521,7 +521,10 @@ void tst_QByteArray::qvsnprintf() QCOMPARE(::qsnprintf(buf, 10, "%s", "bubu"), 4); QCOMPARE(static_cast(buf), "bubu"); +#ifndef Q_CC_MSVC + // MSVC implementation of vsnprintf overwrites bytes after null terminator so this would fail. QCOMPARE(buf[5], char(42)); +#endif qMemSet(buf, 42, sizeof(buf)); QCOMPARE(::qsnprintf(buf, 5, "%s", "bubu"), 4); @@ -862,7 +865,7 @@ void tst_QByteArray::indexOf_data() QTest::newRow("BoyerMooreStressTest4") << QByteArray(veryBigHaystack) << QByteArray(veryBigHaystack + 'c') << 0 << -1; QTest::newRow("BoyerMooreStressTest5") << QByteArray(veryBigHaystack) << QByteArray('c' + veryBigHaystack) << 0 << -1; QTest::newRow("BoyerMooreStressTest6") << QByteArray('d' + veryBigHaystack) << QByteArray('c' + veryBigHaystack) << 0 << -1; - QTest::newRow("BoyerMooreStressTest6") << QByteArray(veryBigHaystack + 'c') << QByteArray('c' + veryBigHaystack) << 0 << -1; + QTest::newRow("BoyerMooreStressTest7") << QByteArray(veryBigHaystack + 'c') << QByteArray('c' + veryBigHaystack) << 0 << -1; } void tst_QByteArray::indexOf() @@ -985,13 +988,13 @@ void tst_QByteArray::toInt_data() QTest::addColumn("expectedok"); QTest::newRow("base 10") << QByteArray("100") << 10 << int(100) << true; - QTest::newRow("base 16") << QByteArray("100") << 16 << int(256) << true; - QTest::newRow("base 16") << QByteArray("0400") << 16 << int(1024) << true; + QTest::newRow("base 16-1") << QByteArray("100") << 16 << int(256) << true; + QTest::newRow("base 16-2") << QByteArray("0400") << 16 << int(1024) << true; QTest::newRow("base 2") << QByteArray("1111") << 2 << int(15) << true; QTest::newRow("base 8") << QByteArray("100") << 8 << int(64) << true; - QTest::newRow("base 0") << QByteArray("0x10") << 0 << int(16) << true; - QTest::newRow("base 0") << QByteArray("10") << 0 << int(10) << true; - QTest::newRow("base 0") << QByteArray("010") << 0 << int(8) << true; + QTest::newRow("base 0-1") << QByteArray("0x10") << 0 << int(16) << true; + QTest::newRow("base 0-2") << QByteArray("10") << 0 << int(10) << true; + QTest::newRow("base 0-3") << QByteArray("010") << 0 << int(8) << true; QTest::newRow("empty") << QByteArray() << 0 << int(0) << false; // using fromRawData @@ -999,7 +1002,7 @@ void tst_QByteArray::toInt_data() QTest::newRow("raw2") << QByteArray::fromRawData("1foo", 1) << 10 << 1 << true; QTest::newRow("raw3") << QByteArray::fromRawData("12", 1) << 10 << 1 << true; QTest::newRow("raw4") << QByteArray::fromRawData("123456789", 1) << 10 << 1 << true; - QTest::newRow("raw4") << QByteArray::fromRawData("123456789", 2) << 10 << 12 << true; + QTest::newRow("raw5") << QByteArray::fromRawData("123456789", 2) << 10 << 12 << true; QTest::newRow("raw-static") << QByteArray::fromRawData(&globalChar, 1) << 10 << 1 << true; } @@ -1398,58 +1401,58 @@ void tst_QByteArray::repeated_data() const QTest::addColumn("count" ); /* Empty strings. */ - QTest::newRow("") + QTest::newRow("data1") << QByteArray() << QByteArray() << 0; - QTest::newRow("") + QTest::newRow("data2") << QByteArray() << QByteArray() << -1004; - QTest::newRow("") + QTest::newRow("data3") << QByteArray() << QByteArray() << 1; - QTest::newRow("") + QTest::newRow("data4") << QByteArray() << QByteArray() << 5; /* On simple string. */ - QTest::newRow("") + QTest::newRow("data5") << QByteArray("abc") << QByteArray() << -1004; - QTest::newRow("") + QTest::newRow("data6") << QByteArray("abc") << QByteArray() << -1; - QTest::newRow("") + QTest::newRow("data7") << QByteArray("abc") << QByteArray() << 0; - QTest::newRow("") + QTest::newRow("data8") << QByteArray("abc") << QByteArray("abc") << 1; - QTest::newRow("") + QTest::newRow("data9") << QByteArray(("abc")) << QByteArray(("abcabc")) << 2; - QTest::newRow("") + QTest::newRow("data10") << QByteArray(("abc")) << QByteArray(("abcabcabc")) << 3; - QTest::newRow("") + QTest::newRow("data11") << QByteArray(("abc")) << QByteArray(("abcabcabcabc")) << 4; diff --git a/tests/auto/corelib/tools/qcryptographichash/qcryptographichash.pro b/tests/auto/corelib/tools/qcryptographichash/qcryptographichash.pro index fddd67fbd68..1c4b74e16dc 100644 --- a/tests/auto/corelib/tools/qcryptographichash/qcryptographichash.pro +++ b/tests/auto/corelib/tools/qcryptographichash/qcryptographichash.pro @@ -3,14 +3,4 @@ TARGET = tst_qcryptographichash QT = core testlib SOURCES = tst_qcryptographichash.cpp - -wince* { - addFiles.files = data/* - addFiles.path = data/ - DEPLOYMENT += addFiles - - DEFINES += SRCDIR=\\\".\\\" -} -else { - DEFINES += SRCDIR=\\\"$$PWD/\\\" -} \ No newline at end of file +TESTDATA += data/* diff --git a/tests/auto/corelib/tools/qcryptographichash/tst_qcryptographichash.cpp b/tests/auto/corelib/tools/qcryptographichash/tst_qcryptographichash.cpp index 3a257c2f117..81cc66f045a 100644 --- a/tests/auto/corelib/tools/qcryptographichash/tst_qcryptographichash.cpp +++ b/tests/auto/corelib/tools/qcryptographichash/tst_qcryptographichash.cpp @@ -158,8 +158,8 @@ void tst_QCryptographicHash::files_data() { QTest::addColumn("filename"); QTest::addColumn("algorithm"); QTest::addColumn("md5sum"); - QTest::newRow("Line") << QString::fromAscii("data/2c1517dad3678f03917f15849b052fd5.md5") << QCryptographicHash::Md5 << QByteArray("2c1517dad3678f03917f15849b052fd5"); - QTest::newRow("Line") << QString::fromAscii("data/d41d8cd98f00b204e9800998ecf8427e.md5") << QCryptographicHash::Md5 << QByteArray("d41d8cd98f00b204e9800998ecf8427e"); + QTest::newRow("data1") << QString::fromAscii("data/2c1517dad3678f03917f15849b052fd5.md5") << QCryptographicHash::Md5 << QByteArray("2c1517dad3678f03917f15849b052fd5"); + QTest::newRow("data2") << QString::fromAscii("data/d41d8cd98f00b204e9800998ecf8427e.md5") << QCryptographicHash::Md5 << QByteArray("d41d8cd98f00b204e9800998ecf8427e"); } @@ -169,7 +169,9 @@ void tst_QCryptographicHash::files() QFETCH(QCryptographicHash::Algorithm, algorithm); QFETCH(QByteArray, md5sum); { - QFile f(QString::fromLocal8Bit(SRCDIR) + filename); + QString testData = QFINDTESTDATA(filename); + QVERIFY2(!testData.isEmpty(), qPrintable(QString("Cannot find test data: %1").arg(filename))); + QFile f(testData); QCryptographicHash hash(algorithm); QVERIFY(! hash.addData(&f)); // file is not open for reading; if (f.open(QIODevice::ReadOnly)) { diff --git a/tests/auto/corelib/tools/qdate/tst_qdate.cpp b/tests/auto/corelib/tools/qdate/tst_qdate.cpp index 4921a7e7343..258dbf8625e 100644 --- a/tests/auto/corelib/tools/qdate/tst_qdate.cpp +++ b/tests/auto/corelib/tools/qdate/tst_qdate.cpp @@ -147,14 +147,14 @@ void tst_QDate::isValid_data() QTest::newRow("month 13") << 2000 << 13 << 1 << nullJd << false; // test leap years - QTest::newRow("non-leap") << 2006 << 2 << 29 << nullJd << false; - QTest::newRow("normal leap") << 2004 << 2 << 29 << qint64(2453065) << true; - QTest::newRow("century leap") << 1900 << 2 << 29 << nullJd << false; - QTest::newRow("century leap") << 2100 << 2 << 29 << nullJd << false; - QTest::newRow("400-years leap") << 2000 << 2 << 29 << qint64(2451604) << true; - QTest::newRow("400-years leap 2") << 2400 << 2 << 29 << qint64(2597701) << true; - QTest::newRow("400-years leap 3") << 1600 << 2 << 29 << qint64(2305507) << true; - QTest::newRow("year 0") << 0 << 2 << 27 << nullJd << false; + QTest::newRow("non-leap") << 2006 << 2 << 29 << nullJd << false; + QTest::newRow("normal leap") << 2004 << 2 << 29 << qint64(2453065) << true; + QTest::newRow("century leap 1900") << 1900 << 2 << 29 << nullJd << false; + QTest::newRow("century leap 2100") << 2100 << 2 << 29 << nullJd << false; + QTest::newRow("400-years leap 2000") << 2000 << 2 << 29 << qint64(2451604) << true; + QTest::newRow("400-years leap 2400") << 2400 << 2 << 29 << qint64(2597701) << true; + QTest::newRow("400-years leap 1600") << 1600 << 2 << 29 << qint64(2305507) << true; + QTest::newRow("year 0") << 0 << 2 << 27 << nullJd << false; // test the number of days in months: QTest::newRow("jan") << 2000 << 1 << 31 << qint64(2451575) << true; @@ -262,7 +262,7 @@ void tst_QDate::dayOfWeek_data() QTest::newRow("data8") << -4800 << 1 << 1 << 1; QTest::newRow("data9") << -4800 << 1 << 2 << 2; QTest::newRow("data10") << -4800 << 1 << 3 << 3; - QTest::newRow("data12") << -4800 << 1 << 4 << 4; + QTest::newRow("data11") << -4800 << 1 << 4 << 4; QTest::newRow("data12") << -4800 << 1 << 5 << 5; QTest::newRow("data13") << -4800 << 1 << 6 << 6; QTest::newRow("data14") << -4800 << 1 << 7 << 7; @@ -580,10 +580,10 @@ void tst_QDate::addMonths_data() QTest::newRow( "data14" ) << 2000 << 2 << 29 << -12 << 1999 << 2 << 28; // year sign change: - QTest::newRow( "data14" ) << 1 << 1 << 1 << -1 << -1 << 12 << 1; - QTest::newRow( "data15" ) << 1 << 1 << 1 << -12 << -1 << 1 << 1; - QTest::newRow( "data16" ) << -1 << 12 << 1 << 1 << 1 << 1 << 1; - QTest::newRow( "data17" ) << -1 << 1 << 1 << 12 << 1 << 1 << 1; + QTest::newRow( "data15" ) << 1 << 1 << 1 << -1 << -1 << 12 << 1; + QTest::newRow( "data16" ) << 1 << 1 << 1 << -12 << -1 << 1 << 1; + QTest::newRow( "data17" ) << -1 << 12 << 1 << 1 << 1 << 1 << 1; + QTest::newRow( "data18" ) << -1 << 1 << 1 << 12 << 1 << 1 << 1; } void tst_QDate::addYears() diff --git a/tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp b/tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp index af8deefa4cf..eb6af23ba50 100644 --- a/tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp +++ b/tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp @@ -1363,19 +1363,19 @@ void tst_QDateTime::dateFromStringFormat_data() QTest::newRow("data24") << tuesday << QString("dddd") << QDate(1900, 1, 2); QTest::newRow("data25") << wednesday << QString("dddd") << QDate(1900, 1, 3); QTest::newRow("data26") << thursday << QString("dddd") << QDate(1900, 1, 4); - QTest::newRow("data26") << friday << QString("dddd") << QDate(1900, 1, 5); - QTest::newRow("data27") << saturday << QString("dddd") << QDate(1900, 1, 6); - QTest::newRow("data28") << sunday << QString("dddd") << QDate(1900, 1, 7); + QTest::newRow("data27") << friday << QString("dddd") << QDate(1900, 1, 5); + QTest::newRow("data28") << saturday << QString("dddd") << QDate(1900, 1, 6); + QTest::newRow("data29") << sunday << QString("dddd") << QDate(1900, 1, 7); - QTest::newRow("data29") << monday + " 2006" << QString("dddd yyyy") << QDate(2006, 1, 2); - QTest::newRow("data30") << tuesday + " 2006" << QString("dddd yyyy") << QDate(2006, 1, 3); - QTest::newRow("data31") << wednesday + " 2006" << QString("dddd yyyy") << QDate(2006, 1, 4); - QTest::newRow("data32") << thursday + " 2006" << QString("dddd yyyy") << QDate(2006, 1, 5); - QTest::newRow("data33") << friday + " 2006" << QString("dddd yyyy") << QDate(2006, 1, 6); - QTest::newRow("data34") << saturday + " 2006" << QString("dddd yyyy") << QDate(2006, 1, 7); - QTest::newRow("data35") << sunday + " 2006" << QString("dddd yyyy") << QDate(2006, 1, 1); + QTest::newRow("data30") << monday + " 2006" << QString("dddd yyyy") << QDate(2006, 1, 2); + QTest::newRow("data31") << tuesday + " 2006" << QString("dddd yyyy") << QDate(2006, 1, 3); + QTest::newRow("data32") << wednesday + " 2006" << QString("dddd yyyy") << QDate(2006, 1, 4); + QTest::newRow("data33") << thursday + " 2006" << QString("dddd yyyy") << QDate(2006, 1, 5); + QTest::newRow("data34") << friday + " 2006" << QString("dddd yyyy") << QDate(2006, 1, 6); + QTest::newRow("data35") << saturday + " 2006" << QString("dddd yyyy") << QDate(2006, 1, 7); + QTest::newRow("data36") << sunday + " 2006" << QString("dddd yyyy") << QDate(2006, 1, 1); - QTest::newRow("data36 ") << tuesday + " 2007 " + march << QString("dddd yyyy MMMM") << QDate(2007, 3, 6); + QTest::newRow("data37") << tuesday + " 2007 " + march << QString("dddd yyyy MMMM") << QDate(2007, 3, 6); } diff --git a/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp b/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp index 5544c0fd718..db7f503f574 100644 --- a/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp +++ b/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp @@ -59,7 +59,6 @@ #endif #ifdef Q_OS_WINCE -#include #include // needed for GetUserDefaultLCID #define _control87 _controlfp extern "C" DWORD GetThreadLocale(void) { @@ -141,11 +140,6 @@ tst_QLocale::tst_QLocale() void tst_QLocale::ctor() { -#ifdef Q_OS_WINCE - int argc = 1; - char argv[20] = "tst_qlocale.exe"; - QCoreApplication app(argc, (char**)&argv); -#endif QLocale default_locale = QLocale::system(); QLocale::Language default_lang = default_locale.language(); QLocale::Country default_country = default_locale.country(); @@ -934,7 +928,7 @@ void tst_QLocale::formatDateTime_data() << "\"yymm\"" << "\"7414\""; QTest::newRow("27C") << "C" << QDateTime(QDate(1974, 12, 1), QTime(15, 14, 13)) << "'\"yymm\"'" << "\"yymm\""; - QTest::newRow("27C") << "C" << QDateTime() + QTest::newRow("28C") << "C" << QDateTime() << "'\"yymm\"'" << ""; QTest::newRow("1no_NO") << "no_NO" << QDateTime(QDate(1974, 12, 1), QTime(5, 14, 13)) @@ -976,7 +970,7 @@ void tst_QLocale::formatDateTime_data() << "\"yymm\"" << "\"7414\""; QTest::newRow("27no_NO") << "no_NO" << QDateTime(QDate(1974, 12, 1), QTime(15, 14, 13)) << "'\"yymm\"'" << "\"yymm\""; - QTest::newRow("27no_NO") << "no_NO" << QDateTime() + QTest::newRow("28no_NO") << "no_NO" << QDateTime() << "'\"yymm\"'" << ""; } @@ -1988,5 +1982,5 @@ void tst_QLocale::listPatterns() QCOMPARE(zh_CN.createSeparatedList(sl5), QString::fromUtf8("aaa" "\xe3\x80\x81" "bbb" "\xe3\x80\x81" "ccc" "\xe5\x92\x8c" "ddd")); } -QTEST_APPLESS_MAIN(tst_QLocale) +QTEST_MAIN(tst_QLocale) #include "tst_qlocale.moc" diff --git a/tests/auto/corelib/tools/qsharedpointer/externaltests.pri b/tests/auto/corelib/tools/qsharedpointer/externaltests.pri index e12bb914c0e..10d30e3c767 100644 --- a/tests/auto/corelib/tools/qsharedpointer/externaltests.pri +++ b/tests/auto/corelib/tools/qsharedpointer/externaltests.pri @@ -3,5 +3,5 @@ HEADERS += $$PWD/externaltests.h cleanedQMAKESPEC = $$replace(QMAKESPEC, \\\\, /) DEFINES += DEFAULT_MAKESPEC=\\\"$$cleanedQMAKESPEC\\\" -embedded:DEFINES += QTEST_NO_RTTI QTEST_CROSS_COMPILED +cross_compile:DEFINES += QTEST_NO_RTTI QTEST_CROSS_COMPILED wince*:DEFINES += QTEST_CROSS_COMPILED QTEST_NO_RTTI diff --git a/tests/auto/corelib/tools/qsharedpointer/qsharedpointer.pro b/tests/auto/corelib/tools/qsharedpointer/qsharedpointer.pro index b1cd309293c..1b227109b37 100644 --- a/tests/auto/corelib/tools/qsharedpointer/qsharedpointer.pro +++ b/tests/auto/corelib/tools/qsharedpointer/qsharedpointer.pro @@ -13,3 +13,5 @@ HEADERS = forwarddeclared.h \ TESTDATA += forwarddeclared.cpp forwarddeclared.h include(externaltests.pri) + +win32:CONFIG += insignificant_test # QTBUG-24160 diff --git a/tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp b/tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp index 2bae52a6225..5b697a35098 100644 --- a/tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp +++ b/tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp @@ -76,6 +76,7 @@ private slots: void upCast(); void qobjectWeakManagement(); void noSharedPointerFromWeakQObject(); + void sharedPointerFromQObjectWithWeak(); void weakQObjectFromSharedPointer(); void objectCast(); void differentPointers(); @@ -692,12 +693,34 @@ void tst_QSharedPointer::noSharedPointerFromWeakQObject() QObject obj; QWeakPointer weak(&obj); - QSharedPointer strong = weak.toStrongRef(); - QVERIFY(strong.isNull()); + { + QTest::ignoreMessage(QtWarningMsg , "QSharedPointer: cannot create a QSharedPointer from a QObject-tracking QWeakPointer"); + QSharedPointer strong = weak.toStrongRef(); + QVERIFY(strong.isNull()); + } + { + QTest::ignoreMessage(QtWarningMsg , "QSharedPointer: cannot create a QSharedPointer from a QObject-tracking QWeakPointer"); + QSharedPointer strong = weak; + QVERIFY(strong.isNull()); + } + QCOMPARE(weak.data(), &obj); // if something went wrong, we'll probably crash here } +void tst_QSharedPointer::sharedPointerFromQObjectWithWeak() +{ + QObject *ptr = new QObject; + QWeakPointer weak = ptr; + { + QSharedPointer shared(ptr); + QVERIFY(!weak.isNull()); + QCOMPARE(shared.data(), ptr); + QCOMPARE(weak.data(), ptr); + } + QVERIFY(weak.isNull()); +} + void tst_QSharedPointer::weakQObjectFromSharedPointer() { // this is the inverse of the above: you're allowed to create a QWeakPointer @@ -1070,10 +1093,6 @@ void tst_QSharedPointer::constCorrectness() ptr = cptr.constCast(); ptr = vptr.constCast(); -#if !defined(Q_CC_HPACC) && !defined(QT_ARCH_PARISC) - // the aCC series 3 compiler we have on the PA-RISC - // machine crashes compiling this code - QSharedPointer cvptr(ptr); QSharedPointer cvptr2(cptr); QSharedPointer cvptr3(vptr); @@ -1082,7 +1101,6 @@ void tst_QSharedPointer::constCorrectness() cvptr3 = vptr; ptr = qSharedPointerConstCast(cvptr); ptr = cvptr.constCast(); -#endif } safetyCheck(); @@ -1767,12 +1785,6 @@ void tst_QSharedPointer::invalidConstructs_data() << "Data *ptr = 0;\n" "QWeakPointer weakptr(ptr);\n"; - QTest::newRow("shared-pointer-from-unmanaged-qobject") - << &QTest::QExternalTest::tryRunFail - << "QObject *ptr = new QObject;\n" - "QWeakPointer weak = ptr;\n" // this makes the object unmanaged - "QSharedPointer shared(ptr);\n"; - QTest::newRow("shared-pointer-implicit-from-uninitialized") << &QTest::QExternalTest::tryCompileFail << "Data *ptr = 0;\n" diff --git a/tests/auto/corelib/tools/qstring/tst_qstring.cpp b/tests/auto/corelib/tools/qstring/tst_qstring.cpp index 7dd801b50be..e3808244d30 100644 --- a/tests/auto/corelib/tools/qstring/tst_qstring.cpp +++ b/tests/auto/corelib/tools/qstring/tst_qstring.cpp @@ -447,7 +447,7 @@ void tst_QString::replace_uint_uint_data() QTest::newRow( "rep08" ) << QString("ACABCAB") << 3 << 2 << QString("XX") << QString("ACAXXAB"); QTest::newRow( "rep09" ) << QString("ACABCAB") << 4 << 2 << QString("XX") << QString("ACABXXB"); QTest::newRow( "rep10" ) << QString("ACABCAB") << 5 << 2 << QString("XX") << QString("ACABCXX"); - QTest::newRow( "rep10" ) << QString("ACABCAB") << 6 << 2 << QString("XX") << QString("ACABCAXX"); + QTest::newRow( "rep11" ) << QString("ACABCAB") << 6 << 2 << QString("XX") << QString("ACABCAXX"); QTest::newRow( "rep12" ) << QString() << 0 << 10 << QString("X") << QString("X"); QTest::newRow( "rep13" ) << QString("short") << 0 << 10 << QString("X") << QString("X"); QTest::newRow( "rep14" ) << QString() << 0 << 10 << QString("XX") << QString("XX"); @@ -1042,7 +1042,7 @@ void tst_QString::indexOf_data() QTest::newRow("BoyerMooreStressTest4") << veryBigHaystack << QString(veryBigHaystack + 'c') << 0 << true << -1; QTest::newRow("BoyerMooreStressTest5") << veryBigHaystack << QString('c' + veryBigHaystack) << 0 << true << -1; QTest::newRow("BoyerMooreStressTest6") << QString('d' + veryBigHaystack) << QString('c' + veryBigHaystack) << 0 << true << -1; - QTest::newRow("BoyerMooreStressTest6") << QString(veryBigHaystack + 'c') << QString('c' + veryBigHaystack) << 0 << true << -1; + QTest::newRow("BoyerMooreStressTest7") << QString(veryBigHaystack + 'c') << QString('c' + veryBigHaystack) << 0 << true << -1; QTest::newRow("BoyerMooreInsensitiveStressTest") << veryBigHaystack << veryBigHaystack << 0 << false << 0; @@ -1211,15 +1211,15 @@ void tst_QString::lastIndexOf_data() QTest::newRow("4") << a << "G" << 14 << 14 << true; QTest::newRow("5") << a << "G" << 13 << 11 << true; QTest::newRow("6") << a << "B" << a.size() - 1 << 1 << true; - QTest::newRow("6") << a << "B" << - 1 << 1 << true; - QTest::newRow("7") << a << "B" << 1 << 1 << true; - QTest::newRow("8") << a << "B" << 0 << -1 << true; + QTest::newRow("7") << a << "B" << - 1 << 1 << true; + QTest::newRow("8") << a << "B" << 1 << 1 << true; + QTest::newRow("9") << a << "B" << 0 << -1 << true; - QTest::newRow("9") << a << "G" << -1 << a.size()-1 << true; - QTest::newRow("10") << a << "G" << a.size()-1 << a.size()-1 << true; - QTest::newRow("11") << a << "G" << a.size() << -1 << true; - QTest::newRow("12") << a << "A" << 0 << 0 << true; - QTest::newRow("13") << a << "A" << -1*a.size() << 0 << true; + QTest::newRow("10") << a << "G" << -1 << a.size()-1 << true; + QTest::newRow("11") << a << "G" << a.size()-1 << a.size()-1 << true; + QTest::newRow("12") << a << "G" << a.size() << -1 << true; + QTest::newRow("13") << a << "A" << 0 << 0 << true; + QTest::newRow("14") << a << "A" << -1*a.size() << 0 << true; QTest::newRow("15") << a << "efg" << 0 << -1 << false; QTest::newRow("16") << a << "efg" << a.size() << -1 << false; @@ -4742,8 +4742,8 @@ void tst_QString::compare_data() // different length QTest::newRow("data6") << QString("abcdef") << QString("abc") << 1 << 1; - QTest::newRow("data6") << QString("abCdef") << QString("abc") << -1 << 1; - QTest::newRow("data7") << QString("abc") << QString("abcdef") << -1 << -1; + QTest::newRow("data7") << QString("abCdef") << QString("abc") << -1 << 1; + QTest::newRow("data8") << QString("abc") << QString("abcdef") << -1 << -1; QString upper; upper += QChar(QChar::highSurrogate(0x10400)); @@ -4755,12 +4755,12 @@ void tst_QString::compare_data() // embedded nulls // These don't work as of now. It's OK that these don't work since \0 is not a valid unicode - /*QTest::newRow("data9") << QString(QByteArray("\0", 1)) << QString(QByteArray("\0", 1)) << 0 << 0; - QTest::newRow("data10") << QString(QByteArray("\0", 1)) << QString("") << 1 << 1; - QTest::newRow("data11") << QString("") << QString(QByteArray("\0", 1)) << -1 << -1; - QTest::newRow("data12") << QString("ab\0c") << QString(QByteArray("ab\0c", 4)) << 0 << 0; - QTest::newRow("data13") << QString(QByteArray("ab\0c", 4)) << QString("abc") << -1 << -1; - QTest::newRow("data14") << QString("abc") << QString(QByteArray("ab\0c", 4)) << 1 << 1;*/ + /*QTest::newRow("data10") << QString(QByteArray("\0", 1)) << QString(QByteArray("\0", 1)) << 0 << 0; + QTest::newRow("data11") << QString(QByteArray("\0", 1)) << QString("") << 1 << 1; + QTest::newRow("data12") << QString("") << QString(QByteArray("\0", 1)) << -1 << -1; + QTest::newRow("data13") << QString("ab\0c") << QString(QByteArray("ab\0c", 4)) << 0 << 0; + QTest::newRow("data14") << QString(QByteArray("ab\0c", 4)) << QString("abc") << -1 << -1; + QTest::newRow("data15") << QString("abc") << QString(QByteArray("ab\0c", 4)) << 1 << 1;*/ } static bool isLatin(const QString &s) @@ -5004,58 +5004,58 @@ void tst_QString::repeated_data() const QTest::addColumn("count" ); /* Empty strings. */ - QTest::newRow("") + QTest::newRow("data1") << QString() << QString() << 0; - QTest::newRow("") + QTest::newRow("data2") << QString() << QString() << -1004; - QTest::newRow("") + QTest::newRow("data3") << QString() << QString() << 1; - QTest::newRow("") + QTest::newRow("data4") << QString() << QString() << 5; /* On simple string. */ - QTest::newRow("") + QTest::newRow("data5") << QString(QLatin1String("abc")) << QString() << -1004; - QTest::newRow("") + QTest::newRow("data6") << QString(QLatin1String("abc")) << QString() << -1; - QTest::newRow("") + QTest::newRow("data7") << QString(QLatin1String("abc")) << QString() << 0; - QTest::newRow("") + QTest::newRow("data8") << QString(QLatin1String("abc")) << QString(QLatin1String("abc")) << 1; - QTest::newRow("") + QTest::newRow("data9") << QString(QLatin1String("abc")) << QString(QLatin1String("abcabc")) << 2; - QTest::newRow("") + QTest::newRow("data10") << QString(QLatin1String("abc")) << QString(QLatin1String("abcabcabc")) << 3; - QTest::newRow("") + QTest::newRow("data11") << QString(QLatin1String("abc")) << QString(QLatin1String("abcabcabcabc")) << 4; diff --git a/tests/auto/corelib/tools/qstringlist/tst_qstringlist.cpp b/tests/auto/corelib/tools/qstringlist/tst_qstringlist.cpp index e3eb1a21ac5..6066f7c8e07 100644 --- a/tests/auto/corelib/tools/qstringlist/tst_qstringlist.cpp +++ b/tests/auto/corelib/tools/qstringlist/tst_qstringlist.cpp @@ -193,8 +193,8 @@ void tst_QStringList::removeDuplicates_data() QTest::addColumn("after"); QTest::addColumn("count"); - QTest::newRow("empty") << "Hello,Hello" << "Hello" << 1; - QTest::newRow("empty") << "Hello,World" << "Hello,World" << 0; + QTest::newRow("empty-1") << "Hello,Hello" << "Hello" << 1; + QTest::newRow("empty-2") << "Hello,World" << "Hello,World" << 0; } void tst_QStringList::removeDuplicates() @@ -245,35 +245,35 @@ void tst_QStringList::join_data() const QTest::addColumn("separator"); QTest::addColumn("expectedResult"); - QTest::newRow("") + QTest::newRow("data1") << QStringList() << QString() << QString(); - QTest::newRow("") + QTest::newRow("data2") << QStringList() << QString(QLatin1String("separator")) << QString(); - QTest::newRow("") + QTest::newRow("data3") << QStringList("one") << QString(QLatin1String("separator")) << QString("one"); - QTest::newRow("") + QTest::newRow("data4") << QStringList("one") << QString(QLatin1String("separator")) << QString("one"); - QTest::newRow("") + QTest::newRow("data5") << (QStringList() << QLatin1String("a") << QLatin1String("b")) << QString(QLatin1String(" ")) << QString("a b"); - QTest::newRow("") + QTest::newRow("data6") << (QStringList() << QLatin1String("a") << QLatin1String("b") diff --git a/tests/auto/corelib/tools/qstringmatcher/tst_qstringmatcher.cpp b/tests/auto/corelib/tools/qstringmatcher/tst_qstringmatcher.cpp index ebbad86c81e..5829c0e9176 100644 --- a/tests/auto/corelib/tools/qstringmatcher/tst_qstringmatcher.cpp +++ b/tests/auto/corelib/tools/qstringmatcher/tst_qstringmatcher.cpp @@ -81,16 +81,16 @@ void tst_QStringMatcher::indexIn_data() QTest::addColumn("haystack"); QTest::addColumn("from"); QTest::addColumn("indexIn"); - QTest::newRow("empty") << QString() << QString("foo") << 0 << 0; - QTest::newRow("empty") << QString() << QString("foo") << 10 << -1; - QTest::newRow("empty") << QString() << QString("foo") << -10 << 0; + QTest::newRow("empty-1") << QString() << QString("foo") << 0 << 0; + QTest::newRow("empty-2") << QString() << QString("foo") << 10 << -1; + QTest::newRow("empty-3") << QString() << QString("foo") << -10 << 0; - QTest::newRow("simple") << QString("a") << QString("foo") << 0 << -1; - QTest::newRow("simple") << QString("a") << QString("bar") << 0 << 1; - QTest::newRow("harder") << QString("foo") << QString("slkdf sldkjf slakjf lskd ffools ldjf") << 0 << 26; - QTest::newRow("harder") << QString("foo") << QString("slkdf sldkjf slakjf lskd ffools ldjf") << 20 << 26; - QTest::newRow("harder") << QString("foo") << QString("slkdf sldkjf slakjf lskd ffools ldjf") << 26 << 26; - QTest::newRow("harder") << QString("foo") << QString("slkdf sldkjf slakjf lskd ffools ldjf") << 27 << -1; + QTest::newRow("simple-1") << QString("a") << QString("foo") << 0 << -1; + QTest::newRow("simple-2") << QString("a") << QString("bar") << 0 << 1; + QTest::newRow("harder-1") << QString("foo") << QString("slkdf sldkjf slakjf lskd ffools ldjf") << 0 << 26; + QTest::newRow("harder-2") << QString("foo") << QString("slkdf sldkjf slakjf lskd ffools ldjf") << 20 << 26; + QTest::newRow("harder-3") << QString("foo") << QString("slkdf sldkjf slakjf lskd ffools ldjf") << 26 << 26; + QTest::newRow("harder-4") << QString("foo") << QString("slkdf sldkjf slakjf lskd ffools ldjf") << 27 << -1; } void tst_QStringMatcher::indexIn() diff --git a/tests/auto/corelib/tools/qstringref/tst_qstringref.cpp b/tests/auto/corelib/tools/qstringref/tst_qstringref.cpp index 77d21013204..de01df2001a 100644 --- a/tests/auto/corelib/tools/qstringref/tst_qstringref.cpp +++ b/tests/auto/corelib/tools/qstringref/tst_qstringref.cpp @@ -288,7 +288,7 @@ void tst_QStringRef::indexOf_data() QTest::newRow("BoyerMooreStressTest4") << veryBigHaystack << veryBigHaystack + 'c' << 0 << true << -1; QTest::newRow("BoyerMooreStressTest5") << veryBigHaystack << 'c' + veryBigHaystack << 0 << true << -1; QTest::newRow("BoyerMooreStressTest6") << 'd' + veryBigHaystack << 'c' + veryBigHaystack << 0 << true << -1; - QTest::newRow("BoyerMooreStressTest6") << veryBigHaystack + 'c' << 'c' + veryBigHaystack << 0 << true << -1; + QTest::newRow("BoyerMooreStressTest7") << veryBigHaystack + 'c' << 'c' + veryBigHaystack << 0 << true << -1; QTest::newRow("BoyerMooreInsensitiveStressTest") << veryBigHaystack << veryBigHaystack << 0 << false << 0; @@ -441,15 +441,15 @@ void tst_QStringRef::lastIndexOf_data() QTest::newRow("4") << a << "G" << 14 << 14 << true; QTest::newRow("5") << a << "G" << 13 << 11 << true; QTest::newRow("6") << a << "B" << a.size() - 1 << 1 << true; - QTest::newRow("6") << a << "B" << - 1 << 1 << true; - QTest::newRow("7") << a << "B" << 1 << 1 << true; - QTest::newRow("8") << a << "B" << 0 << -1 << true; + QTest::newRow("7") << a << "B" << - 1 << 1 << true; + QTest::newRow("8") << a << "B" << 1 << 1 << true; + QTest::newRow("9") << a << "B" << 0 << -1 << true; - QTest::newRow("9") << a << "G" << -1 << a.size()-1 << true; - QTest::newRow("10") << a << "G" << a.size()-1 << a.size()-1 << true; - QTest::newRow("11") << a << "G" << a.size() << -1 << true; - QTest::newRow("12") << a << "A" << 0 << 0 << true; - QTest::newRow("13") << a << "A" << -1*a.size() << 0 << true; + QTest::newRow("10") << a << "G" << -1 << a.size()-1 << true; + QTest::newRow("11") << a << "G" << a.size()-1 << a.size()-1 << true; + QTest::newRow("12") << a << "G" << a.size() << -1 << true; + QTest::newRow("13") << a << "A" << 0 << 0 << true; + QTest::newRow("14") << a << "A" << -1*a.size() << 0 << true; QTest::newRow("15") << a << "efg" << 0 << -1 << false; QTest::newRow("16") << a << "efg" << a.size() << -1 << false; @@ -777,8 +777,8 @@ void tst_QStringRef::compare_data() // different length QTest::newRow("data6") << QString("abcdef") << QString("abc") << 1 << 1; - QTest::newRow("data6") << QString("abCdef") << QString("abc") << -1 << 1; - QTest::newRow("data7") << QString("abc") << QString("abcdef") << -1 << -1; + QTest::newRow("data7") << QString("abCdef") << QString("abc") << -1 << 1; + QTest::newRow("data8") << QString("abc") << QString("abcdef") << -1 << -1; QString upper; upper += QChar(QChar::highSurrogate(0x10400)); @@ -786,7 +786,7 @@ void tst_QStringRef::compare_data() QString lower; lower += QChar(QChar::highSurrogate(0x10428)); lower += QChar(QChar::lowSurrogate(0x10428)); - QTest::newRow("data8") << upper << lower << -1 << 0; + QTest::newRow("data9") << upper << lower << -1 << 0; } static bool isLatin(const QString &s) diff --git a/tests/auto/corelib/tools/qtextboundaryfinder/tst_qtextboundaryfinder.cpp b/tests/auto/corelib/tools/qtextboundaryfinder/tst_qtextboundaryfinder.cpp index 89dd01ac3a9..b8ae709fd0f 100644 --- a/tests/auto/corelib/tools/qtextboundaryfinder/tst_qtextboundaryfinder.cpp +++ b/tests/auto/corelib/tools/qtextboundaryfinder/tst_qtextboundaryfinder.cpp @@ -302,22 +302,22 @@ void tst_QTextBoundaryFinder::toNextBoundary_data() QList boundaries; boundaries << 0 << 3 << 4 << 7 << 8 << 11 << 12 << 13 << 16 << 17 << 20 << 21 << 24 << 25; - QTest::newRow("Line") << QString("Aaa bbb ccc. Ddd eee fff.") << int(QTextBoundaryFinder::Word) \ + QTest::newRow("data1") << QString("Aaa bbb ccc. Ddd eee fff.") << int(QTextBoundaryFinder::Word) \ << boundaries; boundaries.clear(); boundaries << 0 << 13 << 25; - QTest::newRow("Line") << QString("Aaa bbb ccc. Ddd eee fff.") << int(QTextBoundaryFinder::Sentence) \ + QTest::newRow("data2") << QString("Aaa bbb ccc. Ddd eee fff.") << int(QTextBoundaryFinder::Sentence) \ << boundaries; boundaries.clear(); boundaries << 0 << 4 << 8 << 13 << 17 << 21 << 25; - QTest::newRow("Line") << QString("Aaa bbb ccc. Ddd eee fff.") << int(QTextBoundaryFinder::Line) \ + QTest::newRow("data3") << QString("Aaa bbb ccc. Ddd eee fff.") << int(QTextBoundaryFinder::Line) \ << boundaries; boundaries.clear(); boundaries << 0 << 5 << 9 << 15 << 17 << 21 << 28; - QTest::newRow("Line") << QString::fromUtf8("Diga-nos qualé a sua opinião") << int(QTextBoundaryFinder::Line) + QTest::newRow("data4") << QString::fromUtf8("Diga-nos qualé a sua opinião") << int(QTextBoundaryFinder::Line) << boundaries; } @@ -344,22 +344,22 @@ void tst_QTextBoundaryFinder::toPreviousBoundary_data() QList boundaries; boundaries << 25 << 24 << 21 << 20 << 17 << 16 << 13 << 12 << 11 << 8 << 7 << 4 << 3 << 0; - QTest::newRow("Line") << QString("Aaa bbb ccc. Ddd eee fff.") << int(QTextBoundaryFinder::Word) + QTest::newRow("data1") << QString("Aaa bbb ccc. Ddd eee fff.") << int(QTextBoundaryFinder::Word) << boundaries; boundaries.clear(); boundaries << 25 << 13 << 0; - QTest::newRow("Line") << QString("Aaa bbb ccc. Ddd eee fff.") << int(QTextBoundaryFinder::Sentence) + QTest::newRow("data2") << QString("Aaa bbb ccc. Ddd eee fff.") << int(QTextBoundaryFinder::Sentence) << boundaries; boundaries.clear(); boundaries << 25 << 21 << 17 << 13 << 8 << 4 << 0; - QTest::newRow("Line") << QString("Aaa bbb ccc. Ddd eee fff.") << int(QTextBoundaryFinder::Line) + QTest::newRow("data3") << QString("Aaa bbb ccc. Ddd eee fff.") << int(QTextBoundaryFinder::Line) << boundaries; boundaries.clear(); boundaries << 28 << 21 << 17 << 15 << 9 << 5 << 0; - QTest::newRow("Line") << QString::fromUtf8("Diga-nos qualé a sua opinião") << int(QTextBoundaryFinder::Line) + QTest::newRow("data4") << QString::fromUtf8("Diga-nos qualé a sua opinião") << int(QTextBoundaryFinder::Line) << boundaries; } diff --git a/tests/auto/corelib/xml/qxmlstream/tst_qxmlstream.cpp b/tests/auto/corelib/xml/qxmlstream/tst_qxmlstream.cpp index 0ce0da06aa9..bd9fa2a8db5 100644 --- a/tests/auto/corelib/xml/qxmlstream/tst_qxmlstream.cpp +++ b/tests/auto/corelib/xml/qxmlstream/tst_qxmlstream.cpp @@ -674,7 +674,7 @@ void tst_QXmlStream::reportSuccess_data() const const int len = m_handler.successes.count(); for(int i = 0; i < len; ++i) - QTest::newRow(m_handler.successes.at(i).toLatin1().constData()) << false; + QTest::newRow(qPrintable(QString("%1. %2").arg(i).arg(m_handler.successes.at(i)))) << false; if(len == 0) QTest::newRow("No test cases succeeded.") << true; diff --git a/tests/auto/dbus/qdbusabstractinterface/tst_qdbusabstractinterface.cpp b/tests/auto/dbus/qdbusabstractinterface/tst_qdbusabstractinterface.cpp index 28dfd0b63fa..b6962940058 100644 --- a/tests/auto/dbus/qdbusabstractinterface/tst_qdbusabstractinterface.cpp +++ b/tests/auto/dbus/qdbusabstractinterface/tst_qdbusabstractinterface.cpp @@ -89,7 +89,9 @@ public: private slots: void initTestCase(); - void cleanupTestCase(); + + void init(); + void cleanup(); void makeVoidCall(); void makeStringCall(); @@ -194,39 +196,6 @@ private: QProcess proc; }; -class WaitForQPinger: public QObject -{ - Q_OBJECT -public: - WaitForQPinger(); - bool ok(); -public Q_SLOTS: - void ownerChange(const QString &name) - { - if (name == serviceName) - loop.quit(); - } - -private: - QEventLoop loop; -}; - -WaitForQPinger::WaitForQPinger() -{ - QDBusConnection con = QDBusConnection::sessionBus(); - if (!ok()) { - connect(con.interface(), SIGNAL(serviceOwnerChanged(QString,QString,QString)), - SLOT(ownerChange(QString))); - QTimer::singleShot(2000, &loop, SLOT(quit())); - loop.exec(); - } -} - -bool WaitForQPinger::ok() -{ - return QDBusConnection::sessionBus().isConnected() && - QDBusConnection::sessionBus().interface()->isServiceRegistered(serviceName); -} tst_QDBusAbstractInterface::tst_QDBusAbstractInterface() { @@ -244,6 +213,16 @@ void tst_QDBusAbstractInterface::initTestCase() QDBusConnection con = QDBusConnection::sessionBus(); QVERIFY(con.isConnected()); con.registerObject("/", &targetObj, QDBusConnection::ExportScriptableContents); +} + +void tst_QDBusAbstractInterface::init() +{ + QDBusConnection con = QDBusConnection::sessionBus(); + QVERIFY(con.isConnected()); + + // verify service isn't registered by something else + // (e.g. a left over qpinger from a previous test run) + QVERIFY(!con.interface()->isServiceRegistered(serviceName)); // start peer server #ifdef Q_OS_WIN @@ -253,9 +232,8 @@ void tst_QDBusAbstractInterface::initTestCase() #endif QVERIFY(proc.waitForStarted()); - WaitForQPinger w; - QVERIFY(w.ok()); - //QTest::qWait(2000); + // verify service is now registered + QTRY_VERIFY(con.interface()->isServiceRegistered(serviceName)); // get peer server address QDBusMessage req = QDBusMessage::createMethodCall(serviceName, objectPath, interfaceName, "address"); @@ -273,10 +251,24 @@ void tst_QDBusAbstractInterface::initTestCase() QVERIFY(rpl2.arguments().at(0).toBool()); } -void tst_QDBusAbstractInterface::cleanupTestCase() +void tst_QDBusAbstractInterface::cleanup() { - proc.close(); - proc.kill(); + QDBusConnection::disconnectFromPeer("peer"); + + // Kill peer, resetting the object exported by a separate process + proc.terminate(); + QVERIFY(proc.waitForFinished() || proc.state() == QProcess::NotRunning); + + // Reset the object exported by this process + targetObj.m_stringProp = QString(); + targetObj.m_variantProp = QDBusVariant(); + targetObj.m_complexProp = RegisteredType(); + + // Wait until the service is certainly not registered + QDBusConnection con = QDBusConnection::sessionBus(); + if (con.isConnected()) { + QTRY_VERIFY(!con.interface()->isServiceRegistered(serviceName)); + } } void tst_QDBusAbstractInterface::makeVoidCall() @@ -635,6 +627,7 @@ void tst_QDBusAbstractInterface::stringPropWritePeer() QString expectedValue = "This is a value"; QVERIFY(p->setProperty("stringProp", expectedValue)); + QEXPECT_FAIL("", "QTBUG-24262 peer tests are broken", Abort); QCOMPARE(targetObj.m_stringProp, expectedValue); } @@ -660,6 +653,7 @@ void tst_QDBusAbstractInterface::variantPropWritePeer() QDBusVariant expectedValue = QDBusVariant(Q_INT64_C(-47)); QVERIFY(p->setProperty("variantProp", qVariantFromValue(expectedValue))); + QEXPECT_FAIL("", "QTBUG-24262 peer tests are broken", Abort); QCOMPARE(targetObj.m_variantProp.variant(), expectedValue.variant()); } @@ -683,6 +677,7 @@ void tst_QDBusAbstractInterface::complexPropWritePeer() RegisteredType expectedValue = RegisteredType("This is a value"); QVERIFY(p->setProperty("complexProp", qVariantFromValue(expectedValue))); + QEXPECT_FAIL("", "QTBUG-24262 peer tests are broken", Abort); QCOMPARE(targetObj.m_complexProp, expectedValue); } @@ -762,6 +757,7 @@ void tst_QDBusAbstractInterface::stringPropDirectWritePeer() QString expectedValue = "This is a value"; p->setStringProp(expectedValue); + QEXPECT_FAIL("", "QTBUG-24262 peer tests are broken", Abort); QCOMPARE(targetObj.m_stringProp, expectedValue); } @@ -783,6 +779,7 @@ void tst_QDBusAbstractInterface::variantPropDirectWritePeer() QDBusVariant expectedValue = QDBusVariant(Q_INT64_C(-47)); p->setVariantProp(expectedValue); + QEXPECT_FAIL("", "QTBUG-24262 peer tests are broken", Abort); QCOMPARE(targetObj.m_variantProp.variant().userType(), expectedValue.variant().userType()); QCOMPARE(targetObj.m_variantProp.variant(), expectedValue.variant()); } @@ -805,6 +802,7 @@ void tst_QDBusAbstractInterface::complexPropDirectWritePeer() RegisteredType expectedValue = RegisteredType("This is a value"); p->setComplexProp(expectedValue); + QEXPECT_FAIL("", "QTBUG-24262 peer tests are broken", Abort); QCOMPARE(targetObj.m_complexProp, expectedValue); } diff --git a/tests/auto/dbus/qdbusmarshall/common.h b/tests/auto/dbus/qdbusmarshall/common.h index d49f4eff304..87c434b71eb 100644 --- a/tests/auto/dbus/qdbusmarshall/common.h +++ b/tests/auto/dbus/qdbusmarshall/common.h @@ -610,10 +610,6 @@ template<> bool compare(const QVariant &v1, const QVariant &v2) else if (id == QVariant::ByteArray) return compare(v1.toByteArray(), v2.toByteArray()); - else if (id < int(QVariant::UserType)) // yes, v1.type() - // QVariant can compare - return v1 == v2; - else if (id == QMetaType::UChar) return qvariant_cast(v1) == qvariant_cast(v2); @@ -716,6 +712,10 @@ template<> bool compare(const QVariant &v1, const QVariant &v2) else if (id == qMetaTypeId()) // (is) return qvariant_cast(v1) == qvariant_cast(v2); + else if (id < int(QVariant::UserType)) // yes, v1.type() + // QVariant can compare + return v1 == v2; + else { qWarning() << "Please write a comparison case for type" << v1.typeName(); return false; // unknown type diff --git a/tests/auto/dbus/qdbusxmlparser/tst_qdbusxmlparser.cpp b/tests/auto/dbus/qdbusxmlparser/tst_qdbusxmlparser.cpp index 7eb31ffb41f..25e3fdeabdd 100644 --- a/tests/auto/dbus/qdbusxmlparser/tst_qdbusxmlparser.cpp +++ b/tests/auto/dbus/qdbusxmlparser/tst_qdbusxmlparser.cpp @@ -470,12 +470,12 @@ void tst_QDBusXmlParser::properties_data() prop.type = "i"; prop.access = QDBusIntrospection::Property::Read; map << prop; - QTest::newRow("two") << + QTest::newRow("two-1") << "" "" << map; // invert the order of the declaration - QTest::newRow("two") << + QTest::newRow("two-2") << "" "" << map; diff --git a/tests/auto/gui/image/qicoimageformat/tst_qicoimageformat.cpp b/tests/auto/gui/image/qicoimageformat/tst_qicoimageformat.cpp index 25c6c81b2ab..74eec26c52e 100644 --- a/tests/auto/gui/image/qicoimageformat/tst_qicoimageformat.cpp +++ b/tests/auto/gui/image/qicoimageformat/tst_qicoimageformat.cpp @@ -127,8 +127,8 @@ void tst_QIcoImageFormat::canRead_data() QTest::newRow("16px,32px,48px - 16,256,16M colors") << "valid/Obj_N2_Internal_Mem.ico" << 1; QTest::newRow("16px - 16,256,16M colors") << "valid/Status_Play.ico" << 1; QTest::newRow("16px,32px - 16 colors") << "valid/TIMER01.ICO" << 1; - QTest::newRow("16px16c, 32px32c, 32px256c") << "valid/WORLD.ico" << 1; - QTest::newRow("16px16c, 32px32c, 32px256c") << "valid/WORLDH.ico" << 1; + QTest::newRow("16px16c, 32px32c, 32px256c 1") << "valid/WORLD.ico" << 1; + QTest::newRow("16px16c, 32px32c, 32px256c 2") << "valid/WORLDH.ico" << 1; QTest::newRow("invalid floppy (first 8 bytes = 0xff)") << "invalid/35floppy.ico" << 0; QTest::newRow("103x16px, 24BPP") << "valid/trolltechlogo_tiny.ico" << 1; QTest::newRow("includes 32BPP w/alpha") << "valid/semitransparent.ico" << 1; @@ -198,8 +198,8 @@ void tst_QIcoImageFormat::imageCount_data() QTest::newRow("16px,32px,48px - 16,256,16M colors") << "valid/Obj_N2_Internal_Mem.ico" << 9; QTest::newRow("16px - 16,256,16M colors") << "valid/Status_Play.ico" << 3; QTest::newRow("16px,32px - 16 colors") << "valid/TIMER01.ICO" << 2; - QTest::newRow("16px16c, 32px32c, 32px256c") << "valid/WORLD.ico" << 3; - QTest::newRow("16px16c, 32px32c, 32px256c") << "valid/WORLDH.ico" << 3; + QTest::newRow("16px16c, 32px32c, 32px256c 1") << "valid/WORLD.ico" << 3; + QTest::newRow("16px16c, 32px32c, 32px256c 2") << "valid/WORLDH.ico" << 3; QTest::newRow("invalid floppy (first 8 bytes = 0xff)") << "invalid/35floppy.ico" << 0; QTest::newRow("includes 32BPP w/alpha") << "valid/semitransparent.ico" << 9; QTest::newRow("PNG compression") << "valid/Qt.ico" << 4; @@ -227,8 +227,8 @@ void tst_QIcoImageFormat::jumpToNextImage_data() QTest::newRow("16px,32px,48px - 16,256,16M colors") << "valid/Obj_N2_Internal_Mem.ico" << 9; QTest::newRow("16px - 16,256,16M colors") << "valid/Status_Play.ico" << 3; QTest::newRow("16px,32px - 16 colors") << "valid/TIMER01.ICO" << 2; - QTest::newRow("16px16c, 32px32c, 32px256c") << "valid/WORLD.ico" << 3; - QTest::newRow("16px16c, 32px32c, 32px256c") << "valid/WORLDH.ico" << 3; + QTest::newRow("16px16c, 32px32c, 32px256c 1") << "valid/WORLD.ico" << 3; + QTest::newRow("16px16c, 32px32c, 32px256c 2") << "valid/WORLDH.ico" << 3; QTest::newRow("includes 32BPP w/alpha") << "valid/semitransparent.ico" << 9; QTest::newRow("PNG compression") << "valid/Qt.ico" << 4; } @@ -276,8 +276,8 @@ void tst_QIcoImageFormat::nextImageDelay_data() QTest::newRow("16px,32px,48px - 16,256,16M colors") << "valid/Obj_N2_Internal_Mem.ico" << 9; QTest::newRow("16px - 16,256,16M colors") << "valid/Status_Play.ico" << 3; QTest::newRow("16px,32px - 16 colors") << "valid/TIMER01.ICO" << 2; - QTest::newRow("16px16c, 32px32c, 32px256c") << "valid/WORLD.ico" << 3; - QTest::newRow("16px16c, 32px32c, 32px256c") << "valid/WORLDH.ico" << 3; + QTest::newRow("16px16c, 32px32c, 32px256c 1") << "valid/WORLD.ico" << 3; + QTest::newRow("16px16c, 32px32c, 32px256c 2") << "valid/WORLDH.ico" << 3; QTest::newRow("invalid floppy (first 8 bytes = 0xff)") << "invalid/35floppy.ico" << -1; QTest::newRow("includes 32BPP w/alpha") << "valid/semitransparent.ico" << 9; QTest::newRow("PNG compression") << "valid/Qt.ico" << 4; diff --git a/tests/auto/gui/image/qicon/heart.svg b/tests/auto/gui/image/qicon/heart.svg deleted file mode 100644 index 8c982cd93ca..00000000000 --- a/tests/auto/gui/image/qicon/heart.svg +++ /dev/null @@ -1,55 +0,0 @@ - - - - - -Heart Left-Highlight -This is a normal valentines day heart. - - -holiday -valentines - -valentine -hash(0x8a091c0) -hash(0x8a0916c) -signs_and_symbols -hash(0x8a091f0) -day - - - - -Jon Phillips - - - - -Jon Phillips - - - - -Jon Phillips - - - -image/svg+xml - - -en - - - - - - - - - - - - - - - diff --git a/tests/auto/gui/image/qicon/heart.svgz b/tests/auto/gui/image/qicon/heart.svgz deleted file mode 100644 index 0f0913ffa7f..00000000000 Binary files a/tests/auto/gui/image/qicon/heart.svgz and /dev/null differ diff --git a/tests/auto/gui/image/qicon/rect.svg b/tests/auto/gui/image/qicon/rect.svg deleted file mode 100644 index 8eb24727bea..00000000000 --- a/tests/auto/gui/image/qicon/rect.svg +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - - image/svg+xml - - - - - - - - - - - - - diff --git a/tests/auto/gui/image/qicon/trash.svg b/tests/auto/gui/image/qicon/trash.svg deleted file mode 100644 index c44e4c75a2b..00000000000 --- a/tests/auto/gui/image/qicon/trash.svg +++ /dev/null @@ -1,58 +0,0 @@ - - - - - -Keep Tidy Inside - - - - -symbol -bin -signs_and_symbols -clean -rubish -trash -inside -garbage -sign - - - - -Martin Owens - - - - -Martin Owens - - - - -Martin Owens - - - -image/svg+xml - - -en - - - - - - - - - - - - - - - - - diff --git a/tests/auto/gui/image/qicon/tst_qicon.cpp b/tests/auto/gui/image/qicon/tst_qicon.cpp index 7d455f10102..4a9ab93921e 100644 --- a/tests/auto/gui/image/qicon/tst_qicon.cpp +++ b/tests/auto/gui/image/qicon/tst_qicon.cpp @@ -58,13 +58,11 @@ private slots: void actualSize(); void actualSize2_data(); // test with 2 pixmaps with different aspect ratio void actualSize2(); - void svgActualSize(); void isNull(); void swap(); void bestMatch(); void cacheKey(); void detach(); - void svg(); void addFile(); void availableSizes(); void name(); @@ -181,28 +179,6 @@ void tst_QIcon::actualSize2() QCOMPARE(icon.pixmap(argument).size(), result); } -void tst_QIcon::svgActualSize() -{ - if (!haveImageFormat("svg")) { - QSKIP("SVG support is not available"); - } - - const QString prefix = QFileInfo(QFINDTESTDATA("icons")).absolutePath() + "/"; - QIcon icon(prefix + "rect.svg"); - QCOMPARE(icon.actualSize(QSize(16, 16)), QSize(16, 2)); - QCOMPARE(icon.pixmap(QSize(16, 16)).size(), QSize(16, 2)); - - QPixmap p(16, 16); - p.fill(Qt::cyan); - icon.addPixmap(p); - - QCOMPARE(icon.actualSize(QSize(16, 16)), QSize(16, 16)); - QCOMPARE(icon.pixmap(QSize(16, 16)).size(), QSize(16, 16)); - - QCOMPARE(icon.actualSize(QSize(16, 14)), QSize(16, 2)); - QCOMPARE(icon.pixmap(QSize(16, 14)).size(), QSize(16, 2)); -} - void tst_QIcon::isNull() { // test default constructor QIcon defaultConstructor; @@ -395,54 +371,6 @@ void tst_QIcon::detach() QVERIFY(img1 == img2); } -void tst_QIcon::svg() -{ - if (!haveImageFormat("svg")) { - QSKIP("SVG support is not available"); - } - QIcon icon1("heart.svg"); - - QVERIFY(!icon1.pixmap(32).isNull()); - QImage img1 = icon1.pixmap(32).toImage(); - QVERIFY(!icon1.pixmap(32, QIcon::Disabled).isNull()); - QImage img2 = icon1.pixmap(32, QIcon::Disabled).toImage(); - - icon1.addFile("trash.svg", QSize(), QIcon::Disabled); - QVERIFY(!icon1.pixmap(32, QIcon::Disabled).isNull()); - QImage img3 = icon1.pixmap(32, QIcon::Disabled).toImage(); - QVERIFY(img3 != img2); - QVERIFY(img3 != img1); - - QPixmap pm("image.png"); - icon1.addPixmap(pm, QIcon::Normal, QIcon::On); - QVERIFY(!icon1.pixmap(128, QIcon::Normal, QIcon::On).isNull()); - QImage img4 = icon1.pixmap(128, QIcon::Normal, QIcon::On).toImage(); - QVERIFY(img4 != img3); - QVERIFY(img4 != img2); - QVERIFY(img4 != img1); - - QIcon icon2; - icon2.addFile("heart.svg"); - QVERIFY(icon2.pixmap(57).toImage() == icon1.pixmap(57).toImage()); - - QIcon icon3("trash.svg"); - icon3.addFile("heart.svg"); - QVERIFY(icon3.pixmap(57).toImage() == icon1.pixmap(57).toImage()); - - QIcon icon4("heart.svg"); - icon4.addFile("image.png", QSize(), QIcon::Active); - QVERIFY(!icon4.pixmap(32).isNull()); - QVERIFY(!icon4.pixmap(32, QIcon::Active).isNull()); - QVERIFY(icon4.pixmap(32).toImage() == img1); - QIcon pmIcon(pm); - QVERIFY(icon4.pixmap(pm.size(), QIcon::Active).toImage() == pmIcon.pixmap(pm.size(), QIcon::Active).toImage()); - -#ifndef QT_NO_COMPRESS - QIcon icon5("heart.svgz"); - QVERIFY(!icon5.pixmap(32).isNull()); -#endif -} - void tst_QIcon::addFile() { QIcon icon; @@ -506,22 +434,6 @@ void tst_QIcon::availableSizes() QCOMPARE(availableSizes.at(0), QSize(16,16)); } - if (haveImageFormat("svg")) { - // checks that there are no availableSizes for scalable images. - QIcon icon("heart.svg"); - QList availableSizes = icon.availableSizes(); - QVERIFY(availableSizes.isEmpty()); - } - - if (haveImageFormat("svg")) { - // even if an a scalable image contain added pixmaps, - // availableSizes still should be empty. - QIcon icon("heart.svg"); - icon.addFile("image.png", QSize(32,32)); - QList availableSizes = icon.availableSizes(); - QVERIFY(availableSizes.isEmpty()); - } - { // we try to load an icon from resources QIcon icon(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-open-16.png")); diff --git a/tests/auto/gui/image/qimage/tst_qimage.cpp b/tests/auto/gui/image/qimage/tst_qimage.cpp index cda887d8e13..c5c2b13b3e9 100644 --- a/tests/auto/gui/image/qimage/tst_qimage.cpp +++ b/tests/auto/gui/image/qimage/tst_qimage.cpp @@ -1025,17 +1025,17 @@ void tst_QImage::setPixel_data() QTest::newRow("RGB16 blue") << int(QImage::Format_RGB16) << 0xff0000ff << 0x001fu; QTest::newRow("ARGB8565_Premultiplied red") << int(QImage::Format_ARGB8565_Premultiplied) - << 0xffff0000 << 0xffff0000; + << 0xffff0000 << 0xf800ffu; QTest::newRow("ARGB8565_Premultiplied green") << int(QImage::Format_ARGB8565_Premultiplied) - << 0xff00ff00 << 0xff00ff00; + << 0xff00ff00 << 0x07e0ffu; QTest::newRow("ARGB8565_Premultiplied blue") << int(QImage::Format_ARGB8565_Premultiplied) - << 0xff0000ff << 0xff0000ff; + << 0xff0000ff << 0x001fffu; QTest::newRow("RGB666 red") << int(QImage::Format_RGB666) - << 0xffff0000 << 0xffff0000; + << 0xffff0000 << 0x03f000u; QTest::newRow("RGB666 green") << int(QImage::Format_RGB666) - << 0xff00ff00 << 0xff00ff00;; + << 0xff00ff00 << 0x000fc0u; QTest::newRow("RGB666 blue") << int(QImage::Format_RGB666) - << 0xff0000ff << 0xff0000ff; + << 0xff0000ff << 0x00003fu; QTest::newRow("RGB555 red") << int(QImage::Format_RGB555) << 0xffff0000 << 0x7c00u; QTest::newRow("RGB555 green") << int(QImage::Format_RGB555) @@ -1043,17 +1043,17 @@ void tst_QImage::setPixel_data() QTest::newRow("RGB555 blue") << int(QImage::Format_RGB555) << 0xff0000ff << 0x001fu; QTest::newRow("ARGB8555_Premultiplied red") << int(QImage::Format_ARGB8555_Premultiplied) - << 0xffff0000 << 0xffff0000; + << 0xffff0000 << 0x7c00ffu; QTest::newRow("ARGB8555_Premultiplied green") << int(QImage::Format_ARGB8555_Premultiplied) - << 0xff00ff00 << 0xff00ff00; + << 0xff00ff00 << 0x03e0ffu; QTest::newRow("ARGB8555_Premultiplied blue") << int(QImage::Format_ARGB8555_Premultiplied) - << 0xff0000ff << 0xff0000ff; + << 0xff0000ff << 0x001fffu; QTest::newRow("RGB888 red") << int(QImage::Format_RGB888) - << 0xffff0000 << 0xffff0000; + << 0xffff0000 << 0x0000ffu; QTest::newRow("RGB888 green") << int(QImage::Format_RGB888) - << 0xff00ff00 << 0xff00ff00; + << 0xff00ff00 << 0x00ff00u; QTest::newRow("RGB888 blue") << int(QImage::Format_RGB888) - << 0xff0000ff << 0xff0000ff; + << 0xff0000ff << 0xff0000u; } void tst_QImage::setPixel() @@ -1106,57 +1106,18 @@ void tst_QImage::setPixel() break; } case int(QImage::Format_RGB666): - { - for (int y = 0; y < h; ++y) { - const qrgb666 *row = (const qrgb666*)(img.scanLine(y)); - for (int x = 0; x < w; ++x) { - quint32 result = row[x]; - if (result != expected) - printf("[x,y]: %d,%d, expected=%04x, result=%04x\n", - x, y, expected, result); - QCOMPARE(result, expected); - } - } - break; - } case int(QImage::Format_ARGB8565_Premultiplied): - { - for (int y = 0; y < h; ++y) { - const qargb8565 *row = (const qargb8565*)(img.scanLine(y)); - for (int x = 0; x < w; ++x) { - quint32 result = row[x]; - if (result != expected) - printf("[x,y]: %d,%d, expected=%04x, result=%04x\n", - x, y, expected, result); - QCOMPARE(result, expected); - } - } - break; - } case int(QImage::Format_ARGB8555_Premultiplied): - { - for (int y = 0; y < h; ++y) { - const qargb8555 *row = (const qargb8555*)(img.scanLine(y)); - for (int x = 0; x < w; ++x) { - quint32 result = row[x]; - if (result != expected) - printf("[x,y]: %d,%d, expected=%04x, result=%04x\n", - x, y, expected, result); - QCOMPARE(result, expected); - } - } - break; - } case int(QImage::Format_RGB888): { for (int y = 0; y < h; ++y) { - const qrgb888 *row = (const qrgb888*)(img.scanLine(y)); + const quint24 *row = (const quint24*)(img.scanLine(y)); for (int x = 0; x < w; ++x) { - qrgb888 result = row[x]; + quint32 result = row[x]; if (result != expected) printf("[x,y]: %d,%d, expected=%04x, result=%04x\n", - x, y, expected, quint32(result)); - QCOMPARE(uint(result), expected); + x, y, expected, result); + QCOMPARE(result, expected); } } break; diff --git a/tests/auto/gui/image/qimagereader/tst_qimagereader.cpp b/tests/auto/gui/image/qimagereader/tst_qimagereader.cpp index 8a18bee83fd..96171740e2e 100644 --- a/tests/auto/gui/image/qimagereader/tst_qimagereader.cpp +++ b/tests/auto/gui/image/qimagereader/tst_qimagereader.cpp @@ -623,7 +623,6 @@ void tst_QImageReader::supportsAnimation_data() QTest::newRow("XPM: marble") << QString("marble.xpm") << false; QTest::newRow("PNG: kollada") << QString("kollada.png") << false; QTest::newRow("PPM: teapot") << QString("teapot.ppm") << false; - QTest::newRow("PPM: teapot") << QString("teapot.ppm") << false; QTest::newRow("PPM: runners") << QString("runners.ppm") << false; QTest::newRow("XBM: gnus") << QString("gnus.xbm") << false; diff --git a/tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp b/tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp index 8473597dac5..ad9da27c7e8 100644 --- a/tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp +++ b/tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp @@ -52,6 +52,11 @@ #include #include +#ifdef Q_OS_UNIX // for geteuid() +# include +# include +#endif + typedef QMap QStringMap; typedef QList QIntList; Q_DECLARE_METATYPE(QImage) diff --git a/tests/auto/gui/image/qpixmap/qpixmap.pro b/tests/auto/gui/image/qpixmap/qpixmap.pro index 15098770c6b..91d93a781d5 100644 --- a/tests/auto/gui/image/qpixmap/qpixmap.pro +++ b/tests/auto/gui/image/qpixmap/qpixmap.pro @@ -10,3 +10,5 @@ SOURCES += tst_qpixmap.cpp RESOURCES += qpixmap.qrc TESTDATA += convertFromImage/* convertFromToHICON/* loadFromData/* images/* + +win32:CONFIG += insignificant_test # QTBUG-24183 diff --git a/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp b/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp index 527dcce916a..563baef486b 100644 --- a/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp +++ b/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp @@ -52,6 +52,7 @@ #include #include +#include #include #include @@ -1342,7 +1343,7 @@ void tst_QPixmap::fromImageReader_data() QTest::newRow("designer_indexed8_with_alpha.gif") << prefix + "/designer_indexed8_with_alpha.gif"; QTest::newRow("designer_rgb32.jpg") << prefix + "/designer_rgb32.jpg"; QTest::newRow("designer_indexed8_with_alpha_animated") << prefix + "/designer_indexed8_with_alpha_animated.gif"; - QTest::newRow("designer_indexed8_with_alpha_animated") << prefix + "/designer_indexed8_no_alpha_animated.gif"; + QTest::newRow("designer_indexed8_no_alpha_animated") << prefix + "/designer_indexed8_no_alpha_animated.gif"; } void tst_QPixmap::fromImageReader() diff --git a/tests/auto/gui/kernel/kernel.pro b/tests/auto/gui/kernel/kernel.pro index 1adae128cf3..116e9dd1f12 100644 --- a/tests/auto/gui/kernel/kernel.pro +++ b/tests/auto/gui/kernel/kernel.pro @@ -4,6 +4,7 @@ SUBDIRS=\ qdrag \ qevent \ qfileopenevent \ + qguieventdispatcher \ qguimetatype \ qguivariant \ qinputmethod \ diff --git a/tests/auto/gui/kernel/qguiapplication/qguiapplication.pro b/tests/auto/gui/kernel/qguiapplication/qguiapplication.pro index fffa097d730..777e2c6b1a3 100644 --- a/tests/auto/gui/kernel/qguiapplication/qguiapplication.pro +++ b/tests/auto/gui/kernel/qguiapplication/qguiapplication.pro @@ -2,3 +2,5 @@ CONFIG += testcase TARGET = tst_qguiapplication QT += core gui testlib SOURCES = tst_qguiapplication.cpp + +win32:CONFIG += insignificant_test # QTBUG-24186 diff --git a/tests/auto/gui/kernel/qguiapplication/tst_qguiapplication.cpp b/tests/auto/gui/kernel/qguiapplication/tst_qguiapplication.cpp index 2fd875b7f4b..7664706b93a 100644 --- a/tests/auto/gui/kernel/qguiapplication/tst_qguiapplication.cpp +++ b/tests/auto/gui/kernel/qguiapplication/tst_qguiapplication.cpp @@ -53,6 +53,7 @@ private slots: void focusObject(); void allWindows(); void topLevelWindows(); + void abortQuitOnShow(); }; class DummyWindow : public QWindow @@ -77,6 +78,9 @@ public: void tst_QGuiApplication::focusObject() { +#ifdef Q_OS_MAC + QSKIP("This test fails intermittently, and at different locations. See QTBUG-24322"); +#endif int argc = 0; QGuiApplication app(argc, 0); @@ -152,5 +156,44 @@ void tst_QGuiApplication::topLevelWindows() QCOMPARE(app.topLevelWindows().count(), 0); } +class ShowCloseShowWindow : public QWindow +{ + Q_OBJECT +public: + ShowCloseShowWindow(bool showAgain, QWindow *parent = 0) + : QWindow(parent), showAgain(showAgain) + { + QTimer::singleShot(0, this, SLOT(doClose())); + QTimer::singleShot(500, this, SLOT(exitApp())); + } + +private slots: + void doClose() { + close(); + if (showAgain) + show(); + } + + void exitApp() { + qApp->exit(1); + } + +private: + bool showAgain; +}; + +void tst_QGuiApplication::abortQuitOnShow() +{ + int argc = 0; + QGuiApplication app(argc, 0); + QWindow *window1 = new ShowCloseShowWindow(false); + window1->show(); + QCOMPARE(app.exec(), 0); + + QWindow *window2 = new ShowCloseShowWindow(true); + window2->show(); + QCOMPARE(app.exec(), 1); +} + QTEST_APPLESS_MAIN(tst_QGuiApplication) #include "tst_qguiapplication.moc" diff --git a/tests/auto/gui/kernel/qguieventdispatcher/qguieventdispatcher.pro b/tests/auto/gui/kernel/qguieventdispatcher/qguieventdispatcher.pro new file mode 100644 index 00000000000..3057037e74c --- /dev/null +++ b/tests/auto/gui/kernel/qguieventdispatcher/qguieventdispatcher.pro @@ -0,0 +1,4 @@ +CONFIG += testcase +TARGET = tst_qguieventdispatcher +QT = core gui testlib +SOURCES += ../../../corelib/kernel/qeventdispatcher/tst_qeventdispatcher.cpp diff --git a/tests/auto/gui/kernel/qkeysequence/qkeysequence.pro b/tests/auto/gui/kernel/qkeysequence/qkeysequence.pro index c6eb02919e6..1e0baafd09b 100644 --- a/tests/auto/gui/kernel/qkeysequence/qkeysequence.pro +++ b/tests/auto/gui/kernel/qkeysequence/qkeysequence.pro @@ -7,5 +7,3 @@ QT += core-private gui-private SOURCES += tst_qkeysequence.cpp RESOURCES += qkeysequence.qrc - -mac: CONFIG += insignificant_test # QTBUG-23058 diff --git a/tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp b/tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp index eed7977c82b..29588e2ee90 100644 --- a/tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp +++ b/tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp @@ -576,6 +576,11 @@ void tst_QKeySequence::parseString() QFETCH( QString, strSequence ); QFETCH( QKeySequence, keycode ); +#ifdef Q_OS_MAC + QEXPECT_FAIL("Win+A", "QTBUG-24406 - This test fails on OSX", Abort); + QEXPECT_FAIL("Simon+G", "QTBUG-24406 - This test fails on OSX", Abort); +#endif + QCOMPARE( QKeySequence(strSequence).toString(), keycode.toString() ); QVERIFY( QKeySequence(strSequence) == keycode ); } diff --git a/tests/auto/gui/kernel/qwindow/qwindow.pro b/tests/auto/gui/kernel/qwindow/qwindow.pro index 0115d96c568..363f7dd92eb 100644 --- a/tests/auto/gui/kernel/qwindow/qwindow.pro +++ b/tests/auto/gui/kernel/qwindow/qwindow.pro @@ -6,3 +6,4 @@ QT += core-private gui-private testlib SOURCES += tst_qwindow.cpp mac: CONFIG += insignificant_test # QTBUG-23059 + diff --git a/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp b/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp index d7c153dca18..90c96b40309 100644 --- a/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp +++ b/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp @@ -45,6 +45,9 @@ #include +// For QSignalSpy slot connections. +Q_DECLARE_METATYPE(Qt::ScreenOrientation) + class tst_QWindow: public QObject { Q_OBJECT @@ -57,6 +60,8 @@ private slots: void touchToMouseTranslation(); void mouseToTouchTranslation(); void mouseToTouchLoop(); + void touchCancel(); + void touchCancelWithTouchToMouse(); void orientation(); void close(); void initTestCase() @@ -274,6 +279,7 @@ public: event->ignore(); return; } + touchEventType = event->type(); QList points = event->touchPoints(); for (int i = 0; i < points.count(); ++i) { switch (points.at(i).state()) { @@ -283,6 +289,9 @@ public: case Qt::TouchPointReleased: ++touchReleasedCount; break; + case Qt::TouchPointMoved: + ++touchMovedCount; + break; default: break; } @@ -292,14 +301,15 @@ public: InputTestWindow() { keyPressCode = keyReleaseCode = 0; mousePressButton = mouseReleaseButton = 0; - touchPressedCount = touchReleasedCount = 0; - ignoreMouse = ignoreTouch = 0; + touchPressedCount = touchReleasedCount = touchMovedCount = 0; + ignoreMouse = ignoreTouch = false; } int keyPressCode, keyReleaseCode; int mousePressButton, mouseReleaseButton, mouseMoveButton; QPointF mousePressScreenPos, mouseMoveScreenPos; - int touchPressedCount, touchReleasedCount; + int touchPressedCount, touchReleasedCount, touchMovedCount; + QEvent::Type touchEventType; bool ignoreMouse, ignoreTouch; }; @@ -480,11 +490,114 @@ void tst_QWindow::mouseToTouchLoop() QCoreApplication::processEvents(); qApp->setAttribute(Qt::AA_SynthesizeTouchForUnhandledMouseEvents, false); - qApp->setAttribute(Qt::AA_SynthesizeMouseForUnhandledTouchEvents, false); + qApp->setAttribute(Qt::AA_SynthesizeMouseForUnhandledTouchEvents, true); +} + +void tst_QWindow::touchCancel() +{ + InputTestWindow window; + window.setGeometry(80, 80, 40, 40); + window.show(); + QTest::qWaitForWindowShown(&window); + + QList points; + QWindowSystemInterface::TouchPoint tp1; + tp1.id = 1; + + // Start a touch. + tp1.state = Qt::TouchPointPressed; + tp1.area = QRect(10, 10, 4, 4); + points << tp1; + QWindowSystemInterface::handleTouchEvent(&window, touchDevice, points); + QCoreApplication::processEvents(); + QTRY_COMPARE(window.touchEventType, QEvent::TouchBegin); + QTRY_COMPARE(window.touchPressedCount, 1); + + // Cancel the active touch sequence. + QWindowSystemInterface::handleTouchCancelEvent(&window, touchDevice); + QCoreApplication::processEvents(); + QTRY_COMPARE(window.touchEventType, QEvent::TouchCancel); + + // Send a move -> will not be delivered due to the cancellation. + QTRY_COMPARE(window.touchMovedCount, 0); + points[0].state = Qt::TouchPointMoved; + tp1.area.adjust(2, 2, 2, 2); + QWindowSystemInterface::handleTouchEvent(&window, touchDevice, points); + QCoreApplication::processEvents(); + QTRY_COMPARE(window.touchMovedCount, 0); + + // Likewise. The only allowed transition is TouchCancel -> TouchBegin. + QTRY_COMPARE(window.touchReleasedCount, 0); + points[0].state = Qt::TouchPointReleased; + QWindowSystemInterface::handleTouchEvent(&window, touchDevice, points); + QCoreApplication::processEvents(); + QTRY_COMPARE(window.touchReleasedCount, 0); + + // Start a new sequence -> from this point on everything should go through normally. + points[0].state = Qt::TouchPointPressed; + QWindowSystemInterface::handleTouchEvent(&window, touchDevice, points); + QCoreApplication::processEvents(); + QTRY_COMPARE(window.touchEventType, QEvent::TouchBegin); + QTRY_COMPARE(window.touchPressedCount, 2); + + points[0].state = Qt::TouchPointMoved; + tp1.area.adjust(2, 2, 2, 2); + QWindowSystemInterface::handleTouchEvent(&window, touchDevice, points); + QCoreApplication::processEvents(); + QTRY_COMPARE(window.touchMovedCount, 1); + + points[0].state = Qt::TouchPointReleased; + QWindowSystemInterface::handleTouchEvent(&window, touchDevice, points); + QCoreApplication::processEvents(); + QTRY_COMPARE(window.touchReleasedCount, 1); +} + +void tst_QWindow::touchCancelWithTouchToMouse() +{ + InputTestWindow window; + window.ignoreTouch = true; + window.setGeometry(80, 80, 40, 40); + window.show(); + QTest::qWaitForWindowShown(&window); + + QList points; + QWindowSystemInterface::TouchPoint tp1; + tp1.id = 1; + + tp1.state = Qt::TouchPointPressed; + tp1.area = QRect(100, 100, 4, 4); + points << tp1; + QWindowSystemInterface::handleTouchEvent(&window, touchDevice, points); + QCoreApplication::processEvents(); + QTRY_COMPARE(window.mousePressButton, int(Qt::LeftButton)); + QTRY_COMPARE(window.mousePressScreenPos, points[0].area.center()); + + // Cancel the touch. Should result in a mouse release for windows that have + // have an active touch-to-mouse sequence. + QWindowSystemInterface::handleTouchCancelEvent(0, touchDevice); + QCoreApplication::processEvents(); + + QTRY_COMPARE(window.mouseReleaseButton, int(Qt::LeftButton)); + + // Now change the window to accept touches. + window.mousePressButton = window.mouseReleaseButton = 0; + window.ignoreTouch = false; + + // Send a touch, there will be no mouse event generated. + QWindowSystemInterface::handleTouchEvent(&window, touchDevice, points); + QCoreApplication::processEvents(); + QTRY_COMPARE(window.mousePressButton, 0); + + // Cancel the touch. It should not result in a mouse release with this window. + QWindowSystemInterface::handleTouchCancelEvent(0, touchDevice); + QCoreApplication::processEvents(); + QTRY_COMPARE(window.mouseReleaseButton, 0); } void tst_QWindow::orientation() { + qRegisterMetaType("Qt::ScreenOrientation"); + QWindow window; window.setGeometry(80, 80, 40, 40); window.create(); diff --git a/tests/auto/gui/painting/qpainter/qpainter.pro b/tests/auto/gui/painting/qpainter/qpainter.pro index 0209043d201..2cbd5b7e1ca 100644 --- a/tests/auto/gui/painting/qpainter/qpainter.pro +++ b/tests/auto/gui/painting/qpainter/qpainter.pro @@ -5,6 +5,7 @@ QT += widgets widgets-private printsupport testlib SOURCES += tst_qpainter.cpp mac*:CONFIG+=insignificant_test +win32:CONFIG += insignificant_test # QTBUG-24188 TESTDATA += drawEllipse/* drawLine_rop_bitmap/* drawPixmap_rop/* drawPixmap_rop_bitmap/* \ task217400.png diff --git a/tests/auto/gui/painting/qpainterpath/tst_qpainterpath.cpp b/tests/auto/gui/painting/qpainterpath/tst_qpainterpath.cpp index bcd009dfb41..44006d45716 100644 --- a/tests/auto/gui/painting/qpainterpath/tst_qpainterpath.cpp +++ b/tests/auto/gui/painting/qpainterpath/tst_qpainterpath.cpp @@ -282,13 +282,13 @@ void tst_QPainterPath::contains_QPointF_data() inside.addEllipse(base_rect.adjusted(5, 5, -5, -5)); QPolygonF inside_poly = inside.toFillPolygon(); for (int i=0; i list = QPrinterInfo::availablePrinters(); bool found = false; diff --git a/tests/auto/gui/qopengl/qopengl.pro b/tests/auto/gui/qopengl/qopengl.pro index f3c020dde2e..d0af96df37a 100644 --- a/tests/auto/gui/qopengl/qopengl.pro +++ b/tests/auto/gui/qopengl/qopengl.pro @@ -9,3 +9,4 @@ QT += gui gui-private core-private testlib SOURCES += tst_qopengl.cpp mac: CONFIG += insignificant_test # QTBUG-23061 +win32:CONFIG += insignificant_test # QTBUG-24192 diff --git a/tests/auto/gui/text/qcssparser/tst_qcssparser.cpp b/tests/auto/gui/text/qcssparser/tst_qcssparser.cpp index 7eda35efb8a..7e0a60c8596 100644 --- a/tests/auto/gui/text/qcssparser/tst_qcssparser.cpp +++ b/tests/auto/gui/text/qcssparser/tst_qcssparser.cpp @@ -344,7 +344,6 @@ void tst_QCssParser::term_data() val.variant = QVariant(QColor("#ffbb00")); QTest::newRow("hexcolor2") << true << "#fb0" << val; - QTest::ignoreMessage(QtWarningMsg, "QCssParser::parseHexColor: Unknown color name '#cafebabe'"); QTest::newRow("hexcolor_failure") << false << "#cafebabe" << val; val.type = QCss::Value::Uri; @@ -368,6 +367,9 @@ void tst_QCssParser::term() QFETCH(QString, css); QFETCH(QCss::Value, expectedValue); + if (strcmp(QTest::currentDataTag(), "hexcolor_failure") == 0) + QTest::ignoreMessage(QtWarningMsg, "QCssParser::parseHexColor: Unknown color name '#cafebabe'"); + QCss::Parser parser(css); QCss::Value val; QVERIFY(parser.testTerm()); diff --git a/tests/auto/gui/text/qfontdatabase/qfontdatabase.pro b/tests/auto/gui/text/qfontdatabase/qfontdatabase.pro index c853aaa1000..034d08fc8f6 100644 --- a/tests/auto/gui/text/qfontdatabase/qfontdatabase.pro +++ b/tests/auto/gui/text/qfontdatabase/qfontdatabase.pro @@ -11,3 +11,4 @@ wince* { } mac: CONFIG += insignificant_test # QTBUG-23062 +win32:CONFIG += insignificant_test # QTBUG-24193 diff --git a/tests/auto/gui/text/qfontmetrics/qfontmetrics.pro b/tests/auto/gui/text/qfontmetrics/qfontmetrics.pro index a636651724f..bb0d8e3c4a8 100644 --- a/tests/auto/gui/text/qfontmetrics/qfontmetrics.pro +++ b/tests/auto/gui/text/qfontmetrics/qfontmetrics.pro @@ -4,3 +4,4 @@ QT += testlib SOURCES += tst_qfontmetrics.cpp RESOURCES += testfont.qrc +win32:CONFIG += insignificant_test # QTBUG-24195 diff --git a/tests/auto/gui/text/qfontmetrics/tst_qfontmetrics.cpp b/tests/auto/gui/text/qfontmetrics/tst_qfontmetrics.cpp index 0b5486dd5ad..4dbdf9a4f17 100644 --- a/tests/auto/gui/text/qfontmetrics/tst_qfontmetrics.cpp +++ b/tests/auto/gui/text/qfontmetrics/tst_qfontmetrics.cpp @@ -140,7 +140,7 @@ void tst_QFontMetrics::metrics() font = fdb.font(family, style, 12); QFontMetrics fontmetrics(font); - QCOMPARE(fontmetrics.ascent() + fontmetrics.descent() + 1, + QCOMPARE(fontmetrics.ascent() + fontmetrics.descent(), fontmetrics.height()); QCOMPARE(fontmetrics.height() + fontmetrics.leading(), @@ -156,7 +156,7 @@ void tst_QFontMetrics::metrics() font = fdb.font(family, style, size); QFontMetrics fontmetrics(font); - QCOMPARE(fontmetrics.ascent() + fontmetrics.descent() + 1, + QCOMPARE(fontmetrics.ascent() + fontmetrics.descent(), fontmetrics.height()); QCOMPARE(fontmetrics.height() + fontmetrics.leading(), fontmetrics.lineSpacing()); diff --git a/tests/auto/gui/text/qglyphrun/qglyphrun.pro b/tests/auto/gui/text/qglyphrun/qglyphrun.pro index acdff0584fb..97b9806c117 100644 --- a/tests/auto/gui/text/qglyphrun/qglyphrun.pro +++ b/tests/auto/gui/text/qglyphrun/qglyphrun.pro @@ -10,3 +10,5 @@ wince* { } else { DEFINES += SRCDIR=\\\"$$PWD/\\\" } + +win32:CONFIG += insignificant_test # QTBUG-24196 diff --git a/tests/auto/gui/text/qrawfont/qrawfont.pro b/tests/auto/gui/text/qrawfont/qrawfont.pro index 149ad6442e3..8cac4abc574 100644 --- a/tests/auto/gui/text/qrawfont/qrawfont.pro +++ b/tests/auto/gui/text/qrawfont/qrawfont.pro @@ -9,3 +9,5 @@ SOURCES += \ INCLUDEPATH += $$QT_SOURCE_TREE/src/3rdparty/harfbuzz/src TESTDATA += testfont_bold_italic.ttf testfont.ttf + +win32:CONFIG += insignificant_test # QTBUG-24197 diff --git a/tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp b/tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp index c2ae853a924..213b3888959 100644 --- a/tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp +++ b/tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp @@ -1171,7 +1171,7 @@ void tst_QTextDocument::toHtml_data() fmt.setVerticalAlignment(QTextCharFormat::AlignMiddle); cursor.insertImage(fmt); - QTest::newRow("image-malign") << QTextDocumentFragment(&doc) + QTest::newRow("image-align-middle") << QTextDocumentFragment(&doc) << QString("

"); } @@ -1183,7 +1183,7 @@ void tst_QTextDocument::toHtml_data() fmt.setVerticalAlignment(QTextCharFormat::AlignTop); cursor.insertImage(fmt); - QTest::newRow("image-malign") << QTextDocumentFragment(&doc) + QTest::newRow("image-align-top") << QTextDocumentFragment(&doc) << QString("

"); } diff --git a/tests/auto/gui/text/qtextdocumentfragment/tst_qtextdocumentfragment.cpp b/tests/auto/gui/text/qtextdocumentfragment/tst_qtextdocumentfragment.cpp index 33293400c2d..50ae22c530f 100644 --- a/tests/auto/gui/text/qtextdocumentfragment/tst_qtextdocumentfragment.cpp +++ b/tests/auto/gui/text/qtextdocumentfragment/tst_qtextdocumentfragment.cpp @@ -3078,7 +3078,7 @@ void tst_QTextDocumentFragment::html_preNewlineHandling_data() << QString("Foo\nBar"); QTest::newRow("pre2") << QString("Foo
\nBar")
                           << QString("Foo\nBar");
-    QTest::newRow("pre2") << QString("Foo
\n\nBar")
+    QTest::newRow("pre3") << QString("Foo
\n\nBar")
                           << QString("Foo\n\nBar");
     QTest::newRow("pre4") << QString("Foo
\nBar")
                           << QString("Foo\nBar");
diff --git a/tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp b/tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp
index e7435743e5f..8920e639575 100644
--- a/tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp
+++ b/tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp
@@ -352,7 +352,7 @@ void tst_QTextLayout::threeLineBoundingRect()
     QCOMPARE(qRound(line.naturalTextWidth()), thirdLineWidth);
     y += qRound(line.ascent() + line.descent());
 
-    QCOMPARE(layout.boundingRect(), QRectF(0, 0, longestLine, y + 1));
+    QCOMPARE(layout.boundingRect(), QRectF(0, 0, longestLine, y));
 }
 
 void tst_QTextLayout::boundingRectWithLongLineAndNoWrap()
@@ -386,7 +386,7 @@ void tst_QTextLayout::forcedBreaks()
     QCOMPARE(line.textStart(), pos);
     QCOMPARE(line.textLength(),2);
     QCOMPARE(qRound(line.naturalTextWidth()),testFont.pixelSize());
-    QCOMPARE((int) line.height(), testFont.pixelSize() + 1); // + 1 baseline
+    QCOMPARE((int) line.height(), testFont.pixelSize());
     QCOMPARE(line.xToCursor(0), line.textStart());
     pos += line.textLength();
 
@@ -395,7 +395,7 @@ void tst_QTextLayout::forcedBreaks()
     QCOMPARE(line.textStart(),pos);
     QCOMPARE(line.textLength(),1);
     QCOMPARE(qRound(line.naturalTextWidth()), 0);
-    QCOMPARE((int) line.height(), testFont.pixelSize() + 1); // + 1 baseline
+    QCOMPARE((int) line.height(), testFont.pixelSize());
     QCOMPARE(line.xToCursor(0), line.textStart());
     pos += line.textLength();
 
@@ -404,7 +404,7 @@ void tst_QTextLayout::forcedBreaks()
     QCOMPARE(line.textStart(),pos);
     QCOMPARE(line.textLength(),2);
     QCOMPARE(qRound(line.naturalTextWidth()),testFont.pixelSize());
-    QCOMPARE(qRound(line.height()), testFont.pixelSize() + 1); // + 1 baseline
+    QCOMPARE(qRound(line.height()), testFont.pixelSize());
     QCOMPARE(line.xToCursor(0), line.textStart());
     pos += line.textLength();
 
@@ -413,7 +413,7 @@ void tst_QTextLayout::forcedBreaks()
     QCOMPARE(line.textStart(),pos);
     QCOMPARE(line.textLength(),1);
     QCOMPARE(qRound(line.naturalTextWidth()), testFont.pixelSize());
-    QCOMPARE((int) line.height(), testFont.pixelSize() + 1); // + 1 baseline
+    QCOMPARE((int) line.height(), testFont.pixelSize());
     QCOMPARE(line.xToCursor(0), line.textStart());
 }
 
diff --git a/tests/auto/network/access/qabstractnetworkcache/qabstractnetworkcache.pro b/tests/auto/network/access/qabstractnetworkcache/qabstractnetworkcache.pro
index 719c34f286b..ef47a4b4586 100644
--- a/tests/auto/network/access/qabstractnetworkcache/qabstractnetworkcache.pro
+++ b/tests/auto/network/access/qabstractnetworkcache/qabstractnetworkcache.pro
@@ -4,10 +4,6 @@ QT += network testlib
 QT -= gui
 SOURCES  += tst_qabstractnetworkcache.cpp
 
-wince* {
-   testFiles.files = tests
-   testFiles.path = .
-   DEPLOYMENT += testFiles
-}
+TESTDATA += tests/*
 
 CONFIG += insignificant_test  # QTBUG-20686; note, assumed unstable on all platforms
diff --git a/tests/auto/network/access/qnetworkcookie/tst_qnetworkcookie.cpp b/tests/auto/network/access/qnetworkcookie/tst_qnetworkcookie.cpp
index 7c27973b564..bcd9cbdff78 100644
--- a/tests/auto/network/access/qnetworkcookie/tst_qnetworkcookie.cpp
+++ b/tests/auto/network/access/qnetworkcookie/tst_qnetworkcookie.cpp
@@ -165,11 +165,11 @@ void tst_QNetworkCookie::parseSingleCookie_data()
     QTest::newRow("with-value2") << " a=b" << cookie;
     QTest::newRow("with-value3") << "a=b " << cookie;
     QTest::newRow("with-value4") << " a=b " << cookie;
-    QTest::newRow("with-value4") << " a=b ;" << cookie;
-    QTest::newRow("with-value5") << "a =b" << cookie;
-    QTest::newRow("with-value6") << "a= b" << cookie;
-    QTest::newRow("with-value7") << "a = b" << cookie;
-    QTest::newRow("with-value8") << "a = b " << cookie;
+    QTest::newRow("with-value5") << " a=b ;" << cookie;
+    QTest::newRow("with-value6") << "a =b" << cookie;
+    QTest::newRow("with-value7") << "a= b" << cookie;
+    QTest::newRow("with-value8") << "a = b" << cookie;
+    QTest::newRow("with-value9") << "a = b " << cookie;
 
     cookie.setValue("\",\"");
     QTest::newRow("with-value-with-special1") << "a = \",\" " << cookie;
@@ -376,31 +376,31 @@ void tst_QNetworkCookie::parseSingleCookie_data()
 
     // extra offsets
     cookie.setExpirationDate(QDateTime(QDate(1989, 1, 2), QTime(0, 0), Qt::UTC));
-    QTest::newRow("zoneoffset-14") << "a=b;expires=Jan 1 89 15:0 JST+1" << cookie;
+    QTest::newRow("zoneoffset-15") << "a=b;expires=Jan 1 89 15:0 JST+1" << cookie;
     cookie.setExpirationDate(QDateTime(QDate(1989, 1, 1), QTime(1, 0), Qt::UTC));
-    QTest::newRow("zoneoffset-15") << "a=b;expires=Jan 1 89 0:0 GMT+1" << cookie;
+    QTest::newRow("zoneoffset-16") << "a=b;expires=Jan 1 89 0:0 GMT+1" << cookie;
     cookie.setExpirationDate(QDateTime(QDate(1989, 1, 1), QTime(0, 0), Qt::UTC));
-    QTest::newRow("zoneoffset-15b") << "a=b;expires=Jan 1 89 1:0 GMT-1" << cookie;
+    QTest::newRow("zoneoffset-17") << "a=b;expires=Jan 1 89 1:0 GMT-1" << cookie;
     cookie.setExpirationDate(QDateTime(QDate(1989, 1, 1), QTime(1, 0), Qt::UTC));
-    QTest::newRow("zoneoffset-16") << "a=b;expires=Jan 1 89 0:0 GMT+01" << cookie;
+    QTest::newRow("zoneoffset-18") << "a=b;expires=Jan 1 89 0:0 GMT+01" << cookie;
     cookie.setExpirationDate(QDateTime(QDate(1989, 1, 1), QTime(1, 5), Qt::UTC));
-    QTest::newRow("zoneoffset-17") << "a=b;expires=Jan 1 89 0:0 GMT+0105" << cookie;
+    QTest::newRow("zoneoffset-19") << "a=b;expires=Jan 1 89 0:0 GMT+0105" << cookie;
     cookie.setExpirationDate(QDateTime(QDate(1989, 1, 1), QTime(0, 0), Qt::UTC));
-    QTest::newRow("zoneoffset-18") << "a=b;expires=Jan 1 89 0:0 GMT+015" << cookie;
+    QTest::newRow("zoneoffset-20") << "a=b;expires=Jan 1 89 0:0 GMT+015" << cookie;
     cookie.setExpirationDate(QDateTime(QDate(1989, 1, 1), QTime(0, 0), Qt::UTC));
-    QTest::newRow("zoneoffset-19") << "a=b;expires=Jan 1 89 0:0 GM" << cookie;
+    QTest::newRow("zoneoffset-21") << "a=b;expires=Jan 1 89 0:0 GM" << cookie;
     cookie.setExpirationDate(QDateTime(QDate(1989, 1, 1), QTime(0, 0), Qt::UTC));
-    QTest::newRow("zoneoffset-19b") << "a=b;expires=Jan 1 89 0:0 GMT" << cookie;
+    QTest::newRow("zoneoffset-22") << "a=b;expires=Jan 1 89 0:0 GMT" << cookie;
 
     // offsets from gmt
     cookie.setExpirationDate(QDateTime(QDate(1989, 1, 1), QTime(1, 0), Qt::UTC));
-    QTest::newRow("zoneoffset-20") << "a=b;expires=Jan 1 89 0:0 +1" << cookie;
+    QTest::newRow("zoneoffset-23") << "a=b;expires=Jan 1 89 0:0 +1" << cookie;
     cookie.setExpirationDate(QDateTime(QDate(1989, 1, 1), QTime(1, 0), Qt::UTC));
-    QTest::newRow("zoneoffset-21") << "a=b;expires=Jan 1 89 0:0 +01" << cookie;
+    QTest::newRow("zoneoffset-24") << "a=b;expires=Jan 1 89 0:0 +01" << cookie;
     cookie.setExpirationDate(QDateTime(QDate(1989, 1, 1), QTime(1, 1), Qt::UTC));
-    QTest::newRow("zoneoffset-22") << "a=b;expires=Jan 1 89 0:0 +0101" << cookie;
+    QTest::newRow("zoneoffset-25") << "a=b;expires=Jan 1 89 0:0 +0101" << cookie;
     cookie.setExpirationDate(QDateTime(QDate(1989, 1, 1), QTime(0, 0), Qt::UTC));
-    QTest::newRow("zoneoffset-23") << "a=b;expires=Jan 1 89 1:0 -1" << cookie;
+    QTest::newRow("zoneoffset-26") << "a=b;expires=Jan 1 89 1:0 -1" << cookie;
 
     // Y2k
     cookie.setExpirationDate(QDateTime(QDate(2000, 1, 1), QTime(0, 0), Qt::UTC));
diff --git a/tests/auto/network/access/qnetworkcookiejar/tst_qnetworkcookiejar.cpp b/tests/auto/network/access/qnetworkcookiejar/tst_qnetworkcookiejar.cpp
index 73d0a4a6503..0e046ad6f9c 100644
--- a/tests/auto/network/access/qnetworkcookiejar/tst_qnetworkcookiejar.cpp
+++ b/tests/auto/network/access/qnetworkcookiejar/tst_qnetworkcookiejar.cpp
@@ -284,7 +284,7 @@ void tst_QNetworkCookieJar::cookiesForUrl_data()
     QTest::newRow("match-2") << allCookies << "http://nokia.com/web/" << result;
     QTest::newRow("match-3") << allCookies << "http://nokia.com/web/content" << result;
     QTest::newRow("match-4") << allCookies << "http://qt.nokia.com/web" << result;
-    QTest::newRow("match-4") << allCookies << "http://qt.nokia.com/web/" << result;
+    QTest::newRow("match-5") << allCookies << "http://qt.nokia.com/web/" << result;
     QTest::newRow("match-6") << allCookies << "http://qt.nokia.com/web/content" << result;
 
     cookie.setPath("/web/wiki");
@@ -295,7 +295,7 @@ void tst_QNetworkCookieJar::cookiesForUrl_data()
     QTest::newRow("one-match-2") << allCookies << "http://nokia.com/web/" << result;
     QTest::newRow("one-match-3") << allCookies << "http://nokia.com/web/content" << result;
     QTest::newRow("one-match-4") << allCookies << "http://qt.nokia.com/web" << result;
-    QTest::newRow("one-match-4") << allCookies << "http://qt.nokia.com/web/" << result;
+    QTest::newRow("one-match-5") << allCookies << "http://qt.nokia.com/web/" << result;
     QTest::newRow("one-match-6") << allCookies << "http://qt.nokia.com/web/content" << result;
 
     result.prepend(cookie);     // longer path, it must match first
@@ -317,7 +317,7 @@ void tst_QNetworkCookieJar::cookiesForUrl_data()
     QTest::newRow("exp-match-2") << allCookies << "http://nokia.com/web/" << result;
     QTest::newRow("exp-match-3") << allCookies << "http://nokia.com/web/content" << result;
     QTest::newRow("exp-match-4") << allCookies << "http://qt.nokia.com/web" << result;
-    QTest::newRow("exp-match-4") << allCookies << "http://qt.nokia.com/web/" << result;
+    QTest::newRow("exp-match-5") << allCookies << "http://qt.nokia.com/web/" << result;
     QTest::newRow("exp-match-6") << allCookies << "http://qt.nokia.com/web/content" << result;
 
     // path matching
diff --git a/tests/auto/network/access/qnetworkdiskcache/tst_qnetworkdiskcache.cpp b/tests/auto/network/access/qnetworkdiskcache/tst_qnetworkdiskcache.cpp
index 533108e76be..8a3c52cf725 100644
--- a/tests/auto/network/access/qnetworkdiskcache/tst_qnetworkdiskcache.cpp
+++ b/tests/auto/network/access/qnetworkdiskcache/tst_qnetworkdiskcache.cpp
@@ -306,7 +306,7 @@ void tst_QNetworkDiskCache::data_data()
     QNetworkCacheMetaData::RawHeaderList headers;
     headers.append(QNetworkCacheMetaData::RawHeader("type", "bin"));
     metaData.setRawHeaders(headers);
-    QTest::newRow("null") << metaData;
+    QTest::newRow("non-null") << metaData;
 }
 
 // public QIODevice* data(QUrl const& url)
diff --git a/tests/auto/network/access/qnetworkreply/echo/main.cpp b/tests/auto/network/access/qnetworkreply/echo/main.cpp
index 8e6811d2ff6..90217e49233 100644
--- a/tests/auto/network/access/qnetworkreply/echo/main.cpp
+++ b/tests/auto/network/access/qnetworkreply/echo/main.cpp
@@ -39,8 +39,7 @@
 **
 ****************************************************************************/
 
-
-#include 
+#include 
 
 int main(int argc, char **)
 {
diff --git a/tests/auto/network/access/qnetworkreply/qnetworkreply.pro b/tests/auto/network/access/qnetworkreply/qnetworkreply.pro
index 0bcf067c4f3..885e7f15b67 100644
--- a/tests/auto/network/access/qnetworkreply/qnetworkreply.pro
+++ b/tests/auto/network/access/qnetworkreply/qnetworkreply.pro
@@ -1,4 +1,5 @@
 TEMPLATE = subdirs
-SUBDIRS = test
 
 !wince*:SUBDIRS += echo
+test.depends += $$SUBDIRS
+SUBDIRS += test
diff --git a/tests/auto/network/access/qnetworkreply/test/test.pro b/tests/auto/network/access/qnetworkreply/test/test.pro
index 1dfd67a1c89..f267b096313 100644
--- a/tests/auto/network/access/qnetworkreply/test/test.pro
+++ b/tests/auto/network/access/qnetworkreply/test/test.pro
@@ -5,26 +5,13 @@ TARGET = ../tst_qnetworkreply
 
 contains(QT_CONFIG,xcb): CONFIG+=insignificant_test  # unstable, QTBUG-21102
 
-win32 {
-  CONFIG(debug, debug|release) {
-    TARGET = ../../debug/tst_qnetworkreply
-} else {
-    TARGET = ../../release/tst_qnetworkreply
-  }
-}
-
-DEFINES += SRCDIR=\\\"$$PWD/..\\\"
-
 QT = core-private network-private testlib
 RESOURCES += ../qnetworkreply.qrc
 
-wince* {
-    # For cross compiled targets, reference data files need to be deployed
-    addFiles.files = ../empty ../rfc3252.txt ../resource ../bigfile ../*.jpg
-    addFiles.path = .
-    DEPLOYMENT += addFiles
+contains(QT_CONFIG,ipv6ifname): DEFINES += HAVE_IPV6
+TESTDATA += ../empty ../rfc3252.txt ../resource ../bigfile ../*.jpg ../certs \
+            ../index.html ../smb-file.txt
 
-    certFiles.files = ../certs
-    certFiles.path    = .
-    DEPLOYMENT += certFiles
-}
+win32:CONFIG += insignificant_test # QTBUG-24226
+load(testcase) # for target.path and installTestHelperApp()
+installTestHelperApp("../echo/echo",echo,echo)
diff --git a/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
index 959250acb42..279570b5474 100644
--- a/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
+++ b/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
@@ -135,6 +135,7 @@ class tst_QNetworkReply: public QObject
     enum RunSimpleRequestReturn { Timeout = 0, Success, Failure };
     int returnCode;
     QString testFileName;
+    QString echoProcessDir;
 #if !defined Q_OS_WIN
     QString wronlyFileName;
 #endif
@@ -162,6 +163,7 @@ public:
 
     QString runCustomRequest(const QNetworkRequest &request, QNetworkReplyPtr &reply,
                              const QByteArray &verb, QIODevice *data);
+    int waitForFinish(QNetworkReplyPtr &reply);
 
 public Q_SLOTS:
     void finished();
@@ -391,8 +393,13 @@ private Q_SLOTS:
     void synchronousAuthenticationCache();
     void pipelining();
 
+    void closeDuringDownload_data();
+    void closeDuringDownload();
+
     // NOTE: This test must be last!
     void parentingRepliesToTheApp();
+private:
+    QString testDataDir;
 };
 
 bool tst_QNetworkReply::seedCreated = false;
@@ -446,9 +453,13 @@ QT_END_NAMESPACE
 #ifndef QT_NO_OPENSSL
 static void setupSslServer(QSslSocket* serverSocket)
 {
+    QString testDataDir = QFileInfo(QFINDTESTDATA("rfc3252.txt")).absolutePath();
+    if (testDataDir.isEmpty())
+        testDataDir = QCoreApplication::applicationDirPath();
+
     serverSocket->setProtocol(QSsl::AnyProtocol);
-    serverSocket->setLocalCertificate(SRCDIR "/certs/server.pem");
-    serverSocket->setPrivateKey(SRCDIR "/certs/server.key");
+    serverSocket->setLocalCertificate(testDataDir + "/certs/server.pem");
+    serverSocket->setPrivateKey(testDataDir + "/certs/server.key");
 }
 #endif
 
@@ -1231,9 +1242,18 @@ QString tst_QNetworkReply::runSimpleRequest(QNetworkAccessManager::Operation op,
         connect(reply, SIGNAL(finished()), SLOT(finished()));
         connect(reply, SIGNAL(error(QNetworkReply::NetworkError)), SLOT(gotError()));
 
+        int count = 0;
         loop = new QEventLoop;
-        QTimer::singleShot(20000, loop, SLOT(quit()));
-        code = returnCode == Timeout ? loop->exec() : returnCode;
+        QSignalSpy spy(reply, SIGNAL(downloadProgress(qint64,qint64)));
+        while (!reply->isFinished()) {
+            QTimer::singleShot(20000, loop, SLOT(quit()));
+            code = loop->exec();
+            if (count == spy.count() && !reply->isFinished()) {
+                code = Timeout;
+                break;
+            }
+            count = spy.count();
+        }
         delete loop;
         loop = 0;
     }
@@ -1273,6 +1293,31 @@ QString tst_QNetworkReply::runCustomRequest(const QNetworkRequest &request,
     return QString();
 }
 
+int tst_QNetworkReply::waitForFinish(QNetworkReplyPtr &reply)
+{
+    int code = Success;
+    int count = 0;
+
+    connect(reply, SIGNAL(finished()), SLOT(finished()));
+    connect(reply, SIGNAL(error(QNetworkReply::NetworkError)), SLOT(gotError()));
+
+    loop = new QEventLoop;
+    QSignalSpy spy(reply, SIGNAL(downloadProgress(qint64,qint64)));
+    while (!reply->isFinished()) {
+        QTimer::singleShot(10000, loop, SLOT(quit()));
+        code = loop->exec();
+        if (count == spy.count() && !reply->isFinished()) {
+            code = Timeout;
+            break;
+        }
+        count = spy.count();
+    }
+    delete loop;
+    loop = 0;
+
+    return code;
+}
+
 void tst_QNetworkReply::finished()
 {
     loop->exit(returnCode = Success);
@@ -1286,16 +1331,20 @@ void tst_QNetworkReply::gotError()
 
 void tst_QNetworkReply::initTestCase()
 {
+    testDataDir = QFileInfo(QFINDTESTDATA("rfc3252.txt")).absolutePath();
+    if (testDataDir.isEmpty())
+        testDataDir = QCoreApplication::applicationDirPath();
+
     QVERIFY(QtNetworkSettings::verifyTestNetworkSettings());
 #if !defined Q_OS_WIN
-    wronlyFileName = QDir::currentPath() + "/write-only";
+    wronlyFileName = testDataDir + "/write-only";
     QFile wr(wronlyFileName);
     QVERIFY(wr.open(QIODevice::WriteOnly | QIODevice::Truncate));
     wr.setPermissions(QFile::WriteOwner | QFile::WriteUser);
     wr.close();
 #endif
 
-    QDir::setSearchPaths("srcdir", QStringList() << SRCDIR);
+    QDir::setSearchPaths("testdata", QStringList() << testDataDir);
 #ifndef QT_NO_OPENSSL
     QSslSocket::defaultCaCertificates(); //preload certificates
 #endif
@@ -1308,6 +1357,10 @@ void tst_QNetworkReply::initTestCase()
         QVERIFY(networkSession->waitForOpened(30000));
     }
 #endif
+
+    echoProcessDir = QFINDTESTDATA("echo");
+    QVERIFY2(!echoProcessDir.isEmpty(), qPrintable(
+        QString::fromLatin1("Couldn't find echo dir starting from %1.").arg(QDir::currentPath())));
 }
 
 void tst_QNetworkReply::cleanupTestCase()
@@ -1528,10 +1581,10 @@ void tst_QNetworkReply::getFromFileSpecial_data()
     QTest::addColumn("url");
 
     QTest::newRow("resource") << ":/resource" <<  "qrc:/resource";
-    QTest::newRow("search-path") << "srcdir:/rfc3252.txt" << "srcdir:/rfc3252.txt";
-    QTest::newRow("bigfile-path") << "srcdir:/bigfile" << "srcdir:/bigfile";
+    QTest::newRow("search-path") << "testdata:/rfc3252.txt" << "testdata:/rfc3252.txt";
+    QTest::newRow("bigfile-path") << "testdata:/bigfile" << "testdata:/bigfile";
 #ifdef Q_OS_WIN
-    QTest::newRow("smb-path") << "srcdir:/smb-file.txt" << "file://" + QtNetworkSettings::winServerName() + "/testshare/test.pri";
+    QTest::newRow("smb-path") << "testdata:/smb-file.txt" << "file://" + QtNetworkSettings::winServerName() + "/testshare/test.pri";
 #endif
 }
 
@@ -1561,8 +1614,8 @@ void tst_QNetworkReply::getFromFtp_data()
     QTest::addColumn("referenceName");
     QTest::addColumn("url");
 
-    QTest::newRow("rfc3252.txt") << SRCDIR "/rfc3252.txt" << "ftp://" + QtNetworkSettings::serverName() + "/qtest/rfc3252.txt";
-    QTest::newRow("bigfile") << SRCDIR "/bigfile" << "ftp://" + QtNetworkSettings::serverName() + "/qtest/bigfile";
+    QTest::newRow("rfc3252.txt") << (testDataDir + "/rfc3252.txt") << "ftp://" + QtNetworkSettings::serverName() + "/qtest/rfc3252.txt";
+    QTest::newRow("bigfile") << (testDataDir + "/bigfile") << "ftp://" + QtNetworkSettings::serverName() + "/qtest/bigfile";
 }
 
 void tst_QNetworkReply::getFromFtp()
@@ -1589,9 +1642,9 @@ void tst_QNetworkReply::getFromHttp_data()
     QTest::addColumn("referenceName");
     QTest::addColumn("url");
 
-    QTest::newRow("success-internal") << SRCDIR "/rfc3252.txt" << "http://" + QtNetworkSettings::serverName() + "/qtest/rfc3252.txt";
-    QTest::newRow("success-external") << SRCDIR "/rfc3252.txt" << "http://www.ietf.org/rfc/rfc3252.txt";
-    QTest::newRow("bigfile-internal") << SRCDIR "/bigfile" << "http://" + QtNetworkSettings::serverName() + "/qtest/bigfile";
+    QTest::newRow("success-internal") << (testDataDir + "/rfc3252.txt") << "http://" + QtNetworkSettings::serverName() + "/qtest/rfc3252.txt";
+    QTest::newRow("success-external") << (testDataDir + "/rfc3252.txt") << "http://www.ietf.org/rfc/rfc3252.txt";
+    QTest::newRow("bigfile-internal") << (testDataDir + "/bigfile") << "http://" + QtNetworkSettings::serverName() + "/qtest/bigfile";
 }
 
 void tst_QNetworkReply::getFromHttp()
@@ -1628,9 +1681,9 @@ void tst_QNetworkReply::headFromHttp_data()
     QTest::addColumn("contentType");
     QTest::addColumn("proxy");
 
-    qint64 rfcsize = QFileInfo(SRCDIR "/rfc3252.txt").size();
-    qint64 bigfilesize = QFileInfo(SRCDIR "/bigfile").size();
-    qint64 indexsize = QFileInfo(SRCDIR "/index.html").size();
+    qint64 rfcsize = QFileInfo(testDataDir + "/rfc3252.txt").size();
+    qint64 bigfilesize = QFileInfo(testDataDir + "/bigfile").size();
+    qint64 indexsize = QFileInfo(testDataDir + "/index.html").size();
 
     //testing proxies, mainly for the 407 response from http proxy
     for (int i = 0; i < proxies.count(); ++i) {
@@ -1689,7 +1742,7 @@ void tst_QNetworkReply::getErrors_data()
 
     // empties
     QTest::newRow("empty-url") << QString() << int(QNetworkReply::ProtocolUnknownError) << 0 << true;
-    QTest::newRow("empty-scheme-host") << SRCDIR "/rfc3252.txt" << int(QNetworkReply::ProtocolUnknownError) << 0 << true;
+    QTest::newRow("empty-scheme-host") << (testDataDir + "/rfc3252.txt") << int(QNetworkReply::ProtocolUnknownError) << 0 << true;
     QTest::newRow("empty-scheme") << "//" + QtNetworkSettings::winServerName() + "/testshare/test.pri"
             << int(QNetworkReply::ProtocolUnknownError) << 0 << true;
 
@@ -1742,6 +1795,14 @@ void tst_QNetworkReply::getErrors()
     QFETCH(QString, url);
     QNetworkRequest request(url);
 
+#ifdef Q_OS_UNIX
+    if ((qstrcmp(QTest::currentDataTag(), "file-is-wronly") == 0) ||
+        (qstrcmp(QTest::currentDataTag(), "file-permissions") == 0)) {
+        if (::getuid() == 0)
+            QSKIP("Running this test as root doesn't make sense");
+    }
+#endif
+
     QNetworkReplyPtr reply = manager.get(request);
     reply->setParent(this);     // we have expect-fails
 
@@ -1749,11 +1810,7 @@ void tst_QNetworkReply::getErrors()
         QCOMPARE(reply->error(), QNetworkReply::NoError);
 
     // now run the request:
-    connect(reply, SIGNAL(finished()),
-            &QTestEventLoop::instance(), SLOT(exitLoop()));
-    QTestEventLoop::instance().enterLoop(10);
-    QVERIFY(!QTestEventLoop::instance().timeout());
-    //qDebug() << reply->errorString();
+    QVERIFY(waitForFinish(reply) != Timeout);
 
     QFETCH(int, error);
     QEXPECT_FAIL("ftp-is-dir", "QFtp cannot provide enough detail", Abort);
@@ -1859,8 +1916,15 @@ void tst_QNetworkReply::putToFtp()
     QNetworkReply *r = qnam.get(req);
 
     QObject::connect(r, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
-    QTestEventLoop::instance().enterLoop(10);
-    QObject::disconnect(r, SIGNAL(finished(bool)), &QTestEventLoop::instance(), SLOT(exitLoop()));
+    int count = 0;
+    QSignalSpy spy(r, SIGNAL(downloadProgress(qint64,qint64)));
+    while (!r->isFinished()) {
+        QTestEventLoop::instance().enterLoop(10);
+        if (count == spy.count() && !r->isFinished())
+            break;
+        count = spy.count();
+    }
+    QObject::disconnect(r, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
 
     QByteArray uploaded = r->readAll();
     QCOMPARE(uploaded.size(), data.size());
@@ -2103,7 +2167,7 @@ void tst_QNetworkReply::postToHttpMultipart_data()
     imagePart11.setHeader(QNetworkRequest::ContentDispositionHeader, QVariant("form-data; name=\"testImage\""));
     imagePart11.setRawHeader("Content-Location", "http://my.test.location.tld");
     imagePart11.setRawHeader("Content-ID", "my@id.tld");
-    QFile *file11 = new QFile(SRCDIR "/image1.jpg");
+    QFile *file11 = new QFile(testDataDir + "/image1.jpg");
     file11->open(QIODevice::ReadOnly);
     imagePart11.setBodyDevice(file11);
     QHttpMultiPart *imageMultiPart1 = new QHttpMultiPart(QHttpMultiPart::FormDataType);
@@ -2117,7 +2181,7 @@ void tst_QNetworkReply::postToHttpMultipart_data()
     imagePart21.setHeader(QNetworkRequest::ContentDispositionHeader, QVariant("form-data; name=\"testImage1\""));
     imagePart21.setRawHeader("Content-Location", "http://my.test.location.tld");
     imagePart21.setRawHeader("Content-ID", "my@id.tld");
-    QFile *file21 = new QFile(SRCDIR "/image1.jpg");
+    QFile *file21 = new QFile(testDataDir + "/image1.jpg");
     file21->open(QIODevice::ReadOnly);
     imagePart21.setBodyDevice(file21);
     QHttpMultiPart *imageMultiPart2 = new QHttpMultiPart();
@@ -2128,7 +2192,7 @@ void tst_QNetworkReply::postToHttpMultipart_data()
     QHttpPart imagePart22;
     imagePart22.setHeader(QNetworkRequest::ContentTypeHeader, QVariant("image/jpeg"));
     imagePart22.setHeader(QNetworkRequest::ContentDispositionHeader, QVariant("form-data; name=\"testImage2\""));
-    QFile *file22 = new QFile(SRCDIR "/image2.jpg");
+    QFile *file22 = new QFile(testDataDir + "/image2.jpg");
     file22->open(QIODevice::ReadOnly);
     imagePart22.setBodyDevice(file22);
     imageMultiPart2->append(imagePart22);
@@ -2144,7 +2208,7 @@ void tst_QNetworkReply::postToHttpMultipart_data()
     imagePart31.setHeader(QNetworkRequest::ContentDispositionHeader, QVariant("form-data; name=\"testImage1\""));
     imagePart31.setRawHeader("Content-Location", "http://my.test.location.tld");
     imagePart31.setRawHeader("Content-ID", "my@id.tld");
-    QFile *file31 = new QFile(SRCDIR "/image1.jpg");
+    QFile *file31 = new QFile(testDataDir + "/image1.jpg");
     file31->open(QIODevice::ReadOnly);
     imagePart31.setBodyDevice(file31);
     QHttpMultiPart *imageMultiPart3 = new QHttpMultiPart(QHttpMultiPart::FormDataType);
@@ -2153,7 +2217,7 @@ void tst_QNetworkReply::postToHttpMultipart_data()
     QHttpPart imagePart32;
     imagePart32.setHeader(QNetworkRequest::ContentTypeHeader, QVariant("image/jpeg"));
     imagePart32.setHeader(QNetworkRequest::ContentDispositionHeader, QVariant("form-data; name=\"testImage2\""));
-    QFile *file32 = new QFile(SRCDIR "/image2.jpg");
+    QFile *file32 = new QFile(testDataDir + "/image2.jpg");
     file32->open(QIODevice::ReadOnly);
     imagePart32.setBodyDevice(file31); // check that resetting works
     imagePart32.setBodyDevice(file32);
@@ -2162,7 +2226,7 @@ void tst_QNetworkReply::postToHttpMultipart_data()
     QHttpPart imagePart33;
     imagePart33.setHeader(QNetworkRequest::ContentTypeHeader, QVariant("image/jpeg"));
     imagePart33.setHeader(QNetworkRequest::ContentDispositionHeader, QVariant("form-data; name=\"testImage3\""));
-    QFile *file33 = new QFile(SRCDIR "/image3.jpg");
+    QFile *file33 = new QFile(testDataDir + "/image3.jpg");
     file33->open(QIODevice::ReadOnly);
     imagePart33.setBodyDevice(file33);
     imageMultiPart3->append(imagePart33);
@@ -2177,7 +2241,7 @@ void tst_QNetworkReply::postToHttpMultipart_data()
 
 //    QHttpPart imagePart41;
 //    imagePart41.setHeader(QNetworkRequest::ContentTypeHeader, QVariant("image/jpeg"));
-//    QFile *file41 = new QFile(SRCDIR "/image1.jpg");
+//    QFile *file41 = new QFile(testDataDir + "/image1.jpg");
 //    file41->open(QIODevice::ReadOnly);
 //    imagePart41.setBodyDevice(file41);
 //
@@ -2211,7 +2275,7 @@ void tst_QNetworkReply::postToHttpMultipart_data()
     QHttpPart imagePart51;
     imagePart51.setHeader(QNetworkRequest::ContentTypeHeader, QVariant("image/jpeg"));
     imagePart51.setHeader(QNetworkRequest::ContentDispositionHeader, QVariant("form-data; name=\"testImage\""));
-    QFile *file51 = new QFile(SRCDIR "/image1.jpg");
+    QFile *file51 = new QFile(testDataDir + "/image1.jpg");
     file51->open(QIODevice::ReadOnly);
     QByteArray imageData = file51->readAll();
     file51->close();
@@ -2418,6 +2482,10 @@ void tst_QNetworkReply::connectToIPv6Address()
     QFETCH(QByteArray, dataToSend);
     QFETCH(QByteArray, hostfield);
 
+#if !defined(HAVE_IPV6) && defined(Q_OS_UNIX)
+    QSKIP("system doesn't support ipv6!");
+#endif
+
     QByteArray httpResponse = QByteArray("HTTP/1.0 200 OK\r\nContent-Length: ");
     httpResponse += QByteArray::number(dataToSend.size());
     httpResponse += "\r\n\r\n";
@@ -2430,9 +2498,7 @@ void tst_QNetworkReply::connectToIPv6Address()
     QNetworkRequest request(url);
 
     QNetworkReplyPtr reply = manager.get(request);
-    connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
-    QTestEventLoop::instance().enterLoop(10);
-    QVERIFY(!QTestEventLoop::instance().timeout());
+    QVERIFY(waitForFinish(reply) == Success);
     QByteArray content = reply->readAll();
     //qDebug() << server.receivedData;
     QByteArray hostinfo = "\r\nHost: " + hostfield + ":" + QByteArray::number(server.serverPort()) + "\r\n";
@@ -2599,7 +2665,7 @@ void tst_QNetworkReply::ioGetFromFtp_data()
 
     QTest::newRow("bigfile") << "bigfile" << Q_INT64_C(519240);
 
-    QFile file(SRCDIR "/rfc3252.txt");
+    QFile file(testDataDir + "/rfc3252.txt");
     QTest::newRow("rfc3252.txt") << "rfc3252.txt" << file.size();
 }
 
@@ -2613,9 +2679,7 @@ void tst_QNetworkReply::ioGetFromFtp()
     QNetworkReplyPtr reply = manager.get(request);
     DataReader reader(reply);
 
-    connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
-    QTestEventLoop::instance().enterLoop(10);
-    QVERIFY(!QTestEventLoop::instance().timeout());
+    QVERIFY(waitForFinish(reply) == Success);
 
     QCOMPARE(reply->url(), request.url());
     QCOMPARE(reply->error(), QNetworkReply::NoError);
@@ -2630,7 +2694,7 @@ void tst_QNetworkReply::ioGetFromFtp()
 
 void tst_QNetworkReply::ioGetFromFtpWithReuse()
 {
-    QString fileName = SRCDIR "/rfc3252.txt";
+    QString fileName = testDataDir + "/rfc3252.txt";
     QFile reference(fileName);
     reference.open(QIODevice::ReadOnly);
 
@@ -2643,14 +2707,8 @@ void tst_QNetworkReply::ioGetFromFtpWithReuse()
     DataReader reader2(reply2);
     QSignalSpy spy(reply1, SIGNAL(finished()));
 
-    connect(reply2, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
-    QTestEventLoop::instance().enterLoop(10);
-    QVERIFY(!QTestEventLoop::instance().timeout());
-    if (spy.count() == 0) {
-        connect(reply1, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
-        QTestEventLoop::instance().enterLoop(10);
-        QVERIFY(!QTestEventLoop::instance().timeout());
-    }
+    QVERIFY(waitForFinish(reply1) == Success);
+    QVERIFY(waitForFinish(reply2) == Success);
 
     QCOMPARE(reply1->url(), request.url());
     QCOMPARE(reply2->url(), request.url());
@@ -2669,16 +2727,14 @@ void tst_QNetworkReply::ioGetFromFtpWithReuse()
 
 void tst_QNetworkReply::ioGetFromHttp()
 {
-    QFile reference(SRCDIR "/rfc3252.txt");
+    QFile reference(testDataDir + "/rfc3252.txt");
     QVERIFY(reference.open(QIODevice::ReadOnly));
 
     QNetworkRequest request(QUrl("http://" + QtNetworkSettings::serverName() + "/qtest/rfc3252.txt"));
     QNetworkReplyPtr reply = manager.get(request);
     DataReader reader(reply);
 
-    connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
-    QTestEventLoop::instance().enterLoop(10);
-    QVERIFY(!QTestEventLoop::instance().timeout());
+    QVERIFY(waitForFinish(reply) == Success);
 
     QCOMPARE(reply->url(), request.url());
     QCOMPARE(reply->error(), QNetworkReply::NoError);
@@ -2692,7 +2748,7 @@ void tst_QNetworkReply::ioGetFromHttp()
 
 void tst_QNetworkReply::ioGetFromHttpWithReuseParallel()
 {
-    QFile reference(SRCDIR "/rfc3252.txt");
+    QFile reference(testDataDir + "/rfc3252.txt");
     QVERIFY(reference.open(QIODevice::ReadOnly));
 
     QNetworkRequest request(QUrl("http://" + QtNetworkSettings::serverName() + "/qtest/rfc3252.txt"));
@@ -2702,14 +2758,8 @@ void tst_QNetworkReply::ioGetFromHttpWithReuseParallel()
     DataReader reader2(reply2);
     QSignalSpy spy(reply1, SIGNAL(finished()));
 
-    connect(reply2, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
-    QTestEventLoop::instance().enterLoop(10);
-    QVERIFY(!QTestEventLoop::instance().timeout());
-    if (spy.count() == 0) {
-        connect(reply1, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
-        QTestEventLoop::instance().enterLoop(10);
-        QVERIFY(!QTestEventLoop::instance().timeout());
-    }
+    QVERIFY(waitForFinish(reply2) == Success);
+    QVERIFY(waitForFinish(reply1) == Success);
 
     QCOMPARE(reply1->url(), request.url());
     QCOMPARE(reply2->url(), request.url());
@@ -2730,7 +2780,7 @@ void tst_QNetworkReply::ioGetFromHttpWithReuseParallel()
 
 void tst_QNetworkReply::ioGetFromHttpWithReuseSequential()
 {
-    QFile reference(SRCDIR "/rfc3252.txt");
+    QFile reference(testDataDir + "/rfc3252.txt");
     QVERIFY(reference.open(QIODevice::ReadOnly));
 
     QNetworkRequest request(QUrl("http://" + QtNetworkSettings::serverName() + "/qtest/rfc3252.txt"));
@@ -2738,9 +2788,7 @@ void tst_QNetworkReply::ioGetFromHttpWithReuseSequential()
         QNetworkReplyPtr reply = manager.get(request);
         DataReader reader(reply);
 
-        connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
-        QTestEventLoop::instance().enterLoop(10);
-        QVERIFY(!QTestEventLoop::instance().timeout());
+        QVERIFY(waitForFinish(reply) == Success);
 
         QCOMPARE(reply->url(), request.url());
         QCOMPARE(reply->error(), QNetworkReply::NoError);
@@ -2758,9 +2806,7 @@ void tst_QNetworkReply::ioGetFromHttpWithReuseSequential()
         QNetworkReplyPtr reply = manager.get(request);
         DataReader reader(reply);
 
-        connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
-        QTestEventLoop::instance().enterLoop(10);
-        QVERIFY(!QTestEventLoop::instance().timeout());
+        QVERIFY(waitForFinish(reply) == Success);
 
         QCOMPARE(reply->url(), request.url());
         QCOMPARE(reply->error(), QNetworkReply::NoError);
@@ -2777,12 +2823,21 @@ void tst_QNetworkReply::ioGetFromHttpWithAuth_data()
 {
     QTest::addColumn("url");
     QTest::addColumn("expectedData");
+    QTest::addColumn("expectedAuth");
 
-    QFile reference(SRCDIR "/rfc3252.txt");
+    QFile reference(testDataDir + "/rfc3252.txt");
     reference.open(QIODevice::ReadOnly);
     QByteArray referenceData = reference.readAll();
-    QTest::newRow("basic") << QUrl("http://" + QtNetworkSettings::serverName() + "/qtest/rfcs-auth/rfc3252.txt") << referenceData;
-    QTest::newRow("digest") << QUrl("http://" + QtNetworkSettings::serverName() + "/qtest/auth-digest/") << QByteArray("digest authentication successful\n");
+    QTest::newRow("basic") << QUrl("http://" + QtNetworkSettings::serverName() + "/qtest/rfcs-auth/rfc3252.txt") << referenceData << 1;
+    QTest::newRow("digest") << QUrl("http://" + QtNetworkSettings::serverName() + "/qtest/auth-digest/") << QByteArray("digest authentication successful\n") << 1;
+    //if url contains username & password, then it should be used
+    QTest::newRow("basic-in-url") << QUrl("http://httptest:httptest@" + QtNetworkSettings::serverName() + "/qtest/rfcs-auth/rfc3252.txt") << referenceData << 0;
+    QTest::newRow("digest-in-url") << QUrl("http://httptest:httptest@" + QtNetworkSettings::serverName() + "/qtest/auth-digest/") << QByteArray("digest authentication successful\n") << 0;
+    // if url contains incorrect credentials, expect QNAM to ask for good ones (even if cached - matches behaviour of browsers)
+    QTest::newRow("basic-bad-user-in-url") << QUrl("http://baduser:httptest@" + QtNetworkSettings::serverName() + "/qtest/rfcs-auth/rfc3252.txt") << referenceData << 3;
+    QTest::newRow("basic-bad-password-in-url") << QUrl("http://httptest:wrong@" + QtNetworkSettings::serverName() + "/qtest/rfcs-auth/rfc3252.txt") << referenceData << 3;
+    QTest::newRow("digest-bad-user-in-url") << QUrl("http://baduser:httptest@" + QtNetworkSettings::serverName() + "/qtest/auth-digest/") << QByteArray("digest authentication successful\n") << 3;
+    QTest::newRow("digest-bad-password-in-url") << QUrl("http://httptest:wrong@" + QtNetworkSettings::serverName() + "/qtest/auth-digest/") << QByteArray("digest authentication successful\n") << 3;
 }
 
 void tst_QNetworkReply::ioGetFromHttpWithAuth()
@@ -2793,6 +2848,7 @@ void tst_QNetworkReply::ioGetFromHttpWithAuth()
 
     QFETCH(QUrl, url);
     QFETCH(QByteArray, expectedData);
+    QFETCH(int, expectedAuth);
     QNetworkRequest request(url);
     {
         QNetworkReplyPtr reply1 = manager.get(request);
@@ -2805,14 +2861,9 @@ void tst_QNetworkReply::ioGetFromHttpWithAuth()
         connect(&manager, SIGNAL(authenticationRequired(QNetworkReply*,QAuthenticator*)),
                 SLOT(authenticationRequired(QNetworkReply*,QAuthenticator*)));
 
-        connect(reply2, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
-        QTestEventLoop::instance().enterLoop(10);
-        QVERIFY(!QTestEventLoop::instance().timeout());
-        if (finishedspy.count() == 0) {
-            connect(reply1, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
-            QTestEventLoop::instance().enterLoop(10);
-            QVERIFY(!QTestEventLoop::instance().timeout());
-        }
+        QVERIFY(waitForFinish(reply2) == Success);
+        QVERIFY(waitForFinish(reply1) == Success);
+
         manager.disconnect(SIGNAL(authenticationRequired(QNetworkReply*,QAuthenticator*)),
                            this, SLOT(authenticationRequired(QNetworkReply*,QAuthenticator*)));
 
@@ -2821,7 +2872,8 @@ void tst_QNetworkReply::ioGetFromHttpWithAuth()
         QCOMPARE(reader1.data, expectedData);
         QCOMPARE(reader2.data, expectedData);
 
-        QCOMPARE(authspy.count(), 1);
+        QCOMPARE(authspy.count(), (expectedAuth ? 1 : 0));
+        expectedAuth = qMax(0, expectedAuth - 1);
     }
 
     // rinse and repeat:
@@ -2832,16 +2884,17 @@ void tst_QNetworkReply::ioGetFromHttpWithAuth()
         QSignalSpy authspy(&manager, SIGNAL(authenticationRequired(QNetworkReply*,QAuthenticator*)));
         connect(&manager, SIGNAL(authenticationRequired(QNetworkReply*,QAuthenticator*)),
                 SLOT(authenticationRequired(QNetworkReply*,QAuthenticator*)));
-        connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
-        QTestEventLoop::instance().enterLoop(10);
-        QVERIFY(!QTestEventLoop::instance().timeout());
+
+        QVERIFY(waitForFinish(reply) == Success);
+
         manager.disconnect(SIGNAL(authenticationRequired(QNetworkReply*,QAuthenticator*)),
                            this, SLOT(authenticationRequired(QNetworkReply*,QAuthenticator*)));
 
         QCOMPARE(reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt(), 200);
         QCOMPARE(reader.data, expectedData);
 
-        QCOMPARE(authspy.count(), 0);
+        QCOMPARE(authspy.count(), (expectedAuth ? 1 : 0));
+        expectedAuth = qMax(0, expectedAuth - 1);
     }
 
     // now check with synchronous calls:
@@ -2853,14 +2906,45 @@ void tst_QNetworkReply::ioGetFromHttpWithAuth()
         QSignalSpy authspy(&manager, SIGNAL(authenticationRequired(QNetworkReply*,QAuthenticator*)));
         QNetworkReplyPtr replySync = manager.get(request);
         QVERIFY(replySync->isFinished()); // synchronous
-        QCOMPARE(authspy.count(), 0);
+        if (expectedAuth) {
+            // bad credentials in a synchronous request should just fail
+            QCOMPARE(replySync->error(), QNetworkReply::AuthenticationRequiredError);
+        } else {
+            QCOMPARE(authspy.count(), 0);
 
-        // we cannot use a data reader here, since that connects to the readyRead signal,
-        // just use readAll()
+            // we cannot use a data reader here, since that connects to the readyRead signal,
+            // just use readAll()
 
-        // the only thing we check here is that the auth cache was used when using synchronous requests
-        QCOMPARE(replySync->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt(), 200);
-        QCOMPARE(replySync->readAll(), expectedData);
+            // the only thing we check here is that the auth cache was used when using synchronous requests
+            QCOMPARE(replySync->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt(), 200);
+            QCOMPARE(replySync->readAll(), expectedData);
+        }
+    }
+
+    // check that credentials are used from cache if the same url is requested without credentials
+    {
+        url.setUserInfo(QString());
+        request.setUrl(url);
+        request.setAttribute(
+                QNetworkRequest::SynchronousRequestAttribute,
+                true);
+
+        QSignalSpy authspy(&manager, SIGNAL(authenticationRequired(QNetworkReply*,QAuthenticator*)));
+        QNetworkReplyPtr replySync = manager.get(request);
+        QVERIFY(replySync->isFinished()); // synchronous
+        if (expectedAuth) {
+            // bad credentials in a synchronous request should just fail
+            QCOMPARE(replySync->error(), QNetworkReply::AuthenticationRequiredError);
+        } else {
+            QCOMPARE(authspy.count(), 0);
+
+            // we cannot use a data reader here, since that connects to the readyRead signal,
+            // just use readAll()
+
+            // the only thing we check here is that the auth cache was used when using synchronous requests
+            QCOMPARE(replySync->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt(), 200);
+            QCOMPARE(replySync->readAll(), expectedData);
+        }
     }
 }
 
@@ -2890,7 +2974,7 @@ void tst_QNetworkReply::ioGetFromHttpWithProxyAuth()
     // This test sends three requests
     // The first two in parallel
     // The third after the first two finished
-    QFile reference(SRCDIR "/rfc3252.txt");
+    QFile reference(testDataDir + "/rfc3252.txt");
     QVERIFY(reference.open(QIODevice::ReadOnly));
 
     QNetworkProxy proxy(QNetworkProxy::HttpCachingProxy, QtNetworkSettings::serverName(), 3129);
@@ -2909,14 +2993,9 @@ void tst_QNetworkReply::ioGetFromHttpWithProxyAuth()
         connect(&manager, SIGNAL(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)),
                 SLOT(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)));
 
-        connect(reply2, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
-        QTestEventLoop::instance().enterLoop(10);
-        QVERIFY(!QTestEventLoop::instance().timeout());
-        if (finishedspy.count() == 0) {
-            connect(reply1, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
-            QTestEventLoop::instance().enterLoop(10);
-            QVERIFY(!QTestEventLoop::instance().timeout());
-        }
+        QVERIFY(waitForFinish(reply2) == Success);
+        QVERIFY(waitForFinish(reply1) == Success);
+
         manager.disconnect(SIGNAL(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)),
                            this, SLOT(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)));
 
@@ -2940,9 +3019,9 @@ void tst_QNetworkReply::ioGetFromHttpWithProxyAuth()
         QSignalSpy authspy(&manager, SIGNAL(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)));
         connect(&manager, SIGNAL(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)),
                 SLOT(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)));
-        connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
-        QTestEventLoop::instance().enterLoop(10);
-        QVERIFY(!QTestEventLoop::instance().timeout());
+
+        QVERIFY(waitForFinish(reply) == Success);
+
         manager.disconnect(SIGNAL(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)),
                            this, SLOT(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)));
 
@@ -3002,7 +3081,7 @@ void tst_QNetworkReply::ioGetFromHttpWithSocksProxy()
     qRegisterMetaType(); // for QSignalSpy
     qRegisterMetaType();
 
-    QFile reference(SRCDIR "/rfc3252.txt");
+    QFile reference(testDataDir + "/rfc3252.txt");
     QVERIFY(reference.open(QIODevice::ReadOnly));
 
     QNetworkProxy proxy(QNetworkProxy::Socks5Proxy, QtNetworkSettings::serverName(), 1080);
@@ -3016,9 +3095,9 @@ void tst_QNetworkReply::ioGetFromHttpWithSocksProxy()
         QSignalSpy authspy(&manager, SIGNAL(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)));
         connect(&manager, SIGNAL(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)),
                 SLOT(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)));
-        connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
-        QTestEventLoop::instance().enterLoop(10);
-        QVERIFY(!QTestEventLoop::instance().timeout());
+
+        QVERIFY(waitForFinish(reply) == Success);
+
         manager.disconnect(SIGNAL(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)),
                            this, SLOT(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)));
 
@@ -3039,9 +3118,9 @@ void tst_QNetworkReply::ioGetFromHttpWithSocksProxy()
         QSignalSpy authspy(&manager, SIGNAL(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)));
         connect(&manager, SIGNAL(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)),
                 SLOT(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)));
-        connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
-        QTestEventLoop::instance().enterLoop(10);
-        QVERIFY(!QTestEventLoop::instance().timeout());
+
+        QVERIFY(waitForFinish(reply) == Failure);
+
         manager.disconnect(SIGNAL(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)),
                            this, SLOT(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)));
 
@@ -3062,7 +3141,7 @@ void tst_QNetworkReply::ioGetFromHttpsWithSslErrors()
     qRegisterMetaType(); // for QSignalSpy
     qRegisterMetaType >();
 
-    QFile reference(SRCDIR "/rfc3252.txt");
+    QFile reference(testDataDir + "/rfc3252.txt");
     QVERIFY(reference.open(QIODevice::ReadOnly));
 
     QNetworkRequest request(QUrl("https://" + QtNetworkSettings::serverName() + "/qtest/rfc3252.txt"));
@@ -3074,9 +3153,8 @@ void tst_QNetworkReply::ioGetFromHttpsWithSslErrors()
             SLOT(sslErrors(QNetworkReply*,QList)));
     connect(reply, SIGNAL(metaDataChanged()), SLOT(storeSslConfiguration()));
 
-    connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
-    QTestEventLoop::instance().enterLoop(10);
-    QVERIFY(!QTestEventLoop::instance().timeout());
+    QVERIFY(waitForFinish(reply) == Success);
+
     manager.disconnect(SIGNAL(sslErrors(QNetworkReply*,QList)),
                        this, SLOT(sslErrors(QNetworkReply*,QList)));
 
@@ -3097,7 +3175,7 @@ void tst_QNetworkReply::ioGetFromHttpsWithIgnoreSslErrors()
     qRegisterMetaType(); // for QSignalSpy
     qRegisterMetaType >();
 
-    QFile reference(SRCDIR "/rfc3252.txt");
+    QFile reference(testDataDir + "/rfc3252.txt");
     QVERIFY(reference.open(QIODevice::ReadOnly));
 
     QNetworkRequest request(QUrl("https://" + QtNetworkSettings::serverName() + "/qtest/rfc3252.txt"));
@@ -3108,9 +3186,8 @@ void tst_QNetworkReply::ioGetFromHttpsWithIgnoreSslErrors()
 
     QSignalSpy sslspy(&manager, SIGNAL(sslErrors(QNetworkReply*,QList)));
     connect(reply, SIGNAL(metaDataChanged()), SLOT(storeSslConfiguration()));
-    connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
-    QTestEventLoop::instance().enterLoop(10);
-    QVERIFY(!QTestEventLoop::instance().timeout());
+
+    QVERIFY(waitForFinish(reply) == Success);
 
     QCOMPARE(reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt(), 200);
     QCOMPARE(reader.data, reference.readAll());
@@ -3126,7 +3203,7 @@ void tst_QNetworkReply::ioGetFromHttpsWithSslHandshakeError()
     qRegisterMetaType(); // for QSignalSpy
     qRegisterMetaType >();
 
-    QFile reference(SRCDIR "/rfc3252.txt");
+    QFile reference(testDataDir + "/rfc3252.txt");
     QVERIFY(reference.open(QIODevice::ReadOnly));
 
     QNetworkRequest request(QUrl("https://" + QtNetworkSettings::serverName() + ":80"));
@@ -3137,9 +3214,8 @@ void tst_QNetworkReply::ioGetFromHttpsWithSslHandshakeError()
 
     QSignalSpy sslspy(&manager, SIGNAL(sslErrors(QNetworkReply*,QList)));
     connect(reply, SIGNAL(metaDataChanged()), SLOT(storeSslConfiguration()));
-    connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
-    QTestEventLoop::instance().enterLoop(10);
-    QVERIFY(!QTestEventLoop::instance().timeout());
+
+    QVERIFY(waitForFinish(reply) == Failure);
 
     QCOMPARE(reply->error(), QNetworkReply::SslHandshakeFailedError);
     QCOMPARE(sslspy.count(), 0);
@@ -3197,10 +3273,7 @@ void tst_QNetworkReply::ioGetFromHttpBrokenServer()
     QNetworkReplyPtr reply = manager.get(request);
     QSignalSpy spy(reply, SIGNAL(error(QNetworkReply::NetworkError)));
 
-
-    connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
-    QTestEventLoop::instance().enterLoop(10);
-    QVERIFY(!QTestEventLoop::instance().timeout());
+    QVERIFY(waitForFinish(reply) == Failure);
 
     QCOMPARE(reply->url(), request.url());
     QCOMPARE(spy.count(), 1);
@@ -3230,9 +3303,7 @@ void tst_QNetworkReply::ioGetFromHttpStatus100()
     QNetworkRequest request(QUrl("http://localhost:" + QString::number(server.serverPort())));
     QNetworkReplyPtr reply = manager.get(request);
 
-    connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
-    QTestEventLoop::instance().enterLoop(10);
-    QVERIFY(!QTestEventLoop::instance().timeout());
+    QVERIFY(waitForFinish(reply) == Success);
 
     QCOMPARE(reply->url(), request.url());
     QCOMPARE(reply->error(), QNetworkReply::NoError);
@@ -3255,9 +3326,7 @@ void tst_QNetworkReply::ioGetFromHttpNoHeaders()
     QNetworkRequest request(QUrl("http://localhost:" + QString::number(server.serverPort())));
     QNetworkReplyPtr reply = manager.get(request);
 
-    connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
-    QTestEventLoop::instance().enterLoop(10);
-    QVERIFY(!QTestEventLoop::instance().timeout());
+    QVERIFY(waitForFinish(reply) == Success);
 
     QCOMPARE(reply->url(), request.url());
     QCOMPARE(reply->error(), QNetworkReply::NoError);
@@ -3426,9 +3495,7 @@ void tst_QNetworkReply::ioGetFromHttpWithCache()
 
     QNetworkReplyPtr reply = manager.get(request);
 
-    connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
-    QTestEventLoop::instance().enterLoop(10);
-    QVERIFY(!QTestEventLoop::instance().timeout());
+    QVERIFY(waitForFinish(reply) != Timeout);
 
     QTEST(reply->attribute(QNetworkRequest::SourceIsFromCacheAttribute).toBool(), "loadedFromCache");
     QTEST(server.totalConnections > 0, "networkUsed");
@@ -3641,7 +3708,7 @@ void tst_QNetworkReply::ioGetWithManyProxies()
     qRegisterMetaType(); // for QSignalSpy
     qRegisterMetaType();
 
-    QFile reference(SRCDIR "/rfc3252.txt");
+    QFile reference(testDataDir + "/rfc3252.txt");
     QVERIFY(reference.open(QIODevice::ReadOnly));
 
     // set the proxy factory:
@@ -3659,13 +3726,12 @@ void tst_QNetworkReply::ioGetWithManyProxies()
     QSignalSpy authspy(&manager, SIGNAL(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)));
     connect(&manager, SIGNAL(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)),
             SLOT(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)));
-    connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
 #ifndef QT_NO_OPENSSL
     connect(&manager, SIGNAL(sslErrors(QNetworkReply*,QList)),
             SLOT(sslErrors(QNetworkReply*,QList)));
 #endif
-    QTestEventLoop::instance().enterLoop(15);
-    QVERIFY(!QTestEventLoop::instance().timeout());
+
+    QVERIFY(waitForFinish(reply) != Timeout);
 
     manager.disconnect(SIGNAL(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)),
                        this, SLOT(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)));
@@ -3706,10 +3772,10 @@ void tst_QNetworkReply::ioPutToFileFromFile_data()
 {
     QTest::addColumn("fileName");
 
-    QTest::newRow("empty") << SRCDIR "/empty";
-    QTest::newRow("real-file") << SRCDIR "/rfc3252.txt";
+    QTest::newRow("empty") << (testDataDir + "/empty");
+    QTest::newRow("real-file") << (testDataDir + "/rfc3252.txt");
     QTest::newRow("resource") << ":/resource";
-    QTest::newRow("search-path") << "srcdir:/rfc3252.txt";
+    QTest::newRow("search-path") << "testdata:/rfc3252.txt";
 }
 
 void tst_QNetworkReply::ioPutToFileFromFile()
@@ -3724,9 +3790,7 @@ void tst_QNetworkReply::ioPutToFileFromFile()
     QNetworkRequest request(url);
     QNetworkReplyPtr reply = manager.put(request, &sourceFile);
 
-    connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
-    QTestEventLoop::instance().enterLoop(10);
-    QVERIFY(!QTestEventLoop::instance().timeout());
+    QVERIFY(waitForFinish(reply) == Success);
 
     QCOMPARE(reply->url(), url);
     QCOMPARE(reply->error(), QNetworkReply::NoError);
@@ -3762,10 +3826,8 @@ void tst_QNetworkReply::ioPutToFileFromSocket()
     QNetworkReplyPtr reply = manager.put(QNetworkRequest(url), socketpair.endPoints[1]);
     socketpair.endPoints[0]->close();
 
-    connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
-    QTestEventLoop::instance().enterLoop(10);
+    QVERIFY(waitForFinish(reply) == Success);
     QCOMPARE(reply->error(), QNetworkReply::NoError);
-    QVERIFY(!QTestEventLoop::instance().timeout());
 
     QCOMPARE(reply->url(), url);
     QCOMPARE(reply->error(), QNetworkReply::NoError);
@@ -3808,10 +3870,8 @@ void tst_QNetworkReply::ioPutToFileFromLocalSocket()
     QNetworkReplyPtr reply = manager.put(QNetworkRequest(url), passive);
     passive->setParent(reply);
 
-    connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
-    QTestEventLoop::instance().enterLoop(10);
+    QVERIFY(waitForFinish(reply) == Success);
     QCOMPARE(reply->error(), QNetworkReply::NoError);
-    QVERIFY(!QTestEventLoop::instance().timeout());
 
     QCOMPARE(reply->url(), url);
     QCOMPARE(reply->error(), QNetworkReply::NoError);
@@ -3849,15 +3909,16 @@ void tst_QNetworkReply::ioPutToFileFromProcess()
 
     QFETCH(QByteArray, data);
     QProcess process;
-    process.start("echo/echo all");
+    QString echoExe = echoProcessDir + "/echo";
+    process.start(echoExe, QStringList("all"));
+    QVERIFY2(process.waitForStarted(), qPrintable(
+        QString::fromLatin1("Could not start %1: %2").arg(echoExe, process.errorString())));
     process.write(data);
     process.closeWriteChannel();
 
     QNetworkReplyPtr reply = manager.put(QNetworkRequest(url), &process);
 
-    connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
-    QTestEventLoop::instance().enterLoop(10);
-    QVERIFY(!QTestEventLoop::instance().timeout());
+    QVERIFY(waitForFinish(reply) == Success);
 
     QCOMPARE(reply->url(), url);
     QCOMPARE(reply->error(), QNetworkReply::NoError);
@@ -3891,9 +3952,7 @@ void tst_QNetworkReply::ioPutToFtpFromFile()
     QNetworkRequest request(url);
     QNetworkReplyPtr reply = manager.put(request, &sourceFile);
 
-    connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
-    QTestEventLoop::instance().enterLoop(10);
-    QVERIFY(!QTestEventLoop::instance().timeout());
+    QVERIFY(waitForFinish(reply) == Success);
 
     QCOMPARE(reply->url(), url);
     QCOMPARE(reply->error(), QNetworkReply::NoError);
@@ -3911,7 +3970,7 @@ void tst_QNetworkReply::ioPutToFtpFromFile()
 
     QObject::connect(r, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
     QTestEventLoop::instance().enterLoop(3);
-    QObject::disconnect(r, SIGNAL(finished(bool)), &QTestEventLoop::instance(), SLOT(exitLoop()));
+    QObject::disconnect(r, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
 
     QByteArray uploaded = r->readAll();
     QCOMPARE(qint64(uploaded.size()), sourceFile.size());
@@ -3942,9 +4001,7 @@ void tst_QNetworkReply::ioPutToHttpFromFile()
     QNetworkRequest request(url);
     QNetworkReplyPtr reply = manager.put(request, &sourceFile);
 
-    connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
-    QTestEventLoop::instance().enterLoop(10);
-    QVERIFY(!QTestEventLoop::instance().timeout());
+    QVERIFY(waitForFinish(reply) == Success);
 
     QCOMPARE(reply->url(), url);
     QCOMPARE(reply->error(), QNetworkReply::NoError);
@@ -3958,9 +4015,8 @@ void tst_QNetworkReply::ioPutToHttpFromFile()
     // download the file again from HTTP to make sure it was uploaded
     // correctly
     reply = manager.get(request);
-    connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
-    QTestEventLoop::instance().enterLoop(10);
-    QVERIFY(!QTestEventLoop::instance().timeout());
+
+    QVERIFY(waitForFinish(reply) == Success);
 
     QCOMPARE(reply->url(), url);
     QCOMPARE(reply->error(), QNetworkReply::NoError);
@@ -3986,9 +4042,7 @@ void tst_QNetworkReply::ioPostToHttpFromFile()
 
     QNetworkReplyPtr reply = manager.post(request, &sourceFile);
 
-    connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
-    QTestEventLoop::instance().enterLoop(10);
-    QVERIFY(!QTestEventLoop::instance().timeout());
+    QVERIFY(waitForFinish(reply) == Success);
 
     QCOMPARE(reply->url(), url);
     QCOMPARE(reply->error(), QNetworkReply::NoError);
@@ -4066,7 +4120,6 @@ void tst_QNetworkReply::ioPostToHttpFromSocket()
     QNetworkReplyPtr reply = manager.post(request, socketpair.endPoints[1]);
     socketpair.endPoints[0]->close();
 
-    connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
     connect(&manager, SIGNAL(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)),
             SLOT(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)));
     connect(&manager, SIGNAL(authenticationRequired(QNetworkReply*,QAuthenticator*)),
@@ -4075,13 +4128,13 @@ void tst_QNetworkReply::ioPostToHttpFromSocket()
     QSignalSpy authenticationRequiredSpy(&manager, SIGNAL(authenticationRequired(QNetworkReply*,QAuthenticator*)));
     QSignalSpy proxyAuthenticationRequiredSpy(&manager, SIGNAL(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)));
 
-    QTestEventLoop::instance().enterLoop(12);
+    QVERIFY(waitForFinish(reply) == Success);
+
     disconnect(&manager, SIGNAL(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)),
                this, SLOT(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)));
     disconnect(&manager, SIGNAL(authenticationRequired(QNetworkReply*,QAuthenticator*)),
                this, SLOT(authenticationRequired(QNetworkReply*,QAuthenticator*)));
     QCOMPARE(reply->error(), QNetworkReply::NoError);
-    QVERIFY(!QTestEventLoop::instance().timeout());
 
     QCOMPARE(reply->url(), url);
     QCOMPARE(reply->error(), QNetworkReply::NoError);
@@ -4159,7 +4212,7 @@ void tst_QNetworkReply::ioPostToHttpFromSocketSynchronous()
 // worked.
 void tst_QNetworkReply::ioPostToHttpFromMiddleOfFileToEnd()
 {
-    QFile sourceFile(SRCDIR "/rfc3252.txt");
+    QFile sourceFile(testDataDir + "/rfc3252.txt");
     QVERIFY(sourceFile.open(QIODevice::ReadOnly));
     // seeking to the middle
     sourceFile.seek(sourceFile.size() / 2);
@@ -4169,14 +4222,13 @@ void tst_QNetworkReply::ioPostToHttpFromMiddleOfFileToEnd()
     request.setRawHeader("Content-Type", "application/octet-stream");
     QNetworkReplyPtr reply = manager.post(request, &sourceFile);
 
-    connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
     connect(&manager, SIGNAL(authenticationRequired(QNetworkReply*,QAuthenticator*)),
             SLOT(authenticationRequired(QNetworkReply*,QAuthenticator*)));
 
-    QTestEventLoop::instance().enterLoop(2);
+    QVERIFY(waitForFinish(reply) == Success);
+
     disconnect(&manager, SIGNAL(authenticationRequired(QNetworkReply*,QAuthenticator*)),
                this, SLOT(authenticationRequired(QNetworkReply*,QAuthenticator*)));
-    QVERIFY(!QTestEventLoop::instance().timeout());
 
     // compare half data
     sourceFile.seek(sourceFile.size() / 2);
@@ -4186,7 +4238,7 @@ void tst_QNetworkReply::ioPostToHttpFromMiddleOfFileToEnd()
 
 void tst_QNetworkReply::ioPostToHttpFromMiddleOfFileFiveBytes()
 {
-    QFile sourceFile(SRCDIR "/rfc3252.txt");
+    QFile sourceFile(testDataDir + "/rfc3252.txt");
     QVERIFY(sourceFile.open(QIODevice::ReadOnly));
     // seeking to the middle
     sourceFile.seek(sourceFile.size() / 2);
@@ -4199,14 +4251,13 @@ void tst_QNetworkReply::ioPostToHttpFromMiddleOfFileFiveBytes()
     QVERIFY(request.header(QNetworkRequest::ContentLengthHeader).isValid());
     QNetworkReplyPtr reply = manager.post(request, &sourceFile);
 
-    connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
     connect(&manager, SIGNAL(authenticationRequired(QNetworkReply*,QAuthenticator*)),
             SLOT(authenticationRequired(QNetworkReply*,QAuthenticator*)));
 
-    QTestEventLoop::instance().enterLoop(2);
+    QVERIFY(waitForFinish(reply) == Success);
+
     disconnect(&manager, SIGNAL(authenticationRequired(QNetworkReply*,QAuthenticator*)),
                this, SLOT(authenticationRequired(QNetworkReply*,QAuthenticator*)));
-    QVERIFY(!QTestEventLoop::instance().timeout());
 
     // compare half data
     sourceFile.seek(sourceFile.size() / 2);
@@ -4228,14 +4279,13 @@ void tst_QNetworkReply::ioPostToHttpFromMiddleOfQBufferFiveBytes()
     request.setRawHeader("Content-Type", "application/octet-stream");
     QNetworkReplyPtr reply = manager.post(request, &uploadBuffer);
 
-    connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
     connect(&manager, SIGNAL(authenticationRequired(QNetworkReply*,QAuthenticator*)),
             SLOT(authenticationRequired(QNetworkReply*,QAuthenticator*)));
 
-    QTestEventLoop::instance().enterLoop(2);
+    QVERIFY(waitForFinish(reply) == Success);
+
     disconnect(&manager, SIGNAL(authenticationRequired(QNetworkReply*,QAuthenticator*)),
                this, SLOT(authenticationRequired(QNetworkReply*,QAuthenticator*)));
-    QVERIFY(!QTestEventLoop::instance().timeout());
 
     // compare half data
     uploadBuffer.seek(5);
@@ -4262,11 +4312,11 @@ void tst_QNetworkReply::ioPostToHttpNoBufferFlag()
     QNetworkReplyPtr reply = manager.post(request, socketpair.endPoints[1]);
     socketpair.endPoints[0]->close();
 
-    connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
     connect(&manager, SIGNAL(authenticationRequired(QNetworkReply*,QAuthenticator*)),
             SLOT(authenticationRequired(QNetworkReply*,QAuthenticator*)));
 
-    QTestEventLoop::instance().enterLoop(2);
+    QVERIFY(waitForFinish(reply) == Failure);
+
     disconnect(&manager, SIGNAL(authenticationRequired(QNetworkReply*,QAuthenticator*)),
                this, SLOT(authenticationRequired(QNetworkReply*,QAuthenticator*)));
 
@@ -4284,12 +4334,16 @@ public:
         serverSocket->setParent(this);
 
         if (serverSocket->setSocketDescriptor(socketDescriptor)) {
+            QString testDataDir = QFileInfo(QFINDTESTDATA("rfc3252.txt")).absolutePath();
+            if (testDataDir.isEmpty())
+                testDataDir = QCoreApplication::applicationDirPath();
+
             connect(serverSocket, SIGNAL(encrypted()), this, SLOT(encryptedSlot()));
             connect(serverSocket, SIGNAL(readyRead()), this, SLOT(readyReadSlot()));
             serverSocket->setProtocol(QSsl::AnyProtocol);
             connect(serverSocket, SIGNAL(sslErrors(const QList&)), serverSocket, SLOT(ignoreSslErrors()));
-            serverSocket->setLocalCertificate(SRCDIR "/certs/server.pem");
-            serverSocket->setPrivateKey(SRCDIR  "/certs/server.key");
+            serverSocket->setLocalCertificate(testDataDir + "/certs/server.pem");
+            serverSocket->setPrivateKey(testDataDir + "/certs/server.key");
             serverSocket->startServerEncryption();
         } else {
             delete serverSocket;
@@ -4314,7 +4368,7 @@ public:
 // very similar to ioPostToHttpUploadProgress but for SSL
 void tst_QNetworkReply::ioPostToHttpsUploadProgress()
 {
-    //QFile sourceFile(SRCDIR "/bigfile");
+    //QFile sourceFile(testDataDir + "/bigfile");
     //QVERIFY(sourceFile.open(QIODevice::ReadOnly));
     qint64 wantedSize = 2*1024*1024; // 2 MB
     QByteArray sourceFile;
@@ -4366,13 +4420,11 @@ void tst_QNetworkReply::ioPostToHttpsUploadProgress()
     QCOMPARE(args3.at(0).toLongLong(), qint64(sourceFile.size()));
 
     // after sending this, the QNAM should emit finished()
-    connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
     incomingSocket->write("HTTP/1.0 200 OK\r\n");
     incomingSocket->write("Content-Length: 0\r\n");
     incomingSocket->write("\r\n");
-    QTestEventLoop::instance().enterLoop(10);
-    // not timeouted -> finished() was emitted
-    QVERIFY(!QTestEventLoop::instance().timeout());
+
+    QVERIFY(waitForFinish(reply) == Success);
 
     incomingSocket->close();
     server.close();
@@ -4429,10 +4481,11 @@ void tst_QNetworkReply::ioGetFromBuiltinHttp()
     const int rate = 200; // in kB per sec
     RateControlledReader reader(server, reply, rate, bufferSize);
 
-    connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
     QTime loopTime;
     loopTime.start();
-    QTestEventLoop::instance().enterLoop(30);
+
+    QVERIFY(waitForFinish(reply) == Success);
+
     const int elapsedTime = loopTime.elapsed();
     server.wait();
     reader.wrapUp();
@@ -4441,8 +4494,6 @@ void tst_QNetworkReply::ioGetFromBuiltinHttp()
     qDebug() << "receive rate:" << reader.totalBytesRead * 1000 / elapsedTime
              << "(it received" << reader.totalBytesRead << "bytes in" << elapsedTime << "ms)";
 
-    QVERIFY(!QTestEventLoop::instance().timeout());
-
     QCOMPARE(reply->url(), request.url());
     QCOMPARE(reply->error(), QNetworkReply::NoError);
     QCOMPARE(reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt(), 200);
@@ -4472,7 +4523,7 @@ void tst_QNetworkReply::ioGetFromBuiltinHttp()
 
 void tst_QNetworkReply::ioPostToHttpUploadProgress()
 {
-    QFile sourceFile(SRCDIR "/bigfile");
+    QFile sourceFile(testDataDir + "/bigfile");
     QVERIFY(sourceFile.open(QIODevice::ReadOnly));
 
     // emulate a minimal http server
@@ -4577,16 +4628,15 @@ void tst_QNetworkReply::ioPostToHttpEmptyUploadProgress()
 
 void tst_QNetworkReply::lastModifiedHeaderForFile()
 {
-    QFileInfo fileInfo(SRCDIR "/bigfile");
+    QFileInfo fileInfo(testDataDir + "/bigfile");
     QVERIFY(fileInfo.exists());
 
     QUrl url = QUrl::fromLocalFile(fileInfo.filePath());
 
     QNetworkRequest request(url);
     QNetworkReplyPtr reply = manager.head(request);
-    connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
-    QTestEventLoop::instance().enterLoop(10);
-    QVERIFY(!QTestEventLoop::instance().timeout());
+
+    QVERIFY(waitForFinish(reply) == Success);
 
     QDateTime header = reply->header(QNetworkRequest::LastModifiedHeader).toDateTime();
     QCOMPARE(header, fileInfo.lastModified());
@@ -4599,9 +4649,8 @@ void tst_QNetworkReply::lastModifiedHeaderForHttp()
 
     QNetworkRequest request(url);
     QNetworkReplyPtr reply = manager.head(request);
-    connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
-    QTestEventLoop::instance().enterLoop(10);
-    QVERIFY(!QTestEventLoop::instance().timeout());
+
+    QVERIFY(waitForFinish(reply) == Success);
 
     QDateTime header = reply->header(QNetworkRequest::LastModifiedHeader).toDateTime();
     QDateTime realDate = QDateTime::fromString("2007-05-22T12:04:57", Qt::ISODate);
@@ -4615,9 +4664,8 @@ void tst_QNetworkReply::httpCanReadLine()
     QNetworkRequest request(QUrl("http://" + QtNetworkSettings::serverName() + "/qtest/rfc3252.txt"));
     QNetworkReplyPtr reply = manager.get(request);
 
-    connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
-    QTestEventLoop::instance().enterLoop(10);
-    QVERIFY(!QTestEventLoop::instance().timeout());
+    QVERIFY(waitForFinish(reply) == Success);
+
     QCOMPARE(reply->error(), QNetworkReply::NoError);
 
     QVERIFY(reply->canReadLine());
@@ -4645,13 +4693,16 @@ void tst_QNetworkReply::rateControl()
     // faster than the data is being consumed.
     QFETCH(int, rate);
 
+#if !defined(QT_BUILD_INTERNAL)
+    QSKIP("backend for testing not available!");
+#endif
+
     // ask for 20 seconds worth of data
     FastSender sender(20 * rate * 1024);
 
     QNetworkRequest request("debugpipe://localhost:" + QString::number(sender.serverPort()));
     QNetworkReplyPtr reply = manager.get(request);
     reply->setReadBufferSize(32768);
-    connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
     qRegisterMetaType("QNetworkReply::NetworkError");
     QSignalSpy errorSpy(reply, SIGNAL(error(QNetworkReply::NetworkError)));
 
@@ -4660,7 +4711,9 @@ void tst_QNetworkReply::rateControl()
     // this test is designed to run for 25 seconds at most
     QTime loopTime;
     loopTime.start();
-    QTestEventLoop::instance().enterLoop(40);
+
+    QVERIFY(waitForFinish(reply) == Success);
+
     int elapsedTime = loopTime.elapsed();
 
     if (!errorSpy.isEmpty()) {
@@ -4672,7 +4725,6 @@ void tst_QNetworkReply::rateControl()
              << "(it received" << reader.totalBytesRead << "bytes in" << elapsedTime << "ms)";
 
     sender.wait();
-    QVERIFY(!QTestEventLoop::instance().timeout());
 
     QCOMPARE(reply->url(), request.url());
     QCOMPARE(reply->error(), QNetworkReply::NoError);
@@ -4695,6 +4747,9 @@ void tst_QNetworkReply::downloadProgress_data()
 
 void tst_QNetworkReply::downloadProgress()
 {
+#if !defined(QT_BUILD_INTERNAL)
+    QSKIP("backend for testing not available!");
+#endif
     QTcpServer server;
     QVERIFY(server.listen());
 
@@ -4758,6 +4813,9 @@ void tst_QNetworkReply::uploadProgress_data()
 void tst_QNetworkReply::uploadProgress()
 {
     QFETCH(QByteArray, data);
+#if !defined(QT_BUILD_INTERNAL)
+    QSKIP("backend for testing not available!");
+#endif
     QTcpServer server;
     QVERIFY(server.listen());
 
@@ -4776,9 +4834,7 @@ void tst_QNetworkReply::uploadProgress()
     QTcpSocket *receiver = server.nextPendingConnection();
     if (finished.count() == 0) {
         // it's not finished yet, so wait for it to be
-        connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
-        QTestEventLoop::instance().enterLoop(2);
-        QVERIFY(!QTestEventLoop::instance().timeout());
+        QVERIFY(waitForFinish(reply) == Success);
     }
     delete receiver;
 
@@ -4814,9 +4870,7 @@ void tst_QNetworkReply::chaining()
     request.setUrl(url);
     QNetworkReplyPtr putReply = manager.put(request, getReply);
 
-    connect(putReply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
-    QTestEventLoop::instance().enterLoop(10);
-    QVERIFY(!QTestEventLoop::instance().timeout());
+    QVERIFY(waitForFinish(putReply) == Success);
 
     QCOMPARE(getReply->url(), QUrl::fromLocalFile(sourceFile.fileName()));
     QCOMPARE(getReply->error(), QNetworkReply::NoError);
@@ -5097,11 +5151,7 @@ void tst_QNetworkReply::httpProxyCommands()
     //manager.setProxy(QNetworkProxy());
 
     // wait for the finished signal
-    connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
-
-    QTestEventLoop::instance().enterLoop(15);
-
-    QVERIFY(!QTestEventLoop::instance().timeout());
+    QVERIFY(waitForFinish(reply) != Timeout);
 
     //qDebug() << reply->error() << reply->errorString();
     //qDebug() << proxyServer.receivedData;
@@ -5234,9 +5284,8 @@ void tst_QNetworkReply::proxyChange()
 
     manager.setProxy(dummyProxy);
     QNetworkReplyPtr reply3 = manager.get(req);
-    connect(reply3, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
-    QTestEventLoop::instance().enterLoop(5);
-    QVERIFY(!QTestEventLoop::instance().timeout());
+
+    QVERIFY(waitForFinish(reply3) == Failure);
 
     QVERIFY(int(reply3->error()) > 0);
 }
@@ -5272,10 +5321,7 @@ void tst_QNetworkReply::authorizationError()
     QSignalSpy errorSpy(reply, SIGNAL(error(QNetworkReply::NetworkError)));
     QSignalSpy finishedSpy(reply, SIGNAL(finished()));
     // now run the request:
-    connect(reply, SIGNAL(finished()),
-            &QTestEventLoop::instance(), SLOT(exitLoop()));
-    QTestEventLoop::instance().enterLoop(10);
-    QVERIFY(!QTestEventLoop::instance().timeout());
+    QVERIFY(waitForFinish(reply) == Failure);
 
     QFETCH(int, errorSignalCount);
     QCOMPARE(errorSpy.count(), errorSignalCount);
@@ -5501,8 +5547,7 @@ void tst_QNetworkReply::ignoreSslErrorsList_data()
     QTest::addColumn("expectedNetworkError");
 
     QList expectedSslErrors;
-    // apparently, because of some weird behaviour of SRCDIR, the file name below needs to start with a slash
-    QList certs = QSslCertificate::fromPath(QLatin1String(SRCDIR "/certs/qt-test-server-cacert.pem"));
+    QList certs = QSslCertificate::fromPath(testDataDir + "/certs/qt-test-server-cacert.pem");
     QSslError rightError(QSslError::SelfSignedCertificate, certs.at(0));
     QSslError wrongError(QSslError::SelfSignedCertificate);
 
@@ -5526,9 +5571,7 @@ void tst_QNetworkReply::ignoreSslErrorsList()
     QFETCH(QList, expectedSslErrors);
     reply->ignoreSslErrors(expectedSslErrors);
 
-    connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
-    QTestEventLoop::instance().enterLoop(10);
-    QVERIFY(!QTestEventLoop::instance().timeout());
+    QVERIFY(waitForFinish(reply) != Timeout);
 
     QFETCH(QNetworkReply::NetworkError, expectedNetworkError);
     QCOMPARE(reply->error(), expectedNetworkError);
@@ -5559,9 +5602,7 @@ void tst_QNetworkReply::ignoreSslErrorsListWithSlot()
             this, SLOT(ignoreSslErrorListSlot(QNetworkReply *, const QList &)));
 
 
-    connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
-    QTestEventLoop::instance().enterLoop(10);
-    QVERIFY(!QTestEventLoop::instance().timeout());
+    QVERIFY(waitForFinish(reply) != Timeout);
 
     QFETCH(QNetworkReply::NetworkError, expectedNetworkError);
     QCOMPARE(reply->error(), expectedNetworkError);
@@ -5575,7 +5616,7 @@ void tst_QNetworkReply::sslConfiguration_data()
     QTest::newRow("empty") << QSslConfiguration() << false;
     QSslConfiguration conf = QSslConfiguration::defaultConfiguration();
     QTest::newRow("default") << conf << false; // does not contain test server cert
-    QList testServerCert = QSslCertificate::fromPath(SRCDIR "/certs/qt-test-server-cacert.pem");
+    QList testServerCert = QSslCertificate::fromPath(testDataDir + "/certs/qt-test-server-cacert.pem");
     conf.setCaCertificates(testServerCert);
     QTest::newRow("set-root-cert") << conf << true;
     conf.setProtocol(QSsl::SecureProtocols);
@@ -5589,9 +5630,7 @@ void tst_QNetworkReply::sslConfiguration()
     request.setSslConfiguration(configuration);
     QNetworkReplyPtr reply = manager.get(request);
 
-    connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
-    QTestEventLoop::instance().enterLoop(10);
-    QVERIFY(!QTestEventLoop::instance().timeout());
+    QVERIFY(waitForFinish(reply) != Timeout);
 
     QFETCH(bool, works);
     QNetworkReply::NetworkError expectedError = works ? QNetworkReply::NoError : QNetworkReply::SslHandshakeFailedError;
@@ -5675,12 +5714,11 @@ void tst_QNetworkReply::getFromHttpIntoBuffer()
     QNetworkAccessManager manager;
     QNetworkReply *reply = manager.get(request);
     connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
-
     QTestEventLoop::instance().enterLoop(10);
     QVERIFY(!QTestEventLoop::instance().timeout());
     QVERIFY(reply->isFinished());
 
-    QFile reference(SRCDIR "/rfc3252.txt");
+    QFile reference(testDataDir + "/rfc3252.txt");
     QVERIFY(reference.open(QIODevice::ReadOnly));
 
     QCOMPARE(reference.bytesAvailable(), reply->bytesAvailable());
@@ -5850,7 +5888,7 @@ void tst_QNetworkReply::getFromHttpIntoBuffer2()
     QFETCH(bool, useDownloadBuffer);
 
     // On my Linux Desktop the results are already visible with 128 kB, however we use this to have good results.
-#if defined(Q_WS_WINCE_WM)
+#if defined(Q_OS_WINCE_WM)
     // Show some mercy to non-desktop platform/s
     enum {UploadSize = 4*1024*1024}; // 4 MB
 #else
@@ -5886,9 +5924,7 @@ void tst_QNetworkReply::getFromHttpIntoBufferCanReadLine()
     request.setAttribute(QNetworkRequest::MaximumDownloadBufferSizeAttribute, 1024*1024*128); // 128 MB is max allowed
     QNetworkReplyPtr reply = manager.get(request);
 
-    connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
-    QTestEventLoop::instance().enterLoop(10);
-    QVERIFY(!QTestEventLoop::instance().timeout());
+    QVERIFY(waitForFinish(reply) == Success);
 
     QCOMPARE(reply->error(), QNetworkReply::NoError);
     QVERIFY(reply->canReadLine());
@@ -5912,9 +5948,7 @@ void tst_QNetworkReply::ioGetFromHttpWithoutContentLength()
     QNetworkRequest request(QUrl("http://localhost:" + QString::number(server.serverPort())));
     QNetworkReplyPtr reply = manager.get(request);
 
-    connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
-    QTestEventLoop::instance().enterLoop(10);
-    QVERIFY(!QTestEventLoop::instance().timeout());
+    QVERIFY(waitForFinish(reply) == Success);
 
     QCOMPARE(reply->url(), request.url());
     QVERIFY(reply->isFinished());
@@ -5962,9 +5996,7 @@ void tst_QNetworkReply::qtbug12908compressedHttpReply()
     QNetworkRequest request(QUrl("http://localhost:" + QString::number(server.serverPort())));
     QNetworkReplyPtr reply = manager.get(request);
 
-    connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
-    QTestEventLoop::instance().enterLoop(10);
-    QVERIFY(!QTestEventLoop::instance().timeout());
+    QVERIFY(waitForFinish(reply) == Success);
 
     QCOMPARE(reply->error(), QNetworkReply::NoError);
     QCOMPARE(reply->size(), qint64(16384));
@@ -5987,9 +6019,7 @@ void tst_QNetworkReply::compressedHttpReplyBrokenGzip()
     QNetworkRequest request(QUrl("http://localhost:" + QString::number(server.serverPort())));
     QNetworkReplyPtr reply = manager.get(request);
 
-    connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
-    QTestEventLoop::instance().enterLoop(10);
-    QVERIFY(!QTestEventLoop::instance().timeout());
+    QVERIFY(waitForFinish(reply) == Failure);
 
     QCOMPARE(reply->error(), QNetworkReply::ProtocolFailure);
 }
@@ -6002,9 +6032,7 @@ void tst_QNetworkReply::getFromUnreachableIp()
     QNetworkRequest request(QUrl("http://255.255.255.255/42/23/narf/narf/narf"));
     QNetworkReplyPtr reply = manager.get(request);
 
-    connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
-    QTestEventLoop::instance().enterLoop(10);
-    QVERIFY(!QTestEventLoop::instance().timeout());
+    QVERIFY(waitForFinish(reply) == Failure);
 
     QVERIFY(reply->error() != QNetworkReply::NoError);
 }
@@ -6337,9 +6365,8 @@ void tst_QNetworkReply::qtbug15311doubleContentLength()
     QNetworkRequest request(QUrl("http://localhost:" + QString::number(server.serverPort())));
     QNetworkReplyPtr reply = manager.get(request);
 
-    connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
-    QTestEventLoop::instance().enterLoop(10);
-    QVERIFY(!QTestEventLoop::instance().timeout());
+    QVERIFY(waitForFinish(reply) == Success);
+
     QVERIFY(reply->isFinished());
     QCOMPARE(reply->error(), QNetworkReply::NoError);
     QCOMPARE(reply->size(), qint64(3));
@@ -6357,9 +6384,8 @@ void tst_QNetworkReply::qtbug18232gzipContentLengthZero()
     QNetworkRequest request(QUrl("http://localhost:" + QString::number(server.serverPort())));
     QNetworkReplyPtr reply = manager.get(request);
 
-    connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
-    QTestEventLoop::instance().enterLoop(10);
-    QVERIFY(!QTestEventLoop::instance().timeout());
+    QVERIFY(waitForFinish(reply) == Success);
+
     QVERIFY(reply->isFinished());
     QCOMPARE(reply->error(), QNetworkReply::NoError);
     QCOMPARE(reply->size(), qint64(0));
@@ -6379,9 +6405,8 @@ void tst_QNetworkReply::qtbug22660gzipNoContentLengthEmptyContent()
     QNetworkRequest request(QUrl("http://localhost:" + QString::number(server.serverPort())));
     QNetworkReplyPtr reply = manager.get(request);
 
-    connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
-    QTestEventLoop::instance().enterLoop(10);
-    QVERIFY(!QTestEventLoop::instance().timeout());
+    QVERIFY(waitForFinish(reply) == Success);
+
     QVERIFY(reply->isFinished());
     QCOMPARE(reply->error(), QNetworkReply::NoError);
     QCOMPARE(reply->size(), qint64(0));
@@ -6400,13 +6425,13 @@ void tst_QNetworkReply::synchronousRequest_data()
 
     QTest::newRow("http")
         << QUrl("http://" + QtNetworkSettings::serverName() + "/qtest/rfc3252.txt")
-        << QString("file:" SRCDIR "/rfc3252.txt")
+        << QString("file:" + testDataDir + "/rfc3252.txt")
         << true
         << QString("text/plain");
 
     QTest::newRow("http-gzip")
         << QUrl("http://" + QtNetworkSettings::serverName() + "/qtest/deflate/rfc3252.txt")
-        << QString("file:" SRCDIR "/rfc3252.txt")
+        << QString("file:" + testDataDir + "/rfc3252.txt")
         << false // don't check content length, because it's gzip encoded
         //  ### we would need to enflate (un-deflate) the file content and compare the sizes
         << QString("text/plain");
@@ -6414,7 +6439,7 @@ void tst_QNetworkReply::synchronousRequest_data()
 #ifndef QT_NO_OPENSSL
     QTest::newRow("https")
         << QUrl("https://" + QtNetworkSettings::serverName() + "/qtest/rfc3252.txt")
-        << QString("file:" SRCDIR "/rfc3252.txt")
+        << QString("file:" + testDataDir + "/rfc3252.txt")
         << true
         << QString("text/plain");
 #endif
@@ -6426,8 +6451,8 @@ void tst_QNetworkReply::synchronousRequest_data()
         << QString("text/plain");
 
     QTest::newRow("simple-file")
-        << QUrl::fromLocalFile(SRCDIR "/rfc3252.txt")
-        << QString("file:" SRCDIR "/rfc3252.txt")
+        << QUrl::fromLocalFile(testDataDir + "/rfc3252.txt")
+        << QString("file:" + testDataDir + "/rfc3252.txt")
         << true
         << QString();
 }
@@ -6449,7 +6474,7 @@ void tst_QNetworkReply::synchronousRequest()
     // QNetworkRequest, see http://bugreports.qt.nokia.com/browse/QTBUG-14774
     if (url.scheme() == "https") {
         QSslConfiguration sslConf;
-        QList certs = QSslCertificate::fromPath(SRCDIR "/certs/qt-test-server-cacert.pem");
+        QList certs = QSslCertificate::fromPath(testDataDir + "/certs/qt-test-server-cacert.pem");
         sslConf.setCaCertificates(certs);
         request.setSslConfiguration(sslConf);
     }
@@ -6559,8 +6584,9 @@ void tst_QNetworkReply::httpAbort()
     // Abort after the finished()
     QNetworkRequest request3("http://" + QtNetworkSettings::serverName() + "/qtest/rfc3252.txt");
     QNetworkReplyPtr reply3 = manager.get(request3);
-    connect(reply3, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
-    QTestEventLoop::instance().enterLoop(10);
+
+    QVERIFY(waitForFinish(reply3) == Success);
+
     QVERIFY(reply3->isFinished());
     reply3->abort();
     QCOMPARE(reply3->error(), QNetworkReply::NoError);
@@ -6590,9 +6616,7 @@ void tst_QNetworkReply::dontInsertPartialContentIntoTheCache()
 
     QNetworkReplyPtr reply = manager.get(request);
 
-    connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
-    QTestEventLoop::instance().enterLoop(10);
-    QVERIFY(!QTestEventLoop::instance().timeout());
+    QVERIFY(waitForFinish(reply) == Success);
 
     QVERIFY(server.totalConnections > 0);
     QCOMPARE(reply->readAll().constData(), "load");
@@ -6609,9 +6633,8 @@ void tst_QNetworkReply::httpUserAgent()
     request.setHeader(QNetworkRequest::UserAgentHeader, "abcDEFghi");
     QNetworkReplyPtr reply = manager.get(request);
 
-    connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
-    QTestEventLoop::instance().enterLoop(10);
-    QVERIFY(!QTestEventLoop::instance().timeout());
+    QVERIFY(waitForFinish(reply) == Success);
+
     QVERIFY(reply->isFinished());
     QCOMPARE(reply->error(), QNetworkReply::NoError);
     QVERIFY(server.receivedData.contains("\r\nUser-Agent: abcDEFghi\r\n"));
@@ -6728,6 +6751,27 @@ void tst_QNetworkReply::pipeliningHelperSlot() {
     }
 }
 
+void tst_QNetworkReply::closeDuringDownload_data()
+{
+    QTest::addColumn("url");
+    QTest::newRow("http") << QUrl("http://" + QtNetworkSettings::serverName() + "/bigfile");
+    QTest::newRow("ftp") << QUrl("ftp://" + QtNetworkSettings::serverName() + "/qtest/bigfile");
+}
+
+void tst_QNetworkReply::closeDuringDownload()
+{
+    QFETCH(QUrl, url);
+    QNetworkRequest request(url);
+    QNetworkReply* reply = manager.get(request);
+    connect(reply, SIGNAL(readyRead()), &QTestEventLoop::instance(), SLOT(exitLoop()));
+    QTestEventLoop::instance().enterLoop(10);
+    QVERIFY(!QTestEventLoop::instance().timeout());
+    connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
+    reply->close();
+    reply->deleteLater();
+    QTest::qWait(1000); //cancelling ftp takes some time, this avoids a warning caused by test's cleanup() destroying the connection cache before the abort is finished
+}
+
 // NOTE: This test must be last testcase in tst_qnetworkreply!
 void tst_QNetworkReply::parentingRepliesToTheApp()
 {
diff --git a/tests/auto/network/bearer/qnetworksession/qnetworksession.pro b/tests/auto/network/bearer/qnetworksession/qnetworksession.pro
index a85925bc171..f1cb47d14ee 100644
--- a/tests/auto/network/bearer/qnetworksession/qnetworksession.pro
+++ b/tests/auto/network/bearer/qnetworksession/qnetworksession.pro
@@ -1,2 +1,4 @@
 TEMPLATE = subdirs
-SUBDIRS = lackey test
+SUBDIRS = lackey
+test.depends = $$SUBDIRS
+SUBDIRS += test
diff --git a/tests/auto/network/bearer/qnetworksession/test/test.pro b/tests/auto/network/bearer/qnetworksession/test/test.pro
index 5567e35b026..2f1a9ba6eaa 100644
--- a/tests/auto/network/bearer/qnetworksession/test/test.pro
+++ b/tests/auto/network/bearer/qnetworksession/test/test.pro
@@ -14,3 +14,6 @@ CONFIG(debug_and_release) {
 } else {
   DESTDIR = ..
 }
+
+load(testcase) # for target.path and installTestHelperApp()
+installTestHelperApp("../lackey/lackey",lackey,lackey)
diff --git a/tests/auto/network/bearer/qnetworksession/test/tst_qnetworksession.cpp b/tests/auto/network/bearer/qnetworksession/test/tst_qnetworksession.cpp
index a51b4e56322..27e1e7f013e 100644
--- a/tests/auto/network/bearer/qnetworksession/test/tst_qnetworksession.cpp
+++ b/tests/auto/network/bearer/qnetworksession/test/tst_qnetworksession.cpp
@@ -96,6 +96,7 @@ private slots:
 private:
     QNetworkConfigurationManager manager;
     int inProcessSessionManagementCount;
+    QString lackeyDir;
 #endif
 };
 
@@ -117,6 +118,10 @@ void tst_QNetworkSession::initTestCase()
     QSignalSpy spy(&manager, SIGNAL(updateCompleted()));
     manager.updateConfigurations();
     QTRY_VERIFY_WITH_TIMEOUT(spy.count() == 1, TestTimeOut);
+
+    lackeyDir = QFINDTESTDATA("lackey");
+    QVERIFY2(!lackeyDir.isEmpty(), qPrintable(
+        QString::fromLatin1("Couldn't find lackey dir starting from %1.").arg(QDir::currentPath())));
 }
 
 void tst_QNetworkSession::cleanupTestCase()
@@ -916,10 +921,10 @@ void tst_QNetworkSession::outOfProcessSession()
     oopServer.listen("tst_qnetworksession");
 
     QProcess lackey;
-    lackey.start("lackey/lackey");
-    qDebug() << lackey.error() << lackey.errorString();
-    QVERIFY(lackey.waitForStarted());
-
+    QString lackeyExe = lackeyDir + "/lackey";
+    lackey.start(lackeyExe);
+    QVERIFY2(lackey.waitForStarted(), qPrintable(
+        QString::fromLatin1("Could not start %1: %2").arg(lackeyExe, lackey.errorString())));
 
     QVERIFY(oopServer.waitForNewConnection(-1));
     QLocalSocket *oopSocket = oopServer.nextPendingConnection();
diff --git a/tests/auto/network/socket/qhttpsocketengine/tst_qhttpsocketengine.cpp b/tests/auto/network/socket/qhttpsocketengine/tst_qhttpsocketengine.cpp
index 9b8391d6be5..43b1f225c41 100644
--- a/tests/auto/network/socket/qhttpsocketengine/tst_qhttpsocketengine.cpp
+++ b/tests/auto/network/socket/qhttpsocketengine/tst_qhttpsocketengine.cpp
@@ -294,7 +294,7 @@ void tst_QHttpSocketEngine::errorTest()
 
     connect(&socket, SIGNAL(error(QAbstractSocket::SocketError)),
             &QTestEventLoop::instance(), SLOT(exitLoop()));
-    QTestEventLoop::instance().enterLoop(5);
+    QTestEventLoop::instance().enterLoop(30);
     QVERIFY(!QTestEventLoop::instance().timeout());
 
     QCOMPARE(int(socket.error()), expectedError);
@@ -371,7 +371,7 @@ void tst_QHttpSocketEngine::simpleErrorsAndStates()
         QVERIFY(socketDevice.state() == QAbstractSocket::UnconnectedState);
         QVERIFY(!socketDevice.connectToHost(QHostAddress(QtNetworkSettings::serverName()), 8088));
         QVERIFY(socketDevice.state() == QAbstractSocket::ConnectingState);
-        if (socketDevice.waitForWrite(15000)) {
+        if (socketDevice.waitForWrite(30000)) {
             QVERIFY(socketDevice.state() == QAbstractSocket::ConnectedState ||
                     socketDevice.state() == QAbstractSocket::UnconnectedState);
         } else {
@@ -425,7 +425,7 @@ void tst_QHttpSocketEngine::tcpLoopbackPerformance()
     QTime timer;
     timer.start();
     qlonglong readBytes = 0;
-    while (timer.elapsed() < 5000) {
+    while (timer.elapsed() < 30000) {
         qlonglong written = serverSocket.write(message1.data(), message1.size());
         while (written > 0) {
             client.waitForRead();
@@ -458,7 +458,7 @@ void tst_QHttpSocketEngine::tcpSocketBlockingTest()
     QCOMPARE(socket.state(), QTcpSocket::ConnectedState);
 
     // Read greeting
-    QVERIFY(socket.waitForReadyRead(5000));
+    QVERIFY(socket.waitForReadyRead(30000));
     QString s = socket.readLine();
     QVERIFY2(QtNetworkSettings::compareReplyIMAP(s.toLatin1()), qPrintable(s));
 
@@ -466,7 +466,7 @@ void tst_QHttpSocketEngine::tcpSocketBlockingTest()
     QCOMPARE((int) socket.write("1 NOOP\r\n", 8), 8);
 
     if (!socket.canReadLine())
-        QVERIFY(socket.waitForReadyRead(5000));
+        QVERIFY(socket.waitForReadyRead(30000));
 
     // Read response
     s = socket.readLine();
@@ -476,14 +476,14 @@ void tst_QHttpSocketEngine::tcpSocketBlockingTest()
     QCOMPARE((int) socket.write("2 LOGOUT\r\n", 10), 10);
 
     if (!socket.canReadLine())
-        QVERIFY(socket.waitForReadyRead(5000));
+        QVERIFY(socket.waitForReadyRead(30000));
 
     // Read two lines of respose
     s = socket.readLine();
     QCOMPARE(s.toLatin1().constData(), "* BYE LOGOUT received\r\n");
 
     if (!socket.canReadLine())
-        QVERIFY(socket.waitForReadyRead(5000));
+        QVERIFY(socket.waitForReadyRead(30000));
 
     s = socket.readLine();
     QCOMPARE(s.toLatin1().constData(), "2 OK Completed\r\n");
diff --git a/tests/auto/network/socket/qlocalsocket/tst_qlocalsocket.cpp b/tests/auto/network/socket/qlocalsocket/tst_qlocalsocket.cpp
index 221ef602a18..72fa9f74a4b 100644
--- a/tests/auto/network/socket/qlocalsocket/tst_qlocalsocket.cpp
+++ b/tests/auto/network/socket/qlocalsocket/tst_qlocalsocket.cpp
@@ -46,17 +46,21 @@
 #include 
 #include 
 
+#ifdef Q_OS_UNIX
+#include 
+#include 
+#include 
+#endif
+
 Q_DECLARE_METATYPE(QLocalSocket::LocalSocketError)
 Q_DECLARE_METATYPE(QLocalSocket::LocalSocketState)
+Q_DECLARE_METATYPE(QLocalServer::SocketOption)
+Q_DECLARE_METATYPE(QFile::Permissions)
 
 class tst_QLocalSocket : public QObject
 {
     Q_OBJECT
 
-public:
-    tst_QLocalSocket();
-    virtual ~tst_QLocalSocket();
-
 public Q_SLOTS:
     void init();
     void cleanup();
@@ -108,26 +112,21 @@ private slots:
     void bytesWrittenSignal();
     void syncDisconnectNotify();
     void asyncDisconnectNotify();
+
+    void verifySocketOptions();
+    void verifySocketOptions_data();
+
+    void verifyListenWithDescriptor();
+    void verifyListenWithDescriptor_data();
+
 };
 
-tst_QLocalSocket::tst_QLocalSocket()
-{
-    if (!QFile::exists("lackey/lackey"
-#ifdef Q_OS_WIN
-    ".exe"
-#endif
-                ))
-        qWarning() << "lackey executable doesn't exists!";
-}
-
-tst_QLocalSocket::~tst_QLocalSocket()
-{
-}
-
 void tst_QLocalSocket::init()
 {
     qRegisterMetaType("QLocalSocket::LocalSocketState");
     qRegisterMetaType("QLocalSocket::LocalSocketError");
+    qRegisterMetaType("QLocalServer::SocketOption");
+    qRegisterMetaType("QFile::Permissions");
 }
 
 void tst_QLocalSocket::cleanup()
@@ -749,6 +748,16 @@ void tst_QLocalSocket::processConnection_data()
  */
 void tst_QLocalSocket::processConnection()
 {
+#ifdef Q_OS_WIN
+#  define EXE_SUFFIX ".exe"
+#else
+#  define EXE_SUFFIX
+#endif
+
+// ### lackey is currently not build
+    QEXPECT_FAIL("", "lackey is currently not built due to qscript dependency, QTBUG-24142", Abort);
+    QVERIFY(QFile::exists("lackey/lackey" EXE_SUFFIX));
+
     QFETCH(int, processes);
     QStringList serverArguments = QStringList() << SRCDIR "lackey/scripts/server.js" << QString::number(processes);
     QProcess producer;
@@ -758,7 +767,7 @@ void tst_QLocalSocket::processConnection()
 #endif
     QList consumers;
     producer.start("lackey/lackey", serverArguments);
-    QVERIFY(producer.waitForStarted(-1));
+    QVERIFY2(producer.waitForStarted(-1), qPrintable(producer.errorString()));
     QTest::qWait(2000);
     for (int i = 0; i < processes; ++i) {
        QStringList arguments = QStringList() << SRCDIR "lackey/scripts/client.js";
@@ -1018,6 +1027,140 @@ void tst_QLocalSocket::asyncDisconnectNotify()
     QTRY_VERIFY(!disconnectedSpy.isEmpty());
 }
 
+void tst_QLocalSocket::verifySocketOptions_data()
+{
+#ifdef Q_OS_LINUX
+    QTest::addColumn("service");
+    QTest::addColumn("opts");
+    QTest::addColumn("perms");
+
+    QFile::Permissions p = QFile::ExeOwner|QFile::WriteOwner|QFile::ReadOwner |
+                           QFile::ExeUser|QFile::WriteUser|QFile::ReadUser;
+    QTest::newRow("user")  << "userPerms"  << QLocalServer::UserAccessOption << p;
+
+    p = QFile::ExeGroup|QFile::WriteGroup|QFile::ReadGroup;
+    QTest::newRow("group") << "groupPerms" << QLocalServer::GroupAccessOption << p;
+
+    p = QFile::ExeOther|QFile::WriteOther|QFile::ReadOther;
+    QTest::newRow("other") << "otherPerms" << QLocalServer::OtherAccessOption << p;
+
+    p = QFile::ExeOwner|QFile::WriteOwner|QFile::ReadOwner|
+        QFile::ExeUser|QFile::WriteUser|QFile::ReadUser |
+        QFile::ExeGroup|QFile::WriteGroup|QFile::ReadGroup|
+        QFile::ExeOther|QFile::WriteOther|QFile::ReadOther;
+    QTest::newRow("all")   << "worldPerms" << QLocalServer::WorldAccessOption << p;
+#endif
+}
+
+void tst_QLocalSocket::verifySocketOptions()
+{
+    // These are only guaranteed to be useful on linux at this time
+#ifdef Q_OS_LINUX
+   QFETCH(QString, service);
+   QFETCH(QLocalServer::SocketOption, opts);
+   QFETCH(QFile::Permissions, perms);
+
+
+   QLocalServer::removeServer(service);
+   QLocalServer server;
+   server.setSocketOptions(opts);
+   QVERIFY2(server.listen(service), "service failed to start listening");
+
+   // find the socket
+   QString fullServerPath = QDir::cleanPath(QDir::tempPath());
+   fullServerPath += QLatin1Char('/') + service;
+
+   QFile socketFile(fullServerPath);
+   QVERIFY2(perms == socketFile.permissions(), "permissions on the socket don't match");
+#endif
+}
+
+void tst_QLocalSocket::verifyListenWithDescriptor()
+{
+#ifdef Q_OS_UNIX
+    QFETCH(QString, path);
+    QFETCH(bool, abstract);
+    QFETCH(bool, bound);
+
+    qDebug() << "socket" << path << abstract;
+
+    int listenSocket;
+
+    if (bound) {
+        // create the unix socket
+        listenSocket = ::socket(PF_UNIX, SOCK_STREAM, 0);
+        QVERIFY2(listenSocket != -1, "failed to create test socket");
+
+        // Construct the unix address
+        struct ::sockaddr_un addr;
+        addr.sun_family = PF_UNIX;
+
+        QVERIFY2(sizeof(addr.sun_path) > ((uint)path.size() + 1), "path to large to create socket");
+
+        ::memset(addr.sun_path, 0, sizeof(addr.sun_path));
+        if (abstract)
+            ::memcpy(addr.sun_path+1, path.toLatin1().data(), path.toLatin1().size());
+        else
+            ::memcpy(addr.sun_path, path.toLatin1().data(), path.toLatin1().size());
+
+        if (path.startsWith(QLatin1Char('/'))) {
+            ::unlink(path.toLatin1());
+        }
+
+        QVERIFY2(-1 != ::bind(listenSocket, (sockaddr *)&addr, sizeof(sockaddr_un)), "failed to bind test socket to address");
+
+        // listen for connections
+        QVERIFY2(-1 != ::listen(listenSocket, 50), "failed to call listen on test socket");
+    } else {
+        int fds[2];
+        QVERIFY2(-1 != ::socketpair(PF_UNIX, SOCK_STREAM, 0, fds), "failed to create socket pair");
+
+        listenSocket = fds[0];
+        close(fds[1]);
+    }
+
+    QLocalServer server;
+    QVERIFY2(server.listen(listenSocket), "failed to start create QLocalServer with local socket");
+
+#ifdef Q_OS_LINUX
+    if (!bound) {
+        QVERIFY(server.serverName().at(0) == QLatin1Char('@'));
+        QVERIFY(server.fullServerName().at(0) == QLatin1Char('@'));
+    } else if (abstract) {
+        QVERIFY2(server.fullServerName().at(0) == QLatin1Char('@'), "abstract sockets should start with a '@'");
+    } else {
+        QVERIFY2(server.fullServerName() == path, "full server path doesn't match patch provided");
+        if (path.contains(QLatin1String("/"))) {
+            QVERIFY2(server.serverName() == path.mid(path.lastIndexOf(QLatin1Char('/'))+1), "server name invalid short name");
+        } else {
+            QVERIFY2(server.serverName() == path, "servier name doesn't match the path provided");
+        }
+    }
+#else
+    QVERIFY(server.serverName().isEmpty());
+    QVERIFY(server.fullServerName().isEmpty());
+#endif
+
+
+#endif
+}
+
+void tst_QLocalSocket::verifyListenWithDescriptor_data()
+{
+#ifdef Q_OS_UNIX
+    QTest::addColumn("path");
+    QTest::addColumn("abstract");
+    QTest::addColumn("bound");
+
+    QTest::newRow("normal") << QDir::tempPath() + QLatin1Literal("/testsocket") << false << true;
+    QTest::newRow("absrtact") << QString::fromLatin1("abstractsocketname") << true << true;
+    QTest::newRow("abstractwithslash") << QString::fromLatin1("abstractsocketwitha/inthename") << true << true;
+    QTest::newRow("no path") << QString::fromLatin1("/invalid/no path name speficied") << true << false;
+
+#endif
+
+}
+
 QTEST_MAIN(tst_QLocalSocket)
 #include "tst_qlocalsocket.moc"
 
diff --git a/tests/auto/network/socket/qtcpserver/tst_qtcpserver.cpp b/tests/auto/network/socket/qtcpserver/tst_qtcpserver.cpp
index 941e0b21423..ac27a621bbd 100644
--- a/tests/auto/network/socket/qtcpserver/tst_qtcpserver.cpp
+++ b/tests/auto/network/socket/qtcpserver/tst_qtcpserver.cpp
@@ -119,6 +119,7 @@ private:
 #ifndef QT_NO_BEARERMANAGEMENT
     QNetworkSession *networkSession;
 #endif
+    QString crashingServerDir;
 };
 
 // Testing get/set functions
@@ -150,6 +151,10 @@ void tst_QTcpServer::initTestCase_data()
 
     QTest::newRow("WithoutProxy") << false << 0;
     QTest::newRow("WithSocks5Proxy") << true << int(QNetworkProxy::Socks5Proxy);
+
+    crashingServerDir = QFINDTESTDATA("crashingServer");
+    QVERIFY2(!crashingServerDir.isEmpty(), qPrintable(
+        QString::fromLatin1("Couldn't find crashingServer dir starting from %1.").arg(QDir::currentPath())));
 }
 
 void tst_QTcpServer::initTestCase()
@@ -538,7 +543,10 @@ void tst_QTcpServer::addressReusable()
     QFile::remove(signalName);
     // The crashingServer process will crash once it gets a connection.
     QProcess process;
-    process.start("crashingServer/crashingServer");
+    QString processExe = crashingServerDir + "/crashingServer";
+    process.start(processExe);
+    QVERIFY2(process.waitForStarted(), qPrintable(
+        QString::fromLatin1("Could not start %1: %2").arg(processExe, process.errorString())));
     int waitCount = 5;
     while (waitCount-- && !QFile::exists(signalName))
         QTest::qWait(1000);
@@ -547,7 +555,10 @@ void tst_QTcpServer::addressReusable()
 #else
     // The crashingServer process will crash once it gets a connection.
     QProcess process;
-    process.start("crashingServer/crashingServer");
+    QString processExe = crashingServerDir + "/crashingServer";
+    process.start(processExe);
+    QVERIFY2(process.waitForStarted(), qPrintable(
+        QString::fromLatin1("Could not start %1: %2").arg(processExe, process.errorString())));
     QVERIFY(process.waitForReadyRead(5000));
 #endif
 
diff --git a/tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp b/tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp
index 829ddd20549..abeb1ed06d5 100644
--- a/tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp
+++ b/tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp
@@ -246,6 +246,7 @@ private:
     SocketPair *earlyConstructedSockets;
     int earlyBytesWrittenCount;
     int earlyReadyReadCount;
+    QString stressTestDir;
 };
 
 enum ProxyTests {
@@ -340,6 +341,10 @@ void tst_QTcpSocket::initTestCase_data()
     QTest::newRow("WithHttpProxyBasicAuth SSL") << true << int(HttpProxy | AuthBasic) << true;
 //    QTest::newRow("WithHttpProxyNtlmAuth SSL") << true << int(HttpProxy | AuthNtlm) << true;
 #endif
+
+    stressTestDir = QFINDTESTDATA("stressTest");
+    QVERIFY2(!stressTestDir.isEmpty(), qPrintable(
+        QString::fromLatin1("Couldn't find stressTest dir starting from %1.").arg(QDir::currentPath())));
 }
 
 void tst_QTcpSocket::initTestCase()
@@ -2225,11 +2230,14 @@ void tst_QTcpSocket::suddenRemoteDisconnect()
     if (ssl)
         return;
 
+    QString processExe = stressTestDir + "/stressTest";
+
     // Start server
     QProcess serverProcess;
     serverProcess.setReadChannel(QProcess::StandardError);
-    serverProcess.start(QString::fromLatin1("stressTest/stressTest %1").arg(server),
-                        QIODevice::ReadWrite | QIODevice::Text);
+    serverProcess.start(processExe, QStringList(server), QIODevice::ReadWrite | QIODevice::Text);
+    QVERIFY2(serverProcess.waitForStarted(), qPrintable(
+        QString::fromLatin1("Could not start %1: %2").arg(processExe, serverProcess.errorString())));
     while (!serverProcess.canReadLine())
         QVERIFY(serverProcess.waitForReadyRead(10000));
     QCOMPARE(serverProcess.readLine().data(), (server.toLatin1() + "\n").data());
@@ -2237,8 +2245,9 @@ void tst_QTcpSocket::suddenRemoteDisconnect()
     // Start client
     QProcess clientProcess;
     clientProcess.setReadChannel(QProcess::StandardError);
-    clientProcess.start(QString::fromLatin1("stressTest/stressTest %1").arg(client),
-                        QIODevice::ReadWrite | QIODevice::Text);
+    clientProcess.start(processExe, QStringList(client), QIODevice::ReadWrite | QIODevice::Text);
+    QVERIFY2(clientProcess.waitForStarted(), qPrintable(
+        QString::fromLatin1("Could not start %1: %2").arg(processExe, clientProcess.errorString())));
     while (!clientProcess.canReadLine())
         QVERIFY(clientProcess.waitForReadyRead(10000));
     QCOMPARE(clientProcess.readLine().data(), (client.toLatin1() + "\n").data());
diff --git a/tests/auto/network/ssl/qsslcertificate/qsslcertificate.pro b/tests/auto/network/ssl/qsslcertificate/qsslcertificate.pro
index 7e2abac3f80..60ad3cbfd1e 100644
--- a/tests/auto/network/ssl/qsslcertificate/qsslcertificate.pro
+++ b/tests/auto/network/ssl/qsslcertificate/qsslcertificate.pro
@@ -6,19 +6,4 @@ QT = core network testlib
 
 TARGET = tst_qsslcertificate
 
-win32 {
-  CONFIG(debug, debug|release) {
-    DESTDIR = debug
-} else {
-    DESTDIR = release
-  }
-}
-
-wince* {
-    certFiles.files = certificates more-certificates
-    certFiles.path    = .
-    DEPLOYMENT += certFiles
-    DEFINES += SRCDIR=\\\".\\\"
-} else {
-    DEFINES += SRCDIR=\\\"$$PWD/\\\"
-}
+TESTDATA += certificates/* more-certificates/* verify-certs/*
diff --git a/tests/auto/network/ssl/qsslcertificate/tst_qsslcertificate.cpp b/tests/auto/network/ssl/qsslcertificate/tst_qsslcertificate.cpp
index 8003ad19326..da2dd989c71 100644
--- a/tests/auto/network/ssl/qsslcertificate/tst_qsslcertificate.cpp
+++ b/tests/auto/network/ssl/qsslcertificate/tst_qsslcertificate.cpp
@@ -71,14 +71,10 @@ class tst_QSslCertificate : public QObject
 #endif
 
     QString oldCurrentDir;
-public:
-    tst_QSslCertificate();
-    virtual ~tst_QSslCertificate();
 
 public slots:
-    void initTestCase_data();
-    void init();
-    void cleanup();
+    void initTestCase();
+    void cleanupTestCase();
 
 #ifndef QT_NO_OPENSSL
 private slots:
@@ -120,11 +116,23 @@ private slots:
 // ### add tests for certificate bundles (multiple certificates concatenated into a single
 //     structure); both PEM and DER formatted
 #endif
+private:
+    QString testDataDir;
 };
 
-tst_QSslCertificate::tst_QSslCertificate()
+void tst_QSslCertificate::initTestCase()
 {
-    QDir dir(SRCDIR + QLatin1String("/certificates"));
+    testDataDir = QFileInfo(QFINDTESTDATA("certificates")).absolutePath();
+    if (testDataDir.isEmpty())
+        testDataDir = QCoreApplication::applicationDirPath();
+
+    if (QDir::current().absolutePath() != testDataDir) {
+        oldCurrentDir = QDir::current().absolutePath();
+        QVERIFY2(QDir::setCurrent(testDataDir),
+                 qPrintable(QString("Cannot change directory to %1").arg(testDataDir)));
+    }
+
+    QDir dir(testDataDir + "/certificates");
     QFileInfoList fileInfoList = dir.entryInfoList(QDir::Files | QDir::Readable);
     QRegExp rxCert(QLatin1String("^.+\\.(pem|der)$"));
     QRegExp rxSan(QLatin1String("^(.+\\.(?:pem|der))\\.san$"));
@@ -148,29 +156,11 @@ tst_QSslCertificate::tst_QSslCertificate()
     }
 }
 
-tst_QSslCertificate::~tst_QSslCertificate()
-{
-}
-
-void tst_QSslCertificate::initTestCase_data()
-{
-}
-
-void tst_QSslCertificate::init()
-{
-    QString srcdir(QLatin1String(SRCDIR));
-    if (!srcdir.isEmpty()) {
-        oldCurrentDir = QDir::current().absolutePath();
-        QDir::setCurrent(srcdir);
-    }
-}
-
-void tst_QSslCertificate::cleanup()
+void tst_QSslCertificate::cleanupTestCase()
 {
     if (!oldCurrentDir.isEmpty()) {
         QDir::setCurrent(oldCurrentDir);
     }
-
 }
 
 static QByteArray readFile(const QString &absFilePath)
@@ -569,7 +559,7 @@ void tst_QSslCertificate::fromPath_data()
     QTest::newRow("\"d.*/c.*.pem\" wildcard pem") << QString("d.*/c.*.pem") << int(QRegExp::Wildcard) << true << 0;
     QTest::newRow("\"d.*/c.*.pem\" wildcard der") << QString("d.*/c.*.pem") << int(QRegExp::Wildcard) << false << 0;
 #ifdef Q_OS_LINUX
-    QTest::newRow("absolute path wildcard pem") << QString(QDir::currentPath() + "/certificates/*.pem") << int(QRegExp::Wildcard) << true << 5;
+    QTest::newRow("absolute path wildcard pem") << (testDataDir + "/certificates/*.pem") << int(QRegExp::Wildcard) << true << 5;
 #endif
 
     QTest::newRow("trailing-whitespace") << QString("more-certificates/trailing-whitespace.pem") << int(QRegExp::FixedString) << true << 1;
@@ -783,7 +773,7 @@ void tst_QSslCertificate::task256066toPem()
 void tst_QSslCertificate::nulInCN()
 {
     QList certList =
-        QSslCertificate::fromPath(SRCDIR "more-certificates/badguy-nul-cn.crt");
+        QSslCertificate::fromPath(testDataDir + "/more-certificates/badguy-nul-cn.crt");
     QCOMPARE(certList.size(), 1);
 
     const QSslCertificate &cert = certList.at(0);
@@ -799,7 +789,7 @@ void tst_QSslCertificate::nulInCN()
 void tst_QSslCertificate::nulInSan()
 {
     QList certList =
-        QSslCertificate::fromPath(SRCDIR "more-certificates/badguy-nul-san.crt");
+        QSslCertificate::fromPath(testDataDir + "/more-certificates/badguy-nul-san.crt");
     QCOMPARE(certList.size(), 1);
 
     const QSslCertificate &cert = certList.at(0);
@@ -819,7 +809,7 @@ void tst_QSslCertificate::nulInSan()
 void tst_QSslCertificate::largeSerialNumber()
 {
     QList certList =
-        QSslCertificate::fromPath(SRCDIR "more-certificates/cert-large-serial-number.pem");
+        QSslCertificate::fromPath(testDataDir + "/more-certificates/cert-large-serial-number.pem");
 
     QCOMPARE(certList.size(), 1);
 
@@ -831,7 +821,7 @@ void tst_QSslCertificate::largeSerialNumber()
 void tst_QSslCertificate::largeExpirationDate() // QTBUG-12489
 {
     QList certList =
-        QSslCertificate::fromPath(SRCDIR "more-certificates/cert-large-expiration-date.pem");
+        QSslCertificate::fromPath(testDataDir + "/more-certificates/cert-large-expiration-date.pem");
 
     QCOMPARE(certList.size(), 1);
 
@@ -854,18 +844,18 @@ void tst_QSslCertificate::blacklistedCertificates()
 void tst_QSslCertificate::toText()
 {
     QList certList =
-        QSslCertificate::fromPath(SRCDIR "more-certificates/cert-large-expiration-date.pem");
+        QSslCertificate::fromPath(testDataDir + "/more-certificates/cert-large-expiration-date.pem");
 
     QCOMPARE(certList.size(), 1);
     const QSslCertificate &cert = certList.at(0);
 
     // Openssl's cert dump method changed slightly between 0.9.8 and 1.0.0 versions, so we want it to match any output
 
-    QFile fOld(SRCDIR "more-certificates/cert-large-expiration-date.txt.0.9.8");
+    QFile fOld(testDataDir + "/more-certificates/cert-large-expiration-date.txt.0.9.8");
     QVERIFY(fOld.open(QIODevice::ReadOnly | QFile::Text));
     QByteArray txtOld = fOld.readAll();
 
-    QFile fNew(SRCDIR "more-certificates/cert-large-expiration-date.txt.1.0.0");
+    QFile fNew(testDataDir + "/more-certificates/cert-large-expiration-date.txt.1.0.0");
     QVERIFY(fNew.open(QIODevice::ReadOnly | QFile::Text));
     QByteArray txtNew = fNew.readAll();
     QVERIFY(txtOld == cert.toText() || txtNew == cert.toText());
@@ -874,7 +864,7 @@ void tst_QSslCertificate::toText()
 void tst_QSslCertificate::multipleCommonNames()
 {
     QList certList =
-        QSslCertificate::fromPath(SRCDIR "more-certificates/test-cn-two-cns-cert.pem");
+        QSslCertificate::fromPath(testDataDir + "/more-certificates/test-cn-two-cns-cert.pem");
     QVERIFY2(certList.count() > 0, "Please run this test from the source directory");
 
     QStringList commonNames = certList[0].subjectInfo(QSslCertificate::CommonName);
@@ -885,14 +875,14 @@ void tst_QSslCertificate::multipleCommonNames()
 void tst_QSslCertificate::subjectAndIssuerAttributes()
 {
     QList certList =
-        QSslCertificate::fromPath(SRCDIR "more-certificates/test-cn-with-drink-cert.pem");
+        QSslCertificate::fromPath(testDataDir + "/more-certificates/test-cn-with-drink-cert.pem");
     QVERIFY2(certList.count() > 0, "Please run this test from the source directory");
 
     QList attributes = certList[0].subjectInfoAttributes();
     QVERIFY(attributes.contains(QByteArray("favouriteDrink")));
     attributes.clear();
 
-    certList = QSslCertificate::fromPath(SRCDIR "more-certificates/natwest-banking.pem");
+    certList = QSslCertificate::fromPath(testDataDir + "/more-certificates/natwest-banking.pem");
     QVERIFY2(certList.count() > 0, "Please run this test from the source directory");
 
     attributes = certList[0].subjectInfoAttributes();
@@ -917,17 +907,17 @@ void tst_QSslCertificate::verify()
     errors.clear();
 
     // Verify a valid cert signed by a CA
-    QList caCerts = QSslCertificate::fromPath(SRCDIR "verify-certs/cacert.pem");
+    QList caCerts = QSslCertificate::fromPath(testDataDir + "/verify-certs/cacert.pem");
     QSslSocket::addDefaultCaCertificate(caCerts.first());
 
-    toVerify = QSslCertificate::fromPath(SRCDIR "verify-certs/test-ocsp-good-cert.pem");
+    toVerify = QSslCertificate::fromPath(testDataDir + "/verify-certs/test-ocsp-good-cert.pem");
 
     errors = QSslCertificate::verify(toVerify);
     VERIFY_VERBOSE(errors.count() == 0);
     errors.clear();
 
     // Test a blacklisted certificate
-    toVerify = QSslCertificate::fromPath(SRCDIR "verify-certs/test-addons-mozilla-org-cert.pem");
+    toVerify = QSslCertificate::fromPath(testDataDir + "/verify-certs/test-addons-mozilla-org-cert.pem");
     errors = QSslCertificate::verify(toVerify);
     bool foundBlack = false;
     foreach (const QSslError &error, errors) {
@@ -940,7 +930,7 @@ void tst_QSslCertificate::verify()
     errors.clear();
 
     // This one is expired and untrusted
-    toVerify = QSslCertificate::fromPath(SRCDIR "more-certificates/cert-large-serial-number.pem");
+    toVerify = QSslCertificate::fromPath(testDataDir + "/more-certificates/cert-large-serial-number.pem");
     errors = QSslCertificate::verify(toVerify);
     VERIFY_VERBOSE(errors.contains(QSslError(QSslError::SelfSignedCertificate, toVerify[0])));
     VERIFY_VERBOSE(errors.contains(QSslError(QSslError::CertificateExpired, toVerify[0])));
@@ -948,15 +938,15 @@ void tst_QSslCertificate::verify()
     toVerify.clear();
 
     // This one is signed by a valid cert, but the signer is not a valid CA
-    toVerify << QSslCertificate::fromPath(SRCDIR "verify-certs/test-intermediate-not-ca-cert.pem").first();
-    toVerify << QSslCertificate::fromPath(SRCDIR "verify-certs/test-ocsp-good-cert.pem").first();
+    toVerify << QSslCertificate::fromPath(testDataDir + "/verify-certs/test-intermediate-not-ca-cert.pem").first();
+    toVerify << QSslCertificate::fromPath(testDataDir + "/verify-certs/test-ocsp-good-cert.pem").first();
     errors = QSslCertificate::verify(toVerify);
     VERIFY_VERBOSE(errors.contains(QSslError(QSslError::InvalidCaCertificate, toVerify[1])));
     toVerify.clear();
 
     // This one is signed by a valid cert, and the signer is a valid CA
-    toVerify << QSslCertificate::fromPath(SRCDIR "verify-certs/test-intermediate-is-ca-cert.pem").first();
-    toVerify << QSslCertificate::fromPath(SRCDIR "verify-certs/test-intermediate-ca-cert.pem").first();
+    toVerify << QSslCertificate::fromPath(testDataDir + "/verify-certs/test-intermediate-is-ca-cert.pem").first();
+    toVerify << QSslCertificate::fromPath(testDataDir + "/verify-certs/test-intermediate-ca-cert.pem").first();
     errors = QSslCertificate::verify(toVerify);
     VERIFY_VERBOSE(errors.count() == 0);
 
@@ -986,7 +976,7 @@ QString tst_QSslCertificate::toString(const QList& errors)
 void tst_QSslCertificate::extensions()
 {
     QList certList =
-        QSslCertificate::fromPath(SRCDIR "more-certificates/natwest-banking.pem");
+        QSslCertificate::fromPath(testDataDir + "/more-certificates/natwest-banking.pem");
     QVERIFY2(certList.count() > 0, "Please run this test from the source directory");
 
     QSslCertificate cert = certList[0];
diff --git a/tests/auto/network/ssl/qsslkey/qsslkey.pro b/tests/auto/network/ssl/qsslkey/qsslkey.pro
index 4af35487cd5..d794c0faf06 100644
--- a/tests/auto/network/ssl/qsslkey/qsslkey.pro
+++ b/tests/auto/network/ssl/qsslkey/qsslkey.pro
@@ -6,23 +6,4 @@ QT = core network testlib
 
 TARGET = tst_qsslkey
 
-win32 {
-  CONFIG(debug, debug|release) {
-    DESTDIR = debug
-} else {
-    DESTDIR = release
-  }
-}
-
-wince* {
-    keyFiles.files = keys
-    keyFiles.path    = .
-
-    passphraseFiles.files = rsa-without-passphrase.pem rsa-with-passphrase.pem
-    passphraseFiles.path    = .
-
-    DEPLOYMENT += keyFiles passphraseFiles
-    DEFINES += SRCDIR=\\\".\\\"
-} else {
-    DEFINES+= SRCDIR=\\\"$$PWD\\\"
-}
+TESTDATA += keys/* rsa-without-passphrase.pem rsa-with-passphrase.pem
diff --git a/tests/auto/network/ssl/qsslkey/tst_qsslkey.cpp b/tests/auto/network/ssl/qsslkey/tst_qsslkey.cpp
index f59f0bb5a9b..e8941a2642d 100644
--- a/tests/auto/network/ssl/qsslkey/tst_qsslkey.cpp
+++ b/tests/auto/network/ssl/qsslkey/tst_qsslkey.cpp
@@ -68,14 +68,8 @@ class tst_QSslKey : public QObject
 
     void createPlainTestRows();
 
-public:
-    tst_QSslKey();
-    virtual ~tst_QSslKey();
-
 public slots:
-    void initTestCase_data();
-    void init();
-    void cleanup();
+    void initTestCase();
 
 #ifndef QT_NO_OPENSSL
 
@@ -95,16 +89,17 @@ private slots:
 
     void passphraseChecks();
 #endif
+private:
+    QString testDataDir;
 };
 
-tst_QSslKey::tst_QSslKey()
+void tst_QSslKey::initTestCase()
 {
-#ifdef Q_OS_MAC
-    // applicationDirPath() points to a path inside the app bundle on Mac.
-    QDir dir(qApp->applicationDirPath() + QLatin1String("/../../../keys"));
-#else
-    QDir dir(SRCDIR + QLatin1String("/keys"));  // prefer this way to avoid ifdeffery and support shadow builds?
-#endif
+    testDataDir = QFileInfo(QFINDTESTDATA("rsa-without-passphrase.pem")).absolutePath();
+    if (testDataDir.isEmpty())
+        testDataDir = QCoreApplication::applicationDirPath();
+
+    QDir dir(testDataDir + "/keys");
     QFileInfoList fileInfoList = dir.entryInfoList(QDir::Files | QDir::Readable);
     QRegExp rx(QLatin1String("^(rsa|dsa)-(pub|pri)-(\\d+)\\.(pem|der)$"));
     foreach (QFileInfo fileInfo, fileInfoList) {
@@ -118,22 +113,6 @@ tst_QSslKey::tst_QSslKey()
     }
 }
 
-tst_QSslKey::~tst_QSslKey()
-{
-}
-
-void tst_QSslKey::initTestCase_data()
-{
-}
-
-void tst_QSslKey::init()
-{
-}
-
-void tst_QSslKey::cleanup()
-{
-}
-
 static QByteArray readFile(const QString &absFilePath)
 {
     QFile file(absFilePath);
@@ -295,10 +274,11 @@ void tst_QSslKey::toEncryptedPemOrDer_data()
               << "aAzZ`1234567890-=~!@#$%^&*()_+[]{}\\|;:'\",.<>/?"; // ### add more (?)
     foreach (KeyInfo keyInfo, keyInfoList) {
         foreach (QString password, passwords) {
-            QString testName = QString("%1-%2-%3-%4").arg(keyInfo.fileInfo.fileName())
+            QString testName = QString("%1-%2-%3-%4-%5").arg(keyInfo.fileInfo.fileName())
                 .arg(keyInfo.algorithm == QSsl::Rsa ? "RSA" : "DSA")
                 .arg(keyInfo.type == QSsl::PrivateKey ? "PrivateKey" : "PublicKey")
-                .arg(keyInfo.format == QSsl::Pem ? "PEM" : "DER");
+                .arg(keyInfo.format == QSsl::Pem ? "PEM" : "DER")
+                .arg(password);
             QTest::newRow(testName.toLatin1())
                 << keyInfo.fileInfo.absoluteFilePath() << keyInfo.algorithm << keyInfo.type
                 << keyInfo.format << password;
@@ -367,7 +347,7 @@ void tst_QSslKey::toEncryptedPemOrDer()
 void tst_QSslKey::passphraseChecks()
 {
     {
-        QString fileName(SRCDIR "/rsa-with-passphrase.pem");
+        QString fileName(testDataDir + "/rsa-with-passphrase.pem");
         QFile keyFile(fileName);
         QVERIFY(keyFile.exists());
         {
@@ -406,7 +386,7 @@ void tst_QSslKey::passphraseChecks()
 
     {
         // be sure and check a key without passphrase too
-        QString fileName(SRCDIR "/rsa-without-passphrase.pem");
+        QString fileName(testDataDir + "/rsa-without-passphrase.pem");
         QFile keyFile(fileName);
         {
             if (!keyFile.isOpen())
diff --git a/tests/auto/network/ssl/qsslsocket/qsslsocket.pro b/tests/auto/network/ssl/qsslsocket/qsslsocket.pro
index a8763d69afa..bb04e0b9c4c 100644
--- a/tests/auto/network/ssl/qsslsocket/qsslsocket.pro
+++ b/tests/auto/network/ssl/qsslsocket/qsslsocket.pro
@@ -35,3 +35,5 @@ wince* {
 linux-*:system(". /etc/lsb-release && [ $DISTRIB_CODENAME = oneiric ]"):DEFINES+=UBUNTU_ONEIRIC
 
 requires(contains(QT_CONFIG,private_tests))
+
+win32:CONFIG += insignificant_test # QTBUG-24234
diff --git a/tests/auto/other/headersclean/headersclean.pro b/tests/auto/other/headersclean/headersclean.pro
index 814f19c8658..5444bebfb9d 100644
--- a/tests/auto/other/headersclean/headersclean.pro
+++ b/tests/auto/other/headersclean/headersclean.pro
@@ -1,7 +1,28 @@
 CONFIG += testcase
 TARGET = tst_headersclean
 SOURCES  += tst_headersclean.cpp
-QT = core network xml sql testlib
 
-contains(QT_CONFIG,dbus): QT += dbus
-contains(QT_CONFIG,opengl): QT += opengl
+# No need to link to all modules, only those actually used
+QT = core testlib gui widgets
+
+*-g++*: QMAKE_CXXFLAGS += -W -Wall -Wextra -Werror
+
+# The flags here come from http://wiki.qt-project.org/Coding_Conventions#Conventions_for_public_header_files
+# -Wold-style-cast cannot be used, /usr/include/bits/byteswap.h defines the macro bswap_16 using C style casts :(
+# -Wfloat-equal cannot be used, qrect.h and qvector2d.h do exact comparisons in isNull and operator==. Would need #pragmas.
+*-g++*: QMAKE_CXXFLAGS += -Woverloaded-virtual -Wshadow -Wundef
+
+# Other nice flags
+*-g++*: QMAKE_CXXFLAGS += -Wnon-virtual-dtor -ansi -Wcast-align -Wchar-subscripts -Wpointer-arith -Wformat-security
+
+# Enable pedantic mode, but accept variadic macros and 'long long' usage.
+*-g++*: QMAKE_CXXFLAGS += -Wno-long-long -Wno-variadic-macros -pedantic-errors
+
+QMAKE_CXXFLAGS += -DQT_NO_CAST_TO_ASCII \
+                  -DQT_NO_CAST_FROM_ASCII \
+                  -DQT_STRICT_ITERATORS \
+                  -DQT_NO_URL_CAST_FROM_STRING \
+                  -DQT_NO_CAST_FROM_BYTEARRAY \
+                  -DQT_NO_KEYWORDS \
+                  -DQT_USE_FAST_CONCATENATION \
+                  -DQT_USE_FAST_OPERATOR_PLUS
diff --git a/tests/auto/other/headersclean/tst_headersclean.cpp b/tests/auto/other/headersclean/tst_headersclean.cpp
index 41992b8d2a4..81d0aa3a4a6 100644
--- a/tests/auto/other/headersclean/tst_headersclean.cpp
+++ b/tests/auto/other/headersclean/tst_headersclean.cpp
@@ -39,7 +39,6 @@
 **
 ****************************************************************************/
 
-#define QT_NO_KEYWORDS
 #define signals int
 #define slots int
 #define emit public:;
@@ -47,12 +46,16 @@
 #define forever public:;
 
 #include 
+#include 
 #include 
 
 #include 
 #include 
 #include 
 #include 
+#include 
+#include 
+#include 
 
 #ifndef QT_NO_OPENGL
 #include 
diff --git a/tests/auto/other/networkselftest/networkselftest.pro b/tests/auto/other/networkselftest/networkselftest.pro
index 3cd5f266894..1c0d256dbbb 100644
--- a/tests/auto/other/networkselftest/networkselftest.pro
+++ b/tests/auto/other/networkselftest/networkselftest.pro
@@ -4,14 +4,3 @@ TARGET = tst_networkselftest
 SOURCES += tst_networkselftest.cpp
 QT = core network testlib
 
-wince*: {
-    addFiles.files = rfc3252.txt
-    addFiles.path = .
-    DEPLOYMENT += addFiles
-    DEFINES += SRCDIR=\\\"\\\"
-} else:vxworks*: {
-    DEFINES += SRCDIR=\\\"\\\"
-} else {
-    DEFINES += SRCDIR=\\\"$$PWD/\\\"
-}
-
diff --git a/tests/auto/other/networkselftest/rfc3252.txt b/tests/auto/other/networkselftest/rfc3252.txt
deleted file mode 100644
index b80c61bf0a1..00000000000
--- a/tests/auto/other/networkselftest/rfc3252.txt
+++ /dev/null
@@ -1,899 +0,0 @@
-
-
-
-
-
-
-Network Working Group                                         H. Kennedy
-Request for Comments: 3252                                      Mimezine
-Category: Informational                                     1 April 2002
-
-
-                 Binary Lexical Octet Ad-hoc Transport
-
-Status of this Memo
-
-   This memo provides information for the Internet community.  It does
-   not specify an Internet standard of any kind.  Distribution of this
-   memo is unlimited.
-
-Copyright Notice
-
-   Copyright (C) The Internet Society (2002).  All Rights Reserved.
-
-Abstract
-
-   This document defines a reformulation of IP and two transport layer
-   protocols (TCP and UDP) as XML applications.
-
-1.   Introduction
-
-1.1. Overview
-
-   This document describes the Binary Lexical Octet Ad-hoc Transport
-   (BLOAT): a reformulation of a widely-deployed network-layer protocol
-   (IP [RFC791]), and two associated transport layer protocols (TCP
-   [RFC793] and UDP [RFC768]) as XML [XML] applications.  It also
-   describes methods for transporting BLOAT over Ethernet and IEEE 802
-   networks as well as encapsulating BLOAT in IP for gatewaying BLOAT
-   across the public Internet.
-
-1.2. Motivation
-
-   The wild popularity of XML as a basis for application-level protocols
-   such as the Blocks Extensible Exchange Protocol [RFC3080], the Simple
-   Object Access Protocol [SOAP], and Jabber [JABBER] prompted
-   investigation into the possibility of extending the use of XML in the
-   protocol stack.  Using XML at both the transport and network layer in
-   addition to the application layer would provide for an amazing amount
-   of power and flexibility while removing dependencies on proprietary
-   and hard-to-understand binary protocols.  This protocol unification
-   would also allow applications to use a single XML parser for all
-   aspects of their operation, eliminating developer time spent figuring
-   out the intricacies of each new protocol, and moving the hard work of
-
-
-
-
-Kennedy                      Informational                      [Page 1]
-
-RFC 3252         Binary Lexical Octet Ad-hoc Transport      1 April 2002
-
-
-   parsing to the XML toolset.  The use of XML also mitigates concerns
-   over "network vs. host" byte ordering which is at the root of many
-   network application bugs.
-
-1.3. Relation to Existing Protocols
-
-   The reformulations specified in this RFC follow as closely as
-   possible the spirit of the RFCs on which they are based, and so MAY
-   contain elements or attributes that would not be needed in a pure
-   reworking (e.g. length attributes, which are implicit in XML.)
-
-   The layering of network and transport protocols are maintained in
-   this RFC despite the optimizations that could be made if the line
-   were somewhat blurred (i.e. merging TCP and IP into a single, larger
-   element in the DTD) in order to foster future use of this protocol as
-   a basis for reformulating other protocols (such as ICMP.)
-
-   Other than the encoding, the behavioral aspects of each of the
-   existing protocols remain unchanged.  Routing, address spaces, TCP
-   congestion control, etc. behave as specified in the extant standards.
-   Adapting to new standards and experimental algorithm heuristics for
-   improving performance will become much easier once the move to BLOAT
-   has been completed.
-
-1.4. Requirement Levels
-
-   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
-   "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
-   document are to be interpreted as described in BCP 14, RFC 2119
-   [RFC2119].
-
-2.   IPoXML
-
-   This protocol MUST be implemented to be compliant with this RFC.
-   IPoXML is the root protocol REQUIRED for effective use of TCPoXML
-   (section 3.) and higher-level application protocols.
-
-   The DTD for this document type can be found in section 7.1.
-
-   The routing of IPoXML can be easily implemented on hosts with an XML
-   parser, as the regular structure lends itself handily to parsing and
-   validation of the document/datagram and then processing the
-   destination address, TTL, and checksum before sending it on to its
-   next-hop.
-
-   The reformulation of IPv4 was chosen over IPv6 [RFC2460] due to the
-   wider deployment of IPv4 and the fact that implementing IPv6 as XML
-   would have exceeded the 1500 byte Ethernet MTU.
-
-
-
-Kennedy                      Informational                      [Page 2]
-
-RFC 3252         Binary Lexical Octet Ad-hoc Transport      1 April 2002
-
-
-   All BLOAT implementations MUST use - and specify - the UTF-8 encoding
-   of RFC 2279 [RFC2279].  All BLOAT document/datagrams MUST be well-
-   formed and include the XMLDecl.
-
-2.1. IP Description
-
-   A number of items have changed (for the better) from the original IP
-   specification.  Bit-masks, where present have been converted into
-   human-readable values.  IP addresses are listed in their dotted-
-   decimal notation [RFC1123].  Length and checksum values are present
-   as decimal integers.
-
-   To calculate the length and checksum fields of the IP element, a
-   canonicalized form of the element MUST be used.  The canonical form
-   SHALL have no whitespace (including newline characters) between
-   elements and only one space character between attributes.  There
-   SHALL NOT be a space following the last attribute in an element.
-
-   An iterative method SHOULD be used to calculate checksums, as the
-   length field will vary based on the size of the checksum.
-
-   The payload element bears special attention.  Due to the character
-   set restrictions of XML, the payload of IP datagrams (which MAY
-   contain arbitrary data) MUST be encoded for transport. This RFC
-   REQUIRES the contents of the payload to be encoded in the base-64
-   encoding of RFC 2045 [RFC2045], but removes the requirement that the
-   encoded output MUST be wrapped on 76-character lines.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Kennedy                      Informational                      [Page 3]
-
-RFC 3252         Binary Lexical Octet Ad-hoc Transport      1 April 2002
-
-
-2.2. Example Datagram
-
-   The following is an example IPoXML datagram with an empty payload:
-
-   
-   
-   
-   
- - - - - - - - - - - - - - - -
- - -
- -3. TCPoXML - - This protocol MUST be implemented to be compliant with this RFC. The - DTD for this document type can be found in section 7.2. - -3.1. TCP Description - - A number of items have changed from the original TCP specification. - Bit-masks, where present have been converted into human-readable - values. Length and checksum and port values are present as decimal - integers. - - To calculate the length and checksum fields of the TCP element, a - canonicalized form of the element MUST be used as in section 2.1. - - An iterative method SHOULD be used to calculate checksums as in - section 2.1. - - The payload element MUST be encoded as in section 2.1. - - - -Kennedy Informational [Page 4] - -RFC 3252 Binary Lexical Octet Ad-hoc Transport 1 April 2002 - - - The TCP offset element was expanded to a maximum of 255 from 16 to - allow for the increased size of the header in XML. - - TCPoXML datagrams encapsulated by IPoXML MAY omit the header - as well as the declaration. - -3.2. Example Datagram - - The following is an example TCPoXML datagram with an empty payload: - - - - - - - - - - - - - - - - - - - - - - - - -4. UDPoXML - - This protocol MUST be implemented to be compliant with this RFC. The - DTD for this document type can be found in section 7.3. - -4.1. UDP Description - - A number of items have changed from the original UDP specification. - Bit-masks, where present have been converted into human-readable - values. Length and checksum and port values are present as decimal - integers. - - - - - - - -Kennedy Informational [Page 5] - -RFC 3252 Binary Lexical Octet Ad-hoc Transport 1 April 2002 - - - To calculate the length and checksum fields of the UDP element, a - canonicalized form of the element MUST be used as in section 2.1. An - iterative method SHOULD be used to calculate checksums as in section - 2.1. - - The payload element MUST be encoded as in section 2.1. - - UDPoXML datagrams encapsulated by IPoXML MAY omit the header - as well as the declaration. - -4.2. Example Datagram - - The following is an example UDPoXML datagram with an empty payload: - - - - - - - - - - - - - - -5. Network Transport - - This document provides for the transmission of BLOAT datagrams over - two common families of physical layer transport. Future RFCs will - address additional transports as routing vendors catch up to the - specification, and we begin to see BLOAT routed across the Internet - backbone. - -5.1. Ethernet - - BLOAT is encapsulated in Ethernet datagrams as in [RFC894] with the - exception that the type field of the Ethernet frame MUST contain the - value 0xBEEF. The first 5 octets of the Ethernet frame payload will - be 0x3c 3f 78 6d 6c (" - --> - - - - -Kennedy Informational [Page 7] - -RFC 3252 Binary Lexical Octet Ad-hoc Transport 1 April 2002 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Kennedy Informational [Page 9] - -RFC 3252 Binary Lexical Octet Ad-hoc Transport 1 April 2002 - - - - - - - - - - - - - - - - - - - - - - - - -Kennedy Informational [Page 10] - -RFC 3252 Binary Lexical Octet Ad-hoc Transport 1 April 2002 - - - - - - - - - - - - - -7.2. TCPoXML DTD - - - - - - - - - - - - - - - - - -Kennedy Informational [Page 11] - -RFC 3252 Binary Lexical Octet Ad-hoc Transport 1 April 2002 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Kennedy Informational [Page 12] - -RFC 3252 Binary Lexical Octet Ad-hoc Transport 1 April 2002 - - - - - - - - - - - - - - - - - - - - -7.3. UDPoXML DTD - - - - - - - - - - - - - - - -Kennedy Informational [Page 13] - -RFC 3252 Binary Lexical Octet Ad-hoc Transport 1 April 2002 - - -8. Security Considerations - - XML, as a subset of SGML, has the same security considerations as - specified in SGML Media Types [RFC1874]. Security considerations - that apply to IP, TCP and UDP also likely apply to BLOAT as it does - not attempt to correct for issues not related to message format. - -9. References - - [JABBER] Miller, J., "Jabber", draft-miller-jabber-00.txt, - February 2002. (Work in Progress) - - [RFC768] Postel, J., "User Datagram Protocol", STD 6, RFC 768, - August 1980. - - [RFC791] Postel, J., "Internet Protocol", STD 5, RFC 791, - September 1981. - - [RFC793] Postel, J., "Transmission Control Protocol", STD 7, RFC - 793, September 1981. - - [RFC894] Hornig, C., "Standard for the Transmission of IP - Datagrams over Ethernet Networks.", RFC 894, April 1984. - - [RFC1042] Postel, J. and J. Reynolds, "Standard for the - Transmission of IP Datagrams Over IEEE 802 Networks", STD - 43, RFC 1042, February 1988. - - [RFC1123] Braden, R., "Requirements for Internet Hosts - - Application and Support", RFC 1123, October 1989. - - [RFC1874] Levinson, E., "SGML Media Types", RFC 1874, December - 1995. - - [RFC2003] Perkins, C., "IP Encapsulation within IP", RFC 2003, - October 1996. - - [RFC2045] Freed, N. and N. Borenstein, "Multipurpose Internet Mail - Extensions (MIME) Part One: Format of Internet Message - Bodies", RFC 2045, November 1996. - - [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate - Requirement Levels", BCP 14, RFC 2119, March 1997. - - [RFC2279] Yergeau, F., "UTF-8, a transformation format of ISO - 10646", RFC 2279, January 1998. - - - - - -Kennedy Informational [Page 14] - -RFC 3252 Binary Lexical Octet Ad-hoc Transport 1 April 2002 - - - [RFC2460] Deering, S. and R. Hinden, "Internet Protocol, Version 6 - (IPv6) Specification", RFC 2460, December 1998. - - [RFC3080] Rose, M., "The Blocks Extensible Exchange Protocol Core", - RFC 3080, March 2001. - - [SOAP] Box, D., Ehnebuske, D., Kakivaya, G., Layman, A., - Mendelsohn, N., Nielsen, H. F., Thatte, S. Winer, D., - "Simple Object Access Protocol (SOAP) 1.1" World Wide Web - Consortium Note, May 2000 http://www.w3.org/TR/SOAP/ - - [XML] Bray, T., Paoli, J., Sperberg-McQueen, C. M., "Extensible - Markup Language (XML)" World Wide Web Consortium - Recommendation REC- xml-19980210. - http://www.w3.org/TR/1998/REC-xml-19980210 - -10. Author's Address - - Hugh Kennedy - Mimezine - 1060 West Addison - Chicago, IL 60613 - USA - - EMail: kennedyh@engin.umich.edu - - - - - - - - - - - - - - - - - - - - - - - - - - -Kennedy Informational [Page 15] - -RFC 3252 Binary Lexical Octet Ad-hoc Transport 1 April 2002 - - -11. Full Copyright Statement - - Copyright (C) The Internet Society (2002). All Rights Reserved. - - This document and translations of it may be copied and furnished to - others, and derivative works that comment on or otherwise explain it - or assist in its implementation may be prepared, copied, published - and distributed, in whole or in part, without restriction of any - kind, provided that the above copyright notice and this paragraph are - included on all such copies and derivative works. However, this - document itself may not be modified in any way, such as by removing - the copyright notice or references to the Internet Society or other - Internet organizations, except as needed for the purpose of - developing Internet standards in which case the procedures for - copyrights defined in the Internet Standards process must be - followed, or as required to translate it into languages other than - English. - - The limited permissions granted above are perpetual and will not be - revoked by the Internet Society or its successors or assigns. - - This document and the information contained herein is provided on an - "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING - TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING - BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION - HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF - MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - -Acknowledgement - - Funding for the RFC Editor function is currently provided by the - Internet Society. - - - - - - - - - - - - - - - - - - - -Kennedy Informational [Page 16] - diff --git a/tests/auto/other/networkselftest/tst_networkselftest.cpp b/tests/auto/other/networkselftest/tst_networkselftest.cpp index c1a3cd17d21..99d4ac9522e 100644 --- a/tests/auto/other/networkselftest/tst_networkselftest.cpp +++ b/tests/auto/other/networkselftest/tst_networkselftest.cpp @@ -70,7 +70,6 @@ private slots: void serverReachability(); void remotePortsOpen_data(); void remotePortsOpen(); - void fileLineEndingTest(); // specific protocol tests void ftpServer(); @@ -458,31 +457,6 @@ void tst_NetworkSelfTest::remotePortsOpen() QVERIFY(socket.state() == QAbstractSocket::ConnectedState); } - -void tst_NetworkSelfTest::fileLineEndingTest() -{ - QString referenceName = SRCDIR "/rfc3252.txt"; - long long expectedReferenceSize = 25962; - - QString lineEndingType("LF"); - - QFile reference(referenceName); - QVERIFY(reference.open(QIODevice::ReadOnly)); - QByteArray byteLine = reference.readLine(); - if(byteLine.endsWith("\r\n")) - lineEndingType = "CRLF"; - else if(byteLine.endsWith("\r")) - lineEndingType = "CR"; - - QString referenceAsTextData; - QFile referenceAsText(referenceName); - QVERIFY(referenceAsText.open(QIODevice::ReadOnly)); - referenceAsTextData = referenceAsText.readAll(); - - QVERIFY2(expectedReferenceSize == referenceAsTextData.length(), QString("Reference file %1 has %2 as line ending and file size not matching - Git checkout issue !?!").arg(referenceName, lineEndingType).toLocal8Bit()); - QVERIFY2(!lineEndingType.compare("LF"), QString("Reference file %1 has %2 as line ending - Git checkout issue !?!").arg(referenceName, lineEndingType).toLocal8Bit()); -} - static QList ftpChat(const QByteArray &userSuffix = QByteArray()) { QList rv; diff --git a/tests/auto/other/qaccessibility/tst_qaccessibility.cpp b/tests/auto/other/qaccessibility/tst_qaccessibility.cpp index eca5814b8e3..b2a4b1cca24 100644 --- a/tests/auto/other/qaccessibility/tst_qaccessibility.cpp +++ b/tests/auto/other/qaccessibility/tst_qaccessibility.cpp @@ -846,6 +846,17 @@ public Q_SLOTS: } }; +static QAccessibleInterface *relatedInterface(QAccessibleInterface *iface, QAccessible::RelationFlag flag) +{ + typedef QPair RelationPair; + QVector rels = iface->relations(flag); + + for (int i = 1; i < rels.count(); ++i) + delete rels.at(i).first; + + return rels.value(0).first; +} + void tst_QAccessibility::buttonTest() { QWidget window; @@ -879,6 +890,30 @@ void tst_QAccessibility::buttonTest() toggletool.setText("Toggle"); toggletool.setMinimumSize(20,20); + // test Controller/Controlled relations + { + QCheckBox toggler("Toggle me!", &window); + bool ok = connect(&pushButton, SIGNAL(clicked()), &toggler, SLOT(toggle())); + QCOMPARE(ok, true); + QAccessibleInterface *iface = QAccessible::queryAccessibleInterface(&toggler); + QVERIFY(iface); + QCOMPARE(iface->role(), QAccessible::CheckBox); + QAccessibleInterface *buttonIFace = relatedInterface(iface, QAccessible::Controller); + QVERIFY(buttonIFace); + QCOMPARE(buttonIFace->role(), QAccessible::Button); + QCOMPARE(buttonIFace->object(), &pushButton); + delete buttonIFace; + delete iface; + + buttonIFace = QAccessible::queryAccessibleInterface(&pushButton); + QVERIFY(buttonIFace); + QCOMPARE(buttonIFace->role(), QAccessible::Button); + iface = relatedInterface(buttonIFace, QAccessible::Controlled); + QVERIFY(iface); + QCOMPARE(iface->object(), &toggler); + + } + // test push button QAccessibleInterface* interface = QAccessible::queryAccessibleInterface(&pushButton); QAccessibleActionInterface* actionInterface = interface->actionInterface(); @@ -1516,6 +1551,12 @@ void tst_QAccessibility::textEditTest() QCOMPARE(iface->textInterface()->characterRect(0, QAccessible2::RelativeToParent).size(), QSize(fm.width("h"), fm.height())); QCOMPARE(iface->textInterface()->characterRect(5, QAccessible2::RelativeToParent).size(), QSize(fm.width(" "), fm.height())); QCOMPARE(iface->textInterface()->characterRect(6, QAccessible2::RelativeToParent).size(), QSize(fm.width("w"), fm.height())); + + iface->editableTextInterface()->copyText(6, 11); + QCOMPARE(QApplication::clipboard()->text(), QLatin1String("world")); + iface->editableTextInterface()->cutText(12, 16); + QCOMPARE(QApplication::clipboard()->text(), QLatin1String("how ")); + QCOMPARE(iface->textInterface()->text(12, 15), QLatin1String("are")); } QTestAccessibility::clearEvents(); } @@ -1685,7 +1726,7 @@ void tst_QAccessibility::lineEditTest() QCOMPARE(iface->childCount(), 0); QVERIFY(iface->state().sizeable); QVERIFY(iface->state().movable); - QCOMPARE(bool(iface->state().focusable), le->isActiveWindow()); + QVERIFY(iface->state().focusable); QVERIFY(iface->state().selectable); QVERIFY(iface->state().hasPopup); QCOMPARE(bool(iface->state().focused), le->hasFocus()); @@ -1714,7 +1755,7 @@ void tst_QAccessibility::lineEditTest() QApplication::processEvents(); QVERIFY(!(iface->state().sizeable)); QVERIFY(!(iface->state().movable)); - QCOMPARE(bool(iface->state().focusable), le->isActiveWindow()); + QVERIFY(iface->state().focusable); QVERIFY(iface->state().selectable); QVERIFY(iface->state().hasPopup); QCOMPARE(bool(iface->state().focused), le->hasFocus()); diff --git a/tests/auto/sql/models/qsqltablemodel/tst_qsqltablemodel.cpp b/tests/auto/sql/models/qsqltablemodel/tst_qsqltablemodel.cpp index c8b5513a298..270de8292b1 100644 --- a/tests/auto/sql/models/qsqltablemodel/tst_qsqltablemodel.cpp +++ b/tests/auto/sql/models/qsqltablemodel/tst_qsqltablemodel.cpp @@ -412,10 +412,10 @@ void tst_QSqlTableModel::setRecord() model.submit(); else { // dataChanged() is not emitted when submitAll() is called - QCOMPARE(spy.count(), 2); + QCOMPARE(spy.count(), 1); QCOMPARE(spy.at(0).count(), 2); - QCOMPARE(qvariant_cast(spy.at(0).at(0)), model.index(i, 1)); - QCOMPARE(qvariant_cast(spy.at(0).at(1)), model.index(i, 1)); + QCOMPARE(qvariant_cast(spy.at(0).at(0)), model.index(i, 0)); + QCOMPARE(qvariant_cast(spy.at(0).at(1)), model.index(i, rec.count() - 1)); } } @@ -699,14 +699,13 @@ void tst_QSqlTableModel::removeRows() QVERIFY(!model.removeRows(-1,1)); // negative start QVERIFY(!model.removeRows(-1, 0)); // negative start, and zero count QVERIFY(!model.removeRows(1, 0)); // zero count - QVERIFY(!model.removeRows(5, 1)); // past end (causes a beforeDelete to be emitted) + QVERIFY(!model.removeRows(5, 1)); // past end (DOESN'T causes a beforeDelete to be emitted) QVERIFY(!model.removeRows(1, 0, model.index(2, 0))); // can't pass a valid modelindex QVERIFY_SQL(model, removeRows(0, 2)); - QCOMPARE(beforeDeleteSpy.count(), 3); - QVERIFY(beforeDeleteSpy.at(0).at(0).toInt() == 5); - QVERIFY(beforeDeleteSpy.at(1).at(0).toInt() == 0); - QVERIFY(beforeDeleteSpy.at(2).at(0).toInt() == 1); + QCOMPARE(beforeDeleteSpy.count(), 2); + QVERIFY(beforeDeleteSpy.at(0).at(0).toInt() == 0); + QVERIFY(beforeDeleteSpy.at(1).at(0).toInt() == 1); QCOMPARE(model.rowCount(), 1); QCOMPARE(model.data(model.index(0, 1)).toString(), QString("vohi")); model.clear(); @@ -1200,9 +1199,13 @@ void tst_QSqlTableModel::insertRecordsInLoop() model.submitAll(); // submitAll() calls select() which clears and repopulates the table int firstRowIndex = 0, lastRowIndex = 12; - QCOMPARE(spyRowsRemoved.count(), 1); - QCOMPARE(spyRowsRemoved.at(0).at(1).toInt(), firstRowIndex); - QCOMPARE(spyRowsRemoved.at(0).at(2).toInt(), lastRowIndex); + QCOMPARE(spyRowsRemoved.count(), 11); + // QSqlTableModel emits 10 signals for its 10 inserted rows + QCOMPARE(spyRowsRemoved.at(0).at(1).toInt(), lastRowIndex); + QCOMPARE(spyRowsRemoved.at(9).at(1).toInt(), firstRowIndex + 3); + // QSqlQueryModel emits 1 signal for its 3 rows + QCOMPARE(spyRowsRemoved.at(10).at(1).toInt(), firstRowIndex); + QCOMPARE(spyRowsRemoved.at(10).at(2).toInt(), firstRowIndex + 2); QCOMPARE(spyRowsInserted.at(10).at(1).toInt(), firstRowIndex); QCOMPARE(spyRowsInserted.at(10).at(2).toInt(), lastRowIndex); diff --git a/tests/auto/testlib/selftests/badxml/tst_badxml.cpp b/tests/auto/testlib/selftests/badxml/tst_badxml.cpp index 1c9a0d9493a..1a143e52439 100644 --- a/tests/auto/testlib/selftests/badxml/tst_badxml.cpp +++ b/tests/auto/testlib/selftests/badxml/tst_badxml.cpp @@ -106,15 +106,18 @@ void tst_BadXml::badDataTag() const QBENCHMARK { } - QFAIL("a failure"); + QFETCH(bool, shouldFail); + if (shouldFail) + QFAIL("a failure"); } void tst_BadXml::badDataTag_data() const { - QTest::addColumn("dummy"); + QTest::addColumn("shouldFail"); foreach (char const* str, badStrings()) { - QTest::newRow(str) << 0; + QTest::newRow(qPrintable(QString("fail %1").arg(str))) << true; + QTest::newRow(qPrintable(QString("pass %1").arg(str))) << false; } } diff --git a/tests/auto/testlib/selftests/benchlibcounting/benchlibcounting.pro b/tests/auto/testlib/selftests/benchlibcounting/benchlibcounting.pro new file mode 100644 index 00000000000..b495995eac3 --- /dev/null +++ b/tests/auto/testlib/selftests/benchlibcounting/benchlibcounting.pro @@ -0,0 +1,7 @@ +SOURCES += tst_benchlibcounting.cpp +QT = core testlib + +mac:CONFIG -= app_bundle +CONFIG -= debug_and_release_target + +TARGET = benchlibcounting diff --git a/tests/auto/testlib/selftests/benchlibcounting/tst_benchlibcounting.cpp b/tests/auto/testlib/selftests/benchlibcounting/tst_benchlibcounting.cpp new file mode 100644 index 00000000000..847bc1a81d8 --- /dev/null +++ b/tests/auto/testlib/selftests/benchlibcounting/tst_benchlibcounting.cpp @@ -0,0 +1,76 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include +#include + +class tst_BenchlibCounting : public QObject +{ + Q_OBJECT + +private slots: + void passingBenchmark(); + void skippingBenchmark(); + void failingBenchmark(); +}; + +void tst_BenchlibCounting::passingBenchmark() +{ + QBENCHMARK { + } +} + +void tst_BenchlibCounting::skippingBenchmark() +{ + QBENCHMARK { + QSKIP("This is a skipping benchmark"); + } +} + +void tst_BenchlibCounting::failingBenchmark() +{ + QBENCHMARK { + QFAIL("This is a failing benchmark"); + }; +} + +QTEST_MAIN(tst_BenchlibCounting) +#include "tst_benchlibcounting.moc" diff --git a/tests/auto/testlib/selftests/counting/tst_counting.cpp b/tests/auto/testlib/selftests/counting/tst_counting.cpp index 6758b533bb7..fa61fce173a 100644 --- a/tests/auto/testlib/selftests/counting/tst_counting.cpp +++ b/tests/auto/testlib/selftests/counting/tst_counting.cpp @@ -47,6 +47,8 @@ class tst_Counting : public QObject Q_OBJECT private slots: + // The following test functions exercise each possible combination of test + // results for two data rows. void testPassPass_data(); void testPassPass(); @@ -74,6 +76,19 @@ private slots: void testFailFail_data(); void testFailFail(); + // The following test functions test skips and fails in the special + // init() and cleanup() slots. + void init(); + void cleanup(); + void testFailInInit_data(); + void testFailInInit(); + void testFailInCleanup_data(); + void testFailInCleanup(); + void testSkipInInit_data(); + void testSkipInInit(); + void testSkipInCleanup_data(); + void testSkipInCleanup(); + private: void helper(); }; @@ -212,5 +227,77 @@ void tst_Counting::testFailFail() helper(); } +void tst_Counting::init() +{ + if (strcmp(QTest::currentTestFunction(), "testFailInInit") == 0 && strcmp(QTest::currentDataTag(), "fail") == 0) + QFAIL("Fail in init()"); + else if (strcmp(QTest::currentTestFunction(), "testSkipInInit") == 0 && strcmp(QTest::currentDataTag(), "skip") == 0) + QSKIP("Skip in init()"); +} + +void tst_Counting::cleanup() +{ + if (strcmp(QTest::currentTestFunction(), "testFailInCleanup") == 0 && strcmp(QTest::currentDataTag(), "fail") == 0) + QFAIL("Fail in cleanup()"); + else if (strcmp(QTest::currentTestFunction(), "testSkipInCleanup") == 0 && strcmp(QTest::currentDataTag(), "skip") == 0) + QSKIP("Skip in cleanup()"); +} + +void tst_Counting::testFailInInit_data() +{ + QTest::addColumn("dummy"); + QTest::newRow("before") << true; + QTest::newRow("fail") << true; + QTest::newRow("after") << true; +} + +void tst_Counting::testFailInInit() +{ + if (strcmp(QTest::currentDataTag(), "fail") == 0) + QFAIL("This test function should have been skipped due to QFAIL in init()"); +} + +void tst_Counting::testFailInCleanup_data() +{ + QTest::addColumn("dummy"); + QTest::newRow("before") << true; + QTest::newRow("fail") << true; + QTest::newRow("after") << true; +} + +void tst_Counting::testFailInCleanup() +{ + if (strcmp(QTest::currentDataTag(), "fail") == 0) + qDebug() << "This test function should execute and then QFAIL in cleanup()"; +} + +void tst_Counting::testSkipInInit_data() +{ + QTest::addColumn("dummy"); + QTest::newRow("before") << true; + QTest::newRow("skip") << true; + QTest::newRow("after") << true; +} + +void tst_Counting::testSkipInInit() +{ + if (strcmp(QTest::currentDataTag(), "skip") == 0) + QFAIL("This test function should have been skipped due to QSKIP in init()"); +} + +void tst_Counting::testSkipInCleanup_data() +{ + QTest::addColumn("dummy"); + QTest::newRow("before") << true; + QTest::newRow("skip") << true; + QTest::newRow("after") << true; +} + +void tst_Counting::testSkipInCleanup() +{ + if (strcmp(QTest::currentDataTag(), "skip") == 0) + qDebug() << "This test function should execute and then QSKIP in cleanup()"; +} + QTEST_MAIN(tst_Counting) #include "tst_counting.moc" diff --git a/tests/auto/testlib/selftests/crashes/tst_crashes.cpp b/tests/auto/testlib/selftests/crashes/tst_crashes.cpp index b6298f5e63a..c2174e90e84 100644 --- a/tests/auto/testlib/selftests/crashes/tst_crashes.cpp +++ b/tests/auto/testlib/selftests/crashes/tst_crashes.cpp @@ -61,8 +61,14 @@ void tst_Crashes::crash() //we avoid the error dialogbox to appear on windows SetErrorMode( SEM_NOGPFAULTERRORBOX | SEM_FAILCRITICALERRORS | SEM_NOOPENFILEERRORBOX); #endif + /* + We deliberately dereference an invalid but non-zero address; + it should be non-zero because a few platforms may have special crash behavior + when dereferencing exactly 0 (e.g. some macs have been observed to generate SIGILL + rather than SIGSEGV). + */ int *i = 0; - *i = 1; + i[1] = 1; } QTEST_MAIN(tst_Crashes) diff --git a/tests/auto/testlib/selftests/datetime/tst_datetime.cpp b/tests/auto/testlib/selftests/datetime/tst_datetime.cpp index 60ebbfc104a..c98f119f75a 100644 --- a/tests/auto/testlib/selftests/datetime/tst_datetime.cpp +++ b/tests/auto/testlib/selftests/datetime/tst_datetime.cpp @@ -78,10 +78,10 @@ void tst_DateTime::qurl_data() const QTest::addColumn("operandA"); QTest::addColumn("operandB"); - QTest::newRow("") << QUrl() << QUrl(); - QTest::newRow("") << QUrl(QLatin1String("http://example.com")) << QUrl(); - QTest::newRow("") << QUrl() << QUrl(QLatin1String("http://example.com")); - QTest::newRow("") << QUrl(QLatin1String("http://example.com")) << QUrl(QLatin1String("http://example.com")); + QTest::newRow("empty urls") << QUrl() << QUrl(); + QTest::newRow("empty rhs") << QUrl(QLatin1String("http://example.com")) << QUrl(); + QTest::newRow("empty lhs") << QUrl() << QUrl(QLatin1String("http://example.com")); + QTest::newRow("same urls") << QUrl(QLatin1String("http://example.com")) << QUrl(QLatin1String("http://example.com")); } QTEST_MAIN(tst_DateTime) diff --git a/tests/auto/testlib/selftests/expected_badxml.lightxml b/tests/auto/testlib/selftests/expected_badxml.lightxml index 43446c31699..08ba497efa9 100644 --- a/tests/auto/testlib/selftests/expected_badxml.lightxml +++ b/tests/auto/testlib/selftests/expected_badxml.lightxml @@ -7,60 +7,99 @@ - text ]]]> more text]]> + text ]]]> more text]]> - - text ]]]> more text]]> + + text ]]]> more text]]> - - + text ]]]> more text]]> - - - + + text ]]]> more text]]> - + - open < tags < text]]> + - - open < tags < text]]> + + - - " mixed ]]]> up > " in < the ]]]> hopes < of triggering "< ]]]> bugs]]> + - - " mixed ]]]> up > " in < the ]]]> hopes < of triggering "< ]]]> bugs]]> + + + + + + open < tags < text]]> + + + + open < tags < text]]> - + + open < tags < text]]> + + + + open < tags < text]]> + + + + " mixed ]]]> up > " in < the ]]]> hopes < of triggering "< ]]]> bugs]]> + + + + " mixed ]]]> up > " in < the ]]]> hopes < of triggering "< ]]]> bugs]]> + + + + " mixed ]]]> up > " in < the ]]]> hopes < of triggering "< ]]]> bugs]]> + + + + " mixed ]]]> up > " in < the ]]]> hopes < of triggering "< ]]]> bugs]]> + + text ]]]> more text]]> + + + + + + open < tags < text]]> + + + " mixed ]]]> up > " in < the ]]]> hopes < of triggering "< ]]]> bugs]]> - + + + diff --git a/tests/auto/testlib/selftests/expected_badxml.txt b/tests/auto/testlib/selftests/expected_badxml.txt index 0db292e2697..68d333ec303 100644 --- a/tests/auto/testlib/selftests/expected_badxml.txt +++ b/tests/auto/testlib/selftests/expected_badxml.txt @@ -1,32 +1,43 @@ ********* Start testing of tst_BadXml ********* Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ PASS : tst_BadXml::initTestCase() -QDEBUG : tst_BadXml::badDataTag(end cdata ]]> text ]]> more text) a message -FAIL! : tst_BadXml::badDataTag(end cdata ]]> text ]]> more text) a failure - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/badxml/tst_badxml.cpp(109)] -RESULT : tst_BadXml::badDataTag():"end cdata ]]> text ]]> more text": +QDEBUG : tst_BadXml::badDataTag(fail end cdata ]]> text ]]> more text) a message +FAIL! : tst_BadXml::badDataTag(fail end cdata ]]> text ]]> more text) a failure + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/badxml/tst_badxml.cpp(111)] +QDEBUG : tst_BadXml::badDataTag(pass end cdata ]]> text ]]> more text) a message +PASS : tst_BadXml::badDataTag(pass end cdata ]]> text ]]> more text) +RESULT : tst_BadXml::badDataTag():"pass end cdata ]]> text ]]> more text": 0 events per iteration (total: 0, iterations: 1) -QDEBUG : tst_BadXml::badDataTag(quotes " text" more text) a message -FAIL! : tst_BadXml::badDataTag(quotes " text" more text) a failure - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/badxml/tst_badxml.cpp(109)] -RESULT : tst_BadXml::badDataTag():"quotes " text" more text": +QDEBUG : tst_BadXml::badDataTag(fail quotes " text" more text) a message +FAIL! : tst_BadXml::badDataTag(fail quotes " text" more text) a failure + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/badxml/tst_badxml.cpp(111)] +QDEBUG : tst_BadXml::badDataTag(pass quotes " text" more text) a message +PASS : tst_BadXml::badDataTag(pass quotes " text" more text) +RESULT : tst_BadXml::badDataTag():"pass quotes " text" more text": 0 events per iteration (total: 0, iterations: 1) -QDEBUG : tst_BadXml::badDataTag(xml close > open < tags < text) a message -FAIL! : tst_BadXml::badDataTag(xml close > open < tags < text) a failure - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/badxml/tst_badxml.cpp(109)] -RESULT : tst_BadXml::badDataTag():"xml close > open < tags < text": +QDEBUG : tst_BadXml::badDataTag(fail xml close > open < tags < text) a message +FAIL! : tst_BadXml::badDataTag(fail xml close > open < tags < text) a failure + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/badxml/tst_badxml.cpp(111)] +QDEBUG : tst_BadXml::badDataTag(pass xml close > open < tags < text) a message +PASS : tst_BadXml::badDataTag(pass xml close > open < tags < text) +RESULT : tst_BadXml::badDataTag():"pass xml close > open < tags < text": 0 events per iteration (total: 0, iterations: 1) -QDEBUG : tst_BadXml::badDataTag(all > " mixed ]]> up > " in < the ]]> hopes < of triggering "< ]]> bugs) a message -FAIL! : tst_BadXml::badDataTag(all > " mixed ]]> up > " in < the ]]> hopes < of triggering "< ]]> bugs) a failure - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/badxml/tst_badxml.cpp(109)] -RESULT : tst_BadXml::badDataTag():"all > " mixed ]]> up > " in < the ]]> hopes < of triggering "< ]]> bugs": +QDEBUG : tst_BadXml::badDataTag(fail all > " mixed ]]> up > " in < the ]]> hopes < of triggering "< ]]> bugs) a message +FAIL! : tst_BadXml::badDataTag(fail all > " mixed ]]> up > " in < the ]]> hopes < of triggering "< ]]> bugs) a failure + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/badxml/tst_badxml.cpp(111)] +QDEBUG : tst_BadXml::badDataTag(pass all > " mixed ]]> up > " in < the ]]> hopes < of triggering "< ]]> bugs) a message +PASS : tst_BadXml::badDataTag(pass all > " mixed ]]> up > " in < the ]]> hopes < of triggering "< ]]> bugs) +RESULT : tst_BadXml::badDataTag():"pass all > " mixed ]]> up > " in < the ]]> hopes < of triggering "< ]]> bugs": 0 events per iteration (total: 0, iterations: 1) QDEBUG : tst_BadXml::badMessage(string 0) end cdata ]]> text ]]> more text +PASS : tst_BadXml::badMessage(string 0) QDEBUG : tst_BadXml::badMessage(string 1) quotes " text" more text +PASS : tst_BadXml::badMessage(string 1) QDEBUG : tst_BadXml::badMessage(string 2) xml close > open < tags < text +PASS : tst_BadXml::badMessage(string 2) QDEBUG : tst_BadXml::badMessage(string 3) all > " mixed ]]> up > " in < the ]]> hopes < of triggering "< ]]> bugs -PASS : tst_BadXml::badMessage() +PASS : tst_BadXml::badMessage(string 3) FAIL! : tst_BadXml::failWithNoFile() failure message PASS : tst_BadXml::cleanupTestCase() -Totals: 3 passed, 5 failed, 0 skipped +Totals: 10 passed, 5 failed, 0 skipped ********* Finished testing of tst_BadXml ********* diff --git a/tests/auto/testlib/selftests/expected_badxml.xml b/tests/auto/testlib/selftests/expected_badxml.xml index fbb584d5e56..849bc07bfc0 100644 --- a/tests/auto/testlib/selftests/expected_badxml.xml +++ b/tests/auto/testlib/selftests/expected_badxml.xml @@ -9,60 +9,99 @@ - text ]]]> more text]]> + text ]]]> more text]]> - - text ]]]> more text]]> + + text ]]]> more text]]> - - + text ]]]> more text]]> - - - + + text ]]]> more text]]> - + - open < tags < text]]> + - - open < tags < text]]> + + - - " mixed ]]]> up > " in < the ]]]> hopes < of triggering "< ]]]> bugs]]> + - - " mixed ]]]> up > " in < the ]]]> hopes < of triggering "< ]]]> bugs]]> + + + + + + open < tags < text]]> + + + + open < tags < text]]> - + + open < tags < text]]> + + + + open < tags < text]]> + + + + " mixed ]]]> up > " in < the ]]]> hopes < of triggering "< ]]]> bugs]]> + + + + " mixed ]]]> up > " in < the ]]]> hopes < of triggering "< ]]]> bugs]]> + + + + " mixed ]]]> up > " in < the ]]]> hopes < of triggering "< ]]]> bugs]]> + + + + " mixed ]]]> up > " in < the ]]]> hopes < of triggering "< ]]]> bugs]]> + + text ]]]> more text]]> + + + + + + open < tags < text]]> + + + " mixed ]]]> up > " in < the ]]]> hopes < of triggering "< ]]]> bugs]]> - + + + diff --git a/tests/auto/testlib/selftests/expected_badxml.xunitxml b/tests/auto/testlib/selftests/expected_badxml.xunitxml index 724aed59e74..939e887a881 100644 --- a/tests/auto/testlib/selftests/expected_badxml.xunitxml +++ b/tests/auto/testlib/selftests/expected_badxml.xunitxml @@ -1,19 +1,23 @@ - + - - - - - - - - + + + + + + + + + + + + @@ -30,6 +34,10 @@ + + + + text ]]]> more text]]> open < tags < text]]> diff --git a/tests/auto/testlib/selftests/expected_benchlibcallgrind.txt b/tests/auto/testlib/selftests/expected_benchlibcallgrind.txt index 2498c811385..13e9a39affa 100644 --- a/tests/auto/testlib/selftests/expected_benchlibcallgrind.txt +++ b/tests/auto/testlib/selftests/expected_benchlibcallgrind.txt @@ -1,9 +1,9 @@ ********* Start testing of tst_BenchlibCallgrind ********* Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ PASS : tst_BenchlibCallgrind::initTestCase() -RESULT : tst_BenchlibCallgrind::twoHundredMillionInstructions(): - 200,000,000 instruction reads per iteration (total: 200000000, iterations: 1) PASS : tst_BenchlibCallgrind::twoHundredMillionInstructions() +RESULT : tst_BenchlibCallgrind::twoHundredMillionInstructions(): + 200,000,158 instruction reads per iteration (total: 200,000,158, iterations: 1) PASS : tst_BenchlibCallgrind::cleanupTestCase() Totals: 3 passed, 0 failed, 0 skipped ********* Finished testing of tst_BenchlibCallgrind ********* diff --git a/tests/auto/testlib/selftests/expected_benchlibcounting.lightxml b/tests/auto/testlib/selftests/expected_benchlibcounting.lightxml new file mode 100644 index 00000000000..5c436a53e0f --- /dev/null +++ b/tests/auto/testlib/selftests/expected_benchlibcounting.lightxml @@ -0,0 +1,24 @@ + + @INSERT_QT_VERSION_HERE@ + @INSERT_QT_VERSION_HERE@ + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/auto/testlib/selftests/expected_benchlibcounting.txt b/tests/auto/testlib/selftests/expected_benchlibcounting.txt new file mode 100644 index 00000000000..e1af40b9e0b --- /dev/null +++ b/tests/auto/testlib/selftests/expected_benchlibcounting.txt @@ -0,0 +1,13 @@ +********* Start testing of tst_BenchlibCounting ********* +Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ +PASS : tst_BenchlibCounting::initTestCase() +PASS : tst_BenchlibCounting::passingBenchmark() +RESULT : tst_BenchlibCounting::passingBenchmark(): + 0 events per iteration (total: 0, iterations: 1) +SKIP : tst_BenchlibCounting::skippingBenchmark() This is a skipping benchmark + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/benchlibcounting/tst_benchlibcounting.cpp(64)] +FAIL! : tst_BenchlibCounting::failingBenchmark() This is a failing benchmark + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/benchlibcounting/tst_benchlibcounting.cpp(71)] +PASS : tst_BenchlibCounting::cleanupTestCase() +Totals: 3 passed, 1 failed, 1 skipped +********* Finished testing of tst_BenchlibCounting ********* diff --git a/tests/auto/testlib/selftests/expected_benchlibcounting.xml b/tests/auto/testlib/selftests/expected_benchlibcounting.xml new file mode 100644 index 00000000000..5bf71fbf8eb --- /dev/null +++ b/tests/auto/testlib/selftests/expected_benchlibcounting.xml @@ -0,0 +1,27 @@ + + + + @INSERT_QT_VERSION_HERE@ + @INSERT_QT_VERSION_HERE@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/auto/testlib/selftests/expected_benchlibcounting.xunitxml b/tests/auto/testlib/selftests/expected_benchlibcounting.xunitxml new file mode 100644 index 00000000000..83e429aa3ab --- /dev/null +++ b/tests/auto/testlib/selftests/expected_benchlibcounting.xunitxml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/tests/auto/testlib/selftests/expected_benchlibeventcounter.lightxml b/tests/auto/testlib/selftests/expected_benchlibeventcounter.lightxml index 3bede6de838..3cb59d209b8 100644 --- a/tests/auto/testlib/selftests/expected_benchlibeventcounter.lightxml +++ b/tests/auto/testlib/selftests/expected_benchlibeventcounter.lightxml @@ -6,14 +6,34 @@ + + + + + + + + + + + + + + + + + + + + + - diff --git a/tests/auto/testlib/selftests/expected_benchlibeventcounter.txt b/tests/auto/testlib/selftests/expected_benchlibeventcounter.txt index e3dc6c04115..7be4bcccc49 100644 --- a/tests/auto/testlib/selftests/expected_benchlibeventcounter.txt +++ b/tests/auto/testlib/selftests/expected_benchlibeventcounter.txt @@ -1,21 +1,27 @@ ********* Start testing of tst_BenchlibEventCounter ********* Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ PASS : tst_BenchlibEventCounter::initTestCase() +PASS : tst_BenchlibEventCounter::events(0) RESULT : tst_BenchlibEventCounter::events():"0": 0 events per iteration (total: 0, iterations: 1) +PASS : tst_BenchlibEventCounter::events(1) RESULT : tst_BenchlibEventCounter::events():"1": 1 events per iteration (total: 1, iterations: 1) +PASS : tst_BenchlibEventCounter::events(10) RESULT : tst_BenchlibEventCounter::events():"10": 10 events per iteration (total: 10, iterations: 1) +PASS : tst_BenchlibEventCounter::events(100) RESULT : tst_BenchlibEventCounter::events():"100": 100 events per iteration (total: 100, iterations: 1) +PASS : tst_BenchlibEventCounter::events(500) RESULT : tst_BenchlibEventCounter::events():"500": 500 events per iteration (total: 500, iterations: 1) +PASS : tst_BenchlibEventCounter::events(5000) RESULT : tst_BenchlibEventCounter::events():"5000": - 5,000 events per iteration (total: 5000, iterations: 1) + 5,000 events per iteration (total: 5,000, iterations: 1) +PASS : tst_BenchlibEventCounter::events(100000) RESULT : tst_BenchlibEventCounter::events():"100000": - 100,000 events per iteration (total: 100000, iterations: 1) -PASS : tst_BenchlibEventCounter::events() + 100,000 events per iteration (total: 100,000, iterations: 1) PASS : tst_BenchlibEventCounter::cleanupTestCase() -Totals: 3 passed, 0 failed, 0 skipped +Totals: 9 passed, 0 failed, 0 skipped ********* Finished testing of tst_BenchlibEventCounter ********* diff --git a/tests/auto/testlib/selftests/expected_benchlibeventcounter.xml b/tests/auto/testlib/selftests/expected_benchlibeventcounter.xml index 646cf22b804..47b497881af 100644 --- a/tests/auto/testlib/selftests/expected_benchlibeventcounter.xml +++ b/tests/auto/testlib/selftests/expected_benchlibeventcounter.xml @@ -8,14 +8,34 @@ + + + + + + + + + + + + + + + + + + + + + - diff --git a/tests/auto/testlib/selftests/expected_benchliboptions.txt b/tests/auto/testlib/selftests/expected_benchliboptions.txt index 3e75d209d0e..ef9f0c5ad05 100644 --- a/tests/auto/testlib/selftests/expected_benchliboptions.txt +++ b/tests/auto/testlib/selftests/expected_benchliboptions.txt @@ -1,27 +1,27 @@ ********* Start testing of tst_BenchlibOptions ********* Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ PASS : tst_BenchlibOptions::initTestCase() +PASS : tst_BenchlibOptions::threeEvents() RESULT : tst_BenchlibOptions::threeEvents(): 3 events per iteration (total: 3, iterations: 1) -PASS : tst_BenchlibOptions::threeEvents() PASS : tst_BenchlibOptions::cleanupTestCase() Totals: 3 passed, 0 failed, 0 skipped ********* Finished testing of tst_BenchlibOptions ********* ********* Start testing of tst_BenchlibFifteenIterations ********* Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ PASS : tst_BenchlibFifteenIterations::initTestCase() +PASS : tst_BenchlibFifteenIterations::threeEvents() RESULT : tst_BenchlibFifteenIterations::threeEvents(): 3.0 events per iteration (total: 45, iterations: 15) -PASS : tst_BenchlibFifteenIterations::threeEvents() PASS : tst_BenchlibFifteenIterations::cleanupTestCase() Totals: 3 passed, 0 failed, 0 skipped ********* Finished testing of tst_BenchlibFifteenIterations ********* ********* Start testing of tst_BenchlibOneHundredMinimum ********* Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ PASS : tst_BenchlibOneHundredMinimum::initTestCase() +PASS : tst_BenchlibOneHundredMinimum::threeEvents() RESULT : tst_BenchlibOneHundredMinimum::threeEvents(): 3.00 events per iteration (total: 192, iterations: 64) -PASS : tst_BenchlibOneHundredMinimum::threeEvents() PASS : tst_BenchlibOneHundredMinimum::cleanupTestCase() Totals: 3 passed, 0 failed, 0 skipped ********* Finished testing of tst_BenchlibOneHundredMinimum ********* diff --git a/tests/auto/testlib/selftests/expected_benchliboptions.xml b/tests/auto/testlib/selftests/expected_benchliboptions.xml deleted file mode 100644 index 40bff95f798..00000000000 --- a/tests/auto/testlib/selftests/expected_benchliboptions.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - @INSERT_QT_VERSION_HERE@ - @INSERT_QT_VERSION_HERE@ - - - - - - - - - - - - diff --git a/tests/auto/testlib/selftests/expected_benchliboptions.xunitxml b/tests/auto/testlib/selftests/expected_benchliboptions.xunitxml deleted file mode 100644 index 7317e90470d..00000000000 --- a/tests/auto/testlib/selftests/expected_benchliboptions.xunitxml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/tests/auto/testlib/selftests/expected_cmptest.lightxml b/tests/auto/testlib/selftests/expected_cmptest.lightxml index 17f3e6ec3a9..d1cccd4bd28 100644 --- a/tests/auto/testlib/selftests/expected_cmptest.lightxml +++ b/tests/auto/testlib/selftests/expected_cmptest.lightxml @@ -12,25 +12,28 @@ - + - + + + + - + - + ) @@ -38,31 +41,37 @@ - + + + + + + + - + - + - + - + - + + + + - + - + + + + - + - + + + + - + - + + + + - + - + diff --git a/tests/auto/testlib/selftests/expected_cmptest.txt b/tests/auto/testlib/selftests/expected_cmptest.txt index 36a4995d91d..fce635ae5af 100644 --- a/tests/auto/testlib/selftests/expected_cmptest.txt +++ b/tests/auto/testlib/selftests/expected_cmptest.txt @@ -6,71 +6,78 @@ PASS : tst_Cmptest::compare_pointerfuncs() FAIL! : tst_Cmptest::compare_tostring(int, string) Compared values are not the same Actual (actual): QVariant(int,123) Expected (expected): QVariant(QString,hi) - Loc: [tst_cmptest.cpp(214)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(214)] +PASS : tst_Cmptest::compare_tostring(both invalid) FAIL! : tst_Cmptest::compare_tostring(null hash, invalid) Compared values are not the same Actual (actual): QVariant(QVariantHash) Expected (expected): QVariant() - Loc: [tst_cmptest.cpp(214)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(214)] FAIL! : tst_Cmptest::compare_tostring(string, null user type) Compared values are not the same Actual (actual): QVariant(QString,A simple string) Expected (expected): QVariant(PhonyClass) - Loc: [tst_cmptest.cpp(214)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(214)] FAIL! : tst_Cmptest::compare_tostring(both non-null user type) Compared values are not the same Actual (actual): QVariant(PhonyClass,) Expected (expected): QVariant(PhonyClass,) - Loc: [tst_cmptest.cpp(214)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(214)] +PASS : tst_Cmptest::compareQStringLists(empty lists) +PASS : tst_Cmptest::compareQStringLists(equal lists) FAIL! : tst_Cmptest::compareQStringLists(last item different) Compared QStringLists differ at index 2. Actual (opA) : 'string3' Expected (opB) : 'DIFFERS' - Loc: [tst_cmptest.cpp(308)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(308)] FAIL! : tst_Cmptest::compareQStringLists(second-last item different) Compared QStringLists differ at index 2. Actual (opA) : 'string3' Expected (opB) : 'DIFFERS' - Loc: [tst_cmptest.cpp(308)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(308)] FAIL! : tst_Cmptest::compareQStringLists(prefix) Compared QStringLists have different sizes. Actual (opA) size : '2' Expected (opB) size: '1' - Loc: [tst_cmptest.cpp(308)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(308)] FAIL! : tst_Cmptest::compareQStringLists(short list second) Compared QStringLists have different sizes. Actual (opA) size : '12' Expected (opB) size: '1' - Loc: [tst_cmptest.cpp(308)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(308)] FAIL! : tst_Cmptest::compareQStringLists(short list first) Compared QStringLists have different sizes. Actual (opA) size : '1' Expected (opB) size: '12' - Loc: [tst_cmptest.cpp(308)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(308)] +PASS : tst_Cmptest::compareQPixmaps(both null) FAIL! : tst_Cmptest::compareQPixmaps(one null) Compared QPixmaps differ. Actual (opA).isNull() : 1 Expected (opB).isNull(): 0 - Loc: [tst_cmptest.cpp(333)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(333)] FAIL! : tst_Cmptest::compareQPixmaps(other null) Compared QPixmaps differ. Actual (opA).isNull() : 0 Expected (opB).isNull(): 1 - Loc: [tst_cmptest.cpp(333)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(333)] +PASS : tst_Cmptest::compareQPixmaps(equal) FAIL! : tst_Cmptest::compareQPixmaps(different size) Compared QPixmaps differ in size. Actual (opA) : 11x20 Expected (opB): 20x20 - Loc: [tst_cmptest.cpp(333)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(333)] FAIL! : tst_Cmptest::compareQPixmaps(different pixels) Compared values are not the same - Loc: [tst_cmptest.cpp(333)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(333)] +PASS : tst_Cmptest::compareQImages(both null) FAIL! : tst_Cmptest::compareQImages(one null) Compared QImages differ. Actual (opA).isNull() : 1 Expected (opB).isNull(): 0 - Loc: [tst_cmptest.cpp(360)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(360)] FAIL! : tst_Cmptest::compareQImages(other null) Compared QImages differ. Actual (opA).isNull() : 0 Expected (opB).isNull(): 1 - Loc: [tst_cmptest.cpp(360)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(360)] +PASS : tst_Cmptest::compareQImages(equal) FAIL! : tst_Cmptest::compareQImages(different size) Compared QImages differ in size. Actual (opA) : 11x20 Expected (opB): 20x20 - Loc: [tst_cmptest.cpp(360)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(360)] FAIL! : tst_Cmptest::compareQImages(different format) Compared QImages differ in format. Actual (opA) : 6 Expected (opB): 3 - Loc: [tst_cmptest.cpp(360)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(360)] FAIL! : tst_Cmptest::compareQImages(different pixels) Compared values are not the same - Loc: [tst_cmptest.cpp(360)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(360)] PASS : tst_Cmptest::cleanupTestCase() -Totals: 4 passed, 18 failed, 0 skipped +Totals: 11 passed, 18 failed, 0 skipped ********* Finished testing of tst_Cmptest ********* diff --git a/tests/auto/testlib/selftests/expected_cmptest.xml b/tests/auto/testlib/selftests/expected_cmptest.xml index aba1ce5edde..90bb3135187 100644 --- a/tests/auto/testlib/selftests/expected_cmptest.xml +++ b/tests/auto/testlib/selftests/expected_cmptest.xml @@ -14,25 +14,28 @@ - + - + + + + - + - + ) @@ -40,31 +43,37 @@ - + + + + + + + - + - + - + - + - + + + + - + - + + + + - + - + + + + - + - + + + + - + - + diff --git a/tests/auto/testlib/selftests/expected_commandlinedata.lightxml b/tests/auto/testlib/selftests/expected_commandlinedata.lightxml index 8de90f05d83..37eb5f5a2b6 100644 --- a/tests/auto/testlib/selftests/expected_commandlinedata.lightxml +++ b/tests/auto/testlib/selftests/expected_commandlinedata.lightxml @@ -10,30 +10,46 @@ + + + + + + + + + + + + - + + + - + + + diff --git a/tests/auto/testlib/selftests/expected_commandlinedata.txt b/tests/auto/testlib/selftests/expected_commandlinedata.txt index c1b97e2a301..10e4916b540 100644 --- a/tests/auto/testlib/selftests/expected_commandlinedata.txt +++ b/tests/auto/testlib/selftests/expected_commandlinedata.txt @@ -4,21 +4,25 @@ INFO : tst_DataTable::initTestCase() entering PASS : tst_DataTable::initTestCase() INFO : tst_DataTable::fiveTablePasses() entering INFO : tst_DataTable::fiveTablePasses(fiveTablePasses_data1) QVERIFY(test) - Loc: [tst_commandlinedata.cpp(30)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/commandlinedata/tst_commandlinedata.cpp(65)] +PASS : tst_DataTable::fiveTablePasses(fiveTablePasses_data1) INFO : tst_DataTable::fiveTablePasses(fiveTablePasses_data2) QVERIFY(test) - Loc: [tst_commandlinedata.cpp(30)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/commandlinedata/tst_commandlinedata.cpp(65)] +PASS : tst_DataTable::fiveTablePasses(fiveTablePasses_data2) INFO : tst_DataTable::fiveTablePasses(fiveTablePasses_data3) QVERIFY(test) - Loc: [tst_commandlinedata.cpp(30)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/commandlinedata/tst_commandlinedata.cpp(65)] +PASS : tst_DataTable::fiveTablePasses(fiveTablePasses_data3) INFO : tst_DataTable::fiveTablePasses(fiveTablePasses_data4) QVERIFY(test) - Loc: [tst_commandlinedata.cpp(30)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/commandlinedata/tst_commandlinedata.cpp(65)] +PASS : tst_DataTable::fiveTablePasses(fiveTablePasses_data4) INFO : tst_DataTable::fiveTablePasses(fiveTablePasses_data5) QVERIFY(test) - Loc: [tst_commandlinedata.cpp(30)] -PASS : tst_DataTable::fiveTablePasses() + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/commandlinedata/tst_commandlinedata.cpp(65)] +PASS : tst_DataTable::fiveTablePasses(fiveTablePasses_data5) INFO : tst_DataTable::fiveTablePasses() entering INFO : tst_DataTable::fiveTablePasses(fiveTablePasses_data1) QVERIFY(test) - Loc: [tst_commandlinedata.cpp(30)] -PASS : tst_DataTable::fiveTablePasses() + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/commandlinedata/tst_commandlinedata.cpp(65)] +PASS : tst_DataTable::fiveTablePasses(fiveTablePasses_data1) INFO : tst_DataTable::cleanupTestCase() entering PASS : tst_DataTable::cleanupTestCase() -Totals: 4 passed, 0 failed, 0 skipped +Totals: 8 passed, 0 failed, 0 skipped ********* Finished testing of tst_DataTable ********* diff --git a/tests/auto/testlib/selftests/expected_commandlinedata.xml b/tests/auto/testlib/selftests/expected_commandlinedata.xml index bfaf6233305..2296ae8e744 100644 --- a/tests/auto/testlib/selftests/expected_commandlinedata.xml +++ b/tests/auto/testlib/selftests/expected_commandlinedata.xml @@ -12,30 +12,46 @@ + + + + + + + + + + + + - + + + - + + + diff --git a/tests/auto/testlib/selftests/expected_counting.lightxml b/tests/auto/testlib/selftests/expected_counting.lightxml index f16abef1283..e7b11364176 100644 --- a/tests/auto/testlib/selftests/expected_counting.lightxml +++ b/tests/auto/testlib/selftests/expected_counting.lightxml @@ -6,73 +6,145 @@ - + + + + + + - + + + + - + + + + - + - + + + - + - + - + - + - + + + + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/auto/testlib/selftests/expected_counting.txt b/tests/auto/testlib/selftests/expected_counting.txt index adf80012c72..5c17e3c2577 100644 --- a/tests/auto/testlib/selftests/expected_counting.txt +++ b/tests/auto/testlib/selftests/expected_counting.txt @@ -1,32 +1,54 @@ ********* Start testing of tst_Counting ********* Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ PASS : tst_Counting::initTestCase() -PASS : tst_Counting::testPassPass() +PASS : tst_Counting::testPassPass(row 1) +PASS : tst_Counting::testPassPass(row 2) +PASS : tst_Counting::testPassSkip(row 1) SKIP : tst_Counting::testPassSkip(row 2) Skipping - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(102)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(117)] +PASS : tst_Counting::testPassFail(row 1) FAIL! : tst_Counting::testPassFail(row 2) 'false' returned FALSE. () - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(99)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(114)] SKIP : tst_Counting::testSkipPass(row 1) Skipping - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(102)] -PASS : tst_Counting::testSkipPass() + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(117)] +PASS : tst_Counting::testSkipPass(row 2) SKIP : tst_Counting::testSkipSkip(row 1) Skipping - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(102)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(117)] SKIP : tst_Counting::testSkipSkip(row 2) Skipping - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(102)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(117)] SKIP : tst_Counting::testSkipFail(row 1) Skipping - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(102)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(117)] FAIL! : tst_Counting::testSkipFail(row 2) 'false' returned FALSE. () - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(99)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(114)] FAIL! : tst_Counting::testFailPass(row 1) 'false' returned FALSE. () - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(99)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(114)] +PASS : tst_Counting::testFailPass(row 2) FAIL! : tst_Counting::testFailSkip(row 1) 'false' returned FALSE. () - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(99)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(114)] SKIP : tst_Counting::testFailSkip(row 2) Skipping - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(102)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(117)] FAIL! : tst_Counting::testFailFail(row 1) 'false' returned FALSE. () - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(99)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(114)] FAIL! : tst_Counting::testFailFail(row 2) 'false' returned FALSE. () - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(99)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(114)] +PASS : tst_Counting::testFailInInit(before) +FAIL! : tst_Counting::testFailInInit(fail) Fail in init() + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(233)] +PASS : tst_Counting::testFailInInit(after) +PASS : tst_Counting::testFailInCleanup(before) +QDEBUG : tst_Counting::testFailInCleanup(fail) This test function should execute and then QFAIL in cleanup() +FAIL! : tst_Counting::testFailInCleanup(fail) Fail in cleanup() + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(241)] +PASS : tst_Counting::testFailInCleanup(after) +PASS : tst_Counting::testSkipInInit(before) +SKIP : tst_Counting::testSkipInInit(skip) Skip in init() + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(235)] +PASS : tst_Counting::testSkipInInit(after) +PASS : tst_Counting::testSkipInCleanup(before) +QDEBUG : tst_Counting::testSkipInCleanup(skip) This test function should execute and then QSKIP in cleanup() +SKIP : tst_Counting::testSkipInCleanup(skip) Skip in cleanup() + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(243)] +PASS : tst_Counting::testSkipInCleanup(after) PASS : tst_Counting::cleanupTestCase() -Totals: 4 passed, 6 failed, 6 skipped +Totals: 16 passed, 8 failed, 8 skipped ********* Finished testing of tst_Counting ********* diff --git a/tests/auto/testlib/selftests/expected_counting.xml b/tests/auto/testlib/selftests/expected_counting.xml index f5982d7052a..a97296807dd 100644 --- a/tests/auto/testlib/selftests/expected_counting.xml +++ b/tests/auto/testlib/selftests/expected_counting.xml @@ -8,73 +8,145 @@ - + + + + + + - + + + + - + + + + - + - + + + - + - + - + - + - + + + + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/auto/testlib/selftests/expected_counting.xunitxml b/tests/auto/testlib/selftests/expected_counting.xunitxml index c19a1612cbb..f317ed59230 100644 --- a/tests/auto/testlib/selftests/expected_counting.xunitxml +++ b/tests/auto/testlib/selftests/expected_counting.xunitxml @@ -1,12 +1,12 @@ - + - + @@ -34,6 +34,20 @@ + + + + + + + + + + + + + + @@ -42,5 +56,9 @@ + + + + diff --git a/tests/auto/testlib/selftests/expected_crashes.lightxml b/tests/auto/testlib/selftests/expected_crashes.lightxml deleted file mode 100644 index 76890deb75d..00000000000 --- a/tests/auto/testlib/selftests/expected_crashes.lightxml +++ /dev/null @@ -1,15 +0,0 @@ - - @INSERT_QT_VERSION_HERE@ - @INSERT_QT_VERSION_HERE@ - - - - - - - - - - - - diff --git a/tests/auto/testlib/selftests/expected_crashes.xml b/tests/auto/testlib/selftests/expected_crashes.xml deleted file mode 100644 index be01e633e9e..00000000000 --- a/tests/auto/testlib/selftests/expected_crashes.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - @INSERT_QT_VERSION_HERE@ - @INSERT_QT_VERSION_HERE@ - - - - - - - - - - - - - diff --git a/tests/auto/testlib/selftests/expected_datatable.lightxml b/tests/auto/testlib/selftests/expected_datatable.lightxml index 1741b6f1e3d..83ac0c0b5d0 100644 --- a/tests/auto/testlib/selftests/expected_datatable.lightxml +++ b/tests/auto/testlib/selftests/expected_datatable.lightxml @@ -12,7 +12,21 @@ - + + + + + + + + + + + + + + + @@ -41,18 +55,54 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/auto/testlib/selftests/expected_datatable.txt b/tests/auto/testlib/selftests/expected_datatable.txt index 4031ca22dd0..68c33e6efd8 100644 --- a/tests/auto/testlib/selftests/expected_datatable.txt +++ b/tests/auto/testlib/selftests/expected_datatable.txt @@ -3,33 +3,49 @@ Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE PASS : tst_DataTable::initTestCase() PASS : tst_DataTable::singleTestFunction1() PASS : tst_DataTable::singleTestFunction2() -PASS : tst_DataTable::fiveTablePasses() +PASS : tst_DataTable::fiveTablePasses(fiveTablePasses_data 1) +PASS : tst_DataTable::fiveTablePasses(fiveTablePasses_data 2) +PASS : tst_DataTable::fiveTablePasses(fiveTablePasses_data 3) +PASS : tst_DataTable::fiveTablePasses(fiveTablePasses_data 4) +PASS : tst_DataTable::fiveTablePasses(fiveTablePasses_data 5) FAIL! : tst_DataTable::fiveTableFailures(fiveTableFailures_data 1) 'test' returned FALSE. () - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp(58)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp(91)] FAIL! : tst_DataTable::fiveTableFailures(fiveTableFailures_data 2) 'test' returned FALSE. () - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp(58)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp(91)] FAIL! : tst_DataTable::fiveTableFailures(fiveTableFailures_data 3) 'test' returned FALSE. () - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp(58)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp(91)] FAIL! : tst_DataTable::fiveTableFailures(fiveTableFailures_data 4) 'test' returned FALSE. () - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp(58)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp(91)] FAIL! : tst_DataTable::fiveTableFailures(fiveTableFailures_data 5) 'test' returned FALSE. () - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp(58)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp(91)] FAIL! : tst_DataTable::startsWithFailure(startsWithFailure_data 1) 'test' returned FALSE. () - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp(58)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp(91)] +PASS : tst_DataTable::startsWithFailure(startsWithFailure_data 2) +PASS : tst_DataTable::startsWithFailure(startsWithFailure_data 3) +PASS : tst_DataTable::startsWithFailure(startsWithFailure_data 4) +PASS : tst_DataTable::startsWithFailure(startsWithFailure_data 5) +PASS : tst_DataTable::endsWithFailure(endsWithFailure 1) +PASS : tst_DataTable::endsWithFailure(endsWithFailure 2) +PASS : tst_DataTable::endsWithFailure(endsWithFailure 3) +PASS : tst_DataTable::endsWithFailure(endsWithFailure 4) FAIL! : tst_DataTable::endsWithFailure(endsWithFailure 5) 'test' returned FALSE. () - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp(58)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp(91)] +PASS : tst_DataTable::failureInMiddle(failureInMiddle_data 1) +PASS : tst_DataTable::failureInMiddle(failureInMiddle_data 2) FAIL! : tst_DataTable::failureInMiddle(failureInMiddle_data 3) 'test' returned FALSE. () - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp(58)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp(91)] +PASS : tst_DataTable::failureInMiddle(failureInMiddle_data 4) +PASS : tst_DataTable::failureInMiddle(failureInMiddle_data 5) FAIL! : tst_DataTable::fiveIsolatedFailures(fiveIsolatedFailures_data 1) '!test' returned FALSE. () - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp(140)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp(173)] FAIL! : tst_DataTable::fiveIsolatedFailures(fiveIsolatedFailures_data 2) '!test' returned FALSE. () - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp(140)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp(173)] FAIL! : tst_DataTable::fiveIsolatedFailures(fiveIsolatedFailures_data 3) '!test' returned FALSE. () - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp(140)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp(173)] FAIL! : tst_DataTable::fiveIsolatedFailures(fiveIsolatedFailures_data 4) '!test' returned FALSE. () - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp(140)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp(173)] FAIL! : tst_DataTable::fiveIsolatedFailures(fiveIsolatedFailures_data 5) '!test' returned FALSE. () - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp(140)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp(173)] PASS : tst_DataTable::cleanupTestCase() -Totals: 5 passed, 13 failed, 0 skipped +Totals: 21 passed, 13 failed, 0 skipped ********* Finished testing of tst_DataTable ********* diff --git a/tests/auto/testlib/selftests/expected_datatable.xml b/tests/auto/testlib/selftests/expected_datatable.xml index ce123d836c0..132b34ec4a1 100644 --- a/tests/auto/testlib/selftests/expected_datatable.xml +++ b/tests/auto/testlib/selftests/expected_datatable.xml @@ -14,7 +14,21 @@ - + + + + + + + + + + + + + + + @@ -43,18 +57,54 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/auto/testlib/selftests/expected_datetime.lightxml b/tests/auto/testlib/selftests/expected_datetime.lightxml index 1b7e6015859..17fd48a196d 100644 --- a/tests/auto/testlib/selftests/expected_datetime.lightxml +++ b/tests/auto/testlib/selftests/expected_datetime.lightxml @@ -13,16 +13,24 @@ + + + + + + + + diff --git a/tests/auto/testlib/selftests/expected_datetime.txt b/tests/auto/testlib/selftests/expected_datetime.txt index 70d5c5a70c6..239886ca8ec 100644 --- a/tests/auto/testlib/selftests/expected_datetime.txt +++ b/tests/auto/testlib/selftests/expected_datetime.txt @@ -5,14 +5,16 @@ FAIL! : tst_DateTime::dateTime() Compared values are not the same Actual (local): 2000/05/03 04:03:04.000[local time] Expected (utc): 2000/05/03 04:03:04.000[UTC] Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datetime/tst_datetime.cpp(33)] -FAIL! : tst_DateTime::qurl() Compared values are not the same +PASS : tst_DateTime::qurl(empty urls) +FAIL! : tst_DateTime::qurl(empty rhs) Compared values are not the same Actual (operandA): http://example.com Expected (operandB): Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datetime/tst_datetime.cpp(41)] -FAIL! : tst_DateTime::qurl() Compared values are not the same +FAIL! : tst_DateTime::qurl(empty lhs) Compared values are not the same Actual (operandA): Expected (operandB): http://example.com Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datetime/tst_datetime.cpp(41)] +PASS : tst_DateTime::qurl(same urls) PASS : tst_DateTime::cleanupTestCase() -Totals: 2 passed, 3 failed, 0 skipped +Totals: 4 passed, 3 failed, 0 skipped ********* Finished testing of tst_DateTime ********* diff --git a/tests/auto/testlib/selftests/expected_datetime.xml b/tests/auto/testlib/selftests/expected_datetime.xml index d848e73c824..747ff13730a 100644 --- a/tests/auto/testlib/selftests/expected_datetime.xml +++ b/tests/auto/testlib/selftests/expected_datetime.xml @@ -15,16 +15,24 @@ + + + + + + + + diff --git a/tests/auto/testlib/selftests/expected_datetime.xunitxml b/tests/auto/testlib/selftests/expected_datetime.xunitxml index b30d1c441f7..f25e20674b1 100644 --- a/tests/auto/testlib/selftests/expected_datetime.xunitxml +++ b/tests/auto/testlib/selftests/expected_datetime.xunitxml @@ -11,10 +11,10 @@ Expected (utc): 2000/05/03 04:03:04.000[UTC]" result="fail"/> - - diff --git a/tests/auto/testlib/selftests/expected_expectfail.lightxml b/tests/auto/testlib/selftests/expected_expectfail.lightxml index 02e4dde7d88..34f4f1e70b3 100644 --- a/tests/auto/testlib/selftests/expected_expectfail.lightxml +++ b/tests/auto/testlib/selftests/expected_expectfail.lightxml @@ -9,7 +9,7 @@ - + @@ -21,59 +21,121 @@ - + - + - + - + - - + + + + + + + + - + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + - + + + - + - + + + + - - - - - + + - - + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + diff --git a/tests/auto/testlib/selftests/expected_expectfail.txt b/tests/auto/testlib/selftests/expected_expectfail.txt index 1b98b6b561a..bd4e2172d65 100644 --- a/tests/auto/testlib/selftests/expected_expectfail.txt +++ b/tests/auto/testlib/selftests/expected_expectfail.txt @@ -3,35 +3,53 @@ Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE PASS : tst_ExpectFail::initTestCase() QDEBUG : tst_ExpectFail::xfailAndContinue() begin XFAIL : tst_ExpectFail::xfailAndContinue() This should xfail - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(72)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(78)] QDEBUG : tst_ExpectFail::xfailAndContinue() after PASS : tst_ExpectFail::xfailAndContinue() QDEBUG : tst_ExpectFail::xfailAndAbort() begin XFAIL : tst_ExpectFail::xfailAndAbort() This should xfail - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(80)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(86)] PASS : tst_ExpectFail::xfailAndAbort() FAIL! : tst_ExpectFail::xfailTwice() Already expecting a fail - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(90)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(96)] XFAIL : tst_ExpectFail::xfailWithQString() A string - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(99)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(105)] XFAIL : tst_ExpectFail::xfailWithQString() Bug 5 (The message) - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(104)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(110)] PASS : tst_ExpectFail::xfailWithQString() -XFAIL : tst_ExpectFail::xfailDataDriven(Abort) This test should xfail - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(133)] -XFAIL : tst_ExpectFail::xfailDataDriven(Continue) This test should xfail - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(133)] -PASS : tst_ExpectFail::xfailDataDriven() -PASS : tst_ExpectFail::xfailOnWrongRow() +PASS : tst_ExpectFail::xfailDataDrivenWithQVerify(Pass 1) +PASS : tst_ExpectFail::xfailDataDrivenWithQVerify(Pass 2) +XFAIL : tst_ExpectFail::xfailDataDrivenWithQVerify(Abort) This test should xfail + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(139)] +PASS : tst_ExpectFail::xfailDataDrivenWithQVerify(Abort) +XFAIL : tst_ExpectFail::xfailDataDrivenWithQVerify(Continue) This test should xfail + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(139)] +PASS : tst_ExpectFail::xfailDataDrivenWithQVerify(Continue) +PASS : tst_ExpectFail::xfailDataDrivenWithQCompare(Pass 1) +PASS : tst_ExpectFail::xfailDataDrivenWithQCompare(Pass 2) +XFAIL : tst_ExpectFail::xfailDataDrivenWithQCompare(Abort) This test should xfail + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(173)] +PASS : tst_ExpectFail::xfailDataDrivenWithQCompare(Abort) +XFAIL : tst_ExpectFail::xfailDataDrivenWithQCompare(Continue) This test should xfail + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(173)] +PASS : tst_ExpectFail::xfailDataDrivenWithQCompare(Continue) +PASS : tst_ExpectFail::xfailOnWrongRow(right row) XFAIL : tst_ExpectFail::xfailOnAnyRow(first row) This test should xfail - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(168)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(208)] +PASS : tst_ExpectFail::xfailOnAnyRow(first row) XFAIL : tst_ExpectFail::xfailOnAnyRow(second row) This test should xfail - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(168)] -PASS : tst_ExpectFail::xfailOnAnyRow() -XPASS : tst_ExpectFail::xpass() 'true' returned FALSE. () - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(172)] -XPASS : tst_ExpectFail::xpassDataDriven(XPass) 'true' returned FALSE. () - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(196)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(208)] +PASS : tst_ExpectFail::xfailOnAnyRow(second row) +FAIL! : tst_ExpectFail::xfailWithoutVerify(first row) QEXPECT_FAIL was called without any subsequent verification statements +FAIL! : tst_ExpectFail::xfailWithoutVerify(second row) QEXPECT_FAIL was called without any subsequent verification statements +XPASS : tst_ExpectFail::xpass() 'true' returned TRUE unexpectedly. () + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(228)] +XPASS : tst_ExpectFail::xpassDataDrivenWithQVerify(XPass) 'true' returned TRUE unexpectedly. () + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(250)] +PASS : tst_ExpectFail::xpassDataDrivenWithQVerify(Pass) +XPASS : tst_ExpectFail::xpassDataDrivenWithQCompare(XPass) COMPARE() + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(271)] +PASS : tst_ExpectFail::xpassDataDrivenWithQCompare(Pass) PASS : tst_ExpectFail::cleanupTestCase() -Totals: 8 passed, 3 failed, 0 skipped +Totals: 18 passed, 6 failed, 0 skipped ********* Finished testing of tst_ExpectFail ********* diff --git a/tests/auto/testlib/selftests/expected_expectfail.xml b/tests/auto/testlib/selftests/expected_expectfail.xml index 74b11fb0e5e..ff870a6a68f 100644 --- a/tests/auto/testlib/selftests/expected_expectfail.xml +++ b/tests/auto/testlib/selftests/expected_expectfail.xml @@ -11,7 +11,7 @@ - + @@ -23,59 +23,121 @@ - + - + - + - + - - + + + + + + + + - + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + - + + + - + - + + + + - - - - - + + - - + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + diff --git a/tests/auto/testlib/selftests/expected_expectfail.xunitxml b/tests/auto/testlib/selftests/expected_expectfail.xunitxml index 017e4501c19..6040af41ffa 100644 --- a/tests/auto/testlib/selftests/expected_expectfail.xunitxml +++ b/tests/auto/testlib/selftests/expected_expectfail.xunitxml @@ -1,8 +1,8 @@ - + - - + + @@ -21,7 +21,11 @@ - + + + + + @@ -30,11 +34,18 @@ - - + + + - - + + + + + + + + @@ -48,6 +59,8 @@ + + diff --git a/tests/auto/testlib/selftests/expected_benchliboptions.lightxml b/tests/auto/testlib/selftests/expected_failcleanup.lightxml similarity index 57% rename from tests/auto/testlib/selftests/expected_benchliboptions.lightxml rename to tests/auto/testlib/selftests/expected_failcleanup.lightxml index 63d0218b2c1..83ce7a7b151 100644 --- a/tests/auto/testlib/selftests/expected_benchliboptions.lightxml +++ b/tests/auto/testlib/selftests/expected_failcleanup.lightxml @@ -5,11 +5,11 @@ - - - - - - + + + + + + diff --git a/tests/auto/testlib/selftests/expected_failcleanup.txt b/tests/auto/testlib/selftests/expected_failcleanup.txt new file mode 100644 index 00000000000..08c10b18232 --- /dev/null +++ b/tests/auto/testlib/selftests/expected_failcleanup.txt @@ -0,0 +1,8 @@ +********* Start testing of tst_FailCleanup ********* +Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ +PASS : tst_FailCleanup::initTestCase() +PASS : tst_FailCleanup::aTestFunction() +FAIL! : tst_FailCleanup::cleanupTestCase() 'false' returned FALSE. (Fail inside cleanupTestCase) + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/failcleanup/tst_failcleanup.cpp(59)] +Totals: 2 passed, 1 failed, 0 skipped +********* Finished testing of tst_FailCleanup ********* diff --git a/tests/auto/testlib/selftests/expected_benchlibcallgrind.xml b/tests/auto/testlib/selftests/expected_failcleanup.xml similarity index 56% rename from tests/auto/testlib/selftests/expected_benchlibcallgrind.xml rename to tests/auto/testlib/selftests/expected_failcleanup.xml index b29b9c569ea..5d0d2c57518 100644 --- a/tests/auto/testlib/selftests/expected_benchlibcallgrind.xml +++ b/tests/auto/testlib/selftests/expected_failcleanup.xml @@ -1,5 +1,5 @@ - + @INSERT_QT_VERSION_HERE@ @INSERT_QT_VERSION_HERE@ @@ -7,11 +7,12 @@ - - + - + + + diff --git a/tests/auto/testlib/selftests/expected_benchlibcallgrind.xunitxml b/tests/auto/testlib/selftests/expected_failcleanup.xunitxml similarity index 52% rename from tests/auto/testlib/selftests/expected_benchlibcallgrind.xunitxml rename to tests/auto/testlib/selftests/expected_failcleanup.xunitxml index cc58f7fdd45..6e35566be88 100644 --- a/tests/auto/testlib/selftests/expected_benchlibcallgrind.xunitxml +++ b/tests/auto/testlib/selftests/expected_failcleanup.xunitxml @@ -1,12 +1,13 @@ - + - + + + - diff --git a/tests/auto/testlib/selftests/expected_float.lightxml b/tests/auto/testlib/selftests/expected_float.lightxml deleted file mode 100644 index a34618cf02d..00000000000 --- a/tests/auto/testlib/selftests/expected_float.lightxml +++ /dev/null @@ -1,44 +0,0 @@ - - @INSERT_QT_VERSION_HERE@ - @INSERT_QT_VERSION_HERE@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tests/auto/testlib/selftests/expected_float.txt b/tests/auto/testlib/selftests/expected_float.txt index acd0aaa54ae..6ebbeffde50 100644 --- a/tests/auto/testlib/selftests/expected_float.txt +++ b/tests/auto/testlib/selftests/expected_float.txt @@ -1,26 +1,32 @@ ********* Start testing of tst_float ********* Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ PASS : tst_float::initTestCase() -FAIL! : tst_float::floatComparisons(should FAIL) Compared floats are not the same (fuzzy compare) +PASS : tst_float::floatComparisons(should SUCCEED 1) +FAIL! : tst_float::floatComparisons(should FAIL 1) Compared floats are not the same (fuzzy compare) Actual (operandLeft): 1 Expected (operandRight): 3 Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(61)] -FAIL! : tst_float::floatComparisons(should FAIL) Compared floats are not the same (fuzzy compare) +FAIL! : tst_float::floatComparisons(should FAIL 2) Compared floats are not the same (fuzzy compare) Actual (operandLeft): 1e-07 Expected (operandRight): 3e-07 Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(61)] +FAIL! : tst_float::floatComparisons(should FAIL 3) Compared floats are not the same (fuzzy compare) + Actual (operandLeft): 99998 + Expected (operandRight): 99999 + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(61)] +PASS : tst_float::floatComparisons(should SUCCEED 2) FAIL! : tst_float::compareFloatTests(1e0) Compared floats are not the same (fuzzy compare) Actual (t1): 1 Expected (t3): 3 - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(100)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(104)] FAIL! : tst_float::compareFloatTests(1e-7) Compared floats are not the same (fuzzy compare) Actual (t1): 1e-07 Expected (t3): 3e-07 - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(100)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(104)] FAIL! : tst_float::compareFloatTests(1e+7) Compared floats are not the same (fuzzy compare) Actual (t1): 1e+07 Expected (t3): 3e+07 - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(100)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(104)] PASS : tst_float::cleanupTestCase() -Totals: 2 passed, 5 failed, 0 skipped +Totals: 4 passed, 6 failed, 0 skipped ********* Finished testing of tst_float ********* diff --git a/tests/auto/testlib/selftests/expected_float.xml b/tests/auto/testlib/selftests/expected_float.xml deleted file mode 100644 index a9c74282506..00000000000 --- a/tests/auto/testlib/selftests/expected_float.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - @INSERT_QT_VERSION_HERE@ - @INSERT_QT_VERSION_HERE@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tests/auto/testlib/selftests/expected_float.xunitxml b/tests/auto/testlib/selftests/expected_float.xunitxml deleted file mode 100644 index f88e5e410e5..00000000000 --- a/tests/auto/testlib/selftests/expected_float.xunitxml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/tests/auto/testlib/selftests/expected_globaldata.lightxml b/tests/auto/testlib/selftests/expected_globaldata.lightxml index 7a50f01cb8a..6d68bfbdb54 100644 --- a/tests/auto/testlib/selftests/expected_globaldata.lightxml +++ b/tests/auto/testlib/selftests/expected_globaldata.lightxml @@ -25,6 +25,9 @@ + + + @@ -41,6 +44,9 @@ + + + @@ -57,6 +63,9 @@ + + + @@ -73,7 +82,9 @@ - + + + @@ -120,6 +131,9 @@ + + + @@ -132,6 +146,9 @@ + + + @@ -156,7 +173,9 @@ - + + + diff --git a/tests/auto/testlib/selftests/expected_globaldata.txt b/tests/auto/testlib/selftests/expected_globaldata.txt index e3905e2fa3c..59b95fa2533 100644 --- a/tests/auto/testlib/selftests/expected_globaldata.txt +++ b/tests/auto/testlib/selftests/expected_globaldata.txt @@ -6,19 +6,22 @@ QDEBUG : tst_globaldata::testGlobal(1:local 1) init testGlobal local 1 QDEBUG : tst_globaldata::testGlobal(1:local 1) global: false QDEBUG : tst_globaldata::testGlobal(1:local 1) local: false QDEBUG : tst_globaldata::testGlobal(1:local 1) cleanup testGlobal local 1 +PASS : tst_globaldata::testGlobal(1:local 1) QDEBUG : tst_globaldata::testGlobal(1:local 2) init testGlobal local 2 QDEBUG : tst_globaldata::testGlobal(1:local 2) global: false QDEBUG : tst_globaldata::testGlobal(1:local 2) local: true QDEBUG : tst_globaldata::testGlobal(1:local 2) cleanup testGlobal local 2 +PASS : tst_globaldata::testGlobal(1:local 2) QDEBUG : tst_globaldata::testGlobal(2:local 1) init testGlobal local 1 QDEBUG : tst_globaldata::testGlobal(2:local 1) global: true QDEBUG : tst_globaldata::testGlobal(2:local 1) local: false QDEBUG : tst_globaldata::testGlobal(2:local 1) cleanup testGlobal local 1 +PASS : tst_globaldata::testGlobal(2:local 1) QDEBUG : tst_globaldata::testGlobal(2:local 2) init testGlobal local 2 QDEBUG : tst_globaldata::testGlobal(2:local 2) global: true QDEBUG : tst_globaldata::testGlobal(2:local 2) local: true QDEBUG : tst_globaldata::testGlobal(2:local 2) cleanup testGlobal local 2 -PASS : tst_globaldata::testGlobal() +PASS : tst_globaldata::testGlobal(2:local 2) SKIP : tst_globaldata::skip(1) skipping Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/globaldata/tst_globaldata.cpp(129)] QDEBUG : tst_globaldata::skipLocal(1:local 1) init skipLocal local 1 @@ -32,9 +35,11 @@ QDEBUG : tst_globaldata::skipLocal(1:local 2) cleanup skipLocal local 2 QDEBUG : tst_globaldata::skipSingle(1:local 1) init skipSingle local 1 QDEBUG : tst_globaldata::skipSingle(1:local 1) global: false local: false QDEBUG : tst_globaldata::skipSingle(1:local 1) cleanup skipSingle local 1 +PASS : tst_globaldata::skipSingle(1:local 1) QDEBUG : tst_globaldata::skipSingle(1:local 2) init skipSingle local 2 QDEBUG : tst_globaldata::skipSingle(1:local 2) global: false local: true QDEBUG : tst_globaldata::skipSingle(1:local 2) cleanup skipSingle local 2 +PASS : tst_globaldata::skipSingle(1:local 2) QDEBUG : tst_globaldata::skipSingle(2:local 1) init skipSingle local 1 SKIP : tst_globaldata::skipSingle(2:local 1) skipping Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/globaldata/tst_globaldata.cpp(143)] @@ -42,8 +47,8 @@ QDEBUG : tst_globaldata::skipSingle(2:local 1) cleanup skipSingle local 1 QDEBUG : tst_globaldata::skipSingle(2:local 2) init skipSingle local 2 QDEBUG : tst_globaldata::skipSingle(2:local 2) global: true local: true QDEBUG : tst_globaldata::skipSingle(2:local 2) cleanup skipSingle local 2 -PASS : tst_globaldata::skipSingle() +PASS : tst_globaldata::skipSingle(2:local 2) QDEBUG : tst_globaldata::cleanupTestCase() cleanupTestCase cleanupTestCase (null) PASS : tst_globaldata::cleanupTestCase() -Totals: 4 passed, 0 failed, 4 skipped +Totals: 9 passed, 0 failed, 4 skipped ********* Finished testing of tst_globaldata ********* diff --git a/tests/auto/testlib/selftests/expected_globaldata.xml b/tests/auto/testlib/selftests/expected_globaldata.xml index 9abbeeef35e..09edaacd436 100644 --- a/tests/auto/testlib/selftests/expected_globaldata.xml +++ b/tests/auto/testlib/selftests/expected_globaldata.xml @@ -27,6 +27,9 @@ + + + @@ -43,6 +46,9 @@ + + + @@ -59,6 +65,9 @@ + + + @@ -75,7 +84,9 @@ - + + + @@ -122,6 +133,9 @@ + + + @@ -134,6 +148,9 @@ + + + @@ -158,7 +175,9 @@ - + + + diff --git a/tests/auto/testlib/selftests/expected_multiexec.lightxml b/tests/auto/testlib/selftests/expected_multiexec.lightxml deleted file mode 100644 index 1a66e92f8f9..00000000000 --- a/tests/auto/testlib/selftests/expected_multiexec.lightxml +++ /dev/null @@ -1,13 +0,0 @@ - - @INSERT_QT_VERSION_HERE@ - @INSERT_QT_VERSION_HERE@ - - - - - - - - - - diff --git a/tests/auto/testlib/selftests/expected_multiexec.xunitxml b/tests/auto/testlib/selftests/expected_multiexec.xunitxml deleted file mode 100644 index 6bc04c3ddda..00000000000 --- a/tests/auto/testlib/selftests/expected_multiexec.xunitxml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/tests/auto/testlib/selftests/expected_qexecstringlist.txt b/tests/auto/testlib/selftests/expected_qexecstringlist.txt index 87df97af485..da283e106f0 100644 --- a/tests/auto/testlib/selftests/expected_qexecstringlist.txt +++ b/tests/auto/testlib/selftests/expected_qexecstringlist.txt @@ -2,38 +2,44 @@ Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ PASS : tst_QExecStringList::initTestCase() PASS : tst_QExecStringList::testA() -PASS : tst_QExecStringList::testB() +PASS : tst_QExecStringList::testB(Data1) +PASS : tst_QExecStringList::testB(Data2) +PASS : tst_QExecStringList::testB(Data3) PASS : tst_QExecStringList::testC() PASS : tst_QExecStringList::cleanupTestCase() +Totals: 7 passed, 0 failed, 0 skipped +********* Finished testing of tst_QExecStringList ********* +********* Start testing of tst_QExecStringList ********* +Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ +PASS : tst_QExecStringList::initTestCase() +PASS : tst_QExecStringList::testA() +PASS : tst_QExecStringList::testB(Data1) +PASS : tst_QExecStringList::testB(Data2) +PASS : tst_QExecStringList::testB(Data3) +PASS : tst_QExecStringList::testC() +PASS : tst_QExecStringList::cleanupTestCase() +Totals: 7 passed, 0 failed, 0 skipped +********* Finished testing of tst_QExecStringList ********* +********* Start testing of tst_QExecStringList ********* +Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ +PASS : tst_QExecStringList::initTestCase() +PASS : tst_QExecStringList::testA() +PASS : tst_QExecStringList::cleanupTestCase() +Totals: 3 passed, 0 failed, 0 skipped +********* Finished testing of tst_QExecStringList ********* +********* Start testing of tst_QExecStringList ********* +Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ +PASS : tst_QExecStringList::initTestCase() +PASS : tst_QExecStringList::testB(Data1) +PASS : tst_QExecStringList::testB(Data2) +PASS : tst_QExecStringList::testB(Data3) +PASS : tst_QExecStringList::cleanupTestCase() Totals: 5 passed, 0 failed, 0 skipped ********* Finished testing of tst_QExecStringList ********* ********* Start testing of tst_QExecStringList ********* Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ PASS : tst_QExecStringList::initTestCase() -PASS : tst_QExecStringList::testA() -PASS : tst_QExecStringList::testB() -PASS : tst_QExecStringList::testC() -PASS : tst_QExecStringList::cleanupTestCase() -Totals: 5 passed, 0 failed, 0 skipped -********* Finished testing of tst_QExecStringList ********* -********* Start testing of tst_QExecStringList ********* -Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ -PASS : tst_QExecStringList::initTestCase() -PASS : tst_QExecStringList::testA() -PASS : tst_QExecStringList::cleanupTestCase() -Totals: 3 passed, 0 failed, 0 skipped -********* Finished testing of tst_QExecStringList ********* -********* Start testing of tst_QExecStringList ********* -Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ -PASS : tst_QExecStringList::initTestCase() -PASS : tst_QExecStringList::testB() -PASS : tst_QExecStringList::cleanupTestCase() -Totals: 3 passed, 0 failed, 0 skipped -********* Finished testing of tst_QExecStringList ********* -********* Start testing of tst_QExecStringList ********* -Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ -PASS : tst_QExecStringList::initTestCase() -PASS : tst_QExecStringList::testB() +PASS : tst_QExecStringList::testB(Data2) PASS : tst_QExecStringList::cleanupTestCase() Totals: 3 passed, 0 failed, 0 skipped ********* Finished testing of tst_QExecStringList ********* diff --git a/tests/auto/testlib/selftests/expected_skip.lightxml b/tests/auto/testlib/selftests/expected_skip.lightxml index 8399a76fa20..b01570e2757 100644 --- a/tests/auto/testlib/selftests/expected_skip.lightxml +++ b/tests/auto/testlib/selftests/expected_skip.lightxml @@ -24,7 +24,9 @@ - + + + diff --git a/tests/auto/testlib/selftests/expected_skip.txt b/tests/auto/testlib/selftests/expected_skip.txt index e18386e109b..fadbc966f02 100644 --- a/tests/auto/testlib/selftests/expected_skip.txt +++ b/tests/auto/testlib/selftests/expected_skip.txt @@ -8,7 +8,7 @@ SKIP : tst_Skip::emptytest() skipping all SKIP : tst_Skip::singleSkip(local 1) skipping one Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/skip/tst_skip.cpp(97)] QDEBUG : tst_Skip::singleSkip(local 2) this line should only be reached once (true) -PASS : tst_Skip::singleSkip() +PASS : tst_Skip::singleSkip(local 2) PASS : tst_Skip::cleanupTestCase() Totals: 3 passed, 0 failed, 3 skipped ********* Finished testing of tst_Skip ********* diff --git a/tests/auto/testlib/selftests/expected_skip.xml b/tests/auto/testlib/selftests/expected_skip.xml index d0e45d0ff82..6609c0464a6 100644 --- a/tests/auto/testlib/selftests/expected_skip.xml +++ b/tests/auto/testlib/selftests/expected_skip.xml @@ -26,7 +26,9 @@ - + + + diff --git a/tests/auto/testlib/selftests/expected_benchlibcallgrind.lightxml b/tests/auto/testlib/selftests/expected_skipcleanup.lightxml similarity index 58% rename from tests/auto/testlib/selftests/expected_benchlibcallgrind.lightxml rename to tests/auto/testlib/selftests/expected_skipcleanup.lightxml index c2394e545e8..d2bc3b766eb 100644 --- a/tests/auto/testlib/selftests/expected_benchlibcallgrind.lightxml +++ b/tests/auto/testlib/selftests/expected_skipcleanup.lightxml @@ -5,10 +5,11 @@ - - + - + + + diff --git a/tests/auto/testlib/selftests/expected_skipcleanup.txt b/tests/auto/testlib/selftests/expected_skipcleanup.txt new file mode 100644 index 00000000000..c97f31c2a9b --- /dev/null +++ b/tests/auto/testlib/selftests/expected_skipcleanup.txt @@ -0,0 +1,8 @@ +********* Start testing of tst_SkipCleanup ********* +Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ +PASS : tst_SkipCleanup::initTestCase() +PASS : tst_SkipCleanup::aTestFunction() +SKIP : tst_SkipCleanup::cleanupTestCase() Skip inside cleanupTestCase. + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/skipcleanup/tst_skipcleanup.cpp(59)] +Totals: 2 passed, 0 failed, 1 skipped +********* Finished testing of tst_SkipCleanup ********* diff --git a/tests/auto/testlib/selftests/expected_multiexec.xml b/tests/auto/testlib/selftests/expected_skipcleanup.xml similarity index 58% rename from tests/auto/testlib/selftests/expected_multiexec.xml rename to tests/auto/testlib/selftests/expected_skipcleanup.xml index 7f71f6edaca..8fbfc7711c0 100644 --- a/tests/auto/testlib/selftests/expected_multiexec.xml +++ b/tests/auto/testlib/selftests/expected_skipcleanup.xml @@ -1,5 +1,5 @@ - + @INSERT_QT_VERSION_HERE@ @INSERT_QT_VERSION_HERE@ @@ -7,10 +7,12 @@ - + - + + + diff --git a/tests/auto/testlib/selftests/expected_crashes.xunitxml b/tests/auto/testlib/selftests/expected_skipcleanup.xunitxml similarity index 54% rename from tests/auto/testlib/selftests/expected_crashes.xunitxml rename to tests/auto/testlib/selftests/expected_skipcleanup.xunitxml index 558491c5987..b8f67e2d072 100644 --- a/tests/auto/testlib/selftests/expected_crashes.xunitxml +++ b/tests/auto/testlib/selftests/expected_skipcleanup.xunitxml @@ -1,15 +1,15 @@ - + - - - + + + - + diff --git a/tests/auto/testlib/selftests/expected_sleep.lightxml b/tests/auto/testlib/selftests/expected_sleep.lightxml deleted file mode 100644 index 1a056c85629..00000000000 --- a/tests/auto/testlib/selftests/expected_sleep.lightxml +++ /dev/null @@ -1,13 +0,0 @@ - - @INSERT_QT_VERSION_HERE@ - @INSERT_QT_VERSION_HERE@ - - - - - - - - - - diff --git a/tests/auto/testlib/selftests/expected_sleep.xml b/tests/auto/testlib/selftests/expected_sleep.xml deleted file mode 100644 index cbc4d140048..00000000000 --- a/tests/auto/testlib/selftests/expected_sleep.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - @INSERT_QT_VERSION_HERE@ - @INSERT_QT_VERSION_HERE@ - - - - - - - - - - - diff --git a/tests/auto/testlib/selftests/expected_sleep.xunitxml b/tests/auto/testlib/selftests/expected_sleep.xunitxml deleted file mode 100644 index 409621e6bc1..00000000000 --- a/tests/auto/testlib/selftests/expected_sleep.xunitxml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/tests/auto/testlib/selftests/expected_subtest.lightxml b/tests/auto/testlib/selftests/expected_subtest.lightxml index d76ec131de5..e7d8d53efc6 100644 --- a/tests/auto/testlib/selftests/expected_subtest.lightxml +++ b/tests/auto/testlib/selftests/expected_subtest.lightxml @@ -43,6 +43,9 @@ + + + @@ -59,6 +62,9 @@ + + + @@ -75,7 +81,9 @@ - + + + @@ -100,6 +108,9 @@ + + + diff --git a/tests/auto/testlib/selftests/expected_subtest.txt b/tests/auto/testlib/selftests/expected_subtest.txt index e35fb805e06..7b29bfc8c35 100644 --- a/tests/auto/testlib/selftests/expected_subtest.txt +++ b/tests/auto/testlib/selftests/expected_subtest.txt @@ -12,21 +12,24 @@ QDEBUG : tst_Subtest::test2(data0) init test2 data0 QDEBUG : tst_Subtest::test2(data0) test2 test2 data0 QDEBUG : tst_Subtest::test2(data0) test2 end QDEBUG : tst_Subtest::test2(data0) cleanup test2 data0 +PASS : tst_Subtest::test2(data0) QDEBUG : tst_Subtest::test2(data1) init test2 data1 QDEBUG : tst_Subtest::test2(data1) test2 test2 data1 QDEBUG : tst_Subtest::test2(data1) test2 end QDEBUG : tst_Subtest::test2(data1) cleanup test2 data1 +PASS : tst_Subtest::test2(data1) QDEBUG : tst_Subtest::test2(data2) init test2 data2 QDEBUG : tst_Subtest::test2(data2) test2 test2 data2 QDEBUG : tst_Subtest::test2(data2) test2 end QDEBUG : tst_Subtest::test2(data2) cleanup test2 data2 -PASS : tst_Subtest::test2() +PASS : tst_Subtest::test2(data2) QDEBUG : tst_Subtest::test3() test3_data test3 (null) QDEBUG : tst_Subtest::test3() test3_data end QDEBUG : tst_Subtest::test3(data0) init test3 data0 QDEBUG : tst_Subtest::test3(data0) test2 test3 data0 QDEBUG : tst_Subtest::test3(data0) test2 end QDEBUG : tst_Subtest::test3(data0) cleanup test3 data0 +PASS : tst_Subtest::test3(data0) QDEBUG : tst_Subtest::test3(data1) init test3 data1 QDEBUG : tst_Subtest::test3(data1) test2 test3 data1 FAIL! : tst_Subtest::test3(data1) Compared values are not the same @@ -43,5 +46,5 @@ FAIL! : tst_Subtest::test3(data2) Compared values are not the same QDEBUG : tst_Subtest::test3(data2) cleanup test3 data2 QDEBUG : tst_Subtest::cleanupTestCase() cleanupTestCase cleanupTestCase (null) PASS : tst_Subtest::cleanupTestCase() -Totals: 4 passed, 2 failed, 0 skipped +Totals: 7 passed, 2 failed, 0 skipped ********* Finished testing of tst_Subtest ********* diff --git a/tests/auto/testlib/selftests/expected_subtest.xml b/tests/auto/testlib/selftests/expected_subtest.xml index d79242f0616..8a3846599c3 100644 --- a/tests/auto/testlib/selftests/expected_subtest.xml +++ b/tests/auto/testlib/selftests/expected_subtest.xml @@ -45,6 +45,9 @@ + + + @@ -61,6 +64,9 @@ + + + @@ -77,7 +83,9 @@ - + + + @@ -102,6 +110,9 @@ + + + diff --git a/tests/auto/testlib/selftests/expected_warnings.lightxml b/tests/auto/testlib/selftests/expected_warnings.lightxml index 116156ed8ad..ad786832ca4 100644 --- a/tests/auto/testlib/selftests/expected_warnings.lightxml +++ b/tests/auto/testlib/selftests/expected_warnings.lightxml @@ -37,6 +37,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/auto/testlib/selftests/expected_warnings.txt b/tests/auto/testlib/selftests/expected_warnings.txt index 6f7d0f491bd..6196ec0261b 100644 --- a/tests/auto/testlib/selftests/expected_warnings.txt +++ b/tests/auto/testlib/selftests/expected_warnings.txt @@ -11,6 +11,12 @@ PASS : tst_Warnings::testWarnings() INFO : tst_Warnings::testMissingWarnings() Did not receive message: "Warning0" INFO : tst_Warnings::testMissingWarnings() Did not receive message: "Warning1" FAIL! : tst_Warnings::testMissingWarnings() Not all expected messages were received +INFO : tst_Warnings::testMissingWarningsWithData(first row) Did not receive message: "Warning0" +INFO : tst_Warnings::testMissingWarningsWithData(first row) Did not receive message: "Warning1" +FAIL! : tst_Warnings::testMissingWarningsWithData(first row) Not all expected messages were received +INFO : tst_Warnings::testMissingWarningsWithData(second row) Did not receive message: "Warning0" +INFO : tst_Warnings::testMissingWarningsWithData(second row) Did not receive message: "Warning1" +FAIL! : tst_Warnings::testMissingWarningsWithData(second row) Not all expected messages were received PASS : tst_Warnings::cleanupTestCase() -Totals: 3 passed, 1 failed, 0 skipped +Totals: 3 passed, 3 failed, 0 skipped ********* Finished testing of tst_Warnings ********* diff --git a/tests/auto/testlib/selftests/expected_warnings.xml b/tests/auto/testlib/selftests/expected_warnings.xml index 13e6c1df793..12cff7c13db 100644 --- a/tests/auto/testlib/selftests/expected_warnings.xml +++ b/tests/auto/testlib/selftests/expected_warnings.xml @@ -39,6 +39,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/auto/testlib/selftests/expected_warnings.xunitxml b/tests/auto/testlib/selftests/expected_warnings.xunitxml index a96393d6488..3e3b9ce18ea 100644 --- a/tests/auto/testlib/selftests/expected_warnings.xunitxml +++ b/tests/auto/testlib/selftests/expected_warnings.xunitxml @@ -1,5 +1,5 @@ - + @@ -18,6 +18,14 @@ + + + + + + + + @@ -27,6 +35,10 @@ + + + + diff --git a/tests/auto/testlib/selftests/expected_xunit.lightxml b/tests/auto/testlib/selftests/expected_xunit.lightxml index 35108fc410e..71a57373d60 100644 --- a/tests/auto/testlib/selftests/expected_xunit.lightxml +++ b/tests/auto/testlib/selftests/expected_xunit.lightxml @@ -45,7 +45,7 @@ - + diff --git a/tests/auto/testlib/selftests/expected_xunit.txt b/tests/auto/testlib/selftests/expected_xunit.txt index ae2508c5904..51c8f89599c 100644 --- a/tests/auto/testlib/selftests/expected_xunit.txt +++ b/tests/auto/testlib/selftests/expected_xunit.txt @@ -19,7 +19,7 @@ PASS : tst_Xunit::testFunc5() XFAIL : tst_Xunit::testFunc6() this failure is also expected Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/xunit/tst_xunit.cpp(104)] PASS : tst_Xunit::testFunc6() -XPASS : tst_Xunit::testFunc7() 'true' returned FALSE. () +XPASS : tst_Xunit::testFunc7() 'true' returned TRUE unexpectedly. () Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/xunit/tst_xunit.cpp(110)] PASS : tst_Xunit::cleanupTestCase() Totals: 5 passed, 3 failed, 1 skipped diff --git a/tests/auto/testlib/selftests/expected_xunit.xml b/tests/auto/testlib/selftests/expected_xunit.xml index 0fe9735f717..a1e6b209638 100644 --- a/tests/auto/testlib/selftests/expected_xunit.xml +++ b/tests/auto/testlib/selftests/expected_xunit.xml @@ -47,7 +47,7 @@ - + diff --git a/tests/auto/testlib/selftests/expected_xunit.xunitxml b/tests/auto/testlib/selftests/expected_xunit.xunitxml index e77004f819a..e7403443ea4 100644 --- a/tests/auto/testlib/selftests/expected_xunit.xunitxml +++ b/tests/auto/testlib/selftests/expected_xunit.xunitxml @@ -27,7 +27,7 @@ - + diff --git a/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp b/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp index 3a000ba1826..794b109924a 100644 --- a/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp +++ b/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp @@ -54,15 +54,21 @@ private slots: void xfailAndAbort() const; void xfailTwice() const; void xfailWithQString() const; - void xfailDataDriven_data() const; - void xfailDataDriven() const; + void xfailDataDrivenWithQVerify_data() const; + void xfailDataDrivenWithQVerify() const; + void xfailDataDrivenWithQCompare_data() const; + void xfailDataDrivenWithQCompare() const; void xfailOnWrongRow_data() const; void xfailOnWrongRow() const; void xfailOnAnyRow_data() const; void xfailOnAnyRow() const; + void xfailWithoutVerify_data() const; + void xfailWithoutVerify() const; void xpass() const; - void xpassDataDriven_data() const; - void xpassDataDriven() const; + void xpassDataDrivenWithQVerify_data() const; + void xpassDataDrivenWithQVerify() const; + void xpassDataDrivenWithQCompare_data() const; + void xpassDataDrivenWithQCompare() const; }; void tst_ExpectFail::xfailAndContinue() const @@ -104,7 +110,7 @@ void tst_ExpectFail::xfailWithQString() const QVERIFY(false); } -void tst_ExpectFail::xfailDataDriven_data() const +void tst_ExpectFail::xfailDataDrivenWithQVerify_data() const { QTest::addColumn("shouldPass"); QTest::addColumn("failMode"); @@ -115,7 +121,7 @@ void tst_ExpectFail::xfailDataDriven_data() const QTest::newRow("Continue") << false << QTest::Continue; } -void tst_ExpectFail::xfailDataDriven() const +void tst_ExpectFail::xfailDataDrivenWithQVerify() const { QFETCH(bool, shouldPass); QFETCH(QTest::TestFailMode, failMode); @@ -138,6 +144,40 @@ void tst_ExpectFail::xfailDataDriven() const QCOMPARE(failMode, QTest::Continue); } +void tst_ExpectFail::xfailDataDrivenWithQCompare_data() const +{ + QTest::addColumn("shouldPass"); + QTest::addColumn("failMode"); + + QTest::newRow("Pass 1") << true << QTest::Abort; + QTest::newRow("Pass 2") << true << QTest::Continue; + QTest::newRow("Abort") << false << QTest::Abort; + QTest::newRow("Continue") << false << QTest::Continue; +} + +void tst_ExpectFail::xfailDataDrivenWithQCompare() const +{ + QFETCH(bool, shouldPass); + QFETCH(QTest::TestFailMode, failMode); + + // You can't pass a variable as the last parameter of QEXPECT_FAIL, + // because the macro adds "QTest::" in front of the last parameter. + // That is why the following code appears to be a little strange. + if (!shouldPass) { + if (failMode == QTest::Abort) + QEXPECT_FAIL(QTest::currentDataTag(), "This test should xfail", Abort); + else + QEXPECT_FAIL(QTest::currentDataTag(), "This test should xfail", Continue); + } + + QCOMPARE(1, shouldPass ? 1 : 2); + + // If we get here, we either expected to pass or we expected to + // fail and the failure mode was Continue. + if (!shouldPass) + QCOMPARE(failMode, QTest::Continue); +} + void tst_ExpectFail::xfailOnWrongRow_data() const { QTest::addColumn("dummy"); @@ -168,6 +208,20 @@ void tst_ExpectFail::xfailOnAnyRow() const QVERIFY(false); } +void tst_ExpectFail::xfailWithoutVerify_data() const +{ + QTest::addColumn("dummy"); + + QTest::newRow("first row") << 0; + QTest::newRow("second row") << 1; +} + +void tst_ExpectFail::xfailWithoutVerify() const +{ + QVERIFY(true); + QEXPECT_FAIL("", "This expected failure should be ignored", Abort); +} + void tst_ExpectFail::xpass() const { QEXPECT_FAIL("", "This test should xpass", Abort); @@ -178,7 +232,7 @@ void tst_ExpectFail::xpass() const QVERIFY2(false, "This should not be reached"); } -void tst_ExpectFail::xpassDataDriven_data() const +void tst_ExpectFail::xpassDataDrivenWithQVerify_data() const { QTest::addColumn("shouldXPass"); @@ -186,7 +240,7 @@ void tst_ExpectFail::xpassDataDriven_data() const QTest::newRow("Pass") << false; } -void tst_ExpectFail::xpassDataDriven() const +void tst_ExpectFail::xpassDataDrivenWithQVerify() const { QFETCH(bool, shouldXPass); @@ -199,5 +253,26 @@ void tst_ExpectFail::xpassDataDriven() const QVERIFY2(!shouldXPass, "Test failed to terminate on XPASS"); } +void tst_ExpectFail::xpassDataDrivenWithQCompare_data() const +{ + QTest::addColumn("shouldXPass"); + + QTest::newRow("XPass") << true; + QTest::newRow("Pass") << false; +} + +void tst_ExpectFail::xpassDataDrivenWithQCompare() const +{ + QFETCH(bool, shouldXPass); + + if (shouldXPass) + QEXPECT_FAIL(QTest::currentDataTag(), "This test should xpass", Abort); + + QCOMPARE(1, 1); + + // We should only get here if the test wasn't supposed to xpass. + QVERIFY2(!shouldXPass, "Test failed to terminate on XPASS"); +} + QTEST_MAIN(tst_ExpectFail) #include "tst_expectfail.moc" diff --git a/tests/auto/testlib/selftests/failcleanup/failcleanup.pro b/tests/auto/testlib/selftests/failcleanup/failcleanup.pro new file mode 100644 index 00000000000..426d7cc45b7 --- /dev/null +++ b/tests/auto/testlib/selftests/failcleanup/failcleanup.pro @@ -0,0 +1,7 @@ +SOURCES += tst_failcleanup.cpp +QT = core testlib + +mac:CONFIG -= app_bundle +CONFIG -= debug_and_release_target + +TARGET = failcleanup diff --git a/tests/auto/testlib/selftests/failcleanup/tst_failcleanup.cpp b/tests/auto/testlib/selftests/failcleanup/tst_failcleanup.cpp new file mode 100644 index 00000000000..a1b3b2d15a0 --- /dev/null +++ b/tests/auto/testlib/selftests/failcleanup/tst_failcleanup.cpp @@ -0,0 +1,63 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include + +class tst_FailCleanup: public QObject +{ +Q_OBJECT +private slots: + void aTestFunction() const; + void cleanupTestCase() const; +}; + +void tst_FailCleanup::aTestFunction() const +{ + QVERIFY(true); +} + +void tst_FailCleanup::cleanupTestCase() const +{ + QVERIFY2(false, "Fail inside cleanupTestCase"); +} + +QTEST_APPLESS_MAIN(tst_FailCleanup) +#include "tst_failcleanup.moc" diff --git a/tests/auto/testlib/selftests/float/tst_float.cpp b/tests/auto/testlib/selftests/float/tst_float.cpp index 9b7865ed25a..fb10521604a 100644 --- a/tests/auto/testlib/selftests/float/tst_float.cpp +++ b/tests/auto/testlib/selftests/float/tst_float.cpp @@ -66,19 +66,28 @@ void tst_float::floatComparisons_data() const QTest::addColumn("operandLeft"); QTest::addColumn("operandRight"); - QTest::newRow("should SUCCEED") + QTest::newRow("should SUCCEED 1") << float(0) << float(0); - QTest::newRow("should FAIL") + QTest::newRow("should FAIL 1") << float(1.00000) << float(3.00000); - QTest::newRow("should FAIL") + QTest::newRow("should FAIL 2") << float(1.00000e-7f) << float(3.00000e-7f); - QTest::newRow("should FAIL") + // QCOMPARE for floats uses qFuzzyCompare(), which succeeds if the numbers + // differ by no more than 1/100,000th of the smaller value. Thus + // QCOMPARE(99998, 99999) should fail, while QCOMPARE(100001, 100002) + // should pass. + + QTest::newRow("should FAIL 3") + << float(99998) + << float(99999); + + QTest::newRow("should SUCCEED 2") << float(100001) << float(100002); } diff --git a/tests/auto/testlib/selftests/selftests.pri b/tests/auto/testlib/selftests/selftests.pri index 95664c3793e..0809c4d4972 100644 --- a/tests/auto/testlib/selftests/selftests.pri +++ b/tests/auto/testlib/selftests/selftests.pri @@ -1,7 +1,42 @@ -SUBPROGRAMS = subtest warnings maxwarnings cmptest globaldata skip \ - strcmp expectfail sleep fetchbogus crashes multiexec failinit failinitdata \ - skipinit skipinitdata datetime singleskip assert differentexec \ - exceptionthrow qexecstringlist datatable commandlinedata\ - benchlibwalltime benchlibcallgrind benchlibeventcounter benchlibtickcounter \ - benchliboptions xunit badxml longstring float printdatatags \ - printdatatagswithglobaltags findtestdata counting +SUBPROGRAMS = \ + #alive \ + assert \ + badxml \ + benchlibcallgrind \ + benchlibcounting \ + benchlibeventcounter \ + benchliboptions \ + benchlibtickcounter \ + benchlibwalltime \ + cmptest \ + commandlinedata \ + counting \ + crashes \ + datatable \ + datetime \ + differentexec \ + exceptionthrow \ + expectfail \ + failcleanup \ + failinit \ + failinitdata \ + fetchbogus \ + findtestdata \ + float \ + globaldata \ + longstring \ + maxwarnings \ + multiexec \ + printdatatags \ + printdatatagswithglobaltags \ + qexecstringlist \ + singleskip \ + skip \ + skipcleanup \ + skipinit \ + skipinitdata \ + sleep \ + strcmp \ + subtest \ + warnings \ + xunit diff --git a/tests/auto/testlib/selftests/selftests.qrc b/tests/auto/testlib/selftests/selftests.qrc index d10aa56cebd..baa539a2593 100644 --- a/tests/auto/testlib/selftests/selftests.qrc +++ b/tests/auto/testlib/selftests/selftests.qrc @@ -9,18 +9,16 @@ expected_badxml.txt expected_badxml.xml expected_badxml.xunitxml - expected_benchlibcallgrind.lightxml expected_benchlibcallgrind.txt - expected_benchlibcallgrind.xml - expected_benchlibcallgrind.xunitxml + expected_benchlibcounting.lightxml + expected_benchlibcounting.txt + expected_benchlibcounting.xml + expected_benchlibcounting.xunitxml expected_benchlibeventcounter.lightxml expected_benchlibeventcounter.txt expected_benchlibeventcounter.xml expected_benchlibeventcounter.xunitxml - expected_benchliboptions.lightxml expected_benchliboptions.txt - expected_benchliboptions.xml - expected_benchliboptions.xunitxml expected_benchlibtickcounter.lightxml expected_benchlibtickcounter.txt expected_benchlibtickcounter.xml @@ -41,9 +39,6 @@ expected_counting.txt expected_counting.xml expected_counting.xunitxml - expected_crashes.lightxml - expected_crashes.xml - expected_crashes.xunitxml expected_crashes_1.txt expected_crashes_2.txt expected_crashes_3.txt @@ -64,6 +59,10 @@ expected_expectfail.txt expected_expectfail.xml expected_expectfail.xunitxml + expected_failcleanup.lightxml + expected_failcleanup.txt + expected_failcleanup.xml + expected_failcleanup.xunitxml expected_failinit.lightxml expected_failinit.txt expected_failinit.xml @@ -77,10 +76,7 @@ expected_fetchbogus.txt expected_fetchbogus.xml expected_fetchbogus.xunitxml - expected_float.lightxml expected_float.txt - expected_float.xml - expected_float.xunitxml expected_globaldata.lightxml expected_globaldata.txt expected_globaldata.xml @@ -93,10 +89,7 @@ expected_maxwarnings.txt expected_maxwarnings.xml expected_maxwarnings.xunitxml - expected_multiexec.lightxml expected_multiexec.txt - expected_multiexec.xml - expected_multiexec.xunitxml expected_printdatatags.txt expected_printdatatagswithglobaltags.txt expected_qexecstringlist.txt @@ -108,6 +101,10 @@ expected_skip.txt expected_skip.xml expected_skip.xunitxml + expected_skipcleanup.lightxml + expected_skipcleanup.txt + expected_skipcleanup.xml + expected_skipcleanup.xunitxml expected_skipinit.lightxml expected_skipinit.txt expected_skipinit.xml @@ -116,10 +113,7 @@ expected_skipinitdata.txt expected_skipinitdata.xml expected_skipinitdata.xunitxml - expected_sleep.lightxml expected_sleep.txt - expected_sleep.xml - expected_sleep.xunitxml expected_strcmp.lightxml expected_strcmp.txt expected_strcmp.xml diff --git a/tests/auto/testlib/selftests/skipcleanup/skipcleanup.pro b/tests/auto/testlib/selftests/skipcleanup/skipcleanup.pro new file mode 100644 index 00000000000..f98cda7596a --- /dev/null +++ b/tests/auto/testlib/selftests/skipcleanup/skipcleanup.pro @@ -0,0 +1,7 @@ +SOURCES += tst_skipcleanup.cpp +QT = core testlib + +mac:CONFIG -= app_bundle +CONFIG -= debug_and_release_target + +TARGET = skipcleanup diff --git a/tests/auto/testlib/selftests/skipcleanup/tst_skipcleanup.cpp b/tests/auto/testlib/selftests/skipcleanup/tst_skipcleanup.cpp new file mode 100644 index 00000000000..262aefa9827 --- /dev/null +++ b/tests/auto/testlib/selftests/skipcleanup/tst_skipcleanup.cpp @@ -0,0 +1,63 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include + +class tst_SkipCleanup: public QObject +{ +Q_OBJECT +private slots: + void aTestFunction() const; + void cleanupTestCase() const; +}; + +void tst_SkipCleanup::aTestFunction() const +{ + QVERIFY(true); +} + +void tst_SkipCleanup::cleanupTestCase() const +{ + QSKIP("Skip inside cleanupTestCase."); +} + +QTEST_APPLESS_MAIN(tst_SkipCleanup) +#include "tst_skipcleanup.moc" diff --git a/tests/auto/testlib/selftests/tst_selftests.cpp b/tests/auto/testlib/selftests/tst_selftests.cpp index aaa58e092c3..decaa553863 100644 --- a/tests/auto/testlib/selftests/tst_selftests.cpp +++ b/tests/auto/testlib/selftests/tst_selftests.cpp @@ -323,6 +323,7 @@ void tst_Selftests::runSubTest_data() // Only run on platforms where callgrind is available. << "benchlibcallgrind" #endif + << "benchlibcounting" << "benchlibeventcounter" << "benchliboptions" << "cmptest" @@ -338,6 +339,7 @@ void tst_Selftests::runSubTest_data() << "exceptionthrow" #endif << "expectfail" + << "failcleanup" << "failinit" << "failinitdata" #if !defined(Q_OS_WIN) @@ -354,6 +356,7 @@ void tst_Selftests::runSubTest_data() << "qexecstringlist" << "singleskip" << "skip" + << "skipcleanup" << "skipinit" << "skipinitdata" << "sleep" @@ -397,6 +400,9 @@ void tst_Selftests::runSubTest_data() else if (subtest == "badxml") { arguments << "-eventcounter"; } + else if (subtest == "benchlibcounting") { + arguments << "-eventcounter"; + } else if (subtest == "printdatatags") { arguments << "-datatags"; } @@ -454,23 +460,26 @@ void tst_Selftests::runSubTest_data() } } +static void insertEnvironmentVariable(QString const& name, QProcessEnvironment &result) +{ + const QProcessEnvironment systemEnvironment = QProcessEnvironment::systemEnvironment(); + const QString value = systemEnvironment.value(name); + if (!value.isEmpty()) + result.insert(name, value); +} + static inline QProcessEnvironment processEnvironment() { QProcessEnvironment result; - const QString path = QStringLiteral("PATH"); - const QProcessEnvironment systemEnvironment = QProcessEnvironment::systemEnvironment(); - result.insert(path, systemEnvironment.value(path)); + insertEnvironmentVariable(QStringLiteral("PATH"), result); // Preserve DISPLAY for X11 as some tests use QtGui. #if defined(Q_OS_UNIX) && !defined(Q_OS_MAC) - const QString display = QStringLiteral("DISPLAY"); - const QString displayValue = systemEnvironment.value(display); - if (!displayValue.isEmpty()) - result.insert(display, displayValue); + insertEnvironmentVariable(QStringLiteral("DISPLAY"), result); +#endif + insertEnvironmentVariable(QStringLiteral("QT_QPA_PLATFORM"), result); +#ifdef __COVERAGESCANNER__ + insertEnvironmentVariable(QStringLiteral("QT_TESTCOCOON_ACTIVE"), result); #endif - const QString platform = QStringLiteral("QT_QPA_PLATFORM"); - const QString platformValue = systemEnvironment.value(platform); - if (!platformValue.isEmpty()) - result.insert(platform, platformValue); return result; } diff --git a/tests/auto/testlib/selftests/warnings/tst_warnings.cpp b/tests/auto/testlib/selftests/warnings/tst_warnings.cpp index 933d0cc6cec..e53869e18ec 100644 --- a/tests/auto/testlib/selftests/warnings/tst_warnings.cpp +++ b/tests/auto/testlib/selftests/warnings/tst_warnings.cpp @@ -49,6 +49,8 @@ class tst_Warnings: public QObject private slots: void testWarnings(); void testMissingWarnings(); + void testMissingWarningsWithData_data(); + void testMissingWarningsWithData(); }; void tst_Warnings::testWarnings() @@ -82,6 +84,23 @@ void tst_Warnings::testMissingWarnings() qWarning("Warning2"); } +void tst_Warnings::testMissingWarningsWithData_data() +{ + QTest::addColumn("dummy"); + + QTest::newRow("first row") << 0; + QTest::newRow("second row") << 1; +} + +void tst_Warnings::testMissingWarningsWithData() +{ + QTest::ignoreMessage(QtWarningMsg, "Warning0"); + QTest::ignoreMessage(QtWarningMsg, "Warning1"); + QTest::ignoreMessage(QtWarningMsg, "Warning2"); + + qWarning("Warning2"); +} + QTEST_MAIN(tst_Warnings) #include "tst_warnings.moc" diff --git a/tests/auto/tools/moc/tst_moc.cpp b/tests/auto/tools/moc/tst_moc.cpp index 7c47d60e81e..27db6cc59c8 100644 --- a/tests/auto/tools/moc/tst_moc.cpp +++ b/tests/auto/tools/moc/tst_moc.cpp @@ -614,7 +614,7 @@ void tst_Moc::oldStyleCasts() QStringList args; args << "-c" << "-x" << "c++" << "-Wold-style-cast" << "-I" << "." - << "-I" << qtIncludePath << "-o" << "/dev/null" << "-"; + << "-I" << qtIncludePath << "-o" << "/dev/null" << "-fPIE" << "-"; proc.start("gcc", args); QVERIFY(proc.waitForStarted()); proc.write(mocOut); @@ -683,7 +683,7 @@ void tst_Moc::inputFileNameWithDotsButNoExtension() QStringList args; args << "-c" << "-x" << "c++" << "-I" << ".." - << "-I" << qtIncludePath << "-o" << "/dev/null" << "-"; + << "-I" << qtIncludePath << "-o" << "/dev/null" << "-fPIE" << "-"; proc.start("gcc", args); QVERIFY(proc.waitForStarted()); proc.write(mocOut); @@ -1623,7 +1623,7 @@ void tst_Moc::warnings_data() << QString("standard input:1: Warning: Property declaration x has no READ accessor function. The property will be invalid."); // Passing "-nn" should NOT suppress the warning - QTest::newRow("Invalid property warning") + QTest::newRow("Invalid property warning with -nn") << QByteArray("class X : public QObject { Q_OBJECT Q_PROPERTY(int x) };") << (QStringList() << "-nn") << 0 @@ -1631,7 +1631,7 @@ void tst_Moc::warnings_data() << QString("standard input:1: Warning: Property declaration x has no READ accessor function. The property will be invalid."); // Passing "-nw" should suppress the warning - QTest::newRow("Invalid property warning") + QTest::newRow("Invalid property warning with -nw") << QByteArray("class X : public QObject { Q_OBJECT Q_PROPERTY(int x) };") << (QStringList() << "-nw") << 0 @@ -1655,7 +1655,7 @@ void tst_Moc::warnings_data() << QString("standard input:1: Error: Class contains Q_OBJECT macro but does not inherit from QObject"); // "-nw" should not suppress the error - QTest::newRow("Does not inherit QObject with -nn") + QTest::newRow("Does not inherit QObject with -nw") << QByteArray("class X { Q_OBJECT };") << (QStringList() << "-nw") << 1 diff --git a/tests/auto/tools/qmake/testdata/substitutes/copy.txt b/tests/auto/tools/qmake/testdata/substitutes/copy.txt new file mode 100644 index 00000000000..65e58407399 --- /dev/null +++ b/tests/auto/tools/qmake/testdata/substitutes/copy.txt @@ -0,0 +1,3 @@ +This file is $processed verbatim. It's not going to "warn about + +anything that is usually substituted in qmake such as $${PWD}. diff --git a/tests/auto/tools/qmake/testdata/substitutes/test.pro b/tests/auto/tools/qmake/testdata/substitutes/test.pro index 26b02722e8c..65bb2d85bf6 100644 --- a/tests/auto/tools/qmake/testdata/substitutes/test.pro +++ b/tests/auto/tools/qmake/testdata/substitutes/test.pro @@ -1,5 +1,8 @@ -QMAKE_SUBSTITUTES += test.in sub/test2.in indirect +QMAKE_SUBSTITUTES += test.in sub/test2.in indirect copy indirect.input = $$PWD/test3.txt indirect.output = $$OUT_PWD/sub/indirect_test.txt +copy.input = $$PWD/copy.txt +copy.output = $$OUT_PWD/copy_test.txt +copy.config = verbatim diff --git a/tests/auto/tools/qmake/tst_qmake.cpp b/tests/auto/tools/qmake/tst_qmake.cpp index fcebd6b8216..4da781f763d 100644 --- a/tests/auto/tools/qmake/tst_qmake.cpp +++ b/tests/auto/tools/qmake/tst_qmake.cpp @@ -510,6 +510,14 @@ void tst_qmake::substitutes() QVERIFY( test_compiler.exists( buildDir, "test", Plain, "" )); QVERIFY( test_compiler.exists( buildDir, "sub/test2", Plain, "" )); QVERIFY( test_compiler.exists( buildDir, "sub/indirect_test.txt", Plain, "" )); + + QFile copySource(workDir + "/copy.txt"); + QFile copyDestination(buildDir + "/copy_test.txt"); + + QVERIFY(copySource.open(QFile::ReadOnly)); + QVERIFY(copyDestination.open(QFile::ReadOnly)); + QCOMPARE(copySource.readAll(), copyDestination.readAll()); + QVERIFY( test_compiler.makeDistClean( buildDir )); } diff --git a/tests/auto/tools/uic/baseline/Dialog_with_Buttons_Bottom.ui.h b/tests/auto/tools/uic/baseline/Dialog_with_Buttons_Bottom.ui.h index b5b2bb82eac..1725fd6ece0 100644 --- a/tests/auto/tools/uic/baseline/Dialog_with_Buttons_Bottom.ui.h +++ b/tests/auto/tools/uic/baseline/Dialog_with_Buttons_Bottom.ui.h @@ -28,10 +28,10 @@ public: void setupUi(QDialog *Dialog) { if (Dialog->objectName().isEmpty()) - Dialog->setObjectName(QString::fromUtf8("Dialog")); + Dialog->setObjectName(QStringLiteral("Dialog")); Dialog->resize(400, 300); buttonBox = new QDialogButtonBox(Dialog); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName(QStringLiteral("buttonBox")); buttonBox->setGeometry(QRect(30, 240, 341, 32)); buttonBox->setOrientation(Qt::Horizontal); buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok); diff --git a/tests/auto/tools/uic/baseline/Dialog_with_Buttons_Right.ui.h b/tests/auto/tools/uic/baseline/Dialog_with_Buttons_Right.ui.h index 3d5eabaace2..4b25efe6cf0 100644 --- a/tests/auto/tools/uic/baseline/Dialog_with_Buttons_Right.ui.h +++ b/tests/auto/tools/uic/baseline/Dialog_with_Buttons_Right.ui.h @@ -28,10 +28,10 @@ public: void setupUi(QDialog *Dialog) { if (Dialog->objectName().isEmpty()) - Dialog->setObjectName(QString::fromUtf8("Dialog")); + Dialog->setObjectName(QStringLiteral("Dialog")); Dialog->resize(400, 300); buttonBox = new QDialogButtonBox(Dialog); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName(QStringLiteral("buttonBox")); buttonBox->setGeometry(QRect(290, 20, 81, 241)); buttonBox->setOrientation(Qt::Vertical); buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok); diff --git a/tests/auto/tools/uic/baseline/Dialog_without_Buttons.ui.h b/tests/auto/tools/uic/baseline/Dialog_without_Buttons.ui.h index 267646692da..21b34f86e1e 100644 --- a/tests/auto/tools/uic/baseline/Dialog_without_Buttons.ui.h +++ b/tests/auto/tools/uic/baseline/Dialog_without_Buttons.ui.h @@ -26,7 +26,7 @@ public: void setupUi(QDialog *Dialog) { if (Dialog->objectName().isEmpty()) - Dialog->setObjectName(QString::fromUtf8("Dialog")); + Dialog->setObjectName(QStringLiteral("Dialog")); Dialog->resize(400, 300); retranslateUi(Dialog); diff --git a/tests/auto/tools/uic/baseline/Main_Window.ui.h b/tests/auto/tools/uic/baseline/Main_Window.ui.h index d6e0ee4a42b..d579688a176 100644 --- a/tests/auto/tools/uic/baseline/Main_Window.ui.h +++ b/tests/auto/tools/uic/baseline/Main_Window.ui.h @@ -32,16 +32,16 @@ public: void setupUi(QMainWindow *MainWindow) { if (MainWindow->objectName().isEmpty()) - MainWindow->setObjectName(QString::fromUtf8("MainWindow")); + MainWindow->setObjectName(QStringLiteral("MainWindow")); MainWindow->resize(800, 600); menubar = new QMenuBar(MainWindow); - menubar->setObjectName(QString::fromUtf8("menubar")); + menubar->setObjectName(QStringLiteral("menubar")); MainWindow->setMenuBar(menubar); centralwidget = new QWidget(MainWindow); - centralwidget->setObjectName(QString::fromUtf8("centralwidget")); + centralwidget->setObjectName(QStringLiteral("centralwidget")); MainWindow->setCentralWidget(centralwidget); statusbar = new QStatusBar(MainWindow); - statusbar->setObjectName(QString::fromUtf8("statusbar")); + statusbar->setObjectName(QStringLiteral("statusbar")); MainWindow->setStatusBar(statusbar); retranslateUi(MainWindow); diff --git a/tests/auto/tools/uic/baseline/Widget.ui.h b/tests/auto/tools/uic/baseline/Widget.ui.h index 5dcca86903d..1ccf8e8d52a 100644 --- a/tests/auto/tools/uic/baseline/Widget.ui.h +++ b/tests/auto/tools/uic/baseline/Widget.ui.h @@ -34,22 +34,22 @@ public: void setupUi(QWidget *Form) { if (Form->objectName().isEmpty()) - Form->setObjectName(QString::fromUtf8("Form")); + Form->setObjectName(QStringLiteral("Form")); Form->resize(400, 300); vboxLayout = new QVBoxLayout(Form); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); Alabel = new QLabel(Form); - Alabel->setObjectName(QString::fromUtf8("Alabel")); + Alabel->setObjectName(QStringLiteral("Alabel")); vboxLayout->addWidget(Alabel); groupBox = new QGroupBox(Form); - groupBox->setObjectName(QString::fromUtf8("groupBox")); + groupBox->setObjectName(QStringLiteral("groupBox")); vboxLayout->addWidget(groupBox); pushButton = new QPushButton(Form); - pushButton->setObjectName(QString::fromUtf8("pushButton")); + pushButton->setObjectName(QStringLiteral("pushButton")); vboxLayout->addWidget(pushButton); diff --git a/tests/auto/tools/uic/baseline/addlinkdialog.ui.h b/tests/auto/tools/uic/baseline/addlinkdialog.ui.h index 79262a1ae64..537fa2d8b19 100644 --- a/tests/auto/tools/uic/baseline/addlinkdialog.ui.h +++ b/tests/auto/tools/uic/baseline/addlinkdialog.ui.h @@ -42,31 +42,31 @@ public: void setupUi(QDialog *AddLinkDialog) { if (AddLinkDialog->objectName().isEmpty()) - AddLinkDialog->setObjectName(QString::fromUtf8("AddLinkDialog")); + AddLinkDialog->setObjectName(QStringLiteral("AddLinkDialog")); AddLinkDialog->setSizeGripEnabled(false); AddLinkDialog->setModal(true); verticalLayout = new QVBoxLayout(AddLinkDialog); - verticalLayout->setObjectName(QString::fromUtf8("verticalLayout")); + verticalLayout->setObjectName(QStringLiteral("verticalLayout")); formLayout = new QFormLayout(); - formLayout->setObjectName(QString::fromUtf8("formLayout")); + formLayout->setObjectName(QStringLiteral("formLayout")); label = new QLabel(AddLinkDialog); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); formLayout->setWidget(0, QFormLayout::LabelRole, label); titleInput = new QLineEdit(AddLinkDialog); - titleInput->setObjectName(QString::fromUtf8("titleInput")); + titleInput->setObjectName(QStringLiteral("titleInput")); titleInput->setMinimumSize(QSize(337, 0)); formLayout->setWidget(0, QFormLayout::FieldRole, titleInput); label_2 = new QLabel(AddLinkDialog); - label_2->setObjectName(QString::fromUtf8("label_2")); + label_2->setObjectName(QStringLiteral("label_2")); formLayout->setWidget(1, QFormLayout::LabelRole, label_2); urlInput = new QLineEdit(AddLinkDialog); - urlInput->setObjectName(QString::fromUtf8("urlInput")); + urlInput->setObjectName(QStringLiteral("urlInput")); formLayout->setWidget(1, QFormLayout::FieldRole, urlInput); @@ -78,14 +78,14 @@ public: verticalLayout->addItem(verticalSpacer); line = new QFrame(AddLinkDialog); - line->setObjectName(QString::fromUtf8("line")); + line->setObjectName(QStringLiteral("line")); line->setFrameShape(QFrame::HLine); line->setFrameShadow(QFrame::Sunken); verticalLayout->addWidget(line); buttonBox = new QDialogButtonBox(AddLinkDialog); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName(QStringLiteral("buttonBox")); buttonBox->setOrientation(Qt::Horizontal); buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok); diff --git a/tests/auto/tools/uic/baseline/addtorrentform.ui.h b/tests/auto/tools/uic/baseline/addtorrentform.ui.h index a1cb6c56d4a..dfca1699aef 100644 --- a/tests/auto/tools/uic/baseline/addtorrentform.ui.h +++ b/tests/auto/tools/uic/baseline/addtorrentform.ui.h @@ -60,7 +60,7 @@ public: void setupUi(QDialog *AddTorrentFile) { if (AddTorrentFile->objectName().isEmpty()) - AddTorrentFile->setObjectName(QString::fromUtf8("AddTorrentFile")); + AddTorrentFile->setObjectName(QStringLiteral("AddTorrentFile")); AddTorrentFile->resize(464, 385); AddTorrentFile->setSizeGripEnabled(false); AddTorrentFile->setModal(true); @@ -69,57 +69,57 @@ public: vboxLayout->setSpacing(6); #endif vboxLayout->setContentsMargins(8, 8, 8, 8); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); groupBox = new QGroupBox(AddTorrentFile); - groupBox->setObjectName(QString::fromUtf8("groupBox")); + groupBox->setObjectName(QStringLiteral("groupBox")); widget = new QWidget(groupBox); - widget->setObjectName(QString::fromUtf8("widget")); + widget->setObjectName(QStringLiteral("widget")); widget->setGeometry(QRect(10, 40, 364, 33)); gridLayout = new QGridLayout(groupBox); #ifndef Q_OS_MAC gridLayout->setSpacing(6); #endif gridLayout->setContentsMargins(8, 8, 8, 8); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); label_4 = new QLabel(groupBox); - label_4->setObjectName(QString::fromUtf8("label_4")); + label_4->setObjectName(QStringLiteral("label_4")); gridLayout->addWidget(label_4, 6, 0, 1, 1); torrentFile = new QLineEdit(groupBox); - torrentFile->setObjectName(QString::fromUtf8("torrentFile")); + torrentFile->setObjectName(QStringLiteral("torrentFile")); gridLayout->addWidget(torrentFile, 0, 1, 1, 2); label_2 = new QLabel(groupBox); - label_2->setObjectName(QString::fromUtf8("label_2")); + label_2->setObjectName(QStringLiteral("label_2")); gridLayout->addWidget(label_2, 1, 0, 1, 1); browseTorrents = new QPushButton(groupBox); - browseTorrents->setObjectName(QString::fromUtf8("browseTorrents")); + browseTorrents->setObjectName(QStringLiteral("browseTorrents")); browseTorrents->setDefault(true); gridLayout->addWidget(browseTorrents, 0, 3, 1, 1); label_5 = new QLabel(groupBox); - label_5->setObjectName(QString::fromUtf8("label_5")); + label_5->setObjectName(QStringLiteral("label_5")); label_5->setAlignment(Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop); gridLayout->addWidget(label_5, 5, 0, 1, 1); label_3 = new QLabel(groupBox); - label_3->setObjectName(QString::fromUtf8("label_3")); + label_3->setObjectName(QStringLiteral("label_3")); gridLayout->addWidget(label_3, 4, 0, 1, 1); label_6 = new QLabel(groupBox); - label_6->setObjectName(QString::fromUtf8("label_6")); + label_6->setObjectName(QStringLiteral("label_6")); gridLayout->addWidget(label_6, 2, 0, 1, 1); torrentContents = new QTextEdit(groupBox); - torrentContents->setObjectName(QString::fromUtf8("torrentContents")); + torrentContents->setObjectName(QStringLiteral("torrentContents")); torrentContents->setFocusPolicy(Qt::NoFocus); torrentContents->setTabChangesFocus(true); torrentContents->setLineWrapMode(QTextEdit::NoWrap); @@ -128,43 +128,43 @@ public: gridLayout->addWidget(torrentContents, 5, 1, 1, 3); destinationFolder = new QLineEdit(groupBox); - destinationFolder->setObjectName(QString::fromUtf8("destinationFolder")); + destinationFolder->setObjectName(QStringLiteral("destinationFolder")); destinationFolder->setFocusPolicy(Qt::StrongFocus); gridLayout->addWidget(destinationFolder, 6, 1, 1, 2); announceUrl = new QLabel(groupBox); - announceUrl->setObjectName(QString::fromUtf8("announceUrl")); + announceUrl->setObjectName(QStringLiteral("announceUrl")); gridLayout->addWidget(announceUrl, 1, 1, 1, 3); label = new QLabel(groupBox); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); gridLayout->addWidget(label, 0, 0, 1, 1); browseDestination = new QPushButton(groupBox); - browseDestination->setObjectName(QString::fromUtf8("browseDestination")); + browseDestination->setObjectName(QStringLiteral("browseDestination")); gridLayout->addWidget(browseDestination, 6, 3, 1, 1); label_7 = new QLabel(groupBox); - label_7->setObjectName(QString::fromUtf8("label_7")); + label_7->setObjectName(QStringLiteral("label_7")); gridLayout->addWidget(label_7, 3, 0, 1, 1); commentLabel = new QLabel(groupBox); - commentLabel->setObjectName(QString::fromUtf8("commentLabel")); + commentLabel->setObjectName(QStringLiteral("commentLabel")); gridLayout->addWidget(commentLabel, 3, 1, 1, 3); creatorLabel = new QLabel(groupBox); - creatorLabel->setObjectName(QString::fromUtf8("creatorLabel")); + creatorLabel->setObjectName(QStringLiteral("creatorLabel")); gridLayout->addWidget(creatorLabel, 2, 1, 1, 3); sizeLabel = new QLabel(groupBox); - sizeLabel->setObjectName(QString::fromUtf8("sizeLabel")); + sizeLabel->setObjectName(QStringLiteral("sizeLabel")); gridLayout->addWidget(sizeLabel, 4, 1, 1, 3); @@ -176,19 +176,19 @@ public: hboxLayout->setSpacing(6); #endif hboxLayout->setContentsMargins(0, 0, 0, 0); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName(QStringLiteral("hboxLayout")); spacerItem = new QSpacerItem(131, 31, QSizePolicy::Expanding, QSizePolicy::Minimum); hboxLayout->addItem(spacerItem); okButton = new QPushButton(AddTorrentFile); - okButton->setObjectName(QString::fromUtf8("okButton")); + okButton->setObjectName(QStringLiteral("okButton")); okButton->setEnabled(false); hboxLayout->addWidget(okButton); cancelButton = new QPushButton(AddTorrentFile); - cancelButton->setObjectName(QString::fromUtf8("cancelButton")); + cancelButton->setObjectName(QStringLiteral("cancelButton")); hboxLayout->addWidget(cancelButton); diff --git a/tests/auto/tools/uic/baseline/authenticationdialog.ui.h b/tests/auto/tools/uic/baseline/authenticationdialog.ui.h index def597f64f3..1aef4729f6f 100644 --- a/tests/auto/tools/uic/baseline/authenticationdialog.ui.h +++ b/tests/auto/tools/uic/baseline/authenticationdialog.ui.h @@ -41,50 +41,50 @@ public: void setupUi(QDialog *Dialog) { if (Dialog->objectName().isEmpty()) - Dialog->setObjectName(QString::fromUtf8("Dialog")); + Dialog->setObjectName(QStringLiteral("Dialog")); Dialog->resize(389, 243); gridLayout = new QGridLayout(Dialog); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); label = new QLabel(Dialog); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); label->setWordWrap(false); gridLayout->addWidget(label, 0, 0, 1, 2); label_2 = new QLabel(Dialog); - label_2->setObjectName(QString::fromUtf8("label_2")); + label_2->setObjectName(QStringLiteral("label_2")); gridLayout->addWidget(label_2, 2, 0, 1, 1); userEdit = new QLineEdit(Dialog); - userEdit->setObjectName(QString::fromUtf8("userEdit")); + userEdit->setObjectName(QStringLiteral("userEdit")); gridLayout->addWidget(userEdit, 2, 1, 1, 1); label_3 = new QLabel(Dialog); - label_3->setObjectName(QString::fromUtf8("label_3")); + label_3->setObjectName(QStringLiteral("label_3")); gridLayout->addWidget(label_3, 3, 0, 1, 1); passwordEdit = new QLineEdit(Dialog); - passwordEdit->setObjectName(QString::fromUtf8("passwordEdit")); + passwordEdit->setObjectName(QStringLiteral("passwordEdit")); gridLayout->addWidget(passwordEdit, 3, 1, 1, 1); buttonBox = new QDialogButtonBox(Dialog); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName(QStringLiteral("buttonBox")); buttonBox->setOrientation(Qt::Horizontal); buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok); gridLayout->addWidget(buttonBox, 5, 0, 1, 2); label_4 = new QLabel(Dialog); - label_4->setObjectName(QString::fromUtf8("label_4")); + label_4->setObjectName(QStringLiteral("label_4")); gridLayout->addWidget(label_4, 1, 0, 1, 1); siteDescription = new QLabel(Dialog); - siteDescription->setObjectName(QString::fromUtf8("siteDescription")); + siteDescription->setObjectName(QStringLiteral("siteDescription")); QFont font; font.setBold(true); font.setWeight(75); diff --git a/tests/auto/tools/uic/baseline/backside.ui.h b/tests/auto/tools/uic/baseline/backside.ui.h index f09c468a342..7e25775c98a 100644 --- a/tests/auto/tools/uic/baseline/backside.ui.h +++ b/tests/auto/tools/uic/baseline/backside.ui.h @@ -50,47 +50,47 @@ public: void setupUi(QWidget *BackSide) { if (BackSide->objectName().isEmpty()) - BackSide->setObjectName(QString::fromUtf8("BackSide")); + BackSide->setObjectName(QStringLiteral("BackSide")); BackSide->resize(378, 385); verticalLayout_2 = new QVBoxLayout(BackSide); - verticalLayout_2->setObjectName(QString::fromUtf8("verticalLayout_2")); + verticalLayout_2->setObjectName(QStringLiteral("verticalLayout_2")); groupBox = new QGroupBox(BackSide); - groupBox->setObjectName(QString::fromUtf8("groupBox")); + groupBox->setObjectName(QStringLiteral("groupBox")); groupBox->setFlat(true); groupBox->setCheckable(true); gridLayout = new QGridLayout(groupBox); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); label = new QLabel(groupBox); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); gridLayout->addWidget(label, 0, 0, 1, 1); hostName = new QLineEdit(groupBox); - hostName->setObjectName(QString::fromUtf8("hostName")); + hostName->setObjectName(QStringLiteral("hostName")); gridLayout->addWidget(hostName, 0, 1, 1, 1); label_2 = new QLabel(groupBox); - label_2->setObjectName(QString::fromUtf8("label_2")); + label_2->setObjectName(QStringLiteral("label_2")); gridLayout->addWidget(label_2, 1, 0, 1, 1); label_3 = new QLabel(groupBox); - label_3->setObjectName(QString::fromUtf8("label_3")); + label_3->setObjectName(QStringLiteral("label_3")); gridLayout->addWidget(label_3, 2, 0, 1, 1); horizontalLayout = new QHBoxLayout(); - horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout")); + horizontalLayout->setObjectName(QStringLiteral("horizontalLayout")); horizontalSlider = new QSlider(groupBox); - horizontalSlider->setObjectName(QString::fromUtf8("horizontalSlider")); + horizontalSlider->setObjectName(QStringLiteral("horizontalSlider")); horizontalSlider->setValue(42); horizontalSlider->setOrientation(Qt::Horizontal); horizontalLayout->addWidget(horizontalSlider); spinBox = new QSpinBox(groupBox); - spinBox->setObjectName(QString::fromUtf8("spinBox")); + spinBox->setObjectName(QStringLiteral("spinBox")); spinBox->setValue(42); horizontalLayout->addWidget(spinBox); @@ -99,7 +99,7 @@ public: gridLayout->addLayout(horizontalLayout, 2, 1, 1, 1); dateTimeEdit = new QDateTimeEdit(groupBox); - dateTimeEdit->setObjectName(QString::fromUtf8("dateTimeEdit")); + dateTimeEdit->setObjectName(QStringLiteral("dateTimeEdit")); gridLayout->addWidget(dateTimeEdit, 1, 1, 1, 1); @@ -107,11 +107,11 @@ public: verticalLayout_2->addWidget(groupBox); groupBox_2 = new QGroupBox(BackSide); - groupBox_2->setObjectName(QString::fromUtf8("groupBox_2")); + groupBox_2->setObjectName(QStringLiteral("groupBox_2")); groupBox_2->setFlat(true); groupBox_2->setCheckable(true); horizontalLayout_2 = new QHBoxLayout(groupBox_2); - horizontalLayout_2->setObjectName(QString::fromUtf8("horizontalLayout_2")); + horizontalLayout_2->setObjectName(QStringLiteral("horizontalLayout_2")); treeWidget = new QTreeWidget(groupBox_2); QTreeWidgetItem *__qtreewidgetitem = new QTreeWidgetItem(treeWidget); QTreeWidgetItem *__qtreewidgetitem1 = new QTreeWidgetItem(__qtreewidgetitem); @@ -124,7 +124,7 @@ public: QTreeWidgetItem *__qtreewidgetitem4 = new QTreeWidgetItem(treeWidget); QTreeWidgetItem *__qtreewidgetitem5 = new QTreeWidgetItem(__qtreewidgetitem4); new QTreeWidgetItem(__qtreewidgetitem5); - treeWidget->setObjectName(QString::fromUtf8("treeWidget")); + treeWidget->setObjectName(QStringLiteral("treeWidget")); horizontalLayout_2->addWidget(treeWidget); diff --git a/tests/auto/tools/uic/baseline/batchtranslation.ui.h b/tests/auto/tools/uic/baseline/batchtranslation.ui.h index 302dbc2cb42..b1ba5bee31b 100644 --- a/tests/auto/tools/uic/baseline/batchtranslation.ui.h +++ b/tests/auto/tools/uic/baseline/batchtranslation.ui.h @@ -95,7 +95,7 @@ public: void setupUi(QDialog *databaseTranslationDialog) { if (databaseTranslationDialog->objectName().isEmpty()) - databaseTranslationDialog->setObjectName(QString::fromUtf8("databaseTranslationDialog")); + databaseTranslationDialog->setObjectName(QStringLiteral("databaseTranslationDialog")); databaseTranslationDialog->resize(425, 370); vboxLayout = new QVBoxLayout(databaseTranslationDialog); #ifndef Q_OS_MAC @@ -104,9 +104,9 @@ public: #ifndef Q_OS_MAC vboxLayout->setContentsMargins(9, 9, 9, 9); #endif - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); groupBox = new QGroupBox(databaseTranslationDialog); - groupBox->setObjectName(QString::fromUtf8("groupBox")); + groupBox->setObjectName(QStringLiteral("groupBox")); QSizePolicy sizePolicy(static_cast(5), static_cast(4)); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); @@ -119,15 +119,15 @@ public: #ifndef Q_OS_MAC vboxLayout1->setContentsMargins(9, 9, 9, 9); #endif - vboxLayout1->setObjectName(QString::fromUtf8("vboxLayout1")); + vboxLayout1->setObjectName(QStringLiteral("vboxLayout1")); ckOnlyUntranslated = new QCheckBox(groupBox); - ckOnlyUntranslated->setObjectName(QString::fromUtf8("ckOnlyUntranslated")); + ckOnlyUntranslated->setObjectName(QStringLiteral("ckOnlyUntranslated")); ckOnlyUntranslated->setChecked(true); vboxLayout1->addWidget(ckOnlyUntranslated); ckMarkFinished = new QCheckBox(groupBox); - ckMarkFinished->setObjectName(QString::fromUtf8("ckMarkFinished")); + ckMarkFinished->setObjectName(QStringLiteral("ckMarkFinished")); ckMarkFinished->setChecked(true); vboxLayout1->addWidget(ckMarkFinished); @@ -136,7 +136,7 @@ public: vboxLayout->addWidget(groupBox); groupBox_2 = new QGroupBox(databaseTranslationDialog); - groupBox_2->setObjectName(QString::fromUtf8("groupBox_2")); + groupBox_2->setObjectName(QStringLiteral("groupBox_2")); QSizePolicy sizePolicy1(static_cast(5), static_cast(1)); sizePolicy1.setHorizontalStretch(0); sizePolicy1.setVerticalStretch(0); @@ -149,7 +149,7 @@ public: #ifndef Q_OS_MAC vboxLayout2->setContentsMargins(9, 9, 9, 9); #endif - vboxLayout2->setObjectName(QString::fromUtf8("vboxLayout2")); + vboxLayout2->setObjectName(QStringLiteral("vboxLayout2")); hboxLayout = new QHBoxLayout(); #ifndef Q_OS_MAC hboxLayout->setSpacing(6); @@ -157,9 +157,9 @@ public: #ifndef Q_OS_MAC hboxLayout->setContentsMargins(0, 0, 0, 0); #endif - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName(QStringLiteral("hboxLayout")); phrasebookList = new QListView(groupBox_2); - phrasebookList->setObjectName(QString::fromUtf8("phrasebookList")); + phrasebookList->setObjectName(QStringLiteral("phrasebookList")); phrasebookList->setUniformItemSizes(true); hboxLayout->addWidget(phrasebookList); @@ -169,14 +169,14 @@ public: vboxLayout3->setSpacing(6); #endif vboxLayout3->setContentsMargins(0, 0, 0, 0); - vboxLayout3->setObjectName(QString::fromUtf8("vboxLayout3")); + vboxLayout3->setObjectName(QStringLiteral("vboxLayout3")); moveUpButton = new QPushButton(groupBox_2); - moveUpButton->setObjectName(QString::fromUtf8("moveUpButton")); + moveUpButton->setObjectName(QStringLiteral("moveUpButton")); vboxLayout3->addWidget(moveUpButton); moveDownButton = new QPushButton(groupBox_2); - moveDownButton->setObjectName(QString::fromUtf8("moveDownButton")); + moveDownButton->setObjectName(QStringLiteral("moveDownButton")); vboxLayout3->addWidget(moveDownButton); @@ -191,7 +191,7 @@ public: vboxLayout2->addLayout(hboxLayout); label = new QLabel(groupBox_2); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); label->setWordWrap(true); vboxLayout2->addWidget(label); @@ -204,18 +204,18 @@ public: hboxLayout1->setSpacing(6); #endif hboxLayout1->setContentsMargins(0, 0, 0, 0); - hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1")); + hboxLayout1->setObjectName(QStringLiteral("hboxLayout1")); spacerItem1 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); hboxLayout1->addItem(spacerItem1); runButton = new QPushButton(databaseTranslationDialog); - runButton->setObjectName(QString::fromUtf8("runButton")); + runButton->setObjectName(QStringLiteral("runButton")); hboxLayout1->addWidget(runButton); cancelButton = new QPushButton(databaseTranslationDialog); - cancelButton->setObjectName(QString::fromUtf8("cancelButton")); + cancelButton->setObjectName(QStringLiteral("cancelButton")); hboxLayout1->addWidget(cancelButton); diff --git a/tests/auto/tools/uic/baseline/bookmarkdialog.ui.h b/tests/auto/tools/uic/baseline/bookmarkdialog.ui.h index a178497e262..33c0d19ee2f 100644 --- a/tests/auto/tools/uic/baseline/bookmarkdialog.ui.h +++ b/tests/auto/tools/uic/baseline/bookmarkdialog.ui.h @@ -51,7 +51,7 @@ public: void setupUi(QDialog *BookmarkDialog) { if (BookmarkDialog->objectName().isEmpty()) - BookmarkDialog->setObjectName(QString::fromUtf8("BookmarkDialog")); + BookmarkDialog->setObjectName(QStringLiteral("BookmarkDialog")); BookmarkDialog->resize(450, 135); QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred); sizePolicy.setHorizontalStretch(0); @@ -59,18 +59,18 @@ public: sizePolicy.setHeightForWidth(BookmarkDialog->sizePolicy().hasHeightForWidth()); BookmarkDialog->setSizePolicy(sizePolicy); verticalLayout_3 = new QVBoxLayout(BookmarkDialog); - verticalLayout_3->setObjectName(QString::fromUtf8("verticalLayout_3")); + verticalLayout_3->setObjectName(QStringLiteral("verticalLayout_3")); horizontalLayout = new QHBoxLayout(); - horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout")); + horizontalLayout->setObjectName(QStringLiteral("horizontalLayout")); verticalLayout_2 = new QVBoxLayout(); - verticalLayout_2->setObjectName(QString::fromUtf8("verticalLayout_2")); + verticalLayout_2->setObjectName(QStringLiteral("verticalLayout_2")); label = new QLabel(BookmarkDialog); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); verticalLayout_2->addWidget(label); label_2 = new QLabel(BookmarkDialog); - label_2->setObjectName(QString::fromUtf8("label_2")); + label_2->setObjectName(QStringLiteral("label_2")); verticalLayout_2->addWidget(label_2); @@ -78,14 +78,14 @@ public: horizontalLayout->addLayout(verticalLayout_2); verticalLayout = new QVBoxLayout(); - verticalLayout->setObjectName(QString::fromUtf8("verticalLayout")); + verticalLayout->setObjectName(QStringLiteral("verticalLayout")); bookmarkEdit = new QLineEdit(BookmarkDialog); - bookmarkEdit->setObjectName(QString::fromUtf8("bookmarkEdit")); + bookmarkEdit->setObjectName(QStringLiteral("bookmarkEdit")); verticalLayout->addWidget(bookmarkEdit); bookmarkFolders = new QComboBox(BookmarkDialog); - bookmarkFolders->setObjectName(QString::fromUtf8("bookmarkFolders")); + bookmarkFolders->setObjectName(QStringLiteral("bookmarkFolders")); verticalLayout->addWidget(bookmarkFolders); @@ -96,15 +96,15 @@ public: verticalLayout_3->addLayout(horizontalLayout); horizontalLayout_3 = new QHBoxLayout(); - horizontalLayout_3->setObjectName(QString::fromUtf8("horizontalLayout_3")); + horizontalLayout_3->setObjectName(QStringLiteral("horizontalLayout_3")); toolButton = new QToolButton(BookmarkDialog); - toolButton->setObjectName(QString::fromUtf8("toolButton")); + toolButton->setObjectName(QStringLiteral("toolButton")); toolButton->setMinimumSize(QSize(25, 20)); horizontalLayout_3->addWidget(toolButton); line = new QFrame(BookmarkDialog); - line->setObjectName(QString::fromUtf8("line")); + line->setObjectName(QStringLiteral("line")); line->setFrameShape(QFrame::HLine); line->setFrameShadow(QFrame::Sunken); @@ -114,7 +114,7 @@ public: verticalLayout_3->addLayout(horizontalLayout_3); bookmarkWidget = new BookmarkWidget(BookmarkDialog); - bookmarkWidget->setObjectName(QString::fromUtf8("bookmarkWidget")); + bookmarkWidget->setObjectName(QStringLiteral("bookmarkWidget")); bookmarkWidget->setEnabled(true); QSizePolicy sizePolicy1(QSizePolicy::Expanding, QSizePolicy::Ignored); sizePolicy1.setHorizontalStretch(0); @@ -125,14 +125,14 @@ public: verticalLayout_3->addWidget(bookmarkWidget); horizontalLayout_4 = new QHBoxLayout(); - horizontalLayout_4->setObjectName(QString::fromUtf8("horizontalLayout_4")); + horizontalLayout_4->setObjectName(QStringLiteral("horizontalLayout_4")); newFolderButton = new QPushButton(BookmarkDialog); - newFolderButton->setObjectName(QString::fromUtf8("newFolderButton")); + newFolderButton->setObjectName(QStringLiteral("newFolderButton")); horizontalLayout_4->addWidget(newFolderButton); buttonBox = new QDialogButtonBox(BookmarkDialog); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName(QStringLiteral("buttonBox")); buttonBox->setOrientation(Qt::Horizontal); buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok); diff --git a/tests/auto/tools/uic/baseline/bookwindow.ui.h b/tests/auto/tools/uic/baseline/bookwindow.ui.h index 0463aeb8c9e..d27717296c1 100644 --- a/tests/auto/tools/uic/baseline/bookwindow.ui.h +++ b/tests/auto/tools/uic/baseline/bookwindow.ui.h @@ -52,10 +52,10 @@ public: void setupUi(QMainWindow *BookWindow) { if (BookWindow->objectName().isEmpty()) - BookWindow->setObjectName(QString::fromUtf8("BookWindow")); + BookWindow->setObjectName(QStringLiteral("BookWindow")); BookWindow->resize(601, 420); centralWidget = new QWidget(BookWindow); - centralWidget->setObjectName(QString::fromUtf8("centralWidget")); + centralWidget->setObjectName(QStringLiteral("centralWidget")); vboxLayout = new QVBoxLayout(centralWidget); #ifndef Q_OS_MAC vboxLayout->setSpacing(6); @@ -63,9 +63,9 @@ public: #ifndef Q_OS_MAC vboxLayout->setContentsMargins(9, 9, 9, 9); #endif - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); groupBox = new QGroupBox(centralWidget); - groupBox->setObjectName(QString::fromUtf8("groupBox")); + groupBox->setObjectName(QStringLiteral("groupBox")); vboxLayout1 = new QVBoxLayout(groupBox); #ifndef Q_OS_MAC vboxLayout1->setSpacing(6); @@ -73,57 +73,57 @@ public: #ifndef Q_OS_MAC vboxLayout1->setContentsMargins(9, 9, 9, 9); #endif - vboxLayout1->setObjectName(QString::fromUtf8("vboxLayout1")); + vboxLayout1->setObjectName(QStringLiteral("vboxLayout1")); bookTable = new QTableView(groupBox); - bookTable->setObjectName(QString::fromUtf8("bookTable")); + bookTable->setObjectName(QStringLiteral("bookTable")); bookTable->setSelectionBehavior(QAbstractItemView::SelectRows); vboxLayout1->addWidget(bookTable); groupBox_2 = new QGroupBox(groupBox); - groupBox_2->setObjectName(QString::fromUtf8("groupBox_2")); + groupBox_2->setObjectName(QStringLiteral("groupBox_2")); formLayout = new QFormLayout(groupBox_2); - formLayout->setObjectName(QString::fromUtf8("formLayout")); + formLayout->setObjectName(QStringLiteral("formLayout")); label_5 = new QLabel(groupBox_2); - label_5->setObjectName(QString::fromUtf8("label_5")); + label_5->setObjectName(QStringLiteral("label_5")); formLayout->setWidget(0, QFormLayout::LabelRole, label_5); titleEdit = new QLineEdit(groupBox_2); - titleEdit->setObjectName(QString::fromUtf8("titleEdit")); + titleEdit->setObjectName(QStringLiteral("titleEdit")); titleEdit->setEnabled(true); formLayout->setWidget(0, QFormLayout::FieldRole, titleEdit); label_2_2_2_2 = new QLabel(groupBox_2); - label_2_2_2_2->setObjectName(QString::fromUtf8("label_2_2_2_2")); + label_2_2_2_2->setObjectName(QStringLiteral("label_2_2_2_2")); formLayout->setWidget(1, QFormLayout::LabelRole, label_2_2_2_2); authorEdit = new QComboBox(groupBox_2); - authorEdit->setObjectName(QString::fromUtf8("authorEdit")); + authorEdit->setObjectName(QStringLiteral("authorEdit")); authorEdit->setEnabled(true); formLayout->setWidget(1, QFormLayout::FieldRole, authorEdit); label_3 = new QLabel(groupBox_2); - label_3->setObjectName(QString::fromUtf8("label_3")); + label_3->setObjectName(QStringLiteral("label_3")); formLayout->setWidget(2, QFormLayout::LabelRole, label_3); genreEdit = new QComboBox(groupBox_2); - genreEdit->setObjectName(QString::fromUtf8("genreEdit")); + genreEdit->setObjectName(QStringLiteral("genreEdit")); genreEdit->setEnabled(true); formLayout->setWidget(2, QFormLayout::FieldRole, genreEdit); label_4 = new QLabel(groupBox_2); - label_4->setObjectName(QString::fromUtf8("label_4")); + label_4->setObjectName(QStringLiteral("label_4")); formLayout->setWidget(3, QFormLayout::LabelRole, label_4); yearEdit = new QSpinBox(groupBox_2); - yearEdit->setObjectName(QString::fromUtf8("yearEdit")); + yearEdit->setObjectName(QStringLiteral("yearEdit")); yearEdit->setEnabled(true); yearEdit->setMaximum(2100); yearEdit->setMinimum(-1000); @@ -131,12 +131,12 @@ public: formLayout->setWidget(3, QFormLayout::FieldRole, yearEdit); label = new QLabel(groupBox_2); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); formLayout->setWidget(4, QFormLayout::LabelRole, label); ratingEdit = new QSpinBox(groupBox_2); - ratingEdit->setObjectName(QString::fromUtf8("ratingEdit")); + ratingEdit->setObjectName(QStringLiteral("ratingEdit")); ratingEdit->setMaximum(5); formLayout->setWidget(4, QFormLayout::FieldRole, ratingEdit); diff --git a/tests/auto/tools/uic/baseline/browserwidget.ui.h b/tests/auto/tools/uic/baseline/browserwidget.ui.h index 7214898a4f6..9d7a648b213 100644 --- a/tests/auto/tools/uic/baseline/browserwidget.ui.h +++ b/tests/auto/tools/uic/baseline/browserwidget.ui.h @@ -48,22 +48,22 @@ public: void setupUi(QWidget *Browser) { if (Browser->objectName().isEmpty()) - Browser->setObjectName(QString::fromUtf8("Browser")); + Browser->setObjectName(QStringLiteral("Browser")); Browser->resize(765, 515); insertRowAction = new QAction(Browser); - insertRowAction->setObjectName(QString::fromUtf8("insertRowAction")); + insertRowAction->setObjectName(QStringLiteral("insertRowAction")); insertRowAction->setEnabled(false); deleteRowAction = new QAction(Browser); - deleteRowAction->setObjectName(QString::fromUtf8("deleteRowAction")); + deleteRowAction->setObjectName(QStringLiteral("deleteRowAction")); deleteRowAction->setEnabled(false); vboxLayout = new QVBoxLayout(Browser); #ifndef Q_OS_MAC vboxLayout->setSpacing(6); #endif vboxLayout->setContentsMargins(8, 8, 8, 8); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); splitter_2 = new QSplitter(Browser); - splitter_2->setObjectName(QString::fromUtf8("splitter_2")); + splitter_2->setObjectName(QStringLiteral("splitter_2")); QSizePolicy sizePolicy(static_cast(7), static_cast(7)); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); @@ -71,7 +71,7 @@ public: splitter_2->setSizePolicy(sizePolicy); splitter_2->setOrientation(Qt::Horizontal); connectionWidget = new ConnectionWidget(splitter_2); - connectionWidget->setObjectName(QString::fromUtf8("connectionWidget")); + connectionWidget->setObjectName(QStringLiteral("connectionWidget")); QSizePolicy sizePolicy1(static_cast(13), static_cast(7)); sizePolicy1.setHorizontalStretch(1); sizePolicy1.setVerticalStretch(0); @@ -79,7 +79,7 @@ public: connectionWidget->setSizePolicy(sizePolicy1); splitter_2->addWidget(connectionWidget); table = new QTableView(splitter_2); - table->setObjectName(QString::fromUtf8("table")); + table->setObjectName(QStringLiteral("table")); QSizePolicy sizePolicy2(static_cast(7), static_cast(7)); sizePolicy2.setHorizontalStretch(2); sizePolicy2.setVerticalStretch(0); @@ -92,7 +92,7 @@ public: vboxLayout->addWidget(splitter_2); groupBox = new QGroupBox(Browser); - groupBox->setObjectName(QString::fromUtf8("groupBox")); + groupBox->setObjectName(QStringLiteral("groupBox")); QSizePolicy sizePolicy3(static_cast(5), static_cast(3)); sizePolicy3.setHorizontalStretch(0); sizePolicy3.setVerticalStretch(0); @@ -106,9 +106,9 @@ public: #ifndef Q_OS_MAC vboxLayout1->setContentsMargins(9, 9, 9, 9); #endif - vboxLayout1->setObjectName(QString::fromUtf8("vboxLayout1")); + vboxLayout1->setObjectName(QStringLiteral("vboxLayout1")); sqlEdit = new QTextEdit(groupBox); - sqlEdit->setObjectName(QString::fromUtf8("sqlEdit")); + sqlEdit->setObjectName(QStringLiteral("sqlEdit")); QSizePolicy sizePolicy4(static_cast(7), static_cast(3)); sizePolicy4.setHorizontalStretch(0); sizePolicy4.setVerticalStretch(0); @@ -124,18 +124,18 @@ public: hboxLayout->setSpacing(6); #endif hboxLayout->setContentsMargins(1, 1, 1, 1); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName(QStringLiteral("hboxLayout")); spacerItem = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); hboxLayout->addItem(spacerItem); clearButton = new QPushButton(groupBox); - clearButton->setObjectName(QString::fromUtf8("clearButton")); + clearButton->setObjectName(QStringLiteral("clearButton")); hboxLayout->addWidget(clearButton); submitButton = new QPushButton(groupBox); - submitButton->setObjectName(QString::fromUtf8("submitButton")); + submitButton->setObjectName(QStringLiteral("submitButton")); hboxLayout->addWidget(submitButton); diff --git a/tests/auto/tools/uic/baseline/calculator.ui.h b/tests/auto/tools/uic/baseline/calculator.ui.h index 3d69c9fdfd7..8a33fcbbd95 100644 --- a/tests/auto/tools/uic/baseline/calculator.ui.h +++ b/tests/auto/tools/uic/baseline/calculator.ui.h @@ -56,7 +56,7 @@ public: void setupUi(QWidget *Calculator) { if (Calculator->objectName().isEmpty()) - Calculator->setObjectName(QString::fromUtf8("Calculator")); + Calculator->setObjectName(QStringLiteral("Calculator")); Calculator->resize(314, 301); QSizePolicy sizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); sizePolicy.setHorizontalStretch(0); @@ -66,88 +66,88 @@ public: Calculator->setMinimumSize(QSize(314, 301)); Calculator->setMaximumSize(QSize(314, 301)); backspaceButton = new QToolButton(Calculator); - backspaceButton->setObjectName(QString::fromUtf8("backspaceButton")); + backspaceButton->setObjectName(QStringLiteral("backspaceButton")); backspaceButton->setGeometry(QRect(10, 50, 91, 41)); clearButton = new QToolButton(Calculator); - clearButton->setObjectName(QString::fromUtf8("clearButton")); + clearButton->setObjectName(QStringLiteral("clearButton")); clearButton->setGeometry(QRect(110, 50, 91, 41)); clearAllButton = new QToolButton(Calculator); - clearAllButton->setObjectName(QString::fromUtf8("clearAllButton")); + clearAllButton->setObjectName(QStringLiteral("clearAllButton")); clearAllButton->setGeometry(QRect(210, 50, 91, 41)); clearMemoryButton = new QToolButton(Calculator); - clearMemoryButton->setObjectName(QString::fromUtf8("clearMemoryButton")); + clearMemoryButton->setObjectName(QStringLiteral("clearMemoryButton")); clearMemoryButton->setGeometry(QRect(10, 100, 41, 41)); readMemoryButton = new QToolButton(Calculator); - readMemoryButton->setObjectName(QString::fromUtf8("readMemoryButton")); + readMemoryButton->setObjectName(QStringLiteral("readMemoryButton")); readMemoryButton->setGeometry(QRect(10, 150, 41, 41)); setMemoryButton = new QToolButton(Calculator); - setMemoryButton->setObjectName(QString::fromUtf8("setMemoryButton")); + setMemoryButton->setObjectName(QStringLiteral("setMemoryButton")); setMemoryButton->setGeometry(QRect(10, 200, 41, 41)); addToMemoryButton = new QToolButton(Calculator); - addToMemoryButton->setObjectName(QString::fromUtf8("addToMemoryButton")); + addToMemoryButton->setObjectName(QStringLiteral("addToMemoryButton")); addToMemoryButton->setGeometry(QRect(10, 250, 41, 41)); sevenButton = new QToolButton(Calculator); - sevenButton->setObjectName(QString::fromUtf8("sevenButton")); + sevenButton->setObjectName(QStringLiteral("sevenButton")); sevenButton->setGeometry(QRect(60, 100, 41, 41)); eightButton = new QToolButton(Calculator); - eightButton->setObjectName(QString::fromUtf8("eightButton")); + eightButton->setObjectName(QStringLiteral("eightButton")); eightButton->setGeometry(QRect(110, 100, 41, 41)); nineButton = new QToolButton(Calculator); - nineButton->setObjectName(QString::fromUtf8("nineButton")); + nineButton->setObjectName(QStringLiteral("nineButton")); nineButton->setGeometry(QRect(160, 100, 41, 41)); fourButton = new QToolButton(Calculator); - fourButton->setObjectName(QString::fromUtf8("fourButton")); + fourButton->setObjectName(QStringLiteral("fourButton")); fourButton->setGeometry(QRect(60, 150, 41, 41)); fiveButton = new QToolButton(Calculator); - fiveButton->setObjectName(QString::fromUtf8("fiveButton")); + fiveButton->setObjectName(QStringLiteral("fiveButton")); fiveButton->setGeometry(QRect(110, 150, 41, 41)); sixButton = new QToolButton(Calculator); - sixButton->setObjectName(QString::fromUtf8("sixButton")); + sixButton->setObjectName(QStringLiteral("sixButton")); sixButton->setGeometry(QRect(160, 150, 41, 41)); oneButton = new QToolButton(Calculator); - oneButton->setObjectName(QString::fromUtf8("oneButton")); + oneButton->setObjectName(QStringLiteral("oneButton")); oneButton->setGeometry(QRect(60, 200, 41, 41)); twoButton = new QToolButton(Calculator); - twoButton->setObjectName(QString::fromUtf8("twoButton")); + twoButton->setObjectName(QStringLiteral("twoButton")); twoButton->setGeometry(QRect(110, 200, 41, 41)); threeButton = new QToolButton(Calculator); - threeButton->setObjectName(QString::fromUtf8("threeButton")); + threeButton->setObjectName(QStringLiteral("threeButton")); threeButton->setGeometry(QRect(160, 200, 41, 41)); zeroButton = new QToolButton(Calculator); - zeroButton->setObjectName(QString::fromUtf8("zeroButton")); + zeroButton->setObjectName(QStringLiteral("zeroButton")); zeroButton->setGeometry(QRect(60, 250, 41, 41)); pointButton = new QToolButton(Calculator); - pointButton->setObjectName(QString::fromUtf8("pointButton")); + pointButton->setObjectName(QStringLiteral("pointButton")); pointButton->setGeometry(QRect(110, 250, 41, 41)); changeSignButton = new QToolButton(Calculator); - changeSignButton->setObjectName(QString::fromUtf8("changeSignButton")); + changeSignButton->setObjectName(QStringLiteral("changeSignButton")); changeSignButton->setGeometry(QRect(160, 250, 41, 41)); plusButton = new QToolButton(Calculator); - plusButton->setObjectName(QString::fromUtf8("plusButton")); + plusButton->setObjectName(QStringLiteral("plusButton")); plusButton->setGeometry(QRect(210, 250, 41, 41)); divisionButton = new QToolButton(Calculator); - divisionButton->setObjectName(QString::fromUtf8("divisionButton")); + divisionButton->setObjectName(QStringLiteral("divisionButton")); divisionButton->setGeometry(QRect(210, 100, 41, 41)); timesButton = new QToolButton(Calculator); - timesButton->setObjectName(QString::fromUtf8("timesButton")); + timesButton->setObjectName(QStringLiteral("timesButton")); timesButton->setGeometry(QRect(210, 150, 41, 41)); minusButton = new QToolButton(Calculator); - minusButton->setObjectName(QString::fromUtf8("minusButton")); + minusButton->setObjectName(QStringLiteral("minusButton")); minusButton->setGeometry(QRect(210, 200, 41, 41)); squareRootButton = new QToolButton(Calculator); - squareRootButton->setObjectName(QString::fromUtf8("squareRootButton")); + squareRootButton->setObjectName(QStringLiteral("squareRootButton")); squareRootButton->setGeometry(QRect(260, 100, 41, 41)); powerButton = new QToolButton(Calculator); - powerButton->setObjectName(QString::fromUtf8("powerButton")); + powerButton->setObjectName(QStringLiteral("powerButton")); powerButton->setGeometry(QRect(260, 150, 41, 41)); reciprocalButton = new QToolButton(Calculator); - reciprocalButton->setObjectName(QString::fromUtf8("reciprocalButton")); + reciprocalButton->setObjectName(QStringLiteral("reciprocalButton")); reciprocalButton->setGeometry(QRect(260, 200, 41, 41)); equalButton = new QToolButton(Calculator); - equalButton->setObjectName(QString::fromUtf8("equalButton")); + equalButton->setObjectName(QStringLiteral("equalButton")); equalButton->setGeometry(QRect(260, 250, 41, 41)); display = new QLineEdit(Calculator); - display->setObjectName(QString::fromUtf8("display")); + display->setObjectName(QStringLiteral("display")); display->setGeometry(QRect(10, 10, 291, 31)); display->setMaxLength(15); display->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); diff --git a/tests/auto/tools/uic/baseline/calculatorform.ui.h b/tests/auto/tools/uic/baseline/calculatorform.ui.h index b38a9404489..cbc62367e03 100644 --- a/tests/auto/tools/uic/baseline/calculatorform.ui.h +++ b/tests/auto/tools/uic/baseline/calculatorform.ui.h @@ -47,7 +47,7 @@ public: void setupUi(QWidget *CalculatorForm) { if (CalculatorForm->objectName().isEmpty()) - CalculatorForm->setObjectName(QString::fromUtf8("CalculatorForm")); + CalculatorForm->setObjectName(QStringLiteral("CalculatorForm")); CalculatorForm->resize(276, 98); QSizePolicy sizePolicy(static_cast(5), static_cast(5)); sizePolicy.setHorizontalStretch(0); @@ -61,30 +61,30 @@ public: #ifndef Q_OS_MAC gridLayout->setContentsMargins(9, 9, 9, 9); #endif - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); - gridLayout->setObjectName(QString::fromUtf8("")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); + gridLayout->setObjectName(QStringLiteral("")); hboxLayout = new QHBoxLayout(); #ifndef Q_OS_MAC hboxLayout->setSpacing(6); #endif hboxLayout->setContentsMargins(1, 1, 1, 1); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); - hboxLayout->setObjectName(QString::fromUtf8("")); + hboxLayout->setObjectName(QStringLiteral("hboxLayout")); + hboxLayout->setObjectName(QStringLiteral("")); vboxLayout = new QVBoxLayout(); #ifndef Q_OS_MAC vboxLayout->setSpacing(6); #endif vboxLayout->setContentsMargins(1, 1, 1, 1); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); - vboxLayout->setObjectName(QString::fromUtf8("")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("")); label = new QLabel(CalculatorForm); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); label->setGeometry(QRect(1, 1, 45, 19)); vboxLayout->addWidget(label); inputSpinBox1 = new QSpinBox(CalculatorForm); - inputSpinBox1->setObjectName(QString::fromUtf8("inputSpinBox1")); + inputSpinBox1->setObjectName(QStringLiteral("inputSpinBox1")); inputSpinBox1->setGeometry(QRect(1, 26, 45, 25)); inputSpinBox1->setMouseTracking(true); @@ -94,7 +94,7 @@ public: hboxLayout->addLayout(vboxLayout); label_3 = new QLabel(CalculatorForm); - label_3->setObjectName(QString::fromUtf8("label_3")); + label_3->setObjectName(QStringLiteral("label_3")); label_3->setGeometry(QRect(54, 1, 7, 52)); label_3->setAlignment(Qt::AlignCenter); @@ -105,16 +105,16 @@ public: vboxLayout1->setSpacing(6); #endif vboxLayout1->setContentsMargins(1, 1, 1, 1); - vboxLayout1->setObjectName(QString::fromUtf8("vboxLayout1")); - vboxLayout1->setObjectName(QString::fromUtf8("")); + vboxLayout1->setObjectName(QStringLiteral("vboxLayout1")); + vboxLayout1->setObjectName(QStringLiteral("")); label_2 = new QLabel(CalculatorForm); - label_2->setObjectName(QString::fromUtf8("label_2")); + label_2->setObjectName(QStringLiteral("label_2")); label_2->setGeometry(QRect(1, 1, 45, 19)); vboxLayout1->addWidget(label_2); inputSpinBox2 = new QSpinBox(CalculatorForm); - inputSpinBox2->setObjectName(QString::fromUtf8("inputSpinBox2")); + inputSpinBox2->setObjectName(QStringLiteral("inputSpinBox2")); inputSpinBox2->setGeometry(QRect(1, 26, 45, 25)); inputSpinBox2->setMouseTracking(true); @@ -124,7 +124,7 @@ public: hboxLayout->addLayout(vboxLayout1); label_3_2 = new QLabel(CalculatorForm); - label_3_2->setObjectName(QString::fromUtf8("label_3_2")); + label_3_2->setObjectName(QStringLiteral("label_3_2")); label_3_2->setGeometry(QRect(120, 1, 7, 52)); label_3_2->setAlignment(Qt::AlignCenter); @@ -135,16 +135,16 @@ public: vboxLayout2->setSpacing(6); #endif vboxLayout2->setContentsMargins(1, 1, 1, 1); - vboxLayout2->setObjectName(QString::fromUtf8("vboxLayout2")); - vboxLayout2->setObjectName(QString::fromUtf8("")); + vboxLayout2->setObjectName(QStringLiteral("vboxLayout2")); + vboxLayout2->setObjectName(QStringLiteral("")); label_2_2_2 = new QLabel(CalculatorForm); - label_2_2_2->setObjectName(QString::fromUtf8("label_2_2_2")); + label_2_2_2->setObjectName(QStringLiteral("label_2_2_2")); label_2_2_2->setGeometry(QRect(1, 1, 37, 17)); vboxLayout2->addWidget(label_2_2_2); outputWidget = new QLabel(CalculatorForm); - outputWidget->setObjectName(QString::fromUtf8("outputWidget")); + outputWidget->setObjectName(QStringLiteral("outputWidget")); outputWidget->setGeometry(QRect(1, 24, 37, 27)); outputWidget->setFrameShape(QFrame::Box); outputWidget->setFrameShadow(QFrame::Sunken); diff --git a/tests/auto/tools/uic/baseline/certificateinfo.ui.h b/tests/auto/tools/uic/baseline/certificateinfo.ui.h index e047aeddc04..8ea1ebebf75 100644 --- a/tests/auto/tools/uic/baseline/certificateinfo.ui.h +++ b/tests/auto/tools/uic/baseline/certificateinfo.ui.h @@ -42,16 +42,16 @@ public: void setupUi(QDialog *CertificateInfo) { if (CertificateInfo->objectName().isEmpty()) - CertificateInfo->setObjectName(QString::fromUtf8("CertificateInfo")); + CertificateInfo->setObjectName(QStringLiteral("CertificateInfo")); CertificateInfo->resize(400, 397); vboxLayout = new QVBoxLayout(CertificateInfo); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); groupBox = new QGroupBox(CertificateInfo); - groupBox->setObjectName(QString::fromUtf8("groupBox")); + groupBox->setObjectName(QStringLiteral("groupBox")); hboxLayout = new QHBoxLayout(groupBox); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName(QStringLiteral("hboxLayout")); certificationPathView = new QListWidget(groupBox); - certificationPathView->setObjectName(QString::fromUtf8("certificationPathView")); + certificationPathView->setObjectName(QStringLiteral("certificationPathView")); hboxLayout->addWidget(certificationPathView); @@ -59,11 +59,11 @@ public: vboxLayout->addWidget(groupBox); groupBox_2 = new QGroupBox(CertificateInfo); - groupBox_2->setObjectName(QString::fromUtf8("groupBox_2")); + groupBox_2->setObjectName(QStringLiteral("groupBox_2")); hboxLayout1 = new QHBoxLayout(groupBox_2); - hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1")); + hboxLayout1->setObjectName(QStringLiteral("hboxLayout1")); certificateInfoView = new QListWidget(groupBox_2); - certificateInfoView->setObjectName(QString::fromUtf8("certificateInfoView")); + certificateInfoView->setObjectName(QStringLiteral("certificateInfoView")); hboxLayout1->addWidget(certificateInfoView); @@ -71,13 +71,13 @@ public: vboxLayout->addWidget(groupBox_2); hboxLayout2 = new QHBoxLayout(); - hboxLayout2->setObjectName(QString::fromUtf8("hboxLayout2")); + hboxLayout2->setObjectName(QStringLiteral("hboxLayout2")); spacerItem = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); hboxLayout2->addItem(spacerItem); buttonBox = new QDialogButtonBox(CertificateInfo); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName(QStringLiteral("buttonBox")); buttonBox->setStandardButtons(QDialogButtonBox::Close); hboxLayout2->addWidget(buttonBox); diff --git a/tests/auto/tools/uic/baseline/chatdialog.ui.h b/tests/auto/tools/uic/baseline/chatdialog.ui.h index 216e627e76c..473d20de705 100644 --- a/tests/auto/tools/uic/baseline/chatdialog.ui.h +++ b/tests/auto/tools/uic/baseline/chatdialog.ui.h @@ -39,7 +39,7 @@ public: void setupUi(QDialog *ChatDialog) { if (ChatDialog->objectName().isEmpty()) - ChatDialog->setObjectName(QString::fromUtf8("ChatDialog")); + ChatDialog->setObjectName(QStringLiteral("ChatDialog")); ChatDialog->resize(513, 349); vboxLayout = new QVBoxLayout(ChatDialog); #ifndef Q_OS_MAC @@ -48,7 +48,7 @@ public: #ifndef Q_OS_MAC vboxLayout->setContentsMargins(9, 9, 9, 9); #endif - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); hboxLayout = new QHBoxLayout(); #ifndef Q_OS_MAC hboxLayout->setSpacing(6); @@ -56,16 +56,16 @@ public: #ifndef Q_OS_MAC hboxLayout->setContentsMargins(0, 0, 0, 0); #endif - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName(QStringLiteral("hboxLayout")); textEdit = new QTextEdit(ChatDialog); - textEdit->setObjectName(QString::fromUtf8("textEdit")); + textEdit->setObjectName(QStringLiteral("textEdit")); textEdit->setFocusPolicy(Qt::NoFocus); textEdit->setReadOnly(true); hboxLayout->addWidget(textEdit); listWidget = new QListWidget(ChatDialog); - listWidget->setObjectName(QString::fromUtf8("listWidget")); + listWidget->setObjectName(QStringLiteral("listWidget")); listWidget->setMaximumSize(QSize(180, 16777215)); listWidget->setFocusPolicy(Qt::NoFocus); @@ -79,14 +79,14 @@ public: hboxLayout1->setSpacing(6); #endif hboxLayout1->setContentsMargins(0, 0, 0, 0); - hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1")); + hboxLayout1->setObjectName(QStringLiteral("hboxLayout1")); label = new QLabel(ChatDialog); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); hboxLayout1->addWidget(label); lineEdit = new QLineEdit(ChatDialog); - lineEdit->setObjectName(QString::fromUtf8("lineEdit")); + lineEdit->setObjectName(QStringLiteral("lineEdit")); hboxLayout1->addWidget(lineEdit); diff --git a/tests/auto/tools/uic/baseline/chatmainwindow.ui.h b/tests/auto/tools/uic/baseline/chatmainwindow.ui.h index 1001e859313..c077dd75011 100644 --- a/tests/auto/tools/uic/baseline/chatmainwindow.ui.h +++ b/tests/auto/tools/uic/baseline/chatmainwindow.ui.h @@ -51,16 +51,16 @@ public: void setupUi(QMainWindow *ChatMainWindow) { if (ChatMainWindow->objectName().isEmpty()) - ChatMainWindow->setObjectName(QString::fromUtf8("ChatMainWindow")); + ChatMainWindow->setObjectName(QStringLiteral("ChatMainWindow")); ChatMainWindow->resize(800, 600); actionQuit = new QAction(ChatMainWindow); - actionQuit->setObjectName(QString::fromUtf8("actionQuit")); + actionQuit->setObjectName(QStringLiteral("actionQuit")); actionAboutQt = new QAction(ChatMainWindow); - actionAboutQt->setObjectName(QString::fromUtf8("actionAboutQt")); + actionAboutQt->setObjectName(QStringLiteral("actionAboutQt")); actionChangeNickname = new QAction(ChatMainWindow); - actionChangeNickname->setObjectName(QString::fromUtf8("actionChangeNickname")); + actionChangeNickname->setObjectName(QStringLiteral("actionChangeNickname")); centralwidget = new QWidget(ChatMainWindow); - centralwidget->setObjectName(QString::fromUtf8("centralwidget")); + centralwidget->setObjectName(QStringLiteral("centralwidget")); hboxLayout = new QHBoxLayout(centralwidget); #ifndef Q_OS_MAC hboxLayout->setSpacing(6); @@ -68,7 +68,7 @@ public: #ifndef Q_OS_MAC hboxLayout->setContentsMargins(9, 9, 9, 9); #endif - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName(QStringLiteral("hboxLayout")); vboxLayout = new QVBoxLayout(); #ifndef Q_OS_MAC vboxLayout->setSpacing(6); @@ -76,9 +76,9 @@ public: #ifndef Q_OS_MAC vboxLayout->setContentsMargins(0, 0, 0, 0); #endif - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); chatHistory = new QTextBrowser(centralwidget); - chatHistory->setObjectName(QString::fromUtf8("chatHistory")); + chatHistory->setObjectName(QStringLiteral("chatHistory")); chatHistory->setAcceptDrops(false); chatHistory->setAcceptRichText(true); @@ -89,19 +89,19 @@ public: hboxLayout1->setSpacing(6); #endif hboxLayout1->setContentsMargins(0, 0, 0, 0); - hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1")); + hboxLayout1->setObjectName(QStringLiteral("hboxLayout1")); label = new QLabel(centralwidget); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); hboxLayout1->addWidget(label); messageLineEdit = new QLineEdit(centralwidget); - messageLineEdit->setObjectName(QString::fromUtf8("messageLineEdit")); + messageLineEdit->setObjectName(QStringLiteral("messageLineEdit")); hboxLayout1->addWidget(messageLineEdit); sendButton = new QPushButton(centralwidget); - sendButton->setObjectName(QString::fromUtf8("sendButton")); + sendButton->setObjectName(QStringLiteral("sendButton")); QSizePolicy sizePolicy(static_cast(1), static_cast(0)); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); @@ -118,15 +118,15 @@ public: ChatMainWindow->setCentralWidget(centralwidget); menubar = new QMenuBar(ChatMainWindow); - menubar->setObjectName(QString::fromUtf8("menubar")); + menubar->setObjectName(QStringLiteral("menubar")); menubar->setGeometry(QRect(0, 0, 800, 31)); menuQuit = new QMenu(menubar); - menuQuit->setObjectName(QString::fromUtf8("menuQuit")); + menuQuit->setObjectName(QStringLiteral("menuQuit")); menuFile = new QMenu(menubar); - menuFile->setObjectName(QString::fromUtf8("menuFile")); + menuFile->setObjectName(QStringLiteral("menuFile")); ChatMainWindow->setMenuBar(menubar); statusbar = new QStatusBar(ChatMainWindow); - statusbar->setObjectName(QString::fromUtf8("statusbar")); + statusbar->setObjectName(QStringLiteral("statusbar")); ChatMainWindow->setStatusBar(statusbar); #ifndef QT_NO_SHORTCUT label->setBuddy(messageLineEdit); diff --git a/tests/auto/tools/uic/baseline/chatsetnickname.ui.h b/tests/auto/tools/uic/baseline/chatsetnickname.ui.h index ee69d36476f..e0de690715c 100644 --- a/tests/auto/tools/uic/baseline/chatsetnickname.ui.h +++ b/tests/auto/tools/uic/baseline/chatsetnickname.ui.h @@ -41,7 +41,7 @@ public: void setupUi(QDialog *NicknameDialog) { if (NicknameDialog->objectName().isEmpty()) - NicknameDialog->setObjectName(QString::fromUtf8("NicknameDialog")); + NicknameDialog->setObjectName(QStringLiteral("NicknameDialog")); NicknameDialog->resize(396, 105); QSizePolicy sizePolicy(static_cast(1), static_cast(1)); sizePolicy.setHorizontalStretch(0); @@ -55,7 +55,7 @@ public: #ifndef Q_OS_MAC vboxLayout->setContentsMargins(9, 9, 9, 9); #endif - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); vboxLayout1 = new QVBoxLayout(); #ifndef Q_OS_MAC vboxLayout1->setSpacing(6); @@ -63,16 +63,16 @@ public: #ifndef Q_OS_MAC vboxLayout1->setContentsMargins(0, 0, 0, 0); #endif - vboxLayout1->setObjectName(QString::fromUtf8("vboxLayout1")); + vboxLayout1->setObjectName(QStringLiteral("vboxLayout1")); label = new QLabel(NicknameDialog); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); sizePolicy.setHeightForWidth(label->sizePolicy().hasHeightForWidth()); label->setSizePolicy(sizePolicy); vboxLayout1->addWidget(label); nickname = new QLineEdit(NicknameDialog); - nickname->setObjectName(QString::fromUtf8("nickname")); + nickname->setObjectName(QStringLiteral("nickname")); vboxLayout1->addWidget(nickname); @@ -84,18 +84,18 @@ public: hboxLayout->setSpacing(6); #endif hboxLayout->setContentsMargins(0, 0, 0, 0); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName(QStringLiteral("hboxLayout")); spacerItem = new QSpacerItem(131, 31, QSizePolicy::Expanding, QSizePolicy::Minimum); hboxLayout->addItem(spacerItem); okButton = new QPushButton(NicknameDialog); - okButton->setObjectName(QString::fromUtf8("okButton")); + okButton->setObjectName(QStringLiteral("okButton")); hboxLayout->addWidget(okButton); cancelButton = new QPushButton(NicknameDialog); - cancelButton->setObjectName(QString::fromUtf8("cancelButton")); + cancelButton->setObjectName(QStringLiteral("cancelButton")); hboxLayout->addWidget(cancelButton); diff --git a/tests/auto/tools/uic/baseline/config.ui.h b/tests/auto/tools/uic/baseline/config.ui.h index 5606978f099..cf21fd8c6fb 100644 --- a/tests/auto/tools/uic/baseline/config.ui.h +++ b/tests/auto/tools/uic/baseline/config.ui.h @@ -135,20 +135,20 @@ public: void setupUi(QDialog *Config) { if (Config->objectName().isEmpty()) - Config->setObjectName(QString::fromUtf8("Config")); + Config->setObjectName(QStringLiteral("Config")); Config->resize(600, 650); Config->setSizeGripEnabled(true); vboxLayout = new QVBoxLayout(Config); vboxLayout->setSpacing(6); vboxLayout->setContentsMargins(11, 11, 11, 11); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); vboxLayout->setContentsMargins(8, 8, 8, 8); hboxLayout = new QHBoxLayout(); hboxLayout->setSpacing(6); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName(QStringLiteral("hboxLayout")); hboxLayout->setContentsMargins(0, 0, 0, 0); ButtonGroup1 = new QGroupBox(Config); - ButtonGroup1->setObjectName(QString::fromUtf8("ButtonGroup1")); + ButtonGroup1->setObjectName(QStringLiteral("ButtonGroup1")); QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); @@ -157,44 +157,44 @@ public: vboxLayout1 = new QVBoxLayout(ButtonGroup1); vboxLayout1->setSpacing(6); vboxLayout1->setContentsMargins(11, 11, 11, 11); - vboxLayout1->setObjectName(QString::fromUtf8("vboxLayout1")); + vboxLayout1->setObjectName(QStringLiteral("vboxLayout1")); vboxLayout1->setContentsMargins(11, 11, 11, 11); size_176_220 = new QRadioButton(ButtonGroup1); - size_176_220->setObjectName(QString::fromUtf8("size_176_220")); + size_176_220->setObjectName(QStringLiteral("size_176_220")); vboxLayout1->addWidget(size_176_220); size_240_320 = new QRadioButton(ButtonGroup1); - size_240_320->setObjectName(QString::fromUtf8("size_240_320")); + size_240_320->setObjectName(QStringLiteral("size_240_320")); vboxLayout1->addWidget(size_240_320); size_320_240 = new QRadioButton(ButtonGroup1); - size_320_240->setObjectName(QString::fromUtf8("size_320_240")); + size_320_240->setObjectName(QStringLiteral("size_320_240")); vboxLayout1->addWidget(size_320_240); size_640_480 = new QRadioButton(ButtonGroup1); - size_640_480->setObjectName(QString::fromUtf8("size_640_480")); + size_640_480->setObjectName(QStringLiteral("size_640_480")); vboxLayout1->addWidget(size_640_480); size_800_600 = new QRadioButton(ButtonGroup1); - size_800_600->setObjectName(QString::fromUtf8("size_800_600")); + size_800_600->setObjectName(QStringLiteral("size_800_600")); vboxLayout1->addWidget(size_800_600); size_1024_768 = new QRadioButton(ButtonGroup1); - size_1024_768->setObjectName(QString::fromUtf8("size_1024_768")); + size_1024_768->setObjectName(QStringLiteral("size_1024_768")); vboxLayout1->addWidget(size_1024_768); hboxLayout1 = new QHBoxLayout(); hboxLayout1->setSpacing(6); - hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1")); + hboxLayout1->setObjectName(QStringLiteral("hboxLayout1")); hboxLayout1->setContentsMargins(0, 0, 0, 0); size_custom = new QRadioButton(ButtonGroup1); - size_custom->setObjectName(QString::fromUtf8("size_custom")); + size_custom->setObjectName(QStringLiteral("size_custom")); QSizePolicy sizePolicy1(QSizePolicy::Fixed, QSizePolicy::Fixed); sizePolicy1.setHorizontalStretch(0); sizePolicy1.setVerticalStretch(0); @@ -204,7 +204,7 @@ public: hboxLayout1->addWidget(size_custom); size_width = new QSpinBox(ButtonGroup1); - size_width->setObjectName(QString::fromUtf8("size_width")); + size_width->setObjectName(QStringLiteral("size_width")); size_width->setMinimum(1); size_width->setMaximum(1280); size_width->setSingleStep(16); @@ -213,7 +213,7 @@ public: hboxLayout1->addWidget(size_width); size_height = new QSpinBox(ButtonGroup1); - size_height->setObjectName(QString::fromUtf8("size_height")); + size_height->setObjectName(QStringLiteral("size_height")); size_height->setMinimum(1); size_height->setMaximum(1024); size_height->setSingleStep(16); @@ -228,59 +228,59 @@ public: hboxLayout->addWidget(ButtonGroup1); ButtonGroup2 = new QGroupBox(Config); - ButtonGroup2->setObjectName(QString::fromUtf8("ButtonGroup2")); + ButtonGroup2->setObjectName(QStringLiteral("ButtonGroup2")); vboxLayout2 = new QVBoxLayout(ButtonGroup2); vboxLayout2->setSpacing(6); vboxLayout2->setContentsMargins(11, 11, 11, 11); - vboxLayout2->setObjectName(QString::fromUtf8("vboxLayout2")); + vboxLayout2->setObjectName(QStringLiteral("vboxLayout2")); vboxLayout2->setContentsMargins(11, 11, 11, 11); depth_1 = new QRadioButton(ButtonGroup2); - depth_1->setObjectName(QString::fromUtf8("depth_1")); + depth_1->setObjectName(QStringLiteral("depth_1")); vboxLayout2->addWidget(depth_1); depth_4gray = new QRadioButton(ButtonGroup2); - depth_4gray->setObjectName(QString::fromUtf8("depth_4gray")); + depth_4gray->setObjectName(QStringLiteral("depth_4gray")); vboxLayout2->addWidget(depth_4gray); depth_8 = new QRadioButton(ButtonGroup2); - depth_8->setObjectName(QString::fromUtf8("depth_8")); + depth_8->setObjectName(QStringLiteral("depth_8")); vboxLayout2->addWidget(depth_8); depth_12 = new QRadioButton(ButtonGroup2); - depth_12->setObjectName(QString::fromUtf8("depth_12")); + depth_12->setObjectName(QStringLiteral("depth_12")); vboxLayout2->addWidget(depth_12); depth_15 = new QRadioButton(ButtonGroup2); - depth_15->setObjectName(QString::fromUtf8("depth_15")); + depth_15->setObjectName(QStringLiteral("depth_15")); vboxLayout2->addWidget(depth_15); depth_16 = new QRadioButton(ButtonGroup2); - depth_16->setObjectName(QString::fromUtf8("depth_16")); + depth_16->setObjectName(QStringLiteral("depth_16")); vboxLayout2->addWidget(depth_16); depth_18 = new QRadioButton(ButtonGroup2); - depth_18->setObjectName(QString::fromUtf8("depth_18")); + depth_18->setObjectName(QStringLiteral("depth_18")); vboxLayout2->addWidget(depth_18); depth_24 = new QRadioButton(ButtonGroup2); - depth_24->setObjectName(QString::fromUtf8("depth_24")); + depth_24->setObjectName(QStringLiteral("depth_24")); vboxLayout2->addWidget(depth_24); depth_32 = new QRadioButton(ButtonGroup2); - depth_32->setObjectName(QString::fromUtf8("depth_32")); + depth_32->setObjectName(QStringLiteral("depth_32")); vboxLayout2->addWidget(depth_32); depth_32_argb = new QRadioButton(ButtonGroup2); - depth_32_argb->setObjectName(QString::fromUtf8("depth_32_argb")); + depth_32_argb->setObjectName(QStringLiteral("depth_32_argb")); vboxLayout2->addWidget(depth_32_argb); @@ -292,15 +292,15 @@ public: hboxLayout2 = new QHBoxLayout(); hboxLayout2->setSpacing(6); - hboxLayout2->setObjectName(QString::fromUtf8("hboxLayout2")); + hboxLayout2->setObjectName(QStringLiteral("hboxLayout2")); hboxLayout2->setContentsMargins(0, 0, 0, 0); TextLabel1_3 = new QLabel(Config); - TextLabel1_3->setObjectName(QString::fromUtf8("TextLabel1_3")); + TextLabel1_3->setObjectName(QStringLiteral("TextLabel1_3")); hboxLayout2->addWidget(TextLabel1_3); skin = new QComboBox(Config); - skin->setObjectName(QString::fromUtf8("skin")); + skin->setObjectName(QStringLiteral("skin")); QSizePolicy sizePolicy2(QSizePolicy::Expanding, QSizePolicy::Fixed); sizePolicy2.setHorizontalStretch(0); sizePolicy2.setVerticalStretch(0); @@ -313,12 +313,12 @@ public: vboxLayout->addLayout(hboxLayout2); touchScreen = new QCheckBox(Config); - touchScreen->setObjectName(QString::fromUtf8("touchScreen")); + touchScreen->setObjectName(QStringLiteral("touchScreen")); vboxLayout->addWidget(touchScreen); lcdScreen = new QCheckBox(Config); - lcdScreen->setObjectName(QString::fromUtf8("lcdScreen")); + lcdScreen->setObjectName(QStringLiteral("lcdScreen")); vboxLayout->addWidget(lcdScreen); @@ -327,7 +327,7 @@ public: vboxLayout->addItem(spacerItem); TextLabel1 = new QLabel(Config); - TextLabel1->setObjectName(QString::fromUtf8("TextLabel1")); + TextLabel1->setObjectName(QStringLiteral("TextLabel1")); sizePolicy.setHeightForWidth(TextLabel1->sizePolicy().hasHeightForWidth()); TextLabel1->setSizePolicy(sizePolicy); TextLabel1->setWordWrap(true); @@ -335,21 +335,21 @@ public: vboxLayout->addWidget(TextLabel1); GroupBox1 = new QGroupBox(Config); - GroupBox1->setObjectName(QString::fromUtf8("GroupBox1")); + GroupBox1->setObjectName(QStringLiteral("GroupBox1")); gridLayout = new QGridLayout(GroupBox1); gridLayout->setSpacing(6); gridLayout->setContentsMargins(11, 11, 11, 11); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); gridLayout->setHorizontalSpacing(6); gridLayout->setVerticalSpacing(6); gridLayout->setContentsMargins(11, 11, 11, 11); TextLabel3 = new QLabel(GroupBox1); - TextLabel3->setObjectName(QString::fromUtf8("TextLabel3")); + TextLabel3->setObjectName(QStringLiteral("TextLabel3")); gridLayout->addWidget(TextLabel3, 6, 0, 1, 1); bslider = new QSlider(GroupBox1); - bslider->setObjectName(QString::fromUtf8("bslider")); + bslider->setObjectName(QStringLiteral("bslider")); QPalette palette; QBrush brush(QColor(128, 128, 128, 255)); brush.setStyle(Qt::SolidPattern); @@ -432,17 +432,17 @@ public: gridLayout->addWidget(bslider, 6, 1, 1, 1); blabel = new QLabel(GroupBox1); - blabel->setObjectName(QString::fromUtf8("blabel")); + blabel->setObjectName(QStringLiteral("blabel")); gridLayout->addWidget(blabel, 6, 2, 1, 1); TextLabel2 = new QLabel(GroupBox1); - TextLabel2->setObjectName(QString::fromUtf8("TextLabel2")); + TextLabel2->setObjectName(QStringLiteral("TextLabel2")); gridLayout->addWidget(TextLabel2, 4, 0, 1, 1); gslider = new QSlider(GroupBox1); - gslider->setObjectName(QString::fromUtf8("gslider")); + gslider->setObjectName(QStringLiteral("gslider")); QPalette palette1; palette1.setBrush(QPalette::Active, QPalette::WindowText, brush); QBrush brush11(QColor(0, 255, 0, 255)); @@ -513,22 +513,22 @@ public: gridLayout->addWidget(gslider, 4, 1, 1, 1); glabel = new QLabel(GroupBox1); - glabel->setObjectName(QString::fromUtf8("glabel")); + glabel->setObjectName(QStringLiteral("glabel")); gridLayout->addWidget(glabel, 4, 2, 1, 1); TextLabel7 = new QLabel(GroupBox1); - TextLabel7->setObjectName(QString::fromUtf8("TextLabel7")); + TextLabel7->setObjectName(QStringLiteral("TextLabel7")); gridLayout->addWidget(TextLabel7, 0, 0, 1, 1); TextLabel8 = new QLabel(GroupBox1); - TextLabel8->setObjectName(QString::fromUtf8("TextLabel8")); + TextLabel8->setObjectName(QStringLiteral("TextLabel8")); gridLayout->addWidget(TextLabel8, 0, 2, 1, 1); gammaslider = new QSlider(GroupBox1); - gammaslider->setObjectName(QString::fromUtf8("gammaslider")); + gammaslider->setObjectName(QStringLiteral("gammaslider")); QPalette palette2; palette2.setBrush(QPalette::Active, QPalette::WindowText, brush); palette2.setBrush(QPalette::Active, QPalette::Button, brush7); @@ -593,17 +593,17 @@ public: gridLayout->addWidget(gammaslider, 0, 1, 1, 1); TextLabel1_2 = new QLabel(GroupBox1); - TextLabel1_2->setObjectName(QString::fromUtf8("TextLabel1_2")); + TextLabel1_2->setObjectName(QStringLiteral("TextLabel1_2")); gridLayout->addWidget(TextLabel1_2, 2, 0, 1, 1); rlabel = new QLabel(GroupBox1); - rlabel->setObjectName(QString::fromUtf8("rlabel")); + rlabel->setObjectName(QStringLiteral("rlabel")); gridLayout->addWidget(rlabel, 2, 2, 1, 1); rslider = new QSlider(GroupBox1); - rslider->setObjectName(QString::fromUtf8("rslider")); + rslider->setObjectName(QStringLiteral("rslider")); QPalette palette3; palette3.setBrush(QPalette::Active, QPalette::WindowText, brush); QBrush brush18(QColor(255, 0, 0, 255)); @@ -674,12 +674,12 @@ public: gridLayout->addWidget(rslider, 2, 1, 1, 1); PushButton3 = new QPushButton(GroupBox1); - PushButton3->setObjectName(QString::fromUtf8("PushButton3")); + PushButton3->setObjectName(QStringLiteral("PushButton3")); gridLayout->addWidget(PushButton3, 8, 0, 1, 3); MyCustomWidget1 = new GammaView(GroupBox1); - MyCustomWidget1->setObjectName(QString::fromUtf8("MyCustomWidget1")); + MyCustomWidget1->setObjectName(QStringLiteral("MyCustomWidget1")); gridLayout->addWidget(MyCustomWidget1, 0, 3, 9, 1); @@ -688,21 +688,21 @@ public: hboxLayout3 = new QHBoxLayout(); hboxLayout3->setSpacing(6); - hboxLayout3->setObjectName(QString::fromUtf8("hboxLayout3")); + hboxLayout3->setObjectName(QStringLiteral("hboxLayout3")); hboxLayout3->setContentsMargins(0, 0, 0, 0); spacerItem1 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); hboxLayout3->addItem(spacerItem1); buttonOk = new QPushButton(Config); - buttonOk->setObjectName(QString::fromUtf8("buttonOk")); + buttonOk->setObjectName(QStringLiteral("buttonOk")); buttonOk->setAutoDefault(true); buttonOk->setDefault(true); hboxLayout3->addWidget(buttonOk); buttonCancel = new QPushButton(Config); - buttonCancel->setObjectName(QString::fromUtf8("buttonCancel")); + buttonCancel->setObjectName(QStringLiteral("buttonCancel")); buttonCancel->setAutoDefault(true); hboxLayout3->addWidget(buttonCancel); diff --git a/tests/auto/tools/uic/baseline/connectdialog.ui.h b/tests/auto/tools/uic/baseline/connectdialog.ui.h index 71ed1bb87f7..9c46bb851d0 100644 --- a/tests/auto/tools/uic/baseline/connectdialog.ui.h +++ b/tests/auto/tools/uic/baseline/connectdialog.ui.h @@ -50,24 +50,24 @@ public: void setupUi(QDialog *ConnectDialog) { if (ConnectDialog->objectName().isEmpty()) - ConnectDialog->setObjectName(QString::fromUtf8("ConnectDialog")); + ConnectDialog->setObjectName(QStringLiteral("ConnectDialog")); ConnectDialog->resize(585, 361); gridLayout = new QGridLayout(ConnectDialog); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); signalGroupBox = new QGroupBox(ConnectDialog); - signalGroupBox->setObjectName(QString::fromUtf8("signalGroupBox")); + signalGroupBox->setObjectName(QStringLiteral("signalGroupBox")); vboxLayout = new QVBoxLayout(signalGroupBox); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); signalList = new QListWidget(signalGroupBox); - signalList->setObjectName(QString::fromUtf8("signalList")); + signalList->setObjectName(QStringLiteral("signalList")); signalList->setTextElideMode(Qt::ElideMiddle); vboxLayout->addWidget(signalList); hboxLayout = new QHBoxLayout(); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName(QStringLiteral("hboxLayout")); editSignalsButton = new QToolButton(signalGroupBox); - editSignalsButton->setObjectName(QString::fromUtf8("editSignalsButton")); + editSignalsButton->setObjectName(QStringLiteral("editSignalsButton")); hboxLayout->addWidget(editSignalsButton); @@ -82,19 +82,19 @@ public: gridLayout->addWidget(signalGroupBox, 0, 0, 1, 2); slotGroupBox = new QGroupBox(ConnectDialog); - slotGroupBox->setObjectName(QString::fromUtf8("slotGroupBox")); + slotGroupBox->setObjectName(QStringLiteral("slotGroupBox")); vboxLayout1 = new QVBoxLayout(slotGroupBox); - vboxLayout1->setObjectName(QString::fromUtf8("vboxLayout1")); + vboxLayout1->setObjectName(QStringLiteral("vboxLayout1")); slotList = new QListWidget(slotGroupBox); - slotList->setObjectName(QString::fromUtf8("slotList")); + slotList->setObjectName(QStringLiteral("slotList")); slotList->setTextElideMode(Qt::ElideMiddle); vboxLayout1->addWidget(slotList); hboxLayout1 = new QHBoxLayout(); - hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1")); + hboxLayout1->setObjectName(QStringLiteral("hboxLayout1")); editSlotsButton = new QToolButton(slotGroupBox); - editSlotsButton->setObjectName(QString::fromUtf8("editSlotsButton")); + editSlotsButton->setObjectName(QStringLiteral("editSlotsButton")); hboxLayout1->addWidget(editSlotsButton); @@ -109,12 +109,12 @@ public: gridLayout->addWidget(slotGroupBox, 0, 2, 1, 1); showAllCheckBox = new QCheckBox(ConnectDialog); - showAllCheckBox->setObjectName(QString::fromUtf8("showAllCheckBox")); + showAllCheckBox->setObjectName(QStringLiteral("showAllCheckBox")); gridLayout->addWidget(showAllCheckBox, 1, 0, 1, 1); buttonBox = new QDialogButtonBox(ConnectDialog); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName(QStringLiteral("buttonBox")); buttonBox->setOrientation(Qt::Horizontal); buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok); diff --git a/tests/auto/tools/uic/baseline/controller.ui.h b/tests/auto/tools/uic/baseline/controller.ui.h index 1c79f03f566..2758f1a7de6 100644 --- a/tests/auto/tools/uic/baseline/controller.ui.h +++ b/tests/auto/tools/uic/baseline/controller.ui.h @@ -35,7 +35,7 @@ public: void setupUi(QWidget *Controller) { if (Controller->objectName().isEmpty()) - Controller->setObjectName(QString::fromUtf8("Controller")); + Controller->setObjectName(QStringLiteral("Controller")); Controller->resize(255, 111); gridLayout = new QGridLayout(Controller); #ifndef Q_OS_MAC @@ -44,30 +44,30 @@ public: #ifndef Q_OS_MAC gridLayout->setContentsMargins(9, 9, 9, 9); #endif - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); label = new QLabel(Controller); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); label->setAlignment(Qt::AlignCenter); gridLayout->addWidget(label, 1, 1, 1, 1); decelerate = new QPushButton(Controller); - decelerate->setObjectName(QString::fromUtf8("decelerate")); + decelerate->setObjectName(QStringLiteral("decelerate")); gridLayout->addWidget(decelerate, 2, 1, 1, 1); accelerate = new QPushButton(Controller); - accelerate->setObjectName(QString::fromUtf8("accelerate")); + accelerate->setObjectName(QStringLiteral("accelerate")); gridLayout->addWidget(accelerate, 0, 1, 1, 1); right = new QPushButton(Controller); - right->setObjectName(QString::fromUtf8("right")); + right->setObjectName(QStringLiteral("right")); gridLayout->addWidget(right, 1, 2, 1, 1); left = new QPushButton(Controller); - left->setObjectName(QString::fromUtf8("left")); + left->setObjectName(QStringLiteral("left")); gridLayout->addWidget(left, 1, 0, 1, 1); diff --git a/tests/auto/tools/uic/baseline/cookies.ui.h b/tests/auto/tools/uic/baseline/cookies.ui.h index f866645dd80..201687c210b 100644 --- a/tests/auto/tools/uic/baseline/cookies.ui.h +++ b/tests/auto/tools/uic/baseline/cookies.ui.h @@ -42,33 +42,33 @@ public: void setupUi(QDialog *CookiesDialog) { if (CookiesDialog->objectName().isEmpty()) - CookiesDialog->setObjectName(QString::fromUtf8("CookiesDialog")); + CookiesDialog->setObjectName(QStringLiteral("CookiesDialog")); CookiesDialog->resize(550, 370); gridLayout = new QGridLayout(CookiesDialog); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); spacerItem = new QSpacerItem(252, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); gridLayout->addItem(spacerItem, 0, 0, 1, 1); search = new SearchLineEdit(CookiesDialog); - search->setObjectName(QString::fromUtf8("search")); + search->setObjectName(QStringLiteral("search")); gridLayout->addWidget(search, 0, 1, 1, 1); cookiesTable = new EditTableView(CookiesDialog); - cookiesTable->setObjectName(QString::fromUtf8("cookiesTable")); + cookiesTable->setObjectName(QStringLiteral("cookiesTable")); gridLayout->addWidget(cookiesTable, 1, 0, 1, 2); hboxLayout = new QHBoxLayout(); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName(QStringLiteral("hboxLayout")); removeButton = new QPushButton(CookiesDialog); - removeButton->setObjectName(QString::fromUtf8("removeButton")); + removeButton->setObjectName(QStringLiteral("removeButton")); hboxLayout->addWidget(removeButton); removeAllButton = new QPushButton(CookiesDialog); - removeAllButton->setObjectName(QString::fromUtf8("removeAllButton")); + removeAllButton->setObjectName(QStringLiteral("removeAllButton")); hboxLayout->addWidget(removeAllButton); @@ -77,7 +77,7 @@ public: hboxLayout->addItem(spacerItem1); buttonBox = new QDialogButtonBox(CookiesDialog); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName(QStringLiteral("buttonBox")); buttonBox->setStandardButtons(QDialogButtonBox::Ok); hboxLayout->addWidget(buttonBox); diff --git a/tests/auto/tools/uic/baseline/cookiesexceptions.ui.h b/tests/auto/tools/uic/baseline/cookiesexceptions.ui.h index 776afc51c87..ca4ac682ce9 100644 --- a/tests/auto/tools/uic/baseline/cookiesexceptions.ui.h +++ b/tests/auto/tools/uic/baseline/cookiesexceptions.ui.h @@ -57,23 +57,23 @@ public: void setupUi(QDialog *CookiesExceptionsDialog) { if (CookiesExceptionsDialog->objectName().isEmpty()) - CookiesExceptionsDialog->setObjectName(QString::fromUtf8("CookiesExceptionsDialog")); + CookiesExceptionsDialog->setObjectName(QStringLiteral("CookiesExceptionsDialog")); CookiesExceptionsDialog->resize(466, 446); vboxLayout = new QVBoxLayout(CookiesExceptionsDialog); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); newExceptionGroupBox = new QGroupBox(CookiesExceptionsDialog); - newExceptionGroupBox->setObjectName(QString::fromUtf8("newExceptionGroupBox")); + newExceptionGroupBox->setObjectName(QStringLiteral("newExceptionGroupBox")); gridLayout = new QGridLayout(newExceptionGroupBox); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); hboxLayout = new QHBoxLayout(); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName(QStringLiteral("hboxLayout")); label = new QLabel(newExceptionGroupBox); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); hboxLayout->addWidget(label); domainLineEdit = new QLineEdit(newExceptionGroupBox); - domainLineEdit->setObjectName(QString::fromUtf8("domainLineEdit")); + domainLineEdit->setObjectName(QStringLiteral("domainLineEdit")); hboxLayout->addWidget(domainLineEdit); @@ -81,25 +81,25 @@ public: gridLayout->addLayout(hboxLayout, 0, 0, 1, 1); hboxLayout1 = new QHBoxLayout(); - hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1")); + hboxLayout1->setObjectName(QStringLiteral("hboxLayout1")); spacerItem = new QSpacerItem(81, 25, QSizePolicy::Expanding, QSizePolicy::Minimum); hboxLayout1->addItem(spacerItem); blockButton = new QPushButton(newExceptionGroupBox); - blockButton->setObjectName(QString::fromUtf8("blockButton")); + blockButton->setObjectName(QStringLiteral("blockButton")); blockButton->setEnabled(false); hboxLayout1->addWidget(blockButton); allowForSessionButton = new QPushButton(newExceptionGroupBox); - allowForSessionButton->setObjectName(QString::fromUtf8("allowForSessionButton")); + allowForSessionButton->setObjectName(QStringLiteral("allowForSessionButton")); allowForSessionButton->setEnabled(false); hboxLayout1->addWidget(allowForSessionButton); allowButton = new QPushButton(newExceptionGroupBox); - allowButton->setObjectName(QString::fromUtf8("allowButton")); + allowButton->setObjectName(QStringLiteral("allowButton")); allowButton->setEnabled(false); hboxLayout1->addWidget(allowButton); @@ -111,30 +111,30 @@ public: vboxLayout->addWidget(newExceptionGroupBox); ExceptionsGroupBox = new QGroupBox(CookiesExceptionsDialog); - ExceptionsGroupBox->setObjectName(QString::fromUtf8("ExceptionsGroupBox")); + ExceptionsGroupBox->setObjectName(QStringLiteral("ExceptionsGroupBox")); gridLayout1 = new QGridLayout(ExceptionsGroupBox); - gridLayout1->setObjectName(QString::fromUtf8("gridLayout1")); + gridLayout1->setObjectName(QStringLiteral("gridLayout1")); spacerItem1 = new QSpacerItem(252, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); gridLayout1->addItem(spacerItem1, 0, 0, 1, 3); search = new SearchLineEdit(ExceptionsGroupBox); - search->setObjectName(QString::fromUtf8("search")); + search->setObjectName(QStringLiteral("search")); gridLayout1->addWidget(search, 0, 3, 1, 1); exceptionTable = new EditTableView(ExceptionsGroupBox); - exceptionTable->setObjectName(QString::fromUtf8("exceptionTable")); + exceptionTable->setObjectName(QStringLiteral("exceptionTable")); gridLayout1->addWidget(exceptionTable, 1, 0, 1, 4); removeButton = new QPushButton(ExceptionsGroupBox); - removeButton->setObjectName(QString::fromUtf8("removeButton")); + removeButton->setObjectName(QStringLiteral("removeButton")); gridLayout1->addWidget(removeButton, 2, 0, 1, 1); removeAllButton = new QPushButton(ExceptionsGroupBox); - removeAllButton->setObjectName(QString::fromUtf8("removeAllButton")); + removeAllButton->setObjectName(QStringLiteral("removeAllButton")); gridLayout1->addWidget(removeAllButton, 2, 1, 1, 1); @@ -146,7 +146,7 @@ public: vboxLayout->addWidget(ExceptionsGroupBox); buttonBox = new QDialogButtonBox(CookiesExceptionsDialog); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName(QStringLiteral("buttonBox")); buttonBox->setOrientation(Qt::Horizontal); buttonBox->setStandardButtons(QDialogButtonBox::Ok); diff --git a/tests/auto/tools/uic/baseline/default.ui.h b/tests/auto/tools/uic/baseline/default.ui.h index 685fa0b476a..0bde249375b 100644 --- a/tests/auto/tools/uic/baseline/default.ui.h +++ b/tests/auto/tools/uic/baseline/default.ui.h @@ -66,18 +66,18 @@ public: void setupUi(QMainWindow *MainWindow) { if (MainWindow->objectName().isEmpty()) - MainWindow->setObjectName(QString::fromUtf8("MainWindow")); + MainWindow->setObjectName(QStringLiteral("MainWindow")); MainWindow->resize(388, 413); exitAction = new QAction(MainWindow); - exitAction->setObjectName(QString::fromUtf8("exitAction")); + exitAction->setObjectName(QStringLiteral("exitAction")); aboutQtAction = new QAction(MainWindow); - aboutQtAction->setObjectName(QString::fromUtf8("aboutQtAction")); + aboutQtAction->setObjectName(QStringLiteral("aboutQtAction")); editStyleAction = new QAction(MainWindow); - editStyleAction->setObjectName(QString::fromUtf8("editStyleAction")); + editStyleAction->setObjectName(QStringLiteral("editStyleAction")); aboutAction = new QAction(MainWindow); - aboutAction->setObjectName(QString::fromUtf8("aboutAction")); + aboutAction->setObjectName(QStringLiteral("aboutAction")); centralwidget = new QWidget(MainWindow); - centralwidget->setObjectName(QString::fromUtf8("centralwidget")); + centralwidget->setObjectName(QStringLiteral("centralwidget")); gridLayout = new QGridLayout(centralwidget); #ifndef Q_OS_MAC gridLayout->setSpacing(6); @@ -85,14 +85,14 @@ public: #ifndef Q_OS_MAC gridLayout->setContentsMargins(9, 9, 9, 9); #endif - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); nameLabel = new QLabel(centralwidget); - nameLabel->setObjectName(QString::fromUtf8("nameLabel")); + nameLabel->setObjectName(QStringLiteral("nameLabel")); gridLayout->addWidget(nameLabel, 0, 0, 1, 1); nameCombo = new QComboBox(centralwidget); - nameCombo->setObjectName(QString::fromUtf8("nameCombo")); + nameCombo->setObjectName(QStringLiteral("nameCombo")); nameCombo->setEditable(true); gridLayout->addWidget(nameCombo, 0, 1, 1, 3); @@ -102,62 +102,62 @@ public: gridLayout->addItem(spacerItem, 1, 3, 1, 1); femaleRadioButton = new QRadioButton(centralwidget); - femaleRadioButton->setObjectName(QString::fromUtf8("femaleRadioButton")); + femaleRadioButton->setObjectName(QStringLiteral("femaleRadioButton")); gridLayout->addWidget(femaleRadioButton, 1, 2, 1, 1); agreeCheckBox = new QCheckBox(centralwidget); - agreeCheckBox->setObjectName(QString::fromUtf8("agreeCheckBox")); + agreeCheckBox->setObjectName(QStringLiteral("agreeCheckBox")); gridLayout->addWidget(agreeCheckBox, 6, 0, 1, 4); maleRadioButton = new QRadioButton(centralwidget); - maleRadioButton->setObjectName(QString::fromUtf8("maleRadioButton")); + maleRadioButton->setObjectName(QStringLiteral("maleRadioButton")); gridLayout->addWidget(maleRadioButton, 1, 1, 1, 1); genderLabel = new QLabel(centralwidget); - genderLabel->setObjectName(QString::fromUtf8("genderLabel")); + genderLabel->setObjectName(QStringLiteral("genderLabel")); gridLayout->addWidget(genderLabel, 1, 0, 1, 1); ageSpinBox = new QSpinBox(centralwidget); - ageSpinBox->setObjectName(QString::fromUtf8("ageSpinBox")); + ageSpinBox->setObjectName(QStringLiteral("ageSpinBox")); ageSpinBox->setMinimum(12); ageSpinBox->setValue(22); gridLayout->addWidget(ageSpinBox, 2, 1, 1, 3); buttonBox = new QDialogButtonBox(centralwidget); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName(QStringLiteral("buttonBox")); buttonBox->setOrientation(Qt::Horizontal); buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok); gridLayout->addWidget(buttonBox, 7, 2, 1, 2); ageLabel = new QLabel(centralwidget); - ageLabel->setObjectName(QString::fromUtf8("ageLabel")); + ageLabel->setObjectName(QStringLiteral("ageLabel")); gridLayout->addWidget(ageLabel, 2, 0, 1, 1); passwordLabel = new QLabel(centralwidget); - passwordLabel->setObjectName(QString::fromUtf8("passwordLabel")); + passwordLabel->setObjectName(QStringLiteral("passwordLabel")); gridLayout->addWidget(passwordLabel, 3, 0, 1, 1); passwordEdit = new QLineEdit(centralwidget); - passwordEdit->setObjectName(QString::fromUtf8("passwordEdit")); + passwordEdit->setObjectName(QStringLiteral("passwordEdit")); passwordEdit->setEchoMode(QLineEdit::Password); gridLayout->addWidget(passwordEdit, 3, 1, 1, 3); label = new QLabel(centralwidget); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); gridLayout->addWidget(label, 5, 0, 1, 1); countryLabel = new QLabel(centralwidget); - countryLabel->setObjectName(QString::fromUtf8("countryLabel")); + countryLabel->setObjectName(QStringLiteral("countryLabel")); gridLayout->addWidget(countryLabel, 4, 0, 1, 1); @@ -165,26 +165,26 @@ public: new QListWidgetItem(professionList); new QListWidgetItem(professionList); new QListWidgetItem(professionList); - professionList->setObjectName(QString::fromUtf8("professionList")); + professionList->setObjectName(QStringLiteral("professionList")); gridLayout->addWidget(professionList, 5, 1, 1, 3); countryCombo = new QComboBox(centralwidget); - countryCombo->setObjectName(QString::fromUtf8("countryCombo")); + countryCombo->setObjectName(QStringLiteral("countryCombo")); gridLayout->addWidget(countryCombo, 4, 1, 1, 3); MainWindow->setCentralWidget(centralwidget); menubar = new QMenuBar(MainWindow); - menubar->setObjectName(QString::fromUtf8("menubar")); + menubar->setObjectName(QStringLiteral("menubar")); menubar->setGeometry(QRect(0, 0, 388, 21)); menu_File = new QMenu(menubar); - menu_File->setObjectName(QString::fromUtf8("menu_File")); + menu_File->setObjectName(QStringLiteral("menu_File")); menu_Help = new QMenu(menubar); - menu_Help->setObjectName(QString::fromUtf8("menu_Help")); + menu_Help->setObjectName(QStringLiteral("menu_Help")); MainWindow->setMenuBar(menubar); statusbar = new QStatusBar(MainWindow); - statusbar->setObjectName(QString::fromUtf8("statusbar")); + statusbar->setObjectName(QStringLiteral("statusbar")); MainWindow->setStatusBar(statusbar); #ifndef QT_NO_SHORTCUT nameLabel->setBuddy(nameCombo); diff --git a/tests/auto/tools/uic/baseline/dialog.ui.h b/tests/auto/tools/uic/baseline/dialog.ui.h index d4860bf071b..6e3e3fdc363 100644 --- a/tests/auto/tools/uic/baseline/dialog.ui.h +++ b/tests/auto/tools/uic/baseline/dialog.ui.h @@ -33,24 +33,24 @@ public: void setupUi(QDialog *Dialog) { if (Dialog->objectName().isEmpty()) - Dialog->setObjectName(QString::fromUtf8("Dialog")); + Dialog->setObjectName(QStringLiteral("Dialog")); Dialog->resize(451, 322); gridLayout = new QGridLayout(Dialog); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); loadFromFileButton = new QPushButton(Dialog); - loadFromFileButton->setObjectName(QString::fromUtf8("loadFromFileButton")); + loadFromFileButton->setObjectName(QStringLiteral("loadFromFileButton")); gridLayout->addWidget(loadFromFileButton, 0, 0, 1, 1); label = new QLabel(Dialog); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); label->setAlignment(Qt::AlignCenter); label->setWordWrap(true); gridLayout->addWidget(label, 1, 0, 1, 1); loadFromSharedMemoryButton = new QPushButton(Dialog); - loadFromSharedMemoryButton->setObjectName(QString::fromUtf8("loadFromSharedMemoryButton")); + loadFromSharedMemoryButton->setObjectName(QStringLiteral("loadFromSharedMemoryButton")); gridLayout->addWidget(loadFromSharedMemoryButton, 2, 0, 1, 1); diff --git a/tests/auto/tools/uic/baseline/downloaditem.ui.h b/tests/auto/tools/uic/baseline/downloaditem.ui.h index 33442342b51..9aac86eb87e 100644 --- a/tests/auto/tools/uic/baseline/downloaditem.ui.h +++ b/tests/auto/tools/uic/baseline/downloaditem.ui.h @@ -45,13 +45,13 @@ public: void setupUi(QWidget *DownloadItem) { if (DownloadItem->objectName().isEmpty()) - DownloadItem->setObjectName(QString::fromUtf8("DownloadItem")); + DownloadItem->setObjectName(QStringLiteral("DownloadItem")); DownloadItem->resize(423, 110); horizontalLayout = new QHBoxLayout(DownloadItem); horizontalLayout->setContentsMargins(0, 0, 0, 0); - horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout")); + horizontalLayout->setObjectName(QStringLiteral("horizontalLayout")); fileIcon = new QLabel(DownloadItem); - fileIcon->setObjectName(QString::fromUtf8("fileIcon")); + fileIcon->setObjectName(QStringLiteral("fileIcon")); QSizePolicy sizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); @@ -61,9 +61,9 @@ public: horizontalLayout->addWidget(fileIcon); verticalLayout_2 = new QVBoxLayout(); - verticalLayout_2->setObjectName(QString::fromUtf8("verticalLayout_2")); + verticalLayout_2->setObjectName(QStringLiteral("verticalLayout_2")); fileNameLabel = new SqueezeLabel(DownloadItem); - fileNameLabel->setObjectName(QString::fromUtf8("fileNameLabel")); + fileNameLabel->setObjectName(QStringLiteral("fileNameLabel")); QSizePolicy sizePolicy1(QSizePolicy::Expanding, QSizePolicy::Preferred); sizePolicy1.setHorizontalStretch(0); sizePolicy1.setVerticalStretch(0); @@ -73,13 +73,13 @@ public: verticalLayout_2->addWidget(fileNameLabel); progressBar = new QProgressBar(DownloadItem); - progressBar->setObjectName(QString::fromUtf8("progressBar")); + progressBar->setObjectName(QStringLiteral("progressBar")); progressBar->setValue(0); verticalLayout_2->addWidget(progressBar); downloadInfoLabel = new SqueezeLabel(DownloadItem); - downloadInfoLabel->setObjectName(QString::fromUtf8("downloadInfoLabel")); + downloadInfoLabel->setObjectName(QStringLiteral("downloadInfoLabel")); QSizePolicy sizePolicy2(QSizePolicy::Minimum, QSizePolicy::Preferred); sizePolicy2.setHorizontalStretch(0); sizePolicy2.setVerticalStretch(0); @@ -92,24 +92,24 @@ public: horizontalLayout->addLayout(verticalLayout_2); verticalLayout = new QVBoxLayout(); - verticalLayout->setObjectName(QString::fromUtf8("verticalLayout")); + verticalLayout->setObjectName(QStringLiteral("verticalLayout")); verticalSpacer = new QSpacerItem(17, 1, QSizePolicy::Minimum, QSizePolicy::Expanding); verticalLayout->addItem(verticalSpacer); tryAgainButton = new QPushButton(DownloadItem); - tryAgainButton->setObjectName(QString::fromUtf8("tryAgainButton")); + tryAgainButton->setObjectName(QStringLiteral("tryAgainButton")); tryAgainButton->setEnabled(false); verticalLayout->addWidget(tryAgainButton); stopButton = new QPushButton(DownloadItem); - stopButton->setObjectName(QString::fromUtf8("stopButton")); + stopButton->setObjectName(QStringLiteral("stopButton")); verticalLayout->addWidget(stopButton); openButton = new QPushButton(DownloadItem); - openButton->setObjectName(QString::fromUtf8("openButton")); + openButton->setObjectName(QStringLiteral("openButton")); verticalLayout->addWidget(openButton); diff --git a/tests/auto/tools/uic/baseline/downloads.ui.h b/tests/auto/tools/uic/baseline/downloads.ui.h index 32b534393a6..f88b6d75e77 100644 --- a/tests/auto/tools/uic/baseline/downloads.ui.h +++ b/tests/auto/tools/uic/baseline/downloads.ui.h @@ -39,21 +39,21 @@ public: void setupUi(QDialog *DownloadDialog) { if (DownloadDialog->objectName().isEmpty()) - DownloadDialog->setObjectName(QString::fromUtf8("DownloadDialog")); + DownloadDialog->setObjectName(QStringLiteral("DownloadDialog")); DownloadDialog->resize(332, 252); gridLayout = new QGridLayout(DownloadDialog); gridLayout->setSpacing(0); gridLayout->setContentsMargins(0, 0, 0, 0); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); downloadsView = new EditTableView(DownloadDialog); - downloadsView->setObjectName(QString::fromUtf8("downloadsView")); + downloadsView->setObjectName(QStringLiteral("downloadsView")); gridLayout->addWidget(downloadsView, 0, 0, 1, 3); horizontalLayout = new QHBoxLayout(); - horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout")); + horizontalLayout->setObjectName(QStringLiteral("horizontalLayout")); cleanupButton = new QPushButton(DownloadDialog); - cleanupButton->setObjectName(QString::fromUtf8("cleanupButton")); + cleanupButton->setObjectName(QStringLiteral("cleanupButton")); cleanupButton->setEnabled(false); horizontalLayout->addWidget(cleanupButton); @@ -66,7 +66,7 @@ public: gridLayout->addLayout(horizontalLayout, 1, 0, 1, 1); itemCount = new QLabel(DownloadDialog); - itemCount->setObjectName(QString::fromUtf8("itemCount")); + itemCount->setObjectName(QStringLiteral("itemCount")); gridLayout->addWidget(itemCount, 1, 1, 1, 1); diff --git a/tests/auto/tools/uic/baseline/embeddeddialog.ui.h b/tests/auto/tools/uic/baseline/embeddeddialog.ui.h index 3728e764a37..40634692fa9 100644 --- a/tests/auto/tools/uic/baseline/embeddeddialog.ui.h +++ b/tests/auto/tools/uic/baseline/embeddeddialog.ui.h @@ -40,47 +40,47 @@ public: void setupUi(QDialog *embeddedDialog) { if (embeddedDialog->objectName().isEmpty()) - embeddedDialog->setObjectName(QString::fromUtf8("embeddedDialog")); + embeddedDialog->setObjectName(QStringLiteral("embeddedDialog")); embeddedDialog->resize(407, 134); formLayout = new QFormLayout(embeddedDialog); - formLayout->setObjectName(QString::fromUtf8("formLayout")); + formLayout->setObjectName(QStringLiteral("formLayout")); label = new QLabel(embeddedDialog); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); formLayout->setWidget(0, QFormLayout::LabelRole, label); layoutDirection = new QComboBox(embeddedDialog); - layoutDirection->setObjectName(QString::fromUtf8("layoutDirection")); + layoutDirection->setObjectName(QStringLiteral("layoutDirection")); formLayout->setWidget(0, QFormLayout::FieldRole, layoutDirection); label_2 = new QLabel(embeddedDialog); - label_2->setObjectName(QString::fromUtf8("label_2")); + label_2->setObjectName(QStringLiteral("label_2")); formLayout->setWidget(1, QFormLayout::LabelRole, label_2); fontComboBox = new QFontComboBox(embeddedDialog); - fontComboBox->setObjectName(QString::fromUtf8("fontComboBox")); + fontComboBox->setObjectName(QStringLiteral("fontComboBox")); formLayout->setWidget(1, QFormLayout::FieldRole, fontComboBox); label_3 = new QLabel(embeddedDialog); - label_3->setObjectName(QString::fromUtf8("label_3")); + label_3->setObjectName(QStringLiteral("label_3")); formLayout->setWidget(2, QFormLayout::LabelRole, label_3); style = new QComboBox(embeddedDialog); - style->setObjectName(QString::fromUtf8("style")); + style->setObjectName(QStringLiteral("style")); formLayout->setWidget(2, QFormLayout::FieldRole, style); label_4 = new QLabel(embeddedDialog); - label_4->setObjectName(QString::fromUtf8("label_4")); + label_4->setObjectName(QStringLiteral("label_4")); formLayout->setWidget(3, QFormLayout::LabelRole, label_4); spacing = new QSlider(embeddedDialog); - spacing->setObjectName(QString::fromUtf8("spacing")); + spacing->setObjectName(QStringLiteral("spacing")); spacing->setOrientation(Qt::Horizontal); formLayout->setWidget(3, QFormLayout::FieldRole, spacing); diff --git a/tests/auto/tools/uic/baseline/filespage.ui.h b/tests/auto/tools/uic/baseline/filespage.ui.h index f8dd925df88..430e5350c85 100644 --- a/tests/auto/tools/uic/baseline/filespage.ui.h +++ b/tests/auto/tools/uic/baseline/filespage.ui.h @@ -38,23 +38,23 @@ public: void setupUi(QWidget *FilesPage) { if (FilesPage->objectName().isEmpty()) - FilesPage->setObjectName(QString::fromUtf8("FilesPage")); + FilesPage->setObjectName(QStringLiteral("FilesPage")); FilesPage->resize(417, 242); gridLayout = new QGridLayout(FilesPage); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); fileLabel = new QLabel(FilesPage); - fileLabel->setObjectName(QString::fromUtf8("fileLabel")); + fileLabel->setObjectName(QStringLiteral("fileLabel")); fileLabel->setWordWrap(true); gridLayout->addWidget(fileLabel, 0, 0, 1, 2); fileListWidget = new QListWidget(FilesPage); - fileListWidget->setObjectName(QString::fromUtf8("fileListWidget")); + fileListWidget->setObjectName(QStringLiteral("fileListWidget")); gridLayout->addWidget(fileListWidget, 1, 0, 3, 1); removeButton = new QPushButton(FilesPage); - removeButton->setObjectName(QString::fromUtf8("removeButton")); + removeButton->setObjectName(QStringLiteral("removeButton")); QSizePolicy sizePolicy(QSizePolicy::Maximum, QSizePolicy::Fixed); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); @@ -64,7 +64,7 @@ public: gridLayout->addWidget(removeButton, 1, 1, 1, 1); removeAllButton = new QPushButton(FilesPage); - removeAllButton->setObjectName(QString::fromUtf8("removeAllButton")); + removeAllButton->setObjectName(QStringLiteral("removeAllButton")); gridLayout->addWidget(removeAllButton, 2, 1, 1, 1); diff --git a/tests/auto/tools/uic/baseline/filternamedialog.ui.h b/tests/auto/tools/uic/baseline/filternamedialog.ui.h index 703c552b4a5..dd84725e0db 100644 --- a/tests/auto/tools/uic/baseline/filternamedialog.ui.h +++ b/tests/auto/tools/uic/baseline/filternamedialog.ui.h @@ -38,24 +38,24 @@ public: void setupUi(QDialog *FilterNameDialogClass) { if (FilterNameDialogClass->objectName().isEmpty()) - FilterNameDialogClass->setObjectName(QString::fromUtf8("FilterNameDialogClass")); + FilterNameDialogClass->setObjectName(QStringLiteral("FilterNameDialogClass")); FilterNameDialogClass->resize(312, 95); gridLayout = new QGridLayout(FilterNameDialogClass); gridLayout->setSpacing(6); gridLayout->setContentsMargins(9, 9, 9, 9); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); label = new QLabel(FilterNameDialogClass); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); gridLayout->addWidget(label, 0, 0, 1, 1); lineEdit = new QLineEdit(FilterNameDialogClass); - lineEdit->setObjectName(QString::fromUtf8("lineEdit")); + lineEdit->setObjectName(QStringLiteral("lineEdit")); gridLayout->addWidget(lineEdit, 0, 1, 1, 2); line = new QFrame(FilterNameDialogClass); - line->setObjectName(QString::fromUtf8("line")); + line->setObjectName(QStringLiteral("line")); line->setFrameShape(QFrame::HLine); line->setFrameShadow(QFrame::Sunken); @@ -66,7 +66,7 @@ public: gridLayout->addItem(spacerItem, 2, 0, 1, 2); buttonBox = new QDialogButtonBox(FilterNameDialogClass); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName(QStringLiteral("buttonBox")); buttonBox->setOrientation(Qt::Horizontal); buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok); diff --git a/tests/auto/tools/uic/baseline/filterpage.ui.h b/tests/auto/tools/uic/baseline/filterpage.ui.h index ab1fcf12a1f..23a9c381408 100644 --- a/tests/auto/tools/uic/baseline/filterpage.ui.h +++ b/tests/auto/tools/uic/baseline/filterpage.ui.h @@ -45,37 +45,37 @@ public: void setupUi(QWidget *FilterPage) { if (FilterPage->objectName().isEmpty()) - FilterPage->setObjectName(QString::fromUtf8("FilterPage")); + FilterPage->setObjectName(QStringLiteral("FilterPage")); FilterPage->resize(419, 243); gridLayout = new QGridLayout(FilterPage); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); label = new QLabel(FilterPage); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); gridLayout->addWidget(label, 1, 0, 1, 1); filterLineEdit = new QLineEdit(FilterPage); - filterLineEdit->setObjectName(QString::fromUtf8("filterLineEdit")); + filterLineEdit->setObjectName(QStringLiteral("filterLineEdit")); gridLayout->addWidget(filterLineEdit, 2, 0, 1, 1); groupBox = new QGroupBox(FilterPage); - groupBox->setObjectName(QString::fromUtf8("groupBox")); + groupBox->setObjectName(QStringLiteral("groupBox")); gridLayout1 = new QGridLayout(groupBox); - gridLayout1->setObjectName(QString::fromUtf8("gridLayout1")); + gridLayout1->setObjectName(QStringLiteral("gridLayout1")); customFilterWidget = new QTreeWidget(groupBox); - customFilterWidget->setObjectName(QString::fromUtf8("customFilterWidget")); + customFilterWidget->setObjectName(QStringLiteral("customFilterWidget")); customFilterWidget->setColumnCount(2); gridLayout1->addWidget(customFilterWidget, 0, 0, 3, 1); addButton = new QPushButton(groupBox); - addButton->setObjectName(QString::fromUtf8("addButton")); + addButton->setObjectName(QStringLiteral("addButton")); gridLayout1->addWidget(addButton, 0, 1, 1, 1); removeButton = new QPushButton(groupBox); - removeButton->setObjectName(QString::fromUtf8("removeButton")); + removeButton->setObjectName(QStringLiteral("removeButton")); gridLayout1->addWidget(removeButton, 1, 1, 1, 1); diff --git a/tests/auto/tools/uic/baseline/finddialog.ui.h b/tests/auto/tools/uic/baseline/finddialog.ui.h index 12f5514d417..fdf2cd4e1f6 100644 --- a/tests/auto/tools/uic/baseline/finddialog.ui.h +++ b/tests/auto/tools/uic/baseline/finddialog.ui.h @@ -94,7 +94,7 @@ public: void setupUi(QDialog *FindDialog) { if (FindDialog->objectName().isEmpty()) - FindDialog->setObjectName(QString::fromUtf8("FindDialog")); + FindDialog->setObjectName(QStringLiteral("FindDialog")); FindDialog->resize(414, 170); QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Maximum); sizePolicy.setHorizontalStretch(0); @@ -104,22 +104,22 @@ public: hboxLayout = new QHBoxLayout(FindDialog); hboxLayout->setSpacing(6); hboxLayout->setContentsMargins(11, 11, 11, 11); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName(QStringLiteral("hboxLayout")); vboxLayout = new QVBoxLayout(); vboxLayout->setSpacing(6); vboxLayout->setContentsMargins(0, 0, 0, 0); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); hboxLayout1 = new QHBoxLayout(); hboxLayout1->setSpacing(6); hboxLayout1->setContentsMargins(0, 0, 0, 0); - hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1")); + hboxLayout1->setObjectName(QStringLiteral("hboxLayout1")); findWhat = new QLabel(FindDialog); - findWhat->setObjectName(QString::fromUtf8("findWhat")); + findWhat->setObjectName(QStringLiteral("findWhat")); hboxLayout1->addWidget(findWhat); led = new QLineEdit(FindDialog); - led->setObjectName(QString::fromUtf8("led")); + led->setObjectName(QStringLiteral("led")); hboxLayout1->addWidget(led); @@ -127,36 +127,36 @@ public: vboxLayout->addLayout(hboxLayout1); groupBox = new QGroupBox(FindDialog); - groupBox->setObjectName(QString::fromUtf8("groupBox")); + groupBox->setObjectName(QStringLiteral("groupBox")); gridLayout = new QGridLayout(groupBox); gridLayout->setSpacing(6); gridLayout->setContentsMargins(9, 9, 9, 9); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); sourceText = new QCheckBox(groupBox); - sourceText->setObjectName(QString::fromUtf8("sourceText")); + sourceText->setObjectName(QStringLiteral("sourceText")); sourceText->setChecked(true); gridLayout->addWidget(sourceText, 1, 0, 1, 1); translations = new QCheckBox(groupBox); - translations->setObjectName(QString::fromUtf8("translations")); + translations->setObjectName(QStringLiteral("translations")); translations->setChecked(true); gridLayout->addWidget(translations, 2, 0, 1, 1); matchCase = new QCheckBox(groupBox); - matchCase->setObjectName(QString::fromUtf8("matchCase")); + matchCase->setObjectName(QStringLiteral("matchCase")); gridLayout->addWidget(matchCase, 0, 1, 1, 1); comments = new QCheckBox(groupBox); - comments->setObjectName(QString::fromUtf8("comments")); + comments->setObjectName(QStringLiteral("comments")); comments->setChecked(true); gridLayout->addWidget(comments, 0, 0, 1, 1); ignoreAccelerators = new QCheckBox(groupBox); - ignoreAccelerators->setObjectName(QString::fromUtf8("ignoreAccelerators")); + ignoreAccelerators->setObjectName(QStringLiteral("ignoreAccelerators")); ignoreAccelerators->setChecked(true); gridLayout->addWidget(ignoreAccelerators, 1, 1, 1, 1); @@ -170,16 +170,16 @@ public: vboxLayout1 = new QVBoxLayout(); vboxLayout1->setSpacing(6); vboxLayout1->setContentsMargins(0, 0, 0, 0); - vboxLayout1->setObjectName(QString::fromUtf8("vboxLayout1")); + vboxLayout1->setObjectName(QStringLiteral("vboxLayout1")); findNxt = new QPushButton(FindDialog); - findNxt->setObjectName(QString::fromUtf8("findNxt")); + findNxt->setObjectName(QStringLiteral("findNxt")); findNxt->setDefault(true); findNxt->setFlat(false); vboxLayout1->addWidget(findNxt); cancel = new QPushButton(FindDialog); - cancel->setObjectName(QString::fromUtf8("cancel")); + cancel->setObjectName(QStringLiteral("cancel")); vboxLayout1->addWidget(cancel); diff --git a/tests/auto/tools/uic/baseline/form.ui.h b/tests/auto/tools/uic/baseline/form.ui.h index 6aca98a1e9b..cbae1567e93 100644 --- a/tests/auto/tools/uic/baseline/form.ui.h +++ b/tests/auto/tools/uic/baseline/form.ui.h @@ -44,7 +44,7 @@ public: void setupUi(QWidget *WorldTimeForm) { if (WorldTimeForm->objectName().isEmpty()) - WorldTimeForm->setObjectName(QString::fromUtf8("WorldTimeForm")); + WorldTimeForm->setObjectName(QStringLiteral("WorldTimeForm")); WorldTimeForm->resize(400, 300); hboxLayout = new QHBoxLayout(WorldTimeForm); #ifndef Q_OS_MAC @@ -53,9 +53,9 @@ public: #ifndef Q_OS_MAC hboxLayout->setContentsMargins(9, 9, 9, 9); #endif - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName(QStringLiteral("hboxLayout")); worldTimeClock = new WorldTimeClock(WorldTimeForm); - worldTimeClock->setObjectName(QString::fromUtf8("worldTimeClock")); + worldTimeClock->setObjectName(QStringLiteral("worldTimeClock")); hboxLayout->addWidget(worldTimeClock); @@ -64,7 +64,7 @@ public: vboxLayout->setSpacing(6); #endif vboxLayout->setContentsMargins(1, 1, 1, 1); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); spacerItem = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding); vboxLayout->addItem(spacerItem); @@ -74,14 +74,14 @@ public: hboxLayout1->setSpacing(6); #endif hboxLayout1->setContentsMargins(1, 1, 1, 1); - hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1")); + hboxLayout1->setObjectName(QStringLiteral("hboxLayout1")); label = new QLabel(WorldTimeForm); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); hboxLayout1->addWidget(label); timeEdit = new QTimeEdit(WorldTimeForm); - timeEdit->setObjectName(QString::fromUtf8("timeEdit")); + timeEdit->setObjectName(QStringLiteral("timeEdit")); timeEdit->setReadOnly(true); hboxLayout1->addWidget(timeEdit); @@ -94,14 +94,14 @@ public: hboxLayout2->setSpacing(6); #endif hboxLayout2->setContentsMargins(1, 1, 1, 1); - hboxLayout2->setObjectName(QString::fromUtf8("hboxLayout2")); + hboxLayout2->setObjectName(QStringLiteral("hboxLayout2")); label_2 = new QLabel(WorldTimeForm); - label_2->setObjectName(QString::fromUtf8("label_2")); + label_2->setObjectName(QStringLiteral("label_2")); hboxLayout2->addWidget(label_2); spinBox = new QSpinBox(WorldTimeForm); - spinBox->setObjectName(QString::fromUtf8("spinBox")); + spinBox->setObjectName(QStringLiteral("spinBox")); spinBox->setMaximum(12); spinBox->setMinimum(-12); diff --git a/tests/auto/tools/uic/baseline/formwindowsettings.ui.h b/tests/auto/tools/uic/baseline/formwindowsettings.ui.h index ffc1e1ad392..75d4d437bbb 100644 --- a/tests/auto/tools/uic/baseline/formwindowsettings.ui.h +++ b/tests/auto/tools/uic/baseline/formwindowsettings.ui.h @@ -109,19 +109,19 @@ public: void setupUi(QDialog *FormWindowSettings) { if (FormWindowSettings->objectName().isEmpty()) - FormWindowSettings->setObjectName(QString::fromUtf8("FormWindowSettings")); + FormWindowSettings->setObjectName(QStringLiteral("FormWindowSettings")); FormWindowSettings->resize(433, 465); gridLayout = new QGridLayout(FormWindowSettings); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); buttonBox = new QDialogButtonBox(FormWindowSettings); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName(QStringLiteral("buttonBox")); buttonBox->setOrientation(Qt::Horizontal); buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok); gridLayout->addWidget(buttonBox, 6, 0, 1, 2); line = new QFrame(FormWindowSettings); - line->setObjectName(QString::fromUtf8("line")); + line->setObjectName(QStringLiteral("line")); line->setFrameShape(QFrame::HLine); line->setFrameShadow(QFrame::Sunken); @@ -132,33 +132,33 @@ public: hboxLayout->setSpacing(6); #endif hboxLayout->setContentsMargins(0, 0, 0, 0); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName(QStringLiteral("hboxLayout")); layoutDefaultGroupBox = new QGroupBox(FormWindowSettings); - layoutDefaultGroupBox->setObjectName(QString::fromUtf8("layoutDefaultGroupBox")); + layoutDefaultGroupBox->setObjectName(QStringLiteral("layoutDefaultGroupBox")); layoutDefaultGroupBox->setCheckable(true); gridLayout1 = new QGridLayout(layoutDefaultGroupBox); #ifndef Q_OS_MAC gridLayout1->setSpacing(6); #endif gridLayout1->setContentsMargins(8, 8, 8, 8); - gridLayout1->setObjectName(QString::fromUtf8("gridLayout1")); + gridLayout1->setObjectName(QStringLiteral("gridLayout1")); label_2 = new QLabel(layoutDefaultGroupBox); - label_2->setObjectName(QString::fromUtf8("label_2")); + label_2->setObjectName(QStringLiteral("label_2")); gridLayout1->addWidget(label_2, 1, 0, 1, 1); label = new QLabel(layoutDefaultGroupBox); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); gridLayout1->addWidget(label, 0, 0, 1, 1); defaultSpacingSpinBox = new QSpinBox(layoutDefaultGroupBox); - defaultSpacingSpinBox->setObjectName(QString::fromUtf8("defaultSpacingSpinBox")); + defaultSpacingSpinBox->setObjectName(QStringLiteral("defaultSpacingSpinBox")); gridLayout1->addWidget(defaultSpacingSpinBox, 1, 1, 1, 1); defaultMarginSpinBox = new QSpinBox(layoutDefaultGroupBox); - defaultMarginSpinBox->setObjectName(QString::fromUtf8("defaultMarginSpinBox")); + defaultMarginSpinBox->setObjectName(QStringLiteral("defaultMarginSpinBox")); gridLayout1->addWidget(defaultMarginSpinBox, 0, 1, 1, 1); @@ -166,31 +166,31 @@ public: hboxLayout->addWidget(layoutDefaultGroupBox); layoutFunctionGroupBox = new QGroupBox(FormWindowSettings); - layoutFunctionGroupBox->setObjectName(QString::fromUtf8("layoutFunctionGroupBox")); + layoutFunctionGroupBox->setObjectName(QStringLiteral("layoutFunctionGroupBox")); layoutFunctionGroupBox->setCheckable(true); gridLayout2 = new QGridLayout(layoutFunctionGroupBox); #ifndef Q_OS_MAC gridLayout2->setSpacing(6); #endif gridLayout2->setContentsMargins(8, 8, 8, 8); - gridLayout2->setObjectName(QString::fromUtf8("gridLayout2")); + gridLayout2->setObjectName(QStringLiteral("gridLayout2")); spacingFunctionLineEdit = new QLineEdit(layoutFunctionGroupBox); - spacingFunctionLineEdit->setObjectName(QString::fromUtf8("spacingFunctionLineEdit")); + spacingFunctionLineEdit->setObjectName(QStringLiteral("spacingFunctionLineEdit")); gridLayout2->addWidget(spacingFunctionLineEdit, 1, 1, 1, 1); marginFunctionLineEdit = new QLineEdit(layoutFunctionGroupBox); - marginFunctionLineEdit->setObjectName(QString::fromUtf8("marginFunctionLineEdit")); + marginFunctionLineEdit->setObjectName(QStringLiteral("marginFunctionLineEdit")); gridLayout2->addWidget(marginFunctionLineEdit, 0, 1, 1, 1); label_3 = new QLabel(layoutFunctionGroupBox); - label_3->setObjectName(QString::fromUtf8("label_3")); + label_3->setObjectName(QStringLiteral("label_3")); gridLayout2->addWidget(label_3, 0, 0, 1, 1); label_3_2 = new QLabel(layoutFunctionGroupBox); - label_3_2->setObjectName(QString::fromUtf8("label_3_2")); + label_3_2->setObjectName(QStringLiteral("label_3_2")); gridLayout2->addWidget(label_3_2, 1, 0, 1, 1); @@ -201,15 +201,15 @@ public: gridLayout->addLayout(hboxLayout, 2, 0, 1, 2); pixmapFunctionGroupBox_2 = new QGroupBox(FormWindowSettings); - pixmapFunctionGroupBox_2->setObjectName(QString::fromUtf8("pixmapFunctionGroupBox_2")); + pixmapFunctionGroupBox_2->setObjectName(QStringLiteral("pixmapFunctionGroupBox_2")); vboxLayout = new QVBoxLayout(pixmapFunctionGroupBox_2); #ifndef Q_OS_MAC vboxLayout->setSpacing(6); #endif vboxLayout->setContentsMargins(8, 8, 8, 8); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); authorLineEdit = new QLineEdit(pixmapFunctionGroupBox_2); - authorLineEdit->setObjectName(QString::fromUtf8("authorLineEdit")); + authorLineEdit->setObjectName(QStringLiteral("authorLineEdit")); vboxLayout->addWidget(authorLineEdit); @@ -217,15 +217,15 @@ public: gridLayout->addWidget(pixmapFunctionGroupBox_2, 0, 0, 1, 2); includeHintsGroupBox = new QGroupBox(FormWindowSettings); - includeHintsGroupBox->setObjectName(QString::fromUtf8("includeHintsGroupBox")); + includeHintsGroupBox->setObjectName(QStringLiteral("includeHintsGroupBox")); vboxLayout1 = new QVBoxLayout(includeHintsGroupBox); #ifndef Q_OS_MAC vboxLayout1->setSpacing(6); #endif vboxLayout1->setContentsMargins(8, 8, 8, 8); - vboxLayout1->setObjectName(QString::fromUtf8("vboxLayout1")); + vboxLayout1->setObjectName(QStringLiteral("vboxLayout1")); includeHintsTextEdit = new QTextEdit(includeHintsGroupBox); - includeHintsTextEdit->setObjectName(QString::fromUtf8("includeHintsTextEdit")); + includeHintsTextEdit->setObjectName(QStringLiteral("includeHintsTextEdit")); vboxLayout1->addWidget(includeHintsTextEdit); @@ -237,18 +237,18 @@ public: hboxLayout1->setSpacing(6); #endif hboxLayout1->setContentsMargins(0, 0, 0, 0); - hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1")); + hboxLayout1->setObjectName(QStringLiteral("hboxLayout1")); pixmapFunctionGroupBox = new QGroupBox(FormWindowSettings); - pixmapFunctionGroupBox->setObjectName(QString::fromUtf8("pixmapFunctionGroupBox")); + pixmapFunctionGroupBox->setObjectName(QStringLiteral("pixmapFunctionGroupBox")); pixmapFunctionGroupBox->setCheckable(true); vboxLayout2 = new QVBoxLayout(pixmapFunctionGroupBox); #ifndef Q_OS_MAC vboxLayout2->setSpacing(6); #endif vboxLayout2->setContentsMargins(8, 8, 8, 8); - vboxLayout2->setObjectName(QString::fromUtf8("vboxLayout2")); + vboxLayout2->setObjectName(QStringLiteral("vboxLayout2")); pixmapFunctionLineEdit = new QLineEdit(pixmapFunctionGroupBox); - pixmapFunctionLineEdit->setObjectName(QString::fromUtf8("pixmapFunctionLineEdit")); + pixmapFunctionLineEdit->setObjectName(QStringLiteral("pixmapFunctionLineEdit")); vboxLayout2->addWidget(pixmapFunctionLineEdit); @@ -263,7 +263,7 @@ public: gridLayout->addItem(spacerItem, 4, 1, 1, 1); gridPanel = new qdesigner_internal::GridPanel(FormWindowSettings); - gridPanel->setObjectName(QString::fromUtf8("gridPanel")); + gridPanel->setObjectName(QStringLiteral("gridPanel")); gridLayout->addWidget(gridPanel, 1, 0, 1, 2); diff --git a/tests/auto/tools/uic/baseline/generalpage.ui.h b/tests/auto/tools/uic/baseline/generalpage.ui.h index a4d72117ebc..f496cb834c2 100644 --- a/tests/auto/tools/uic/baseline/generalpage.ui.h +++ b/tests/auto/tools/uic/baseline/generalpage.ui.h @@ -37,27 +37,27 @@ public: void setupUi(QWidget *GeneralPage) { if (GeneralPage->objectName().isEmpty()) - GeneralPage->setObjectName(QString::fromUtf8("GeneralPage")); + GeneralPage->setObjectName(QStringLiteral("GeneralPage")); GeneralPage->resize(417, 243); gridLayout = new QGridLayout(GeneralPage); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); label = new QLabel(GeneralPage); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); gridLayout->addWidget(label, 1, 0, 1, 1); namespaceLineEdit = new QLineEdit(GeneralPage); - namespaceLineEdit->setObjectName(QString::fromUtf8("namespaceLineEdit")); + namespaceLineEdit->setObjectName(QStringLiteral("namespaceLineEdit")); gridLayout->addWidget(namespaceLineEdit, 1, 1, 1, 1); label_2 = new QLabel(GeneralPage); - label_2->setObjectName(QString::fromUtf8("label_2")); + label_2->setObjectName(QStringLiteral("label_2")); gridLayout->addWidget(label_2, 2, 0, 1, 1); folderLineEdit = new QLineEdit(GeneralPage); - folderLineEdit->setObjectName(QString::fromUtf8("folderLineEdit")); + folderLineEdit->setObjectName(QStringLiteral("folderLineEdit")); gridLayout->addWidget(folderLineEdit, 2, 1, 1, 1); diff --git a/tests/auto/tools/uic/baseline/gridalignment.ui.h b/tests/auto/tools/uic/baseline/gridalignment.ui.h index 7a3291dc8c6..8d9a5561648 100644 --- a/tests/auto/tools/uic/baseline/gridalignment.ui.h +++ b/tests/auto/tools/uic/baseline/gridalignment.ui.h @@ -33,27 +33,27 @@ public: void setupUi(QWidget *Form) { if (Form->objectName().isEmpty()) - Form->setObjectName(QString::fromUtf8("Form")); + Form->setObjectName(QStringLiteral("Form")); Form->resize(279, 163); gridLayout = new QGridLayout(Form); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); pushButton = new QPushButton(Form); - pushButton->setObjectName(QString::fromUtf8("pushButton")); + pushButton->setObjectName(QStringLiteral("pushButton")); gridLayout->addWidget(pushButton, 0, 0, 1, 1, Qt::AlignLeft); pushButton_3 = new QPushButton(Form); - pushButton_3->setObjectName(QString::fromUtf8("pushButton_3")); + pushButton_3->setObjectName(QStringLiteral("pushButton_3")); gridLayout->addWidget(pushButton_3, 0, 1, 1, 1, Qt::AlignTop); pushButton_2 = new QPushButton(Form); - pushButton_2->setObjectName(QString::fromUtf8("pushButton_2")); + pushButton_2->setObjectName(QStringLiteral("pushButton_2")); gridLayout->addWidget(pushButton_2, 1, 0, 1, 1, Qt::AlignRight); pushButton_4 = new QPushButton(Form); - pushButton_4->setObjectName(QString::fromUtf8("pushButton_4")); + pushButton_4->setObjectName(QStringLiteral("pushButton_4")); gridLayout->addWidget(pushButton_4, 1, 1, 1, 1, Qt::AlignBottom); diff --git a/tests/auto/tools/uic/baseline/gridpanel.ui.h b/tests/auto/tools/uic/baseline/gridpanel.ui.h index 21e703b95b3..abe260e601e 100644 --- a/tests/auto/tools/uic/baseline/gridpanel.ui.h +++ b/tests/auto/tools/uic/baseline/gridpanel.ui.h @@ -50,17 +50,17 @@ public: void setupUi(QWidget *qdesigner_internal__GridPanel) { if (qdesigner_internal__GridPanel->objectName().isEmpty()) - qdesigner_internal__GridPanel->setObjectName(QString::fromUtf8("qdesigner_internal__GridPanel")); + qdesigner_internal__GridPanel->setObjectName(QStringLiteral("qdesigner_internal__GridPanel")); qdesigner_internal__GridPanel->resize(393, 110); vboxLayout = new QVBoxLayout(qdesigner_internal__GridPanel); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); vboxLayout->setContentsMargins(0, 0, 0, 0); m_gridGroupBox = new QGroupBox(qdesigner_internal__GridPanel); - m_gridGroupBox->setObjectName(QString::fromUtf8("m_gridGroupBox")); + m_gridGroupBox->setObjectName(QStringLiteral("m_gridGroupBox")); gridLayout = new QGridLayout(m_gridGroupBox); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); m_visibleCheckBox = new QCheckBox(m_gridGroupBox); - m_visibleCheckBox->setObjectName(QString::fromUtf8("m_visibleCheckBox")); + m_visibleCheckBox->setObjectName(QStringLiteral("m_visibleCheckBox")); QSizePolicy sizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); @@ -70,28 +70,28 @@ public: gridLayout->addWidget(m_visibleCheckBox, 0, 0, 1, 1); label = new QLabel(m_gridGroupBox); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); gridLayout->addWidget(label, 0, 1, 1, 1); m_deltaXSpinBox = new QSpinBox(m_gridGroupBox); - m_deltaXSpinBox->setObjectName(QString::fromUtf8("m_deltaXSpinBox")); + m_deltaXSpinBox->setObjectName(QStringLiteral("m_deltaXSpinBox")); m_deltaXSpinBox->setMinimum(2); m_deltaXSpinBox->setMaximum(100); gridLayout->addWidget(m_deltaXSpinBox, 0, 2, 1, 1); m_snapXCheckBox = new QCheckBox(m_gridGroupBox); - m_snapXCheckBox->setObjectName(QString::fromUtf8("m_snapXCheckBox")); + m_snapXCheckBox->setObjectName(QStringLiteral("m_snapXCheckBox")); sizePolicy.setHeightForWidth(m_snapXCheckBox->sizePolicy().hasHeightForWidth()); m_snapXCheckBox->setSizePolicy(sizePolicy); gridLayout->addWidget(m_snapXCheckBox, 0, 3, 1, 1); hboxLayout = new QHBoxLayout(); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName(QStringLiteral("hboxLayout")); m_resetButton = new QPushButton(m_gridGroupBox); - m_resetButton->setObjectName(QString::fromUtf8("m_resetButton")); + m_resetButton->setObjectName(QStringLiteral("m_resetButton")); hboxLayout->addWidget(m_resetButton); @@ -103,19 +103,19 @@ public: gridLayout->addLayout(hboxLayout, 1, 0, 1, 1); label_2 = new QLabel(m_gridGroupBox); - label_2->setObjectName(QString::fromUtf8("label_2")); + label_2->setObjectName(QStringLiteral("label_2")); gridLayout->addWidget(label_2, 1, 1, 1, 1); m_deltaYSpinBox = new QSpinBox(m_gridGroupBox); - m_deltaYSpinBox->setObjectName(QString::fromUtf8("m_deltaYSpinBox")); + m_deltaYSpinBox->setObjectName(QStringLiteral("m_deltaYSpinBox")); m_deltaYSpinBox->setMinimum(2); m_deltaYSpinBox->setMaximum(100); gridLayout->addWidget(m_deltaYSpinBox, 1, 2, 1, 1); m_snapYCheckBox = new QCheckBox(m_gridGroupBox); - m_snapYCheckBox->setObjectName(QString::fromUtf8("m_snapYCheckBox")); + m_snapYCheckBox->setObjectName(QStringLiteral("m_snapYCheckBox")); sizePolicy.setHeightForWidth(m_snapYCheckBox->sizePolicy().hasHeightForWidth()); m_snapYCheckBox->setSizePolicy(sizePolicy); diff --git a/tests/auto/tools/uic/baseline/helpdialog.ui.h b/tests/auto/tools/uic/baseline/helpdialog.ui.h index b16632fe000..ac482ba1392 100644 --- a/tests/auto/tools/uic/baseline/helpdialog.ui.h +++ b/tests/auto/tools/uic/baseline/helpdialog.ui.h @@ -114,26 +114,26 @@ public: void setupUi(QWidget *HelpDialog) { if (HelpDialog->objectName().isEmpty()) - HelpDialog->setObjectName(QString::fromUtf8("HelpDialog")); + HelpDialog->setObjectName(QStringLiteral("HelpDialog")); HelpDialog->resize(274, 417); vboxLayout = new QVBoxLayout(HelpDialog); #ifndef Q_OS_MAC vboxLayout->setSpacing(6); #endif vboxLayout->setContentsMargins(0, 0, 0, 0); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); tabWidget = new QTabWidget(HelpDialog); - tabWidget->setObjectName(QString::fromUtf8("tabWidget")); + tabWidget->setObjectName(QStringLiteral("tabWidget")); contentPage = new QWidget(); - contentPage->setObjectName(QString::fromUtf8("contentPage")); + contentPage->setObjectName(QStringLiteral("contentPage")); vboxLayout1 = new QVBoxLayout(contentPage); #ifndef Q_OS_MAC vboxLayout1->setSpacing(6); #endif vboxLayout1->setContentsMargins(5, 5, 5, 5); - vboxLayout1->setObjectName(QString::fromUtf8("vboxLayout1")); + vboxLayout1->setObjectName(QStringLiteral("vboxLayout1")); listContents = new QTreeWidget(contentPage); - listContents->setObjectName(QString::fromUtf8("listContents")); + listContents->setObjectName(QStringLiteral("listContents")); listContents->setContextMenuPolicy(Qt::CustomContextMenu); listContents->setRootIsDecorated(true); listContents->setUniformRowHeights(true); @@ -142,40 +142,40 @@ public: tabWidget->addTab(contentPage, QString()); indexPage = new QWidget(); - indexPage->setObjectName(QString::fromUtf8("indexPage")); + indexPage->setObjectName(QStringLiteral("indexPage")); vboxLayout2 = new QVBoxLayout(indexPage); #ifndef Q_OS_MAC vboxLayout2->setSpacing(6); #endif vboxLayout2->setContentsMargins(5, 5, 5, 5); - vboxLayout2->setObjectName(QString::fromUtf8("vboxLayout2")); + vboxLayout2->setObjectName(QStringLiteral("vboxLayout2")); TextLabel1 = new QLabel(indexPage); - TextLabel1->setObjectName(QString::fromUtf8("TextLabel1")); + TextLabel1->setObjectName(QStringLiteral("TextLabel1")); vboxLayout2->addWidget(TextLabel1); editIndex = new QLineEdit(indexPage); - editIndex->setObjectName(QString::fromUtf8("editIndex")); + editIndex->setObjectName(QStringLiteral("editIndex")); vboxLayout2->addWidget(editIndex); listIndex = new QListView(indexPage); - listIndex->setObjectName(QString::fromUtf8("listIndex")); + listIndex->setObjectName(QStringLiteral("listIndex")); listIndex->setContextMenuPolicy(Qt::CustomContextMenu); vboxLayout2->addWidget(listIndex); tabWidget->addTab(indexPage, QString()); bookmarkPage = new QWidget(); - bookmarkPage->setObjectName(QString::fromUtf8("bookmarkPage")); + bookmarkPage->setObjectName(QStringLiteral("bookmarkPage")); vboxLayout3 = new QVBoxLayout(bookmarkPage); #ifndef Q_OS_MAC vboxLayout3->setSpacing(6); #endif vboxLayout3->setContentsMargins(5, 5, 5, 5); - vboxLayout3->setObjectName(QString::fromUtf8("vboxLayout3")); + vboxLayout3->setObjectName(QStringLiteral("vboxLayout3")); listBookmarks = new QTreeWidget(bookmarkPage); - listBookmarks->setObjectName(QString::fromUtf8("listBookmarks")); + listBookmarks->setObjectName(QStringLiteral("listBookmarks")); listBookmarks->setContextMenuPolicy(Qt::CustomContextMenu); listBookmarks->setUniformRowHeights(true); @@ -186,18 +186,18 @@ public: hboxLayout->setSpacing(6); #endif hboxLayout->setContentsMargins(0, 0, 0, 0); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName(QStringLiteral("hboxLayout")); spacerItem = new QSpacerItem(20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); hboxLayout->addItem(spacerItem); buttonAdd = new QPushButton(bookmarkPage); - buttonAdd->setObjectName(QString::fromUtf8("buttonAdd")); + buttonAdd->setObjectName(QStringLiteral("buttonAdd")); hboxLayout->addWidget(buttonAdd); buttonRemove = new QPushButton(bookmarkPage); - buttonRemove->setObjectName(QString::fromUtf8("buttonRemove")); + buttonRemove->setObjectName(QStringLiteral("buttonRemove")); hboxLayout->addWidget(buttonRemove); @@ -206,35 +206,35 @@ public: tabWidget->addTab(bookmarkPage, QString()); searchPage = new QWidget(); - searchPage->setObjectName(QString::fromUtf8("searchPage")); + searchPage->setObjectName(QStringLiteral("searchPage")); gridLayout = new QGridLayout(searchPage); #ifndef Q_OS_MAC gridLayout->setSpacing(6); #endif gridLayout->setContentsMargins(5, 5, 5, 5); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); spacerItem1 = new QSpacerItem(20, 20, QSizePolicy::Minimum, QSizePolicy::Fixed); gridLayout->addItem(spacerItem1, 3, 0, 1, 1); TextLabel1_2 = new QLabel(searchPage); - TextLabel1_2->setObjectName(QString::fromUtf8("TextLabel1_2")); + TextLabel1_2->setObjectName(QStringLiteral("TextLabel1_2")); gridLayout->addWidget(TextLabel1_2, 0, 0, 1, 1); termsEdit = new QLineEdit(searchPage); - termsEdit->setObjectName(QString::fromUtf8("termsEdit")); + termsEdit->setObjectName(QStringLiteral("termsEdit")); gridLayout->addWidget(termsEdit, 1, 0, 1, 1); resultBox = new QListWidget(searchPage); - resultBox->setObjectName(QString::fromUtf8("resultBox")); + resultBox->setObjectName(QStringLiteral("resultBox")); resultBox->setContextMenuPolicy(Qt::CustomContextMenu); gridLayout->addWidget(resultBox, 5, 0, 1, 1); TextLabel2 = new QLabel(searchPage); - TextLabel2->setObjectName(QString::fromUtf8("TextLabel2")); + TextLabel2->setObjectName(QStringLiteral("TextLabel2")); gridLayout->addWidget(TextLabel2, 4, 0, 1, 1); @@ -243,9 +243,9 @@ public: hboxLayout1->setSpacing(6); #endif hboxLayout1->setContentsMargins(1, 1, 1, 1); - hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1")); + hboxLayout1->setObjectName(QStringLiteral("hboxLayout1")); helpButton = new QPushButton(searchPage); - helpButton->setObjectName(QString::fromUtf8("helpButton")); + helpButton->setObjectName(QStringLiteral("helpButton")); hboxLayout1->addWidget(helpButton); @@ -254,7 +254,7 @@ public: hboxLayout1->addItem(spacerItem2); searchButton = new QPushButton(searchPage); - searchButton->setObjectName(QString::fromUtf8("searchButton")); + searchButton->setObjectName(QStringLiteral("searchButton")); searchButton->setEnabled(false); hboxLayout1->addWidget(searchButton); @@ -267,7 +267,7 @@ public: vboxLayout->addWidget(tabWidget); framePrepare = new QFrame(HelpDialog); - framePrepare->setObjectName(QString::fromUtf8("framePrepare")); + framePrepare->setObjectName(QStringLiteral("framePrepare")); framePrepare->setFrameShape(QFrame::StyledPanel); framePrepare->setFrameShadow(QFrame::Raised); hboxLayout2 = new QHBoxLayout(framePrepare); @@ -275,14 +275,14 @@ public: hboxLayout2->setSpacing(6); #endif hboxLayout2->setContentsMargins(3, 3, 3, 3); - hboxLayout2->setObjectName(QString::fromUtf8("hboxLayout2")); + hboxLayout2->setObjectName(QStringLiteral("hboxLayout2")); labelPrepare = new QLabel(framePrepare); - labelPrepare->setObjectName(QString::fromUtf8("labelPrepare")); + labelPrepare->setObjectName(QStringLiteral("labelPrepare")); hboxLayout2->addWidget(labelPrepare); progressPrepare = new QProgressBar(framePrepare); - progressPrepare->setObjectName(QString::fromUtf8("progressPrepare")); + progressPrepare->setObjectName(QStringLiteral("progressPrepare")); hboxLayout2->addWidget(progressPrepare); diff --git a/tests/auto/tools/uic/baseline/history.ui.h b/tests/auto/tools/uic/baseline/history.ui.h index 1784b216e36..57007e52800 100644 --- a/tests/auto/tools/uic/baseline/history.ui.h +++ b/tests/auto/tools/uic/baseline/history.ui.h @@ -42,33 +42,33 @@ public: void setupUi(QDialog *HistoryDialog) { if (HistoryDialog->objectName().isEmpty()) - HistoryDialog->setObjectName(QString::fromUtf8("HistoryDialog")); + HistoryDialog->setObjectName(QStringLiteral("HistoryDialog")); HistoryDialog->resize(758, 450); gridLayout = new QGridLayout(HistoryDialog); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); spacerItem = new QSpacerItem(252, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); gridLayout->addItem(spacerItem, 0, 0, 1, 1); search = new SearchLineEdit(HistoryDialog); - search->setObjectName(QString::fromUtf8("search")); + search->setObjectName(QStringLiteral("search")); gridLayout->addWidget(search, 0, 1, 1, 1); tree = new EditTreeView(HistoryDialog); - tree->setObjectName(QString::fromUtf8("tree")); + tree->setObjectName(QStringLiteral("tree")); gridLayout->addWidget(tree, 1, 0, 1, 2); hboxLayout = new QHBoxLayout(); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName(QStringLiteral("hboxLayout")); removeButton = new QPushButton(HistoryDialog); - removeButton->setObjectName(QString::fromUtf8("removeButton")); + removeButton->setObjectName(QStringLiteral("removeButton")); hboxLayout->addWidget(removeButton); removeAllButton = new QPushButton(HistoryDialog); - removeAllButton->setObjectName(QString::fromUtf8("removeAllButton")); + removeAllButton->setObjectName(QStringLiteral("removeAllButton")); hboxLayout->addWidget(removeAllButton); @@ -77,7 +77,7 @@ public: hboxLayout->addItem(spacerItem1); buttonBox = new QDialogButtonBox(HistoryDialog); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName(QStringLiteral("buttonBox")); buttonBox->setStandardButtons(QDialogButtonBox::Ok); hboxLayout->addWidget(buttonBox); diff --git a/tests/auto/tools/uic/baseline/icontheme.ui.h b/tests/auto/tools/uic/baseline/icontheme.ui.h index 78c90838ab4..f3f8f634f9e 100644 --- a/tests/auto/tools/uic/baseline/icontheme.ui.h +++ b/tests/auto/tools/uic/baseline/icontheme.ui.h @@ -32,39 +32,39 @@ public: void setupUi(QWidget *Form) { if (Form->objectName().isEmpty()) - Form->setObjectName(QString::fromUtf8("Form")); + Form->setObjectName(QStringLiteral("Form")); Form->resize(122, 117); verticalLayout = new QVBoxLayout(Form); - verticalLayout->setObjectName(QString::fromUtf8("verticalLayout")); + verticalLayout->setObjectName(QStringLiteral("verticalLayout")); fileicon = new QPushButton(Form); - fileicon->setObjectName(QString::fromUtf8("fileicon")); + fileicon->setObjectName(QStringLiteral("fileicon")); QIcon icon; - icon.addFile(QString::fromUtf8("image1.png"), QSize(), QIcon::Normal, QIcon::Off); + icon.addFile(QStringLiteral("image1.png"), QSize(), QIcon::Normal, QIcon::Off); fileicon->setIcon(icon); verticalLayout->addWidget(fileicon); fileandthemeicon = new QPushButton(Form); - fileandthemeicon->setObjectName(QString::fromUtf8("fileandthemeicon")); + fileandthemeicon->setObjectName(QStringLiteral("fileandthemeicon")); QIcon icon1; - QString iconThemeName = QString::fromUtf8("edit-copy"); + QString iconThemeName = QStringLiteral("edit-copy"); if (QIcon::hasThemeIcon(iconThemeName)) { icon1 = QIcon::fromTheme(iconThemeName); } else { - icon1.addFile(QString::fromUtf8("image7.png"), QSize(), QIcon::Normal, QIcon::Off); + icon1.addFile(QStringLiteral("image7.png"), QSize(), QIcon::Normal, QIcon::Off); } fileandthemeicon->setIcon(icon1); verticalLayout->addWidget(fileandthemeicon); themeicon = new QPushButton(Form); - themeicon->setObjectName(QString::fromUtf8("themeicon")); + themeicon->setObjectName(QStringLiteral("themeicon")); QIcon icon2; - iconThemeName = QString::fromUtf8("edit-copy"); + iconThemeName = QStringLiteral("edit-copy"); if (QIcon::hasThemeIcon(iconThemeName)) { icon2 = QIcon::fromTheme(iconThemeName); } else { - icon2.addFile(QString::fromUtf8(""), QSize(), QIcon::Normal, QIcon::Off); + icon2.addFile(QStringLiteral(""), QSize(), QIcon::Normal, QIcon::Off); } themeicon->setIcon(icon2); diff --git a/tests/auto/tools/uic/baseline/identifierpage.ui.h b/tests/auto/tools/uic/baseline/identifierpage.ui.h index 1088ee33da6..3f0cd1a4f5e 100644 --- a/tests/auto/tools/uic/baseline/identifierpage.ui.h +++ b/tests/auto/tools/uic/baseline/identifierpage.ui.h @@ -40,16 +40,16 @@ public: void setupUi(QWidget *IdentifierPage) { if (IdentifierPage->objectName().isEmpty()) - IdentifierPage->setObjectName(QString::fromUtf8("IdentifierPage")); + IdentifierPage->setObjectName(QStringLiteral("IdentifierPage")); IdentifierPage->resize(417, 242); gridLayout = new QGridLayout(IdentifierPage); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); spacerItem = new QSpacerItem(20, 20, QSizePolicy::Minimum, QSizePolicy::Fixed); gridLayout->addItem(spacerItem, 0, 1, 1, 1); identifierCheckBox = new QCheckBox(IdentifierPage); - identifierCheckBox->setObjectName(QString::fromUtf8("identifierCheckBox")); + identifierCheckBox->setObjectName(QStringLiteral("identifierCheckBox")); gridLayout->addWidget(identifierCheckBox, 1, 0, 1, 3); @@ -62,20 +62,20 @@ public: gridLayout->addItem(spacerItem2, 2, 0, 1, 1); globalButton = new QRadioButton(IdentifierPage); - globalButton->setObjectName(QString::fromUtf8("globalButton")); + globalButton->setObjectName(QStringLiteral("globalButton")); globalButton->setEnabled(false); globalButton->setChecked(true); gridLayout->addWidget(globalButton, 2, 1, 1, 1); prefixLineEdit = new QLineEdit(IdentifierPage); - prefixLineEdit->setObjectName(QString::fromUtf8("prefixLineEdit")); + prefixLineEdit->setObjectName(QStringLiteral("prefixLineEdit")); prefixLineEdit->setEnabled(false); gridLayout->addWidget(prefixLineEdit, 2, 2, 1, 1); fileNameButton = new QRadioButton(IdentifierPage); - fileNameButton->setObjectName(QString::fromUtf8("fileNameButton")); + fileNameButton->setObjectName(QStringLiteral("fileNameButton")); fileNameButton->setEnabled(false); gridLayout->addWidget(fileNameButton, 3, 1, 1, 2); diff --git a/tests/auto/tools/uic/baseline/imagedialog.ui.h b/tests/auto/tools/uic/baseline/imagedialog.ui.h index 1728cac952f..c09363d3ec2 100644 --- a/tests/auto/tools/uic/baseline/imagedialog.ui.h +++ b/tests/auto/tools/uic/baseline/imagedialog.ui.h @@ -50,8 +50,8 @@ public: void setupUi(QDialog *dialog) { if (dialog->objectName().isEmpty()) - dialog->setObjectName(QString::fromUtf8("dialog")); - dialog->setObjectName(QString::fromUtf8("ImageDialog")); + dialog->setObjectName(QStringLiteral("dialog")); + dialog->setObjectName(QStringLiteral("ImageDialog")); dialog->resize(320, 180); vboxLayout = new QVBoxLayout(dialog); #ifndef Q_OS_MAC @@ -60,17 +60,17 @@ public: #ifndef Q_OS_MAC vboxLayout->setContentsMargins(9, 9, 9, 9); #endif - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); - vboxLayout->setObjectName(QString::fromUtf8("")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("")); gridLayout = new QGridLayout(); #ifndef Q_OS_MAC gridLayout->setSpacing(6); #endif gridLayout->setContentsMargins(1, 1, 1, 1); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); - gridLayout->setObjectName(QString::fromUtf8("")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); + gridLayout->setObjectName(QStringLiteral("")); widthLabel = new QLabel(dialog); - widthLabel->setObjectName(QString::fromUtf8("widthLabel")); + widthLabel->setObjectName(QStringLiteral("widthLabel")); widthLabel->setGeometry(QRect(1, 27, 67, 22)); widthLabel->setFrameShape(QFrame::NoFrame); widthLabel->setFrameShadow(QFrame::Plain); @@ -79,7 +79,7 @@ public: gridLayout->addWidget(widthLabel, 1, 0, 1, 1); heightLabel = new QLabel(dialog); - heightLabel->setObjectName(QString::fromUtf8("heightLabel")); + heightLabel->setObjectName(QStringLiteral("heightLabel")); heightLabel->setGeometry(QRect(1, 55, 67, 22)); heightLabel->setFrameShape(QFrame::NoFrame); heightLabel->setFrameShadow(QFrame::Plain); @@ -88,7 +88,7 @@ public: gridLayout->addWidget(heightLabel, 2, 0, 1, 1); colorDepthCombo = new QComboBox(dialog); - colorDepthCombo->setObjectName(QString::fromUtf8("colorDepthCombo")); + colorDepthCombo->setObjectName(QStringLiteral("colorDepthCombo")); colorDepthCombo->setGeometry(QRect(74, 83, 227, 22)); QSizePolicy sizePolicy(static_cast(5), static_cast(0)); sizePolicy.setHorizontalStretch(0); @@ -100,7 +100,7 @@ public: gridLayout->addWidget(colorDepthCombo, 3, 1, 1, 1); nameLineEdit = new QLineEdit(dialog); - nameLineEdit->setObjectName(QString::fromUtf8("nameLineEdit")); + nameLineEdit->setObjectName(QStringLiteral("nameLineEdit")); nameLineEdit->setGeometry(QRect(74, 83, 227, 22)); QSizePolicy sizePolicy1(static_cast(5), static_cast(0)); sizePolicy1.setHorizontalStretch(1); @@ -112,7 +112,7 @@ public: gridLayout->addWidget(nameLineEdit, 0, 1, 1, 1); spinBox = new QSpinBox(dialog); - spinBox->setObjectName(QString::fromUtf8("spinBox")); + spinBox->setObjectName(QStringLiteral("spinBox")); spinBox->setGeometry(QRect(74, 1, 227, 20)); sizePolicy.setHeightForWidth(spinBox->sizePolicy().hasHeightForWidth()); spinBox->setSizePolicy(sizePolicy); @@ -124,7 +124,7 @@ public: gridLayout->addWidget(spinBox, 1, 1, 1, 1); spinBox_2 = new QSpinBox(dialog); - spinBox_2->setObjectName(QString::fromUtf8("spinBox_2")); + spinBox_2->setObjectName(QStringLiteral("spinBox_2")); spinBox_2->setGeometry(QRect(74, 27, 227, 22)); sizePolicy.setHeightForWidth(spinBox_2->sizePolicy().hasHeightForWidth()); spinBox_2->setSizePolicy(sizePolicy); @@ -136,7 +136,7 @@ public: gridLayout->addWidget(spinBox_2, 2, 1, 1, 1); nameLabel = new QLabel(dialog); - nameLabel->setObjectName(QString::fromUtf8("nameLabel")); + nameLabel->setObjectName(QStringLiteral("nameLabel")); nameLabel->setGeometry(QRect(1, 1, 67, 20)); nameLabel->setFrameShape(QFrame::NoFrame); nameLabel->setFrameShadow(QFrame::Plain); @@ -145,7 +145,7 @@ public: gridLayout->addWidget(nameLabel, 0, 0, 1, 1); colorDepthLabel = new QLabel(dialog); - colorDepthLabel->setObjectName(QString::fromUtf8("colorDepthLabel")); + colorDepthLabel->setObjectName(QStringLiteral("colorDepthLabel")); colorDepthLabel->setGeometry(QRect(1, 83, 67, 22)); colorDepthLabel->setFrameShape(QFrame::NoFrame); colorDepthLabel->setFrameShadow(QFrame::Plain); @@ -165,20 +165,20 @@ public: hboxLayout->setSpacing(6); #endif hboxLayout->setContentsMargins(1, 1, 1, 1); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); - hboxLayout->setObjectName(QString::fromUtf8("")); + hboxLayout->setObjectName(QStringLiteral("hboxLayout")); + hboxLayout->setObjectName(QStringLiteral("")); spacerItem1 = new QSpacerItem(QSizePolicy::Expanding, QSizePolicy::Minimum); hboxLayout->addItem(spacerItem1); okButton = new QPushButton(dialog); - okButton->setObjectName(QString::fromUtf8("okButton")); + okButton->setObjectName(QStringLiteral("okButton")); okButton->setGeometry(QRect(135, 1, 80, 24)); hboxLayout->addWidget(okButton); cancelButton = new QPushButton(dialog); - cancelButton->setObjectName(QString::fromUtf8("cancelButton")); + cancelButton->setObjectName(QStringLiteral("cancelButton")); cancelButton->setGeometry(QRect(221, 1, 80, 24)); hboxLayout->addWidget(cancelButton); diff --git a/tests/auto/tools/uic/baseline/inputpage.ui.h b/tests/auto/tools/uic/baseline/inputpage.ui.h index 90ff131d1d3..d52d1ae93b5 100644 --- a/tests/auto/tools/uic/baseline/inputpage.ui.h +++ b/tests/auto/tools/uic/baseline/inputpage.ui.h @@ -39,16 +39,16 @@ public: void setupUi(QWidget *InputPage) { if (InputPage->objectName().isEmpty()) - InputPage->setObjectName(QString::fromUtf8("InputPage")); + InputPage->setObjectName(QStringLiteral("InputPage")); InputPage->resize(417, 242); gridLayout = new QGridLayout(InputPage); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); spacerItem = new QSpacerItem(20, 20, QSizePolicy::Minimum, QSizePolicy::Fixed); gridLayout->addItem(spacerItem, 0, 2, 1, 1); label = new QLabel(InputPage); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); QSizePolicy sizePolicy(QSizePolicy::Maximum, QSizePolicy::Preferred); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); @@ -59,14 +59,14 @@ public: hboxLayout = new QHBoxLayout(); hboxLayout->setSpacing(0); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName(QStringLiteral("hboxLayout")); fileLineEdit = new QLineEdit(InputPage); - fileLineEdit->setObjectName(QString::fromUtf8("fileLineEdit")); + fileLineEdit->setObjectName(QStringLiteral("fileLineEdit")); hboxLayout->addWidget(fileLineEdit); browseButton = new QToolButton(InputPage); - browseButton->setObjectName(QString::fromUtf8("browseButton")); + browseButton->setObjectName(QStringLiteral("browseButton")); hboxLayout->addWidget(browseButton); diff --git a/tests/auto/tools/uic/baseline/installdialog.ui.h b/tests/auto/tools/uic/baseline/installdialog.ui.h index d58986f98a0..519a71005ef 100644 --- a/tests/auto/tools/uic/baseline/installdialog.ui.h +++ b/tests/auto/tools/uic/baseline/installdialog.ui.h @@ -48,32 +48,32 @@ public: void setupUi(QDialog *InstallDialog) { if (InstallDialog->objectName().isEmpty()) - InstallDialog->setObjectName(QString::fromUtf8("InstallDialog")); + InstallDialog->setObjectName(QStringLiteral("InstallDialog")); InstallDialog->resize(436, 245); gridLayout = new QGridLayout(InstallDialog); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); label = new QLabel(InstallDialog); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); gridLayout->addWidget(label, 0, 0, 1, 4); listWidget = new QListWidget(InstallDialog); - listWidget->setObjectName(QString::fromUtf8("listWidget")); + listWidget->setObjectName(QStringLiteral("listWidget")); gridLayout->addWidget(listWidget, 1, 0, 4, 4); installButton = new QPushButton(InstallDialog); - installButton->setObjectName(QString::fromUtf8("installButton")); + installButton->setObjectName(QStringLiteral("installButton")); gridLayout->addWidget(installButton, 1, 4, 1, 1); cancelButton = new QPushButton(InstallDialog); - cancelButton->setObjectName(QString::fromUtf8("cancelButton")); + cancelButton->setObjectName(QStringLiteral("cancelButton")); gridLayout->addWidget(cancelButton, 2, 4, 1, 1); closeButton = new QPushButton(InstallDialog); - closeButton->setObjectName(QString::fromUtf8("closeButton")); + closeButton->setObjectName(QStringLiteral("closeButton")); gridLayout->addWidget(closeButton, 3, 4, 1, 1); @@ -82,34 +82,34 @@ public: gridLayout->addItem(spacerItem, 4, 4, 1, 1); label_4 = new QLabel(InstallDialog); - label_4->setObjectName(QString::fromUtf8("label_4")); + label_4->setObjectName(QStringLiteral("label_4")); gridLayout->addWidget(label_4, 5, 0, 1, 1); pathLineEdit = new QLineEdit(InstallDialog); - pathLineEdit->setObjectName(QString::fromUtf8("pathLineEdit")); + pathLineEdit->setObjectName(QStringLiteral("pathLineEdit")); gridLayout->addWidget(pathLineEdit, 5, 1, 1, 2); browseButton = new QToolButton(InstallDialog); - browseButton->setObjectName(QString::fromUtf8("browseButton")); + browseButton->setObjectName(QStringLiteral("browseButton")); gridLayout->addWidget(browseButton, 5, 3, 1, 1); line = new QFrame(InstallDialog); - line->setObjectName(QString::fromUtf8("line")); + line->setObjectName(QStringLiteral("line")); line->setFrameShape(QFrame::HLine); line->setFrameShadow(QFrame::Sunken); gridLayout->addWidget(line, 6, 0, 1, 5); statusLabel = new QLabel(InstallDialog); - statusLabel->setObjectName(QString::fromUtf8("statusLabel")); + statusLabel->setObjectName(QStringLiteral("statusLabel")); gridLayout->addWidget(statusLabel, 7, 0, 1, 2); progressBar = new QProgressBar(InstallDialog); - progressBar->setObjectName(QString::fromUtf8("progressBar")); + progressBar->setObjectName(QStringLiteral("progressBar")); progressBar->setValue(0); progressBar->setOrientation(Qt::Horizontal); diff --git a/tests/auto/tools/uic/baseline/languagesdialog.ui.h b/tests/auto/tools/uic/baseline/languagesdialog.ui.h index 58d299096af..0419f18ecfb 100644 --- a/tests/auto/tools/uic/baseline/languagesdialog.ui.h +++ b/tests/auto/tools/uic/baseline/languagesdialog.ui.h @@ -41,50 +41,50 @@ public: void setupUi(QDialog *LanguagesDialog) { if (LanguagesDialog->objectName().isEmpty()) - LanguagesDialog->setObjectName(QString::fromUtf8("LanguagesDialog")); + LanguagesDialog->setObjectName(QStringLiteral("LanguagesDialog")); LanguagesDialog->resize(400, 300); verticalLayout = new QVBoxLayout(LanguagesDialog); - verticalLayout->setObjectName(QString::fromUtf8("verticalLayout")); + verticalLayout->setObjectName(QStringLiteral("verticalLayout")); languagesList = new QTreeWidget(LanguagesDialog); - languagesList->setObjectName(QString::fromUtf8("languagesList")); + languagesList->setObjectName(QStringLiteral("languagesList")); languagesList->setIndentation(0); verticalLayout->addWidget(languagesList); hboxLayout = new QHBoxLayout(); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName(QStringLiteral("hboxLayout")); upButton = new QToolButton(LanguagesDialog); - upButton->setObjectName(QString::fromUtf8("upButton")); + upButton->setObjectName(QStringLiteral("upButton")); upButton->setEnabled(false); QIcon icon; - icon.addFile(QString::fromUtf8(":/images/up.png"), QSize(), QIcon::Normal, QIcon::Off); + icon.addFile(QStringLiteral(":/images/up.png"), QSize(), QIcon::Normal, QIcon::Off); upButton->setIcon(icon); hboxLayout->addWidget(upButton); downButton = new QToolButton(LanguagesDialog); - downButton->setObjectName(QString::fromUtf8("downButton")); + downButton->setObjectName(QStringLiteral("downButton")); downButton->setEnabled(false); QIcon icon1; - icon1.addFile(QString::fromUtf8(":/images/down.png"), QSize(), QIcon::Normal, QIcon::Off); + icon1.addFile(QStringLiteral(":/images/down.png"), QSize(), QIcon::Normal, QIcon::Off); downButton->setIcon(icon1); hboxLayout->addWidget(downButton); removeButton = new QToolButton(LanguagesDialog); - removeButton->setObjectName(QString::fromUtf8("removeButton")); + removeButton->setObjectName(QStringLiteral("removeButton")); removeButton->setEnabled(false); QIcon icon2; - icon2.addFile(QString::fromUtf8(":/images/editdelete.png"), QSize(), QIcon::Normal, QIcon::Off); + icon2.addFile(QStringLiteral(":/images/editdelete.png"), QSize(), QIcon::Normal, QIcon::Off); removeButton->setIcon(icon2); hboxLayout->addWidget(removeButton); openFileButton = new QToolButton(LanguagesDialog); - openFileButton->setObjectName(QString::fromUtf8("openFileButton")); + openFileButton->setObjectName(QStringLiteral("openFileButton")); openFileButton->setEnabled(true); QIcon icon3; - icon3.addFile(QString::fromUtf8(":/images/mac/fileopen.png"), QSize(), QIcon::Normal, QIcon::Off); + icon3.addFile(QStringLiteral(":/images/mac/fileopen.png"), QSize(), QIcon::Normal, QIcon::Off); openFileButton->setIcon(icon3); hboxLayout->addWidget(openFileButton); @@ -94,7 +94,7 @@ public: hboxLayout->addItem(spacerItem); okButton = new QPushButton(LanguagesDialog); - okButton->setObjectName(QString::fromUtf8("okButton")); + okButton->setObjectName(QStringLiteral("okButton")); hboxLayout->addWidget(okButton); diff --git a/tests/auto/tools/uic/baseline/listwidgeteditor.ui.h b/tests/auto/tools/uic/baseline/listwidgeteditor.ui.h index 1cca34b1faf..5ea1c434589 100644 --- a/tests/auto/tools/uic/baseline/listwidgeteditor.ui.h +++ b/tests/auto/tools/uic/baseline/listwidgeteditor.ui.h @@ -96,7 +96,7 @@ public: void setupUi(QDialog *qdesigner_internal__ListWidgetEditor) { if (qdesigner_internal__ListWidgetEditor->objectName().isEmpty()) - qdesigner_internal__ListWidgetEditor->setObjectName(QString::fromUtf8("qdesigner_internal__ListWidgetEditor")); + qdesigner_internal__ListWidgetEditor->setObjectName(QStringLiteral("qdesigner_internal__ListWidgetEditor")); qdesigner_internal__ListWidgetEditor->resize(223, 245); vboxLayout = new QVBoxLayout(qdesigner_internal__ListWidgetEditor); #ifndef Q_OS_MAC @@ -105,25 +105,25 @@ public: #ifndef Q_OS_MAC vboxLayout->setContentsMargins(9, 9, 9, 9); #endif - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); groupBox = new QGroupBox(qdesigner_internal__ListWidgetEditor); - groupBox->setObjectName(QString::fromUtf8("groupBox")); + groupBox->setObjectName(QStringLiteral("groupBox")); gridLayout = new QGridLayout(groupBox); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); listWidget = new QListWidget(groupBox); - listWidget->setObjectName(QString::fromUtf8("listWidget")); + listWidget->setObjectName(QStringLiteral("listWidget")); gridLayout->addWidget(listWidget, 0, 0, 1, 1); horizontalLayout_2 = new QHBoxLayout(); - horizontalLayout_2->setObjectName(QString::fromUtf8("horizontalLayout_2")); + horizontalLayout_2->setObjectName(QStringLiteral("horizontalLayout_2")); newItemButton = new QToolButton(groupBox); - newItemButton->setObjectName(QString::fromUtf8("newItemButton")); + newItemButton->setObjectName(QStringLiteral("newItemButton")); horizontalLayout_2->addWidget(newItemButton); deleteItemButton = new QToolButton(groupBox); - deleteItemButton->setObjectName(QString::fromUtf8("deleteItemButton")); + deleteItemButton->setObjectName(QStringLiteral("deleteItemButton")); horizontalLayout_2->addWidget(deleteItemButton); @@ -132,12 +132,12 @@ public: horizontalLayout_2->addItem(spacerItem); moveItemUpButton = new QToolButton(groupBox); - moveItemUpButton->setObjectName(QString::fromUtf8("moveItemUpButton")); + moveItemUpButton->setObjectName(QStringLiteral("moveItemUpButton")); horizontalLayout_2->addWidget(moveItemUpButton); moveItemDownButton = new QToolButton(groupBox); - moveItemDownButton->setObjectName(QString::fromUtf8("moveItemDownButton")); + moveItemDownButton->setObjectName(QStringLiteral("moveItemDownButton")); horizontalLayout_2->addWidget(moveItemDownButton); @@ -145,14 +145,14 @@ public: gridLayout->addLayout(horizontalLayout_2, 1, 0, 1, 1); horizontalLayout = new QHBoxLayout(); - horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout")); + horizontalLayout->setObjectName(QStringLiteral("horizontalLayout")); label = new QLabel(groupBox); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); horizontalLayout->addWidget(label); itemIconSelector = new qdesigner_internal::IconSelector(groupBox); - itemIconSelector->setObjectName(QString::fromUtf8("itemIconSelector")); + itemIconSelector->setObjectName(QStringLiteral("itemIconSelector")); horizontalLayout->addWidget(itemIconSelector); @@ -167,7 +167,7 @@ public: vboxLayout->addWidget(groupBox); buttonBox = new QDialogButtonBox(qdesigner_internal__ListWidgetEditor); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName(QStringLiteral("buttonBox")); buttonBox->setOrientation(Qt::Horizontal); buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok); diff --git a/tests/auto/tools/uic/baseline/mainwindow.ui.h b/tests/auto/tools/uic/baseline/mainwindow.ui.h index ef6f4cfe9c3..4e336a42629 100644 --- a/tests/auto/tools/uic/baseline/mainwindow.ui.h +++ b/tests/auto/tools/uic/baseline/mainwindow.ui.h @@ -89,14 +89,14 @@ public: void setupUi(QMainWindow *MainWindow) { if (MainWindow->objectName().isEmpty()) - MainWindow->setObjectName(QString::fromUtf8("MainWindow")); + MainWindow->setObjectName(QStringLiteral("MainWindow")); MainWindow->resize(829, 813); actionAdd_Custom_Font = new QAction(MainWindow); - actionAdd_Custom_Font->setObjectName(QString::fromUtf8("actionAdd_Custom_Font")); + actionAdd_Custom_Font->setObjectName(QStringLiteral("actionAdd_Custom_Font")); action_Exit = new QAction(MainWindow); - action_Exit->setObjectName(QString::fromUtf8("action_Exit")); + action_Exit->setObjectName(QStringLiteral("action_Exit")); centralwidget = new QWidget(MainWindow); - centralwidget->setObjectName(QString::fromUtf8("centralwidget")); + centralwidget->setObjectName(QStringLiteral("centralwidget")); vboxLayout = new QVBoxLayout(centralwidget); #ifndef Q_OS_MAC vboxLayout->setSpacing(6); @@ -104,9 +104,9 @@ public: #ifndef Q_OS_MAC vboxLayout->setContentsMargins(9, 9, 9, 9); #endif - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); groupBox = new QGroupBox(centralwidget); - groupBox->setObjectName(QString::fromUtf8("groupBox")); + groupBox->setObjectName(QStringLiteral("groupBox")); hboxLayout = new QHBoxLayout(groupBox); #ifndef Q_OS_MAC hboxLayout->setSpacing(6); @@ -114,40 +114,40 @@ public: #ifndef Q_OS_MAC hboxLayout->setContentsMargins(9, 9, 9, 9); #endif - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName(QStringLiteral("hboxLayout")); label = new QLabel(groupBox); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); hboxLayout->addWidget(label); fontComboBox = new QFontComboBox(groupBox); - fontComboBox->setObjectName(QString::fromUtf8("fontComboBox")); + fontComboBox->setObjectName(QStringLiteral("fontComboBox")); hboxLayout->addWidget(fontComboBox); label_2 = new QLabel(groupBox); - label_2->setObjectName(QString::fromUtf8("label_2")); + label_2->setObjectName(QStringLiteral("label_2")); hboxLayout->addWidget(label_2); pixelSize = new QSpinBox(groupBox); - pixelSize->setObjectName(QString::fromUtf8("pixelSize")); + pixelSize->setObjectName(QStringLiteral("pixelSize")); pixelSize->setMinimum(1); hboxLayout->addWidget(pixelSize); label_7 = new QLabel(groupBox); - label_7->setObjectName(QString::fromUtf8("label_7")); + label_7->setObjectName(QStringLiteral("label_7")); hboxLayout->addWidget(label_7); weightCombo = new QComboBox(groupBox); - weightCombo->setObjectName(QString::fromUtf8("weightCombo")); + weightCombo->setObjectName(QStringLiteral("weightCombo")); hboxLayout->addWidget(weightCombo); italic = new QCheckBox(groupBox); - italic->setObjectName(QString::fromUtf8("italic")); + italic->setObjectName(QStringLiteral("italic")); hboxLayout->addWidget(italic); @@ -159,7 +159,7 @@ public: vboxLayout->addWidget(groupBox); groupBox_2 = new QGroupBox(centralwidget); - groupBox_2->setObjectName(QString::fromUtf8("groupBox_2")); + groupBox_2->setObjectName(QStringLiteral("groupBox_2")); vboxLayout1 = new QVBoxLayout(groupBox_2); #ifndef Q_OS_MAC vboxLayout1->setSpacing(6); @@ -167,9 +167,9 @@ public: #ifndef Q_OS_MAC vboxLayout1->setContentsMargins(9, 9, 9, 9); #endif - vboxLayout1->setObjectName(QString::fromUtf8("vboxLayout1")); + vboxLayout1->setObjectName(QStringLiteral("vboxLayout1")); chooseFromCodePoints = new QRadioButton(groupBox_2); - chooseFromCodePoints->setObjectName(QString::fromUtf8("chooseFromCodePoints")); + chooseFromCodePoints->setObjectName(QStringLiteral("chooseFromCodePoints")); chooseFromCodePoints->setChecked(true); vboxLayout1->addWidget(chooseFromCodePoints); @@ -179,9 +179,9 @@ public: vboxLayout2->setSpacing(6); #endif vboxLayout2->setContentsMargins(0, 0, 0, 0); - vboxLayout2->setObjectName(QString::fromUtf8("vboxLayout2")); + vboxLayout2->setObjectName(QStringLiteral("vboxLayout2")); characterRangeView = new QListWidget(groupBox_2); - characterRangeView->setObjectName(QString::fromUtf8("characterRangeView")); + characterRangeView->setObjectName(QStringLiteral("characterRangeView")); vboxLayout2->addWidget(characterRangeView); @@ -190,19 +190,19 @@ public: hboxLayout1->setSpacing(6); #endif hboxLayout1->setContentsMargins(0, 0, 0, 0); - hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1")); + hboxLayout1->setObjectName(QStringLiteral("hboxLayout1")); selectAll = new QPushButton(groupBox_2); - selectAll->setObjectName(QString::fromUtf8("selectAll")); + selectAll->setObjectName(QStringLiteral("selectAll")); hboxLayout1->addWidget(selectAll); deselectAll = new QPushButton(groupBox_2); - deselectAll->setObjectName(QString::fromUtf8("deselectAll")); + deselectAll->setObjectName(QStringLiteral("deselectAll")); hboxLayout1->addWidget(deselectAll); invertSelection = new QPushButton(groupBox_2); - invertSelection->setObjectName(QString::fromUtf8("invertSelection")); + invertSelection->setObjectName(QStringLiteral("invertSelection")); hboxLayout1->addWidget(invertSelection); @@ -217,7 +217,7 @@ public: vboxLayout1->addLayout(vboxLayout2); chooseFromSampleFile = new QRadioButton(groupBox_2); - chooseFromSampleFile->setObjectName(QString::fromUtf8("chooseFromSampleFile")); + chooseFromSampleFile->setObjectName(QStringLiteral("chooseFromSampleFile")); vboxLayout1->addWidget(chooseFromSampleFile); @@ -226,27 +226,27 @@ public: hboxLayout2->setSpacing(6); #endif hboxLayout2->setContentsMargins(0, 0, 0, 0); - hboxLayout2->setObjectName(QString::fromUtf8("hboxLayout2")); + hboxLayout2->setObjectName(QStringLiteral("hboxLayout2")); label_5 = new QLabel(groupBox_2); - label_5->setObjectName(QString::fromUtf8("label_5")); + label_5->setObjectName(QStringLiteral("label_5")); label_5->setEnabled(false); hboxLayout2->addWidget(label_5); sampleFile = new QLineEdit(groupBox_2); - sampleFile->setObjectName(QString::fromUtf8("sampleFile")); + sampleFile->setObjectName(QStringLiteral("sampleFile")); sampleFile->setEnabled(false); hboxLayout2->addWidget(sampleFile); browseSampleFile = new QPushButton(groupBox_2); - browseSampleFile->setObjectName(QString::fromUtf8("browseSampleFile")); + browseSampleFile->setObjectName(QStringLiteral("browseSampleFile")); browseSampleFile->setEnabled(false); hboxLayout2->addWidget(browseSampleFile); charCount = new QLabel(groupBox_2); - charCount->setObjectName(QString::fromUtf8("charCount")); + charCount->setObjectName(QStringLiteral("charCount")); charCount->setEnabled(false); hboxLayout2->addWidget(charCount); @@ -258,7 +258,7 @@ public: vboxLayout->addWidget(groupBox_2); groupBox_3 = new QGroupBox(centralwidget); - groupBox_3->setObjectName(QString::fromUtf8("groupBox_3")); + groupBox_3->setObjectName(QStringLiteral("groupBox_3")); hboxLayout3 = new QHBoxLayout(groupBox_3); #ifndef Q_OS_MAC hboxLayout3->setSpacing(6); @@ -266,9 +266,9 @@ public: #ifndef Q_OS_MAC hboxLayout3->setContentsMargins(9, 9, 9, 9); #endif - hboxLayout3->setObjectName(QString::fromUtf8("hboxLayout3")); + hboxLayout3->setObjectName(QStringLiteral("hboxLayout3")); preview = new QLineEdit(groupBox_3); - preview->setObjectName(QString::fromUtf8("preview")); + preview->setObjectName(QStringLiteral("preview")); hboxLayout3->addWidget(preview); @@ -276,7 +276,7 @@ public: vboxLayout->addWidget(groupBox_3); groupBox_4 = new QGroupBox(centralwidget); - groupBox_4->setObjectName(QString::fromUtf8("groupBox_4")); + groupBox_4->setObjectName(QStringLiteral("groupBox_4")); hboxLayout4 = new QHBoxLayout(groupBox_4); #ifndef Q_OS_MAC hboxLayout4->setSpacing(6); @@ -284,29 +284,29 @@ public: #ifndef Q_OS_MAC hboxLayout4->setContentsMargins(9, 9, 9, 9); #endif - hboxLayout4->setObjectName(QString::fromUtf8("hboxLayout4")); + hboxLayout4->setObjectName(QStringLiteral("hboxLayout4")); label_3 = new QLabel(groupBox_4); - label_3->setObjectName(QString::fromUtf8("label_3")); + label_3->setObjectName(QStringLiteral("label_3")); hboxLayout4->addWidget(label_3); path = new QLineEdit(groupBox_4); - path->setObjectName(QString::fromUtf8("path")); + path->setObjectName(QStringLiteral("path")); hboxLayout4->addWidget(path); browsePath = new QPushButton(groupBox_4); - browsePath->setObjectName(QString::fromUtf8("browsePath")); + browsePath->setObjectName(QStringLiteral("browsePath")); hboxLayout4->addWidget(browsePath); label_4 = new QLabel(groupBox_4); - label_4->setObjectName(QString::fromUtf8("label_4")); + label_4->setObjectName(QStringLiteral("label_4")); hboxLayout4->addWidget(label_4); fileName = new QLineEdit(groupBox_4); - fileName->setObjectName(QString::fromUtf8("fileName")); + fileName->setObjectName(QStringLiteral("fileName")); fileName->setEnabled(false); hboxLayout4->addWidget(fileName); @@ -319,9 +319,9 @@ public: hboxLayout5->setSpacing(6); #endif hboxLayout5->setContentsMargins(0, 0, 0, 0); - hboxLayout5->setObjectName(QString::fromUtf8("hboxLayout5")); + hboxLayout5->setObjectName(QStringLiteral("hboxLayout5")); generate = new QPushButton(centralwidget); - generate->setObjectName(QString::fromUtf8("generate")); + generate->setObjectName(QStringLiteral("generate")); hboxLayout5->addWidget(generate); @@ -334,13 +334,13 @@ public: MainWindow->setCentralWidget(centralwidget); menubar = new QMenuBar(MainWindow); - menubar->setObjectName(QString::fromUtf8("menubar")); + menubar->setObjectName(QStringLiteral("menubar")); menubar->setGeometry(QRect(0, 0, 829, 29)); menuFile = new QMenu(menubar); - menuFile->setObjectName(QString::fromUtf8("menuFile")); + menuFile->setObjectName(QStringLiteral("menuFile")); MainWindow->setMenuBar(menubar); statusbar = new QStatusBar(MainWindow); - statusbar->setObjectName(QString::fromUtf8("statusbar")); + statusbar->setObjectName(QStringLiteral("statusbar")); MainWindow->setStatusBar(statusbar); menubar->addAction(menuFile->menuAction()); diff --git a/tests/auto/tools/uic/baseline/mydialog.ui.h b/tests/auto/tools/uic/baseline/mydialog.ui.h index a8750d45143..ffb49e5d97c 100644 --- a/tests/auto/tools/uic/baseline/mydialog.ui.h +++ b/tests/auto/tools/uic/baseline/mydialog.ui.h @@ -32,7 +32,7 @@ public: void setupUi(QDialog *MyDialog) { if (MyDialog->objectName().isEmpty()) - MyDialog->setObjectName(QString::fromUtf8("MyDialog")); + MyDialog->setObjectName(QStringLiteral("MyDialog")); MyDialog->resize(401, 70); vboxLayout = new QVBoxLayout(MyDialog); #ifndef Q_OS_MAC @@ -41,14 +41,14 @@ public: #ifndef Q_OS_MAC vboxLayout->setContentsMargins(9, 9, 9, 9); #endif - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); aLabel = new QLabel(MyDialog); - aLabel->setObjectName(QString::fromUtf8("aLabel")); + aLabel->setObjectName(QStringLiteral("aLabel")); vboxLayout->addWidget(aLabel); aButton = new QPushButton(MyDialog); - aButton->setObjectName(QString::fromUtf8("aButton")); + aButton->setObjectName(QStringLiteral("aButton")); vboxLayout->addWidget(aButton); diff --git a/tests/auto/tools/uic/baseline/myform.ui.h b/tests/auto/tools/uic/baseline/myform.ui.h index a5ff7bcc117..140225abbe8 100644 --- a/tests/auto/tools/uic/baseline/myform.ui.h +++ b/tests/auto/tools/uic/baseline/myform.ui.h @@ -45,35 +45,35 @@ public: void setupUi(QWidget *Form) { if (Form->objectName().isEmpty()) - Form->setObjectName(QString::fromUtf8("Form")); + Form->setObjectName(QStringLiteral("Form")); Form->resize(258, 224); vboxLayout = new QVBoxLayout(Form); #ifndef Q_OS_MAC vboxLayout->setSpacing(6); #endif vboxLayout->setContentsMargins(8, 8, 8, 8); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); groupBox = new QGroupBox(Form); - groupBox->setObjectName(QString::fromUtf8("groupBox")); + groupBox->setObjectName(QStringLiteral("groupBox")); gridLayout = new QGridLayout(groupBox); #ifndef Q_OS_MAC gridLayout->setSpacing(6); #endif gridLayout->setContentsMargins(8, 8, 8, 8); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); radioButton_2 = new QRadioButton(groupBox); - radioButton_2->setObjectName(QString::fromUtf8("radioButton_2")); + radioButton_2->setObjectName(QStringLiteral("radioButton_2")); gridLayout->addWidget(radioButton_2, 1, 0, 1, 1); radioButton = new QRadioButton(groupBox); - radioButton->setObjectName(QString::fromUtf8("radioButton")); + radioButton->setObjectName(QStringLiteral("radioButton")); radioButton->setChecked(true); gridLayout->addWidget(radioButton, 0, 0, 1, 1); checkBox_2 = new QCheckBox(groupBox); - checkBox_2->setObjectName(QString::fromUtf8("checkBox_2")); + checkBox_2->setObjectName(QStringLiteral("checkBox_2")); checkBox_2->setChecked(true); gridLayout->addWidget(checkBox_2, 1, 1, 1, 1); @@ -83,32 +83,32 @@ public: gridLayout->addItem(spacerItem, 5, 0, 1, 1); checkBox = new QCheckBox(groupBox); - checkBox->setObjectName(QString::fromUtf8("checkBox")); + checkBox->setObjectName(QStringLiteral("checkBox")); gridLayout->addWidget(checkBox, 0, 1, 1, 1); radioButton_2_2 = new QRadioButton(groupBox); - radioButton_2_2->setObjectName(QString::fromUtf8("radioButton_2_2")); + radioButton_2_2->setObjectName(QStringLiteral("radioButton_2_2")); gridLayout->addWidget(radioButton_2_2, 2, 0, 1, 1); radioButton_3 = new QRadioButton(groupBox); - radioButton_3->setObjectName(QString::fromUtf8("radioButton_3")); + radioButton_3->setObjectName(QStringLiteral("radioButton_3")); gridLayout->addWidget(radioButton_3, 3, 0, 1, 1); radioButton_4 = new QRadioButton(groupBox); - radioButton_4->setObjectName(QString::fromUtf8("radioButton_4")); + radioButton_4->setObjectName(QStringLiteral("radioButton_4")); gridLayout->addWidget(radioButton_4, 4, 0, 1, 1); checkBox_3 = new QCheckBox(groupBox); - checkBox_3->setObjectName(QString::fromUtf8("checkBox_3")); + checkBox_3->setObjectName(QStringLiteral("checkBox_3")); gridLayout->addWidget(checkBox_3, 2, 1, 1, 1); checkBox_4 = new QCheckBox(groupBox); - checkBox_4->setObjectName(QString::fromUtf8("checkBox_4")); + checkBox_4->setObjectName(QStringLiteral("checkBox_4")); checkBox_4->setChecked(true); gridLayout->addWidget(checkBox_4, 3, 1, 1, 1); diff --git a/tests/auto/tools/uic/baseline/newactiondialog.ui.h b/tests/auto/tools/uic/baseline/newactiondialog.ui.h index b69e1581f9c..5b9fef13f88 100644 --- a/tests/auto/tools/uic/baseline/newactiondialog.ui.h +++ b/tests/auto/tools/uic/baseline/newactiondialog.ui.h @@ -93,42 +93,42 @@ public: void setupUi(QDialog *qdesigner_internal__NewActionDialog) { if (qdesigner_internal__NewActionDialog->objectName().isEmpty()) - qdesigner_internal__NewActionDialog->setObjectName(QString::fromUtf8("qdesigner_internal__NewActionDialog")); + qdesigner_internal__NewActionDialog->setObjectName(QStringLiteral("qdesigner_internal__NewActionDialog")); qdesigner_internal__NewActionDialog->resize(363, 156); verticalLayout = new QVBoxLayout(qdesigner_internal__NewActionDialog); - verticalLayout->setObjectName(QString::fromUtf8("verticalLayout")); + verticalLayout->setObjectName(QStringLiteral("verticalLayout")); formLayout = new QFormLayout(); - formLayout->setObjectName(QString::fromUtf8("formLayout")); + formLayout->setObjectName(QStringLiteral("formLayout")); label = new QLabel(qdesigner_internal__NewActionDialog); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); formLayout->setWidget(0, QFormLayout::LabelRole, label); editActionText = new QLineEdit(qdesigner_internal__NewActionDialog); - editActionText->setObjectName(QString::fromUtf8("editActionText")); + editActionText->setObjectName(QStringLiteral("editActionText")); editActionText->setMinimumSize(QSize(255, 0)); formLayout->setWidget(0, QFormLayout::FieldRole, editActionText); label_3 = new QLabel(qdesigner_internal__NewActionDialog); - label_3->setObjectName(QString::fromUtf8("label_3")); + label_3->setObjectName(QStringLiteral("label_3")); formLayout->setWidget(1, QFormLayout::LabelRole, label_3); editObjectName = new QLineEdit(qdesigner_internal__NewActionDialog); - editObjectName->setObjectName(QString::fromUtf8("editObjectName")); + editObjectName->setObjectName(QStringLiteral("editObjectName")); formLayout->setWidget(1, QFormLayout::FieldRole, editObjectName); label_2 = new QLabel(qdesigner_internal__NewActionDialog); - label_2->setObjectName(QString::fromUtf8("label_2")); + label_2->setObjectName(QStringLiteral("label_2")); formLayout->setWidget(2, QFormLayout::LabelRole, label_2); horizontalLayout = new QHBoxLayout(); - horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout")); + horizontalLayout->setObjectName(QStringLiteral("horizontalLayout")); iconSelector = new qdesigner_internal::IconSelector(qdesigner_internal__NewActionDialog); - iconSelector->setObjectName(QString::fromUtf8("iconSelector")); + iconSelector->setObjectName(QStringLiteral("iconSelector")); horizontalLayout->addWidget(iconSelector); @@ -147,14 +147,14 @@ public: verticalLayout->addItem(verticalSpacer); line = new QFrame(qdesigner_internal__NewActionDialog); - line->setObjectName(QString::fromUtf8("line")); + line->setObjectName(QStringLiteral("line")); line->setFrameShape(QFrame::HLine); line->setFrameShadow(QFrame::Sunken); verticalLayout->addWidget(line); buttonBox = new QDialogButtonBox(qdesigner_internal__NewActionDialog); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName(QStringLiteral("buttonBox")); buttonBox->setOrientation(Qt::Horizontal); buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok); diff --git a/tests/auto/tools/uic/baseline/newdynamicpropertydialog.ui.h b/tests/auto/tools/uic/baseline/newdynamicpropertydialog.ui.h index f3296421b21..ba9ba5dcfd8 100644 --- a/tests/auto/tools/uic/baseline/newdynamicpropertydialog.ui.h +++ b/tests/auto/tools/uic/baseline/newdynamicpropertydialog.ui.h @@ -46,20 +46,20 @@ public: void setupUi(QDialog *qdesigner_internal__NewDynamicPropertyDialog) { if (qdesigner_internal__NewDynamicPropertyDialog->objectName().isEmpty()) - qdesigner_internal__NewDynamicPropertyDialog->setObjectName(QString::fromUtf8("qdesigner_internal__NewDynamicPropertyDialog")); + qdesigner_internal__NewDynamicPropertyDialog->setObjectName(QStringLiteral("qdesigner_internal__NewDynamicPropertyDialog")); qdesigner_internal__NewDynamicPropertyDialog->resize(340, 118); verticalLayout = new QVBoxLayout(qdesigner_internal__NewDynamicPropertyDialog); - verticalLayout->setObjectName(QString::fromUtf8("verticalLayout")); + verticalLayout->setObjectName(QStringLiteral("verticalLayout")); formLayout = new QFormLayout(); - formLayout->setObjectName(QString::fromUtf8("formLayout")); + formLayout->setObjectName(QStringLiteral("formLayout")); m_lineEdit = new QLineEdit(qdesigner_internal__NewDynamicPropertyDialog); - m_lineEdit->setObjectName(QString::fromUtf8("m_lineEdit")); + m_lineEdit->setObjectName(QStringLiteral("m_lineEdit")); m_lineEdit->setMinimumSize(QSize(220, 0)); formLayout->setWidget(0, QFormLayout::FieldRole, m_lineEdit); label = new QLabel(qdesigner_internal__NewDynamicPropertyDialog); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); @@ -69,9 +69,9 @@ public: formLayout->setWidget(0, QFormLayout::LabelRole, label); horizontalLayout = new QHBoxLayout(); - horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout")); + horizontalLayout->setObjectName(QStringLiteral("horizontalLayout")); m_comboBox = new QComboBox(qdesigner_internal__NewDynamicPropertyDialog); - m_comboBox->setObjectName(QString::fromUtf8("m_comboBox")); + m_comboBox->setObjectName(QStringLiteral("m_comboBox")); horizontalLayout->addWidget(m_comboBox); @@ -83,7 +83,7 @@ public: formLayout->setLayout(1, QFormLayout::FieldRole, horizontalLayout); label_2 = new QLabel(qdesigner_internal__NewDynamicPropertyDialog); - label_2->setObjectName(QString::fromUtf8("label_2")); + label_2->setObjectName(QStringLiteral("label_2")); sizePolicy.setHeightForWidth(label_2->sizePolicy().hasHeightForWidth()); label_2->setSizePolicy(sizePolicy); @@ -97,7 +97,7 @@ public: verticalLayout->addItem(spacerItem); m_buttonBox = new QDialogButtonBox(qdesigner_internal__NewDynamicPropertyDialog); - m_buttonBox->setObjectName(QString::fromUtf8("m_buttonBox")); + m_buttonBox->setObjectName(QStringLiteral("m_buttonBox")); m_buttonBox->setOrientation(Qt::Horizontal); m_buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok); m_buttonBox->setCenterButtons(false); diff --git a/tests/auto/tools/uic/baseline/newform.ui.h b/tests/auto/tools/uic/baseline/newform.ui.h index e985c3bf26e..007b2680aa1 100644 --- a/tests/auto/tools/uic/baseline/newform.ui.h +++ b/tests/auto/tools/uic/baseline/newform.ui.h @@ -83,7 +83,7 @@ public: void setupUi(QDialog *NewForm) { if (NewForm->objectName().isEmpty()) - NewForm->setObjectName(QString::fromUtf8("NewForm")); + NewForm->setObjectName(QStringLiteral("NewForm")); NewForm->resize(495, 319); vboxLayout = new QVBoxLayout(NewForm); #ifndef Q_OS_MAC @@ -92,15 +92,15 @@ public: #ifndef Q_OS_MAC vboxLayout->setContentsMargins(9, 9, 9, 9); #endif - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); hboxLayout = new QHBoxLayout(); #ifndef Q_OS_MAC hboxLayout->setSpacing(6); #endif hboxLayout->setContentsMargins(1, 1, 1, 1); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName(QStringLiteral("hboxLayout")); treeWidget = new QTreeWidget(NewForm); - treeWidget->setObjectName(QString::fromUtf8("treeWidget")); + treeWidget->setObjectName(QStringLiteral("treeWidget")); treeWidget->setIconSize(QSize(128, 128)); treeWidget->setRootIsDecorated(false); treeWidget->setColumnCount(1); @@ -108,7 +108,7 @@ public: hboxLayout->addWidget(treeWidget); lblPreview = new QLabel(NewForm); - lblPreview->setObjectName(QString::fromUtf8("lblPreview")); + lblPreview->setObjectName(QStringLiteral("lblPreview")); QSizePolicy sizePolicy(static_cast(7), static_cast(5)); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); @@ -124,19 +124,19 @@ public: vboxLayout->addLayout(hboxLayout); horizontalLine = new QFrame(NewForm); - horizontalLine->setObjectName(QString::fromUtf8("horizontalLine")); + horizontalLine->setObjectName(QStringLiteral("horizontalLine")); horizontalLine->setFrameShape(QFrame::HLine); horizontalLine->setFrameShadow(QFrame::Sunken); vboxLayout->addWidget(horizontalLine); chkShowOnStartup = new QCheckBox(NewForm); - chkShowOnStartup->setObjectName(QString::fromUtf8("chkShowOnStartup")); + chkShowOnStartup->setObjectName(QStringLiteral("chkShowOnStartup")); vboxLayout->addWidget(chkShowOnStartup); buttonBox = new QDialogButtonBox(NewForm); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName(QStringLiteral("buttonBox")); vboxLayout->addWidget(buttonBox); diff --git a/tests/auto/tools/uic/baseline/orderdialog.ui.h b/tests/auto/tools/uic/baseline/orderdialog.ui.h index 017222da50c..494f3e6894a 100644 --- a/tests/auto/tools/uic/baseline/orderdialog.ui.h +++ b/tests/auto/tools/uic/baseline/orderdialog.ui.h @@ -87,18 +87,18 @@ public: void setupUi(QDialog *qdesigner_internal__OrderDialog) { if (qdesigner_internal__OrderDialog->objectName().isEmpty()) - qdesigner_internal__OrderDialog->setObjectName(QString::fromUtf8("qdesigner_internal__OrderDialog")); + qdesigner_internal__OrderDialog->setObjectName(QStringLiteral("qdesigner_internal__OrderDialog")); qdesigner_internal__OrderDialog->resize(467, 310); vboxLayout = new QVBoxLayout(qdesigner_internal__OrderDialog); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); groupBox = new QGroupBox(qdesigner_internal__OrderDialog); - groupBox->setObjectName(QString::fromUtf8("groupBox")); + groupBox->setObjectName(QStringLiteral("groupBox")); hboxLayout = new QHBoxLayout(groupBox); hboxLayout->setSpacing(6); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName(QStringLiteral("hboxLayout")); hboxLayout->setContentsMargins(9, 9, 9, 9); pageList = new QListWidget(groupBox); - pageList->setObjectName(QString::fromUtf8("pageList")); + pageList->setObjectName(QStringLiteral("pageList")); pageList->setMinimumSize(QSize(344, 0)); pageList->setDragDropMode(QAbstractItemView::InternalMove); pageList->setSelectionMode(QAbstractItemView::ContiguousSelection); @@ -108,15 +108,15 @@ public: vboxLayout1 = new QVBoxLayout(); vboxLayout1->setSpacing(6); - vboxLayout1->setObjectName(QString::fromUtf8("vboxLayout1")); + vboxLayout1->setObjectName(QStringLiteral("vboxLayout1")); vboxLayout1->setContentsMargins(0, 0, 0, 0); upButton = new QToolButton(groupBox); - upButton->setObjectName(QString::fromUtf8("upButton")); + upButton->setObjectName(QStringLiteral("upButton")); vboxLayout1->addWidget(upButton); downButton = new QToolButton(groupBox); - downButton->setObjectName(QString::fromUtf8("downButton")); + downButton->setObjectName(QStringLiteral("downButton")); vboxLayout1->addWidget(downButton); @@ -131,7 +131,7 @@ public: vboxLayout->addWidget(groupBox); buttonBox = new QDialogButtonBox(qdesigner_internal__OrderDialog); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName(QStringLiteral("buttonBox")); buttonBox->setOrientation(Qt::Horizontal); buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok|QDialogButtonBox::Reset); diff --git a/tests/auto/tools/uic/baseline/outputpage.ui.h b/tests/auto/tools/uic/baseline/outputpage.ui.h index 5e8332ea930..20fbf93b177 100644 --- a/tests/auto/tools/uic/baseline/outputpage.ui.h +++ b/tests/auto/tools/uic/baseline/outputpage.ui.h @@ -37,16 +37,16 @@ public: void setupUi(QWidget *OutputPage) { if (OutputPage->objectName().isEmpty()) - OutputPage->setObjectName(QString::fromUtf8("OutputPage")); + OutputPage->setObjectName(QStringLiteral("OutputPage")); OutputPage->resize(417, 242); gridLayout = new QGridLayout(OutputPage); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); spacerItem = new QSpacerItem(20, 20, QSizePolicy::Minimum, QSizePolicy::Fixed); gridLayout->addItem(spacerItem, 0, 1, 1, 1); label = new QLabel(OutputPage); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); @@ -56,7 +56,7 @@ public: gridLayout->addWidget(label, 1, 0, 1, 1); projectLineEdit = new QLineEdit(OutputPage); - projectLineEdit->setObjectName(QString::fromUtf8("projectLineEdit")); + projectLineEdit->setObjectName(QStringLiteral("projectLineEdit")); QSizePolicy sizePolicy1(QSizePolicy::Expanding, QSizePolicy::Fixed); sizePolicy1.setHorizontalStretch(0); sizePolicy1.setVerticalStretch(0); @@ -66,14 +66,14 @@ public: gridLayout->addWidget(projectLineEdit, 1, 1, 1, 1); label_2 = new QLabel(OutputPage); - label_2->setObjectName(QString::fromUtf8("label_2")); + label_2->setObjectName(QStringLiteral("label_2")); sizePolicy.setHeightForWidth(label_2->sizePolicy().hasHeightForWidth()); label_2->setSizePolicy(sizePolicy); gridLayout->addWidget(label_2, 2, 0, 1, 1); collectionLineEdit = new QLineEdit(OutputPage); - collectionLineEdit->setObjectName(QString::fromUtf8("collectionLineEdit")); + collectionLineEdit->setObjectName(QStringLiteral("collectionLineEdit")); sizePolicy1.setHeightForWidth(collectionLineEdit->sizePolicy().hasHeightForWidth()); collectionLineEdit->setSizePolicy(sizePolicy1); diff --git a/tests/auto/tools/uic/baseline/pagefold.ui.h b/tests/auto/tools/uic/baseline/pagefold.ui.h index a58c4f49761..ede9a51d7c6 100644 --- a/tests/auto/tools/uic/baseline/pagefold.ui.h +++ b/tests/auto/tools/uic/baseline/pagefold.ui.h @@ -70,18 +70,18 @@ public: void setupUi(QMainWindow *MainWindow) { if (MainWindow->objectName().isEmpty()) - MainWindow->setObjectName(QString::fromUtf8("MainWindow")); + MainWindow->setObjectName(QStringLiteral("MainWindow")); MainWindow->resize(392, 412); exitAction = new QAction(MainWindow); - exitAction->setObjectName(QString::fromUtf8("exitAction")); + exitAction->setObjectName(QStringLiteral("exitAction")); aboutQtAction = new QAction(MainWindow); - aboutQtAction->setObjectName(QString::fromUtf8("aboutQtAction")); + aboutQtAction->setObjectName(QStringLiteral("aboutQtAction")); editStyleAction = new QAction(MainWindow); - editStyleAction->setObjectName(QString::fromUtf8("editStyleAction")); + editStyleAction->setObjectName(QStringLiteral("editStyleAction")); aboutAction = new QAction(MainWindow); - aboutAction->setObjectName(QString::fromUtf8("aboutAction")); + aboutAction->setObjectName(QStringLiteral("aboutAction")); centralwidget = new QWidget(MainWindow); - centralwidget->setObjectName(QString::fromUtf8("centralwidget")); + centralwidget->setObjectName(QStringLiteral("centralwidget")); vboxLayout = new QVBoxLayout(centralwidget); #ifndef Q_OS_MAC vboxLayout->setSpacing(6); @@ -89,9 +89,9 @@ public: #ifndef Q_OS_MAC vboxLayout->setContentsMargins(9, 9, 9, 9); #endif - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); mainFrame = new QFrame(centralwidget); - mainFrame->setObjectName(QString::fromUtf8("mainFrame")); + mainFrame->setObjectName(QStringLiteral("mainFrame")); mainFrame->setFrameShape(QFrame::StyledPanel); mainFrame->setFrameShadow(QFrame::Raised); gridLayout = new QGridLayout(mainFrame); @@ -101,9 +101,9 @@ public: #ifndef Q_OS_MAC gridLayout->setContentsMargins(9, 9, 9, 9); #endif - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); nameCombo = new QComboBox(mainFrame); - nameCombo->setObjectName(QString::fromUtf8("nameCombo")); + nameCombo->setObjectName(QStringLiteral("nameCombo")); nameCombo->setEditable(true); gridLayout->addWidget(nameCombo, 0, 1, 1, 3); @@ -113,56 +113,56 @@ public: gridLayout->addItem(spacerItem, 1, 3, 1, 1); femaleRadioButton = new QRadioButton(mainFrame); - femaleRadioButton->setObjectName(QString::fromUtf8("femaleRadioButton")); + femaleRadioButton->setObjectName(QStringLiteral("femaleRadioButton")); gridLayout->addWidget(femaleRadioButton, 1, 2, 1, 1); genderLabel = new QLabel(mainFrame); - genderLabel->setObjectName(QString::fromUtf8("genderLabel")); + genderLabel->setObjectName(QStringLiteral("genderLabel")); gridLayout->addWidget(genderLabel, 1, 0, 1, 1); ageLabel = new QLabel(mainFrame); - ageLabel->setObjectName(QString::fromUtf8("ageLabel")); + ageLabel->setObjectName(QStringLiteral("ageLabel")); gridLayout->addWidget(ageLabel, 2, 0, 1, 1); maleRadioButton = new QRadioButton(mainFrame); - maleRadioButton->setObjectName(QString::fromUtf8("maleRadioButton")); + maleRadioButton->setObjectName(QStringLiteral("maleRadioButton")); gridLayout->addWidget(maleRadioButton, 1, 1, 1, 1); nameLabel = new QLabel(mainFrame); - nameLabel->setObjectName(QString::fromUtf8("nameLabel")); + nameLabel->setObjectName(QStringLiteral("nameLabel")); gridLayout->addWidget(nameLabel, 0, 0, 1, 1); passwordLabel = new QLabel(mainFrame); - passwordLabel->setObjectName(QString::fromUtf8("passwordLabel")); + passwordLabel->setObjectName(QStringLiteral("passwordLabel")); gridLayout->addWidget(passwordLabel, 3, 0, 1, 1); ageSpinBox = new QSpinBox(mainFrame); - ageSpinBox->setObjectName(QString::fromUtf8("ageSpinBox")); + ageSpinBox->setObjectName(QStringLiteral("ageSpinBox")); ageSpinBox->setMinimum(12); ageSpinBox->setValue(22); gridLayout->addWidget(ageSpinBox, 2, 1, 1, 3); buttonBox = new QDialogButtonBox(mainFrame); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName(QStringLiteral("buttonBox")); buttonBox->setOrientation(Qt::Horizontal); buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok); gridLayout->addWidget(buttonBox, 7, 2, 1, 2); agreeCheckBox = new QCheckBox(mainFrame); - agreeCheckBox->setObjectName(QString::fromUtf8("agreeCheckBox")); + agreeCheckBox->setObjectName(QStringLiteral("agreeCheckBox")); gridLayout->addWidget(agreeCheckBox, 6, 0, 1, 4); passwordEdit = new QLineEdit(mainFrame); - passwordEdit->setObjectName(QString::fromUtf8("passwordEdit")); + passwordEdit->setObjectName(QStringLiteral("passwordEdit")); passwordEdit->setEchoMode(QLineEdit::Password); gridLayout->addWidget(passwordEdit, 3, 1, 1, 3); @@ -171,22 +171,22 @@ public: new QListWidgetItem(professionList); new QListWidgetItem(professionList); new QListWidgetItem(professionList); - professionList->setObjectName(QString::fromUtf8("professionList")); + professionList->setObjectName(QStringLiteral("professionList")); gridLayout->addWidget(professionList, 5, 1, 1, 3); label = new QLabel(mainFrame); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); gridLayout->addWidget(label, 5, 0, 1, 1); countryCombo = new QComboBox(mainFrame); - countryCombo->setObjectName(QString::fromUtf8("countryCombo")); + countryCombo->setObjectName(QStringLiteral("countryCombo")); gridLayout->addWidget(countryCombo, 4, 1, 1, 3); countryLabel = new QLabel(mainFrame); - countryLabel->setObjectName(QString::fromUtf8("countryLabel")); + countryLabel->setObjectName(QStringLiteral("countryLabel")); gridLayout->addWidget(countryLabel, 4, 0, 1, 1); @@ -195,15 +195,15 @@ public: MainWindow->setCentralWidget(centralwidget); menubar = new QMenuBar(MainWindow); - menubar->setObjectName(QString::fromUtf8("menubar")); + menubar->setObjectName(QStringLiteral("menubar")); menubar->setGeometry(QRect(0, 0, 392, 25)); menu_File = new QMenu(menubar); - menu_File->setObjectName(QString::fromUtf8("menu_File")); + menu_File->setObjectName(QStringLiteral("menu_File")); menu_Help = new QMenu(menubar); - menu_Help->setObjectName(QString::fromUtf8("menu_Help")); + menu_Help->setObjectName(QStringLiteral("menu_Help")); MainWindow->setMenuBar(menubar); statusbar = new QStatusBar(MainWindow); - statusbar->setObjectName(QString::fromUtf8("statusbar")); + statusbar->setObjectName(QStringLiteral("statusbar")); MainWindow->setStatusBar(statusbar); #ifndef QT_NO_SHORTCUT ageLabel->setBuddy(ageSpinBox); diff --git a/tests/auto/tools/uic/baseline/paletteeditor.ui.h b/tests/auto/tools/uic/baseline/paletteeditor.ui.h index de57468b9dd..67f74c15460 100644 --- a/tests/auto/tools/uic/baseline/paletteeditor.ui.h +++ b/tests/auto/tools/uic/baseline/paletteeditor.ui.h @@ -95,7 +95,7 @@ public: void setupUi(QDialog *qdesigner_internal__PaletteEditor) { if (qdesigner_internal__PaletteEditor->objectName().isEmpty()) - qdesigner_internal__PaletteEditor->setObjectName(QString::fromUtf8("qdesigner_internal__PaletteEditor")); + qdesigner_internal__PaletteEditor->setObjectName(QStringLiteral("qdesigner_internal__PaletteEditor")); qdesigner_internal__PaletteEditor->resize(365, 409); QSizePolicy sizePolicy(static_cast(7), static_cast(7)); sizePolicy.setHorizontalStretch(0); @@ -109,9 +109,9 @@ public: #ifndef Q_OS_MAC vboxLayout->setContentsMargins(9, 9, 9, 9); #endif - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); advancedBox = new QGroupBox(qdesigner_internal__PaletteEditor); - advancedBox->setObjectName(QString::fromUtf8("advancedBox")); + advancedBox->setObjectName(QStringLiteral("advancedBox")); advancedBox->setMinimumSize(QSize(0, 0)); advancedBox->setMaximumSize(QSize(16777215, 16777215)); gridLayout = new QGridLayout(advancedBox); @@ -121,9 +121,9 @@ public: #ifndef Q_OS_MAC gridLayout->setContentsMargins(9, 9, 9, 9); #endif - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); buildButton = new QtColorButton(advancedBox); - buildButton->setObjectName(QString::fromUtf8("buildButton")); + buildButton->setObjectName(QStringLiteral("buildButton")); QSizePolicy sizePolicy1(static_cast(7), static_cast(13)); sizePolicy1.setHorizontalStretch(0); sizePolicy1.setVerticalStretch(0); @@ -133,24 +133,24 @@ public: gridLayout->addWidget(buildButton, 0, 1, 1, 1); paletteView = new QTreeView(advancedBox); - paletteView->setObjectName(QString::fromUtf8("paletteView")); + paletteView->setObjectName(QStringLiteral("paletteView")); paletteView->setMinimumSize(QSize(0, 200)); gridLayout->addWidget(paletteView, 1, 0, 1, 4); detailsRadio = new QRadioButton(advancedBox); - detailsRadio->setObjectName(QString::fromUtf8("detailsRadio")); + detailsRadio->setObjectName(QStringLiteral("detailsRadio")); gridLayout->addWidget(detailsRadio, 0, 3, 1, 1); computeRadio = new QRadioButton(advancedBox); - computeRadio->setObjectName(QString::fromUtf8("computeRadio")); + computeRadio->setObjectName(QStringLiteral("computeRadio")); computeRadio->setChecked(true); gridLayout->addWidget(computeRadio, 0, 2, 1, 1); label = new QLabel(advancedBox); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); gridLayout->addWidget(label, 0, 0, 1, 1); @@ -158,7 +158,7 @@ public: vboxLayout->addWidget(advancedBox); GroupBox126 = new QGroupBox(qdesigner_internal__PaletteEditor); - GroupBox126->setObjectName(QString::fromUtf8("GroupBox126")); + GroupBox126->setObjectName(QStringLiteral("GroupBox126")); QSizePolicy sizePolicy2(static_cast(5), static_cast(7)); sizePolicy2.setHorizontalStretch(0); sizePolicy2.setVerticalStretch(0); @@ -169,25 +169,25 @@ public: gridLayout1->setSpacing(6); #endif gridLayout1->setContentsMargins(8, 8, 8, 8); - gridLayout1->setObjectName(QString::fromUtf8("gridLayout1")); + gridLayout1->setObjectName(QStringLiteral("gridLayout1")); disabledRadio = new QRadioButton(GroupBox126); - disabledRadio->setObjectName(QString::fromUtf8("disabledRadio")); + disabledRadio->setObjectName(QStringLiteral("disabledRadio")); gridLayout1->addWidget(disabledRadio, 0, 2, 1, 1); inactiveRadio = new QRadioButton(GroupBox126); - inactiveRadio->setObjectName(QString::fromUtf8("inactiveRadio")); + inactiveRadio->setObjectName(QStringLiteral("inactiveRadio")); gridLayout1->addWidget(inactiveRadio, 0, 1, 1, 1); activeRadio = new QRadioButton(GroupBox126); - activeRadio->setObjectName(QString::fromUtf8("activeRadio")); + activeRadio->setObjectName(QStringLiteral("activeRadio")); activeRadio->setChecked(true); gridLayout1->addWidget(activeRadio, 0, 0, 1, 1); previewFrame = new qdesigner_internal::PreviewFrame(GroupBox126); - previewFrame->setObjectName(QString::fromUtf8("previewFrame")); + previewFrame->setObjectName(QStringLiteral("previewFrame")); sizePolicy.setHeightForWidth(previewFrame->sizePolicy().hasHeightForWidth()); previewFrame->setSizePolicy(sizePolicy); @@ -197,7 +197,7 @@ public: vboxLayout->addWidget(GroupBox126); buttonBox = new QDialogButtonBox(qdesigner_internal__PaletteEditor); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName(QStringLiteral("buttonBox")); buttonBox->setOrientation(Qt::Horizontal); buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok); diff --git a/tests/auto/tools/uic/baseline/passworddialog.ui.h b/tests/auto/tools/uic/baseline/passworddialog.ui.h index f6579dac7b6..be763cf040c 100644 --- a/tests/auto/tools/uic/baseline/passworddialog.ui.h +++ b/tests/auto/tools/uic/baseline/passworddialog.ui.h @@ -40,19 +40,19 @@ public: void setupUi(QDialog *PasswordDialog) { if (PasswordDialog->objectName().isEmpty()) - PasswordDialog->setObjectName(QString::fromUtf8("PasswordDialog")); + PasswordDialog->setObjectName(QStringLiteral("PasswordDialog")); PasswordDialog->resize(399, 148); gridLayout = new QGridLayout(PasswordDialog); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); hboxLayout = new QHBoxLayout(); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName(QStringLiteral("hboxLayout")); iconLabel = new QLabel(PasswordDialog); - iconLabel->setObjectName(QString::fromUtf8("iconLabel")); + iconLabel->setObjectName(QStringLiteral("iconLabel")); hboxLayout->addWidget(iconLabel); introLabel = new QLabel(PasswordDialog); - introLabel->setObjectName(QString::fromUtf8("introLabel")); + introLabel->setObjectName(QStringLiteral("introLabel")); QSizePolicy sizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); @@ -65,28 +65,28 @@ public: gridLayout->addLayout(hboxLayout, 0, 0, 1, 2); label = new QLabel(PasswordDialog); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); gridLayout->addWidget(label, 1, 0, 1, 1); userNameLineEdit = new QLineEdit(PasswordDialog); - userNameLineEdit->setObjectName(QString::fromUtf8("userNameLineEdit")); + userNameLineEdit->setObjectName(QStringLiteral("userNameLineEdit")); gridLayout->addWidget(userNameLineEdit, 1, 1, 1, 1); lblPassword = new QLabel(PasswordDialog); - lblPassword->setObjectName(QString::fromUtf8("lblPassword")); + lblPassword->setObjectName(QStringLiteral("lblPassword")); gridLayout->addWidget(lblPassword, 2, 0, 1, 1); passwordLineEdit = new QLineEdit(PasswordDialog); - passwordLineEdit->setObjectName(QString::fromUtf8("passwordLineEdit")); + passwordLineEdit->setObjectName(QStringLiteral("passwordLineEdit")); passwordLineEdit->setEchoMode(QLineEdit::Password); gridLayout->addWidget(passwordLineEdit, 2, 1, 1, 1); buttonBox = new QDialogButtonBox(PasswordDialog); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName(QStringLiteral("buttonBox")); buttonBox->setOrientation(Qt::Horizontal); buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok); diff --git a/tests/auto/tools/uic/baseline/pathpage.ui.h b/tests/auto/tools/uic/baseline/pathpage.ui.h index 5edca08fac1..8d75297ff4c 100644 --- a/tests/auto/tools/uic/baseline/pathpage.ui.h +++ b/tests/auto/tools/uic/baseline/pathpage.ui.h @@ -42,12 +42,12 @@ public: void setupUi(QWidget *PathPage) { if (PathPage->objectName().isEmpty()) - PathPage->setObjectName(QString::fromUtf8("PathPage")); + PathPage->setObjectName(QStringLiteral("PathPage")); PathPage->resize(417, 243); gridLayout = new QGridLayout(PathPage); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); label_2 = new QLabel(PathPage); - label_2->setObjectName(QString::fromUtf8("label_2")); + label_2->setObjectName(QStringLiteral("label_2")); QSizePolicy sizePolicy(QSizePolicy::Maximum, QSizePolicy::Preferred); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); @@ -57,7 +57,7 @@ public: gridLayout->addWidget(label_2, 0, 0, 1, 1); filterLineEdit = new QLineEdit(PathPage); - filterLineEdit->setObjectName(QString::fromUtf8("filterLineEdit")); + filterLineEdit->setObjectName(QStringLiteral("filterLineEdit")); gridLayout->addWidget(filterLineEdit, 0, 1, 1, 2); @@ -66,17 +66,17 @@ public: gridLayout->addItem(spacerItem, 1, 1, 1, 1); label = new QLabel(PathPage); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); gridLayout->addWidget(label, 2, 0, 1, 3); pathListWidget = new QListWidget(PathPage); - pathListWidget->setObjectName(QString::fromUtf8("pathListWidget")); + pathListWidget->setObjectName(QStringLiteral("pathListWidget")); gridLayout->addWidget(pathListWidget, 3, 0, 3, 3); addButton = new QPushButton(PathPage); - addButton->setObjectName(QString::fromUtf8("addButton")); + addButton->setObjectName(QStringLiteral("addButton")); QSizePolicy sizePolicy1(QSizePolicy::Maximum, QSizePolicy::Fixed); sizePolicy1.setHorizontalStretch(0); sizePolicy1.setVerticalStretch(0); @@ -86,7 +86,7 @@ public: gridLayout->addWidget(addButton, 3, 3, 1, 1); removeButton = new QPushButton(PathPage); - removeButton->setObjectName(QString::fromUtf8("removeButton")); + removeButton->setObjectName(QStringLiteral("removeButton")); sizePolicy1.setHeightForWidth(removeButton->sizePolicy().hasHeightForWidth()); removeButton->setSizePolicy(sizePolicy1); diff --git a/tests/auto/tools/uic/baseline/phrasebookbox.ui.h b/tests/auto/tools/uic/baseline/phrasebookbox.ui.h index ad7f916f56c..ecc7190ff19 100644 --- a/tests/auto/tools/uic/baseline/phrasebookbox.ui.h +++ b/tests/auto/tools/uic/baseline/phrasebookbox.ui.h @@ -93,45 +93,45 @@ public: void setupUi(QDialog *PhraseBookBox) { if (PhraseBookBox->objectName().isEmpty()) - PhraseBookBox->setObjectName(QString::fromUtf8("PhraseBookBox")); + PhraseBookBox->setObjectName(QStringLiteral("PhraseBookBox")); PhraseBookBox->resize(596, 454); unnamed = new QHBoxLayout(PhraseBookBox); unnamed->setSpacing(6); unnamed->setContentsMargins(11, 11, 11, 11); - unnamed->setObjectName(QString::fromUtf8("unnamed")); + unnamed->setObjectName(QStringLiteral("unnamed")); inputsLayout = new QVBoxLayout(); inputsLayout->setSpacing(6); - inputsLayout->setObjectName(QString::fromUtf8("inputsLayout")); + inputsLayout->setObjectName(QStringLiteral("inputsLayout")); gridLayout = new QGridLayout(); gridLayout->setSpacing(6); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); target = new QLabel(PhraseBookBox); - target->setObjectName(QString::fromUtf8("target")); + target->setObjectName(QStringLiteral("target")); gridLayout->addWidget(target, 1, 0, 1, 1); targetLed = new QLineEdit(PhraseBookBox); - targetLed->setObjectName(QString::fromUtf8("targetLed")); + targetLed->setObjectName(QStringLiteral("targetLed")); gridLayout->addWidget(targetLed, 1, 1, 1, 1); source = new QLabel(PhraseBookBox); - source->setObjectName(QString::fromUtf8("source")); + source->setObjectName(QStringLiteral("source")); gridLayout->addWidget(source, 0, 0, 1, 1); definitionLed = new QLineEdit(PhraseBookBox); - definitionLed->setObjectName(QString::fromUtf8("definitionLed")); + definitionLed->setObjectName(QStringLiteral("definitionLed")); gridLayout->addWidget(definitionLed, 2, 1, 1, 1); sourceLed = new QLineEdit(PhraseBookBox); - sourceLed->setObjectName(QString::fromUtf8("sourceLed")); + sourceLed->setObjectName(QStringLiteral("sourceLed")); gridLayout->addWidget(sourceLed, 0, 1, 1, 1); definition = new QLabel(PhraseBookBox); - definition->setObjectName(QString::fromUtf8("definition")); + definition->setObjectName(QStringLiteral("definition")); gridLayout->addWidget(definition, 2, 0, 1, 1); @@ -139,7 +139,7 @@ public: inputsLayout->addLayout(gridLayout); phraseList = new QTreeView(PhraseBookBox); - phraseList->setObjectName(QString::fromUtf8("phraseList")); + phraseList->setObjectName(QStringLiteral("phraseList")); phraseList->setRootIsDecorated(false); phraseList->setUniformRowHeights(true); phraseList->setItemsExpandable(false); @@ -153,24 +153,24 @@ public: buttonLayout = new QVBoxLayout(); buttonLayout->setSpacing(6); - buttonLayout->setObjectName(QString::fromUtf8("buttonLayout")); + buttonLayout->setObjectName(QStringLiteral("buttonLayout")); newBut = new QPushButton(PhraseBookBox); - newBut->setObjectName(QString::fromUtf8("newBut")); + newBut->setObjectName(QStringLiteral("newBut")); buttonLayout->addWidget(newBut); removeBut = new QPushButton(PhraseBookBox); - removeBut->setObjectName(QString::fromUtf8("removeBut")); + removeBut->setObjectName(QStringLiteral("removeBut")); buttonLayout->addWidget(removeBut); saveBut = new QPushButton(PhraseBookBox); - saveBut->setObjectName(QString::fromUtf8("saveBut")); + saveBut->setObjectName(QStringLiteral("saveBut")); buttonLayout->addWidget(saveBut); closeBut = new QPushButton(PhraseBookBox); - closeBut->setObjectName(QString::fromUtf8("closeBut")); + closeBut->setObjectName(QStringLiteral("closeBut")); buttonLayout->addWidget(closeBut); diff --git a/tests/auto/tools/uic/baseline/plugindialog.ui.h b/tests/auto/tools/uic/baseline/plugindialog.ui.h index 24453cb47cb..770bb82b55f 100644 --- a/tests/auto/tools/uic/baseline/plugindialog.ui.h +++ b/tests/auto/tools/uic/baseline/plugindialog.ui.h @@ -80,39 +80,39 @@ public: void setupUi(QDialog *PluginDialog) { if (PluginDialog->objectName().isEmpty()) - PluginDialog->setObjectName(QString::fromUtf8("PluginDialog")); + PluginDialog->setObjectName(QStringLiteral("PluginDialog")); PluginDialog->resize(401, 331); vboxLayout = new QVBoxLayout(PluginDialog); vboxLayout->setSpacing(6); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); vboxLayout->setContentsMargins(8, 8, 8, 8); label = new QLabel(PluginDialog); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); label->setWordWrap(true); vboxLayout->addWidget(label); treeWidget = new QTreeWidget(PluginDialog); - treeWidget->setObjectName(QString::fromUtf8("treeWidget")); + treeWidget->setObjectName(QStringLiteral("treeWidget")); treeWidget->setTextElideMode(Qt::ElideNone); vboxLayout->addWidget(treeWidget); message = new QLabel(PluginDialog); - message->setObjectName(QString::fromUtf8("message")); + message->setObjectName(QStringLiteral("message")); message->setWordWrap(true); vboxLayout->addWidget(message); hboxLayout = new QHBoxLayout(); hboxLayout->setSpacing(6); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName(QStringLiteral("hboxLayout")); hboxLayout->setContentsMargins(0, 0, 0, 0); vboxLayout->addLayout(hboxLayout); buttonBox = new QDialogButtonBox(PluginDialog); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName(QStringLiteral("buttonBox")); buttonBox->setOrientation(Qt::Horizontal); buttonBox->setStandardButtons(QDialogButtonBox::Close); diff --git a/tests/auto/tools/uic/baseline/preferencesdialog.ui.h b/tests/auto/tools/uic/baseline/preferencesdialog.ui.h index 65ecc359b4c..287ccd730da 100644 --- a/tests/auto/tools/uic/baseline/preferencesdialog.ui.h +++ b/tests/auto/tools/uic/baseline/preferencesdialog.ui.h @@ -57,21 +57,21 @@ public: void setupUi(QDialog *PreferencesDialog) { if (PreferencesDialog->objectName().isEmpty()) - PreferencesDialog->setObjectName(QString::fromUtf8("PreferencesDialog")); + PreferencesDialog->setObjectName(QStringLiteral("PreferencesDialog")); PreferencesDialog->resize(455, 359); PreferencesDialog->setModal(true); vboxLayout = new QVBoxLayout(PreferencesDialog); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); hboxLayout = new QHBoxLayout(); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName(QStringLiteral("hboxLayout")); vboxLayout1 = new QVBoxLayout(); - vboxLayout1->setObjectName(QString::fromUtf8("vboxLayout1")); + vboxLayout1->setObjectName(QStringLiteral("vboxLayout1")); m_uiModeGroupBox = new QGroupBox(PreferencesDialog); - m_uiModeGroupBox->setObjectName(QString::fromUtf8("m_uiModeGroupBox")); + m_uiModeGroupBox->setObjectName(QStringLiteral("m_uiModeGroupBox")); vboxLayout2 = new QVBoxLayout(m_uiModeGroupBox); - vboxLayout2->setObjectName(QString::fromUtf8("vboxLayout2")); + vboxLayout2->setObjectName(QStringLiteral("vboxLayout2")); m_uiModeCombo = new QComboBox(m_uiModeGroupBox); - m_uiModeCombo->setObjectName(QString::fromUtf8("m_uiModeCombo")); + m_uiModeCombo->setObjectName(QStringLiteral("m_uiModeCombo")); vboxLayout2->addWidget(m_uiModeCombo); @@ -79,12 +79,12 @@ public: vboxLayout1->addWidget(m_uiModeGroupBox); m_fontPanel = new FontPanel(PreferencesDialog); - m_fontPanel->setObjectName(QString::fromUtf8("m_fontPanel")); + m_fontPanel->setObjectName(QStringLiteral("m_fontPanel")); vboxLayout1->addWidget(m_fontPanel); m_previewConfigurationWidget = new qdesigner_internal::PreviewConfigurationWidget(PreferencesDialog); - m_previewConfigurationWidget->setObjectName(QString::fromUtf8("m_previewConfigurationWidget")); + m_previewConfigurationWidget->setObjectName(QStringLiteral("m_previewConfigurationWidget")); vboxLayout1->addWidget(m_previewConfigurationWidget); @@ -92,23 +92,23 @@ public: hboxLayout->addLayout(vboxLayout1); vboxLayout3 = new QVBoxLayout(); - vboxLayout3->setObjectName(QString::fromUtf8("vboxLayout3")); + vboxLayout3->setObjectName(QStringLiteral("vboxLayout3")); m_templatePathGroupBox = new QGroupBox(PreferencesDialog); - m_templatePathGroupBox->setObjectName(QString::fromUtf8("m_templatePathGroupBox")); + m_templatePathGroupBox->setObjectName(QStringLiteral("m_templatePathGroupBox")); gridLayout = new QGridLayout(m_templatePathGroupBox); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); m_templatePathListWidget = new QListWidget(m_templatePathGroupBox); - m_templatePathListWidget->setObjectName(QString::fromUtf8("m_templatePathListWidget")); + m_templatePathListWidget->setObjectName(QStringLiteral("m_templatePathListWidget")); gridLayout->addWidget(m_templatePathListWidget, 0, 0, 1, 3); m_addTemplatePathButton = new QToolButton(m_templatePathGroupBox); - m_addTemplatePathButton->setObjectName(QString::fromUtf8("m_addTemplatePathButton")); + m_addTemplatePathButton->setObjectName(QStringLiteral("m_addTemplatePathButton")); gridLayout->addWidget(m_addTemplatePathButton, 1, 0, 1, 1); m_removeTemplatePathButton = new QToolButton(m_templatePathGroupBox); - m_removeTemplatePathButton->setObjectName(QString::fromUtf8("m_removeTemplatePathButton")); + m_removeTemplatePathButton->setObjectName(QStringLiteral("m_removeTemplatePathButton")); gridLayout->addWidget(m_removeTemplatePathButton, 1, 1, 1, 1); @@ -120,7 +120,7 @@ public: vboxLayout3->addWidget(m_templatePathGroupBox); m_gridPanel = new qdesigner_internal::GridPanel(PreferencesDialog); - m_gridPanel->setObjectName(QString::fromUtf8("m_gridPanel")); + m_gridPanel->setObjectName(QStringLiteral("m_gridPanel")); vboxLayout3->addWidget(m_gridPanel); @@ -131,14 +131,14 @@ public: vboxLayout->addLayout(hboxLayout); line = new QFrame(PreferencesDialog); - line->setObjectName(QString::fromUtf8("line")); + line->setObjectName(QStringLiteral("line")); line->setFrameShape(QFrame::HLine); line->setFrameShadow(QFrame::Sunken); vboxLayout->addWidget(line); m_dialogButtonBox = new QDialogButtonBox(PreferencesDialog); - m_dialogButtonBox->setObjectName(QString::fromUtf8("m_dialogButtonBox")); + m_dialogButtonBox->setObjectName(QStringLiteral("m_dialogButtonBox")); m_dialogButtonBox->setOrientation(Qt::Horizontal); m_dialogButtonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok); diff --git a/tests/auto/tools/uic/baseline/previewconfigurationwidget.ui.h b/tests/auto/tools/uic/baseline/previewconfigurationwidget.ui.h index 3392d6f220d..1bdf1a049bb 100644 --- a/tests/auto/tools/uic/baseline/previewconfigurationwidget.ui.h +++ b/tests/auto/tools/uic/baseline/previewconfigurationwidget.ui.h @@ -44,40 +44,40 @@ public: void setupUi(QGroupBox *PreviewConfigurationWidget) { if (PreviewConfigurationWidget->objectName().isEmpty()) - PreviewConfigurationWidget->setObjectName(QString::fromUtf8("PreviewConfigurationWidget")); + PreviewConfigurationWidget->setObjectName(QStringLiteral("PreviewConfigurationWidget")); PreviewConfigurationWidget->setCheckable(true); formLayout = new QFormLayout(PreviewConfigurationWidget); - formLayout->setObjectName(QString::fromUtf8("formLayout")); + formLayout->setObjectName(QStringLiteral("formLayout")); m_styleLabel = new QLabel(PreviewConfigurationWidget); - m_styleLabel->setObjectName(QString::fromUtf8("m_styleLabel")); + m_styleLabel->setObjectName(QStringLiteral("m_styleLabel")); formLayout->setWidget(0, QFormLayout::LabelRole, m_styleLabel); m_styleCombo = new QComboBox(PreviewConfigurationWidget); - m_styleCombo->setObjectName(QString::fromUtf8("m_styleCombo")); + m_styleCombo->setObjectName(QStringLiteral("m_styleCombo")); formLayout->setWidget(0, QFormLayout::FieldRole, m_styleCombo); m_appStyleSheetLabel = new QLabel(PreviewConfigurationWidget); - m_appStyleSheetLabel->setObjectName(QString::fromUtf8("m_appStyleSheetLabel")); + m_appStyleSheetLabel->setObjectName(QStringLiteral("m_appStyleSheetLabel")); formLayout->setWidget(1, QFormLayout::LabelRole, m_appStyleSheetLabel); hboxLayout = new QHBoxLayout(); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName(QStringLiteral("hboxLayout")); m_appStyleSheetLineEdit = new qdesigner_internal::TextPropertyEditor(PreviewConfigurationWidget); - m_appStyleSheetLineEdit->setObjectName(QString::fromUtf8("m_appStyleSheetLineEdit")); + m_appStyleSheetLineEdit->setObjectName(QStringLiteral("m_appStyleSheetLineEdit")); m_appStyleSheetLineEdit->setMinimumSize(QSize(149, 0)); hboxLayout->addWidget(m_appStyleSheetLineEdit); m_appStyleSheetChangeButton = new QToolButton(PreviewConfigurationWidget); - m_appStyleSheetChangeButton->setObjectName(QString::fromUtf8("m_appStyleSheetChangeButton")); + m_appStyleSheetChangeButton->setObjectName(QStringLiteral("m_appStyleSheetChangeButton")); hboxLayout->addWidget(m_appStyleSheetChangeButton); m_appStyleSheetClearButton = new QToolButton(PreviewConfigurationWidget); - m_appStyleSheetClearButton->setObjectName(QString::fromUtf8("m_appStyleSheetClearButton")); + m_appStyleSheetClearButton->setObjectName(QStringLiteral("m_appStyleSheetClearButton")); hboxLayout->addWidget(m_appStyleSheetClearButton); @@ -85,19 +85,19 @@ public: formLayout->setLayout(1, QFormLayout::FieldRole, hboxLayout); m_skinLabel = new QLabel(PreviewConfigurationWidget); - m_skinLabel->setObjectName(QString::fromUtf8("m_skinLabel")); + m_skinLabel->setObjectName(QStringLiteral("m_skinLabel")); formLayout->setWidget(2, QFormLayout::LabelRole, m_skinLabel); hboxLayout1 = new QHBoxLayout(); - hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1")); + hboxLayout1->setObjectName(QStringLiteral("hboxLayout1")); m_skinCombo = new QComboBox(PreviewConfigurationWidget); - m_skinCombo->setObjectName(QString::fromUtf8("m_skinCombo")); + m_skinCombo->setObjectName(QStringLiteral("m_skinCombo")); hboxLayout1->addWidget(m_skinCombo); m_skinRemoveButton = new QToolButton(PreviewConfigurationWidget); - m_skinRemoveButton->setObjectName(QString::fromUtf8("m_skinRemoveButton")); + m_skinRemoveButton->setObjectName(QStringLiteral("m_skinRemoveButton")); hboxLayout1->addWidget(m_skinRemoveButton); diff --git a/tests/auto/tools/uic/baseline/previewdialogbase.ui.h b/tests/auto/tools/uic/baseline/previewdialogbase.ui.h index 43cd278d55a..c577324b5e6 100644 --- a/tests/auto/tools/uic/baseline/previewdialogbase.ui.h +++ b/tests/auto/tools/uic/baseline/previewdialogbase.ui.h @@ -48,7 +48,7 @@ public: void setupUi(QDialog *PreviewDialogBase) { if (PreviewDialogBase->objectName().isEmpty()) - PreviewDialogBase->setObjectName(QString::fromUtf8("PreviewDialogBase")); + PreviewDialogBase->setObjectName(QStringLiteral("PreviewDialogBase")); PreviewDialogBase->resize(733, 479); vboxLayout = new QVBoxLayout(PreviewDialogBase); #ifndef Q_OS_MAC @@ -57,7 +57,7 @@ public: #ifndef Q_OS_MAC vboxLayout->setContentsMargins(9, 9, 9, 9); #endif - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); hboxLayout = new QHBoxLayout(); #ifndef Q_OS_MAC hboxLayout->setSpacing(6); @@ -65,14 +65,14 @@ public: #ifndef Q_OS_MAC hboxLayout->setContentsMargins(0, 0, 0, 0); #endif - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName(QStringLiteral("hboxLayout")); label = new QLabel(PreviewDialogBase); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); hboxLayout->addWidget(label); paperSizeCombo = new QComboBox(PreviewDialogBase); - paperSizeCombo->setObjectName(QString::fromUtf8("paperSizeCombo")); + paperSizeCombo->setObjectName(QStringLiteral("paperSizeCombo")); QSizePolicy sizePolicy(static_cast(1), static_cast(0)); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); @@ -82,12 +82,12 @@ public: hboxLayout->addWidget(paperSizeCombo); label_2 = new QLabel(PreviewDialogBase); - label_2->setObjectName(QString::fromUtf8("label_2")); + label_2->setObjectName(QStringLiteral("label_2")); hboxLayout->addWidget(label_2); paperOrientationCombo = new QComboBox(PreviewDialogBase); - paperOrientationCombo->setObjectName(QString::fromUtf8("paperOrientationCombo")); + paperOrientationCombo->setObjectName(QStringLiteral("paperOrientationCombo")); sizePolicy.setHeightForWidth(paperOrientationCombo->sizePolicy().hasHeightForWidth()); paperOrientationCombo->setSizePolicy(sizePolicy); @@ -105,9 +105,9 @@ public: hboxLayout1->setSpacing(6); #endif hboxLayout1->setContentsMargins(0, 0, 0, 0); - hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1")); + hboxLayout1->setObjectName(QStringLiteral("hboxLayout1")); pageList = new QTreeWidget(PreviewDialogBase); - pageList->setObjectName(QString::fromUtf8("pageList")); + pageList->setObjectName(QStringLiteral("pageList")); pageList->setIndentation(0); pageList->setRootIsDecorated(false); pageList->setUniformRowHeights(true); @@ -117,7 +117,7 @@ public: hboxLayout1->addWidget(pageList); previewArea = new QScrollArea(PreviewDialogBase); - previewArea->setObjectName(QString::fromUtf8("previewArea")); + previewArea->setObjectName(QStringLiteral("previewArea")); QSizePolicy sizePolicy1(static_cast(5), static_cast(5)); sizePolicy1.setHorizontalStretch(1); sizePolicy1.setVerticalStretch(0); @@ -134,9 +134,9 @@ public: hboxLayout2->setSpacing(6); #endif hboxLayout2->setContentsMargins(0, 0, 0, 0); - hboxLayout2->setObjectName(QString::fromUtf8("hboxLayout2")); + hboxLayout2->setObjectName(QStringLiteral("hboxLayout2")); progressBar = new QProgressBar(PreviewDialogBase); - progressBar->setObjectName(QString::fromUtf8("progressBar")); + progressBar->setObjectName(QStringLiteral("progressBar")); progressBar->setEnabled(false); QSizePolicy sizePolicy2(static_cast(7), static_cast(0)); sizePolicy2.setHorizontalStretch(1); @@ -150,7 +150,7 @@ public: hboxLayout2->addWidget(progressBar); buttonBox = new QDialogButtonBox(PreviewDialogBase); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName(QStringLiteral("buttonBox")); buttonBox->setOrientation(Qt::Horizontal); buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok); diff --git a/tests/auto/tools/uic/baseline/previewwidget.ui.h b/tests/auto/tools/uic/baseline/previewwidget.ui.h index 9fd79688f20..9997353ac81 100644 --- a/tests/auto/tools/uic/baseline/previewwidget.ui.h +++ b/tests/auto/tools/uic/baseline/previewwidget.ui.h @@ -107,7 +107,7 @@ public: void setupUi(QWidget *qdesigner_internal__PreviewWidget) { if (qdesigner_internal__PreviewWidget->objectName().isEmpty()) - qdesigner_internal__PreviewWidget->setObjectName(QString::fromUtf8("qdesigner_internal__PreviewWidget")); + qdesigner_internal__PreviewWidget->setObjectName(QStringLiteral("qdesigner_internal__PreviewWidget")); qdesigner_internal__PreviewWidget->resize(471, 251); QSizePolicy sizePolicy(static_cast(1), static_cast(1)); sizePolicy.setHorizontalStretch(0); @@ -121,7 +121,7 @@ public: #ifndef Q_OS_MAC gridLayout->setContentsMargins(9, 9, 9, 9); #endif - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); vboxLayout = new QVBoxLayout(); #ifndef Q_OS_MAC vboxLayout->setSpacing(6); @@ -129,14 +129,14 @@ public: #ifndef Q_OS_MAC vboxLayout->setContentsMargins(0, 0, 0, 0); #endif - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); LineEdit1 = new QLineEdit(qdesigner_internal__PreviewWidget); - LineEdit1->setObjectName(QString::fromUtf8("LineEdit1")); + LineEdit1->setObjectName(QStringLiteral("LineEdit1")); vboxLayout->addWidget(LineEdit1); ComboBox1 = new QComboBox(qdesigner_internal__PreviewWidget); - ComboBox1->setObjectName(QString::fromUtf8("ComboBox1")); + ComboBox1->setObjectName(QStringLiteral("ComboBox1")); vboxLayout->addWidget(ComboBox1); @@ -145,14 +145,14 @@ public: hboxLayout->setSpacing(6); #endif hboxLayout->setContentsMargins(0, 0, 0, 0); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName(QStringLiteral("hboxLayout")); SpinBox1 = new QSpinBox(qdesigner_internal__PreviewWidget); - SpinBox1->setObjectName(QString::fromUtf8("SpinBox1")); + SpinBox1->setObjectName(QStringLiteral("SpinBox1")); hboxLayout->addWidget(SpinBox1); PushButton1 = new QPushButton(qdesigner_internal__PreviewWidget); - PushButton1->setObjectName(QString::fromUtf8("PushButton1")); + PushButton1->setObjectName(QStringLiteral("PushButton1")); hboxLayout->addWidget(PushButton1); @@ -160,19 +160,19 @@ public: vboxLayout->addLayout(hboxLayout); ScrollBar1 = new QScrollBar(qdesigner_internal__PreviewWidget); - ScrollBar1->setObjectName(QString::fromUtf8("ScrollBar1")); + ScrollBar1->setObjectName(QStringLiteral("ScrollBar1")); ScrollBar1->setOrientation(Qt::Horizontal); vboxLayout->addWidget(ScrollBar1); Slider1 = new QSlider(qdesigner_internal__PreviewWidget); - Slider1->setObjectName(QString::fromUtf8("Slider1")); + Slider1->setObjectName(QStringLiteral("Slider1")); Slider1->setOrientation(Qt::Horizontal); vboxLayout->addWidget(Slider1); listWidget = new QListWidget(qdesigner_internal__PreviewWidget); - listWidget->setObjectName(QString::fromUtf8("listWidget")); + listWidget->setObjectName(QStringLiteral("listWidget")); listWidget->setMaximumSize(QSize(32767, 50)); vboxLayout->addWidget(listWidget); @@ -185,13 +185,13 @@ public: gridLayout->addItem(spacerItem, 3, 0, 1, 2); ProgressBar1 = new QProgressBar(qdesigner_internal__PreviewWidget); - ProgressBar1->setObjectName(QString::fromUtf8("ProgressBar1")); + ProgressBar1->setObjectName(QStringLiteral("ProgressBar1")); ProgressBar1->setOrientation(Qt::Horizontal); gridLayout->addWidget(ProgressBar1, 2, 0, 1, 1); ButtonGroup2 = new QGroupBox(qdesigner_internal__PreviewWidget); - ButtonGroup2->setObjectName(QString::fromUtf8("ButtonGroup2")); + ButtonGroup2->setObjectName(QStringLiteral("ButtonGroup2")); vboxLayout1 = new QVBoxLayout(ButtonGroup2); #ifndef Q_OS_MAC vboxLayout1->setSpacing(6); @@ -199,15 +199,15 @@ public: #ifndef Q_OS_MAC vboxLayout1->setContentsMargins(9, 9, 9, 9); #endif - vboxLayout1->setObjectName(QString::fromUtf8("vboxLayout1")); + vboxLayout1->setObjectName(QStringLiteral("vboxLayout1")); CheckBox1 = new QCheckBox(ButtonGroup2); - CheckBox1->setObjectName(QString::fromUtf8("CheckBox1")); + CheckBox1->setObjectName(QStringLiteral("CheckBox1")); CheckBox1->setChecked(true); vboxLayout1->addWidget(CheckBox1); CheckBox2 = new QCheckBox(ButtonGroup2); - CheckBox2->setObjectName(QString::fromUtf8("CheckBox2")); + CheckBox2->setObjectName(QStringLiteral("CheckBox2")); vboxLayout1->addWidget(CheckBox2); @@ -215,7 +215,7 @@ public: gridLayout->addWidget(ButtonGroup2, 1, 0, 1, 1); ButtonGroup1 = new QGroupBox(qdesigner_internal__PreviewWidget); - ButtonGroup1->setObjectName(QString::fromUtf8("ButtonGroup1")); + ButtonGroup1->setObjectName(QStringLiteral("ButtonGroup1")); vboxLayout2 = new QVBoxLayout(ButtonGroup1); #ifndef Q_OS_MAC vboxLayout2->setSpacing(6); @@ -223,20 +223,20 @@ public: #ifndef Q_OS_MAC vboxLayout2->setContentsMargins(9, 9, 9, 9); #endif - vboxLayout2->setObjectName(QString::fromUtf8("vboxLayout2")); + vboxLayout2->setObjectName(QStringLiteral("vboxLayout2")); RadioButton1 = new QRadioButton(ButtonGroup1); - RadioButton1->setObjectName(QString::fromUtf8("RadioButton1")); + RadioButton1->setObjectName(QStringLiteral("RadioButton1")); RadioButton1->setChecked(true); vboxLayout2->addWidget(RadioButton1); RadioButton2 = new QRadioButton(ButtonGroup1); - RadioButton2->setObjectName(QString::fromUtf8("RadioButton2")); + RadioButton2->setObjectName(QStringLiteral("RadioButton2")); vboxLayout2->addWidget(RadioButton2); RadioButton3 = new QRadioButton(ButtonGroup1); - RadioButton3->setObjectName(QString::fromUtf8("RadioButton3")); + RadioButton3->setObjectName(QStringLiteral("RadioButton3")); vboxLayout2->addWidget(RadioButton3); diff --git a/tests/auto/tools/uic/baseline/proxy.ui.h b/tests/auto/tools/uic/baseline/proxy.ui.h index 592f1a91e31..9be6b97b81f 100644 --- a/tests/auto/tools/uic/baseline/proxy.ui.h +++ b/tests/auto/tools/uic/baseline/proxy.ui.h @@ -38,44 +38,44 @@ public: void setupUi(QDialog *ProxyDialog) { if (ProxyDialog->objectName().isEmpty()) - ProxyDialog->setObjectName(QString::fromUtf8("ProxyDialog")); + ProxyDialog->setObjectName(QStringLiteral("ProxyDialog")); ProxyDialog->resize(369, 144); gridLayout = new QGridLayout(ProxyDialog); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); iconLabel = new QLabel(ProxyDialog); - iconLabel->setObjectName(QString::fromUtf8("iconLabel")); + iconLabel->setObjectName(QStringLiteral("iconLabel")); gridLayout->addWidget(iconLabel, 0, 0, 1, 1); introLabel = new QLabel(ProxyDialog); - introLabel->setObjectName(QString::fromUtf8("introLabel")); + introLabel->setObjectName(QStringLiteral("introLabel")); introLabel->setWordWrap(true); gridLayout->addWidget(introLabel, 0, 1, 1, 2); usernameLabel = new QLabel(ProxyDialog); - usernameLabel->setObjectName(QString::fromUtf8("usernameLabel")); + usernameLabel->setObjectName(QStringLiteral("usernameLabel")); gridLayout->addWidget(usernameLabel, 1, 0, 1, 2); userNameLineEdit = new QLineEdit(ProxyDialog); - userNameLineEdit->setObjectName(QString::fromUtf8("userNameLineEdit")); + userNameLineEdit->setObjectName(QStringLiteral("userNameLineEdit")); gridLayout->addWidget(userNameLineEdit, 1, 2, 1, 1); passwordLabel = new QLabel(ProxyDialog); - passwordLabel->setObjectName(QString::fromUtf8("passwordLabel")); + passwordLabel->setObjectName(QStringLiteral("passwordLabel")); gridLayout->addWidget(passwordLabel, 2, 0, 1, 2); passwordLineEdit = new QLineEdit(ProxyDialog); - passwordLineEdit->setObjectName(QString::fromUtf8("passwordLineEdit")); + passwordLineEdit->setObjectName(QStringLiteral("passwordLineEdit")); passwordLineEdit->setEchoMode(QLineEdit::Password); gridLayout->addWidget(passwordLineEdit, 2, 2, 1, 1); buttonBox = new QDialogButtonBox(ProxyDialog); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName(QStringLiteral("buttonBox")); buttonBox->setOrientation(Qt::Horizontal); buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok); diff --git a/tests/auto/tools/uic/baseline/qfiledialog.ui.h b/tests/auto/tools/uic/baseline/qfiledialog.ui.h index 62030018cb6..848e07db974 100644 --- a/tests/auto/tools/uic/baseline/qfiledialog.ui.h +++ b/tests/auto/tools/uic/baseline/qfiledialog.ui.h @@ -108,20 +108,20 @@ public: void setupUi(QDialog *QFileDialog) { if (QFileDialog->objectName().isEmpty()) - QFileDialog->setObjectName(QString::fromUtf8("QFileDialog")); + QFileDialog->setObjectName(QStringLiteral("QFileDialog")); QFileDialog->resize(521, 316); QFileDialog->setSizeGripEnabled(true); gridLayout = new QGridLayout(QFileDialog); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); lookInLabel = new QLabel(QFileDialog); - lookInLabel->setObjectName(QString::fromUtf8("lookInLabel")); + lookInLabel->setObjectName(QStringLiteral("lookInLabel")); gridLayout->addWidget(lookInLabel, 0, 0, 1, 1); hboxLayout = new QHBoxLayout(); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName(QStringLiteral("hboxLayout")); lookInCombo = new QFileDialogComboBox(QFileDialog); - lookInCombo->setObjectName(QString::fromUtf8("lookInCombo")); + lookInCombo->setObjectName(QStringLiteral("lookInCombo")); QSizePolicy sizePolicy(QSizePolicy::Ignored, QSizePolicy::Fixed); sizePolicy.setHorizontalStretch(1); sizePolicy.setVerticalStretch(0); @@ -132,32 +132,32 @@ public: hboxLayout->addWidget(lookInCombo); backButton = new QToolButton(QFileDialog); - backButton->setObjectName(QString::fromUtf8("backButton")); + backButton->setObjectName(QStringLiteral("backButton")); hboxLayout->addWidget(backButton); forwardButton = new QToolButton(QFileDialog); - forwardButton->setObjectName(QString::fromUtf8("forwardButton")); + forwardButton->setObjectName(QStringLiteral("forwardButton")); hboxLayout->addWidget(forwardButton); toParentButton = new QToolButton(QFileDialog); - toParentButton->setObjectName(QString::fromUtf8("toParentButton")); + toParentButton->setObjectName(QStringLiteral("toParentButton")); hboxLayout->addWidget(toParentButton); newFolderButton = new QToolButton(QFileDialog); - newFolderButton->setObjectName(QString::fromUtf8("newFolderButton")); + newFolderButton->setObjectName(QStringLiteral("newFolderButton")); hboxLayout->addWidget(newFolderButton); listModeButton = new QToolButton(QFileDialog); - listModeButton->setObjectName(QString::fromUtf8("listModeButton")); + listModeButton->setObjectName(QStringLiteral("listModeButton")); hboxLayout->addWidget(listModeButton); detailModeButton = new QToolButton(QFileDialog); - detailModeButton->setObjectName(QString::fromUtf8("detailModeButton")); + detailModeButton->setObjectName(QStringLiteral("detailModeButton")); hboxLayout->addWidget(detailModeButton); @@ -165,7 +165,7 @@ public: gridLayout->addLayout(hboxLayout, 0, 1, 1, 2); splitter = new QSplitter(QFileDialog); - splitter->setObjectName(QString::fromUtf8("splitter")); + splitter->setObjectName(QStringLiteral("splitter")); QSizePolicy sizePolicy1(QSizePolicy::Expanding, QSizePolicy::Expanding); sizePolicy1.setHorizontalStretch(0); sizePolicy1.setVerticalStretch(0); @@ -173,38 +173,38 @@ public: splitter->setSizePolicy(sizePolicy1); splitter->setOrientation(Qt::Horizontal); sidebar = new QSidebar(splitter); - sidebar->setObjectName(QString::fromUtf8("sidebar")); + sidebar->setObjectName(QStringLiteral("sidebar")); splitter->addWidget(sidebar); frame = new QFrame(splitter); - frame->setObjectName(QString::fromUtf8("frame")); + frame->setObjectName(QStringLiteral("frame")); frame->setFrameShape(QFrame::NoFrame); frame->setFrameShadow(QFrame::Raised); vboxLayout = new QVBoxLayout(frame); vboxLayout->setSpacing(0); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); vboxLayout->setContentsMargins(0, 0, 0, 0); stackedWidget = new QStackedWidget(frame); - stackedWidget->setObjectName(QString::fromUtf8("stackedWidget")); + stackedWidget->setObjectName(QStringLiteral("stackedWidget")); page = new QWidget(); - page->setObjectName(QString::fromUtf8("page")); + page->setObjectName(QStringLiteral("page")); vboxLayout1 = new QVBoxLayout(page); vboxLayout1->setSpacing(0); - vboxLayout1->setObjectName(QString::fromUtf8("vboxLayout1")); + vboxLayout1->setObjectName(QStringLiteral("vboxLayout1")); vboxLayout1->setContentsMargins(0, 0, 0, 0); listView = new QFileDialogListView(page); - listView->setObjectName(QString::fromUtf8("listView")); + listView->setObjectName(QStringLiteral("listView")); vboxLayout1->addWidget(listView); stackedWidget->addWidget(page); page_2 = new QWidget(); - page_2->setObjectName(QString::fromUtf8("page_2")); + page_2->setObjectName(QStringLiteral("page_2")); vboxLayout2 = new QVBoxLayout(page_2); vboxLayout2->setSpacing(0); - vboxLayout2->setObjectName(QString::fromUtf8("vboxLayout2")); + vboxLayout2->setObjectName(QStringLiteral("vboxLayout2")); vboxLayout2->setContentsMargins(0, 0, 0, 0); treeView = new QFileDialogTreeView(page_2); - treeView->setObjectName(QString::fromUtf8("treeView")); + treeView->setObjectName(QStringLiteral("treeView")); vboxLayout2->addWidget(treeView); @@ -217,7 +217,7 @@ public: gridLayout->addWidget(splitter, 1, 0, 1, 3); fileNameLabel = new QLabel(QFileDialog); - fileNameLabel->setObjectName(QString::fromUtf8("fileNameLabel")); + fileNameLabel->setObjectName(QStringLiteral("fileNameLabel")); QSizePolicy sizePolicy2(QSizePolicy::Minimum, QSizePolicy::Preferred); sizePolicy2.setHorizontalStretch(0); sizePolicy2.setVerticalStretch(0); @@ -228,7 +228,7 @@ public: gridLayout->addWidget(fileNameLabel, 2, 0, 1, 1); fileNameEdit = new QFileDialogLineEdit(QFileDialog); - fileNameEdit->setObjectName(QString::fromUtf8("fileNameEdit")); + fileNameEdit->setObjectName(QStringLiteral("fileNameEdit")); QSizePolicy sizePolicy3(QSizePolicy::Expanding, QSizePolicy::Fixed); sizePolicy3.setHorizontalStretch(1); sizePolicy3.setVerticalStretch(0); @@ -238,14 +238,14 @@ public: gridLayout->addWidget(fileNameEdit, 2, 1, 1, 1); buttonBox = new QDialogButtonBox(QFileDialog); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName(QStringLiteral("buttonBox")); buttonBox->setOrientation(Qt::Vertical); buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok); gridLayout->addWidget(buttonBox, 2, 2, 2, 1); fileTypeLabel = new QLabel(QFileDialog); - fileTypeLabel->setObjectName(QString::fromUtf8("fileTypeLabel")); + fileTypeLabel->setObjectName(QStringLiteral("fileTypeLabel")); QSizePolicy sizePolicy4(QSizePolicy::Preferred, QSizePolicy::Fixed); sizePolicy4.setHorizontalStretch(0); sizePolicy4.setVerticalStretch(0); @@ -255,7 +255,7 @@ public: gridLayout->addWidget(fileTypeLabel, 3, 0, 1, 1); fileTypeCombo = new QComboBox(QFileDialog); - fileTypeCombo->setObjectName(QString::fromUtf8("fileTypeCombo")); + fileTypeCombo->setObjectName(QStringLiteral("fileTypeCombo")); QSizePolicy sizePolicy5(QSizePolicy::Expanding, QSizePolicy::Fixed); sizePolicy5.setHorizontalStretch(0); sizePolicy5.setVerticalStretch(0); diff --git a/tests/auto/tools/uic/baseline/qpagesetupwidget.ui.h b/tests/auto/tools/uic/baseline/qpagesetupwidget.ui.h index 8e0cc0a82a1..5a14eafc904 100644 --- a/tests/auto/tools/uic/baseline/qpagesetupwidget.ui.h +++ b/tests/auto/tools/uic/baseline/qpagesetupwidget.ui.h @@ -73,15 +73,15 @@ public: void setupUi(QWidget *QPageSetupWidget) { if (QPageSetupWidget->objectName().isEmpty()) - QPageSetupWidget->setObjectName(QString::fromUtf8("QPageSetupWidget")); + QPageSetupWidget->setObjectName(QStringLiteral("QPageSetupWidget")); QPageSetupWidget->resize(416, 488); gridLayout_3 = new QGridLayout(QPageSetupWidget); gridLayout_3->setContentsMargins(0, 0, 0, 0); - gridLayout_3->setObjectName(QString::fromUtf8("gridLayout_3")); + gridLayout_3->setObjectName(QStringLiteral("gridLayout_3")); horizontalLayout_4 = new QHBoxLayout(); - horizontalLayout_4->setObjectName(QString::fromUtf8("horizontalLayout_4")); + horizontalLayout_4->setObjectName(QStringLiteral("horizontalLayout_4")); unit = new QComboBox(QPageSetupWidget); - unit->setObjectName(QString::fromUtf8("unit")); + unit->setObjectName(QStringLiteral("unit")); horizontalLayout_4->addWidget(unit); @@ -93,39 +93,39 @@ public: gridLayout_3->addLayout(horizontalLayout_4, 0, 0, 1, 2); groupBox_2 = new QGroupBox(QPageSetupWidget); - groupBox_2->setObjectName(QString::fromUtf8("groupBox_2")); + groupBox_2->setObjectName(QStringLiteral("groupBox_2")); gridLayout_2 = new QGridLayout(groupBox_2); - gridLayout_2->setObjectName(QString::fromUtf8("gridLayout_2")); + gridLayout_2->setObjectName(QStringLiteral("gridLayout_2")); pageSizeLabel = new QLabel(groupBox_2); - pageSizeLabel->setObjectName(QString::fromUtf8("pageSizeLabel")); + pageSizeLabel->setObjectName(QStringLiteral("pageSizeLabel")); gridLayout_2->addWidget(pageSizeLabel, 0, 0, 1, 1); paperSize = new QComboBox(groupBox_2); - paperSize->setObjectName(QString::fromUtf8("paperSize")); + paperSize->setObjectName(QStringLiteral("paperSize")); gridLayout_2->addWidget(paperSize, 0, 1, 1, 1); widthLabel = new QLabel(groupBox_2); - widthLabel->setObjectName(QString::fromUtf8("widthLabel")); + widthLabel->setObjectName(QStringLiteral("widthLabel")); gridLayout_2->addWidget(widthLabel, 1, 0, 1, 1); horizontalLayout_3 = new QHBoxLayout(); - horizontalLayout_3->setObjectName(QString::fromUtf8("horizontalLayout_3")); + horizontalLayout_3->setObjectName(QStringLiteral("horizontalLayout_3")); paperWidth = new QDoubleSpinBox(groupBox_2); - paperWidth->setObjectName(QString::fromUtf8("paperWidth")); + paperWidth->setObjectName(QStringLiteral("paperWidth")); paperWidth->setMaximum(9999.99); horizontalLayout_3->addWidget(paperWidth); heightLabel = new QLabel(groupBox_2); - heightLabel->setObjectName(QString::fromUtf8("heightLabel")); + heightLabel->setObjectName(QStringLiteral("heightLabel")); horizontalLayout_3->addWidget(heightLabel); paperHeight = new QDoubleSpinBox(groupBox_2); - paperHeight->setObjectName(QString::fromUtf8("paperHeight")); + paperHeight->setObjectName(QStringLiteral("paperHeight")); paperHeight->setMaximum(9999.99); horizontalLayout_3->addWidget(paperHeight); @@ -134,12 +134,12 @@ public: gridLayout_2->addLayout(horizontalLayout_3, 1, 1, 1, 1); paperSourceLabel = new QLabel(groupBox_2); - paperSourceLabel->setObjectName(QString::fromUtf8("paperSourceLabel")); + paperSourceLabel->setObjectName(QStringLiteral("paperSourceLabel")); gridLayout_2->addWidget(paperSourceLabel, 2, 0, 1, 1); paperSource = new QComboBox(groupBox_2); - paperSource->setObjectName(QString::fromUtf8("paperSource")); + paperSource->setObjectName(QStringLiteral("paperSource")); gridLayout_2->addWidget(paperSource, 2, 1, 1, 1); @@ -151,27 +151,27 @@ public: gridLayout_3->addWidget(groupBox_2, 1, 0, 1, 2); groupBox_3 = new QGroupBox(QPageSetupWidget); - groupBox_3->setObjectName(QString::fromUtf8("groupBox_3")); + groupBox_3->setObjectName(QStringLiteral("groupBox_3")); verticalLayout = new QVBoxLayout(groupBox_3); - verticalLayout->setObjectName(QString::fromUtf8("verticalLayout")); + verticalLayout->setObjectName(QStringLiteral("verticalLayout")); portrait = new QRadioButton(groupBox_3); - portrait->setObjectName(QString::fromUtf8("portrait")); + portrait->setObjectName(QStringLiteral("portrait")); portrait->setChecked(true); verticalLayout->addWidget(portrait); landscape = new QRadioButton(groupBox_3); - landscape->setObjectName(QString::fromUtf8("landscape")); + landscape->setObjectName(QStringLiteral("landscape")); verticalLayout->addWidget(landscape); reverseLandscape = new QRadioButton(groupBox_3); - reverseLandscape->setObjectName(QString::fromUtf8("reverseLandscape")); + reverseLandscape->setObjectName(QStringLiteral("reverseLandscape")); verticalLayout->addWidget(reverseLandscape); reversePortrait = new QRadioButton(groupBox_3); - reversePortrait->setObjectName(QString::fromUtf8("reversePortrait")); + reversePortrait->setObjectName(QStringLiteral("reversePortrait")); verticalLayout->addWidget(reversePortrait); @@ -183,31 +183,31 @@ public: gridLayout_3->addWidget(groupBox_3, 2, 0, 1, 1); preview = new QWidget(QPageSetupWidget); - preview->setObjectName(QString::fromUtf8("preview")); + preview->setObjectName(QStringLiteral("preview")); gridLayout_3->addWidget(preview, 2, 1, 2, 1); groupBox = new QGroupBox(QPageSetupWidget); - groupBox->setObjectName(QString::fromUtf8("groupBox")); + groupBox->setObjectName(QStringLiteral("groupBox")); horizontalLayout_2 = new QHBoxLayout(groupBox); - horizontalLayout_2->setObjectName(QString::fromUtf8("horizontalLayout_2")); + horizontalLayout_2->setObjectName(QStringLiteral("horizontalLayout_2")); gridLayout = new QGridLayout(); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); topMargin = new QDoubleSpinBox(groupBox); - topMargin->setObjectName(QString::fromUtf8("topMargin")); + topMargin->setObjectName(QStringLiteral("topMargin")); topMargin->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); topMargin->setMaximum(999.99); gridLayout->addWidget(topMargin, 0, 1, 1, 1); horizontalLayout = new QHBoxLayout(); - horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout")); + horizontalLayout->setObjectName(QStringLiteral("horizontalLayout")); horizontalSpacer_7 = new QSpacerItem(0, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); horizontalLayout->addItem(horizontalSpacer_7); leftMargin = new QDoubleSpinBox(groupBox); - leftMargin->setObjectName(QString::fromUtf8("leftMargin")); + leftMargin->setObjectName(QStringLiteral("leftMargin")); leftMargin->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); leftMargin->setMaximum(999.99); @@ -218,7 +218,7 @@ public: horizontalLayout->addItem(horizontalSpacer); rightMargin = new QDoubleSpinBox(groupBox); - rightMargin->setObjectName(QString::fromUtf8("rightMargin")); + rightMargin->setObjectName(QStringLiteral("rightMargin")); rightMargin->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); rightMargin->setMaximum(999.99); @@ -232,7 +232,7 @@ public: gridLayout->addLayout(horizontalLayout, 1, 0, 1, 3); bottomMargin = new QDoubleSpinBox(groupBox); - bottomMargin->setObjectName(QString::fromUtf8("bottomMargin")); + bottomMargin->setObjectName(QStringLiteral("bottomMargin")); bottomMargin->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); bottomMargin->setMaximum(999.99); diff --git a/tests/auto/tools/uic/baseline/qprintpropertieswidget.ui.h b/tests/auto/tools/uic/baseline/qprintpropertieswidget.ui.h index dd9b68f1c46..5cf337e75e1 100644 --- a/tests/auto/tools/uic/baseline/qprintpropertieswidget.ui.h +++ b/tests/auto/tools/uic/baseline/qprintpropertieswidget.ui.h @@ -39,30 +39,30 @@ public: void setupUi(QWidget *QPrintPropertiesWidget) { if (QPrintPropertiesWidget->objectName().isEmpty()) - QPrintPropertiesWidget->setObjectName(QString::fromUtf8("QPrintPropertiesWidget")); + QPrintPropertiesWidget->setObjectName(QStringLiteral("QPrintPropertiesWidget")); QPrintPropertiesWidget->resize(396, 288); verticalLayout_4 = new QVBoxLayout(QPrintPropertiesWidget); verticalLayout_4->setContentsMargins(0, 0, 0, 0); - verticalLayout_4->setObjectName(QString::fromUtf8("verticalLayout_4")); + verticalLayout_4->setObjectName(QStringLiteral("verticalLayout_4")); tabs = new QTabWidget(QPrintPropertiesWidget); - tabs->setObjectName(QString::fromUtf8("tabs")); + tabs->setObjectName(QStringLiteral("tabs")); tabPage = new QWidget(); - tabPage->setObjectName(QString::fromUtf8("tabPage")); + tabPage->setObjectName(QStringLiteral("tabPage")); tabPage->setGeometry(QRect(0, 0, 392, 261)); horizontalLayout = new QHBoxLayout(tabPage); - horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout")); + horizontalLayout->setObjectName(QStringLiteral("horizontalLayout")); pageSetup = new QPageSetupWidget(tabPage); - pageSetup->setObjectName(QString::fromUtf8("pageSetup")); + pageSetup->setObjectName(QStringLiteral("pageSetup")); horizontalLayout->addWidget(pageSetup); tabs->addTab(tabPage, QString()); cupsPropertiesPage = new QWidget(); - cupsPropertiesPage->setObjectName(QString::fromUtf8("cupsPropertiesPage")); + cupsPropertiesPage->setObjectName(QStringLiteral("cupsPropertiesPage")); horizontalLayout_2 = new QHBoxLayout(cupsPropertiesPage); - horizontalLayout_2->setObjectName(QString::fromUtf8("horizontalLayout_2")); + horizontalLayout_2->setObjectName(QStringLiteral("horizontalLayout_2")); treeView = new QTreeView(cupsPropertiesPage); - treeView->setObjectName(QString::fromUtf8("treeView")); + treeView->setObjectName(QStringLiteral("treeView")); treeView->setAlternatingRowColors(true); horizontalLayout_2->addWidget(treeView); diff --git a/tests/auto/tools/uic/baseline/qprintsettingsoutput.ui.h b/tests/auto/tools/uic/baseline/qprintsettingsoutput.ui.h index 2051c8b04d4..b10e44725ba 100644 --- a/tests/auto/tools/uic/baseline/qprintsettingsoutput.ui.h +++ b/tests/auto/tools/uic/baseline/qprintsettingsoutput.ui.h @@ -74,20 +74,20 @@ public: void setupUi(QWidget *QPrintSettingsOutput) { if (QPrintSettingsOutput->objectName().isEmpty()) - QPrintSettingsOutput->setObjectName(QString::fromUtf8("QPrintSettingsOutput")); + QPrintSettingsOutput->setObjectName(QStringLiteral("QPrintSettingsOutput")); QPrintSettingsOutput->resize(416, 166); horizontalLayout_2 = new QHBoxLayout(QPrintSettingsOutput); horizontalLayout_2->setContentsMargins(0, 0, 0, 0); - horizontalLayout_2->setObjectName(QString::fromUtf8("horizontalLayout_2")); + horizontalLayout_2->setObjectName(QStringLiteral("horizontalLayout_2")); tabs = new QTabWidget(QPrintSettingsOutput); - tabs->setObjectName(QString::fromUtf8("tabs")); + tabs->setObjectName(QStringLiteral("tabs")); copiesTab = new QWidget(); - copiesTab->setObjectName(QString::fromUtf8("copiesTab")); + copiesTab->setObjectName(QStringLiteral("copiesTab")); copiesTab->setGeometry(QRect(0, 0, 412, 139)); horizontalLayout = new QHBoxLayout(copiesTab); - horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout")); + horizontalLayout->setObjectName(QStringLiteral("horizontalLayout")); gbPrintRange = new QGroupBox(copiesTab); - gbPrintRange->setObjectName(QString::fromUtf8("gbPrintRange")); + gbPrintRange->setObjectName(QStringLiteral("gbPrintRange")); QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Minimum); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); @@ -96,9 +96,9 @@ public: _3 = new QVBoxLayout(gbPrintRange); _3->setSpacing(4); _3->setContentsMargins(6, 6, 6, 6); - _3->setObjectName(QString::fromUtf8("_3")); + _3->setObjectName(QStringLiteral("_3")); printAll = new QRadioButton(gbPrintRange); - printAll->setObjectName(QString::fromUtf8("printAll")); + printAll->setObjectName(QStringLiteral("printAll")); printAll->setChecked(true); _3->addWidget(printAll); @@ -108,14 +108,14 @@ public: _4->setSpacing(6); #endif _4->setContentsMargins(0, 0, 0, 0); - _4->setObjectName(QString::fromUtf8("_4")); + _4->setObjectName(QStringLiteral("_4")); printRange = new QRadioButton(gbPrintRange); - printRange->setObjectName(QString::fromUtf8("printRange")); + printRange->setObjectName(QStringLiteral("printRange")); _4->addWidget(printRange); from = new QSpinBox(gbPrintRange); - from->setObjectName(QString::fromUtf8("from")); + from->setObjectName(QStringLiteral("from")); from->setEnabled(false); from->setMinimum(1); from->setMaximum(999); @@ -123,12 +123,12 @@ public: _4->addWidget(from); label_3 = new QLabel(gbPrintRange); - label_3->setObjectName(QString::fromUtf8("label_3")); + label_3->setObjectName(QStringLiteral("label_3")); _4->addWidget(label_3); to = new QSpinBox(gbPrintRange); - to->setObjectName(QString::fromUtf8("to")); + to->setObjectName(QStringLiteral("to")); to->setEnabled(false); to->setMinimum(1); to->setMaximum(999); @@ -143,7 +143,7 @@ public: _3->addLayout(_4); printSelection = new QRadioButton(gbPrintRange); - printSelection->setObjectName(QString::fromUtf8("printSelection")); + printSelection->setObjectName(QStringLiteral("printSelection")); _3->addWidget(printSelection); @@ -155,16 +155,16 @@ public: horizontalLayout->addWidget(gbPrintRange); groupBox = new QGroupBox(copiesTab); - groupBox->setObjectName(QString::fromUtf8("groupBox")); + groupBox->setObjectName(QStringLiteral("groupBox")); gridLayout = new QGridLayout(groupBox); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); label = new QLabel(groupBox); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); gridLayout->addWidget(label, 0, 0, 1, 1); copies = new QSpinBox(groupBox); - copies->setObjectName(QString::fromUtf8("copies")); + copies->setObjectName(QStringLiteral("copies")); copies->setMinimum(1); copies->setMaximum(999); @@ -175,12 +175,12 @@ public: gridLayout->addItem(horizontalSpacer, 0, 3, 1, 1); collate = new QCheckBox(groupBox); - collate->setObjectName(QString::fromUtf8("collate")); + collate->setObjectName(QStringLiteral("collate")); gridLayout->addWidget(collate, 1, 0, 1, 2); outputIcon = new QLabel(groupBox); - outputIcon->setObjectName(QString::fromUtf8("outputIcon")); + outputIcon->setObjectName(QStringLiteral("outputIcon")); QSizePolicy sizePolicy1(QSizePolicy::Ignored, QSizePolicy::Ignored); sizePolicy1.setHorizontalStretch(0); sizePolicy1.setVerticalStretch(0); @@ -190,7 +190,7 @@ public: gridLayout->addWidget(outputIcon, 1, 2, 2, 2); reverse = new QCheckBox(groupBox); - reverse->setObjectName(QString::fromUtf8("reverse")); + reverse->setObjectName(QStringLiteral("reverse")); gridLayout->addWidget(reverse, 2, 0, 1, 2); @@ -203,30 +203,30 @@ public: tabs->addTab(copiesTab, QString()); optionsTab = new QWidget(); - optionsTab->setObjectName(QString::fromUtf8("optionsTab")); + optionsTab->setObjectName(QStringLiteral("optionsTab")); optionsTab->setGeometry(QRect(0, 0, 412, 139)); gridLayout_2 = new QGridLayout(optionsTab); - gridLayout_2->setObjectName(QString::fromUtf8("gridLayout_2")); + gridLayout_2->setObjectName(QStringLiteral("gridLayout_2")); colorMode = new QGroupBox(optionsTab); - colorMode->setObjectName(QString::fromUtf8("colorMode")); + colorMode->setObjectName(QStringLiteral("colorMode")); gridLayout_4 = new QGridLayout(colorMode); - gridLayout_4->setObjectName(QString::fromUtf8("gridLayout_4")); + gridLayout_4->setObjectName(QStringLiteral("gridLayout_4")); verticalSpacer_6 = new QSpacerItem(1, 0, QSizePolicy::Minimum, QSizePolicy::Expanding); gridLayout_4->addItem(verticalSpacer_6, 2, 0, 1, 1); color = new QRadioButton(colorMode); - color->setObjectName(QString::fromUtf8("color")); + color->setObjectName(QStringLiteral("color")); gridLayout_4->addWidget(color, 0, 0, 1, 1); colorIcon = new QLabel(colorMode); - colorIcon->setObjectName(QString::fromUtf8("colorIcon")); + colorIcon->setObjectName(QStringLiteral("colorIcon")); gridLayout_4->addWidget(colorIcon, 0, 1, 3, 1); grayscale = new QRadioButton(colorMode); - grayscale->setObjectName(QString::fromUtf8("grayscale")); + grayscale->setObjectName(QStringLiteral("grayscale")); gridLayout_4->addWidget(grayscale, 1, 0, 1, 1); @@ -234,22 +234,22 @@ public: gridLayout_2->addWidget(colorMode, 0, 1, 1, 1); duplex = new QGroupBox(optionsTab); - duplex->setObjectName(QString::fromUtf8("duplex")); + duplex->setObjectName(QStringLiteral("duplex")); verticalLayout = new QVBoxLayout(duplex); - verticalLayout->setObjectName(QString::fromUtf8("verticalLayout")); + verticalLayout->setObjectName(QStringLiteral("verticalLayout")); noDuplex = new QRadioButton(duplex); - noDuplex->setObjectName(QString::fromUtf8("noDuplex")); + noDuplex->setObjectName(QStringLiteral("noDuplex")); noDuplex->setChecked(true); verticalLayout->addWidget(noDuplex); duplexLong = new QRadioButton(duplex); - duplexLong->setObjectName(QString::fromUtf8("duplexLong")); + duplexLong->setObjectName(QStringLiteral("duplexLong")); verticalLayout->addWidget(duplexLong); duplexShort = new QRadioButton(duplex); - duplexShort->setObjectName(QString::fromUtf8("duplexShort")); + duplexShort->setObjectName(QStringLiteral("duplexShort")); verticalLayout->addWidget(duplexShort); diff --git a/tests/auto/tools/uic/baseline/qprintwidget.ui.h b/tests/auto/tools/uic/baseline/qprintwidget.ui.h index 6389b61fc2c..206556cb1b1 100644 --- a/tests/auto/tools/uic/baseline/qprintwidget.ui.h +++ b/tests/auto/tools/uic/baseline/qprintwidget.ui.h @@ -50,22 +50,22 @@ public: void setupUi(QWidget *QPrintWidget) { if (QPrintWidget->objectName().isEmpty()) - QPrintWidget->setObjectName(QString::fromUtf8("QPrintWidget")); + QPrintWidget->setObjectName(QStringLiteral("QPrintWidget")); QPrintWidget->resize(443, 175); horizontalLayout_2 = new QHBoxLayout(QPrintWidget); horizontalLayout_2->setContentsMargins(0, 0, 0, 0); - horizontalLayout_2->setObjectName(QString::fromUtf8("horizontalLayout_2")); + horizontalLayout_2->setObjectName(QStringLiteral("horizontalLayout_2")); printerGroup = new QGroupBox(QPrintWidget); - printerGroup->setObjectName(QString::fromUtf8("printerGroup")); + printerGroup->setObjectName(QStringLiteral("printerGroup")); gridLayout = new QGridLayout(printerGroup); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); label = new QLabel(printerGroup); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); gridLayout->addWidget(label, 0, 0, 1, 1); printers = new QComboBox(printerGroup); - printers->setObjectName(QString::fromUtf8("printers")); + printers->setObjectName(QStringLiteral("printers")); QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed); sizePolicy.setHorizontalStretch(3); sizePolicy.setVerticalStretch(0); @@ -75,7 +75,7 @@ public: gridLayout->addWidget(printers, 0, 1, 1, 1); properties = new QPushButton(printerGroup); - properties->setObjectName(QString::fromUtf8("properties")); + properties->setObjectName(QStringLiteral("properties")); QSizePolicy sizePolicy1(QSizePolicy::Minimum, QSizePolicy::Fixed); sizePolicy1.setHorizontalStretch(1); sizePolicy1.setVerticalStretch(0); @@ -85,44 +85,44 @@ public: gridLayout->addWidget(properties, 0, 2, 1, 1); label_2 = new QLabel(printerGroup); - label_2->setObjectName(QString::fromUtf8("label_2")); + label_2->setObjectName(QStringLiteral("label_2")); gridLayout->addWidget(label_2, 1, 0, 1, 1); location = new QLabel(printerGroup); - location->setObjectName(QString::fromUtf8("location")); + location->setObjectName(QStringLiteral("location")); gridLayout->addWidget(location, 1, 1, 1, 1); preview = new QCheckBox(printerGroup); - preview->setObjectName(QString::fromUtf8("preview")); + preview->setObjectName(QStringLiteral("preview")); gridLayout->addWidget(preview, 1, 2, 1, 1); label_3 = new QLabel(printerGroup); - label_3->setObjectName(QString::fromUtf8("label_3")); + label_3->setObjectName(QStringLiteral("label_3")); gridLayout->addWidget(label_3, 2, 0, 1, 1); type = new QLabel(printerGroup); - type->setObjectName(QString::fromUtf8("type")); + type->setObjectName(QStringLiteral("type")); gridLayout->addWidget(type, 2, 1, 1, 1); lOutput = new QLabel(printerGroup); - lOutput->setObjectName(QString::fromUtf8("lOutput")); + lOutput->setObjectName(QStringLiteral("lOutput")); gridLayout->addWidget(lOutput, 3, 0, 1, 1); horizontalLayout = new QHBoxLayout(); - horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout")); + horizontalLayout->setObjectName(QStringLiteral("horizontalLayout")); filename = new QLineEdit(printerGroup); - filename->setObjectName(QString::fromUtf8("filename")); + filename->setObjectName(QStringLiteral("filename")); horizontalLayout->addWidget(filename); fileBrowser = new QToolButton(printerGroup); - fileBrowser->setObjectName(QString::fromUtf8("fileBrowser")); + fileBrowser->setObjectName(QStringLiteral("fileBrowser")); horizontalLayout->addWidget(fileBrowser); diff --git a/tests/auto/tools/uic/baseline/qsqlconnectiondialog.ui.h b/tests/auto/tools/uic/baseline/qsqlconnectiondialog.ui.h index f784785ce00..ea957f16c82 100644 --- a/tests/auto/tools/uic/baseline/qsqlconnectiondialog.ui.h +++ b/tests/auto/tools/uic/baseline/qsqlconnectiondialog.ui.h @@ -59,44 +59,44 @@ public: void setupUi(QDialog *QSqlConnectionDialogUi) { if (QSqlConnectionDialogUi->objectName().isEmpty()) - QSqlConnectionDialogUi->setObjectName(QString::fromUtf8("QSqlConnectionDialogUi")); + QSqlConnectionDialogUi->setObjectName(QStringLiteral("QSqlConnectionDialogUi")); QSqlConnectionDialogUi->resize(315, 302); vboxLayout = new QVBoxLayout(QSqlConnectionDialogUi); #ifndef Q_OS_MAC vboxLayout->setSpacing(6); #endif vboxLayout->setContentsMargins(8, 8, 8, 8); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); connGroupBox = new QGroupBox(QSqlConnectionDialogUi); - connGroupBox->setObjectName(QString::fromUtf8("connGroupBox")); + connGroupBox->setObjectName(QStringLiteral("connGroupBox")); gridLayout = new QGridLayout(connGroupBox); #ifndef Q_OS_MAC gridLayout->setSpacing(6); #endif gridLayout->setContentsMargins(8, 8, 8, 8); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); comboDriver = new QComboBox(connGroupBox); - comboDriver->setObjectName(QString::fromUtf8("comboDriver")); + comboDriver->setObjectName(QStringLiteral("comboDriver")); gridLayout->addWidget(comboDriver, 0, 1, 1, 1); textLabel4 = new QLabel(connGroupBox); - textLabel4->setObjectName(QString::fromUtf8("textLabel4")); + textLabel4->setObjectName(QStringLiteral("textLabel4")); gridLayout->addWidget(textLabel4, 2, 0, 1, 1); textLabel2 = new QLabel(connGroupBox); - textLabel2->setObjectName(QString::fromUtf8("textLabel2")); + textLabel2->setObjectName(QStringLiteral("textLabel2")); gridLayout->addWidget(textLabel2, 0, 0, 1, 1); editDatabase = new QLineEdit(connGroupBox); - editDatabase->setObjectName(QString::fromUtf8("editDatabase")); + editDatabase->setObjectName(QStringLiteral("editDatabase")); gridLayout->addWidget(editDatabase, 1, 1, 1, 1); portSpinBox = new QSpinBox(connGroupBox); - portSpinBox->setObjectName(QString::fromUtf8("portSpinBox")); + portSpinBox->setObjectName(QStringLiteral("portSpinBox")); portSpinBox->setMaximum(65535); portSpinBox->setMinimum(-1); portSpinBox->setValue(-1); @@ -104,38 +104,38 @@ public: gridLayout->addWidget(portSpinBox, 5, 1, 1, 1); textLabel3 = new QLabel(connGroupBox); - textLabel3->setObjectName(QString::fromUtf8("textLabel3")); + textLabel3->setObjectName(QStringLiteral("textLabel3")); gridLayout->addWidget(textLabel3, 1, 0, 1, 1); editPassword = new QLineEdit(connGroupBox); - editPassword->setObjectName(QString::fromUtf8("editPassword")); + editPassword->setObjectName(QStringLiteral("editPassword")); editPassword->setEchoMode(QLineEdit::Password); gridLayout->addWidget(editPassword, 3, 1, 1, 1); editUsername = new QLineEdit(connGroupBox); - editUsername->setObjectName(QString::fromUtf8("editUsername")); + editUsername->setObjectName(QStringLiteral("editUsername")); gridLayout->addWidget(editUsername, 2, 1, 1, 1); editHostname = new QLineEdit(connGroupBox); - editHostname->setObjectName(QString::fromUtf8("editHostname")); + editHostname->setObjectName(QStringLiteral("editHostname")); gridLayout->addWidget(editHostname, 4, 1, 1, 1); textLabel5 = new QLabel(connGroupBox); - textLabel5->setObjectName(QString::fromUtf8("textLabel5")); + textLabel5->setObjectName(QStringLiteral("textLabel5")); gridLayout->addWidget(textLabel5, 4, 0, 1, 1); textLabel5_2 = new QLabel(connGroupBox); - textLabel5_2->setObjectName(QString::fromUtf8("textLabel5_2")); + textLabel5_2->setObjectName(QStringLiteral("textLabel5_2")); gridLayout->addWidget(textLabel5_2, 5, 0, 1, 1); textLabel4_2 = new QLabel(connGroupBox); - textLabel4_2->setObjectName(QString::fromUtf8("textLabel4_2")); + textLabel4_2->setObjectName(QStringLiteral("textLabel4_2")); gridLayout->addWidget(textLabel4_2, 3, 0, 1, 1); @@ -147,13 +147,13 @@ public: hboxLayout->setSpacing(6); #endif hboxLayout->setContentsMargins(0, 0, 0, 0); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName(QStringLiteral("hboxLayout")); spacerItem = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); hboxLayout->addItem(spacerItem); dbCheckBox = new QCheckBox(QSqlConnectionDialogUi); - dbCheckBox->setObjectName(QString::fromUtf8("dbCheckBox")); + dbCheckBox->setObjectName(QStringLiteral("dbCheckBox")); hboxLayout->addWidget(dbCheckBox); @@ -165,19 +165,19 @@ public: hboxLayout1->setSpacing(6); #endif hboxLayout1->setContentsMargins(0, 0, 0, 0); - hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1")); + hboxLayout1->setObjectName(QStringLiteral("hboxLayout1")); spacerItem1 = new QSpacerItem(20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); hboxLayout1->addItem(spacerItem1); okButton = new QPushButton(QSqlConnectionDialogUi); - okButton->setObjectName(QString::fromUtf8("okButton")); + okButton->setObjectName(QStringLiteral("okButton")); okButton->setDefault(true); hboxLayout1->addWidget(okButton); cancelButton = new QPushButton(QSqlConnectionDialogUi); - cancelButton->setObjectName(QString::fromUtf8("cancelButton")); + cancelButton->setObjectName(QStringLiteral("cancelButton")); hboxLayout1->addWidget(cancelButton); diff --git a/tests/auto/tools/uic/baseline/qtgradientdialog.ui.h b/tests/auto/tools/uic/baseline/qtgradientdialog.ui.h index d9c27a769ec..45660d9224e 100644 --- a/tests/auto/tools/uic/baseline/qtgradientdialog.ui.h +++ b/tests/auto/tools/uic/baseline/qtgradientdialog.ui.h @@ -75,12 +75,12 @@ public: void setupUi(QDialog *QtGradientDialog) { if (QtGradientDialog->objectName().isEmpty()) - QtGradientDialog->setObjectName(QString::fromUtf8("QtGradientDialog")); + QtGradientDialog->setObjectName(QStringLiteral("QtGradientDialog")); QtGradientDialog->resize(178, 81); vboxLayout = new QVBoxLayout(QtGradientDialog); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); gradientEditor = new QtGradientEditor(QtGradientDialog); - gradientEditor->setObjectName(QString::fromUtf8("gradientEditor")); + gradientEditor->setObjectName(QStringLiteral("gradientEditor")); QSizePolicy sizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); @@ -90,7 +90,7 @@ public: vboxLayout->addWidget(gradientEditor); buttonBox = new QDialogButtonBox(QtGradientDialog); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName(QStringLiteral("buttonBox")); buttonBox->setOrientation(Qt::Horizontal); buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok); diff --git a/tests/auto/tools/uic/baseline/qtgradienteditor.ui.h b/tests/auto/tools/uic/baseline/qtgradienteditor.ui.h index c344d006b56..d94670d2ff9 100644 --- a/tests/auto/tools/uic/baseline/qtgradienteditor.ui.h +++ b/tests/auto/tools/uic/baseline/qtgradienteditor.ui.h @@ -162,10 +162,10 @@ public: void setupUi(QWidget *QtGradientEditor) { if (QtGradientEditor->objectName().isEmpty()) - QtGradientEditor->setObjectName(QString::fromUtf8("QtGradientEditor")); + QtGradientEditor->setObjectName(QStringLiteral("QtGradientEditor")); QtGradientEditor->resize(364, 518); frame = new QFrame(QtGradientEditor); - frame->setObjectName(QString::fromUtf8("frame")); + frame->setObjectName(QStringLiteral("frame")); frame->setGeometry(QRect(10, 69, 193, 150)); QSizePolicy sizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); sizePolicy.setHorizontalStretch(0); @@ -176,73 +176,73 @@ public: frame->setFrameShadow(QFrame::Raised); vboxLayout = new QVBoxLayout(frame); vboxLayout->setSpacing(6); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); vboxLayout->setContentsMargins(0, 0, 0, 0); gradientWidget = new QtGradientWidget(frame); - gradientWidget->setObjectName(QString::fromUtf8("gradientWidget")); + gradientWidget->setObjectName(QStringLiteral("gradientWidget")); sizePolicy.setHeightForWidth(gradientWidget->sizePolicy().hasHeightForWidth()); gradientWidget->setSizePolicy(sizePolicy); vboxLayout->addWidget(gradientWidget); label1 = new QLabel(QtGradientEditor); - label1->setObjectName(QString::fromUtf8("label1")); + label1->setObjectName(QStringLiteral("label1")); label1->setGeometry(QRect(209, 69, 64, 23)); spinBox1 = new QDoubleSpinBox(QtGradientEditor); - spinBox1->setObjectName(QString::fromUtf8("spinBox1")); + spinBox1->setObjectName(QStringLiteral("spinBox1")); spinBox1->setGeometry(QRect(279, 69, 73, 23)); spinBox1->setKeyboardTracking(false); spinBox1->setDecimals(3); spinBox1->setMaximum(1); spinBox1->setSingleStep(0.01); label2 = new QLabel(QtGradientEditor); - label2->setObjectName(QString::fromUtf8("label2")); + label2->setObjectName(QStringLiteral("label2")); label2->setGeometry(QRect(209, 99, 64, 23)); spinBox2 = new QDoubleSpinBox(QtGradientEditor); - spinBox2->setObjectName(QString::fromUtf8("spinBox2")); + spinBox2->setObjectName(QStringLiteral("spinBox2")); spinBox2->setGeometry(QRect(279, 99, 73, 23)); spinBox2->setKeyboardTracking(false); spinBox2->setDecimals(3); spinBox2->setMaximum(1); spinBox2->setSingleStep(0.01); label3 = new QLabel(QtGradientEditor); - label3->setObjectName(QString::fromUtf8("label3")); + label3->setObjectName(QStringLiteral("label3")); label3->setGeometry(QRect(209, 129, 64, 23)); spinBox3 = new QDoubleSpinBox(QtGradientEditor); - spinBox3->setObjectName(QString::fromUtf8("spinBox3")); + spinBox3->setObjectName(QStringLiteral("spinBox3")); spinBox3->setGeometry(QRect(279, 129, 73, 23)); spinBox3->setKeyboardTracking(false); spinBox3->setDecimals(3); spinBox3->setMaximum(1); spinBox3->setSingleStep(0.01); label4 = new QLabel(QtGradientEditor); - label4->setObjectName(QString::fromUtf8("label4")); + label4->setObjectName(QStringLiteral("label4")); label4->setGeometry(QRect(209, 159, 64, 23)); spinBox4 = new QDoubleSpinBox(QtGradientEditor); - spinBox4->setObjectName(QString::fromUtf8("spinBox4")); + spinBox4->setObjectName(QStringLiteral("spinBox4")); spinBox4->setGeometry(QRect(279, 159, 73, 23)); spinBox4->setKeyboardTracking(false); spinBox4->setDecimals(3); spinBox4->setMaximum(1); spinBox4->setSingleStep(0.01); label5 = new QLabel(QtGradientEditor); - label5->setObjectName(QString::fromUtf8("label5")); + label5->setObjectName(QStringLiteral("label5")); label5->setGeometry(QRect(209, 189, 64, 23)); spinBox5 = new QDoubleSpinBox(QtGradientEditor); - spinBox5->setObjectName(QString::fromUtf8("spinBox5")); + spinBox5->setObjectName(QStringLiteral("spinBox5")); spinBox5->setGeometry(QRect(279, 189, 73, 23)); spinBox5->setKeyboardTracking(false); spinBox5->setDecimals(3); spinBox5->setMaximum(1); spinBox5->setSingleStep(0.01); gradientStopsWidget = new QtGradientStopsWidget(QtGradientEditor); - gradientStopsWidget->setObjectName(QString::fromUtf8("gradientStopsWidget")); + gradientStopsWidget->setObjectName(QStringLiteral("gradientStopsWidget")); gradientStopsWidget->setGeometry(QRect(10, 225, 193, 67)); zoomLabel = new QLabel(QtGradientEditor); - zoomLabel->setObjectName(QString::fromUtf8("zoomLabel")); + zoomLabel->setObjectName(QStringLiteral("zoomLabel")); zoomLabel->setGeometry(QRect(209, 231, 64, 23)); zoomAllButton = new QToolButton(QtGradientEditor); - zoomAllButton->setObjectName(QString::fromUtf8("zoomAllButton")); + zoomAllButton->setObjectName(QStringLiteral("zoomAllButton")); zoomAllButton->setGeometry(QRect(279, 260, 72, 26)); QSizePolicy sizePolicy1(QSizePolicy::Preferred, QSizePolicy::Fixed); sizePolicy1.setHorizontalStretch(0); @@ -250,15 +250,15 @@ public: sizePolicy1.setHeightForWidth(zoomAllButton->sizePolicy().hasHeightForWidth()); zoomAllButton->setSizePolicy(sizePolicy1); positionLabel = new QLabel(QtGradientEditor); - positionLabel->setObjectName(QString::fromUtf8("positionLabel")); + positionLabel->setObjectName(QStringLiteral("positionLabel")); positionLabel->setGeometry(QRect(209, 304, 64, 23)); hLabel = new QLabel(QtGradientEditor); - hLabel->setObjectName(QString::fromUtf8("hLabel")); + hLabel->setObjectName(QStringLiteral("hLabel")); hLabel->setGeometry(QRect(10, 335, 32, 18)); sizePolicy1.setHeightForWidth(hLabel->sizePolicy().hasHeightForWidth()); hLabel->setSizePolicy(sizePolicy1); frame_2 = new QFrame(QtGradientEditor); - frame_2->setObjectName(QString::fromUtf8("frame_2")); + frame_2->setObjectName(QStringLiteral("frame_2")); frame_2->setGeometry(QRect(48, 333, 155, 23)); QSizePolicy sizePolicy2(QSizePolicy::Ignored, QSizePolicy::Preferred); sizePolicy2.setHorizontalStretch(0); @@ -268,10 +268,10 @@ public: frame_2->setFrameShape(QFrame::StyledPanel); frame_2->setFrameShadow(QFrame::Raised); hboxLayout = new QHBoxLayout(frame_2); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName(QStringLiteral("hboxLayout")); hboxLayout->setContentsMargins(0, 0, 0, 0); hueColorLine = new QtColorLine(frame_2); - hueColorLine->setObjectName(QString::fromUtf8("hueColorLine")); + hueColorLine->setObjectName(QStringLiteral("hueColorLine")); QSizePolicy sizePolicy3(QSizePolicy::Expanding, QSizePolicy::Preferred); sizePolicy3.setHorizontalStretch(0); sizePolicy3.setVerticalStretch(0); @@ -281,99 +281,99 @@ public: hboxLayout->addWidget(hueColorLine); hueLabel = new QLabel(QtGradientEditor); - hueLabel->setObjectName(QString::fromUtf8("hueLabel")); + hueLabel->setObjectName(QStringLiteral("hueLabel")); hueLabel->setGeometry(QRect(209, 335, 64, 18)); sizePolicy1.setHeightForWidth(hueLabel->sizePolicy().hasHeightForWidth()); hueLabel->setSizePolicy(sizePolicy1); sLabel = new QLabel(QtGradientEditor); - sLabel->setObjectName(QString::fromUtf8("sLabel")); + sLabel->setObjectName(QStringLiteral("sLabel")); sLabel->setGeometry(QRect(10, 364, 32, 18)); sizePolicy1.setHeightForWidth(sLabel->sizePolicy().hasHeightForWidth()); sLabel->setSizePolicy(sizePolicy1); frame_5 = new QFrame(QtGradientEditor); - frame_5->setObjectName(QString::fromUtf8("frame_5")); + frame_5->setObjectName(QStringLiteral("frame_5")); frame_5->setGeometry(QRect(48, 362, 155, 23)); sizePolicy2.setHeightForWidth(frame_5->sizePolicy().hasHeightForWidth()); frame_5->setSizePolicy(sizePolicy2); frame_5->setFrameShape(QFrame::StyledPanel); frame_5->setFrameShadow(QFrame::Raised); hboxLayout1 = new QHBoxLayout(frame_5); - hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1")); + hboxLayout1->setObjectName(QStringLiteral("hboxLayout1")); hboxLayout1->setContentsMargins(0, 0, 0, 0); saturationColorLine = new QtColorLine(frame_5); - saturationColorLine->setObjectName(QString::fromUtf8("saturationColorLine")); + saturationColorLine->setObjectName(QStringLiteral("saturationColorLine")); sizePolicy3.setHeightForWidth(saturationColorLine->sizePolicy().hasHeightForWidth()); saturationColorLine->setSizePolicy(sizePolicy3); hboxLayout1->addWidget(saturationColorLine); saturationLabel = new QLabel(QtGradientEditor); - saturationLabel->setObjectName(QString::fromUtf8("saturationLabel")); + saturationLabel->setObjectName(QStringLiteral("saturationLabel")); saturationLabel->setGeometry(QRect(209, 364, 64, 18)); sizePolicy1.setHeightForWidth(saturationLabel->sizePolicy().hasHeightForWidth()); saturationLabel->setSizePolicy(sizePolicy1); vLabel = new QLabel(QtGradientEditor); - vLabel->setObjectName(QString::fromUtf8("vLabel")); + vLabel->setObjectName(QStringLiteral("vLabel")); vLabel->setGeometry(QRect(10, 393, 32, 18)); sizePolicy1.setHeightForWidth(vLabel->sizePolicy().hasHeightForWidth()); vLabel->setSizePolicy(sizePolicy1); frame_3 = new QFrame(QtGradientEditor); - frame_3->setObjectName(QString::fromUtf8("frame_3")); + frame_3->setObjectName(QStringLiteral("frame_3")); frame_3->setGeometry(QRect(48, 391, 155, 23)); sizePolicy2.setHeightForWidth(frame_3->sizePolicy().hasHeightForWidth()); frame_3->setSizePolicy(sizePolicy2); frame_3->setFrameShape(QFrame::StyledPanel); frame_3->setFrameShadow(QFrame::Raised); hboxLayout2 = new QHBoxLayout(frame_3); - hboxLayout2->setObjectName(QString::fromUtf8("hboxLayout2")); + hboxLayout2->setObjectName(QStringLiteral("hboxLayout2")); hboxLayout2->setContentsMargins(0, 0, 0, 0); valueColorLine = new QtColorLine(frame_3); - valueColorLine->setObjectName(QString::fromUtf8("valueColorLine")); + valueColorLine->setObjectName(QStringLiteral("valueColorLine")); sizePolicy3.setHeightForWidth(valueColorLine->sizePolicy().hasHeightForWidth()); valueColorLine->setSizePolicy(sizePolicy3); hboxLayout2->addWidget(valueColorLine); valueLabel = new QLabel(QtGradientEditor); - valueLabel->setObjectName(QString::fromUtf8("valueLabel")); + valueLabel->setObjectName(QStringLiteral("valueLabel")); valueLabel->setGeometry(QRect(209, 393, 64, 18)); sizePolicy1.setHeightForWidth(valueLabel->sizePolicy().hasHeightForWidth()); valueLabel->setSizePolicy(sizePolicy1); aLabel = new QLabel(QtGradientEditor); - aLabel->setObjectName(QString::fromUtf8("aLabel")); + aLabel->setObjectName(QStringLiteral("aLabel")); aLabel->setGeometry(QRect(10, 422, 32, 18)); sizePolicy1.setHeightForWidth(aLabel->sizePolicy().hasHeightForWidth()); aLabel->setSizePolicy(sizePolicy1); frame_4 = new QFrame(QtGradientEditor); - frame_4->setObjectName(QString::fromUtf8("frame_4")); + frame_4->setObjectName(QStringLiteral("frame_4")); frame_4->setGeometry(QRect(48, 420, 155, 23)); sizePolicy2.setHeightForWidth(frame_4->sizePolicy().hasHeightForWidth()); frame_4->setSizePolicy(sizePolicy2); frame_4->setFrameShape(QFrame::StyledPanel); frame_4->setFrameShadow(QFrame::Raised); hboxLayout3 = new QHBoxLayout(frame_4); - hboxLayout3->setObjectName(QString::fromUtf8("hboxLayout3")); + hboxLayout3->setObjectName(QStringLiteral("hboxLayout3")); hboxLayout3->setContentsMargins(0, 0, 0, 0); alphaColorLine = new QtColorLine(frame_4); - alphaColorLine->setObjectName(QString::fromUtf8("alphaColorLine")); + alphaColorLine->setObjectName(QStringLiteral("alphaColorLine")); sizePolicy3.setHeightForWidth(alphaColorLine->sizePolicy().hasHeightForWidth()); alphaColorLine->setSizePolicy(sizePolicy3); hboxLayout3->addWidget(alphaColorLine); alphaLabel = new QLabel(QtGradientEditor); - alphaLabel->setObjectName(QString::fromUtf8("alphaLabel")); + alphaLabel->setObjectName(QStringLiteral("alphaLabel")); alphaLabel->setGeometry(QRect(209, 422, 64, 18)); sizePolicy1.setHeightForWidth(alphaLabel->sizePolicy().hasHeightForWidth()); alphaLabel->setSizePolicy(sizePolicy1); typeComboBox = new QComboBox(QtGradientEditor); - typeComboBox->setObjectName(QString::fromUtf8("typeComboBox")); + typeComboBox->setObjectName(QStringLiteral("typeComboBox")); typeComboBox->setGeometry(QRect(10, 40, 79, 22)); spreadComboBox = new QComboBox(QtGradientEditor); - spreadComboBox->setObjectName(QString::fromUtf8("spreadComboBox")); + spreadComboBox->setObjectName(QStringLiteral("spreadComboBox")); spreadComboBox->setGeometry(QRect(96, 40, 72, 22)); colorLabel = new QLabel(QtGradientEditor); - colorLabel->setObjectName(QString::fromUtf8("colorLabel")); + colorLabel->setObjectName(QStringLiteral("colorLabel")); colorLabel->setGeometry(QRect(10, 298, 32, 29)); QSizePolicy sizePolicy4(QSizePolicy::Fixed, QSizePolicy::Preferred); sizePolicy4.setHorizontalStretch(0); @@ -381,10 +381,10 @@ public: sizePolicy4.setHeightForWidth(colorLabel->sizePolicy().hasHeightForWidth()); colorLabel->setSizePolicy(sizePolicy4); colorButton = new QtColorButton(QtGradientEditor); - colorButton->setObjectName(QString::fromUtf8("colorButton")); + colorButton->setObjectName(QStringLiteral("colorButton")); colorButton->setGeometry(QRect(48, 300, 26, 25)); hsvRadioButton = new QRadioButton(QtGradientEditor); - hsvRadioButton->setObjectName(QString::fromUtf8("hsvRadioButton")); + hsvRadioButton->setObjectName(QStringLiteral("hsvRadioButton")); hsvRadioButton->setGeometry(QRect(80, 301, 49, 23)); QSizePolicy sizePolicy5(QSizePolicy::Fixed, QSizePolicy::Fixed); sizePolicy5.setHorizontalStretch(0); @@ -393,18 +393,18 @@ public: hsvRadioButton->setSizePolicy(sizePolicy5); hsvRadioButton->setChecked(true); rgbRadioButton = new QRadioButton(QtGradientEditor); - rgbRadioButton->setObjectName(QString::fromUtf8("rgbRadioButton")); + rgbRadioButton->setObjectName(QStringLiteral("rgbRadioButton")); rgbRadioButton->setGeometry(QRect(135, 301, 49, 23)); sizePolicy5.setHeightForWidth(rgbRadioButton->sizePolicy().hasHeightForWidth()); rgbRadioButton->setSizePolicy(sizePolicy5); positionWidget = new QWidget(QtGradientEditor); - positionWidget->setObjectName(QString::fromUtf8("positionWidget")); + positionWidget->setObjectName(QStringLiteral("positionWidget")); positionWidget->setGeometry(QRect(279, 304, 73, 23)); vboxLayout1 = new QVBoxLayout(positionWidget); - vboxLayout1->setObjectName(QString::fromUtf8("vboxLayout1")); + vboxLayout1->setObjectName(QStringLiteral("vboxLayout1")); vboxLayout1->setContentsMargins(0, 0, 0, 0); positionSpinBox = new QDoubleSpinBox(positionWidget); - positionSpinBox->setObjectName(QString::fromUtf8("positionSpinBox")); + positionSpinBox->setObjectName(QStringLiteral("positionSpinBox")); positionSpinBox->setKeyboardTracking(false); positionSpinBox->setDecimals(3); positionSpinBox->setMinimum(0); @@ -415,65 +415,65 @@ public: vboxLayout1->addWidget(positionSpinBox); hueWidget = new QWidget(QtGradientEditor); - hueWidget->setObjectName(QString::fromUtf8("hueWidget")); + hueWidget->setObjectName(QStringLiteral("hueWidget")); hueWidget->setGeometry(QRect(279, 333, 73, 23)); vboxLayout2 = new QVBoxLayout(hueWidget); - vboxLayout2->setObjectName(QString::fromUtf8("vboxLayout2")); + vboxLayout2->setObjectName(QStringLiteral("vboxLayout2")); vboxLayout2->setContentsMargins(0, 0, 0, 0); hueSpinBox = new QSpinBox(hueWidget); - hueSpinBox->setObjectName(QString::fromUtf8("hueSpinBox")); + hueSpinBox->setObjectName(QStringLiteral("hueSpinBox")); hueSpinBox->setKeyboardTracking(false); hueSpinBox->setMaximum(359); vboxLayout2->addWidget(hueSpinBox); saturationWidget = new QWidget(QtGradientEditor); - saturationWidget->setObjectName(QString::fromUtf8("saturationWidget")); + saturationWidget->setObjectName(QStringLiteral("saturationWidget")); saturationWidget->setGeometry(QRect(279, 362, 73, 23)); vboxLayout3 = new QVBoxLayout(saturationWidget); - vboxLayout3->setObjectName(QString::fromUtf8("vboxLayout3")); + vboxLayout3->setObjectName(QStringLiteral("vboxLayout3")); vboxLayout3->setContentsMargins(0, 0, 0, 0); saturationSpinBox = new QSpinBox(saturationWidget); - saturationSpinBox->setObjectName(QString::fromUtf8("saturationSpinBox")); + saturationSpinBox->setObjectName(QStringLiteral("saturationSpinBox")); saturationSpinBox->setKeyboardTracking(false); saturationSpinBox->setMaximum(255); vboxLayout3->addWidget(saturationSpinBox); valueWidget = new QWidget(QtGradientEditor); - valueWidget->setObjectName(QString::fromUtf8("valueWidget")); + valueWidget->setObjectName(QStringLiteral("valueWidget")); valueWidget->setGeometry(QRect(279, 391, 73, 23)); vboxLayout4 = new QVBoxLayout(valueWidget); - vboxLayout4->setObjectName(QString::fromUtf8("vboxLayout4")); + vboxLayout4->setObjectName(QStringLiteral("vboxLayout4")); vboxLayout4->setContentsMargins(0, 0, 0, 0); valueSpinBox = new QSpinBox(valueWidget); - valueSpinBox->setObjectName(QString::fromUtf8("valueSpinBox")); + valueSpinBox->setObjectName(QStringLiteral("valueSpinBox")); valueSpinBox->setKeyboardTracking(false); valueSpinBox->setMaximum(255); vboxLayout4->addWidget(valueSpinBox); alphaWidget = new QWidget(QtGradientEditor); - alphaWidget->setObjectName(QString::fromUtf8("alphaWidget")); + alphaWidget->setObjectName(QStringLiteral("alphaWidget")); alphaWidget->setGeometry(QRect(279, 420, 73, 23)); vboxLayout5 = new QVBoxLayout(alphaWidget); - vboxLayout5->setObjectName(QString::fromUtf8("vboxLayout5")); + vboxLayout5->setObjectName(QStringLiteral("vboxLayout5")); vboxLayout5->setContentsMargins(0, 0, 0, 0); alphaSpinBox = new QSpinBox(alphaWidget); - alphaSpinBox->setObjectName(QString::fromUtf8("alphaSpinBox")); + alphaSpinBox->setObjectName(QStringLiteral("alphaSpinBox")); alphaSpinBox->setKeyboardTracking(false); alphaSpinBox->setMaximum(255); vboxLayout5->addWidget(alphaSpinBox); zoomWidget = new QWidget(QtGradientEditor); - zoomWidget->setObjectName(QString::fromUtf8("zoomWidget")); + zoomWidget->setObjectName(QStringLiteral("zoomWidget")); zoomWidget->setGeometry(QRect(279, 231, 73, 23)); vboxLayout6 = new QVBoxLayout(zoomWidget); - vboxLayout6->setObjectName(QString::fromUtf8("vboxLayout6")); + vboxLayout6->setObjectName(QStringLiteral("vboxLayout6")); vboxLayout6->setContentsMargins(0, 0, 0, 0); zoomSpinBox = new QSpinBox(zoomWidget); - zoomSpinBox->setObjectName(QString::fromUtf8("zoomSpinBox")); + zoomSpinBox->setObjectName(QStringLiteral("zoomSpinBox")); zoomSpinBox->setKeyboardTracking(false); zoomSpinBox->setMinimum(100); zoomSpinBox->setMaximum(10000); @@ -483,33 +483,33 @@ public: vboxLayout6->addWidget(zoomSpinBox); line1Widget = new QWidget(QtGradientEditor); - line1Widget->setObjectName(QString::fromUtf8("line1Widget")); + line1Widget->setObjectName(QStringLiteral("line1Widget")); line1Widget->setGeometry(QRect(209, 219, 143, 16)); vboxLayout7 = new QVBoxLayout(line1Widget); - vboxLayout7->setObjectName(QString::fromUtf8("vboxLayout7")); + vboxLayout7->setObjectName(QStringLiteral("vboxLayout7")); vboxLayout7->setContentsMargins(0, 0, 0, 0); line1 = new QFrame(line1Widget); - line1->setObjectName(QString::fromUtf8("line1")); + line1->setObjectName(QStringLiteral("line1")); line1->setFrameShape(QFrame::HLine); line1->setFrameShadow(QFrame::Sunken); vboxLayout7->addWidget(line1); line2Widget = new QWidget(QtGradientEditor); - line2Widget->setObjectName(QString::fromUtf8("line2Widget")); + line2Widget->setObjectName(QStringLiteral("line2Widget")); line2Widget->setGeometry(QRect(209, 292, 143, 16)); vboxLayout8 = new QVBoxLayout(line2Widget); - vboxLayout8->setObjectName(QString::fromUtf8("vboxLayout8")); + vboxLayout8->setObjectName(QStringLiteral("vboxLayout8")); vboxLayout8->setContentsMargins(0, 0, 0, 0); line2 = new QFrame(line2Widget); - line2->setObjectName(QString::fromUtf8("line2")); + line2->setObjectName(QStringLiteral("line2")); line2->setFrameShape(QFrame::HLine); line2->setFrameShadow(QFrame::Sunken); vboxLayout8->addWidget(line2); zoomButtonsWidget = new QWidget(QtGradientEditor); - zoomButtonsWidget->setObjectName(QString::fromUtf8("zoomButtonsWidget")); + zoomButtonsWidget->setObjectName(QStringLiteral("zoomButtonsWidget")); zoomButtonsWidget->setGeometry(QRect(209, 260, 64, 26)); QSizePolicy sizePolicy6(QSizePolicy::Maximum, QSizePolicy::Preferred); sizePolicy6.setHorizontalStretch(0); @@ -517,15 +517,15 @@ public: sizePolicy6.setHeightForWidth(zoomButtonsWidget->sizePolicy().hasHeightForWidth()); zoomButtonsWidget->setSizePolicy(sizePolicy6); hboxLayout4 = new QHBoxLayout(zoomButtonsWidget); - hboxLayout4->setObjectName(QString::fromUtf8("hboxLayout4")); + hboxLayout4->setObjectName(QStringLiteral("hboxLayout4")); hboxLayout4->setContentsMargins(0, 0, 0, 0); zoomInButton = new QToolButton(zoomButtonsWidget); - zoomInButton->setObjectName(QString::fromUtf8("zoomInButton")); + zoomInButton->setObjectName(QStringLiteral("zoomInButton")); hboxLayout4->addWidget(zoomInButton); zoomOutButton = new QToolButton(zoomButtonsWidget); - zoomOutButton->setObjectName(QString::fromUtf8("zoomOutButton")); + zoomOutButton->setObjectName(QStringLiteral("zoomOutButton")); hboxLayout4->addWidget(zoomOutButton); @@ -534,7 +534,7 @@ public: hboxLayout4->addItem(spacerItem); detailsButton = new QToolButton(QtGradientEditor); - detailsButton->setObjectName(QString::fromUtf8("detailsButton")); + detailsButton->setObjectName(QStringLiteral("detailsButton")); detailsButton->setGeometry(QRect(176, 40, 25, 22)); QSizePolicy sizePolicy7(QSizePolicy::Fixed, QSizePolicy::Ignored); sizePolicy7.setHorizontalStretch(0); @@ -544,32 +544,32 @@ public: detailsButton->setCheckable(true); detailsButton->setAutoRaise(true); linearButton = new QToolButton(QtGradientEditor); - linearButton->setObjectName(QString::fromUtf8("linearButton")); + linearButton->setObjectName(QStringLiteral("linearButton")); linearButton->setGeometry(QRect(10, 10, 30, 26)); linearButton->setCheckable(true); linearButton->setAutoRaise(true); radialButton = new QToolButton(QtGradientEditor); - radialButton->setObjectName(QString::fromUtf8("radialButton")); + radialButton->setObjectName(QStringLiteral("radialButton")); radialButton->setGeometry(QRect(40, 10, 30, 26)); radialButton->setCheckable(true); radialButton->setAutoRaise(true); conicalButton = new QToolButton(QtGradientEditor); - conicalButton->setObjectName(QString::fromUtf8("conicalButton")); + conicalButton->setObjectName(QStringLiteral("conicalButton")); conicalButton->setGeometry(QRect(70, 10, 30, 26)); conicalButton->setCheckable(true); conicalButton->setAutoRaise(true); padButton = new QToolButton(QtGradientEditor); - padButton->setObjectName(QString::fromUtf8("padButton")); + padButton->setObjectName(QStringLiteral("padButton")); padButton->setGeometry(QRect(110, 10, 30, 26)); padButton->setCheckable(true); padButton->setAutoRaise(true); repeatButton = new QToolButton(QtGradientEditor); - repeatButton->setObjectName(QString::fromUtf8("repeatButton")); + repeatButton->setObjectName(QStringLiteral("repeatButton")); repeatButton->setGeometry(QRect(140, 10, 30, 26)); repeatButton->setCheckable(true); repeatButton->setAutoRaise(true); reflectButton = new QToolButton(QtGradientEditor); - reflectButton->setObjectName(QString::fromUtf8("reflectButton")); + reflectButton->setObjectName(QStringLiteral("reflectButton")); reflectButton->setGeometry(QRect(170, 10, 30, 26)); reflectButton->setCheckable(true); reflectButton->setAutoRaise(true); diff --git a/tests/auto/tools/uic/baseline/qtgradientview.ui.h b/tests/auto/tools/uic/baseline/qtgradientview.ui.h index 52512c4a5bb..62136c38908 100644 --- a/tests/auto/tools/uic/baseline/qtgradientview.ui.h +++ b/tests/auto/tools/uic/baseline/qtgradientview.ui.h @@ -39,15 +39,15 @@ public: void setupUi(QWidget *QtGradientView) { if (QtGradientView->objectName().isEmpty()) - QtGradientView->setObjectName(QString::fromUtf8("QtGradientView")); + QtGradientView->setObjectName(QStringLiteral("QtGradientView")); QtGradientView->resize(484, 228); vboxLayout = new QVBoxLayout(QtGradientView); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); vboxLayout->setContentsMargins(0, 0, 0, 0); hboxLayout = new QHBoxLayout(); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName(QStringLiteral("hboxLayout")); newButton = new QToolButton(QtGradientView); - newButton->setObjectName(QString::fromUtf8("newButton")); + newButton->setObjectName(QStringLiteral("newButton")); QSizePolicy sizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); @@ -59,7 +59,7 @@ public: hboxLayout->addWidget(newButton); editButton = new QToolButton(QtGradientView); - editButton->setObjectName(QString::fromUtf8("editButton")); + editButton->setObjectName(QStringLiteral("editButton")); sizePolicy.setHeightForWidth(editButton->sizePolicy().hasHeightForWidth()); editButton->setSizePolicy(sizePolicy); editButton->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); @@ -68,7 +68,7 @@ public: hboxLayout->addWidget(editButton); renameButton = new QToolButton(QtGradientView); - renameButton->setObjectName(QString::fromUtf8("renameButton")); + renameButton->setObjectName(QStringLiteral("renameButton")); sizePolicy.setHeightForWidth(renameButton->sizePolicy().hasHeightForWidth()); renameButton->setSizePolicy(sizePolicy); renameButton->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); @@ -77,7 +77,7 @@ public: hboxLayout->addWidget(renameButton); removeButton = new QToolButton(QtGradientView); - removeButton->setObjectName(QString::fromUtf8("removeButton")); + removeButton->setObjectName(QStringLiteral("removeButton")); sizePolicy.setHeightForWidth(removeButton->sizePolicy().hasHeightForWidth()); removeButton->setSizePolicy(sizePolicy); removeButton->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); @@ -93,7 +93,7 @@ public: vboxLayout->addLayout(hboxLayout); listWidget = new QListWidget(QtGradientView); - listWidget->setObjectName(QString::fromUtf8("listWidget")); + listWidget->setObjectName(QStringLiteral("listWidget")); vboxLayout->addWidget(listWidget); diff --git a/tests/auto/tools/uic/baseline/qtgradientviewdialog.ui.h b/tests/auto/tools/uic/baseline/qtgradientviewdialog.ui.h index d93dfd605c2..cc7912d4c2e 100644 --- a/tests/auto/tools/uic/baseline/qtgradientviewdialog.ui.h +++ b/tests/auto/tools/uic/baseline/qtgradientviewdialog.ui.h @@ -75,12 +75,12 @@ public: void setupUi(QDialog *QtGradientViewDialog) { if (QtGradientViewDialog->objectName().isEmpty()) - QtGradientViewDialog->setObjectName(QString::fromUtf8("QtGradientViewDialog")); + QtGradientViewDialog->setObjectName(QStringLiteral("QtGradientViewDialog")); QtGradientViewDialog->resize(178, 72); vboxLayout = new QVBoxLayout(QtGradientViewDialog); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); gradientView = new QtGradientView(QtGradientViewDialog); - gradientView->setObjectName(QString::fromUtf8("gradientView")); + gradientView->setObjectName(QStringLiteral("gradientView")); QSizePolicy sizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); @@ -90,7 +90,7 @@ public: vboxLayout->addWidget(gradientView); buttonBox = new QDialogButtonBox(QtGradientViewDialog); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName(QStringLiteral("buttonBox")); buttonBox->setOrientation(Qt::Horizontal); buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok); diff --git a/tests/auto/tools/uic/baseline/qtresourceeditordialog.ui.h b/tests/auto/tools/uic/baseline/qtresourceeditordialog.ui.h index b34f246c344..72cef5353a7 100644 --- a/tests/auto/tools/uic/baseline/qtresourceeditordialog.ui.h +++ b/tests/auto/tools/uic/baseline/qtresourceeditordialog.ui.h @@ -52,20 +52,20 @@ public: void setupUi(QDialog *QtResourceEditorDialog) { if (QtResourceEditorDialog->objectName().isEmpty()) - QtResourceEditorDialog->setObjectName(QString::fromUtf8("QtResourceEditorDialog")); + QtResourceEditorDialog->setObjectName(QStringLiteral("QtResourceEditorDialog")); QtResourceEditorDialog->resize(469, 317); verticalLayout = new QVBoxLayout(QtResourceEditorDialog); - verticalLayout->setObjectName(QString::fromUtf8("verticalLayout")); + verticalLayout->setObjectName(QStringLiteral("verticalLayout")); splitter = new QSplitter(QtResourceEditorDialog); - splitter->setObjectName(QString::fromUtf8("splitter")); + splitter->setObjectName(QStringLiteral("splitter")); splitter->setOrientation(Qt::Horizontal); layoutWidget = new QWidget(splitter); - layoutWidget->setObjectName(QString::fromUtf8("layoutWidget")); + layoutWidget->setObjectName(QStringLiteral("layoutWidget")); gridLayout = new QGridLayout(layoutWidget); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); gridLayout->setContentsMargins(0, 0, 0, 0); qrcFileList = new QListWidget(layoutWidget); - qrcFileList->setObjectName(QString::fromUtf8("qrcFileList")); + qrcFileList->setObjectName(QStringLiteral("qrcFileList")); QSizePolicy sizePolicy(QSizePolicy::Ignored, QSizePolicy::Expanding); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); @@ -75,12 +75,12 @@ public: gridLayout->addWidget(qrcFileList, 0, 0, 1, 4); newQrcButton = new QToolButton(layoutWidget); - newQrcButton->setObjectName(QString::fromUtf8("newQrcButton")); + newQrcButton->setObjectName(QStringLiteral("newQrcButton")); gridLayout->addWidget(newQrcButton, 1, 0, 1, 1); removeQrcButton = new QToolButton(layoutWidget); - removeQrcButton->setObjectName(QString::fromUtf8("removeQrcButton")); + removeQrcButton->setObjectName(QStringLiteral("removeQrcButton")); gridLayout->addWidget(removeQrcButton, 1, 2, 1, 1); @@ -89,33 +89,33 @@ public: gridLayout->addItem(spacerItem, 1, 3, 1, 1); importQrcButton = new QToolButton(layoutWidget); - importQrcButton->setObjectName(QString::fromUtf8("importQrcButton")); + importQrcButton->setObjectName(QStringLiteral("importQrcButton")); gridLayout->addWidget(importQrcButton, 1, 1, 1, 1); splitter->addWidget(layoutWidget); widget = new QWidget(splitter); - widget->setObjectName(QString::fromUtf8("widget")); + widget->setObjectName(QStringLiteral("widget")); gridLayout1 = new QGridLayout(widget); - gridLayout1->setObjectName(QString::fromUtf8("gridLayout1")); + gridLayout1->setObjectName(QStringLiteral("gridLayout1")); gridLayout1->setContentsMargins(0, 0, 0, 0); resourceTreeView = new QTreeView(widget); - resourceTreeView->setObjectName(QString::fromUtf8("resourceTreeView")); + resourceTreeView->setObjectName(QStringLiteral("resourceTreeView")); gridLayout1->addWidget(resourceTreeView, 0, 0, 1, 4); newResourceButton = new QToolButton(widget); - newResourceButton->setObjectName(QString::fromUtf8("newResourceButton")); + newResourceButton->setObjectName(QStringLiteral("newResourceButton")); gridLayout1->addWidget(newResourceButton, 1, 0, 1, 1); addResourceButton = new QToolButton(widget); - addResourceButton->setObjectName(QString::fromUtf8("addResourceButton")); + addResourceButton->setObjectName(QStringLiteral("addResourceButton")); gridLayout1->addWidget(addResourceButton, 1, 1, 1, 1); removeResourceButton = new QToolButton(widget); - removeResourceButton->setObjectName(QString::fromUtf8("removeResourceButton")); + removeResourceButton->setObjectName(QStringLiteral("removeResourceButton")); gridLayout1->addWidget(removeResourceButton, 1, 2, 1, 1); @@ -128,7 +128,7 @@ public: verticalLayout->addWidget(splitter); buttonBox = new QDialogButtonBox(QtResourceEditorDialog); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName(QStringLiteral("buttonBox")); buttonBox->setOrientation(Qt::Horizontal); buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok); diff --git a/tests/auto/tools/uic/baseline/qttoolbardialog.ui.h b/tests/auto/tools/uic/baseline/qttoolbardialog.ui.h index 463961452f7..5b6ec991b9f 100644 --- a/tests/auto/tools/uic/baseline/qttoolbardialog.ui.h +++ b/tests/auto/tools/uic/baseline/qttoolbardialog.ui.h @@ -53,21 +53,21 @@ public: void setupUi(QDialog *QtToolBarDialog) { if (QtToolBarDialog->objectName().isEmpty()) - QtToolBarDialog->setObjectName(QString::fromUtf8("QtToolBarDialog")); + QtToolBarDialog->setObjectName(QStringLiteral("QtToolBarDialog")); QtToolBarDialog->resize(583, 508); gridLayout = new QGridLayout(QtToolBarDialog); #ifndef Q_OS_MAC gridLayout->setSpacing(6); #endif gridLayout->setContentsMargins(8, 8, 8, 8); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); actionTree = new QTreeWidget(QtToolBarDialog); - actionTree->setObjectName(QString::fromUtf8("actionTree")); + actionTree->setObjectName(QStringLiteral("actionTree")); gridLayout->addWidget(actionTree, 1, 0, 3, 1); label = new QLabel(QtToolBarDialog); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); gridLayout->addWidget(label, 0, 0, 1, 1); @@ -76,24 +76,24 @@ public: hboxLayout->setSpacing(6); #endif hboxLayout->setContentsMargins(0, 0, 0, 0); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName(QStringLiteral("hboxLayout")); label_2 = new QLabel(QtToolBarDialog); - label_2->setObjectName(QString::fromUtf8("label_2")); + label_2->setObjectName(QStringLiteral("label_2")); hboxLayout->addWidget(label_2); newButton = new QToolButton(QtToolBarDialog); - newButton->setObjectName(QString::fromUtf8("newButton")); + newButton->setObjectName(QStringLiteral("newButton")); hboxLayout->addWidget(newButton); removeButton = new QToolButton(QtToolBarDialog); - removeButton->setObjectName(QString::fromUtf8("removeButton")); + removeButton->setObjectName(QStringLiteral("removeButton")); hboxLayout->addWidget(removeButton); renameButton = new QToolButton(QtToolBarDialog); - renameButton->setObjectName(QString::fromUtf8("renameButton")); + renameButton->setObjectName(QStringLiteral("renameButton")); hboxLayout->addWidget(renameButton); @@ -105,9 +105,9 @@ public: vboxLayout->setSpacing(6); #endif vboxLayout->setContentsMargins(0, 0, 0, 0); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); upButton = new QToolButton(QtToolBarDialog); - upButton->setObjectName(QString::fromUtf8("upButton")); + upButton->setObjectName(QStringLiteral("upButton")); QSizePolicy sizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); @@ -117,21 +117,21 @@ public: vboxLayout->addWidget(upButton); leftButton = new QToolButton(QtToolBarDialog); - leftButton->setObjectName(QString::fromUtf8("leftButton")); + leftButton->setObjectName(QStringLiteral("leftButton")); sizePolicy.setHeightForWidth(leftButton->sizePolicy().hasHeightForWidth()); leftButton->setSizePolicy(sizePolicy); vboxLayout->addWidget(leftButton); rightButton = new QToolButton(QtToolBarDialog); - rightButton->setObjectName(QString::fromUtf8("rightButton")); + rightButton->setObjectName(QStringLiteral("rightButton")); sizePolicy.setHeightForWidth(rightButton->sizePolicy().hasHeightForWidth()); rightButton->setSizePolicy(sizePolicy); vboxLayout->addWidget(rightButton); downButton = new QToolButton(QtToolBarDialog); - downButton->setObjectName(QString::fromUtf8("downButton")); + downButton->setObjectName(QStringLiteral("downButton")); sizePolicy.setHeightForWidth(downButton->sizePolicy().hasHeightForWidth()); downButton->setSizePolicy(sizePolicy); @@ -145,22 +145,22 @@ public: gridLayout->addLayout(vboxLayout, 3, 1, 1, 1); currentToolBarList = new QListWidget(QtToolBarDialog); - currentToolBarList->setObjectName(QString::fromUtf8("currentToolBarList")); + currentToolBarList->setObjectName(QStringLiteral("currentToolBarList")); gridLayout->addWidget(currentToolBarList, 3, 2, 1, 1); label_3 = new QLabel(QtToolBarDialog); - label_3->setObjectName(QString::fromUtf8("label_3")); + label_3->setObjectName(QStringLiteral("label_3")); gridLayout->addWidget(label_3, 2, 1, 1, 2); toolBarList = new QListWidget(QtToolBarDialog); - toolBarList->setObjectName(QString::fromUtf8("toolBarList")); + toolBarList->setObjectName(QStringLiteral("toolBarList")); gridLayout->addWidget(toolBarList, 1, 1, 1, 2); buttonBox = new QDialogButtonBox(QtToolBarDialog); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName(QStringLiteral("buttonBox")); buttonBox->setStandardButtons(QDialogButtonBox::Apply|QDialogButtonBox::Cancel|QDialogButtonBox::Ok|QDialogButtonBox::RestoreDefaults); gridLayout->addWidget(buttonBox, 5, 0, 1, 3); diff --git a/tests/auto/tools/uic/baseline/querywidget.ui.h b/tests/auto/tools/uic/baseline/querywidget.ui.h index c355f7c4f1f..5a2eef793bc 100644 --- a/tests/auto/tools/uic/baseline/querywidget.ui.h +++ b/tests/auto/tools/uic/baseline/querywidget.ui.h @@ -50,13 +50,13 @@ public: void setupUi(QMainWindow *QueryWidget) { if (QueryWidget->objectName().isEmpty()) - QueryWidget->setObjectName(QString::fromUtf8("QueryWidget")); + QueryWidget->setObjectName(QStringLiteral("QueryWidget")); QueryWidget->resize(545, 531); centralwidget = new QWidget(QueryWidget); - centralwidget->setObjectName(QString::fromUtf8("centralwidget")); + centralwidget->setObjectName(QStringLiteral("centralwidget")); centralwidget->setGeometry(QRect(0, 29, 545, 480)); verticalLayout = new QVBoxLayout(centralwidget); - verticalLayout->setObjectName(QString::fromUtf8("verticalLayout")); + verticalLayout->setObjectName(QStringLiteral("verticalLayout")); vboxLayout = new QVBoxLayout(); #ifndef Q_OS_MAC vboxLayout->setSpacing(6); @@ -64,12 +64,12 @@ public: #ifndef Q_OS_MAC vboxLayout->setContentsMargins(0, 0, 0, 0); #endif - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); inputGroupBox = new QGroupBox(centralwidget); - inputGroupBox->setObjectName(QString::fromUtf8("inputGroupBox")); + inputGroupBox->setObjectName(QStringLiteral("inputGroupBox")); inputGroupBox->setMinimumSize(QSize(550, 120)); verticalLayout_4 = new QVBoxLayout(inputGroupBox); - verticalLayout_4->setObjectName(QString::fromUtf8("verticalLayout_4")); + verticalLayout_4->setObjectName(QStringLiteral("verticalLayout_4")); _2 = new QVBoxLayout(); #ifndef Q_OS_MAC _2->setSpacing(6); @@ -77,9 +77,9 @@ public: #ifndef Q_OS_MAC _2->setContentsMargins(0, 0, 0, 0); #endif - _2->setObjectName(QString::fromUtf8("_2")); + _2->setObjectName(QStringLiteral("_2")); inputTextEdit = new QTextEdit(inputGroupBox); - inputTextEdit->setObjectName(QString::fromUtf8("inputTextEdit")); + inputTextEdit->setObjectName(QStringLiteral("inputTextEdit")); _2->addWidget(inputTextEdit); @@ -90,17 +90,17 @@ public: vboxLayout->addWidget(inputGroupBox); queryGroupBox = new QGroupBox(centralwidget); - queryGroupBox->setObjectName(QString::fromUtf8("queryGroupBox")); + queryGroupBox->setObjectName(QStringLiteral("queryGroupBox")); queryGroupBox->setMinimumSize(QSize(550, 120)); verticalLayout_5 = new QVBoxLayout(queryGroupBox); - verticalLayout_5->setObjectName(QString::fromUtf8("verticalLayout_5")); + verticalLayout_5->setObjectName(QStringLiteral("verticalLayout_5")); defaultQueries = new QComboBox(queryGroupBox); - defaultQueries->setObjectName(QString::fromUtf8("defaultQueries")); + defaultQueries->setObjectName(QStringLiteral("defaultQueries")); verticalLayout_5->addWidget(defaultQueries); queryTextEdit = new QTextEdit(queryGroupBox); - queryTextEdit->setObjectName(QString::fromUtf8("queryTextEdit")); + queryTextEdit->setObjectName(QStringLiteral("queryTextEdit")); queryTextEdit->setMinimumSize(QSize(400, 60)); queryTextEdit->setReadOnly(true); queryTextEdit->setAcceptRichText(false); @@ -111,10 +111,10 @@ public: vboxLayout->addWidget(queryGroupBox); outputGroupBox = new QGroupBox(centralwidget); - outputGroupBox->setObjectName(QString::fromUtf8("outputGroupBox")); + outputGroupBox->setObjectName(QStringLiteral("outputGroupBox")); outputGroupBox->setMinimumSize(QSize(550, 120)); verticalLayout_6 = new QVBoxLayout(outputGroupBox); - verticalLayout_6->setObjectName(QString::fromUtf8("verticalLayout_6")); + verticalLayout_6->setObjectName(QStringLiteral("verticalLayout_6")); _3 = new QVBoxLayout(); #ifndef Q_OS_MAC _3->setSpacing(6); @@ -122,9 +122,9 @@ public: #ifndef Q_OS_MAC _3->setContentsMargins(0, 0, 0, 0); #endif - _3->setObjectName(QString::fromUtf8("_3")); + _3->setObjectName(QStringLiteral("_3")); outputTextEdit = new QTextEdit(outputGroupBox); - outputTextEdit->setObjectName(QString::fromUtf8("outputTextEdit")); + outputTextEdit->setObjectName(QStringLiteral("outputTextEdit")); outputTextEdit->setMinimumSize(QSize(500, 80)); outputTextEdit->setReadOnly(true); outputTextEdit->setAcceptRichText(false); @@ -142,11 +142,11 @@ public: QueryWidget->setCentralWidget(centralwidget); menubar = new QMenuBar(QueryWidget); - menubar->setObjectName(QString::fromUtf8("menubar")); + menubar->setObjectName(QStringLiteral("menubar")); menubar->setGeometry(QRect(0, 0, 545, 29)); QueryWidget->setMenuBar(menubar); statusbar = new QStatusBar(QueryWidget); - statusbar->setObjectName(QString::fromUtf8("statusbar")); + statusbar->setObjectName(QStringLiteral("statusbar")); statusbar->setGeometry(QRect(0, 509, 545, 22)); QueryWidget->setStatusBar(statusbar); diff --git a/tests/auto/tools/uic/baseline/remotecontrol.ui.h b/tests/auto/tools/uic/baseline/remotecontrol.ui.h index 52ab1678cc8..5a4910d6351 100644 --- a/tests/auto/tools/uic/baseline/remotecontrol.ui.h +++ b/tests/auto/tools/uic/baseline/remotecontrol.ui.h @@ -69,28 +69,28 @@ public: void setupUi(QMainWindow *RemoteControlClass) { if (RemoteControlClass->objectName().isEmpty()) - RemoteControlClass->setObjectName(QString::fromUtf8("RemoteControlClass")); + RemoteControlClass->setObjectName(QStringLiteral("RemoteControlClass")); RemoteControlClass->resize(344, 364); actionQuit = new QAction(RemoteControlClass); - actionQuit->setObjectName(QString::fromUtf8("actionQuit")); + actionQuit->setObjectName(QStringLiteral("actionQuit")); centralWidget = new QWidget(RemoteControlClass); - centralWidget->setObjectName(QString::fromUtf8("centralWidget")); + centralWidget->setObjectName(QStringLiteral("centralWidget")); gridLayout = new QGridLayout(centralWidget); gridLayout->setSpacing(6); gridLayout->setContentsMargins(11, 11, 11, 11); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); label = new QLabel(centralWidget); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); gridLayout->addWidget(label, 0, 0, 1, 1); startUrlLineEdit = new QLineEdit(centralWidget); - startUrlLineEdit->setObjectName(QString::fromUtf8("startUrlLineEdit")); + startUrlLineEdit->setObjectName(QStringLiteral("startUrlLineEdit")); gridLayout->addWidget(startUrlLineEdit, 0, 1, 1, 2); launchButton = new QPushButton(centralWidget); - launchButton->setObjectName(QString::fromUtf8("launchButton")); + launchButton->setObjectName(QStringLiteral("launchButton")); gridLayout->addWidget(launchButton, 1, 1, 1, 1); @@ -103,27 +103,27 @@ public: gridLayout->addItem(spacerItem1, 2, 1, 1, 1); actionGroupBox = new QGroupBox(centralWidget); - actionGroupBox->setObjectName(QString::fromUtf8("actionGroupBox")); + actionGroupBox->setObjectName(QStringLiteral("actionGroupBox")); actionGroupBox->setEnabled(false); gridLayout1 = new QGridLayout(actionGroupBox); gridLayout1->setSpacing(6); gridLayout1->setContentsMargins(11, 11, 11, 11); - gridLayout1->setObjectName(QString::fromUtf8("gridLayout1")); + gridLayout1->setObjectName(QStringLiteral("gridLayout1")); label_2 = new QLabel(actionGroupBox); - label_2->setObjectName(QString::fromUtf8("label_2")); + label_2->setObjectName(QStringLiteral("label_2")); gridLayout1->addWidget(label_2, 0, 0, 1, 1); hboxLayout = new QHBoxLayout(); hboxLayout->setSpacing(0); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName(QStringLiteral("hboxLayout")); indexLineEdit = new QLineEdit(actionGroupBox); - indexLineEdit->setObjectName(QString::fromUtf8("indexLineEdit")); + indexLineEdit->setObjectName(QStringLiteral("indexLineEdit")); hboxLayout->addWidget(indexLineEdit); indexButton = new QToolButton(actionGroupBox); - indexButton->setObjectName(QString::fromUtf8("indexButton")); + indexButton->setObjectName(QStringLiteral("indexButton")); const QIcon icon = QIcon(QString::fromUtf8(":/remotecontrol/enter.png")); indexButton->setIcon(icon); @@ -133,20 +133,20 @@ public: gridLayout1->addLayout(hboxLayout, 0, 1, 1, 2); label_4 = new QLabel(actionGroupBox); - label_4->setObjectName(QString::fromUtf8("label_4")); + label_4->setObjectName(QStringLiteral("label_4")); gridLayout1->addWidget(label_4, 1, 0, 1, 1); hboxLayout1 = new QHBoxLayout(); hboxLayout1->setSpacing(0); - hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1")); + hboxLayout1->setObjectName(QStringLiteral("hboxLayout1")); identifierLineEdit = new QLineEdit(actionGroupBox); - identifierLineEdit->setObjectName(QString::fromUtf8("identifierLineEdit")); + identifierLineEdit->setObjectName(QStringLiteral("identifierLineEdit")); hboxLayout1->addWidget(identifierLineEdit); identifierButton = new QToolButton(actionGroupBox); - identifierButton->setObjectName(QString::fromUtf8("identifierButton")); + identifierButton->setObjectName(QStringLiteral("identifierButton")); identifierButton->setIcon(icon); hboxLayout1->addWidget(identifierButton); @@ -155,20 +155,20 @@ public: gridLayout1->addLayout(hboxLayout1, 1, 1, 1, 2); label_3 = new QLabel(actionGroupBox); - label_3->setObjectName(QString::fromUtf8("label_3")); + label_3->setObjectName(QStringLiteral("label_3")); gridLayout1->addWidget(label_3, 2, 0, 1, 1); hboxLayout2 = new QHBoxLayout(); hboxLayout2->setSpacing(0); - hboxLayout2->setObjectName(QString::fromUtf8("hboxLayout2")); + hboxLayout2->setObjectName(QStringLiteral("hboxLayout2")); urlLineEdit = new QLineEdit(actionGroupBox); - urlLineEdit->setObjectName(QString::fromUtf8("urlLineEdit")); + urlLineEdit->setObjectName(QStringLiteral("urlLineEdit")); hboxLayout2->addWidget(urlLineEdit); urlButton = new QToolButton(actionGroupBox); - urlButton->setObjectName(QString::fromUtf8("urlButton")); + urlButton->setObjectName(QStringLiteral("urlButton")); urlButton->setIcon(icon); hboxLayout2->addWidget(urlButton); @@ -177,7 +177,7 @@ public: gridLayout1->addLayout(hboxLayout2, 2, 1, 1, 2); syncContentsButton = new QPushButton(actionGroupBox); - syncContentsButton->setObjectName(QString::fromUtf8("syncContentsButton")); + syncContentsButton->setObjectName(QStringLiteral("syncContentsButton")); gridLayout1->addWidget(syncContentsButton, 3, 1, 1, 1); @@ -186,17 +186,17 @@ public: gridLayout1->addItem(spacerItem2, 3, 2, 1, 1); contentsCheckBox = new QCheckBox(actionGroupBox); - contentsCheckBox->setObjectName(QString::fromUtf8("contentsCheckBox")); + contentsCheckBox->setObjectName(QStringLiteral("contentsCheckBox")); gridLayout1->addWidget(contentsCheckBox, 4, 0, 1, 3); indexCheckBox = new QCheckBox(actionGroupBox); - indexCheckBox->setObjectName(QString::fromUtf8("indexCheckBox")); + indexCheckBox->setObjectName(QStringLiteral("indexCheckBox")); gridLayout1->addWidget(indexCheckBox, 5, 0, 1, 1); bookmarksCheckBox = new QCheckBox(actionGroupBox); - bookmarksCheckBox->setObjectName(QString::fromUtf8("bookmarksCheckBox")); + bookmarksCheckBox->setObjectName(QStringLiteral("bookmarksCheckBox")); gridLayout1->addWidget(bookmarksCheckBox, 6, 0, 1, 3); @@ -205,13 +205,13 @@ public: RemoteControlClass->setCentralWidget(centralWidget); menuBar = new QMenuBar(RemoteControlClass); - menuBar->setObjectName(QString::fromUtf8("menuBar")); + menuBar->setObjectName(QStringLiteral("menuBar")); menuBar->setGeometry(QRect(0, 0, 344, 21)); menuFile = new QMenu(menuBar); - menuFile->setObjectName(QString::fromUtf8("menuFile")); + menuFile->setObjectName(QStringLiteral("menuFile")); RemoteControlClass->setMenuBar(menuBar); statusBar = new QStatusBar(RemoteControlClass); - statusBar->setObjectName(QString::fromUtf8("statusBar")); + statusBar->setObjectName(QStringLiteral("statusBar")); RemoteControlClass->setStatusBar(statusBar); menuBar->addAction(menuFile->menuAction()); diff --git a/tests/auto/tools/uic/baseline/saveformastemplate.ui.h b/tests/auto/tools/uic/baseline/saveformastemplate.ui.h index 32597cd6ffd..dba7834c969 100644 --- a/tests/auto/tools/uic/baseline/saveformastemplate.ui.h +++ b/tests/auto/tools/uic/baseline/saveformastemplate.ui.h @@ -84,13 +84,13 @@ public: void setupUi(QDialog *SaveFormAsTemplate) { if (SaveFormAsTemplate->objectName().isEmpty()) - SaveFormAsTemplate->setObjectName(QString::fromUtf8("SaveFormAsTemplate")); + SaveFormAsTemplate->setObjectName(QStringLiteral("SaveFormAsTemplate")); vboxLayout = new QVBoxLayout(SaveFormAsTemplate); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); formLayout = new QFormLayout(); - formLayout->setObjectName(QString::fromUtf8("formLayout")); + formLayout->setObjectName(QStringLiteral("formLayout")); label = new QLabel(SaveFormAsTemplate); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); label->setFrameShape(QFrame::NoFrame); label->setFrameShadow(QFrame::Plain); label->setTextFormat(Qt::AutoText); @@ -98,14 +98,14 @@ public: formLayout->setWidget(0, QFormLayout::LabelRole, label); templateNameEdit = new QLineEdit(SaveFormAsTemplate); - templateNameEdit->setObjectName(QString::fromUtf8("templateNameEdit")); + templateNameEdit->setObjectName(QStringLiteral("templateNameEdit")); templateNameEdit->setMinimumSize(QSize(222, 0)); templateNameEdit->setEchoMode(QLineEdit::Normal); formLayout->setWidget(0, QFormLayout::FieldRole, templateNameEdit); label_2 = new QLabel(SaveFormAsTemplate); - label_2->setObjectName(QString::fromUtf8("label_2")); + label_2->setObjectName(QStringLiteral("label_2")); label_2->setFrameShape(QFrame::NoFrame); label_2->setFrameShadow(QFrame::Plain); label_2->setTextFormat(Qt::AutoText); @@ -113,7 +113,7 @@ public: formLayout->setWidget(1, QFormLayout::LabelRole, label_2); categoryCombo = new QComboBox(SaveFormAsTemplate); - categoryCombo->setObjectName(QString::fromUtf8("categoryCombo")); + categoryCombo->setObjectName(QStringLiteral("categoryCombo")); formLayout->setWidget(1, QFormLayout::FieldRole, categoryCombo); @@ -121,14 +121,14 @@ public: vboxLayout->addLayout(formLayout); horizontalLine = new QFrame(SaveFormAsTemplate); - horizontalLine->setObjectName(QString::fromUtf8("horizontalLine")); + horizontalLine->setObjectName(QStringLiteral("horizontalLine")); horizontalLine->setFrameShape(QFrame::HLine); horizontalLine->setFrameShadow(QFrame::Sunken); vboxLayout->addWidget(horizontalLine); buttonBox = new QDialogButtonBox(SaveFormAsTemplate); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName(QStringLiteral("buttonBox")); buttonBox->setOrientation(Qt::Horizontal); buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok); diff --git a/tests/auto/tools/uic/baseline/settings.ui.h b/tests/auto/tools/uic/baseline/settings.ui.h index 0f87a29a65b..3fc9bad7102 100644 --- a/tests/auto/tools/uic/baseline/settings.ui.h +++ b/tests/auto/tools/uic/baseline/settings.ui.h @@ -51,14 +51,14 @@ public: void setupUi(QDialog *Dialog) { if (Dialog->objectName().isEmpty()) - Dialog->setObjectName(QString::fromUtf8("Dialog")); + Dialog->setObjectName(QStringLiteral("Dialog")); Dialog->resize(392, 176); verticalLayout = new QVBoxLayout(Dialog); - verticalLayout->setObjectName(QString::fromUtf8("verticalLayout")); + verticalLayout->setObjectName(QStringLiteral("verticalLayout")); hboxLayout = new QHBoxLayout(); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName(QStringLiteral("hboxLayout")); label = new QLabel(Dialog); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); QSizePolicy sizePolicy(QSizePolicy::Maximum, QSizePolicy::Preferred); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); @@ -70,7 +70,7 @@ public: hboxLayout->addWidget(label); deviceCombo = new QComboBox(Dialog); - deviceCombo->setObjectName(QString::fromUtf8("deviceCombo")); + deviceCombo->setObjectName(QStringLiteral("deviceCombo")); QSizePolicy sizePolicy1(QSizePolicy::Minimum, QSizePolicy::Fixed); sizePolicy1.setHorizontalStretch(0); sizePolicy1.setVerticalStretch(0); @@ -83,9 +83,9 @@ public: verticalLayout->addLayout(hboxLayout); hboxLayout1 = new QHBoxLayout(); - hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1")); + hboxLayout1->setObjectName(QStringLiteral("hboxLayout1")); label_6 = new QLabel(Dialog); - label_6->setObjectName(QString::fromUtf8("label_6")); + label_6->setObjectName(QStringLiteral("label_6")); sizePolicy.setHeightForWidth(label_6->sizePolicy().hasHeightForWidth()); label_6->setSizePolicy(sizePolicy); label_6->setMinimumSize(QSize(90, 0)); @@ -94,7 +94,7 @@ public: hboxLayout1->addWidget(label_6); audioEffectsCombo = new QComboBox(Dialog); - audioEffectsCombo->setObjectName(QString::fromUtf8("audioEffectsCombo")); + audioEffectsCombo->setObjectName(QStringLiteral("audioEffectsCombo")); sizePolicy1.setHeightForWidth(audioEffectsCombo->sizePolicy().hasHeightForWidth()); audioEffectsCombo->setSizePolicy(sizePolicy1); @@ -104,9 +104,9 @@ public: verticalLayout->addLayout(hboxLayout1); hboxLayout2 = new QHBoxLayout(); - hboxLayout2->setObjectName(QString::fromUtf8("hboxLayout2")); + hboxLayout2->setObjectName(QStringLiteral("hboxLayout2")); crossFadeLabel = new QLabel(Dialog); - crossFadeLabel->setObjectName(QString::fromUtf8("crossFadeLabel")); + crossFadeLabel->setObjectName(QStringLiteral("crossFadeLabel")); sizePolicy.setHeightForWidth(crossFadeLabel->sizePolicy().hasHeightForWidth()); crossFadeLabel->setSizePolicy(sizePolicy); crossFadeLabel->setMinimumSize(QSize(90, 0)); @@ -115,9 +115,9 @@ public: hboxLayout2->addWidget(crossFadeLabel); vboxLayout = new QVBoxLayout(); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); crossFadeSlider = new QSlider(Dialog); - crossFadeSlider->setObjectName(QString::fromUtf8("crossFadeSlider")); + crossFadeSlider->setObjectName(QStringLiteral("crossFadeSlider")); sizePolicy1.setHeightForWidth(crossFadeSlider->sizePolicy().hasHeightForWidth()); crossFadeSlider->setSizePolicy(sizePolicy1); crossFadeSlider->setMinimum(-20); @@ -131,9 +131,9 @@ public: vboxLayout->addWidget(crossFadeSlider); hboxLayout3 = new QHBoxLayout(); - hboxLayout3->setObjectName(QString::fromUtf8("hboxLayout3")); + hboxLayout3->setObjectName(QStringLiteral("hboxLayout3")); label_3 = new QLabel(Dialog); - label_3->setObjectName(QString::fromUtf8("label_3")); + label_3->setObjectName(QStringLiteral("label_3")); QFont font; font.setPointSize(9); label_3->setFont(font); @@ -145,7 +145,7 @@ public: hboxLayout3->addItem(spacerItem); label_5 = new QLabel(Dialog); - label_5->setObjectName(QString::fromUtf8("label_5")); + label_5->setObjectName(QStringLiteral("label_5")); label_5->setFont(font); hboxLayout3->addWidget(label_5); @@ -155,7 +155,7 @@ public: hboxLayout3->addItem(spacerItem1); label_4 = new QLabel(Dialog); - label_4->setObjectName(QString::fromUtf8("label_4")); + label_4->setObjectName(QStringLiteral("label_4")); label_4->setFont(font); hboxLayout3->addWidget(label_4); @@ -170,7 +170,7 @@ public: verticalLayout->addLayout(hboxLayout2); buttonBox = new QDialogButtonBox(Dialog); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName(QStringLiteral("buttonBox")); buttonBox->setOrientation(Qt::Horizontal); buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok); diff --git a/tests/auto/tools/uic/baseline/signalslotdialog.ui.h b/tests/auto/tools/uic/baseline/signalslotdialog.ui.h index 3027ac93f20..ea253fa7293 100644 --- a/tests/auto/tools/uic/baseline/signalslotdialog.ui.h +++ b/tests/auto/tools/uic/baseline/signalslotdialog.ui.h @@ -49,33 +49,33 @@ public: void setupUi(QDialog *SignalSlotDialogClass) { if (SignalSlotDialogClass->objectName().isEmpty()) - SignalSlotDialogClass->setObjectName(QString::fromUtf8("SignalSlotDialogClass")); + SignalSlotDialogClass->setObjectName(QStringLiteral("SignalSlotDialogClass")); SignalSlotDialogClass->resize(617, 535); vboxLayout = new QVBoxLayout(SignalSlotDialogClass); vboxLayout->setSpacing(6); vboxLayout->setContentsMargins(11, 11, 11, 11); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); slotGroupBox = new QGroupBox(SignalSlotDialogClass); - slotGroupBox->setObjectName(QString::fromUtf8("slotGroupBox")); + slotGroupBox->setObjectName(QStringLiteral("slotGroupBox")); vboxLayout1 = new QVBoxLayout(slotGroupBox); vboxLayout1->setSpacing(6); vboxLayout1->setContentsMargins(11, 11, 11, 11); - vboxLayout1->setObjectName(QString::fromUtf8("vboxLayout1")); + vboxLayout1->setObjectName(QStringLiteral("vboxLayout1")); slotListView = new QListView(slotGroupBox); - slotListView->setObjectName(QString::fromUtf8("slotListView")); + slotListView->setObjectName(QStringLiteral("slotListView")); vboxLayout1->addWidget(slotListView); hboxLayout = new QHBoxLayout(); hboxLayout->setSpacing(6); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName(QStringLiteral("hboxLayout")); addSlotButton = new QToolButton(slotGroupBox); - addSlotButton->setObjectName(QString::fromUtf8("addSlotButton")); + addSlotButton->setObjectName(QStringLiteral("addSlotButton")); hboxLayout->addWidget(addSlotButton); removeSlotButton = new QToolButton(slotGroupBox); - removeSlotButton->setObjectName(QString::fromUtf8("removeSlotButton")); + removeSlotButton->setObjectName(QStringLiteral("removeSlotButton")); hboxLayout->addWidget(removeSlotButton); @@ -90,26 +90,26 @@ public: vboxLayout->addWidget(slotGroupBox); signalGroupBox = new QGroupBox(SignalSlotDialogClass); - signalGroupBox->setObjectName(QString::fromUtf8("signalGroupBox")); + signalGroupBox->setObjectName(QStringLiteral("signalGroupBox")); vboxLayout2 = new QVBoxLayout(signalGroupBox); vboxLayout2->setSpacing(6); vboxLayout2->setContentsMargins(11, 11, 11, 11); - vboxLayout2->setObjectName(QString::fromUtf8("vboxLayout2")); + vboxLayout2->setObjectName(QStringLiteral("vboxLayout2")); signalListView = new QListView(signalGroupBox); - signalListView->setObjectName(QString::fromUtf8("signalListView")); + signalListView->setObjectName(QStringLiteral("signalListView")); vboxLayout2->addWidget(signalListView); hboxLayout1 = new QHBoxLayout(); hboxLayout1->setSpacing(6); - hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1")); + hboxLayout1->setObjectName(QStringLiteral("hboxLayout1")); addSignalButton = new QToolButton(signalGroupBox); - addSignalButton->setObjectName(QString::fromUtf8("addSignalButton")); + addSignalButton->setObjectName(QStringLiteral("addSignalButton")); hboxLayout1->addWidget(addSignalButton); removeSignalButton = new QToolButton(signalGroupBox); - removeSignalButton->setObjectName(QString::fromUtf8("removeSignalButton")); + removeSignalButton->setObjectName(QStringLiteral("removeSignalButton")); hboxLayout1->addWidget(removeSignalButton); @@ -124,7 +124,7 @@ public: vboxLayout->addWidget(signalGroupBox); buttonBox = new QDialogButtonBox(SignalSlotDialogClass); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName(QStringLiteral("buttonBox")); buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok); vboxLayout->addWidget(buttonBox); diff --git a/tests/auto/tools/uic/baseline/sslclient.ui.h b/tests/auto/tools/uic/baseline/sslclient.ui.h index 4dce9be2c3b..7d5b83b5dbe 100644 --- a/tests/auto/tools/uic/baseline/sslclient.ui.h +++ b/tests/auto/tools/uic/baseline/sslclient.ui.h @@ -52,29 +52,29 @@ public: void setupUi(QWidget *Form) { if (Form->objectName().isEmpty()) - Form->setObjectName(QString::fromUtf8("Form")); + Form->setObjectName(QStringLiteral("Form")); Form->resize(343, 320); vboxLayout = new QVBoxLayout(Form); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); gridLayout = new QGridLayout(); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); hostNameLabel = new QLabel(Form); - hostNameLabel->setObjectName(QString::fromUtf8("hostNameLabel")); + hostNameLabel->setObjectName(QStringLiteral("hostNameLabel")); gridLayout->addWidget(hostNameLabel, 0, 0, 1, 1); hostNameEdit = new QLineEdit(Form); - hostNameEdit->setObjectName(QString::fromUtf8("hostNameEdit")); + hostNameEdit->setObjectName(QStringLiteral("hostNameEdit")); gridLayout->addWidget(hostNameEdit, 0, 1, 1, 1); portLabel = new QLabel(Form); - portLabel->setObjectName(QString::fromUtf8("portLabel")); + portLabel->setObjectName(QStringLiteral("portLabel")); gridLayout->addWidget(portLabel, 1, 0, 1, 1); portBox = new QSpinBox(Form); - portBox->setObjectName(QString::fromUtf8("portBox")); + portBox->setObjectName(QStringLiteral("portBox")); portBox->setMinimum(1); portBox->setMaximum(65535); portBox->setValue(993); @@ -85,26 +85,26 @@ public: vboxLayout->addLayout(gridLayout); connectButton = new QPushButton(Form); - connectButton->setObjectName(QString::fromUtf8("connectButton")); + connectButton->setObjectName(QStringLiteral("connectButton")); connectButton->setEnabled(true); connectButton->setDefault(true); vboxLayout->addWidget(connectButton); sessionBox = new QGroupBox(Form); - sessionBox->setObjectName(QString::fromUtf8("sessionBox")); + sessionBox->setObjectName(QStringLiteral("sessionBox")); sessionBox->setEnabled(false); vboxLayout1 = new QVBoxLayout(sessionBox); - vboxLayout1->setObjectName(QString::fromUtf8("vboxLayout1")); + vboxLayout1->setObjectName(QStringLiteral("vboxLayout1")); hboxLayout = new QHBoxLayout(); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName(QStringLiteral("hboxLayout")); cipherText = new QLabel(sessionBox); - cipherText->setObjectName(QString::fromUtf8("cipherText")); + cipherText->setObjectName(QStringLiteral("cipherText")); hboxLayout->addWidget(cipherText); cipherLabel = new QLabel(sessionBox); - cipherLabel->setObjectName(QString::fromUtf8("cipherLabel")); + cipherLabel->setObjectName(QStringLiteral("cipherLabel")); cipherLabel->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); hboxLayout->addWidget(cipherLabel); @@ -113,7 +113,7 @@ public: vboxLayout1->addLayout(hboxLayout); sessionOutput = new QTextEdit(sessionBox); - sessionOutput->setObjectName(QString::fromUtf8("sessionOutput")); + sessionOutput->setObjectName(QStringLiteral("sessionOutput")); sessionOutput->setEnabled(false); sessionOutput->setFocusPolicy(Qt::NoFocus); sessionOutput->setReadOnly(true); @@ -121,20 +121,20 @@ public: vboxLayout1->addWidget(sessionOutput); hboxLayout1 = new QHBoxLayout(); - hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1")); + hboxLayout1->setObjectName(QStringLiteral("hboxLayout1")); sessionInputLabel = new QLabel(sessionBox); - sessionInputLabel->setObjectName(QString::fromUtf8("sessionInputLabel")); + sessionInputLabel->setObjectName(QStringLiteral("sessionInputLabel")); hboxLayout1->addWidget(sessionInputLabel); sessionInput = new QLineEdit(sessionBox); - sessionInput->setObjectName(QString::fromUtf8("sessionInput")); + sessionInput->setObjectName(QStringLiteral("sessionInput")); sessionInput->setEnabled(false); hboxLayout1->addWidget(sessionInput); sendButton = new QPushButton(sessionBox); - sendButton->setObjectName(QString::fromUtf8("sendButton")); + sendButton->setObjectName(QStringLiteral("sendButton")); sendButton->setEnabled(false); sendButton->setFocusPolicy(Qt::TabFocus); sendButton->setDefault(true); diff --git a/tests/auto/tools/uic/baseline/sslerrors.ui.h b/tests/auto/tools/uic/baseline/sslerrors.ui.h index 2c3ade77bc0..c542baab3ca 100644 --- a/tests/auto/tools/uic/baseline/sslerrors.ui.h +++ b/tests/auto/tools/uic/baseline/sslerrors.ui.h @@ -40,25 +40,25 @@ public: void setupUi(QDialog *SslErrors) { if (SslErrors->objectName().isEmpty()) - SslErrors->setObjectName(QString::fromUtf8("SslErrors")); + SslErrors->setObjectName(QStringLiteral("SslErrors")); SslErrors->resize(371, 216); vboxLayout = new QVBoxLayout(SslErrors); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); label = new QLabel(SslErrors); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); label->setWordWrap(true); vboxLayout->addWidget(label); sslErrorList = new QListWidget(SslErrors); - sslErrorList->setObjectName(QString::fromUtf8("sslErrorList")); + sslErrorList->setObjectName(QStringLiteral("sslErrorList")); vboxLayout->addWidget(sslErrorList); hboxLayout = new QHBoxLayout(); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName(QStringLiteral("hboxLayout")); certificateChainButton = new QPushButton(SslErrors); - certificateChainButton->setObjectName(QString::fromUtf8("certificateChainButton")); + certificateChainButton->setObjectName(QStringLiteral("certificateChainButton")); certificateChainButton->setAutoDefault(false); hboxLayout->addWidget(certificateChainButton); @@ -68,12 +68,12 @@ public: hboxLayout->addItem(spacerItem); pushButton = new QPushButton(SslErrors); - pushButton->setObjectName(QString::fromUtf8("pushButton")); + pushButton->setObjectName(QStringLiteral("pushButton")); hboxLayout->addWidget(pushButton); pushButton_2 = new QPushButton(SslErrors); - pushButton_2->setObjectName(QString::fromUtf8("pushButton_2")); + pushButton_2->setObjectName(QStringLiteral("pushButton_2")); hboxLayout->addWidget(pushButton_2); diff --git a/tests/auto/tools/uic/baseline/statistics.ui.h b/tests/auto/tools/uic/baseline/statistics.ui.h index b6e14b5ddaf..a812fb443f2 100644 --- a/tests/auto/tools/uic/baseline/statistics.ui.h +++ b/tests/auto/tools/uic/baseline/statistics.ui.h @@ -93,24 +93,24 @@ public: void setupUi(QDialog *Statistics) { if (Statistics->objectName().isEmpty()) - Statistics->setObjectName(QString::fromUtf8("Statistics")); - Statistics->setObjectName(QString::fromUtf8("linguist_stats")); + Statistics->setObjectName(QStringLiteral("Statistics")); + Statistics->setObjectName(QStringLiteral("linguist_stats")); Statistics->resize(336, 164); gridLayout = new QGridLayout(Statistics); gridLayout->setSpacing(6); gridLayout->setContentsMargins(11, 11, 11, 11); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); - gridLayout->setObjectName(QString::fromUtf8("unnamed")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); + gridLayout->setObjectName(QStringLiteral("unnamed")); hboxLayout = new QHBoxLayout(); hboxLayout->setSpacing(6); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); - hboxLayout->setObjectName(QString::fromUtf8("unnamed")); + hboxLayout->setObjectName(QStringLiteral("hboxLayout")); + hboxLayout->setObjectName(QStringLiteral("unnamed")); spacer4_2 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); hboxLayout->addItem(spacer4_2); closeBtn = new QPushButton(Statistics); - closeBtn->setObjectName(QString::fromUtf8("closeBtn")); + closeBtn->setObjectName(QStringLiteral("closeBtn")); hboxLayout->addWidget(closeBtn); @@ -122,66 +122,66 @@ public: gridLayout->addLayout(hboxLayout, 1, 0, 1, 1); frame4 = new QFrame(Statistics); - frame4->setObjectName(QString::fromUtf8("frame4")); + frame4->setObjectName(QStringLiteral("frame4")); frame4->setFrameShape(QFrame::StyledPanel); frame4->setFrameShadow(QFrame::Raised); gridLayout1 = new QGridLayout(frame4); gridLayout1->setSpacing(6); gridLayout1->setContentsMargins(11, 11, 11, 11); - gridLayout1->setObjectName(QString::fromUtf8("gridLayout1")); - gridLayout1->setObjectName(QString::fromUtf8("unnamed")); + gridLayout1->setObjectName(QStringLiteral("gridLayout1")); + gridLayout1->setObjectName(QStringLiteral("unnamed")); textLabel4 = new QLabel(frame4); - textLabel4->setObjectName(QString::fromUtf8("textLabel4")); + textLabel4->setObjectName(QStringLiteral("textLabel4")); gridLayout1->addWidget(textLabel4, 0, 2, 1, 1); textLabel5 = new QLabel(frame4); - textLabel5->setObjectName(QString::fromUtf8("textLabel5")); + textLabel5->setObjectName(QStringLiteral("textLabel5")); gridLayout1->addWidget(textLabel5, 0, 1, 1, 1); untrWords = new QLabel(frame4); - untrWords->setObjectName(QString::fromUtf8("untrWords")); + untrWords->setObjectName(QStringLiteral("untrWords")); gridLayout1->addWidget(untrWords, 1, 1, 1, 1); trWords = new QLabel(frame4); - trWords->setObjectName(QString::fromUtf8("trWords")); + trWords->setObjectName(QStringLiteral("trWords")); gridLayout1->addWidget(trWords, 1, 2, 1, 1); textLabel1 = new QLabel(frame4); - textLabel1->setObjectName(QString::fromUtf8("textLabel1")); + textLabel1->setObjectName(QStringLiteral("textLabel1")); gridLayout1->addWidget(textLabel1, 1, 0, 1, 1); trChars = new QLabel(frame4); - trChars->setObjectName(QString::fromUtf8("trChars")); + trChars->setObjectName(QStringLiteral("trChars")); gridLayout1->addWidget(trChars, 2, 2, 1, 1); untrChars = new QLabel(frame4); - untrChars->setObjectName(QString::fromUtf8("untrChars")); + untrChars->setObjectName(QStringLiteral("untrChars")); gridLayout1->addWidget(untrChars, 2, 1, 1, 1); textLabel3 = new QLabel(frame4); - textLabel3->setObjectName(QString::fromUtf8("textLabel3")); + textLabel3->setObjectName(QStringLiteral("textLabel3")); gridLayout1->addWidget(textLabel3, 2, 0, 1, 1); textLabel6 = new QLabel(frame4); - textLabel6->setObjectName(QString::fromUtf8("textLabel6")); + textLabel6->setObjectName(QStringLiteral("textLabel6")); gridLayout1->addWidget(textLabel6, 3, 0, 1, 1); trCharsSpc = new QLabel(frame4); - trCharsSpc->setObjectName(QString::fromUtf8("trCharsSpc")); + trCharsSpc->setObjectName(QStringLiteral("trCharsSpc")); gridLayout1->addWidget(trCharsSpc, 3, 2, 1, 1); untrCharsSpc = new QLabel(frame4); - untrCharsSpc->setObjectName(QString::fromUtf8("untrCharsSpc")); + untrCharsSpc->setObjectName(QStringLiteral("untrCharsSpc")); gridLayout1->addWidget(untrCharsSpc, 3, 1, 1, 1); diff --git a/tests/auto/tools/uic/baseline/stringlisteditor.ui.h b/tests/auto/tools/uic/baseline/stringlisteditor.ui.h index 7624eaec58f..d3033dc5947 100644 --- a/tests/auto/tools/uic/baseline/stringlisteditor.ui.h +++ b/tests/auto/tools/uic/baseline/stringlisteditor.ui.h @@ -99,7 +99,7 @@ public: void setupUi(QDialog *qdesigner_internal__Dialog) { if (qdesigner_internal__Dialog->objectName().isEmpty()) - qdesigner_internal__Dialog->setObjectName(QString::fromUtf8("qdesigner_internal__Dialog")); + qdesigner_internal__Dialog->setObjectName(QStringLiteral("qdesigner_internal__Dialog")); qdesigner_internal__Dialog->resize(400, 300); vboxLayout = new QVBoxLayout(qdesigner_internal__Dialog); #ifndef Q_OS_MAC @@ -108,9 +108,9 @@ public: #ifndef Q_OS_MAC vboxLayout->setContentsMargins(9, 9, 9, 9); #endif - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); groupBox = new QGroupBox(qdesigner_internal__Dialog); - groupBox->setObjectName(QString::fromUtf8("groupBox")); + groupBox->setObjectName(QStringLiteral("groupBox")); gridLayout = new QGridLayout(groupBox); #ifndef Q_OS_MAC gridLayout->setSpacing(6); @@ -118,7 +118,7 @@ public: #ifndef Q_OS_MAC gridLayout->setContentsMargins(9, 9, 9, 9); #endif - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); vboxLayout1 = new QVBoxLayout(); #ifndef Q_OS_MAC vboxLayout1->setSpacing(6); @@ -126,7 +126,7 @@ public: #ifndef Q_OS_MAC vboxLayout1->setContentsMargins(0, 0, 0, 0); #endif - vboxLayout1->setObjectName(QString::fromUtf8("vboxLayout1")); + vboxLayout1->setObjectName(QStringLiteral("vboxLayout1")); hboxLayout = new QHBoxLayout(); #ifndef Q_OS_MAC hboxLayout->setSpacing(6); @@ -134,15 +134,15 @@ public: #ifndef Q_OS_MAC hboxLayout->setContentsMargins(0, 0, 0, 0); #endif - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName(QStringLiteral("hboxLayout")); newButton = new QToolButton(groupBox); - newButton->setObjectName(QString::fromUtf8("newButton")); + newButton->setObjectName(QStringLiteral("newButton")); newButton->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); hboxLayout->addWidget(newButton); deleteButton = new QToolButton(groupBox); - deleteButton->setObjectName(QString::fromUtf8("deleteButton")); + deleteButton->setObjectName(QStringLiteral("deleteButton")); deleteButton->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); hboxLayout->addWidget(deleteButton); @@ -159,14 +159,14 @@ public: hboxLayout1->setSpacing(6); #endif hboxLayout1->setContentsMargins(0, 0, 0, 0); - hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1")); + hboxLayout1->setObjectName(QStringLiteral("hboxLayout1")); label = new QLabel(groupBox); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); hboxLayout1->addWidget(label); valueEdit = new QLineEdit(groupBox); - valueEdit->setObjectName(QString::fromUtf8("valueEdit")); + valueEdit->setObjectName(QStringLiteral("valueEdit")); hboxLayout1->addWidget(valueEdit); @@ -181,18 +181,18 @@ public: vboxLayout2->setSpacing(6); #endif vboxLayout2->setContentsMargins(0, 0, 0, 0); - vboxLayout2->setObjectName(QString::fromUtf8("vboxLayout2")); + vboxLayout2->setObjectName(QStringLiteral("vboxLayout2")); spacerItem1 = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding); vboxLayout2->addItem(spacerItem1); upButton = new QToolButton(groupBox); - upButton->setObjectName(QString::fromUtf8("upButton")); + upButton->setObjectName(QStringLiteral("upButton")); vboxLayout2->addWidget(upButton); downButton = new QToolButton(groupBox); - downButton->setObjectName(QString::fromUtf8("downButton")); + downButton->setObjectName(QStringLiteral("downButton")); vboxLayout2->addWidget(downButton); @@ -204,7 +204,7 @@ public: gridLayout->addLayout(vboxLayout2, 0, 1, 1, 1); listView = new QListView(groupBox); - listView->setObjectName(QString::fromUtf8("listView")); + listView->setObjectName(QStringLiteral("listView")); gridLayout->addWidget(listView, 0, 0, 1, 1); @@ -212,7 +212,7 @@ public: vboxLayout->addWidget(groupBox); buttonBox = new QDialogButtonBox(qdesigner_internal__Dialog); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName(QStringLiteral("buttonBox")); buttonBox->setOrientation(Qt::Horizontal); buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok); diff --git a/tests/auto/tools/uic/baseline/stylesheeteditor.ui.h b/tests/auto/tools/uic/baseline/stylesheeteditor.ui.h index f5e8e2ea98b..e4b2deb4982 100644 --- a/tests/auto/tools/uic/baseline/stylesheeteditor.ui.h +++ b/tests/auto/tools/uic/baseline/stylesheeteditor.ui.h @@ -45,7 +45,7 @@ public: void setupUi(QWidget *StyleSheetEditor) { if (StyleSheetEditor->objectName().isEmpty()) - StyleSheetEditor->setObjectName(QString::fromUtf8("StyleSheetEditor")); + StyleSheetEditor->setObjectName(QStringLiteral("StyleSheetEditor")); StyleSheetEditor->resize(445, 289); gridLayout = new QGridLayout(StyleSheetEditor); #ifndef Q_OS_MAC @@ -54,7 +54,7 @@ public: #ifndef Q_OS_MAC gridLayout->setContentsMargins(9, 9, 9, 9); #endif - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); spacerItem = new QSpacerItem(32, 20, QSizePolicy::MinimumExpanding, QSizePolicy::Minimum); gridLayout->addItem(spacerItem, 0, 6, 1, 1); @@ -64,7 +64,7 @@ public: gridLayout->addItem(spacerItem1, 0, 0, 1, 1); styleSheetCombo = new QComboBox(StyleSheetEditor); - styleSheetCombo->setObjectName(QString::fromUtf8("styleSheetCombo")); + styleSheetCombo->setObjectName(QStringLiteral("styleSheetCombo")); gridLayout->addWidget(styleSheetCombo, 0, 5, 1, 1); @@ -73,7 +73,7 @@ public: gridLayout->addItem(spacerItem2, 0, 3, 1, 1); styleCombo = new QComboBox(StyleSheetEditor); - styleCombo->setObjectName(QString::fromUtf8("styleCombo")); + styleCombo->setObjectName(QStringLiteral("styleCombo")); QSizePolicy sizePolicy(static_cast(5), static_cast(0)); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); @@ -83,7 +83,7 @@ public: gridLayout->addWidget(styleCombo, 0, 2, 1, 1); label_7 = new QLabel(StyleSheetEditor); - label_7->setObjectName(QString::fromUtf8("label_7")); + label_7->setObjectName(QStringLiteral("label_7")); QSizePolicy sizePolicy1(static_cast(0), static_cast(5)); sizePolicy1.setHorizontalStretch(0); sizePolicy1.setVerticalStretch(0); @@ -97,13 +97,13 @@ public: hboxLayout->setSpacing(6); #endif hboxLayout->setContentsMargins(0, 0, 0, 0); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName(QStringLiteral("hboxLayout")); spacerItem3 = new QSpacerItem(321, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); hboxLayout->addItem(spacerItem3); applyButton = new QPushButton(StyleSheetEditor); - applyButton->setObjectName(QString::fromUtf8("applyButton")); + applyButton->setObjectName(QStringLiteral("applyButton")); applyButton->setEnabled(false); hboxLayout->addWidget(applyButton); @@ -112,12 +112,12 @@ public: gridLayout->addLayout(hboxLayout, 2, 0, 1, 7); styleTextEdit = new QTextEdit(StyleSheetEditor); - styleTextEdit->setObjectName(QString::fromUtf8("styleTextEdit")); + styleTextEdit->setObjectName(QStringLiteral("styleTextEdit")); gridLayout->addWidget(styleTextEdit, 1, 0, 1, 7); label_8 = new QLabel(StyleSheetEditor); - label_8->setObjectName(QString::fromUtf8("label_8")); + label_8->setObjectName(QStringLiteral("label_8")); sizePolicy1.setHeightForWidth(label_8->sizePolicy().hasHeightForWidth()); label_8->setSizePolicy(sizePolicy1); diff --git a/tests/auto/tools/uic/baseline/tabbedbrowser.ui.h b/tests/auto/tools/uic/baseline/tabbedbrowser.ui.h index 424871f688b..1e99c413125 100644 --- a/tests/auto/tools/uic/baseline/tabbedbrowser.ui.h +++ b/tests/auto/tools/uic/baseline/tabbedbrowser.ui.h @@ -93,28 +93,28 @@ public: void setupUi(QWidget *TabbedBrowser) { if (TabbedBrowser->objectName().isEmpty()) - TabbedBrowser->setObjectName(QString::fromUtf8("TabbedBrowser")); + TabbedBrowser->setObjectName(QStringLiteral("TabbedBrowser")); TabbedBrowser->resize(710, 664); vboxLayout = new QVBoxLayout(TabbedBrowser); vboxLayout->setSpacing(0); vboxLayout->setContentsMargins(0, 0, 0, 0); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); tab = new QTabWidget(TabbedBrowser); - tab->setObjectName(QString::fromUtf8("tab")); + tab->setObjectName(QStringLiteral("tab")); frontpage = new QWidget(); - frontpage->setObjectName(QString::fromUtf8("frontpage")); + frontpage->setObjectName(QStringLiteral("frontpage")); gridLayout = new QGridLayout(frontpage); #ifndef Q_OS_MAC gridLayout->setSpacing(6); #endif gridLayout->setContentsMargins(8, 8, 8, 8); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); tab->addTab(frontpage, QString()); vboxLayout->addWidget(tab); frameFind = new QFrame(TabbedBrowser); - frameFind->setObjectName(QString::fromUtf8("frameFind")); + frameFind->setObjectName(QStringLiteral("frameFind")); frameFind->setFrameShape(QFrame::StyledPanel); frameFind->setFrameShadow(QFrame::Raised); hboxLayout = new QHBoxLayout(frameFind); @@ -122,9 +122,9 @@ public: hboxLayout->setSpacing(6); #endif hboxLayout->setContentsMargins(0, 0, 0, 0); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName(QStringLiteral("hboxLayout")); toolClose = new QToolButton(frameFind); - toolClose->setObjectName(QString::fromUtf8("toolClose")); + toolClose->setObjectName(QStringLiteral("toolClose")); const QIcon icon = QIcon(QString::fromUtf8(":/trolltech/assistant/images/close.png")); toolClose->setIcon(icon); toolClose->setAutoRaise(true); @@ -132,7 +132,7 @@ public: hboxLayout->addWidget(toolClose); editFind = new QLineEdit(frameFind); - editFind->setObjectName(QString::fromUtf8("editFind")); + editFind->setObjectName(QStringLiteral("editFind")); QSizePolicy sizePolicy(static_cast(0), static_cast(0)); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); @@ -143,7 +143,7 @@ public: hboxLayout->addWidget(editFind); toolPrevious = new QToolButton(frameFind); - toolPrevious->setObjectName(QString::fromUtf8("toolPrevious")); + toolPrevious->setObjectName(QStringLiteral("toolPrevious")); const QIcon icon1 = QIcon(QString::fromUtf8(":/trolltech/assistant/images/win/previous.png")); toolPrevious->setIcon(icon1); toolPrevious->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); @@ -152,7 +152,7 @@ public: hboxLayout->addWidget(toolPrevious); toolNext = new QToolButton(frameFind); - toolNext->setObjectName(QString::fromUtf8("toolNext")); + toolNext->setObjectName(QStringLiteral("toolNext")); toolNext->setMinimumSize(QSize(0, 0)); const QIcon icon2 = QIcon(QString::fromUtf8(":/trolltech/assistant/images/win/next.png")); toolNext->setIcon(icon2); @@ -163,17 +163,17 @@ public: hboxLayout->addWidget(toolNext); checkCase = new QCheckBox(frameFind); - checkCase->setObjectName(QString::fromUtf8("checkCase")); + checkCase->setObjectName(QStringLiteral("checkCase")); hboxLayout->addWidget(checkCase); checkWholeWords = new QCheckBox(frameFind); - checkWholeWords->setObjectName(QString::fromUtf8("checkWholeWords")); + checkWholeWords->setObjectName(QStringLiteral("checkWholeWords")); hboxLayout->addWidget(checkWholeWords); labelWrapped = new QLabel(frameFind); - labelWrapped->setObjectName(QString::fromUtf8("labelWrapped")); + labelWrapped->setObjectName(QStringLiteral("labelWrapped")); labelWrapped->setMinimumSize(QSize(0, 20)); labelWrapped->setMaximumSize(QSize(105, 20)); labelWrapped->setTextFormat(Qt::RichText); diff --git a/tests/auto/tools/uic/baseline/tablewidgeteditor.ui.h b/tests/auto/tools/uic/baseline/tablewidgeteditor.ui.h index da5357d1fda..50542353c44 100644 --- a/tests/auto/tools/uic/baseline/tablewidgeteditor.ui.h +++ b/tests/auto/tools/uic/baseline/tablewidgeteditor.ui.h @@ -120,28 +120,28 @@ public: void setupUi(QDialog *qdesigner_internal__TableWidgetEditor) { if (qdesigner_internal__TableWidgetEditor->objectName().isEmpty()) - qdesigner_internal__TableWidgetEditor->setObjectName(QString::fromUtf8("qdesigner_internal__TableWidgetEditor")); + qdesigner_internal__TableWidgetEditor->setObjectName(QStringLiteral("qdesigner_internal__TableWidgetEditor")); qdesigner_internal__TableWidgetEditor->resize(591, 455); gridLayout_4 = new QGridLayout(qdesigner_internal__TableWidgetEditor); - gridLayout_4->setObjectName(QString::fromUtf8("gridLayout_4")); + gridLayout_4->setObjectName(QStringLiteral("gridLayout_4")); itemsBox = new QGroupBox(qdesigner_internal__TableWidgetEditor); - itemsBox->setObjectName(QString::fromUtf8("itemsBox")); + itemsBox->setObjectName(QStringLiteral("itemsBox")); gridLayout = new QGridLayout(itemsBox); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); tableWidget = new QTableWidget(itemsBox); - tableWidget->setObjectName(QString::fromUtf8("tableWidget")); + tableWidget->setObjectName(QStringLiteral("tableWidget")); gridLayout->addWidget(tableWidget, 0, 0, 1, 1); horizontalLayout_5 = new QHBoxLayout(); - horizontalLayout_5->setObjectName(QString::fromUtf8("horizontalLayout_5")); + horizontalLayout_5->setObjectName(QStringLiteral("horizontalLayout_5")); label_3 = new QLabel(itemsBox); - label_3->setObjectName(QString::fromUtf8("label_3")); + label_3->setObjectName(QStringLiteral("label_3")); horizontalLayout_5->addWidget(label_3); itemIconSelector = new qdesigner_internal::IconSelector(itemsBox); - itemIconSelector->setObjectName(QString::fromUtf8("itemIconSelector")); + itemIconSelector->setObjectName(QStringLiteral("itemIconSelector")); horizontalLayout_5->addWidget(itemIconSelector); @@ -156,14 +156,14 @@ public: gridLayout_4->addWidget(itemsBox, 0, 0, 1, 1); buttonBox = new QDialogButtonBox(qdesigner_internal__TableWidgetEditor); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName(QStringLiteral("buttonBox")); buttonBox->setOrientation(Qt::Horizontal); buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok); gridLayout_4->addWidget(buttonBox, 1, 0, 1, 2); widget = new QWidget(qdesigner_internal__TableWidgetEditor); - widget->setObjectName(QString::fromUtf8("widget")); + widget->setObjectName(QStringLiteral("widget")); QSizePolicy sizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); @@ -171,13 +171,13 @@ public: widget->setSizePolicy(sizePolicy); verticalLayout = new QVBoxLayout(widget); verticalLayout->setContentsMargins(0, 0, 0, 0); - verticalLayout->setObjectName(QString::fromUtf8("verticalLayout")); + verticalLayout->setObjectName(QStringLiteral("verticalLayout")); columnsBox = new QGroupBox(widget); - columnsBox->setObjectName(QString::fromUtf8("columnsBox")); + columnsBox->setObjectName(QStringLiteral("columnsBox")); gridLayout_2 = new QGridLayout(columnsBox); - gridLayout_2->setObjectName(QString::fromUtf8("gridLayout_2")); + gridLayout_2->setObjectName(QStringLiteral("gridLayout_2")); columnsListWidget = new QListWidget(columnsBox); - columnsListWidget->setObjectName(QString::fromUtf8("columnsListWidget")); + columnsListWidget->setObjectName(QStringLiteral("columnsListWidget")); QSizePolicy sizePolicy1(QSizePolicy::Ignored, QSizePolicy::Expanding); sizePolicy1.setHorizontalStretch(0); sizePolicy1.setVerticalStretch(0); @@ -188,14 +188,14 @@ public: gridLayout_2->addWidget(columnsListWidget, 0, 0, 1, 1); horizontalLayout_3 = new QHBoxLayout(); - horizontalLayout_3->setObjectName(QString::fromUtf8("horizontalLayout_3")); + horizontalLayout_3->setObjectName(QStringLiteral("horizontalLayout_3")); newColumnButton = new QToolButton(columnsBox); - newColumnButton->setObjectName(QString::fromUtf8("newColumnButton")); + newColumnButton->setObjectName(QStringLiteral("newColumnButton")); horizontalLayout_3->addWidget(newColumnButton); deleteColumnButton = new QToolButton(columnsBox); - deleteColumnButton->setObjectName(QString::fromUtf8("deleteColumnButton")); + deleteColumnButton->setObjectName(QStringLiteral("deleteColumnButton")); horizontalLayout_3->addWidget(deleteColumnButton); @@ -204,12 +204,12 @@ public: horizontalLayout_3->addItem(spacerItem); moveColumnUpButton = new QToolButton(columnsBox); - moveColumnUpButton->setObjectName(QString::fromUtf8("moveColumnUpButton")); + moveColumnUpButton->setObjectName(QStringLiteral("moveColumnUpButton")); horizontalLayout_3->addWidget(moveColumnUpButton); moveColumnDownButton = new QToolButton(columnsBox); - moveColumnDownButton->setObjectName(QString::fromUtf8("moveColumnDownButton")); + moveColumnDownButton->setObjectName(QStringLiteral("moveColumnDownButton")); horizontalLayout_3->addWidget(moveColumnDownButton); @@ -217,14 +217,14 @@ public: gridLayout_2->addLayout(horizontalLayout_3, 1, 0, 1, 1); horizontalLayout_2 = new QHBoxLayout(); - horizontalLayout_2->setObjectName(QString::fromUtf8("horizontalLayout_2")); + horizontalLayout_2->setObjectName(QStringLiteral("horizontalLayout_2")); label = new QLabel(columnsBox); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); horizontalLayout_2->addWidget(label); columnIconSelector = new qdesigner_internal::IconSelector(columnsBox); - columnIconSelector->setObjectName(QString::fromUtf8("columnIconSelector")); + columnIconSelector->setObjectName(QStringLiteral("columnIconSelector")); horizontalLayout_2->addWidget(columnIconSelector); @@ -239,11 +239,11 @@ public: verticalLayout->addWidget(columnsBox); rowsBox = new QGroupBox(widget); - rowsBox->setObjectName(QString::fromUtf8("rowsBox")); + rowsBox->setObjectName(QStringLiteral("rowsBox")); gridLayout_3 = new QGridLayout(rowsBox); - gridLayout_3->setObjectName(QString::fromUtf8("gridLayout_3")); + gridLayout_3->setObjectName(QStringLiteral("gridLayout_3")); rowsListWidget = new QListWidget(rowsBox); - rowsListWidget->setObjectName(QString::fromUtf8("rowsListWidget")); + rowsListWidget->setObjectName(QStringLiteral("rowsListWidget")); sizePolicy1.setHeightForWidth(rowsListWidget->sizePolicy().hasHeightForWidth()); rowsListWidget->setSizePolicy(sizePolicy1); rowsListWidget->setFocusPolicy(Qt::TabFocus); @@ -251,14 +251,14 @@ public: gridLayout_3->addWidget(rowsListWidget, 0, 0, 1, 1); horizontalLayout_4 = new QHBoxLayout(); - horizontalLayout_4->setObjectName(QString::fromUtf8("horizontalLayout_4")); + horizontalLayout_4->setObjectName(QStringLiteral("horizontalLayout_4")); newRowButton = new QToolButton(rowsBox); - newRowButton->setObjectName(QString::fromUtf8("newRowButton")); + newRowButton->setObjectName(QStringLiteral("newRowButton")); horizontalLayout_4->addWidget(newRowButton); deleteRowButton = new QToolButton(rowsBox); - deleteRowButton->setObjectName(QString::fromUtf8("deleteRowButton")); + deleteRowButton->setObjectName(QStringLiteral("deleteRowButton")); horizontalLayout_4->addWidget(deleteRowButton); @@ -267,12 +267,12 @@ public: horizontalLayout_4->addItem(spacerItem2); moveRowUpButton = new QToolButton(rowsBox); - moveRowUpButton->setObjectName(QString::fromUtf8("moveRowUpButton")); + moveRowUpButton->setObjectName(QStringLiteral("moveRowUpButton")); horizontalLayout_4->addWidget(moveRowUpButton); moveRowDownButton = new QToolButton(rowsBox); - moveRowDownButton->setObjectName(QString::fromUtf8("moveRowDownButton")); + moveRowDownButton->setObjectName(QStringLiteral("moveRowDownButton")); horizontalLayout_4->addWidget(moveRowDownButton); @@ -280,14 +280,14 @@ public: gridLayout_3->addLayout(horizontalLayout_4, 1, 0, 1, 1); horizontalLayout = new QHBoxLayout(); - horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout")); + horizontalLayout->setObjectName(QStringLiteral("horizontalLayout")); label_2 = new QLabel(rowsBox); - label_2->setObjectName(QString::fromUtf8("label_2")); + label_2->setObjectName(QStringLiteral("label_2")); horizontalLayout->addWidget(label_2); rowIconSelector = new qdesigner_internal::IconSelector(rowsBox); - rowIconSelector->setObjectName(QString::fromUtf8("rowIconSelector")); + rowIconSelector->setObjectName(QStringLiteral("rowIconSelector")); horizontalLayout->addWidget(rowIconSelector); diff --git a/tests/auto/tools/uic/baseline/tetrixwindow.ui.h b/tests/auto/tools/uic/baseline/tetrixwindow.ui.h index 7d29265ba30..48d6a4e6a38 100644 --- a/tests/auto/tools/uic/baseline/tetrixwindow.ui.h +++ b/tests/auto/tools/uic/baseline/tetrixwindow.ui.h @@ -46,7 +46,7 @@ public: void setupUi(QWidget *TetrixWindow) { if (TetrixWindow->objectName().isEmpty()) - TetrixWindow->setObjectName(QString::fromUtf8("TetrixWindow")); + TetrixWindow->setObjectName(QStringLiteral("TetrixWindow")); TetrixWindow->resize(537, 475); vboxLayout = new QVBoxLayout(TetrixWindow); #ifndef Q_OS_MAC @@ -55,7 +55,7 @@ public: #ifndef Q_OS_MAC vboxLayout->setContentsMargins(9, 9, 9, 9); #endif - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); gridLayout = new QGridLayout(); #ifndef Q_OS_MAC gridLayout->setSpacing(6); @@ -63,39 +63,39 @@ public: #ifndef Q_OS_MAC gridLayout->setContentsMargins(0, 0, 0, 0); #endif - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); startButton = new QPushButton(TetrixWindow); - startButton->setObjectName(QString::fromUtf8("startButton")); + startButton->setObjectName(QStringLiteral("startButton")); startButton->setFocusPolicy(Qt::NoFocus); gridLayout->addWidget(startButton, 4, 0, 1, 1); linesLcd = new QLCDNumber(TetrixWindow); - linesLcd->setObjectName(QString::fromUtf8("linesLcd")); + linesLcd->setObjectName(QStringLiteral("linesLcd")); linesLcd->setSegmentStyle(QLCDNumber::Filled); gridLayout->addWidget(linesLcd, 3, 2, 1, 1); linesRemovedLabel = new QLabel(TetrixWindow); - linesRemovedLabel->setObjectName(QString::fromUtf8("linesRemovedLabel")); + linesRemovedLabel->setObjectName(QStringLiteral("linesRemovedLabel")); linesRemovedLabel->setAlignment(Qt::AlignBottom|Qt::AlignHCenter); gridLayout->addWidget(linesRemovedLabel, 2, 2, 1, 1); pauseButton = new QPushButton(TetrixWindow); - pauseButton->setObjectName(QString::fromUtf8("pauseButton")); + pauseButton->setObjectName(QStringLiteral("pauseButton")); pauseButton->setFocusPolicy(Qt::NoFocus); gridLayout->addWidget(pauseButton, 5, 2, 1, 1); scoreLcd = new QLCDNumber(TetrixWindow); - scoreLcd->setObjectName(QString::fromUtf8("scoreLcd")); + scoreLcd->setObjectName(QStringLiteral("scoreLcd")); scoreLcd->setSegmentStyle(QLCDNumber::Filled); gridLayout->addWidget(scoreLcd, 1, 2, 1, 1); board = new TetrixBoard(TetrixWindow); - board->setObjectName(QString::fromUtf8("board")); + board->setObjectName(QStringLiteral("board")); board->setFocusPolicy(Qt::StrongFocus); board->setFrameShape(QFrame::Panel); board->setFrameShadow(QFrame::Sunken); @@ -103,31 +103,31 @@ public: gridLayout->addWidget(board, 0, 1, 6, 1); levelLabel = new QLabel(TetrixWindow); - levelLabel->setObjectName(QString::fromUtf8("levelLabel")); + levelLabel->setObjectName(QStringLiteral("levelLabel")); levelLabel->setAlignment(Qt::AlignBottom|Qt::AlignHCenter); gridLayout->addWidget(levelLabel, 2, 0, 1, 1); nextLabel = new QLabel(TetrixWindow); - nextLabel->setObjectName(QString::fromUtf8("nextLabel")); + nextLabel->setObjectName(QStringLiteral("nextLabel")); nextLabel->setAlignment(Qt::AlignBottom|Qt::AlignHCenter); gridLayout->addWidget(nextLabel, 0, 0, 1, 1); levelLcd = new QLCDNumber(TetrixWindow); - levelLcd->setObjectName(QString::fromUtf8("levelLcd")); + levelLcd->setObjectName(QStringLiteral("levelLcd")); levelLcd->setSegmentStyle(QLCDNumber::Filled); gridLayout->addWidget(levelLcd, 3, 0, 1, 1); scoreLabel = new QLabel(TetrixWindow); - scoreLabel->setObjectName(QString::fromUtf8("scoreLabel")); + scoreLabel->setObjectName(QStringLiteral("scoreLabel")); scoreLabel->setAlignment(Qt::AlignBottom|Qt::AlignHCenter); gridLayout->addWidget(scoreLabel, 0, 2, 1, 1); nextPieceLabel = new QLabel(TetrixWindow); - nextPieceLabel->setObjectName(QString::fromUtf8("nextPieceLabel")); + nextPieceLabel->setObjectName(QStringLiteral("nextPieceLabel")); nextPieceLabel->setFrameShape(QFrame::Box); nextPieceLabel->setFrameShadow(QFrame::Raised); nextPieceLabel->setAlignment(Qt::AlignCenter); @@ -135,7 +135,7 @@ public: gridLayout->addWidget(nextPieceLabel, 1, 0, 1, 1); quitButton = new QPushButton(TetrixWindow); - quitButton->setObjectName(QString::fromUtf8("quitButton")); + quitButton->setObjectName(QStringLiteral("quitButton")); quitButton->setFocusPolicy(Qt::NoFocus); gridLayout->addWidget(quitButton, 4, 2, 1, 1); diff --git a/tests/auto/tools/uic/baseline/textfinder.ui.h b/tests/auto/tools/uic/baseline/textfinder.ui.h index 4d6e57b3f9a..9a5641c3de9 100644 --- a/tests/auto/tools/uic/baseline/textfinder.ui.h +++ b/tests/auto/tools/uic/baseline/textfinder.ui.h @@ -40,7 +40,7 @@ public: void setupUi(QWidget *Form) { if (Form->objectName().isEmpty()) - Form->setObjectName(QString::fromUtf8("Form")); + Form->setObjectName(QStringLiteral("Form")); Form->resize(378, 158); vboxLayout = new QVBoxLayout(Form); #ifndef Q_OS_MAC @@ -49,7 +49,7 @@ public: #ifndef Q_OS_MAC vboxLayout->setContentsMargins(9, 9, 9, 9); #endif - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); gridLayout = new QGridLayout(); #ifndef Q_OS_MAC gridLayout->setSpacing(6); @@ -57,19 +57,19 @@ public: #ifndef Q_OS_MAC gridLayout->setContentsMargins(0, 0, 0, 0); #endif - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); lineEdit = new QLineEdit(Form); - lineEdit->setObjectName(QString::fromUtf8("lineEdit")); + lineEdit->setObjectName(QStringLiteral("lineEdit")); gridLayout->addWidget(lineEdit, 0, 1, 1, 1); searchLabel = new QLabel(Form); - searchLabel->setObjectName(QString::fromUtf8("searchLabel")); + searchLabel->setObjectName(QStringLiteral("searchLabel")); gridLayout->addWidget(searchLabel, 0, 0, 1, 1); findButton = new QPushButton(Form); - findButton->setObjectName(QString::fromUtf8("findButton")); + findButton->setObjectName(QStringLiteral("findButton")); gridLayout->addWidget(findButton, 0, 2, 1, 1); @@ -77,7 +77,7 @@ public: vboxLayout->addLayout(gridLayout); textEdit = new QTextEdit(Form); - textEdit->setObjectName(QString::fromUtf8("textEdit")); + textEdit->setObjectName(QStringLiteral("textEdit")); vboxLayout->addWidget(textEdit); diff --git a/tests/auto/tools/uic/baseline/topicchooser.ui.h b/tests/auto/tools/uic/baseline/topicchooser.ui.h index cf3186c1d93..3b16d5a6271 100644 --- a/tests/auto/tools/uic/baseline/topicchooser.ui.h +++ b/tests/auto/tools/uic/baseline/topicchooser.ui.h @@ -41,7 +41,7 @@ public: void setupUi(QDialog *TopicChooser) { if (TopicChooser->objectName().isEmpty()) - TopicChooser->setObjectName(QString::fromUtf8("TopicChooser")); + TopicChooser->setObjectName(QStringLiteral("TopicChooser")); TopicChooser->resize(391, 223); TopicChooser->setSizeGripEnabled(true); vboxLayout = new QVBoxLayout(TopicChooser); @@ -49,41 +49,41 @@ public: vboxLayout->setSpacing(6); #endif vboxLayout->setContentsMargins(11, 11, 11, 11); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); - vboxLayout->setObjectName(QString::fromUtf8("unnamed")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("unnamed")); label = new QLabel(TopicChooser); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); vboxLayout->addWidget(label); listWidget = new QListWidget(TopicChooser); - listWidget->setObjectName(QString::fromUtf8("listWidget")); + listWidget->setObjectName(QStringLiteral("listWidget")); vboxLayout->addWidget(listWidget); Layout16 = new QWidget(TopicChooser); - Layout16->setObjectName(QString::fromUtf8("Layout16")); + Layout16->setObjectName(QStringLiteral("Layout16")); hboxLayout = new QHBoxLayout(Layout16); #ifndef Q_OS_MAC hboxLayout->setSpacing(6); #endif hboxLayout->setContentsMargins(0, 0, 0, 0); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); - hboxLayout->setObjectName(QString::fromUtf8("unnamed")); + hboxLayout->setObjectName(QStringLiteral("hboxLayout")); + hboxLayout->setObjectName(QStringLiteral("unnamed")); hboxLayout->setContentsMargins(0, 0, 0, 0); Horizontal_Spacing2 = new QSpacerItem(20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); hboxLayout->addItem(Horizontal_Spacing2); buttonDisplay = new QPushButton(Layout16); - buttonDisplay->setObjectName(QString::fromUtf8("buttonDisplay")); + buttonDisplay->setObjectName(QStringLiteral("buttonDisplay")); buttonDisplay->setAutoDefault(true); buttonDisplay->setDefault(true); hboxLayout->addWidget(buttonDisplay); buttonCancel = new QPushButton(Layout16); - buttonCancel->setObjectName(QString::fromUtf8("buttonCancel")); + buttonCancel->setObjectName(QStringLiteral("buttonCancel")); buttonCancel->setAutoDefault(true); hboxLayout->addWidget(buttonCancel); diff --git a/tests/auto/tools/uic/baseline/translatedialog.ui.h b/tests/auto/tools/uic/baseline/translatedialog.ui.h index 8ff12becc9b..d811b13720d 100644 --- a/tests/auto/tools/uic/baseline/translatedialog.ui.h +++ b/tests/auto/tools/uic/baseline/translatedialog.ui.h @@ -96,7 +96,7 @@ public: void setupUi(QDialog *TranslateDialog) { if (TranslateDialog->objectName().isEmpty()) - TranslateDialog->setObjectName(QString::fromUtf8("TranslateDialog")); + TranslateDialog->setObjectName(QStringLiteral("TranslateDialog")); TranslateDialog->resize(407, 145); QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Maximum); sizePolicy.setHorizontalStretch(0); @@ -106,35 +106,35 @@ public: hboxLayout = new QHBoxLayout(TranslateDialog); hboxLayout->setSpacing(6); hboxLayout->setContentsMargins(11, 11, 11, 11); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName(QStringLiteral("hboxLayout")); hboxLayout->setContentsMargins(9, 9, 9, 9); vboxLayout = new QVBoxLayout(); vboxLayout->setSpacing(6); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); vboxLayout->setContentsMargins(0, 0, 0, 0); gridLayout = new QGridLayout(); gridLayout->setSpacing(6); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); gridLayout->setHorizontalSpacing(6); gridLayout->setVerticalSpacing(6); gridLayout->setContentsMargins(0, 0, 0, 0); ledTranslateTo = new QLineEdit(TranslateDialog); - ledTranslateTo->setObjectName(QString::fromUtf8("ledTranslateTo")); + ledTranslateTo->setObjectName(QStringLiteral("ledTranslateTo")); gridLayout->addWidget(ledTranslateTo, 1, 1, 1, 1); findWhat = new QLabel(TranslateDialog); - findWhat->setObjectName(QString::fromUtf8("findWhat")); + findWhat->setObjectName(QStringLiteral("findWhat")); gridLayout->addWidget(findWhat, 0, 0, 1, 1); translateTo = new QLabel(TranslateDialog); - translateTo->setObjectName(QString::fromUtf8("translateTo")); + translateTo->setObjectName(QStringLiteral("translateTo")); gridLayout->addWidget(translateTo, 1, 0, 1, 1); ledFindWhat = new QLineEdit(TranslateDialog); - ledFindWhat->setObjectName(QString::fromUtf8("ledFindWhat")); + ledFindWhat->setObjectName(QStringLiteral("ledFindWhat")); gridLayout->addWidget(ledFindWhat, 0, 1, 1, 1); @@ -142,18 +142,18 @@ public: vboxLayout->addLayout(gridLayout); groupBox = new QGroupBox(TranslateDialog); - groupBox->setObjectName(QString::fromUtf8("groupBox")); + groupBox->setObjectName(QStringLiteral("groupBox")); vboxLayout1 = new QVBoxLayout(groupBox); vboxLayout1->setSpacing(6); vboxLayout1->setContentsMargins(11, 11, 11, 11); - vboxLayout1->setObjectName(QString::fromUtf8("vboxLayout1")); + vboxLayout1->setObjectName(QStringLiteral("vboxLayout1")); ckMatchCase = new QCheckBox(groupBox); - ckMatchCase->setObjectName(QString::fromUtf8("ckMatchCase")); + ckMatchCase->setObjectName(QStringLiteral("ckMatchCase")); vboxLayout1->addWidget(ckMatchCase); ckMarkFinished = new QCheckBox(groupBox); - ckMarkFinished->setObjectName(QString::fromUtf8("ckMarkFinished")); + ckMarkFinished->setObjectName(QStringLiteral("ckMarkFinished")); vboxLayout1->addWidget(ckMarkFinished); @@ -169,27 +169,27 @@ public: vboxLayout2 = new QVBoxLayout(); vboxLayout2->setSpacing(6); - vboxLayout2->setObjectName(QString::fromUtf8("vboxLayout2")); + vboxLayout2->setObjectName(QStringLiteral("vboxLayout2")); vboxLayout2->setContentsMargins(0, 0, 0, 0); findNxt = new QPushButton(TranslateDialog); - findNxt->setObjectName(QString::fromUtf8("findNxt")); + findNxt->setObjectName(QStringLiteral("findNxt")); findNxt->setDefault(true); findNxt->setFlat(false); vboxLayout2->addWidget(findNxt); translate = new QPushButton(TranslateDialog); - translate->setObjectName(QString::fromUtf8("translate")); + translate->setObjectName(QStringLiteral("translate")); vboxLayout2->addWidget(translate); translateAll = new QPushButton(TranslateDialog); - translateAll->setObjectName(QString::fromUtf8("translateAll")); + translateAll->setObjectName(QStringLiteral("translateAll")); vboxLayout2->addWidget(translateAll); cancel = new QPushButton(TranslateDialog); - cancel->setObjectName(QString::fromUtf8("cancel")); + cancel->setObjectName(QStringLiteral("cancel")); vboxLayout2->addWidget(cancel); diff --git a/tests/auto/tools/uic/baseline/translationsettings.ui.h b/tests/auto/tools/uic/baseline/translationsettings.ui.h index 770d43216be..22d764a67a9 100644 --- a/tests/auto/tools/uic/baseline/translationsettings.ui.h +++ b/tests/auto/tools/uic/baseline/translationsettings.ui.h @@ -40,7 +40,7 @@ public: void setupUi(QDialog *TranslationSettings) { if (TranslationSettings->objectName().isEmpty()) - TranslationSettings->setObjectName(QString::fromUtf8("TranslationSettings")); + TranslationSettings->setObjectName(QStringLiteral("TranslationSettings")); TranslationSettings->resize(346, 125); vboxLayout = new QVBoxLayout(TranslationSettings); #ifndef Q_OS_MAC @@ -49,9 +49,9 @@ public: #ifndef Q_OS_MAC vboxLayout->setContentsMargins(9, 9, 9, 9); #endif - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); groupBox = new QGroupBox(TranslationSettings); - groupBox->setObjectName(QString::fromUtf8("groupBox")); + groupBox->setObjectName(QStringLiteral("groupBox")); gridLayout = new QGridLayout(groupBox); #ifndef Q_OS_MAC gridLayout->setSpacing(6); @@ -59,24 +59,24 @@ public: #ifndef Q_OS_MAC gridLayout->setContentsMargins(9, 9, 9, 9); #endif - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); cbLanguageList = new QComboBox(groupBox); - cbLanguageList->setObjectName(QString::fromUtf8("cbLanguageList")); + cbLanguageList->setObjectName(QStringLiteral("cbLanguageList")); gridLayout->addWidget(cbLanguageList, 0, 1, 1, 1); label = new QLabel(groupBox); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); gridLayout->addWidget(label, 0, 0, 1, 1); cbCountryList = new QComboBox(groupBox); - cbCountryList->setObjectName(QString::fromUtf8("cbCountryList")); + cbCountryList->setObjectName(QStringLiteral("cbCountryList")); gridLayout->addWidget(cbCountryList, 1, 1, 1, 1); lblCountry = new QLabel(groupBox); - lblCountry->setObjectName(QString::fromUtf8("lblCountry")); + lblCountry->setObjectName(QStringLiteral("lblCountry")); gridLayout->addWidget(lblCountry, 1, 0, 1, 1); @@ -84,7 +84,7 @@ public: vboxLayout->addWidget(groupBox); buttonBox = new QDialogButtonBox(TranslationSettings); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName(QStringLiteral("buttonBox")); buttonBox->setOrientation(Qt::Horizontal); buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok); diff --git a/tests/auto/tools/uic/baseline/treewidgeteditor.ui.h b/tests/auto/tools/uic/baseline/treewidgeteditor.ui.h index 843737fe597..3f94c2117e0 100644 --- a/tests/auto/tools/uic/baseline/treewidgeteditor.ui.h +++ b/tests/auto/tools/uic/baseline/treewidgeteditor.ui.h @@ -112,34 +112,34 @@ public: void setupUi(QDialog *qdesigner_internal__TreeWidgetEditor) { if (qdesigner_internal__TreeWidgetEditor->objectName().isEmpty()) - qdesigner_internal__TreeWidgetEditor->setObjectName(QString::fromUtf8("qdesigner_internal__TreeWidgetEditor")); + qdesigner_internal__TreeWidgetEditor->setObjectName(QStringLiteral("qdesigner_internal__TreeWidgetEditor")); qdesigner_internal__TreeWidgetEditor->resize(619, 321); gridLayout_3 = new QGridLayout(qdesigner_internal__TreeWidgetEditor); - gridLayout_3->setObjectName(QString::fromUtf8("gridLayout_3")); + gridLayout_3->setObjectName(QStringLiteral("gridLayout_3")); itemsBox = new QGroupBox(qdesigner_internal__TreeWidgetEditor); - itemsBox->setObjectName(QString::fromUtf8("itemsBox")); + itemsBox->setObjectName(QStringLiteral("itemsBox")); gridLayout = new QGridLayout(itemsBox); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); treeWidget = new QTreeWidget(itemsBox); - treeWidget->setObjectName(QString::fromUtf8("treeWidget")); + treeWidget->setObjectName(QStringLiteral("treeWidget")); treeWidget->setFocusPolicy(Qt::TabFocus); gridLayout->addWidget(treeWidget, 0, 0, 1, 1); horizontalLayout_4 = new QHBoxLayout(); - horizontalLayout_4->setObjectName(QString::fromUtf8("horizontalLayout_4")); + horizontalLayout_4->setObjectName(QStringLiteral("horizontalLayout_4")); newItemButton = new QToolButton(itemsBox); - newItemButton->setObjectName(QString::fromUtf8("newItemButton")); + newItemButton->setObjectName(QStringLiteral("newItemButton")); horizontalLayout_4->addWidget(newItemButton); newSubItemButton = new QToolButton(itemsBox); - newSubItemButton->setObjectName(QString::fromUtf8("newSubItemButton")); + newSubItemButton->setObjectName(QStringLiteral("newSubItemButton")); horizontalLayout_4->addWidget(newSubItemButton); deleteItemButton = new QToolButton(itemsBox); - deleteItemButton->setObjectName(QString::fromUtf8("deleteItemButton")); + deleteItemButton->setObjectName(QStringLiteral("deleteItemButton")); horizontalLayout_4->addWidget(deleteItemButton); @@ -148,22 +148,22 @@ public: horizontalLayout_4->addItem(spacerItem); moveItemLeftButton = new QToolButton(itemsBox); - moveItemLeftButton->setObjectName(QString::fromUtf8("moveItemLeftButton")); + moveItemLeftButton->setObjectName(QStringLiteral("moveItemLeftButton")); horizontalLayout_4->addWidget(moveItemLeftButton); moveItemRightButton = new QToolButton(itemsBox); - moveItemRightButton->setObjectName(QString::fromUtf8("moveItemRightButton")); + moveItemRightButton->setObjectName(QStringLiteral("moveItemRightButton")); horizontalLayout_4->addWidget(moveItemRightButton); moveItemUpButton = new QToolButton(itemsBox); - moveItemUpButton->setObjectName(QString::fromUtf8("moveItemUpButton")); + moveItemUpButton->setObjectName(QStringLiteral("moveItemUpButton")); horizontalLayout_4->addWidget(moveItemUpButton); moveItemDownButton = new QToolButton(itemsBox); - moveItemDownButton->setObjectName(QString::fromUtf8("moveItemDownButton")); + moveItemDownButton->setObjectName(QStringLiteral("moveItemDownButton")); horizontalLayout_4->addWidget(moveItemDownButton); @@ -171,14 +171,14 @@ public: gridLayout->addLayout(horizontalLayout_4, 1, 0, 1, 1); horizontalLayout_2 = new QHBoxLayout(); - horizontalLayout_2->setObjectName(QString::fromUtf8("horizontalLayout_2")); + horizontalLayout_2->setObjectName(QStringLiteral("horizontalLayout_2")); label_2 = new QLabel(itemsBox); - label_2->setObjectName(QString::fromUtf8("label_2")); + label_2->setObjectName(QStringLiteral("label_2")); horizontalLayout_2->addWidget(label_2); itemIconSelector = new qdesigner_internal::IconSelector(itemsBox); - itemIconSelector->setObjectName(QString::fromUtf8("itemIconSelector")); + itemIconSelector->setObjectName(QStringLiteral("itemIconSelector")); horizontalLayout_2->addWidget(itemIconSelector); @@ -193,16 +193,16 @@ public: gridLayout_3->addWidget(itemsBox, 0, 0, 1, 1); columnsBox = new QGroupBox(qdesigner_internal__TreeWidgetEditor); - columnsBox->setObjectName(QString::fromUtf8("columnsBox")); + columnsBox->setObjectName(QStringLiteral("columnsBox")); QSizePolicy sizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); sizePolicy.setHeightForWidth(columnsBox->sizePolicy().hasHeightForWidth()); columnsBox->setSizePolicy(sizePolicy); gridLayout_2 = new QGridLayout(columnsBox); - gridLayout_2->setObjectName(QString::fromUtf8("gridLayout_2")); + gridLayout_2->setObjectName(QStringLiteral("gridLayout_2")); listWidget = new QListWidget(columnsBox); - listWidget->setObjectName(QString::fromUtf8("listWidget")); + listWidget->setObjectName(QStringLiteral("listWidget")); QSizePolicy sizePolicy1(QSizePolicy::Ignored, QSizePolicy::Expanding); sizePolicy1.setHorizontalStretch(0); sizePolicy1.setVerticalStretch(0); @@ -213,14 +213,14 @@ public: gridLayout_2->addWidget(listWidget, 0, 0, 1, 1); horizontalLayout_3 = new QHBoxLayout(); - horizontalLayout_3->setObjectName(QString::fromUtf8("horizontalLayout_3")); + horizontalLayout_3->setObjectName(QStringLiteral("horizontalLayout_3")); newColumnButton = new QToolButton(columnsBox); - newColumnButton->setObjectName(QString::fromUtf8("newColumnButton")); + newColumnButton->setObjectName(QStringLiteral("newColumnButton")); horizontalLayout_3->addWidget(newColumnButton); deleteColumnButton = new QToolButton(columnsBox); - deleteColumnButton->setObjectName(QString::fromUtf8("deleteColumnButton")); + deleteColumnButton->setObjectName(QStringLiteral("deleteColumnButton")); horizontalLayout_3->addWidget(deleteColumnButton); @@ -229,12 +229,12 @@ public: horizontalLayout_3->addItem(spacerItem1); moveColumnUpButton = new QToolButton(columnsBox); - moveColumnUpButton->setObjectName(QString::fromUtf8("moveColumnUpButton")); + moveColumnUpButton->setObjectName(QStringLiteral("moveColumnUpButton")); horizontalLayout_3->addWidget(moveColumnUpButton); moveColumnDownButton = new QToolButton(columnsBox); - moveColumnDownButton->setObjectName(QString::fromUtf8("moveColumnDownButton")); + moveColumnDownButton->setObjectName(QStringLiteral("moveColumnDownButton")); horizontalLayout_3->addWidget(moveColumnDownButton); @@ -242,14 +242,14 @@ public: gridLayout_2->addLayout(horizontalLayout_3, 1, 0, 1, 1); horizontalLayout = new QHBoxLayout(); - horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout")); + horizontalLayout->setObjectName(QStringLiteral("horizontalLayout")); label = new QLabel(columnsBox); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); horizontalLayout->addWidget(label); columnIconSelector = new qdesigner_internal::IconSelector(columnsBox); - columnIconSelector->setObjectName(QString::fromUtf8("columnIconSelector")); + columnIconSelector->setObjectName(QStringLiteral("columnIconSelector")); horizontalLayout->addWidget(columnIconSelector); @@ -264,7 +264,7 @@ public: gridLayout_3->addWidget(columnsBox, 0, 1, 1, 1); buttonBox = new QDialogButtonBox(qdesigner_internal__TreeWidgetEditor); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName(QStringLiteral("buttonBox")); buttonBox->setOrientation(Qt::Horizontal); buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok); diff --git a/tests/auto/tools/uic/baseline/trpreviewtool.ui.h b/tests/auto/tools/uic/baseline/trpreviewtool.ui.h index a26ff1c8287..6a705ad455c 100644 --- a/tests/auto/tools/uic/baseline/trpreviewtool.ui.h +++ b/tests/auto/tools/uic/baseline/trpreviewtool.ui.h @@ -95,58 +95,58 @@ public: void setupUi(QMainWindow *TrPreviewToolClass) { if (TrPreviewToolClass->objectName().isEmpty()) - TrPreviewToolClass->setObjectName(QString::fromUtf8("TrPreviewToolClass")); + TrPreviewToolClass->setObjectName(QStringLiteral("TrPreviewToolClass")); TrPreviewToolClass->resize(593, 466); actionOpenForm = new QAction(TrPreviewToolClass); - actionOpenForm->setObjectName(QString::fromUtf8("actionOpenForm")); + actionOpenForm->setObjectName(QStringLiteral("actionOpenForm")); const QIcon icon = QIcon(QString::fromUtf8(":/images/open_form.png")); actionOpenForm->setIcon(icon); actionLoadTranslation = new QAction(TrPreviewToolClass); - actionLoadTranslation->setObjectName(QString::fromUtf8("actionLoadTranslation")); + actionLoadTranslation->setObjectName(QStringLiteral("actionLoadTranslation")); const QIcon icon1 = QIcon(QString::fromUtf8(":/images/load_translation.png")); actionLoadTranslation->setIcon(icon1); actionReloadTranslations = new QAction(TrPreviewToolClass); - actionReloadTranslations->setObjectName(QString::fromUtf8("actionReloadTranslations")); + actionReloadTranslations->setObjectName(QStringLiteral("actionReloadTranslations")); const QIcon icon2 = QIcon(QString::fromUtf8(":/images/reload_translations.png")); actionReloadTranslations->setIcon(icon2); actionClose = new QAction(TrPreviewToolClass); - actionClose->setObjectName(QString::fromUtf8("actionClose")); + actionClose->setObjectName(QStringLiteral("actionClose")); actionAbout = new QAction(TrPreviewToolClass); - actionAbout->setObjectName(QString::fromUtf8("actionAbout")); + actionAbout->setObjectName(QStringLiteral("actionAbout")); actionAbout_Qt = new QAction(TrPreviewToolClass); - actionAbout_Qt->setObjectName(QString::fromUtf8("actionAbout_Qt")); + actionAbout_Qt->setObjectName(QStringLiteral("actionAbout_Qt")); centralWidget = new QWidget(TrPreviewToolClass); - centralWidget->setObjectName(QString::fromUtf8("centralWidget")); + centralWidget->setObjectName(QStringLiteral("centralWidget")); TrPreviewToolClass->setCentralWidget(centralWidget); menuBar = new QMenuBar(TrPreviewToolClass); - menuBar->setObjectName(QString::fromUtf8("menuBar")); + menuBar->setObjectName(QStringLiteral("menuBar")); menuBar->setGeometry(QRect(0, 0, 593, 21)); menuView = new QMenu(menuBar); - menuView->setObjectName(QString::fromUtf8("menuView")); + menuView->setObjectName(QStringLiteral("menuView")); menuViewViews = new QMenu(menuView); - menuViewViews->setObjectName(QString::fromUtf8("menuViewViews")); + menuViewViews->setObjectName(QStringLiteral("menuViewViews")); menuHelp = new QMenu(menuBar); - menuHelp->setObjectName(QString::fromUtf8("menuHelp")); + menuHelp->setObjectName(QStringLiteral("menuHelp")); menuFile = new QMenu(menuBar); - menuFile->setObjectName(QString::fromUtf8("menuFile")); + menuFile->setObjectName(QStringLiteral("menuFile")); TrPreviewToolClass->setMenuBar(menuBar); mainToolBar = new QToolBar(TrPreviewToolClass); - mainToolBar->setObjectName(QString::fromUtf8("mainToolBar")); + mainToolBar->setObjectName(QStringLiteral("mainToolBar")); mainToolBar->setOrientation(Qt::Horizontal); TrPreviewToolClass->addToolBar(static_cast(4), mainToolBar); statusBar = new QStatusBar(TrPreviewToolClass); - statusBar->setObjectName(QString::fromUtf8("statusBar")); + statusBar->setObjectName(QStringLiteral("statusBar")); TrPreviewToolClass->setStatusBar(statusBar); dwForms = new QDockWidget(TrPreviewToolClass); - dwForms->setObjectName(QString::fromUtf8("dwForms")); + dwForms->setObjectName(QStringLiteral("dwForms")); dockWidgetContents = new QWidget(); - dockWidgetContents->setObjectName(QString::fromUtf8("dockWidgetContents")); + dockWidgetContents->setObjectName(QStringLiteral("dockWidgetContents")); vboxLayout = new QVBoxLayout(dockWidgetContents); vboxLayout->setSpacing(0); vboxLayout->setContentsMargins(0, 0, 0, 0); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); viewForms = new QListView(dockWidgetContents); - viewForms->setObjectName(QString::fromUtf8("viewForms")); + viewForms->setObjectName(QStringLiteral("viewForms")); viewForms->setEditTriggers(QAbstractItemView::NoEditTriggers); viewForms->setAlternatingRowColors(true); viewForms->setUniformItemSizes(true); diff --git a/tests/auto/tools/uic/baseline/validators.ui.h b/tests/auto/tools/uic/baseline/validators.ui.h index 12b8ff09f3d..374f547cc6a 100644 --- a/tests/auto/tools/uic/baseline/validators.ui.h +++ b/tests/auto/tools/uic/baseline/validators.ui.h @@ -80,7 +80,7 @@ public: void setupUi(QWidget *ValidatorsForm) { if (ValidatorsForm->objectName().isEmpty()) - ValidatorsForm->setObjectName(QString::fromUtf8("ValidatorsForm")); + ValidatorsForm->setObjectName(QStringLiteral("ValidatorsForm")); ValidatorsForm->resize(526, 668); vboxLayout = new QVBoxLayout(ValidatorsForm); #ifndef Q_OS_MAC @@ -89,7 +89,7 @@ public: #ifndef Q_OS_MAC vboxLayout->setContentsMargins(9, 9, 9, 9); #endif - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); hboxLayout = new QHBoxLayout(); #ifndef Q_OS_MAC hboxLayout->setSpacing(6); @@ -97,9 +97,9 @@ public: #ifndef Q_OS_MAC hboxLayout->setContentsMargins(0, 0, 0, 0); #endif - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName(QStringLiteral("hboxLayout")); localeSelector = new LocaleSelector(ValidatorsForm); - localeSelector->setObjectName(QString::fromUtf8("localeSelector")); + localeSelector->setObjectName(QStringLiteral("localeSelector")); hboxLayout->addWidget(localeSelector); @@ -111,7 +111,7 @@ public: vboxLayout->addLayout(hboxLayout); groupBox = new QGroupBox(ValidatorsForm); - groupBox->setObjectName(QString::fromUtf8("groupBox")); + groupBox->setObjectName(QStringLiteral("groupBox")); vboxLayout1 = new QVBoxLayout(groupBox); #ifndef Q_OS_MAC vboxLayout1->setSpacing(6); @@ -119,7 +119,7 @@ public: #ifndef Q_OS_MAC vboxLayout1->setContentsMargins(9, 9, 9, 9); #endif - vboxLayout1->setObjectName(QString::fromUtf8("vboxLayout1")); + vboxLayout1->setObjectName(QStringLiteral("vboxLayout1")); hboxLayout1 = new QHBoxLayout(); #ifndef Q_OS_MAC hboxLayout1->setSpacing(6); @@ -127,7 +127,7 @@ public: #ifndef Q_OS_MAC hboxLayout1->setContentsMargins(0, 0, 0, 0); #endif - hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1")); + hboxLayout1->setObjectName(QStringLiteral("hboxLayout1")); gridLayout = new QGridLayout(); #ifndef Q_OS_MAC gridLayout->setSpacing(6); @@ -135,15 +135,15 @@ public: #ifndef Q_OS_MAC gridLayout->setContentsMargins(0, 0, 0, 0); #endif - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); label = new QLabel(groupBox); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); label->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); gridLayout->addWidget(label, 0, 0, 1, 1); minVal = new QSpinBox(groupBox); - minVal->setObjectName(QString::fromUtf8("minVal")); + minVal->setObjectName(QStringLiteral("minVal")); QSizePolicy sizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed); sizePolicy.setHorizontalStretch(1); sizePolicy.setVerticalStretch(0); @@ -155,13 +155,13 @@ public: gridLayout->addWidget(minVal, 0, 1, 1, 1); label_2 = new QLabel(groupBox); - label_2->setObjectName(QString::fromUtf8("label_2")); + label_2->setObjectName(QStringLiteral("label_2")); label_2->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); gridLayout->addWidget(label_2, 1, 0, 1, 1); maxVal = new QSpinBox(groupBox); - maxVal->setObjectName(QString::fromUtf8("maxVal")); + maxVal->setObjectName(QStringLiteral("maxVal")); sizePolicy.setHeightForWidth(maxVal->sizePolicy().hasHeightForWidth()); maxVal->setSizePolicy(sizePolicy); maxVal->setMinimum(-1000000); @@ -174,7 +174,7 @@ public: hboxLayout1->addLayout(gridLayout); frame = new QFrame(groupBox); - frame->setObjectName(QString::fromUtf8("frame")); + frame->setObjectName(QStringLiteral("frame")); frame->setFrameShape(QFrame::StyledPanel); frame->setFrameShadow(QFrame::Sunken); vboxLayout2 = new QVBoxLayout(frame); @@ -184,9 +184,9 @@ public: #ifndef Q_OS_MAC vboxLayout2->setContentsMargins(9, 9, 9, 9); #endif - vboxLayout2->setObjectName(QString::fromUtf8("vboxLayout2")); + vboxLayout2->setObjectName(QStringLiteral("vboxLayout2")); ledWidget = new LEDWidget(frame); - ledWidget->setObjectName(QString::fromUtf8("ledWidget")); + ledWidget->setObjectName(QStringLiteral("ledWidget")); QSizePolicy sizePolicy1(QSizePolicy::Preferred, QSizePolicy::Fixed); sizePolicy1.setHorizontalStretch(0); sizePolicy1.setVerticalStretch(0); @@ -198,7 +198,7 @@ public: vboxLayout2->addWidget(ledWidget); label_7 = new QLabel(frame); - label_7->setObjectName(QString::fromUtf8("label_7")); + label_7->setObjectName(QStringLiteral("label_7")); vboxLayout2->addWidget(label_7); @@ -213,7 +213,7 @@ public: vboxLayout1->addItem(spacerItem1); editor = new QLineEdit(groupBox); - editor->setObjectName(QString::fromUtf8("editor")); + editor->setObjectName(QStringLiteral("editor")); vboxLayout1->addWidget(editor); @@ -221,7 +221,7 @@ public: vboxLayout->addWidget(groupBox); groupBox_2 = new QGroupBox(ValidatorsForm); - groupBox_2->setObjectName(QString::fromUtf8("groupBox_2")); + groupBox_2->setObjectName(QStringLiteral("groupBox_2")); vboxLayout3 = new QVBoxLayout(groupBox_2); #ifndef Q_OS_MAC vboxLayout3->setSpacing(6); @@ -229,7 +229,7 @@ public: #ifndef Q_OS_MAC vboxLayout3->setContentsMargins(9, 9, 9, 9); #endif - vboxLayout3->setObjectName(QString::fromUtf8("vboxLayout3")); + vboxLayout3->setObjectName(QStringLiteral("vboxLayout3")); hboxLayout2 = new QHBoxLayout(); #ifndef Q_OS_MAC hboxLayout2->setSpacing(6); @@ -237,7 +237,7 @@ public: #ifndef Q_OS_MAC hboxLayout2->setContentsMargins(0, 0, 0, 0); #endif - hboxLayout2->setObjectName(QString::fromUtf8("hboxLayout2")); + hboxLayout2->setObjectName(QStringLiteral("hboxLayout2")); gridLayout1 = new QGridLayout(); #ifndef Q_OS_MAC gridLayout1->setSpacing(6); @@ -245,15 +245,15 @@ public: #ifndef Q_OS_MAC gridLayout1->setContentsMargins(0, 0, 0, 0); #endif - gridLayout1->setObjectName(QString::fromUtf8("gridLayout1")); + gridLayout1->setObjectName(QStringLiteral("gridLayout1")); label_3 = new QLabel(groupBox_2); - label_3->setObjectName(QString::fromUtf8("label_3")); + label_3->setObjectName(QStringLiteral("label_3")); label_3->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); gridLayout1->addWidget(label_3, 0, 0, 1, 1); doubleMinVal = new QDoubleSpinBox(groupBox_2); - doubleMinVal->setObjectName(QString::fromUtf8("doubleMinVal")); + doubleMinVal->setObjectName(QStringLiteral("doubleMinVal")); sizePolicy.setHeightForWidth(doubleMinVal->sizePolicy().hasHeightForWidth()); doubleMinVal->setSizePolicy(sizePolicy); doubleMinVal->setMinimum(-100000); @@ -263,24 +263,24 @@ public: gridLayout1->addWidget(doubleMinVal, 0, 1, 1, 1); label_5 = new QLabel(groupBox_2); - label_5->setObjectName(QString::fromUtf8("label_5")); + label_5->setObjectName(QStringLiteral("label_5")); label_5->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); gridLayout1->addWidget(label_5, 0, 2, 1, 1); doubleFormat = new QComboBox(groupBox_2); - doubleFormat->setObjectName(QString::fromUtf8("doubleFormat")); + doubleFormat->setObjectName(QStringLiteral("doubleFormat")); gridLayout1->addWidget(doubleFormat, 0, 3, 1, 1); label_4 = new QLabel(groupBox_2); - label_4->setObjectName(QString::fromUtf8("label_4")); + label_4->setObjectName(QStringLiteral("label_4")); label_4->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); gridLayout1->addWidget(label_4, 1, 0, 1, 1); doubleMaxVal = new QDoubleSpinBox(groupBox_2); - doubleMaxVal->setObjectName(QString::fromUtf8("doubleMaxVal")); + doubleMaxVal->setObjectName(QStringLiteral("doubleMaxVal")); sizePolicy.setHeightForWidth(doubleMaxVal->sizePolicy().hasHeightForWidth()); doubleMaxVal->setSizePolicy(sizePolicy); doubleMaxVal->setMinimum(-100000); @@ -290,13 +290,13 @@ public: gridLayout1->addWidget(doubleMaxVal, 1, 1, 1, 1); label_6 = new QLabel(groupBox_2); - label_6->setObjectName(QString::fromUtf8("label_6")); + label_6->setObjectName(QStringLiteral("label_6")); label_6->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); gridLayout1->addWidget(label_6, 1, 2, 1, 1); doubleDecimals = new QSpinBox(groupBox_2); - doubleDecimals->setObjectName(QString::fromUtf8("doubleDecimals")); + doubleDecimals->setObjectName(QStringLiteral("doubleDecimals")); doubleDecimals->setValue(2); gridLayout1->addWidget(doubleDecimals, 1, 3, 1, 1); @@ -305,7 +305,7 @@ public: hboxLayout2->addLayout(gridLayout1); frame_2 = new QFrame(groupBox_2); - frame_2->setObjectName(QString::fromUtf8("frame_2")); + frame_2->setObjectName(QStringLiteral("frame_2")); frame_2->setFrameShape(QFrame::StyledPanel); frame_2->setFrameShadow(QFrame::Sunken); vboxLayout4 = new QVBoxLayout(frame_2); @@ -315,16 +315,16 @@ public: #ifndef Q_OS_MAC vboxLayout4->setContentsMargins(9, 9, 9, 9); #endif - vboxLayout4->setObjectName(QString::fromUtf8("vboxLayout4")); + vboxLayout4->setObjectName(QStringLiteral("vboxLayout4")); doubleLedWidget = new LEDWidget(frame_2); - doubleLedWidget->setObjectName(QString::fromUtf8("doubleLedWidget")); + doubleLedWidget->setObjectName(QStringLiteral("doubleLedWidget")); doubleLedWidget->setPixmap(QPixmap(QString::fromUtf8(":/ledoff.png"))); doubleLedWidget->setAlignment(Qt::AlignCenter); vboxLayout4->addWidget(doubleLedWidget); label_8 = new QLabel(frame_2); - label_8->setObjectName(QString::fromUtf8("label_8")); + label_8->setObjectName(QStringLiteral("label_8")); vboxLayout4->addWidget(label_8); @@ -339,7 +339,7 @@ public: vboxLayout3->addItem(spacerItem2); doubleEditor = new QLineEdit(groupBox_2); - doubleEditor->setObjectName(QString::fromUtf8("doubleEditor")); + doubleEditor->setObjectName(QStringLiteral("doubleEditor")); vboxLayout3->addWidget(doubleEditor); @@ -355,13 +355,13 @@ public: hboxLayout3->setSpacing(6); #endif hboxLayout3->setContentsMargins(0, 0, 0, 0); - hboxLayout3->setObjectName(QString::fromUtf8("hboxLayout3")); + hboxLayout3->setObjectName(QStringLiteral("hboxLayout3")); spacerItem4 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); hboxLayout3->addItem(spacerItem4); pushButton = new QPushButton(ValidatorsForm); - pushButton->setObjectName(QString::fromUtf8("pushButton")); + pushButton->setObjectName(QStringLiteral("pushButton")); hboxLayout3->addWidget(pushButton); diff --git a/tests/auto/tools/uic/baseline/wateringconfigdialog.ui.h b/tests/auto/tools/uic/baseline/wateringconfigdialog.ui.h index 1a17d16efe8..f03ac32151f 100644 --- a/tests/auto/tools/uic/baseline/wateringconfigdialog.ui.h +++ b/tests/auto/tools/uic/baseline/wateringconfigdialog.ui.h @@ -68,19 +68,19 @@ public: void setupUi(QDialog *WateringConfigDialog) { if (WateringConfigDialog->objectName().isEmpty()) - WateringConfigDialog->setObjectName(QString::fromUtf8("WateringConfigDialog")); + WateringConfigDialog->setObjectName(QStringLiteral("WateringConfigDialog")); WateringConfigDialog->resize(334, 550); vboxLayout = new QVBoxLayout(WateringConfigDialog); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); gridLayout = new QGridLayout(); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); label_3 = new QLabel(WateringConfigDialog); - label_3->setObjectName(QString::fromUtf8("label_3")); + label_3->setObjectName(QStringLiteral("label_3")); gridLayout->addWidget(label_3, 0, 0, 1, 1); plantComboBox = new QComboBox(WateringConfigDialog); - plantComboBox->setObjectName(QString::fromUtf8("plantComboBox")); + plantComboBox->setObjectName(QStringLiteral("plantComboBox")); QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); @@ -94,12 +94,12 @@ public: gridLayout->addItem(spacerItem, 1, 0, 1, 1); label_2 = new QLabel(WateringConfigDialog); - label_2->setObjectName(QString::fromUtf8("label_2")); + label_2->setObjectName(QStringLiteral("label_2")); gridLayout->addWidget(label_2, 2, 0, 1, 1); temperatureCheckBox = new QCheckBox(WateringConfigDialog); - temperatureCheckBox->setObjectName(QString::fromUtf8("temperatureCheckBox")); + temperatureCheckBox->setObjectName(QStringLiteral("temperatureCheckBox")); gridLayout->addWidget(temperatureCheckBox, 3, 1, 1, 3); @@ -108,7 +108,7 @@ public: gridLayout->addItem(spacerItem1, 4, 1, 1, 1); temperatureSpinBox = new QSpinBox(WateringConfigDialog); - temperatureSpinBox->setObjectName(QString::fromUtf8("temperatureSpinBox")); + temperatureSpinBox->setObjectName(QStringLiteral("temperatureSpinBox")); temperatureSpinBox->setEnabled(false); temperatureSpinBox->setMinimum(10); temperatureSpinBox->setMaximum(60); @@ -121,7 +121,7 @@ public: gridLayout->addItem(spacerItem2, 4, 3, 1, 1); rainCheckBox = new QCheckBox(WateringConfigDialog); - rainCheckBox->setObjectName(QString::fromUtf8("rainCheckBox")); + rainCheckBox->setObjectName(QStringLiteral("rainCheckBox")); gridLayout->addWidget(rainCheckBox, 5, 1, 1, 3); @@ -130,7 +130,7 @@ public: gridLayout->addItem(spacerItem3, 6, 1, 1, 1); rainSpinBox = new QSpinBox(WateringConfigDialog); - rainSpinBox->setObjectName(QString::fromUtf8("rainSpinBox")); + rainSpinBox->setObjectName(QStringLiteral("rainSpinBox")); rainSpinBox->setEnabled(false); rainSpinBox->setMinimum(1); @@ -145,22 +145,22 @@ public: gridLayout->addItem(spacerItem5, 7, 2, 1, 1); label = new QLabel(WateringConfigDialog); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); gridLayout->addWidget(label, 8, 0, 1, 1); startTimeEdit = new QTimeEdit(WateringConfigDialog); - startTimeEdit->setObjectName(QString::fromUtf8("startTimeEdit")); + startTimeEdit->setObjectName(QStringLiteral("startTimeEdit")); gridLayout->addWidget(startTimeEdit, 8, 1, 1, 3); label_4 = new QLabel(WateringConfigDialog); - label_4->setObjectName(QString::fromUtf8("label_4")); + label_4->setObjectName(QStringLiteral("label_4")); gridLayout->addWidget(label_4, 9, 0, 1, 1); amountSpinBox = new QSpinBox(WateringConfigDialog); - amountSpinBox->setObjectName(QString::fromUtf8("amountSpinBox")); + amountSpinBox->setObjectName(QStringLiteral("amountSpinBox")); amountSpinBox->setMinimum(100); amountSpinBox->setMaximum(10000); amountSpinBox->setSingleStep(100); @@ -169,22 +169,22 @@ public: gridLayout->addWidget(amountSpinBox, 9, 1, 1, 3); label_5 = new QLabel(WateringConfigDialog); - label_5->setObjectName(QString::fromUtf8("label_5")); + label_5->setObjectName(QStringLiteral("label_5")); gridLayout->addWidget(label_5, 10, 0, 1, 1); sourceComboBox = new QComboBox(WateringConfigDialog); - sourceComboBox->setObjectName(QString::fromUtf8("sourceComboBox")); + sourceComboBox->setObjectName(QStringLiteral("sourceComboBox")); gridLayout->addWidget(sourceComboBox, 10, 1, 1, 3); label_6 = new QLabel(WateringConfigDialog); - label_6->setObjectName(QString::fromUtf8("label_6")); + label_6->setObjectName(QStringLiteral("label_6")); gridLayout->addWidget(label_6, 11, 0, 1, 1); filterCheckBox = new QCheckBox(WateringConfigDialog); - filterCheckBox->setObjectName(QString::fromUtf8("filterCheckBox")); + filterCheckBox->setObjectName(QStringLiteral("filterCheckBox")); gridLayout->addWidget(filterCheckBox, 11, 1, 1, 2); @@ -200,18 +200,18 @@ public: vboxLayout->addLayout(gridLayout); gridLayout1 = new QGridLayout(); - gridLayout1->setObjectName(QString::fromUtf8("gridLayout1")); + gridLayout1->setObjectName(QStringLiteral("gridLayout1")); spacerItem8 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); gridLayout1->addItem(spacerItem8, 0, 1, 1, 1); helpBrowser = new HelpBrowser(WateringConfigDialog); - helpBrowser->setObjectName(QString::fromUtf8("helpBrowser")); + helpBrowser->setObjectName(QStringLiteral("helpBrowser")); gridLayout1->addWidget(helpBrowser, 1, 0, 1, 2); helpLabel = new QLabel(WateringConfigDialog); - helpLabel->setObjectName(QString::fromUtf8("helpLabel")); + helpLabel->setObjectName(QStringLiteral("helpLabel")); gridLayout1->addWidget(helpLabel, 0, 0, 1, 1); @@ -219,14 +219,14 @@ public: vboxLayout->addLayout(gridLayout1); line = new QFrame(WateringConfigDialog); - line->setObjectName(QString::fromUtf8("line")); + line->setObjectName(QStringLiteral("line")); line->setFrameShape(QFrame::HLine); line->setFrameShadow(QFrame::Sunken); vboxLayout->addWidget(line); buttonBox = new QDialogButtonBox(WateringConfigDialog); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName(QStringLiteral("buttonBox")); buttonBox->setOrientation(Qt::Horizontal); buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok); diff --git a/tests/auto/widgets/dialogs/qcolordialog/tst_qcolordialog.cpp b/tests/auto/widgets/dialogs/qcolordialog/tst_qcolordialog.cpp index 31fab971a07..ff34b009e94 100644 --- a/tests/auto/widgets/dialogs/qcolordialog/tst_qcolordialog.cpp +++ b/tests/auto/widgets/dialogs/qcolordialog/tst_qcolordialog.cpp @@ -100,6 +100,9 @@ tst_QColorDialog::~tst_QColorDialog() void tst_QColorDialog::native_activeModalWidget() { +#ifdef Q_OS_MAC + QSKIP("Test hangs on Mac OS X, see QTBUG-24320"); +#endif // Check that QApplication::activeModalWidget retruns the // color dialog when it is executing, even when using a native // dialog: @@ -153,6 +156,9 @@ void tst_QColorDialog::task247349_alpha() dialog.setOption(QColorDialog::ShowAlphaChannel, true); int alpha = 0x17; dialog.setCurrentColor(QColor(0x01, 0x02, 0x03, alpha)); +#ifdef Q_OS_MAC + QEXPECT_FAIL("", "Fails on Mac OS X, see QTBUG-24320", Abort); +#endif QCOMPARE(alpha, dialog.currentColor().alpha()); QCOMPARE(alpha, qAlpha(dialog.currentColor().rgba())); } diff --git a/tests/auto/widgets/dialogs/qdialog/tst_qdialog.cpp b/tests/auto/widgets/dialogs/qdialog/tst_qdialog.cpp index b332fb40f8e..e46d9050224 100644 --- a/tests/auto/widgets/dialogs/qdialog/tst_qdialog.cpp +++ b/tests/auto/widgets/dialogs/qdialog/tst_qdialog.cpp @@ -440,7 +440,7 @@ public slots: void tst_QDialog::throwInExec() { -#if defined(Q_OS_MAC) || (defined(Q_WS_WINCE) && defined(_ARM_)) +#if defined(Q_OS_MAC) || (defined(Q_OS_WINCE) && defined(_ARM_)) QSKIP("Throwing exceptions in exec() is not supported on this platform."); #endif #if defined(Q_OS_LINUX) diff --git a/tests/auto/widgets/dialogs/qfiledialog2/tst_qfiledialog2.cpp b/tests/auto/widgets/dialogs/qfiledialog2/tst_qfiledialog2.cpp index 472469e7970..7ab3100cabc 100644 --- a/tests/auto/widgets/dialogs/qfiledialog2/tst_qfiledialog2.cpp +++ b/tests/auto/widgets/dialogs/qfiledialog2/tst_qfiledialog2.cpp @@ -559,9 +559,39 @@ void tst_QFileDialog2::completionOnLevelAfterRoot() { QNonNativeFileDialog fd; #if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) - fd.setDirectory("C:"); + fd.setDirectory("C:/"); QDir current = fd.directory(); - current.mkdir("completionOnLevelAfterRootTest"); + QStringList entryList = current.entryList(QStringList(), QDir::Dirs); + // Find a suitable test dir under c:-root: + // - At least 6 characters long + // - Ascii, letters only + // - No another dir with same start + QString testDir; + foreach (const QString &entry, entryList) { + if (entry.size() > 5 && QString(entry.toAscii()).compare(entry) == 0) { + bool invalid = false; + for (int i = 0; i < 5; i++) { + if (!entry.at(i).isLetter()) { + invalid = true; + break; + } + } + if (!invalid) { + foreach (const QString &check, entryList) { + if (check.startsWith(entry.left(5)) && check != entry) { + invalid = true; + break; + } + } + } + if (!invalid) { + testDir = entry; + break; + } + } + } + if (testDir.isEmpty()) + QSKIP("This test requires to have an unique directory of at least six ascii characters under c:/"); #else fd.setFilter(QDir::Hidden | QDir::AllDirs | QDir::Files | QDir::System); fd.setDirectory("/"); @@ -574,11 +604,8 @@ void tst_QFileDialog2::completionOnLevelAfterRoot() QTest::qWait(2000); #if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) //I love testlib :D - QTest::keyClick(edit, Qt::Key_C); - QTest::keyClick(edit, Qt::Key_O); - QTest::keyClick(edit, Qt::Key_M); - QTest::keyClick(edit, Qt::Key_P); - QTest::keyClick(edit, Qt::Key_L); + for (int i = 0; i < 5; i++) + QTest::keyClick(edit, testDir.at(i).toLower().toAscii() - 'a' + Qt::Key_A); #else QTest::keyClick(edit, Qt::Key_E); QTest::keyClick(edit, Qt::Key_T); @@ -587,8 +614,7 @@ void tst_QFileDialog2::completionOnLevelAfterRoot() QTest::keyClick(edit->completer()->popup(), Qt::Key_Down); QTest::qWait(200); #if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) - QCOMPARE(edit->text(), QString("completionOnLevelAfterRootTest")); - current.rmdir("completionOnLevelAfterRootTest"); + QCOMPARE(edit->text(), testDir); #else QTRY_COMPARE(edit->text(), QString("etc")); #endif diff --git a/tests/auto/widgets/dialogs/qfilesystemmodel/qfilesystemmodel.pro b/tests/auto/widgets/dialogs/qfilesystemmodel/qfilesystemmodel.pro index 166306757c2..6e08e2d02bd 100644 --- a/tests/auto/widgets/dialogs/qfilesystemmodel/qfilesystemmodel.pro +++ b/tests/auto/widgets/dialogs/qfilesystemmodel/qfilesystemmodel.pro @@ -5,3 +5,5 @@ QT += core-private gui testlib SOURCES += tst_qfilesystemmodel.cpp TARGET = tst_qfilesystemmodel + +win32:CONFIG += insignificant_test # QTBUG-24291 diff --git a/tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp b/tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp index ea4eed54d2a..8724bf63c87 100644 --- a/tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp +++ b/tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp @@ -240,6 +240,9 @@ void tst_QFileSystemModel::naturalCompare_data() QTest::addColumn("caseSensitive"); QTest::addColumn("result"); QTest::addColumn("swap"); + +#define ROWNAME(name) (qPrintable(QString("prefix=%1, postfix=%2, num=%3, i=%4, test=%5").arg(prefix).arg(postfix).arg(num).arg(i).arg(name))) + for (int j = 0; j < 4; ++j) { // <- set a prefix and a postfix string (not numbers) QString prefix = (j == 0 || j == 1) ? "b" : ""; QString postfix = (j == 1 || j == 2) ? "y" : ""; @@ -248,32 +251,33 @@ void tst_QFileSystemModel::naturalCompare_data() QString num = QString("%1").arg(k); QString nump = QString("%1").arg(k + 1); for (int i = 10; i < 12; ++i) { // <- swap s1 and s2 and reverse the result - QTest::newRow("basic") << prefix + "0" + postfix << prefix + "0" + postfix << int(Qt::CaseInsensitive) << 0; + QTest::newRow(ROWNAME("basic")) << prefix + "0" + postfix << prefix + "0" + postfix << int(Qt::CaseInsensitive) << 0; // s1 should always be less then s2 - QTest::newRow("just text") << prefix + "fred" + postfix << prefix + "jane" + postfix << int(Qt::CaseInsensitive) << i; - QTest::newRow("just numbers") << prefix + num + postfix << prefix + "9" + postfix << int(Qt::CaseInsensitive) << i; - QTest::newRow("zero") << prefix + num + postfix << prefix + "0" + nump + postfix << int(Qt::CaseInsensitive) << i; - QTest::newRow("space b") << prefix + num + postfix << prefix + " " + nump + postfix << int(Qt::CaseInsensitive) << i; - QTest::newRow("space a") << prefix + num + postfix << prefix + nump + " " + postfix << int(Qt::CaseInsensitive) << i; - QTest::newRow("tab b") << prefix + num + postfix << prefix + " " + nump + postfix << int(Qt::CaseInsensitive) << i; - QTest::newRow("tab a") << prefix + num + postfix << prefix + nump + " " + postfix << int(Qt::CaseInsensitive) << i; - QTest::newRow("10 vs 2") << prefix + num + postfix << prefix + "10" + postfix << int(Qt::CaseInsensitive) << i; - QTest::newRow("diff len") << prefix + num + postfix << prefix + nump + postfix + "x" << int(Qt::CaseInsensitive) << i; - QTest::newRow("01 before 1") << prefix + "0" + num + postfix << prefix + nump + postfix << int(Qt::CaseInsensitive) << i; - QTest::newRow("mul nums 2nd") << prefix + "1-" + num + postfix << prefix + "1-" + nump + postfix << int(Qt::CaseInsensitive) << i; - QTest::newRow("mul nums 2nd") << prefix + "10-" + num + postfix<< prefix + "10-10" + postfix << int(Qt::CaseInsensitive) << i; - QTest::newRow("mul nums 2nd") << prefix + "10-0"+ num + postfix<< prefix + "10-10" + postfix << int(Qt::CaseInsensitive) << i; - QTest::newRow("mul nums 2nd") << prefix + "10-" + num + postfix<< prefix + "10-010" + postfix << int(Qt::CaseInsensitive) << i; - QTest::newRow("mul nums big") << prefix + "10-" + num + postfix<< prefix + "20-0" + postfix << int(Qt::CaseInsensitive) << i; - QTest::newRow("mul nums big") << prefix + "2-" + num + postfix << prefix + "10-0" + postfix << int(Qt::CaseInsensitive) << i; - QTest::newRow("mul alphabet") << prefix + num + "-a" + postfix << prefix + num + "-c" + postfix << int(Qt::CaseInsensitive) << i; - QTest::newRow("mul alphabet2")<< prefix + num + "-a9" + postfix<< prefix + num + "-c0" + postfix << int(Qt::CaseInsensitive) << i; - QTest::newRow("mul nums w\\0")<< prefix + num + "-"+ num + postfix<< prefix + num+"-0"+nump + postfix << int(Qt::CaseInsensitive) << i; - QTest::newRow("num first") << prefix + num + postfix << prefix + "a" + postfix << int(Qt::CaseInsensitive) << i; + QTest::newRow(ROWNAME("just text")) << prefix + "fred" + postfix << prefix + "jane" + postfix << int(Qt::CaseInsensitive) << i; + QTest::newRow(ROWNAME("just numbers")) << prefix + num + postfix << prefix + "9" + postfix << int(Qt::CaseInsensitive) << i; + QTest::newRow(ROWNAME("zero")) << prefix + num + postfix << prefix + "0" + nump + postfix << int(Qt::CaseInsensitive) << i; + QTest::newRow(ROWNAME("space b")) << prefix + num + postfix << prefix + " " + nump + postfix << int(Qt::CaseInsensitive) << i; + QTest::newRow(ROWNAME("space a")) << prefix + num + postfix << prefix + nump + " " + postfix << int(Qt::CaseInsensitive) << i; + QTest::newRow(ROWNAME("tab b")) << prefix + num + postfix << prefix + " " + nump + postfix << int(Qt::CaseInsensitive) << i; + QTest::newRow(ROWNAME("tab a")) << prefix + num + postfix << prefix + nump + " " + postfix << int(Qt::CaseInsensitive) << i; + QTest::newRow(ROWNAME("10 vs 2")) << prefix + num + postfix << prefix + "10" + postfix << int(Qt::CaseInsensitive) << i; + QTest::newRow(ROWNAME("diff len")) << prefix + num + postfix << prefix + nump + postfix + "x" << int(Qt::CaseInsensitive) << i; + QTest::newRow(ROWNAME("01 before 1")) << prefix + "0" + num + postfix << prefix + nump + postfix << int(Qt::CaseInsensitive) << i; + QTest::newRow(ROWNAME("mul nums 2nd 1")) << prefix + "1-" + num + postfix << prefix + "1-" + nump + postfix << int(Qt::CaseInsensitive) << i; + QTest::newRow(ROWNAME("mul nums 2nd 2")) << prefix + "10-" + num + postfix<< prefix + "10-10" + postfix << int(Qt::CaseInsensitive) << i; + QTest::newRow(ROWNAME("mul nums 2nd 3")) << prefix + "10-0"+ num + postfix<< prefix + "10-10" + postfix << int(Qt::CaseInsensitive) << i; + QTest::newRow(ROWNAME("mul nums 2nd 4")) << prefix + "10-" + num + postfix<< prefix + "10-010" + postfix << int(Qt::CaseInsensitive) << i; + QTest::newRow(ROWNAME("mul nums big 1")) << prefix + "10-" + num + postfix<< prefix + "20-0" + postfix << int(Qt::CaseInsensitive) << i; + QTest::newRow(ROWNAME("mul nums big 2")) << prefix + "2-" + num + postfix << prefix + "10-0" + postfix << int(Qt::CaseInsensitive) << i; + QTest::newRow(ROWNAME("mul alphabet 1")) << prefix + num + "-a" + postfix << prefix + num + "-c" + postfix << int(Qt::CaseInsensitive) << i; + QTest::newRow(ROWNAME("mul alphabet 2")) << prefix + num + "-a9" + postfix<< prefix + num + "-c0" + postfix << int(Qt::CaseInsensitive) << i; + QTest::newRow(ROWNAME("mul nums w\\0")) << prefix + num + "-"+ num + postfix<< prefix + num+"-0"+nump + postfix << int(Qt::CaseInsensitive) << i; + QTest::newRow(ROWNAME("num first")) << prefix + num + postfix << prefix + "a" + postfix << int(Qt::CaseInsensitive) << i; } } } +#undef ROWNAME } void tst_QFileSystemModel::naturalCompare() diff --git a/tests/auto/widgets/dialogs/qfontdialog/tst_qfontdialog.cpp b/tests/auto/widgets/dialogs/qfontdialog/tst_qfontdialog.cpp index f5c3e08217e..6b2caf17d77 100644 --- a/tests/auto/widgets/dialogs/qfontdialog/tst_qfontdialog.cpp +++ b/tests/auto/widgets/dialogs/qfontdialog/tst_qfontdialog.cpp @@ -114,6 +114,9 @@ void tst_QFontDialog::postKeyReturn() { void tst_QFontDialog::defaultOkButton() { +#ifdef Q_OS_MAC + QSKIP("Test hangs on Mac OS X, see QTBUG-24321"); +#endif bool ok = false; QTimer::singleShot(2000, this, SLOT(postKeyReturn())); QFontDialog::getFont(&ok); @@ -123,6 +126,9 @@ void tst_QFontDialog::defaultOkButton() void tst_QFontDialog::setFont() { +#ifdef Q_OS_MAC + QSKIP("Test hangs on Mac OS X, see QTBUG-24321"); +#endif /* The font should be the same before as it is after if nothing changed while the font dialog was open. Task #27662 @@ -154,6 +160,10 @@ class FriendlyFontDialog : public QFontDialog void tst_QFontDialog::task256466_wrongStyle() { +#ifdef Q_OS_MAC + QSKIP("Test crashes on Mac OS X, see QTBUG-24321"); +#endif + QFontDatabase fdb; FriendlyFontDialog dialog; QListView *familyList = reinterpret_cast(dialog.d_func()->familyList); diff --git a/tests/auto/widgets/dialogs/qmessagebox/tst_qmessagebox.cpp b/tests/auto/widgets/dialogs/qmessagebox/tst_qmessagebox.cpp index 9e965ff2354..7fc752488d4 100644 --- a/tests/auto/widgets/dialogs/qmessagebox/tst_qmessagebox.cpp +++ b/tests/auto/widgets/dialogs/qmessagebox/tst_qmessagebox.cpp @@ -411,8 +411,10 @@ void tst_QMessageBox::staticSourceCompat() if (qobject_cast(qApp->style())) expectedButton = int(QMessageBox::No); #elif !defined(QT_NO_STYLE_CLEANLOOKS) - if (qobject_cast(qApp->style())) + if (qobject_cast(qApp->style())) { + QEXPECT_FAIL("", "Special handling of QMessageBox::information buttons for Cleanlooks not implemented yet, QTBUG-24315", Continue); expectedButton = int(QMessageBox::No); + } #endif QCOMPARE(ret, expectedButton); QCOMPARE(keyToSend, -1); diff --git a/tests/auto/widgets/graphicsview/qgraphicsanchorlayout1/tst_qgraphicsanchorlayout1.cpp b/tests/auto/widgets/graphicsview/qgraphicsanchorlayout1/tst_qgraphicsanchorlayout1.cpp index 3a8e109d805..97feb642dc2 100644 --- a/tests/auto/widgets/graphicsview/qgraphicsanchorlayout1/tst_qgraphicsanchorlayout1.cpp +++ b/tests/auto/widgets/graphicsview/qgraphicsanchorlayout1/tst_qgraphicsanchorlayout1.cpp @@ -1835,15 +1835,6 @@ void tst_QGraphicsAnchorLayout1::testCenterAnchors_data() theResult << BasicResult(0, QRectF(5, 5, 10, 10) ); - QTest::ignoreMessage(QtWarningMsg, "QGraphicsAnchorLayout::addAnchor(): Cannot anchor edges of different orientations"); - QTest::ignoreMessage(QtWarningMsg, "QGraphicsAnchorLayout::addAnchor(): Cannot anchor edges of different orientations"); - QTest::ignoreMessage(QtWarningMsg, "QGraphicsAnchorLayout::addAnchor(): Cannot anchor edges of different orientations"); - QTest::ignoreMessage(QtWarningMsg, "QGraphicsAnchorLayout::addAnchor(): Cannot anchor the item to itself"); - QTest::ignoreMessage(QtWarningMsg, "QGraphicsAnchorLayout::addAnchor(): Cannot anchor the item to itself"); - QTest::ignoreMessage(QtWarningMsg, "QGraphicsAnchorLayout::addAnchor(): Cannot anchor the item to itself"); - QTest::ignoreMessage(QtWarningMsg, "QGraphicsAnchorLayout::addAnchor(): Cannot anchor the item to itself"); - QTest::ignoreMessage(QtWarningMsg, "QGraphicsAnchorLayout::addAnchor(): Cannot anchor the item to itself"); - QTest::ignoreMessage(QtWarningMsg, "QGraphicsAnchorLayout::addAnchor(): Cannot anchor the item to itself"); QTest::newRow("center, basic with invalid") << QSizeF(20, 20) << theData << theResult; } @@ -1975,9 +1966,6 @@ void tst_QGraphicsAnchorLayout1::testCenterAnchors_data() << BasicResult(1, QRectF(20, 0, 30, 10)) << BasicResult(2, QRectF(60, 15, 40, 10)); - QTest::ignoreMessage(QtWarningMsg, "QGraphicsAnchorLayout::addAnchor(): Cannot anchor the item to itself"); - QTest::ignoreMessage(QtWarningMsg, "QGraphicsAnchorLayout::addAnchor(): Cannot anchor the item to itself"); - QTest::newRow("center, three") << QSizeF(100, 50) << theData << theResult; } @@ -2062,6 +2050,21 @@ void tst_QGraphicsAnchorLayout1::testCenterAnchors_data() void tst_QGraphicsAnchorLayout1::testCenterAnchors() { + if (strcmp(QTest::currentDataTag(), "center, basic with invalid") == 0) { + QTest::ignoreMessage(QtWarningMsg, "QGraphicsAnchorLayout::addAnchor(): Cannot anchor edges of different orientations"); + QTest::ignoreMessage(QtWarningMsg, "QGraphicsAnchorLayout::addAnchor(): Cannot anchor edges of different orientations"); + QTest::ignoreMessage(QtWarningMsg, "QGraphicsAnchorLayout::addAnchor(): Cannot anchor edges of different orientations"); + QTest::ignoreMessage(QtWarningMsg, "QGraphicsAnchorLayout::addAnchor(): Cannot anchor the item to itself"); + QTest::ignoreMessage(QtWarningMsg, "QGraphicsAnchorLayout::addAnchor(): Cannot anchor the item to itself"); + QTest::ignoreMessage(QtWarningMsg, "QGraphicsAnchorLayout::addAnchor(): Cannot anchor the item to itself"); + QTest::ignoreMessage(QtWarningMsg, "QGraphicsAnchorLayout::addAnchor(): Cannot anchor the item to itself"); + QTest::ignoreMessage(QtWarningMsg, "QGraphicsAnchorLayout::addAnchor(): Cannot anchor the item to itself"); + QTest::ignoreMessage(QtWarningMsg, "QGraphicsAnchorLayout::addAnchor(): Cannot anchor the item to itself"); + } else if (strcmp(QTest::currentDataTag(), "center, three") == 0) { + QTest::ignoreMessage(QtWarningMsg, "QGraphicsAnchorLayout::addAnchor(): Cannot anchor the item to itself"); + QTest::ignoreMessage(QtWarningMsg, "QGraphicsAnchorLayout::addAnchor(): Cannot anchor the item to itself"); + } + // use the same frame testBasicLayout(); } @@ -2144,11 +2147,6 @@ void tst_QGraphicsAnchorLayout1::testRemoveCenterAnchor_data() << BasicResult(1, QRectF(20, 0, 30, 10)) << BasicResult(2, QRectF(60, 15, 40, 10)); - QTest::ignoreMessage(QtWarningMsg, "QGraphicsAnchorLayout::addAnchor(): Cannot anchor the item to itself"); - QTest::ignoreMessage(QtWarningMsg, "QGraphicsAnchorLayout::addAnchor(): Cannot anchor the item to itself"); - QTest::ignoreMessage(QtWarningMsg, "QGraphicsAnchorLayout::addAnchor(): Cannot anchor the item to itself"); - QTest::ignoreMessage(QtWarningMsg, "QGraphicsAnchorLayout::addAnchor(): Cannot anchor the item to itself"); - QTest::newRow("remove, center, three") << QSizeF(100, 50) << theData << theRemoveData << theResult; } @@ -2183,8 +2181,6 @@ void tst_QGraphicsAnchorLayout1::testRemoveCenterAnchor_data() theResult << BasicResult(0, QRectF(5, 5, 10, 10) ); - QTest::ignoreMessage(QtWarningMsg, "QGraphicsAnchorLayout::addAnchor(): Cannot anchor the item to itself"); - QTest::ignoreMessage(QtWarningMsg, "QGraphicsAnchorLayout::addAnchor(): Cannot anchor the item to itself"); QTest::newRow("remove, center, basic 2") << QSizeF(20, 20) << theData << theRemoveData << theResult; } @@ -2193,6 +2189,16 @@ void tst_QGraphicsAnchorLayout1::testRemoveCenterAnchor_data() void tst_QGraphicsAnchorLayout1::testRemoveCenterAnchor() { + if (strcmp(QTest::currentDataTag(), "remove, center, three") == 0) { + QTest::ignoreMessage(QtWarningMsg, "QGraphicsAnchorLayout::addAnchor(): Cannot anchor the item to itself"); + QTest::ignoreMessage(QtWarningMsg, "QGraphicsAnchorLayout::addAnchor(): Cannot anchor the item to itself"); + QTest::ignoreMessage(QtWarningMsg, "QGraphicsAnchorLayout::addAnchor(): Cannot anchor the item to itself"); + QTest::ignoreMessage(QtWarningMsg, "QGraphicsAnchorLayout::addAnchor(): Cannot anchor the item to itself"); + } else if (strcmp(QTest::currentDataTag(), "remove, center, basic 2") == 0) { + QTest::ignoreMessage(QtWarningMsg, "QGraphicsAnchorLayout::addAnchor(): Cannot anchor the item to itself"); + QTest::ignoreMessage(QtWarningMsg, "QGraphicsAnchorLayout::addAnchor(): Cannot anchor the item to itself"); + } + QFETCH(QSizeF, size); QFETCH(BasicLayoutTestDataList, data); QFETCH(BasicLayoutTestDataList, removeData); diff --git a/tests/auto/widgets/graphicsview/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp b/tests/auto/widgets/graphicsview/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp index bbe70625072..51ce7f909cd 100644 --- a/tests/auto/widgets/graphicsview/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp +++ b/tests/auto/widgets/graphicsview/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp @@ -454,7 +454,6 @@ void tst_QGraphicsGridLayout::addItem_data() for (int b = -1; b < 2; ++b) { for (int c = -1; c < 2; ++c) { for (int d = -1; d < 2; ++d) { - for (int e = 0; e < 9; ++e) { int row = a; int column = b; int rowSpan = c; @@ -462,7 +461,7 @@ void tst_QGraphicsGridLayout::addItem_data() QString name = QString::fromAscii("(%1,%2,%3,%4").arg(a).arg(b).arg(c).arg(d); Qt::Alignment alignment = Qt::AlignLeft; QTest::newRow(name.toLatin1()) << row << column << rowSpan << columnSpan << alignment; - }}}}} + }}}} } // public void addItem(QGraphicsLayoutItem* item, int row, int column, int rowSpan, int columnSpan, Qt::Alignment alignment = 0) diff --git a/tests/auto/widgets/graphicsview/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp b/tests/auto/widgets/graphicsview/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp index c30701e0f96..35b67d4451b 100644 --- a/tests/auto/widgets/graphicsview/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp +++ b/tests/auto/widgets/graphicsview/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp @@ -152,7 +152,7 @@ void tst_QGraphicsLinearLayout::initTestCase() { // since the style will influence the results, we have to ensure // that the tests are run using the same style on all platforms -#if defined (Q_WS_WINCE) +#if defined (Q_OS_WINCE) QApplication::setStyle(new QWindowsStyle); #else QApplication::setStyle(new QPlastiqueStyle); diff --git a/tests/auto/widgets/graphicsview/qgraphicsproxywidget/qgraphicsproxywidget.pro b/tests/auto/widgets/graphicsview/qgraphicsproxywidget/qgraphicsproxywidget.pro index 50f4f7ab746..f2bd7bde708 100644 --- a/tests/auto/widgets/graphicsview/qgraphicsproxywidget/qgraphicsproxywidget.pro +++ b/tests/auto/widgets/graphicsview/qgraphicsproxywidget/qgraphicsproxywidget.pro @@ -8,3 +8,5 @@ SOURCES += tst_qgraphicsproxywidget.cpp # ### fixme: QTBUG-20756 crashes on xcb contains(QT_CONFIG,xcb):CONFIG+=insignificant_test + +win32:CONFIG += insignificant_test # QTBUG-24294 diff --git a/tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp b/tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp index 3ccc533086c..ca5b9920123 100644 --- a/tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp +++ b/tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp @@ -1574,7 +1574,7 @@ void tst_QGraphicsProxyWidget::resize_simple_data() QTest::addColumn("size"); QTest::newRow("200, 200") << QSizeF(200, 200); -#if !defined(QT_ARCH_ARM) && !defined(Q_OS_WINCE) +#if !defined(Q_PROCESSOR_ARM) && !defined(Q_OS_WINCE) QTest::newRow("1000, 1000") << QSizeF(1000, 1000); // Since 4.5, 10000x10000 runs out of memory. // QTest::newRow("10000, 10000") << QSizeF(10000, 10000); diff --git a/tests/auto/widgets/graphicsview/qgraphicsscene/qgraphicsscene.pro b/tests/auto/widgets/graphicsview/qgraphicsscene/qgraphicsscene.pro index 8a084472b88..c0a9075d104 100644 --- a/tests/auto/widgets/graphicsview/qgraphicsscene/qgraphicsscene.pro +++ b/tests/auto/widgets/graphicsview/qgraphicsscene/qgraphicsscene.pro @@ -17,3 +17,5 @@ wince* { DEPLOYMENT += rootFiles renderFiles DEFINES += SRCDIR=\\\".\\\" } + +win32:CONFIG += insignificant_test # QTBUG-24295 diff --git a/tests/auto/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp b/tests/auto/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp index f103d3d529b..3257e7efea0 100644 --- a/tests/auto/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp +++ b/tests/auto/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp @@ -365,7 +365,7 @@ void tst_QGraphicsScene::itemIndexMethod() QGraphicsScene scene; QCOMPARE(scene.itemIndexMethod(), QGraphicsScene::BspTreeIndex); -#ifdef QT_ARCH_ARM +#ifdef Q_PROCESSOR_ARM const int minY = -500; const int maxY = 500; const int minX = -500; @@ -426,7 +426,7 @@ void tst_QGraphicsScene::bspTreeDepth() void tst_QGraphicsScene::items() { -#ifdef QT_ARCH_ARM +#ifdef Q_PROCESSOR_ARM const int minY = -500; const int maxY = 500; const int minX = -500; diff --git a/tests/auto/widgets/graphicsview/qgraphicsview/qgraphicsview.pro b/tests/auto/widgets/graphicsview/qgraphicsview/qgraphicsview.pro index e3a6edd6820..439cf547ef2 100644 --- a/tests/auto/widgets/graphicsview/qgraphicsview/qgraphicsview.pro +++ b/tests/auto/widgets/graphicsview/qgraphicsview/qgraphicsview.pro @@ -8,3 +8,5 @@ SOURCES += tst_qgraphicsview.cpp tst_qgraphicsview_2.cpp DEFINES += QT_NO_CAST_TO_ASCII linux-*:system(". /etc/lsb-release && [ $DISTRIB_CODENAME = oneiric ]"):CONFIG+=insignificant_test + +win32:CONFIG += insignificant_test # QTBUG-24296 diff --git a/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp b/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp index 7681b3c787e..7ceeaaa0d3e 100644 --- a/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp +++ b/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp @@ -1656,7 +1656,7 @@ void tst_QGraphicsView::mapToScene() QCOMPARE(view.size(), viewSize); // First once without setting the scene rect -#ifdef QT_ARCH_ARM +#ifdef Q_PROCESSOR_ARM const int step = 20; #else const int step = 1; diff --git a/tests/auto/widgets/graphicsview/qgraphicswidget/tst_qgraphicswidget.cpp b/tests/auto/widgets/graphicsview/qgraphicswidget/tst_qgraphicswidget.cpp index 0607d2ab304..0a2d0cd2f86 100644 --- a/tests/auto/widgets/graphicsview/qgraphicswidget/tst_qgraphicswidget.cpp +++ b/tests/auto/widgets/graphicsview/qgraphicswidget/tst_qgraphicswidget.cpp @@ -1157,8 +1157,10 @@ void tst_QGraphicsWidget::initStyleOption() bool hasFocus = option.state & QStyle::State_HasFocus; QCOMPARE(hasFocus, focus); bool isUnderMouse = option.state & QStyle::State_MouseOver; -#if !defined(Q_OS_WINCE) && !defined(Q_OS_MAC) +#ifndef Q_OS_WINCE +# if !defined(Q_OS_MAC) && !defined(Q_OS_WIN) QEXPECT_FAIL("all", "QTBUG-22457", Abort); +# endif QCOMPARE(isUnderMouse, underMouse); #endif // if (layoutDirection != Qt::LeftToRight) diff --git a/tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp b/tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp index 75a72a754f7..4dd57e1b907 100644 --- a/tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp +++ b/tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp @@ -204,6 +204,7 @@ private slots: void QTBUG8650_crashOnInsertSections(); void QTBUG12268_hiddenMovedSectionSorting(); void QTBUG14242_hideSectionAutoSize(); + void ensureNoIndexAtLength(); void initialSortOrderRole(); @@ -2156,6 +2157,17 @@ void tst_QHeaderView::QTBUG14242_hideSectionAutoSize() QVERIFY(calced_length == afterlength); } +void tst_QHeaderView::ensureNoIndexAtLength() +{ + QTableView qtv; + QStandardItemModel amodel(4, 4); + qtv.setModel(&amodel); + QHeaderView *hv = qtv.verticalHeader(); + QVERIFY(hv->visualIndexAt(hv->length()) == -1); + hv->resizeSection(hv->count() - 1, 0); + QVERIFY(hv->visualIndexAt(hv->length()) == -1); +} + void tst_QHeaderView::initialSortOrderRole() { QTableView view; // ### Shadowing member view (of type QHeaderView) @@ -2341,8 +2353,8 @@ void tst_QHeaderView::calculateAndCheck(int cppline, const int precalced_compare QVERIFY2(chk_logical == x[1], verifytext); QVERIFY2(chk_sizes == x[2], verifytext); QVERIFY2(chk_hidden_size == x[3], verifytext); - QVERIFY2(chk_lookup_visual == x[4], verifytext); // Here the semantic can change. See final note (*). - QVERIFY2(chk_lookup_logical == x[5], verifytext); // Here the semantic can change. See final note (*). + QVERIFY2(chk_lookup_visual == x[4], verifytext); + QVERIFY2(chk_lookup_logical == x[5], verifytext); QVERIFY2(header_lenght == x[6], verifytext); } @@ -2353,16 +2365,16 @@ void tst_QHeaderView::setupTestData(bool also_use_reset_model) QTest::addColumn("reset_model"); if (also_use_reset_model) { - QTest::newRow("no_updates+normal") << false << false << true; - QTest::newRow("hasupdates+normal") << true << false << true; - QTest::newRow("no_updates+special") << false << true << true; - QTest::newRow("no_updates+special") << true << true << true; + QTest::newRow("no_updates+normal+reset") << false << false << true; + QTest::newRow("hasupdates+normal+reset") << true << false << true; + QTest::newRow("no_updates+special+reset") << false << true << true; + QTest::newRow("hasupdates+special+reset") << true << true << true; } QTest::newRow("no_updates+normal") << false << false << false; QTest::newRow("hasupdates+normal") << true << false << false; QTest::newRow("no_updates+special") << false << true << false; - QTest::newRow("no_updates+special") << true << true << false; + QTest::newRow("hasupdates+special") << true << true << false; } void tst_QHeaderView::additionalInit() @@ -2438,10 +2450,10 @@ void tst_QHeaderView::logicalIndexAtTest() //qDebug() << "logicalIndexAtTest" << check1 << check2; const int precalced_check1 = 106327; const int precalced_check2 = 29856418; - QVERIFY(precalced_check1 == check1); // Here the semantic can change. See final note (*) - QVERIFY(precalced_check2 == check2); // Here the semantic can change. See final note (*) + QVERIFY(precalced_check1 == check1); + QVERIFY(precalced_check2 == check2); - const int precalced_results[] = { 1145298384, -1710423344, -650981936, 372919464, 2139446944, 854793816, 12124 }; + const int precalced_results[] = { 1145298384, -1710423344, -650981936, 372919464, -1544372176, -426463328, 12124 }; calculateAndCheck(__LINE__, precalced_results); } @@ -2466,10 +2478,10 @@ void tst_QHeaderView::visualIndexAtTest() //qDebug() << "visualIndexAtTest" << check1 << check2; const int precalced_check1 = 72665; const int precalced_check2 = 14015890; - QVERIFY(precalced_check1 == check1); // Here the semantic can change. See final note (*) - QVERIFY(precalced_check2 == check2); // Here the semantic can change. See final note (*) + QVERIFY(precalced_check1 == check1); + QVERIFY(precalced_check2 == check2); - const int precalced_results[] = { 1145298384, -1710423344, -1457520212, 169223959, 726651072, -2105938696, 5453 }; + const int precalced_results[] = { 1145298384, -1710423344, -1457520212, 169223959, 557466160, -324939600, 5453 }; calculateAndCheck(__LINE__, precalced_results); } @@ -2598,7 +2610,7 @@ void tst_QHeaderView::mixedTests() model->setRowCount(model->rowCount() - 10); if (m_using_reset_model) { - const int precalced_results[] = { 898296472, 337096378, -543340640, 1, 703951756, 250831536, 9250 }; + const int precalced_results[] = { 898296472, 337096378, -543340640, 1, -1251526424, -568618976, 9250 }; calculateAndCheck(__LINE__, precalced_results); } else { const int precalced_results[] = { 1911338224, 1693514365, -613398968, -1912534953, 1582159424, -1851079000, 9300 }; @@ -2633,8 +2645,5 @@ void tst_QHeaderView::resizeToContentTest() calculateAndCheck(__LINE__, precalced_results); } -// (*) Currently qheaderview position lookup acts a bit strange. It can return sections with size 0. -// This could be changed in the future. - QTEST_MAIN(tst_QHeaderView) #include "tst_qheaderview.moc" diff --git a/tests/auto/widgets/itemviews/qitemview/tst_qitemview.cpp b/tests/auto/widgets/itemviews/qitemview/tst_qitemview.cpp index 04b32d1e563..4e71bf964c2 100644 --- a/tests/auto/widgets/itemviews/qitemview/tst_qitemview.cpp +++ b/tests/auto/widgets/itemviews/qitemview/tst_qitemview.cpp @@ -286,7 +286,7 @@ void tst_QItemView::populate() { treeModel = new CheckerModel; QModelIndex parent; -#if defined(QT_ARCH_ARM) +#if defined(Q_PROCESSOR_ARM) const int baseInsert = 4; #else const int baseInsert = 26; diff --git a/tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp b/tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp index 523516a4b42..f139eac2755 100644 --- a/tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp +++ b/tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp @@ -970,7 +970,7 @@ void tst_QListView::selection_data() << QRect(300, 10, 1, 1) // selection rectangle << IntList(); // expected items - QTest::newRow("select to the right, (on viewport)") + QTest::newRow("select to the right 2, (on viewport)") << 40 // itemCount << int(QListView::ListMode) << int(QListView::TopToBottom) diff --git a/tests/auto/widgets/itemviews/qlistwidget/qlistwidget.pro b/tests/auto/widgets/itemviews/qlistwidget/qlistwidget.pro index f3979576092..8821ac7038b 100644 --- a/tests/auto/widgets/itemviews/qlistwidget/qlistwidget.pro +++ b/tests/auto/widgets/itemviews/qlistwidget/qlistwidget.pro @@ -5,3 +5,5 @@ QT += core-private gui-private SOURCES += tst_qlistwidget.cpp contains(QT_CONFIG,xcb):CONFIG+=insignificant_test # QTBUG-21098, fails unstably + +win32:CONFIG += insignificant_test # QTBUG-24299 diff --git a/tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp b/tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp index 586c2efd8f8..9144a023d7c 100644 --- a/tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp +++ b/tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp @@ -1204,7 +1204,7 @@ void tst_QTableView::moveCursorStrikesBack_data() << 0 << 5 << (IntList() << int(QtTestTableView::MoveNext)) << 1 << 0; - QTest::newRow("Last column disabled. Task QTBUG-3878") << -1 << -1 + QTest::newRow("Last column disabled 2. Task QTBUG-3878") << -1 << -1 << IntList() << (IntList() << 6) << QRect() diff --git a/tests/auto/widgets/itemviews/qtreewidgetitemiterator/tst_qtreewidgetitemiterator.cpp b/tests/auto/widgets/itemviews/qtreewidgetitemiterator/tst_qtreewidgetitemiterator.cpp index 0e518b3e165..14c61c7932c 100644 --- a/tests/auto/widgets/itemviews/qtreewidgetitemiterator/tst_qtreewidgetitemiterator.cpp +++ b/tests/auto/widgets/itemviews/qtreewidgetitemiterator/tst_qtreewidgetitemiterator.cpp @@ -1014,13 +1014,13 @@ void tst_QTreeWidgetItemIterator::minus_eq_data() QTest::addColumn("iteratorflags"); QTest::addColumn("expecteditem"); - QTest::newRow("-=0") << 0 << 0 << (int)QTreeWidgetItemIterator::All << QString("top0"); - QTest::newRow("-=1") << 2 << 1 << (int)QTreeWidgetItemIterator::All << QString("top0,child0"); - QTest::newRow("-=2") << 4 << 2 << (int)QTreeWidgetItemIterator::All << QString("top0,child1"); - QTest::newRow("-=(-1)") << 0 << -1 << (int)QTreeWidgetItemIterator::All << QString("top0,child0"); - QTest::newRow("-=(-2)") << 0 << -2 << (int)QTreeWidgetItemIterator::All << QString("top0,child1"); - QTest::newRow("-=1)") << 18 << 1 << (int)QTreeWidgetItemIterator::All << QString("top0,child16"); - QTest::newRow("-=1)") << 1 << 1 << (int)QTreeWidgetItemIterator::All << QString("top0"); + QTest::newRow("0-=0") << 0 << 0 << (int)QTreeWidgetItemIterator::All << QString("top0"); + QTest::newRow("2-=1") << 2 << 1 << (int)QTreeWidgetItemIterator::All << QString("top0,child0"); + QTest::newRow("4-=2") << 4 << 2 << (int)QTreeWidgetItemIterator::All << QString("top0,child1"); + QTest::newRow("0-=(-1)") << 0 << -1 << (int)QTreeWidgetItemIterator::All << QString("top0,child0"); + QTest::newRow("0-=(-2)") << 0 << -2 << (int)QTreeWidgetItemIterator::All << QString("top0,child1"); + QTest::newRow("18-=1") << 18 << 1 << (int)QTreeWidgetItemIterator::All << QString("top0,child16"); + QTest::newRow("1-=1") << 1 << 1 << (int)QTreeWidgetItemIterator::All << QString("top0"); } void tst_QTreeWidgetItemIterator::minus_eq() diff --git a/tests/auto/widgets/kernel/qapplication/test/test.pro b/tests/auto/widgets/kernel/qapplication/test/test.pro index 9f6db3cd3e5..61035cc24ba 100644 --- a/tests/auto/widgets/kernel/qapplication/test/test.pro +++ b/tests/auto/widgets/kernel/qapplication/test/test.pro @@ -14,8 +14,6 @@ win32 { } } -mac*:CONFIG+=insignificant_test - TESTDATA = ../test/test.pro ../tmp/README SUBPROGRAMS = desktopsettingsaware modal diff --git a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp index d9f4081ed33..98872cb2f68 100644 --- a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp +++ b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp @@ -69,6 +69,10 @@ #include #endif +QT_BEGIN_NAMESPACE +extern bool Q_GUI_EXPORT qt_tab_all_widgets; // from qapplication.cpp +QT_END_NAMESPACE + class tst_QApplication : public QObject { Q_OBJECT @@ -137,18 +141,11 @@ private slots: void touchEventPropagation(); void qtbug_12673(); - - void testQuitLockRef(); - void testQuitLock1(); - void testQuitLock2(); - void testQuitLock3(); - void testQuitLock4(); - void testQuitLock5(); - void testQuitLock6(); - void testQuitLock7(); - void testQuitLock8(); + void noQuitOnHide(); void globalStaticObjectDestruction(); // run this last + + void abortQuitOnShow(); }; class EventSpy : public QObject @@ -380,16 +377,16 @@ void tst_QApplication::setFont_data() ++cnt; } - QTest::newRow("nonexistingfont") << "nosuchfont_probably_quiteunlikely" + QTest::newRow("nonexistingfont after") << "nosuchfont_probably_quiteunlikely" << 0 << false; - QTest::newRow("nonexistingfont") << "nosuchfont_probably_quiteunlikely" + QTest::newRow("nonexistingfont before") << "nosuchfont_probably_quiteunlikely" << 0 << true; - QTest::newRow("largescaleable") << "smoothtimes" << 100 << false; - QTest::newRow("largescaleable") << "smoothtimes" << 100 << true; + QTest::newRow("largescaleable after") << "smoothtimes" << 100 << false; + QTest::newRow("largescaleable before") << "smoothtimes" << 100 << true; - QTest::newRow("largeunscaleale") << "helvetica" << 100 << false; - QTest::newRow("largeunscaleale") << "helvetica" << 100 << true; + QTest::newRow("largeunscaleale after") << "helvetica" << 100 << false; + QTest::newRow("largeunscaleale before") << "helvetica" << 100 << true; } void tst_QApplication::setFont() @@ -608,6 +605,11 @@ public slots: void tst_QApplication::quitOnLastWindowClosed() { +#ifdef Q_OS_WIN32 + QSKIP("This test crashes on Windows. Remove skip once the issue causing the crash is fixed (QTBUG-24300)."); +#endif +#ifndef Q_OS_MAC + // Test hangs on Mac OS X, see QTBUG-24319 { int argc = 0; QApplication app(argc, 0, QApplication::GuiServer); @@ -622,6 +624,7 @@ void tst_QApplication::quitOnLastWindowClosed() // lastWindowClosed() signal should only be sent after the last dialog is closed QCOMPARE(appSpy.count(), 2); } +#endif { int argc = 0; QApplication app(argc, 0, QApplication::GuiServer); @@ -1211,6 +1214,9 @@ void DeleteLaterWidget::checkDeleteLater() void tst_QApplication::testDeleteLater() { +#ifdef Q_OS_MAC + QSKIP("This test fails and then hangs on Mac OS X, see QTBUG-24318"); +#endif int argc = 0; QApplication app(argc, 0, QApplication::GuiServer); connect(&app, SIGNAL(lastWindowClosed()), &app, SLOT(quit())); @@ -1392,12 +1398,21 @@ void tst_QApplication::testDeleteLaterProcessEvents() void tst_QApplication::desktopSettingsAware() { #ifndef QT_NO_PROCESS - QProcess testProcess; - const QString path = QStringLiteral("desktopsettingsaware/desktopsettingsaware"); + QString path; + { + // We need an application object for QFINDTESTDATA to work + // properly in all cases. + int argc = 0; + QCoreApplication app(argc, 0); + path = QFINDTESTDATA("desktopsettingsaware/"); + } + QVERIFY2(!path.isEmpty(), "Cannot locate desktopsettingsaware helper application"); + path += "desktopsettingsaware"; #ifdef Q_OS_WINCE int argc = 0; QApplication tmpApp(argc, 0, QApplication::GuiServer); #endif + QProcess testProcess; testProcess.start(path); QVERIFY2(testProcess.waitForStarted(), qPrintable(QString::fromLatin1("Cannot start '%1': %2").arg(path, testProcess.errorString()))); @@ -1523,8 +1538,15 @@ void tst_QApplication::focusChanged() QSettings appleSettings(QLatin1String("apple.com")); QVariant appleValue = appleSettings.value(QLatin1String("AppleKeyboardUIMode"), 0); tabAllControls = (appleValue.toInt() & 0x2); + if (!tabAllControls) { + QEXPECT_FAIL("", "QTBUG-24372 Mac tab key \"Text boxes and lists only\" vs " + "\"All controls\" setting is not respected in Qt5", Abort); + } #endif + // make sure Qt's idea of tabbing between widgets matches what we think it should + QCOMPARE(qt_tab_all_widgets, tabAllControls); + tab.simulate(now); if (!tabAllControls) { QVERIFY(spy.count() == 0); @@ -2048,9 +2070,19 @@ void tst_QApplication::touchEventPropagation() void tst_QApplication::qtbug_12673() { + QString path; + { + // We need an application object for QFINDTESTDATA to work + // properly in all cases. + int argc = 0; + QCoreApplication app(argc, 0); + path = QFINDTESTDATA("modal/"); + } + QVERIFY2(!path.isEmpty(), "Cannot locate modal helper application"); + path += "modal"; + QProcess testProcess; QStringList arguments; - const QString path = QStringLiteral("modal/modal"); testProcess.start(path, arguments); QVERIFY2(testProcess.waitForStarted(), qPrintable(QString::fromLatin1("Cannot start '%1': %2").arg(path, testProcess.errorString()))); @@ -2058,509 +2090,71 @@ void tst_QApplication::qtbug_12673() QCOMPARE(testProcess.exitStatus(), QProcess::NormalExit); } -class JobObject : public QObject +class NoQuitOnHideWidget : public QWidget { Q_OBJECT public: - JobObject(int milliseconds, QObject *parent = 0) - : QObject(parent) + explicit NoQuitOnHideWidget(QWidget *parent = 0) + : QWidget(parent) { - QTimer::singleShot(milliseconds, this, SLOT(timeout())); - } - - JobObject(QObject *parent = 0) - : QObject(parent) - { - QTimer::singleShot(1000, this, SLOT(timeout())); + QTimer::singleShot(0, this, SLOT(hide())); + QTimer::singleShot(500, this, SLOT(exitApp())); } private slots: - void timeout() - { - emit done(); - deleteLater(); + void exitApp() { + qApp->exit(1); } - -signals: - void done(); - -private: - QEventLoopLocker locker; }; -class QuitLockRefTester : public QObject +void tst_QApplication::noQuitOnHide() +{ + int argc = 0; + QApplication app(argc, 0); + QWidget *window1 = new NoQuitOnHideWidget; + window1->show(); + QCOMPARE(app.exec(), 1); +} + +class ShowCloseShowWidget : public QWidget { Q_OBJECT public: - QuitLockRefTester(QObject *parent = 0) - : QObject(parent) + ShowCloseShowWidget(bool showAgain, QWidget *parent = 0) + : QWidget(parent), showAgain(showAgain) { - QTimer::singleShot(0, this, SLOT(doTest())); + QTimer::singleShot(0, this, SLOT(doClose())); + QTimer::singleShot(500, this, SLOT(exitApp())); } private slots: - void doTest() - { - QApplicationPrivate *privateClass = static_cast(QObjectPrivate::get(qApp)); - - { - QDialog *win1 = new QDialog; - - // Test with a lock active so that the refcount doesn't drop to zero during these tests, causing a quit. - // (until we exit the scope) - QEventLoopLocker locker; - - QCOMPARE(privateClass->quitLockRef.load(), 1); - - win1->show(); - - QCOMPARE(privateClass->quitLockRef.load(), 2); - - QDialog *win2 = new QDialog; - - win2->show(); - - QCOMPARE(privateClass->quitLockRef.load(), 3); - - delete win1; - - QCOMPARE(privateClass->quitLockRef.load(), 2); - - delete win2; - - QCOMPARE(privateClass->quitLockRef.load(), 1); - - win1 = new QDialog; - - win1->show(); - - QCOMPARE(privateClass->quitLockRef.load(), 2); - - JobObject *job1 = new JobObject(this); - - QCOMPARE(privateClass->quitLockRef.load(), 3); - - delete win1; - - QCOMPARE(privateClass->quitLockRef.load(), 2); - - delete job1; - - QCOMPARE(privateClass->quitLockRef.load(), 1); - - QWidget *w1 = new QWidget; - - w1->show(); - - QCOMPARE(privateClass->quitLockRef.load(), 2); - - QWidget *w2 = new QMainWindow; - - w2->show(); - - QCOMPARE(privateClass->quitLockRef.load(), 3); - - QWidget *w3 = new QWidget(0, Qt::Dialog); - - w3->show(); - - QCOMPARE(privateClass->quitLockRef.load(), 4); - - delete w3; - - QCOMPARE(privateClass->quitLockRef.load(), 3); - - delete w2; - - QCOMPARE(privateClass->quitLockRef.load(), 2); - - QWidget *subWidget1 = new QWidget(w1, Qt::Window); - - // Even though We create a new widget and show it, - // the ref count does not go up because it is a child of - // w1, which is the top-level, and what we are actually - // refcounting. - subWidget1->show(); - - QCOMPARE(privateClass->quitLockRef.load(), 2); - - // When we use setParent(0) and re-show, the - // ref count does increase: - QCOMPARE(subWidget1->isVisible(), true); - subWidget1->setParent(0); - QCOMPARE(subWidget1->isVisible(), false); - - QCOMPARE(privateClass->quitLockRef.load(), 2); - - subWidget1->show(); - QCOMPARE(subWidget1->isVisible(), true); - QCOMPARE(privateClass->quitLockRef.load(), 3); - - subWidget1->setParent(w1); - QCOMPARE(privateClass->quitLockRef.load(), 2); - - QWidget *subWidget2 = new QWidget(w1); - - QCOMPARE(privateClass->quitLockRef.load(), 2); - - subWidget2->show(); - - QCOMPARE(privateClass->quitLockRef.load(), 2); - - delete subWidget2; - - QCOMPARE(privateClass->quitLockRef.load(), 2); - - QWidget *subWidget3 = new QWidget(w1); - - QCOMPARE(privateClass->quitLockRef.load(), 2); - - subWidget3->show(); - - QCOMPARE(privateClass->quitLockRef.load(), 2); - - subWidget3->hide(); - - QCOMPARE(privateClass->quitLockRef.load(), 2); - - delete subWidget3; - - QCOMPARE(privateClass->quitLockRef.load(), 2); - - QWidget *subWidget4 = new QWidget(subWidget1); - QWidget *subWidget5 = new QWidget(subWidget1); - - QCOMPARE(privateClass->quitLockRef.load(), 2); - - QWidget *subWidget6 = new QWidget(subWidget4, Qt::Window); - - subWidget6->show(); - - QCOMPARE(privateClass->quitLockRef.load(), 2); - - delete w1; - - QCOMPARE(privateClass->quitLockRef.load(), 1); - - w1 = new QWidget; - w2 = new QWidget; - w3 = new QWidget; - - QHBoxLayout *layout = new QHBoxLayout(w1); - - layout->addWidget(w2); - layout->addWidget(w3); - - QCOMPARE(privateClass->quitLockRef.load(), 1); - - w1->show(); - - QCOMPARE(privateClass->quitLockRef.load(), 2); - - w1->hide(); - QCOMPARE(privateClass->quitLockRef.load(), 1); - - delete w1; - - } - QCOMPARE(privateClass->quitLockRef.load(), 0); - } -}; - -void tst_QApplication::testQuitLockRef() -{ - int argc = 1; - char *argv[] = { "tst_qapplication" }; - QApplication app(argc, argv); - - QuitLockRefTester tester; - - app.exec(); -} - -void tst_QApplication::testQuitLock1() -{ - int argc = 1; - char *argv[] = { "tst_qcoreapplication" }; - QApplication app(argc, argv); - - QWidget *w = new QWidget; - - w->show(); - - QMetaObject::invokeMethod(w, "close", Qt::QueuedConnection); - - app.exec(); - - // No hang = pass. -} - -void tst_QApplication::testQuitLock2() -{ - int argc = 1; - char *argv[] = { "tst_qcoreapplication" }; - QApplication app(argc, argv); - - QWidget *w1 = new QWidget; - - w1->show(); - - QWidget *w2 = new QWidget; - - w2->show(); - - QMetaObject::invokeMethod(w1, "deleteLater", Qt::QueuedConnection); - QMetaObject::invokeMethod(w2, "hide", Qt::QueuedConnection); - - app.exec(); - - // No hang = pass. -} - -class Result : public QObject -{ - Q_OBJECT -public: - Result(QObject *parent = 0) - : QObject(parent), m_passes(false) - { - + void doClose() { + close(); + if (showAgain) + show(); } - bool result() const - { - return m_passes; - } - -public slots: - - void setPasses() - { - setResult(true); - } - - void setFails() - { - setResult(false); - } - - void setResult(bool result) - { - m_passes = result; + void exitApp() { + qApp->exit(1); } private: - bool m_passes; + bool showAgain; }; -void tst_QApplication::testQuitLock3() +void tst_QApplication::abortQuitOnShow() { - int argc = 1; - char *argv[] = { "tst_qcoreapplication" }; - QApplication app(argc, argv); + int argc = 0; + QApplication app(argc, 0); + QWidget *window1 = new ShowCloseShowWidget(false); + window1->show(); + QCOMPARE(app.exec(), 0); - Result *result = new Result(&app); - - JobObject *job = new JobObject(&app); - - QObject::connect(job, SIGNAL(done()), result, SLOT(setPasses())); - - app.exec(); - - QVERIFY(result->result()); + QWidget *window2 = new ShowCloseShowWidget(true); + window2->show(); + QCOMPARE(app.exec(), 1); } -void tst_QApplication::testQuitLock4() -{ - int argc = 1; - char *argv[] = { "tst_qcoreapplication" }; - QApplication app(argc, argv); - - QWidget *w = new QWidget; - - w->show(); - - Result *result = new Result(&app); - JobObject *job = new JobObject(1000, &app); - - QTimer::singleShot(500, w, SLOT(deleteLater())); - - QObject::connect(w, SIGNAL(destroyed()), result, SLOT(setFails())); - QObject::connect(job, SIGNAL(done()), result, SLOT(setPasses())); - - app.exec(); - - QVERIFY(result->result()); -} - -class JobBeforeWindowRunner : public QObject -{ - Q_OBJECT -public: - JobBeforeWindowRunner(QObject *parent = 0) - : QObject(parent), m_result(new Result(this)) - { - - } - - void start() - { - JobObject *job = new JobObject(this); - connect(job, SIGNAL(done()), m_result, SLOT(setFails())); - connect(job, SIGNAL(destroyed()), SLOT(showWindowDelayed()), Qt::QueuedConnection); - } - - bool result() const { return m_result->result(); } - -private slots: - void showWindowDelayed() - { - qApp->setQuitLockEnabled(true); - QTimer::singleShot(500, this, SLOT(showWindow())); - } - - void showWindow() - { - QWidget *w = new QWidget; - w->show(); - w->deleteLater(); - connect(w, SIGNAL(destroyed()), m_result, SLOT(setPasses())); - } - -private: - Result * const m_result; -}; - -void tst_QApplication::testQuitLock5() -{ - int argc = 1; - char *argv[] = { "tst_qcoreapplication" }; - QApplication app(argc, argv); - app.setQuitLockEnabled(false); - // Run a job before showing a window, and only enable the refcounting - // after doing so. - // Although the job brings the refcount to zero, the app does not exit - // until setQuitLockEnabled is called and the feature re-enabled. - - JobBeforeWindowRunner *eventRunner = new JobBeforeWindowRunner(&app); - - eventRunner->start(); - - app.exec(); - - QVERIFY(eventRunner->result()); -} - -class JobDuringWindowRunner : public QObject -{ - Q_OBJECT -public: - JobDuringWindowRunner(QObject *parent = 0) - : QObject(parent), m_result(new Result(this)) - { - - } - - void start() - { - JobObject *job = new JobObject(this); - - QWidget *w = new QWidget; - w->show(); - w->deleteLater(); - - QObject::connect(w, SIGNAL(destroyed()), m_result, SLOT(setFails())); - QObject::connect(job, SIGNAL(done()), m_result, SLOT(setPasses())); - } - - bool result() const { return m_result->result(); } - -private: - Result * const m_result; -}; - -void tst_QApplication::testQuitLock6() -{ - int argc = 1; - char *argv[] = { "tst_qcoreapplication" }; - QApplication app(argc, argv); - - // A job runs, and while it is running, a window is shown and closed, - // then the job ends, which causes the quit. - - JobDuringWindowRunner *eventRunner = new JobDuringWindowRunner(&app); - - eventRunner->start(); - - app.exec(); - - QVERIFY(eventRunner->result()); -} -class JobWindowJobWindowRunner : public QObject -{ - Q_OBJECT -public: - JobWindowJobWindowRunner(QObject *parent = 0) - : QObject(parent), m_result(new Result(this)) - { - - } - - void start() - { - JobObject *job = new JobObject(500, this); - - QWidget *w = new QWidget; - w->show(); - QTimer::singleShot(1000, w, SLOT(deleteLater())); - - QObject::connect(w, SIGNAL(destroyed()), m_result, SLOT(setPasses())); - QObject::connect(job, SIGNAL(done()), m_result, SLOT(setFails())); - } - - bool result() const { return m_result->result(); } -private: - Result * const m_result; -}; - -void tst_QApplication::testQuitLock7() -{ - int argc = 1; - char *argv[] = { "tst_qcoreapplication" }; - QApplication app(argc, argv); - - // A job runs, and while it is running, a window is shown - // then the job ends, then the window is closed, which causes the quit. - - JobWindowJobWindowRunner *eventRunner = new JobWindowJobWindowRunner(&app); - - eventRunner->start(); - - app.exec(); - - QVERIFY(eventRunner->result()); -} - -void tst_QApplication::testQuitLock8() -{ - int argc = 1; - char *argv[] = { "tst_qcoreapplication" }; - QApplication app(argc, argv); - - QMainWindow *mw1 = new QMainWindow; - mw1->show(); - QMainWindow *mw2 = new QMainWindow; - mw2->show(); - - QMetaObject::invokeMethod(mw1, "close", Qt::QueuedConnection); - QMetaObject::invokeMethod(mw2, "close", Qt::QueuedConnection); - - app.exec(); - - // No hang = pass -} - - /* This test is meant to ensure that certain objects (public & commonly used) can safely be used in a Q_GLOBAL_STATIC such that their destructors are diff --git a/tests/auto/widgets/kernel/qgridlayout/tst_qgridlayout.cpp b/tests/auto/widgets/kernel/qgridlayout/tst_qgridlayout.cpp index c8e5591f8b8..c43ea065f35 100644 --- a/tests/auto/widgets/kernel/qgridlayout/tst_qgridlayout.cpp +++ b/tests/auto/widgets/kernel/qgridlayout/tst_qgridlayout.cpp @@ -797,6 +797,16 @@ void tst_QGridLayout::minMaxSize_data() << SizeInfo(QPoint(10, 10), QSize( 90, 90), QSize(100,100)) << SizeInfo(QPoint(10 + 100 + 1, 10), QSize( 90, 90)) ); + QTest::newRow("2x1 grid, extend to minimumSize, motif") << QString::fromAscii("motif") << 2 << 1 + << int(QSizePolicy::Preferred) << QSize() << (SizeInfoList() + << SizeInfo(QPoint(11, 11), QSize( 90, 90), QSize(100,100)) + << SizeInfo(QPoint(11 + 100 + 6, 11), QSize( 90, 90)) + ); + QTest::newRow("2x1 grid, extend to minimumSize, windows") << QString::fromAscii("windows") << 2 << 1 + << int(QSizePolicy::Preferred) << QSize() << (SizeInfoList() + << SizeInfo(QPoint(11, 11), QSize( 90, 90), QSize(100,100)) + << SizeInfo(QPoint(11 + 100 + 6, 11), QSize( 90, 90)) + ); QTest::newRow("1x2 grid, extend to minimumSize") << QString() << 1 << 2 << int(QSizePolicy::Preferred) << QSize() << (SizeInfoList() << SizeInfo(QPoint(10, 10), QSize( 90, 90), QSize(100,100)) @@ -818,17 +828,6 @@ void tst_QGridLayout::minMaxSize_data() << SizeInfo(QPoint(10, 10 + 100 + 1), QSize(100,100), QSize(), QSize(), 100*100) << SizeInfo(QPoint(10, 10 + 100 + 1 + 50 + 1), QSize(100,100), QSize(), QSize(100, 100)) ); - QTest::newRow("2x1 grid, extend to minimumSize") << QString::fromAscii("motif") << 2 << 1 - << int(QSizePolicy::Preferred) << QSize() << (SizeInfoList() - << SizeInfo(QPoint(11, 11), QSize( 90, 90), QSize(100,100)) - << SizeInfo(QPoint(11 + 100 + 6, 11), QSize( 90, 90)) - ); - QTest::newRow("2x1 grid, extend to minimumSize") << QString::fromAscii("windows") << 2 << 1 - << int(QSizePolicy::Preferred) << QSize() << (SizeInfoList() - << SizeInfo(QPoint(11, 11), QSize( 90, 90), QSize(100,100)) - << SizeInfo(QPoint(11 + 100 + 6, 11), QSize( 90, 90)) - ); - } void tst_QGridLayout::minMaxSize() diff --git a/tests/auto/widgets/styles/qstylesheetstyle/qstylesheetstyle.pro b/tests/auto/widgets/styles/qstylesheetstyle/qstylesheetstyle.pro index 137d6a2bc55..f908c3ab7d2 100644 --- a/tests/auto/widgets/styles/qstylesheetstyle/qstylesheetstyle.pro +++ b/tests/auto/widgets/styles/qstylesheetstyle/qstylesheetstyle.pro @@ -6,3 +6,5 @@ QT += gui-private SOURCES += tst_qstylesheetstyle.cpp RESOURCES += resources.qrc requires(contains(QT_CONFIG,private_tests)) + +win32:CONFIG += insignificant_test # QTBUG-24323 diff --git a/tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp b/tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp index 2dc985439d2..1201b0f1da4 100644 --- a/tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp +++ b/tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp @@ -881,6 +881,11 @@ void tst_QStyleSheetStyle::hoverColors() QVERIFY2(testForColors(image, QColor(0xe8, 0xff, 0x66)), (QString::fromLatin1(widget->metaObject()->className()) + " did not contain background color #e8ff66").toLocal8Bit().constData()); +#ifdef Q_OS_MAC + if (qobject_cast(widget) + || qobject_cast(widget)) + QEXPECT_FAIL("", "Failure only for QPushButton and QComboBox, see QTBUG-23686", Continue); +#endif QVERIFY2(testForColors(image, QColor(0xff, 0x00, 0x84)), (QString::fromLatin1(widget->metaObject()->className()) + " did not contain text color #ff0084").toLocal8Bit().constData()); diff --git a/tests/auto/widgets/util/qcompleter/tst_qcompleter.cpp b/tests/auto/widgets/util/qcompleter/tst_qcompleter.cpp index 228ff40ee52..a257eb17985 100644 --- a/tests/auto/widgets/util/qcompleter/tst_qcompleter.cpp +++ b/tests/auto/widgets/util/qcompleter/tst_qcompleter.cpp @@ -367,40 +367,42 @@ void tst_QCompleter::csMatchingOnCsSortedModel_data() QTest::addColumn("completion"); QTest::addColumn("completionText"); +#define ROWNAME(name) (qPrintable(QString("%1 %2").arg(name).arg(i))) + for (int i = 0; i < 2; i++) { if (i == 1) QTest::newRow("FILTERING_OFF") << "FILTERING_OFF" << "" << "" << ""; // Plain text filter - QTest::newRow("()") << "" << "" << "P0" << "P0"; - QTest::newRow("()F") << "" << "F" << "P0" << "P0"; - QTest::newRow("()L") << "" << "L" << "p4" << "p4"; - QTest::newRow("()L") << "" << "L" << "p4" << "p4"; - QTest::newRow("()N") << "" << "N" << "P1" << "P1"; - QTest::newRow("(P)") << "P" << "" << "P0" << "P0"; - QTest::newRow("(P)F") << "P" << "" << "P0" << "P0"; - QTest::newRow("(P)L") << "P" << "L" << "P4" << "P4"; - QTest::newRow("(p)") << "p" << "" << "p0" << "p0"; - QTest::newRow("(p)N") << "p" << "N" << "p1" << "p1"; - QTest::newRow("(p)NN") << "p" << "NN" << "p2" << "p2"; - QTest::newRow("(p)NNN") << "p" << "NNN" << "p3" << "p3"; - QTest::newRow("(p)NNNN") << "p" << "NNNN" << "p4" << "p4"; - QTest::newRow("(p1)") << "p1" << "" << "p1" << "p1"; - QTest::newRow("(p11)") << "p11" << "" << "" << ""; + QTest::newRow(ROWNAME("()")) << "" << "" << "P0" << "P0"; + QTest::newRow(ROWNAME("()F")) << "" << "F" << "P0" << "P0"; + QTest::newRow(ROWNAME("()L")) << "" << "L" << "p4" << "p4"; + QTest::newRow(ROWNAME("()N")) << "" << "N" << "P1" << "P1"; + QTest::newRow(ROWNAME("(P)")) << "P" << "" << "P0" << "P0"; + QTest::newRow(ROWNAME("(P)F")) << "P" << "" << "P0" << "P0"; + QTest::newRow(ROWNAME("(P)L")) << "P" << "L" << "P4" << "P4"; + QTest::newRow(ROWNAME("(p)")) << "p" << "" << "p0" << "p0"; + QTest::newRow(ROWNAME("(p)N")) << "p" << "N" << "p1" << "p1"; + QTest::newRow(ROWNAME("(p)NN")) << "p" << "NN" << "p2" << "p2"; + QTest::newRow(ROWNAME("(p)NNN")) << "p" << "NNN" << "p3" << "p3"; + QTest::newRow(ROWNAME("(p)NNNN")) << "p" << "NNNN" << "p4" << "p4"; + QTest::newRow(ROWNAME("(p1)")) << "p1" << "" << "p1" << "p1"; + QTest::newRow(ROWNAME("(p11)")) << "p11" << "" << "" << ""; // Tree filter - QTest::newRow("(P0,)") << "P0," << "" << "c0P0" << "P0,c0P0"; - QTest::newRow("(P0,c)") << "P0,c" << "" << "c0P0" << "P0,c0P0"; - QTest::newRow("(P0,c1)") << "P0,c1" << "" << "c1P0" << "P0,c1P0"; - QTest::newRow("(P0,c3P0)") << "P0,c3P0" << "" << "c3P0" << "P0,c3P0"; - QTest::newRow("(P3,c)F") << "P3,c" << "F" << "c0P3" << "P3,c0P3"; - QTest::newRow("(P3,c)L") << "P3,c" << "L" << "c4P3" << "P3,c4P3"; - QTest::newRow("(P3,c)N") << "P3,c" << "N" << "c1P3" << "P3,c1P3"; - QTest::newRow("(P3,c)NN") << "P3,c" << "NN" << "c2P3" << "P3,c2P3"; - QTest::newRow("(P3,,c)") << "P3,,c" << "" << "" << ""; - QTest::newRow("(P3,c0P3,)") << "P3,c0P3," << "" << "" << ""; - QTest::newRow("(P,)") << "P," << "" << "" << ""; + QTest::newRow(ROWNAME("(P0,)")) << "P0," << "" << "c0P0" << "P0,c0P0"; + QTest::newRow(ROWNAME("(P0,c)")) << "P0,c" << "" << "c0P0" << "P0,c0P0"; + QTest::newRow(ROWNAME("(P0,c1)")) << "P0,c1" << "" << "c1P0" << "P0,c1P0"; + QTest::newRow(ROWNAME("(P0,c3P0)")) << "P0,c3P0" << "" << "c3P0" << "P0,c3P0"; + QTest::newRow(ROWNAME("(P3,c)F")) << "P3,c" << "F" << "c0P3" << "P3,c0P3"; + QTest::newRow(ROWNAME("(P3,c)L")) << "P3,c" << "L" << "c4P3" << "P3,c4P3"; + QTest::newRow(ROWNAME("(P3,c)N")) << "P3,c" << "N" << "c1P3" << "P3,c1P3"; + QTest::newRow(ROWNAME("(P3,c)NN")) << "P3,c" << "NN" << "c2P3" << "P3,c2P3"; + QTest::newRow(ROWNAME("(P3,,c)")) << "P3,,c" << "" << "" << ""; + QTest::newRow(ROWNAME("(P3,c0P3,)")) << "P3,c0P3," << "" << "" << ""; + QTest::newRow(ROWNAME("(P,)")) << "P," << "" << "" << ""; } +#undef ROWNAME } void tst_QCompleter::csMatchingOnCsSortedModel() diff --git a/tests/auto/widgets/widgets/qabstractbutton/tst_qabstractbutton.cpp b/tests/auto/widgets/widgets/qabstractbutton/tst_qabstractbutton.cpp index 5695834e61d..85cd2a8d925 100644 --- a/tests/auto/widgets/widgets/qabstractbutton/tst_qabstractbutton.cpp +++ b/tests/auto/widgets/widgets/qabstractbutton/tst_qabstractbutton.cpp @@ -229,13 +229,13 @@ void tst_QAbstractButton::onReleased() void tst_QAbstractButton::setAutoRepeat_data() { QTest::addColumn("mode"); - QTest::newRow( "" ) << 0; - QTest::newRow( "" ) << 1; - QTest::newRow( "" ) << 2; - QTest::newRow( "" ) << 3; - QTest::newRow( "" ) << 4; - QTest::newRow( "" ) << 5; - QTest::newRow( "" ) << 6; + QTest::newRow("mode 0") << 0; + QTest::newRow("mode 1") << 1; + QTest::newRow("mode 2") << 2; + QTest::newRow("mode 3") << 3; + QTest::newRow("mode 4") << 4; + QTest::newRow("mode 5") << 5; + QTest::newRow("mode 6") << 6; } #define REPEAT_DELAY 1000 diff --git a/tests/auto/widgets/widgets/qabstractslider/tst_qabstractslider.cpp b/tests/auto/widgets/widgets/qabstractslider/tst_qabstractslider.cpp index 6ed5d59db02..6021f90ed43 100644 --- a/tests/auto/widgets/widgets/qabstractslider/tst_qabstractslider.cpp +++ b/tests/auto/widgets/widgets/qabstractslider/tst_qabstractslider.cpp @@ -482,7 +482,7 @@ void tst_QAbstractSlider::keyPressed_data() QList list; list << Qt::Key_Down; - QTest::newRow("Step down once") << 10 // initial position + QTest::newRow("Step down once 1") << 10 // initial position << 0 // minimum << 100 // maximum << 3 // single step size @@ -495,7 +495,7 @@ void tst_QAbstractSlider::keyPressed_data() list = QList(); list << Qt::Key_Up; - QTest::newRow("Step down once") << 10 // initial position + QTest::newRow("Step down once 2") << 10 // initial position << 0 // minimum << 100 // maximum << 3 // single step size diff --git a/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp b/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp index 80285ded78b..907a2399127 100644 --- a/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp +++ b/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp @@ -765,7 +765,7 @@ void tst_QComboBox::virtualAutocompletion() // We need to set the keyboard input interval to a higher value // as the processEvent() call takes too much time, so it restarts // the keyboard search then -#if defined(QT_ARCH_ARM) || defined(QT_ARCH_MIPS) +#if defined(Q_PROCESSOR_ARM) || defined(Q_PROCESSOR_MIPS) int oldInterval = QApplication::keyboardInputInterval(); QApplication::setKeyboardInputInterval(1500); #endif @@ -797,7 +797,7 @@ void tst_QComboBox::virtualAutocompletion() QApplication::sendEvent(testWidget, &kr2); qApp->processEvents(); // Process events to trigger autocompletion QTRY_COMPARE(testWidget->currentIndex(), 3); -#if defined(QT_ARCH_ARM) || defined(QT_ARCH_MIPS) +#if defined(Q_PROCESSOR_ARM) || defined(Q_PROCESSOR_MIPS) QApplication::setKeyboardInputInterval(oldInterval); #endif } diff --git a/tests/auto/widgets/widgets/qdoublevalidator/tst_qdoublevalidator.cpp b/tests/auto/widgets/widgets/qdoublevalidator/tst_qdoublevalidator.cpp index deb8a3bb6f6..474acc0a78e 100644 --- a/tests/auto/widgets/widgets/qdoublevalidator/tst_qdoublevalidator.cpp +++ b/tests/auto/widgets/widgets/qdoublevalidator/tst_qdoublevalidator.cpp @@ -360,11 +360,11 @@ void tst_QDoubleValidator::validateIntEquiv_data() QTest::newRow("4.6") << 0.0 << 10.0 << QString(".1") << INV; QTest::newRow("4.7") << 0.0 << 10.0 << QString("-1.0") << INV; - QTest::newRow("5.1") << 6.0 << 8.0 << QString("5") << ITM; - QTest::newRow("5.1") << 6.0 << 8.0 << QString("56") << INV; + QTest::newRow("5.1a") << 6.0 << 8.0 << QString("5") << ITM; + QTest::newRow("5.1b") << 6.0 << 8.0 << QString("56") << INV; QTest::newRow("5.2") << 6.0 << 8.0 << QString("7") << ACC; - QTest::newRow("5.3") << 6.0 << 8.0 << QString("9") << ITM; - QTest::newRow("5.3") << 6.0 << 8.0 << QString("-") << INV; + QTest::newRow("5.3a") << 6.0 << 8.0 << QString("9") << ITM; + QTest::newRow("5.3b") << 6.0 << 8.0 << QString("-") << INV; QTest::newRow("5.4a") << -8.0 << -6.0 << QString("+") << INV; QTest::newRow("5.4b") << -8.0 << -6.0 << QString("+5") << INV; QTest::newRow("5.4c") << -8.0 << -6.0 << QString("-5") << ITM; diff --git a/tests/auto/widgets/widgets/qfontcombobox/tst_qfontcombobox.cpp b/tests/auto/widgets/widgets/qfontcombobox/tst_qfontcombobox.cpp index e7736071642..3832d39d6f8 100644 --- a/tests/auto/widgets/widgets/qfontcombobox/tst_qfontcombobox.cpp +++ b/tests/auto/widgets/widgets/qfontcombobox/tst_qfontcombobox.cpp @@ -256,7 +256,7 @@ void tst_QFontComboBox::writingSystem_data() QTest::newRow("Runic") << QFontDatabase::Runic; for (int i = 0; i < 31; ++i) - QTest::newRow("enum") << (QFontDatabase::WritingSystem)i; + QTest::newRow(qPrintable(QString("enum %1").arg(i))) << (QFontDatabase::WritingSystem)i; } // public QFontDatabase::WritingSystem writingSystem() const diff --git a/tests/auto/widgets/widgets/qintvalidator/tst_qintvalidator.cpp b/tests/auto/widgets/widgets/qintvalidator/tst_qintvalidator.cpp index 6aec414ae67..99d8ded15c7 100644 --- a/tests/auto/widgets/widgets/qintvalidator/tst_qintvalidator.cpp +++ b/tests/auto/widgets/widgets/qintvalidator/tst_qintvalidator.cpp @@ -70,8 +70,8 @@ void tst_QIntValidator::validate_data() QTest::newRow("data1") << 0 << 100 << QString("500") << INV; QTest::newRow("data1a") << 0 << 100 << QString("5000") << INV; QTest::newRow("data1b") << -100 << 0 << QString("50") << INT; - QTest::newRow("data1b") << -100 << 0 << QString("500") << INV; - QTest::newRow("data1c") << -100 << 0 << QString("5000") << INV; + QTest::newRow("data1c") << -100 << 0 << QString("500") << INV; + QTest::newRow("data1d") << -100 << 0 << QString("5000") << INV; QTest::newRow("data2") << 0 << 100 << QString("-35") << INV; QTest::newRow("data3") << 0 << 100 << QString("a") << INV; QTest::newRow("data4") << 0 << 100 << QString("-") << INV; diff --git a/tests/auto/widgets/widgets/qlabel/tst_qlabel.cpp b/tests/auto/widgets/widgets/qlabel/tst_qlabel.cpp index 6d6b9384b97..d8b2a800b9e 100644 --- a/tests/auto/widgets/widgets/qlabel/tst_qlabel.cpp +++ b/tests/auto/widgets/widgets/qlabel/tst_qlabel.cpp @@ -312,7 +312,7 @@ void tst_QLabel::eventPropagation_data() QTest::newRow("rich text2") << QString("rich text") << (int)Qt::TextSelectableByKeyboard << (int)Qt::ClickFocus << true; QTest::newRow("rich text3") << QString("rich text") << (int)Qt::TextSelectableByMouse << (int)Qt::ClickFocus << false; QTest::newRow("rich text4") << QString("rich text") << (int)Qt::NoTextInteraction << (int)Qt::NoFocus << true; - QTest::newRow("rich text4") << QString("rich text") << (int)Qt::LinksAccessibleByKeyboard << (int)Qt::StrongFocus << true; + QTest::newRow("rich text5") << QString("rich text") << (int)Qt::LinksAccessibleByKeyboard << (int)Qt::StrongFocus << true; if (!test_box) test_box = new Widget; diff --git a/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp b/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp index b004efd07cb..645f47fc728 100644 --- a/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp +++ b/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp @@ -647,22 +647,21 @@ void tst_QLineEdit::inputMask_data() QTest::addColumn("expectedMask"); // if no mask is set a nul string should be returned - QTest::newRow("") << QString("") << QString(); - QTest::newRow("") << QString() << QString(); + QTest::newRow("nul 1") << QString("") << QString(); + QTest::newRow("nul 2") << QString() << QString(); // try different masks - QTest::newRow("") << QString("000.000.000.000") << QString("000.000.000.000; "); - QTest::newRow("") << QString("000.000.000.000;#") << QString("000.000.000.000;#"); - QTest::newRow("") << QString("AAA.aa.999.###;") << QString("AAA.aa.999.###; "); - QTest::newRow("") << QString(">abcdefabcdefabcdefabcdef("replacementLength"); QTest::addColumn("commitString"); - QTest::newRow("") << 4 << 4 << 0 << 0 << QString(""); - QTest::newRow("") << 4 << 4 << 0 << 0 << QString("x"); - QTest::newRow("") << 4 << 4 << 0 << 0 << QString("xxxxxxxxxxxxxxxx"); - QTest::newRow("") << 4 << 3 << 0 << 0 << QString(""); - QTest::newRow("") << 4 << 3 << 0 << 0 << QString("x"); - QTest::newRow("") << 4 << 3 << 0 << 0 << QString("xxxxxxxxxxxxxxxx"); - QTest::newRow("") << 4 << 0 << 0 << 0 << QString(""); - QTest::newRow("") << 4 << 0 << 0 << 0 << QString("x"); - QTest::newRow("") << 4 << 0 << 0 << 0 << QString("xxxxxxxxxxxxxxxx"); + QTest::newRow("data1") << 4 << 4 << 0 << 0 << QString(""); + QTest::newRow("data2") << 4 << 4 << 0 << 0 << QString("x"); + QTest::newRow("data3") << 4 << 4 << 0 << 0 << QString("xxxxxxxxxxxxxxxx"); + QTest::newRow("data4") << 4 << 3 << 0 << 0 << QString(""); + QTest::newRow("data5") << 4 << 3 << 0 << 0 << QString("x"); + QTest::newRow("data6") << 4 << 3 << 0 << 0 << QString("xxxxxxxxxxxxxxxx"); + QTest::newRow("data7") << 4 << 0 << 0 << 0 << QString(""); + QTest::newRow("data8") << 4 << 0 << 0 << 0 << QString("x"); + QTest::newRow("data9") << 4 << 0 << 0 << 0 << QString("xxxxxxxxxxxxxxxx"); - QTest::newRow("") << 4 << 4 << -4 << 4 << QString(""); - QTest::newRow("") << 4 << 4 << -4 << 4 << QString("x"); - QTest::newRow("") << 4 << 4 << -4 << 4 << QString("xxxxxxxxxxxxxxxx"); - QTest::newRow("") << 4 << 3 << -3 << 4 << QString(""); - QTest::newRow("") << 4 << 3 << -3 << 4 << QString("x"); - QTest::newRow("") << 4 << 3 << -3 << 4 << QString("xxxxxxxxxxxxxxxx"); - QTest::newRow("") << 4 << 0 << 0 << 4 << QString(""); - QTest::newRow("") << 4 << 0 << 0 << 4 << QString("x"); - QTest::newRow("") << 4 << 0 << 0 << 4 << QString("xxxxxxxxxxxxxxxx"); + QTest::newRow("data10") << 4 << 4 << -4 << 4 << QString(""); + QTest::newRow("data11") << 4 << 4 << -4 << 4 << QString("x"); + QTest::newRow("data12") << 4 << 4 << -4 << 4 << QString("xxxxxxxxxxxxxxxx"); + QTest::newRow("data13") << 4 << 3 << -3 << 4 << QString(""); + QTest::newRow("data14") << 4 << 3 << -3 << 4 << QString("x"); + QTest::newRow("data15") << 4 << 3 << -3 << 4 << QString("xxxxxxxxxxxxxxxx"); + QTest::newRow("data16") << 4 << 0 << 0 << 4 << QString(""); + QTest::newRow("data17") << 4 << 0 << 0 << 4 << QString("x"); + QTest::newRow("data18") << 4 << 0 << 0 << 4 << QString("xxxxxxxxxxxxxxxx"); - QTest::newRow("") << 4 << 4 << -4 << 0 << QString(""); - QTest::newRow("") << 4 << 4 << -4 << 0 << QString("x"); - QTest::newRow("") << 4 << 4 << -4 << 0 << QString("xxxxxxxxxxxxxxxx"); - QTest::newRow("") << 4 << 3 << -3 << 0 << QString(""); - QTest::newRow("") << 4 << 3 << -3 << 0 << QString("x"); - QTest::newRow("") << 4 << 3 << -3 << 0 << QString("xxxxxxxxxxxxxxxx"); + QTest::newRow("data19") << 4 << 4 << -4 << 0 << QString(""); + QTest::newRow("data20") << 4 << 4 << -4 << 0 << QString("x"); + QTest::newRow("data21") << 4 << 4 << -4 << 0 << QString("xxxxxxxxxxxxxxxx"); + QTest::newRow("data22") << 4 << 3 << -3 << 0 << QString(""); + QTest::newRow("data23") << 4 << 3 << -3 << 0 << QString("x"); + QTest::newRow("data24") << 4 << 3 << -3 << 0 << QString("xxxxxxxxxxxxxxxx"); } void tst_QLineEdit::task233101_cursorPosAfterInputMethod() diff --git a/tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp b/tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp index 33b7ade7155..13540355c75 100644 --- a/tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp +++ b/tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp @@ -538,7 +538,7 @@ void tst_QMainWindow::menuBar() mw.setMenuBar(mb1); QVERIFY(mw.menuBar() != 0); QCOMPARE(mw.menuBar(), (QMenuBar *)mb1); -#ifdef Q_WS_WINCE_WM +#ifdef Q_OS_WINCE_WM QSKIP("With native menubar integration the menubar is not a child"); #endif QCOMPARE(mb1->parentWidget(), (QWidget *)&mw); diff --git a/tests/auto/widgets/widgets/qmenu/qmenu.pro b/tests/auto/widgets/widgets/qmenu/qmenu.pro index f919c12cb50..55099f1c54c 100644 --- a/tests/auto/widgets/widgets/qmenu/qmenu.pro +++ b/tests/auto/widgets/widgets/qmenu/qmenu.pro @@ -2,3 +2,5 @@ CONFIG += testcase TARGET = tst_qmenu QT += widgets testlib SOURCES += tst_qmenu.cpp + +win32:CONFIG += insignificant_test # QTBUG-24325 diff --git a/tests/auto/widgets/widgets/qmenubar/qmenubar.pro b/tests/auto/widgets/widgets/qmenubar/qmenubar.pro index 6bacaa0d37e..6f35d4516fb 100644 --- a/tests/auto/widgets/widgets/qmenubar/qmenubar.pro +++ b/tests/auto/widgets/widgets/qmenubar/qmenubar.pro @@ -5,3 +5,5 @@ SOURCES += tst_qmenubar.cpp # QTBUG-4965, QTBUG-11823 - unstable tests linux-*:system(". /etc/lsb-release && [ $DISTRIB_CODENAME = oneiric ]"):CONFIG += insignificant_test + +win32:CONFIG += insignificant_test # QTBUG-24326 diff --git a/tests/auto/widgets/widgets/qplaintextedit/tst_qplaintextedit.cpp b/tests/auto/widgets/widgets/qplaintextedit/tst_qplaintextedit.cpp index 1b483512e34..4019faf428c 100644 --- a/tests/auto/widgets/widgets/qplaintextedit/tst_qplaintextedit.cpp +++ b/tests/auto/widgets/widgets/qplaintextedit/tst_qplaintextedit.cpp @@ -219,7 +219,7 @@ void tst_QPlainTextEdit::getSetCheck() QCOMPARE(0, obj1.tabStopWidth()); obj1.setTabStopWidth(INT_MIN); QCOMPARE(0, obj1.tabStopWidth()); // Makes no sense to set a negative tabstop value -#if defined(QT_ARCH_WINDOWSCE) +#if defined(Q_OS_WINCE) // due to rounding error in qRound when qreal==float // we cannot use INT_MAX for this check obj1.setTabStopWidth(SHRT_MAX*2); @@ -1474,11 +1474,11 @@ void tst_QPlainTextEdit::selectionChanged() QCOMPARE(selectionChangedSpy.count(), 3); QTest::keyClick(ed, Qt::Key_Right); - QCOMPARE(ed->textCursor().position(), 5); + QCOMPARE(ed->textCursor().position(), 4); QCOMPARE(selectionChangedSpy.count(), 4); QTest::keyClick(ed, Qt::Key_Right); - QCOMPARE(ed->textCursor().position(), 6); + QCOMPARE(ed->textCursor().position(), 5); QCOMPARE(selectionChangedSpy.count(), 4); } diff --git a/tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp b/tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp index c3d982388d5..07efb60b491 100644 --- a/tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp +++ b/tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp @@ -657,22 +657,22 @@ void tst_QSpinBox::valueFromTextAndValidate_data() QTest::newRow("data3") << QString("2") << Acceptable << 0 << 100 << QString(); QTest::newRow("data4") << QString() << Intermediate << 0 << 1 << QString(); QTest::newRow("data5") << QString() << Invalid << 0 << 0 << QString(); - QTest::newRow("data5") << QString("5") << Intermediate << 2004 << 2005 << QString(); - QTest::newRow("data6") << QString("50") << Intermediate << 2004 << 2005 << QString(); - QTest::newRow("data7") << QString("205") << Intermediate << 2004 << 2005 << QString(); - QTest::newRow("data8") << QString("2005") << Acceptable << 2004 << 2005 << QString(); - QTest::newRow("data9") << QString("3") << Intermediate << 2004 << 2005 << QString(); - QTest::newRow("data10") << QString("-") << Intermediate << -20 << -10 << QString(); - QTest::newRow("data11") << QString("-1") << Intermediate << -20 << -10 << QString(); - QTest::newRow("data12") << QString("-5") << Intermediate << -20 << -10 << QString(); - QTest::newRow("data13") << QString("-5") << Intermediate << -20 << -16 << QString(); - QTest::newRow("data14") << QString("-2") << Intermediate << -20 << -16 << QString(); - QTest::newRow("data15") << QString("2") << Invalid << -20 << -16 << QString(); - QTest::newRow("data16") << QString() << Intermediate << -20 << -16 << QString(); - QTest::newRow("data17") << QString(" 22") << Acceptable << 0 << 1000 << QString("22"); - QTest::newRow("data18") << QString("22 ") << Acceptable << 0 << 1000 << QString("22"); - QTest::newRow("data19") << QString(" 22 ") << Acceptable << 0 << 1000 << QString("22"); - QTest::newRow("data20") << QString("2 2") << Invalid << 0 << 1000 << QString(); + QTest::newRow("data6") << QString("5") << Intermediate << 2004 << 2005 << QString(); + QTest::newRow("data7") << QString("50") << Intermediate << 2004 << 2005 << QString(); + QTest::newRow("data8") << QString("205") << Intermediate << 2004 << 2005 << QString(); + QTest::newRow("data9") << QString("2005") << Acceptable << 2004 << 2005 << QString(); + QTest::newRow("data10") << QString("3") << Intermediate << 2004 << 2005 << QString(); + QTest::newRow("data11") << QString("-") << Intermediate << -20 << -10 << QString(); + QTest::newRow("data12") << QString("-1") << Intermediate << -20 << -10 << QString(); + QTest::newRow("data13") << QString("-5") << Intermediate << -20 << -10 << QString(); + QTest::newRow("data14") << QString("-5") << Intermediate << -20 << -16 << QString(); + QTest::newRow("data15") << QString("-2") << Intermediate << -20 << -16 << QString(); + QTest::newRow("data16") << QString("2") << Invalid << -20 << -16 << QString(); + QTest::newRow("data17") << QString() << Intermediate << -20 << -16 << QString(); + QTest::newRow("data18") << QString(" 22") << Acceptable << 0 << 1000 << QString("22"); + QTest::newRow("data19") << QString("22 ") << Acceptable << 0 << 1000 << QString("22"); + QTest::newRow("data20") << QString(" 22 ") << Acceptable << 0 << 1000 << QString("22"); + QTest::newRow("data21") << QString("2 2") << Invalid << 0 << 1000 << QString(); } static QString stateName(int state) diff --git a/tests/auto/widgets/widgets/qsplitter/tst_qsplitter.cpp b/tests/auto/widgets/widgets/qsplitter/tst_qsplitter.cpp index 048f1441a20..294a656482f 100644 --- a/tests/auto/widgets/widgets/qsplitter/tst_qsplitter.cpp +++ b/tests/auto/widgets/widgets/qsplitter/tst_qsplitter.cpp @@ -507,7 +507,7 @@ void tst_QSplitter::setStretchFactor_data() QTest::newRow("ok06") << int(Qt::Vertical) << 1 << 1 << 1 << 1; QTest::newRow("ok07") << int(Qt::Vertical) << 2 << 2 << 2 << 2; QTest::newRow("ok08") << int(Qt::Vertical) << 3 << 5 << 5 << 5; - QTest::newRow("ok08") << int(Qt::Vertical) << -1 << 5 << 0 << 0; + QTest::newRow("ok09") << int(Qt::Vertical) << -1 << 5 << 0 << 0; } void tst_QSplitter::setStretchFactor() diff --git a/tests/auto/widgets/widgets/qtextedit/qtextedit.pro b/tests/auto/widgets/widgets/qtextedit/qtextedit.pro index 85658c222e3..294f1d84e75 100644 --- a/tests/auto/widgets/widgets/qtextedit/qtextedit.pro +++ b/tests/auto/widgets/widgets/qtextedit/qtextedit.pro @@ -17,3 +17,5 @@ wince* { } contains(QT_CONFIG,xcb):CONFIG+=insignificant_test # QTBUG-20756 crashes on xcb + +win32:CONFIG += insignificant_test # QTBUG-24348 diff --git a/tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp b/tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp index 47eb3a59a38..249e9d7fbe4 100644 --- a/tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp +++ b/tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp @@ -288,7 +288,7 @@ void tst_QTextEdit::getSetCheck() QCOMPARE(0, obj1.tabStopWidth()); obj1.setTabStopWidth(INT_MIN); QCOMPARE(0, obj1.tabStopWidth()); // Makes no sense to set a negative tabstop value -#if defined(QT_ARCH_WINDOWSCE) +#if defined(Q_OS_WINCE) // due to rounding error in qRound when qreal==float // we cannot use INT_MAX for this check obj1.setTabStopWidth(SHRT_MAX*2); @@ -1840,11 +1840,11 @@ void tst_QTextEdit::selectionChanged() QCOMPARE(selectionChangedSpy.count(), 3); QTest::keyClick(ed, Qt::Key_Right); - QCOMPARE(ed->textCursor().position(), 5); + QCOMPARE(ed->textCursor().position(), 4); QCOMPARE(selectionChangedSpy.count(), 4); QTest::keyClick(ed, Qt::Key_Right); - QCOMPARE(ed->textCursor().position(), 6); + QCOMPARE(ed->textCursor().position(), 5); QCOMPARE(selectionChangedSpy.count(), 4); } diff --git a/tests/auto/widgets/widgets/qtoolbutton/tst_qtoolbutton.cpp b/tests/auto/widgets/widgets/qtoolbutton/tst_qtoolbutton.cpp index 48b68d17956..df4efd658a2 100644 --- a/tests/auto/widgets/widgets/qtoolbutton/tst_qtoolbutton.cpp +++ b/tests/auto/widgets/widgets/qtoolbutton/tst_qtoolbutton.cpp @@ -142,6 +142,10 @@ void tst_QToolButton::triggered() QCOMPARE(spy.count(),1); QCOMPARE(qvariant_cast(spy.at(0).at(0)), def); +#ifdef Q_OS_MAC + QSKIP("QTBUG-24374 - This test hangs here on Mac OSX"); +#endif + w = menu; QTimer::singleShot(30, this, SLOT(sendMouseClick())); tb.showMenu(); diff --git a/tests/auto/xml/dom/qdom/tst_qdom.cpp b/tests/auto/xml/dom/qdom/tst_qdom.cpp index f9570f76316..d79044157a6 100644 --- a/tests/auto/xml/dom/qdom/tst_qdom.cpp +++ b/tests/auto/xml/dom/qdom/tst_qdom.cpp @@ -555,7 +555,6 @@ void tst_QDom::saveWithSerialization_data() const if (prefix.isEmpty()) QFAIL("Cannot find testdata!"); QTest::newRow("doc01.xml") << QString(prefix + "/doc01.xml"); - QTest::newRow("doc01.xml") << QString(prefix + "/doc01.xml"); QTest::newRow("doc02.xml") << QString(prefix + "/doc02.xml"); QTest::newRow("doc03.xml") << QString(prefix + "/doc03.xml"); QTest::newRow("doc04.xml") << QString(prefix + "/doc04.xml"); @@ -1868,34 +1867,34 @@ void tst_QDom::setContentWhitespace_data() const QTest::addColumn("doc"); QTest::addColumn("expectedValidity"); - QTest::newRow("") << QString::fromLatin1(" ") << true; - QTest::newRow("") << QString::fromLatin1(" ") << true; - QTest::newRow("") << QString::fromLatin1(" ") << true; - QTest::newRow("") << QString::fromLatin1(" ") << true; - QTest::newRow("") << QString::fromLatin1("\n") << true; - QTest::newRow("") << QString::fromLatin1("\n\n") << true; - QTest::newRow("") << QString::fromLatin1("\n\n\n") << true; - QTest::newRow("") << QString::fromLatin1("\n\n\n\n") << true; - QTest::newRow("") << QString::fromLatin1("\t") << true; - QTest::newRow("") << QString::fromLatin1("\t\t") << true; - QTest::newRow("") << QString::fromLatin1("\t\t\t") << true; - QTest::newRow("") << QString::fromLatin1("\t\t\t\t") << true; + QTest::newRow("data1") << QString::fromLatin1(" ") << true; + QTest::newRow("data2") << QString::fromLatin1(" ") << true; + QTest::newRow("data3") << QString::fromLatin1(" ") << true; + QTest::newRow("data4") << QString::fromLatin1(" ") << true; + QTest::newRow("data5") << QString::fromLatin1("\n") << true; + QTest::newRow("data6") << QString::fromLatin1("\n\n") << true; + QTest::newRow("data7") << QString::fromLatin1("\n\n\n") << true; + QTest::newRow("data8") << QString::fromLatin1("\n\n\n\n") << true; + QTest::newRow("data9") << QString::fromLatin1("\t") << true; + QTest::newRow("data10") << QString::fromLatin1("\t\t") << true; + QTest::newRow("data11") << QString::fromLatin1("\t\t\t") << true; + QTest::newRow("data12") << QString::fromLatin1("\t\t\t\t") << true; /* With XML prolog. */ - QTest::newRow("") << QString::fromLatin1("") << true; + QTest::newRow("data13") << QString::fromLatin1("") << true; - QTest::newRow("") << QString::fromLatin1(" ") << false; - QTest::newRow("") << QString::fromLatin1(" ") << false; - QTest::newRow("") << QString::fromLatin1(" ") << false; - QTest::newRow("") << QString::fromLatin1(" ") << false; - QTest::newRow("") << QString::fromLatin1("\n") << false; - QTest::newRow("") << QString::fromLatin1("\n\n") << false; - QTest::newRow("") << QString::fromLatin1("\n\n\n") << false; - QTest::newRow("") << QString::fromLatin1("\n\n\n\n") << false; - QTest::newRow("") << QString::fromLatin1("\t") << false; - QTest::newRow("") << QString::fromLatin1("\t\t") << false; - QTest::newRow("") << QString::fromLatin1("\t\t\t") << false; - QTest::newRow("") << QString::fromLatin1("\t\t\t\t") << false; + QTest::newRow("data14") << QString::fromLatin1(" ") << false; + QTest::newRow("data15") << QString::fromLatin1(" ") << false; + QTest::newRow("data16") << QString::fromLatin1(" ") << false; + QTest::newRow("data17") << QString::fromLatin1(" ") << false; + QTest::newRow("data18") << QString::fromLatin1("\n") << false; + QTest::newRow("data19") << QString::fromLatin1("\n\n") << false; + QTest::newRow("data20") << QString::fromLatin1("\n\n\n") << false; + QTest::newRow("data21") << QString::fromLatin1("\n\n\n\n") << false; + QTest::newRow("data22") << QString::fromLatin1("\t") << false; + QTest::newRow("data23") << QString::fromLatin1("\t\t") << false; + QTest::newRow("data24") << QString::fromLatin1("\t\t\t") << false; + QTest::newRow("data25") << QString::fromLatin1("\t\t\t\t") << false; } void tst_QDom::taskQTBUG4595_dontAssertWhenDocumentSpecifiesUnknownEncoding() const diff --git a/tests/benchmarks/corelib/io/qfile/main.cpp b/tests/benchmarks/corelib/io/qfile/main.cpp index 92edd430601..3d16921b7f3 100644 --- a/tests/benchmarks/corelib/io/qfile/main.cpp +++ b/tests/benchmarks/corelib/io/qfile/main.cpp @@ -542,7 +542,7 @@ void tst_qfile::createSmallFiles() dir.cd("tst"); tmpDirName = dir.absolutePath(); -#if defined(Q_WS_WINCE) +#if defined(Q_OS_WINCE) for (int i = 0; i < 100; ++i) #else for (int i = 0; i < 1000; ++i) diff --git a/tests/benchmarks/corelib/kernel/qmetatype/tst_qmetatype.cpp b/tests/benchmarks/corelib/kernel/qmetatype/tst_qmetatype.cpp index 14895863e45..a3cdd38e560 100644 --- a/tests/benchmarks/corelib/kernel/qmetatype/tst_qmetatype.cpp +++ b/tests/benchmarks/corelib/kernel/qmetatype/tst_qmetatype.cpp @@ -72,6 +72,8 @@ private slots: void constructCoreType_data(); void constructCoreType(); + void constructCoreTypeStaticLess_data(); + void constructCoreTypeStaticLess(); void constructCoreTypeCopy_data(); void constructCoreTypeCopy(); @@ -79,6 +81,8 @@ private slots: void constructInPlace(); void constructInPlaceCopy_data(); void constructInPlaceCopy(); + void constructInPlaceCopyStaticLess_data(); + void constructInPlaceCopyStaticLess(); }; tst_QMetaType::tst_QMetaType() @@ -89,6 +93,12 @@ tst_QMetaType::~tst_QMetaType() { } +struct BigClass +{ + double n,i,e,r,o,b; +}; +Q_DECLARE_METATYPE(BigClass); + void tst_QMetaType::typeBuiltin_data() { QTest::addColumn("typeName"); @@ -240,7 +250,7 @@ void tst_QMetaType::isRegisteredNotRegistered() void tst_QMetaType::constructCoreType_data() { QTest::addColumn("typeId"); - for (int i = 0; i <= QMetaType::LastCoreType; ++i) + for (int i = QMetaType::FirstCoreType; i <= QMetaType::LastCoreType; ++i) QTest::newRow(QMetaType::typeName(i)) << i; // GUI types are tested in tst_QGuiMetaType. } @@ -260,6 +270,23 @@ void tst_QMetaType::constructCoreType() } } +void tst_QMetaType::constructCoreTypeStaticLess_data() +{ + constructCoreType_data(); +} + +void tst_QMetaType::constructCoreTypeStaticLess() +{ + QFETCH(int, typeId); + QBENCHMARK { + QMetaType type(typeId); + for (int i = 0; i < 100000; ++i) { + void *data = type.create((void *)0); + type.destroy(data); + } + } +} + void tst_QMetaType::constructCoreTypeCopy_data() { constructCoreType_data(); @@ -285,6 +312,7 @@ void tst_QMetaType::constructCoreTypeCopy() void tst_QMetaType::constructInPlace_data() { constructCoreType_data(); + QTest::newRow("custom") << qMetaTypeId(); } void tst_QMetaType::constructInPlace() @@ -305,7 +333,7 @@ void tst_QMetaType::constructInPlace() void tst_QMetaType::constructInPlaceCopy_data() { - constructCoreType_data(); + constructInPlace_data(); } void tst_QMetaType::constructInPlaceCopy() @@ -326,5 +354,29 @@ void tst_QMetaType::constructInPlaceCopy() qFreeAligned(storage); } +void tst_QMetaType::constructInPlaceCopyStaticLess_data() +{ + constructInPlaceCopy_data(); +} + +void tst_QMetaType::constructInPlaceCopyStaticLess() +{ + QFETCH(int, typeId); + int size = QMetaType::sizeOf(typeId); + void *storage = qMallocAligned(size, 2 * sizeof(qlonglong)); + void *other = QMetaType::create(typeId); + QCOMPARE(QMetaType::construct(typeId, storage, other), storage); + QMetaType::destruct(typeId, storage); + QBENCHMARK { + QMetaType type(typeId); + for (int i = 0; i < 100000; ++i) { + type.construct(storage, other); + type.destruct(storage); + } + } + QMetaType::destroy(typeId, other); + qFreeAligned(storage); +} + QTEST_MAIN(tst_QMetaType) #include "tst_qmetatype.moc" diff --git a/tests/benchmarks/corelib/kernel/qvariant/tst_qvariant.cpp b/tests/benchmarks/corelib/kernel/qvariant/tst_qvariant.cpp index 0c4af173765..f6b4d88311c 100644 --- a/tests/benchmarks/corelib/kernel/qvariant/tst_qvariant.cpp +++ b/tests/benchmarks/corelib/kernel/qvariant/tst_qvariant.cpp @@ -90,6 +90,7 @@ struct BigClass double n,i,e,r,o,b; }; Q_STATIC_ASSERT(sizeof(BigClass) > sizeof(QVariant::Private::Data)); +Q_DECLARE_TYPEINFO(BigClass, Q_MOVABLE_TYPE); Q_DECLARE_METATYPE(BigClass); struct SmallClass @@ -97,6 +98,7 @@ struct SmallClass char s; }; Q_STATIC_ASSERT(sizeof(SmallClass) <= sizeof(QVariant::Private::Data)); +Q_DECLARE_TYPEINFO(SmallClass, Q_MOVABLE_TYPE); Q_DECLARE_METATYPE(SmallClass); void tst_qvariant::testBound() @@ -305,7 +307,7 @@ void tst_qvariant::stringVariantValue() void tst_qvariant::createCoreType_data() { QTest::addColumn("typeId"); - for (int i = 0; i <= QMetaType::LastCoreType; ++i) + for (int i = QMetaType::FirstCoreType; i <= QMetaType::LastCoreType; ++i) QTest::newRow(QMetaType::typeName(i)) << i; } diff --git a/tests/benchmarks/corelib/tools/containers-sequential/main.cpp b/tests/benchmarks/corelib/tools/containers-sequential/main.cpp index ee13a63a570..e42a40b110d 100644 --- a/tests/benchmarks/corelib/tools/containers-sequential/main.cpp +++ b/tests/benchmarks/corelib/tools/containers-sequential/main.cpp @@ -133,7 +133,7 @@ struct Large { // A "large" item type }; // Embedded devices typically have limited memory -#if defined(Q_WS_WINCE) +#if defined(Q_OS_WINCE) # define LARGE_MAX_SIZE 2000 #else # define LARGE_MAX_SIZE 20000 diff --git a/tests/benchmarks/corelib/tools/qhash/main.cpp b/tests/benchmarks/corelib/tools/qhash/main.cpp index 6f3228d0ebc..18138cbd47a 100644 --- a/tests/benchmarks/corelib/tools/qhash/main.cpp +++ b/tests/benchmarks/corelib/tools/qhash/main.cpp @@ -45,7 +45,7 @@ #include #include #include - +#include #include @@ -69,12 +69,36 @@ private: void tst_QHash::data() { - QFile smallPathsData("paths_small_data.txt"); - smallPathsData.open(QIODevice::ReadOnly); - QTest::addColumn("items"); - QTest::newRow("paths-small") - << QString::fromLatin1(smallPathsData.readAll()).split(QLatin1Char('\n')); + static QStringList smallFilePaths; + + { + // small list of file paths + if (smallFilePaths.isEmpty()) { + QFile smallPathsData("paths_small_data.txt"); + QVERIFY(smallPathsData.open(QIODevice::ReadOnly)); + smallFilePaths = QString::fromLatin1(smallPathsData.readAll()).split(QLatin1Char('\n')); + Q_ASSERT(!smallFilePaths.isEmpty()); + } + + QTest::newRow("paths-small") << smallFilePaths; + } + + { + // list of UUIDs + static QStringList uuids; + if (uuids.isEmpty()) { + // guaranteed to be completely random, generated by http://xkcd.com/221/ + QUuid ns = QUuid("{f43d2ef3-2fe9-4563-a6f5-5a0100c2d699}"); + uuids.reserve(smallFilePaths.size()); + + foreach (const QString &path, smallFilePaths) + uuids.append(QUuid::createUuidV5(ns, path).toString()); + } + + QTest::newRow("uuids-list") << uuids; + } + } void tst_QHash::qhash_qt4() diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsview/tst_qgraphicsview.cpp b/tests/benchmarks/gui/graphicsview/qgraphicsview/tst_qgraphicsview.cpp index cc549f835d3..8eef993c06e 100644 --- a/tests/benchmarks/gui/graphicsview/qgraphicsview/tst_qgraphicsview.cpp +++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/tst_qgraphicsview.cpp @@ -414,7 +414,7 @@ void tst_QGraphicsView::chipTester_data() void tst_QGraphicsView::chipTester() { -#ifdef Q_WS_WINCE_WM +#ifdef Q_OS_WINCE_WM QSKIP("WinCE WM: Fails on Windows Mobile w/o OpenGL"); #endif QFETCH(bool, antialias); diff --git a/tests/benchmarks/network/access/qnetworkreply/tst_qnetworkreply.cpp b/tests/benchmarks/network/access/qnetworkreply/tst_qnetworkreply.cpp index e48172da89e..829bba5c5df 100644 --- a/tests/benchmarks/network/access/qnetworkreply/tst_qnetworkreply.cpp +++ b/tests/benchmarks/network/access/qnetworkreply/tst_qnetworkreply.cpp @@ -565,7 +565,7 @@ void tst_qnetworkreply::uploadPerformance() void tst_qnetworkreply::httpUploadPerformance() { -#if defined(Q_WS_WINCE_WM) +#if defined(Q_OS_WINCE_WM) // Show some mercy for non-desktop platform/s enum {UploadSize = 4*1024*1024}; // 4 MB #else @@ -636,7 +636,7 @@ void tst_qnetworkreply::httpDownloadPerformance() { QFETCH(bool, serverSendsContentLength); QFETCH(bool, chunkedEncoding); -#if defined(Q_WS_WINCE_WM) +#if defined(Q_OS_WINCE_WM) // Show some mercy to non-desktop platform/s enum {UploadSize = 4*1024*1024}; // 4 MB #else @@ -720,7 +720,7 @@ void tst_qnetworkreply::httpDownloadPerformanceDownloadBuffer() QFETCH(HttpDownloadPerformanceDownloadBufferTestType, testType); // On my Linux Desktop the results are already visible with 128 kB, however we use this to have good results. -#if defined(Q_WS_WINCE_WM) +#if defined(Q_OS_WINCE_WM) // Show some mercy to non-desktop platform/s enum {UploadSize = 4*1024*1024}; // 4 MB #else diff --git a/tests/benchmarks/network/socket/qtcpserver/tst_qtcpserver.cpp b/tests/benchmarks/network/socket/qtcpserver/tst_qtcpserver.cpp index ea923a7fd0c..2bb23e5781f 100644 --- a/tests/benchmarks/network/socket/qtcpserver/tst_qtcpserver.cpp +++ b/tests/benchmarks/network/socket/qtcpserver/tst_qtcpserver.cpp @@ -173,7 +173,7 @@ void tst_QTcpServer::ipv6LoopbackPerformanceTest() QFETCH_GLOBAL(bool, setProxy); if (setProxy) return; -#if defined(Q_WS_WINCE_WM) +#if defined(Q_OS_WINCE_WM) QSKIP("WinCE WM: Not yet supported"); #endif diff --git a/tests/manual/cmake/CMakeLists.txt b/tests/manual/cmake/CMakeLists.txt index 91ead649ec8..7ec3cebf4b9 100644 --- a/tests/manual/cmake/CMakeLists.txt +++ b/tests/manual/cmake/CMakeLists.txt @@ -1,35 +1,88 @@ +# This is an automatic test for the CMake configuration files. +# To run it, +# 1) mkdir build # Create a build directory +# 2) cd build +# 3) cmake .. # Run cmake on this directory. +# 4) ctest # Run ctest +# +# The expected output is something like: +# +# Start 1: pass1 +# 1/7 Test #1: pass1 ............................ Passed 4.25 sec +# Start 2: pass2 +# 2/7 Test #2: pass2 ............................ Passed 2.00 sec +# Start 3: pass3 +# 3/7 Test #3: pass3 ............................ Passed 2.85 sec +# Start 4: fail4 +# 4/7 Test #4: fail4 ............................ Passed 1.88 sec +# Start 5: fail5 +# 5/7 Test #5: fail5 ............................ Passed 1.36 sec +# Start 6: pass_needsquoting_6 +# 6/7 Test #6: pass_needsquoting_6 .............. Passed 2.88 sec +# Start 7: pass7 +# 7/7 Test #7: pass7 ............................ Passed 0.93 sec +# +# Note that if Qt is not installed, or if it is installed to a +# non-standard prefix, the environment variable CMAKE_PREFIX_PATH +# needs to be set to the installation prefix or build prefix of Qt +# before running these tests. + cmake_minimum_required(VERSION 2.8) project(qmake_cmake_files) -macro(_do_build _dir) - try_compile(Result ${CMAKE_CURRENT_BINARY_DIR}/${_dir} - ${CMAKE_CURRENT_SOURCE_DIR}/${_dir} - ${_dir} - OUTPUT_VARIABLE Out - ) -endmacro() +enable_testing() macro(expect_pass _dir) - _do_build(${_dir}) - if (NOT Result) - message(SEND_ERROR "Build failed: ${Out}") - endif() + string(REPLACE "(" "_" testname "${_dir}") + string(REPLACE ")" "_" testname "${testname}") + add_test(${testname} ${CMAKE_CTEST_COMMAND} + --build-and-test + "${CMAKE_CURRENT_SOURCE_DIR}/${_dir}" + "${CMAKE_CURRENT_BINARY_DIR}/${_dir}" + --build-generator ${CMAKE_GENERATOR} + --build-makeprogram ${CMAKE_MAKE_PROGRAM} + ) endmacro() macro(expect_fail _dir) - _do_build(${_dir}) - if (Result) - message(SEND_ERROR "Build should fail, but did not: ${Out}") - endif() + string(REPLACE "(" "_" testname "${_dir}") + string(REPLACE ")" "_" testname "${testname}") + file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/failbuild/${_dir}") + file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/${_dir}" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/failbuild/${_dir}") + file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/failbuild/${_dir}/CMakeLists.txt" + " + cmake_minimum_required(VERSION 2.8) + project(${_dir}_build) + + try_compile(Result \${CMAKE_CURRENT_BINARY_DIR}/${_dir} + \${CMAKE_CURRENT_SOURCE_DIR}/${_dir} + ${_dir} + ) + if (Result) + message(SEND_ERROR \"Succeeded build which should fail\") + endif() + " + ) + add_test(${testname} ${CMAKE_CTEST_COMMAND} + --build-and-test + "${CMAKE_CURRENT_BINARY_DIR}/failbuild/${_dir}" + "${CMAKE_CURRENT_BINARY_DIR}/failbuild/${_dir}/build" + --build-generator ${CMAKE_GENERATOR} + --build-makeprogram ${CMAKE_MAKE_PROGRAM} + ) endmacro() if(${CMAKE_VERSION} VERSION_GREATER 2.8.7) # Requires CMAKE_AUTOMOC function in CMake 2.8.7 expect_pass(pass1) +else() + message("CMake version older than 2.8.7. Not running test \"pass1\"") endif() expect_pass(pass2) expect_pass(pass3) expect_fail(fail4) expect_fail(fail5) +expect_pass("pass(needsquoting)6") +expect_pass(pass7) diff --git a/tests/manual/cmake/fail4/CMakeLists.txt b/tests/manual/cmake/fail4/CMakeLists.txt index dcd4b8bd650..2466e24d3a3 100644 --- a/tests/manual/cmake/fail4/CMakeLists.txt +++ b/tests/manual/cmake/fail4/CMakeLists.txt @@ -7,6 +7,8 @@ find_package(Qt5Core REQUIRED) include_directories(${Qt5Core_INCLUDE_DIRS}) +add_definitions(${Qt5Core_DEFINITIONS}) + qt5_wrap_cpp(moc_files myobject.h) # Test options. The -binary option generates a binary to dlopen instead of diff --git a/tests/manual/cmake/fail5/CMakeLists.txt b/tests/manual/cmake/fail5/CMakeLists.txt index f82a62b626f..9aedf4a0089 100644 --- a/tests/manual/cmake/fail5/CMakeLists.txt +++ b/tests/manual/cmake/fail5/CMakeLists.txt @@ -7,6 +7,8 @@ find_package(Qt5Core REQUIRED) include_directories(${Qt5Core_INCLUDE_DIRS}) +add_definitions(${Qt5Core_DEFINITIONS}) + # Test options. The -i option removes the include "myobject.h" from the moc file # causing a compile failure. -> Options work qt5_wrap_cpp(moc_files myobject.h OPTIONS -i) diff --git a/tests/manual/cmake/pass(needsquoting)6/CMakeLists.txt b/tests/manual/cmake/pass(needsquoting)6/CMakeLists.txt index cc1a1bc588f..fb971f9ebd2 100644 --- a/tests/manual/cmake/pass(needsquoting)6/CMakeLists.txt +++ b/tests/manual/cmake/pass(needsquoting)6/CMakeLists.txt @@ -9,6 +9,8 @@ find_package(Qt5Widgets REQUIRED) include_directories(${Qt5Core_INCLUDE_DIRS} ${Qt5Gui_INCLUDE_DIRS} ${Qt5Widgets_INCLUDE_DIRS}) +add_definitions(${Qt5Core_DEFINITIONS}) + set(CMAKE_INCLUDE_CURRENT_DIR ON) qt5_wrap_cpp(moc_files mywidget.h) diff --git a/tests/manual/cmake/pass1/CMakeLists.txt b/tests/manual/cmake/pass1/CMakeLists.txt index f11887e5458..b1922c075b7 100644 --- a/tests/manual/cmake/pass1/CMakeLists.txt +++ b/tests/manual/cmake/pass1/CMakeLists.txt @@ -18,6 +18,7 @@ macro(qt5_use_package _target _package) # set_property(TARGET ${_target} APPEND PROPERTY INCLUDE_DIRECTORIES ${Qt5${_package}_INCLUDE_DIRS}) include_directories(${Qt5${_package}_INCLUDE_DIRS}) set_property(TARGET ${_target} APPEND PROPERTY COMPILE_DEFINITIONS ${Qt5${_package}_COMPILE_DEFINITIONS}) + set_property(TARGET ${_target} APPEND PROPERTY COMPILE_FLAGS ${Qt5${_package}_COMPILE_FLAGS}) else() message(FATAL_ERROR "NOT FOUND: Qt5${_package}") endif() diff --git a/tests/manual/cmake/pass2/CMakeLists.txt b/tests/manual/cmake/pass2/CMakeLists.txt index ac1bb15846a..a52744623e6 100644 --- a/tests/manual/cmake/pass2/CMakeLists.txt +++ b/tests/manual/cmake/pass2/CMakeLists.txt @@ -7,6 +7,8 @@ find_package(Qt5Core REQUIRED) include_directories(${Qt5Core_INCLUDE_DIRS}) +add_definitions(${Qt5Core_DEFINITIONS}) + qt5_wrap_cpp(moc_files myobject.h) qt5_add_resources(rcc_files "pass2.qrc") diff --git a/tests/manual/cmake/pass3/CMakeLists.txt b/tests/manual/cmake/pass3/CMakeLists.txt index 11402e2e186..b8361618136 100644 --- a/tests/manual/cmake/pass3/CMakeLists.txt +++ b/tests/manual/cmake/pass3/CMakeLists.txt @@ -8,6 +8,8 @@ find_package(Qt5Widgets REQUIRED) include_directories(${Qt5Widgets_INCLUDE_DIRS}) +add_definitions(${Qt5Core_DEFINITIONS}) + set(CMAKE_INCLUDE_CURRENT_DIR ON) qt5_wrap_cpp(moc_files mywidget.h) diff --git a/tests/manual/cmake/pass7/CMakeLists.txt b/tests/manual/cmake/pass7/CMakeLists.txt new file mode 100644 index 00000000000..e7c9b46eada --- /dev/null +++ b/tests/manual/cmake/pass7/CMakeLists.txt @@ -0,0 +1,11 @@ + +cmake_minimum_required(VERSION 2.8) + +project(pass7) + +find_package(Qt5Core REQUIRED) + +include_directories(${Qt5Core_INCLUDE_DIRS}) +add_definitions(${Qt5Core_DEFINITIONS}) + +add_executable(myobject main.cpp) diff --git a/tests/manual/cmake/pass7/main.cpp b/tests/manual/cmake/pass7/main.cpp new file mode 100644 index 00000000000..0a6b09d877a --- /dev/null +++ b/tests/manual/cmake/pass7/main.cpp @@ -0,0 +1,47 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Stephen Kelly +** Contact: http://www.qt-project.org/ +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qplatformdefs.h" + +int main(int argc, char **argv) +{ + return 0; +} diff --git a/tests/manual/qnetworkconfigurationmanager/main.cpp b/tests/manual/qnetworkconfigurationmanager/main.cpp new file mode 100644 index 00000000000..2ac33d4fe1e --- /dev/null +++ b/tests/manual/qnetworkconfigurationmanager/main.cpp @@ -0,0 +1,84 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include +#include +#include +#include + +class tst_qnetworkconfigurationmanager : public QObject +{ + Q_OBJECT + +private slots: + void isOnline(); +}; + +class SignalHandler : public QObject +{ + Q_OBJECT + +public slots: + void onOnlineStateChanged(bool isOnline) + { + qDebug() << "Online state changed to:" << isOnline; + } +}; + +void tst_qnetworkconfigurationmanager::isOnline() +{ + QNetworkConfigurationManager manager; + qDebug() << "Testing QNetworkConfigurationManager online status reporting functionality."; + qDebug() << "This should tell the current online state:" << manager.isOnline(); + qDebug() << "Now please plug / unplug the network cable, and check the state update signal."; + qDebug() << "Note that there might be some delays before you see the change, depending on the backend."; + + SignalHandler signalHandler; + connect(&manager, SIGNAL(onlineStateChanged(bool)), &signalHandler, SLOT(onOnlineStateChanged(bool))); + + // event loop + QTestEventLoop::instance().enterLoop(30); + QVERIFY(QTestEventLoop::instance().timeout()); +} + +QTEST_MAIN(tst_qnetworkconfigurationmanager) + +#include "main.moc" diff --git a/tests/manual/qnetworkconfigurationmanager/qnetworkconfigurationmanager.pro b/tests/manual/qnetworkconfigurationmanager/qnetworkconfigurationmanager.pro new file mode 100644 index 00000000000..613fcd85e49 --- /dev/null +++ b/tests/manual/qnetworkconfigurationmanager/qnetworkconfigurationmanager.pro @@ -0,0 +1,13 @@ +CONFIG += testcase +TEMPLATE = app +TARGET = tst_qnetworkconfigurationmanager +DEPENDPATH += . +INCLUDEPATH += . + +QT -= gui +QT += network testlib + +CONFIG += release + +# Input +SOURCES += main.cpp diff --git a/tools/configure/Makefile.mingw b/tools/configure/Makefile.mingw new file mode 100644 index 00000000000..5951cb4e922 --- /dev/null +++ b/tools/configure/Makefile.mingw @@ -0,0 +1,92 @@ +CORESRC = $(QTSRC)src/corelib +TOOLSRC = $(QTSRC)tools +CONFSRC = $(TOOLSRC)/configure + +RAW_PCH = configure_pch.h +PCH = $(RAW_PCH).gch/c++ +CXX = g++ +DEFINES = -DUNICODE -DQT_NODLL -DQT_NO_DATASTREAM -DQT_NO_CODECS -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_LITE_COMPONENT -DQT_NO_STL -DQT_NO_COMPRESS -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -D_CRT_SECURE_NO_DEPRECATE -DQT_BOOTSTRAPPED -DCOMMERCIAL_VERSION +INCPATH = -I"../../include" -I"../../include/QtCore" -I"../../include/QtCore/$(QTVERSION)" -I"../../include/QtCore/$(QTVERSION)/QtCore" -I"$(TOOLSRC)/shared" -I"$(QTSRC)mkspecs/win32-g++" +CXXFLAGS_BARE = -fno-rtti -fno-exceptions -mthreads -Wall -Wextra $(DEFINES) $(INCPATH) +CXXFLAGS = -include $(RAW_PCH) $(CXXFLAGS_BARE) +LINK = g++ +LFLAGS = -Wl,-subsystem,console -mthreads +LIBS = -lole32 -ladvapi32 -luuid + +TARGET = ../../configure.exe + +OBJECTS = \ + main.o \ + configureapp.o \ + environment.o \ + tools.o \ + qbytearray.o \ + qbytearraymatcher.o \ + qhash.o \ + qlist.o \ + qlocale.o \ + qlocale_win.o \ + qlocale_tools.o \ + qvector.o \ + qutfcodec.o \ + qtextcodec.o \ + qglobal.o \ + qnumeric.o \ + qbuffer.o \ + qdatastream.o \ + qdir.o \ + qdiriterator.o \ + qfile.o \ + qfileinfo.o \ + qabstractfileengine.o \ + qfilesystementry.o \ + qfilesystemengine.o \ + qfilesystemengine_win.o \ + qfilesystemiterator_win.o \ + qfsfileengine.o \ + qfsfileengine_win.o \ + qfsfileengine_iterator.o \ + qiodevice.o \ + qtextstream.o \ + qlogging.o \ + qtemporaryfile.o \ + qsystemlibrary.o \ + qbitarray.o \ + qdatetime.o \ + qmap.o \ + qregexp.o \ + qstring.o \ + qstringlist.o \ + qvsnprintf.o \ + qvariant.o \ + qsystemerror.o \ + qurl.o \ + qmetatype.o \ + qmalloc.o \ + qxmlstream.o \ + qxmlutils.o \ + quuid.o \ + qcryptographichash.o \ + registry.o + +$(TARGET): $(OBJECTS) + $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(LIBS) + +$(OBJECTS): $(PCH) + +CHK_DIR_EXISTS = test -d +MKDIR=mkdir -p +$(PCH): $(CONFSRC)/configure_pch.h + @$(CHK_DIR_EXISTS) $(RAW_PCH).gch || $(MKDIR) $(RAW_PCH).gch + $(CXX) -x c++-header -c $(CXXFLAGS_BARE) -o $@ $< + +VPATH = $(CONFSRC):$(TOOLSRC)/shared/windows:$(CORESRC)/global:$(CORESRC)/kernel:$(CORESRC)/tools:$(CORESRC)/codecs:$(CORESRC)/io:$(CORESRC)/xml:$(CORESRC)/plugin + +main.o: $(CONFSRC)/configureapp.h +configureapp.o: $(CONFSRC)/configureapp.h $(CONFSRC)/environment.h $(CONFSRC)/tools.h +environment.o: $(CONFSRC)/environment.h +tools.o: $(CONFSRC)/tools.h + +clean: + -rm -f *.o + -rm -rf *.gch diff --git a/tools/configure/Makefile.win32 b/tools/configure/Makefile.win32 new file mode 100644 index 00000000000..92de55f137d --- /dev/null +++ b/tools/configure/Makefile.win32 @@ -0,0 +1,157 @@ +CORESRC = $(QTSRC)src\corelib +TOOLSRC = $(QTSRC)tools +CONFSRC = $(TOOLSRC)\configure + +PCH = configure_pch.pch +DEFINES = -DUNICODE -DQT_NODLL -DQT_NO_CODECS -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_LITE_COMPONENT -DQT_NO_STL -DQT_NO_COMPRESS -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -D_CRT_SECURE_NO_DEPRECATE -DQT_BOOTSTRAPPED -DCOMMERCIAL_VERSION +INCPATH = -I"..\..\include" -I"..\..\include\QtCore" -I"..\..\include\QtCore\$(QTVERSION)" -I"..\..\include\QtCore\$(QTVERSION)\QtCore" -I"$(TOOLSRC)\shared" -I"$(QTSRC)mkspecs\win32-msvc2008" +CXXFLAGS_BARE = -nologo -Zm200 -Zc:wchar_t -MT -W3 -GR -EHsc -w34100 -w34189 $(EXTRA_CXXFLAGS) $(DEFINES) $(INCPATH) +CXXFLAGS = -FIconfigure_pch.h -Yuconfigure_pch.h -Fp$(PCH) -MP $(CXXFLAGS_BARE) +LINK = link +LFLAGS = /NOLOGO /DYNAMICBASE /NXCOMPAT /INCREMENTAL:NO /SUBSYSTEM:CONSOLE "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" /MANIFEST /MANIFESTFILE:"configure.intermediate.manifest" +LIBS = ole32.lib advapi32.lib + +TARGET = ..\..\configure.exe + +OBJECTS = \ + main.obj \ + configureapp.obj \ + environment.obj \ + tools.obj \ + qbytearray.obj \ + qbytearraymatcher.obj \ + qhash.obj \ + qlist.obj \ + qlocale.obj \ + qlocale_win.obj \ + qlocale_tools.obj \ + qvector.obj \ + qutfcodec.obj \ + qtextcodec.obj \ + qglobal.obj \ + qnumeric.obj \ + qbuffer.obj \ + qdatastream.obj \ + qdir.obj \ + qdiriterator.obj \ + qfile.obj \ + qfileinfo.obj \ + qabstractfileengine.obj \ + qfilesystementry.obj \ + qfilesystemengine.obj \ + qfilesystemengine_win.obj \ + qfilesystemiterator_win.obj \ + qfsfileengine.obj \ + qfsfileengine_win.obj \ + qfsfileengine_iterator.obj \ + qiodevice.obj \ + qtextstream.obj \ + qlogging.obj \ + qtemporaryfile.obj \ + qsystemlibrary.obj \ + qbitarray.obj \ + qdatetime.obj \ + qmap.obj \ + qregexp.obj \ + qstring.obj \ + qstringlist.obj \ + qvsnprintf.obj \ + qvariant.obj \ + qsystemerror.obj \ + qurl.obj \ + qmetatype.obj \ + qmalloc.obj \ + qxmlstream.obj \ + qxmlutils.obj \ + quuid.obj \ + qcryptographichash.obj \ + registry.obj + +$(TARGET): $(OBJECTS) + $(LINK) $(LFLAGS) /OUT:$(TARGET) @<< + $(OBJECTS) $(LIBS) +<< + mt.exe -nologo -manifest "configure.intermediate.manifest" -outputresource:$(TARGET);1 + +clean: + -del *.obj + -del *.pch + -del configure.intermediate.manifest + +$(PCH): $(CONFSRC)\configure_pch.h + $(CXX) -c -Yc $(CXXFLAGS_BARE) -Fp$@ -Foconfigure_pch.obj -TP $** + +main.obj: $(CONFSRC)\main.cpp $(CONFSRC)\configureapp.h $(PCH) +configureapp.obj: $(CONFSRC)\configureapp.cpp $(CONFSRC)\configureapp.h $(CONFSRC)\environment.h $(CONFSRC)\tools.h $(PCH) +environment.obj: $(CONFSRC)\environment.cpp $(CONFSRC)\environment.h $(PCH) +tools.obj: $(CONFSRC)\tools.cpp $(CONFSRC)\tools.h $(PCH) +registry.obj: $(TOOLSRC)\shared\windows\registry.cpp $(PCH) +qbytearray.obj: $(CORESRC)\tools\qbytearray.cpp $(PCH) +qbytearraymatcher.obj: $(CORESRC)\tools\qbytearraymatcher.cpp $(PCH) +qhash.obj: $(CORESRC)\tools\qhash.cpp $(PCH) +qlist.obj: $(CORESRC)\tools\qlist.cpp $(PCH) +qlocale.obj: $(CORESRC)\tools\qlocale.cpp $(PCH) +qlocale_win.obj: $(CORESRC)\tools\qlocale_win.cpp $(PCH) +qlocale_tools.obj: $(CORESRC)\tools\qlocale_tools.cpp $(PCH) +qvector.obj: $(CORESRC)\tools\qvector.cpp $(PCH) +qutfcodec.obj: $(CORESRC)\codecs\qutfcodec.cpp $(PCH) +qtextcodec.obj: $(CORESRC)\codecs\qtextcodec.cpp $(PCH) +qglobal.obj: $(CORESRC)\global\qglobal.cpp $(PCH) +qnumeric.obj: $(CORESRC)\global\qnumeric.cpp $(PCH) +qbuffer.obj: $(CORESRC)\io\qbuffer.cpp $(PCH) +qdatastream.obj: $(CORESRC)\io\qdatastream.cpp $(PCH) +qdir.obj: $(CORESRC)\io\qdir.cpp $(PCH) +qdiriterator.obj: $(CORESRC)\io\qdiriterator.cpp $(PCH) +qfile.obj: $(CORESRC)\io\qfile.cpp $(PCH) +qfileinfo.obj: $(CORESRC)\io\qfileinfo.cpp $(PCH) +qabstractfileengine.obj: $(CORESRC)\io\qabstractfileengine.cpp $(PCH) +qfilesystementry.obj: $(CORESRC)\io\qfilesystementry.cpp $(PCH) +qfilesystemengine.obj: $(CORESRC)\io\qfilesystemengine.cpp $(PCH) +qfilesystemengine_win.obj: $(CORESRC)\io\qfilesystemengine_win.cpp $(PCH) +qfilesystemiterator_win.obj: $(CORESRC)\io\qfilesystemiterator_win.cpp $(PCH) +qfsfileengine.obj: $(CORESRC)\io\qfsfileengine.cpp $(PCH) +qfsfileengine_win.obj: $(CORESRC)\io\qfsfileengine_win.cpp $(PCH) +qfsfileengine_iterator.obj: $(CORESRC)\io\qfsfileengine_iterator.cpp $(PCH) +qiodevice.obj: $(CORESRC)\io\qiodevice.cpp $(PCH) +qtextstream.obj: $(CORESRC)\io\qtextstream.cpp $(PCH) +qtemporaryfile.obj: $(CORESRC)\io\qtemporaryfile.cpp $(PCH) +qsystemlibrary.obj: $(CORESRC)\plugin\qsystemlibrary.cpp $(PCH) +qbitarray.obj: $(CORESRC)\tools\qbitarray.cpp $(PCH) +qdatetime.obj: $(CORESRC)\tools\qdatetime.cpp $(PCH) +qmap.obj: $(CORESRC)\tools\qmap.cpp $(PCH) +qregexp.obj: $(CORESRC)\tools\qregexp.cpp $(PCH) +qstring.obj: $(CORESRC)\tools\qstring.cpp $(PCH) +qstringlist.obj: $(CORESRC)\tools\qstringlist.cpp $(PCH) +qvsnprintf.obj: $(CORESRC)\tools\qvsnprintf.cpp $(PCH) +qvariant.obj: $(CORESRC)\kernel\qvariant.cpp $(PCH) +qsystemerror.obj: $(CORESRC)\kernel\qsystemerror.cpp $(PCH) +qurl.obj: $(CORESRC)\io\qurl.cpp $(PCH) +qline.obj: $(CORESRC)\tools\qline.cpp $(PCH) +qsize.obj: $(CORESRC)\tools\qsize.cpp $(PCH) +qpoint.obj: $(CORESRC)\tools\qpoint.cpp $(PCH) +qrect.obj: $(CORESRC)\tools\qrect.cpp $(PCH) +qmetatype.obj: $(CORESRC)\kernel\qmetatype.cpp $(PCH) +qmalloc.obj: $(CORESRC)\global\qmalloc.cpp $(PCH) +qxmlstream.obj: $(CORESRC)\xml\qxmlstream.cpp $(PCH) +qxmlutils.obj: $(CORESRC)\xml\qxmlutils.cpp $(PCH) +quuid.obj: $(CORESRC)\plugin\quuid.cpp $(PCH) +qcryptographichash.obj: $(CORESRC)\tools\qcryptographichash.cpp $(PCH) + +{$(CONFSRC)}.cpp{}.obj:: + $(CXX) -c $(CXXFLAGS) $< +{$(TOOLSRC)\shared\windows}.cpp{}.obj:: + $(CXX) -c $(CXXFLAGS) $< +{$(CORESRC)\tools}.cpp{}.obj:: + $(CXX) -c $(CXXFLAGS) $< +{$(CORESRC)\codecs}.cpp{}.obj:: + $(CXX) -c $(CXXFLAGS) $< +{$(CORESRC)\global}.cpp{}.obj:: + $(CXX) -c $(CXXFLAGS) $< +{$(CORESRC)\io}.cpp{}.obj:: + $(CXX) -c $(CXXFLAGS) $< +{$(CORESRC)\kernel}.cpp{}.obj:: + $(CXX) -c $(CXXFLAGS) $< +{$(CORESRC)\plugin}.cpp{}.obj:: + $(CXX) -c $(CXXFLAGS) $< +{$(CORESRC)\xml}.cpp{}.obj:: + $(CXX) -c $(CXXFLAGS) $< diff --git a/tools/configure/configure.pro b/tools/configure/configure.pro index d39d9b45cc4..b0224891c3c 100644 --- a/tools/configure/configure.pro +++ b/tools/configure/configure.pro @@ -1,13 +1,12 @@ TARGET = configure DESTDIR = $$PWD/../.. # build directly in source dir -CONFIG += console flat +CONFIG += console flat stl rtti_off CONFIG -= moc qt -DEFINES = UNICODE QT_NODLL QT_NO_CODECS QT_NO_TEXTCODEC QT_NO_UNICODETABLES QT_LITE_COMPONENT QT_NO_STL QT_NO_COMPRESS QT_NO_THREAD QT_NO_QOBJECT _CRT_SECURE_NO_DEPRECATE +DEFINES = UNICODE QT_NODLL QT_NO_CODECS QT_NO_TEXTCODEC QT_NO_UNICODETABLES QT_LITE_COMPONENT QT_NO_STL QT_NO_COMPRESS QT_NO_THREAD QT_NO_QOBJECT QT_NO_GEOM_VARIANT _CRT_SECURE_NO_DEPRECATE DEFINES += QT_BOOTSTRAPPED win32 : LIBS += -lole32 -ladvapi32 -win32-msvc.net | win32-msvc2* : QMAKE_CXXFLAGS += /EHsc win32-g++* : LIBS += -luuid win32-msvc* { @@ -26,8 +25,6 @@ win32-msvc* { PRECOMPILED_HEADER = configure_pch.h INCLUDEPATH += \ - $$QT_SOURCE_TREE/src/corelib/arch/generic \ - $$QT_SOURCE_TREE/src/corelib/global \ $$QT_BUILD_TREE/include \ $$QT_BUILD_TREE/include/QtCore \ $$QT_BUILD_TREE/include/QtCore/$$QT.core.VERSION \ @@ -46,6 +43,7 @@ HEADERS = configureapp.h environment.h tools.h\ $$QT_SOURCE_TREE/src/corelib/codecs/qtextcodec.h \ $$QT_SOURCE_TREE/src/corelib/global/qglobal.h \ $$QT_SOURCE_TREE/src/corelib/global/qnumeric.h \ + $$QT_SOURCE_TREE/src/corelib/global/qlogging.h \ $$QT_SOURCE_TREE/src/corelib/io/qbuffer.h \ $$QT_SOURCE_TREE/src/corelib/io/qdatastream.h \ $$QT_SOURCE_TREE/src/corelib/io/qdir.h \ @@ -89,6 +87,7 @@ SOURCES = main.cpp configureapp.cpp environment.cpp tools.cpp \ $$QT_SOURCE_TREE/src/corelib/codecs/qtextcodec.cpp \ $$QT_SOURCE_TREE/src/corelib/global/qglobal.cpp \ $$QT_SOURCE_TREE/src/corelib/global/qnumeric.cpp \ + $$QT_SOURCE_TREE/src/corelib/global/qlogging.cpp \ $$QT_SOURCE_TREE/src/corelib/io/qbuffer.cpp \ $$QT_SOURCE_TREE/src/corelib/io/qdatastream.cpp \ $$QT_SOURCE_TREE/src/corelib/io/qdir.cpp \ @@ -119,10 +118,6 @@ SOURCES = main.cpp configureapp.cpp environment.cpp tools.cpp \ $$QT_SOURCE_TREE/src/corelib/kernel/qvariant.cpp \ $$QT_SOURCE_TREE/src/corelib/kernel/qsystemerror.cpp \ $$QT_SOURCE_TREE/src/corelib/io/qurl.cpp \ - $$QT_SOURCE_TREE/src/corelib/tools/qline.cpp \ - $$QT_SOURCE_TREE/src/corelib/tools/qsize.cpp \ - $$QT_SOURCE_TREE/src/corelib/tools/qpoint.cpp \ - $$QT_SOURCE_TREE/src/corelib/tools/qrect.cpp \ $$QT_SOURCE_TREE/src/corelib/kernel/qmetatype.cpp \ $$QT_SOURCE_TREE/src/corelib/global/qmalloc.cpp \ $$QT_SOURCE_TREE/src/corelib/xml/qxmlstream.cpp \ @@ -132,7 +127,3 @@ SOURCES = main.cpp configureapp.cpp environment.cpp tools.cpp \ $$QT_SOURCE_TREE/tools/shared/windows/registry.cpp DEFINES += COMMERCIAL_VERSION - -INCLUDEPATH += $$QT_SOURCE_TREE/src/corelib/arch/generic \ - $$QT_SOURCE_TREE/include/QtCore \ - $$QT_SOURCE_TREE/tools/shared diff --git a/tools/configure/configure_pch.h b/tools/configure/configure_pch.h index 6f601c7c297..0831364fe15 100644 --- a/tools/configure/configure_pch.h +++ b/tools/configure/configure_pch.h @@ -39,34 +39,11 @@ ** ****************************************************************************/ -#if (defined(_WIN32) || defined(__NT__)) -# define QT_UNDEF_MACROS_IN_PCH -# define _WINSCARD_H_ -# define _POSIX_ /* Make sure PATH_MAX et al. are defined */ -# include -# undef _POSIX_ /* Don't polute */ - - /* Make sure IP v6 is defined first of all, before windows.h */ -# include -# include -#endif - -#if defined __cplusplus +#include #include #include #include // All moc genereated code has this include -#include #include #include #include #include - -#include -#include -#endif - -#if defined(QT_UNDEF_MACROS_IN_PCH) -# undef max /* These are defined in windef.h, but */ -# undef min /* we don't want them when building Qt */ -# undef _WINSCARD_H_ -#endif diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index fc82fe0702a..b7eeea6b600 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -114,13 +114,18 @@ Configure::Configure(int& argc, char** argv) for (i = 1; i < argc; i++) configCmdLine += argv[ i ]; - - // Get the path to the executable - wchar_t module_name[MAX_PATH]; - GetModuleFileName(0, module_name, sizeof(module_name) / sizeof(wchar_t)); - QFileInfo sourcePathInfo = QString::fromWCharArray(module_name); - sourcePath = sourcePathInfo.absolutePath(); - sourceDir = sourcePathInfo.dir(); + if (configCmdLine.size() >= 2 && configCmdLine.at(0) == "-srcdir") { + sourcePath = QDir::cleanPath(configCmdLine.at(1)); + sourceDir = QDir(sourcePath); + configCmdLine.erase(configCmdLine.begin(), configCmdLine.begin() + 2); + } else { + // Get the path to the executable + wchar_t module_name[MAX_PATH]; + GetModuleFileName(0, module_name, sizeof(module_name) / sizeof(wchar_t)); + QFileInfo sourcePathInfo = QString::fromWCharArray(module_name); + sourcePath = sourcePathInfo.absolutePath(); + sourceDir = sourcePathInfo.dir(); + } buildPath = QDir::currentPath(); #if 0 const QString installPath = QString("C:\\Qt\\%1").arg(QT_VERSION_STR); @@ -889,6 +894,9 @@ void Configure::parseCmdLine() else if (configCmdLine.at(i) == "-internal") dictionary[ "QMAKE_INTERNAL" ] = "yes"; + else if (configCmdLine.at(i) == "-no-syncqt") + dictionary[ "SYNCQT" ] = "no"; + else if (configCmdLine.at(i) == "-no-qmake") dictionary[ "BUILD_QMAKE" ] = "no"; else if (configCmdLine.at(i) == "-qmake") @@ -3188,14 +3196,7 @@ void Configure::buildHostTools() QString pwd = QDir::currentPath(); QStringList hostToolsDirs; hostToolsDirs - << "src/tools" - << "tools/linguist/lrelease"; - - if (dictionary["XQMAKESPEC"].startsWith("wince")) - hostToolsDirs << "tools/checksdk"; - - if (dictionary[ "CETEST" ] == "yes") - hostToolsDirs << "tools/qtestlib/wince/cetest"; + << "src/tools"; for (int i = 0; i < hostToolsDirs.count(); ++i) { cout << "Creating " << hostToolsDirs.at(i) << " ..." << endl; diff --git a/tools/configure/environment.cpp b/tools/configure/environment.cpp index 5e0fa00c6cd..80542e76975 100644 --- a/tools/configure/environment.cpp +++ b/tools/configure/environment.cpp @@ -42,6 +42,7 @@ #include "environment.h" #include +#include #include #include #include