diff --git a/config.tests/unix/ipv6/ipv6.pro b/config.tests/unix/ipv6/ipv6.pro deleted file mode 100644 index c51e61bc8b..0000000000 --- a/config.tests/unix/ipv6/ipv6.pro +++ /dev/null @@ -1,3 +0,0 @@ -SOURCES = ipv6test.cpp -CONFIG -= qt dylib -mac:CONFIG -= app_bundle diff --git a/config.tests/unix/ipv6/ipv6test.cpp b/config.tests/unix/ipv6/ipv6test.cpp deleted file mode 100644 index 26403d8bde..0000000000 --- a/config.tests/unix/ipv6/ipv6test.cpp +++ /dev/null @@ -1,69 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** 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$ -** -****************************************************************************/ - -/* Sample program for configure to test IPv6 support on target -platforms. We check for the required IPv6 data structures. */ - -#if defined(__hpux) -#define _HPUX_SOURCE -#endif - -#ifdef __MINGW32__ -#include -#include -#else -#include -#include -#include -#endif - -int main() -{ - sockaddr_in6 tmp; - sockaddr_storage tmp2; - (void)tmp.sin6_addr.s6_addr; - (void)tmp.sin6_port; - (void)tmp.sin6_family; - (void)tmp.sin6_scope_id; - (void)tmp2; - - return 0; -} diff --git a/config.tests/unix/opengldesktop/opengldesktop.pro b/config.tests/unix/opengldesktop/opengldesktop.pro index ac70ca34ef..fbf36a0c67 100644 --- a/config.tests/unix/opengldesktop/opengldesktop.pro +++ b/config.tests/unix/opengldesktop/opengldesktop.pro @@ -7,3 +7,6 @@ for(p, QMAKE_LIBDIR_OPENGL) { CONFIG -= qt LIBS += $$QMAKE_LIBS_OPENGL + +mac:DEFINES += Q_OS_MAC +CONFIG -= app_bundle diff --git a/configure b/configure index 8a3700ccf4..a3349d468c 100755 --- a/configure +++ b/configure @@ -778,12 +778,11 @@ CFG_SSE4_1=auto CFG_SSE4_2=auto CFG_AVX=auto CFG_REDUCE_RELOCATIONS=no -CFG_IPV6=auto CFG_NAS=no CFG_QWS_DEPTHS=all CFG_USER_BUILD_KEY= CFG_ACCESSIBILITY=auto -CFG_QT3SUPPORT=yes +CFG_QT3SUPPORT=no CFG_ENDIAN=auto CFG_HOST_ENDIAN=auto CFG_DOUBLEFORMAT=auto @@ -3691,10 +3690,6 @@ if [ "$OPT_HELP" = "yes" ]; then SHY=" " SHN="*" fi - if [ "$CFG_IPV6" = "auto" ]; then - I6Y="*" - I6N=" " - fi if [ "$CFG_PRECOMPILE" = "auto" ] || [ "$CFG_PRECOMPILE" = "no" ]; then PHY=" " PHN="*" @@ -6632,26 +6627,6 @@ if [ "$CFG_STL" != "no" ]; then fi fi -# find if the platform supports IPv6 -if [ "$CFG_IPV6" != "no" ]; then - if [ "$XPLATFORM_SYMBIAN" = "yes" ]; then - #IPV6 should always be enabled for Symbian release - CFG_IPV6=yes - elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/ipv6 "IPv6" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then - CFG_IPV6=yes - else - if [ "$CFG_IPV6" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then - echo "IPv6 support cannot be enabled due to functionality tests!" - echo " Turn on verbose messaging (-v) to $0 to see the final report." - echo " If you believe this message is in error you may use the continue" - echo " switch (-continue) to $0 to continue." - exit 101 - else - CFG_IPV6=no - fi - fi -fi - # detect POSIX clock_gettime() if [ "$CFG_CLOCK_GETTIME" = "auto" ]; then if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/clock-gettime "POSIX clock_gettime()" $L_FLAGS $I_FLAGS $l_FLAGS; then @@ -7176,9 +7151,6 @@ fi [ "$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_IPV6" = "yes" ]; then - QT_CONFIG="$QT_CONFIG ipv6" -fi if [ "$CFG_CLOCK_GETTIME" = "yes" ]; then QT_CONFIG="$QT_CONFIG clock-gettime" fi @@ -8222,7 +8194,6 @@ QMakeVar set sql-plugins "$SQL_PLUGINS" [ "$CFG_ZLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ZLIB" [ "$CFG_S60" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_S60" [ "$CFG_EXCEPTIONS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EXCEPTIONS" -[ "$CFG_IPV6" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IPV6" [ "$CFG_SXE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SXE" [ "$CFG_DBUS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_DBUS" @@ -8735,7 +8706,6 @@ if [ "$CFG_ARCH" = "arm" ] || [ "$CFG_ARCH" = "armv6" ]; then echo "NEON support ........... ${CFG_NEON}" fi [ "${PLATFORM_QWS}" != "yes" -a "${PLATFORM_QPA}" != "yes" ] && echo "Graphics System ........ $CFG_GRAPHICS_SYSTEM" -echo "IPv6 support ........... $CFG_IPV6" echo "IPv6 ifname support .... $CFG_IPV6IFNAME" echo "getaddrinfo support .... $CFG_GETADDRINFO" echo "getifaddrs support ..... $CFG_GETIFADDRS" diff --git a/dist/README b/dist/README index 73c8be1f5d..815e12be9e 100644 --- a/dist/README +++ b/dist/README @@ -31,16 +31,14 @@ follow these instructions: http://qt.nokia.com/doc/%SHORTVERSION%/install-symbian-installer.html -DEMOS AND EXAMPLES +EXAMPLES -Once Qt is installed, we suggest that you take a look at the demos and -examples to see Qt in action. +Once Qt is installed, we suggest that you take a look at the examples +to see Qt in action. -For desktop computers, run the Qt Examples and Demos either by -typing 'qtdemo' on the command line or through the desktop's Start -menu. On Mac OS X, you can find it in /Developers/Applications/Qt. +For desktop computers, run the Qt Examples by opening them in Qt Creator. -For embedded devices, launch the Qt 'fluidlauncher' demo, either through +For embedded devices, launch the Qt 'fluidlauncher' example, either through the platforms filebrowser or the built in menu system. diff --git a/dist/changes-5.0.0 b/dist/changes-5.0.0 new file mode 100644 index 0000000000..4c226aa9d6 --- /dev/null +++ b/dist/changes-5.0.0 @@ -0,0 +1,130 @@ +Some of the changes listed in this file include issue tracking numbers +corresponding to tasks in the Qt Bug Tracker: + + http://bugreports.qt.nokia.com/ + +Each of these identifiers can be entered in the bug tracker to obtain more +information about a particular change. + + +**************************************************************************** +* Source incompatible changes * +**************************************************************************** + +- QSslCertificate::subjectInfo() and QSslCertificate::issuerInfo() now + return a QStringList instead of a QString + +- Unite clipping support has been removed from QPainter. The alternative is + to unite QRegion's and using the result on QPainter. + +**************************************************************************** +* General * +**************************************************************************** + +General Improvements +-------------------- + +- + +Third party components +---------------------- + +- + + +**************************************************************************** +* Library * +**************************************************************************** + +QtCore +------ + +QtGui +----- + +QtNetwork +--------- + +QtOpenGL +-------- + +QtScript +-------- + + +**************************************************************************** +* Database Drivers * +**************************************************************************** + + +**************************************************************************** +* Platform Specific Changes * +**************************************************************************** + +Qt for Linux/X11 +---------------- + + +Qt for Windows +-------------- + + +Qt for Mac OS X +--------------- + + +Qt for Embedded Linux +--------------------- + + +Qt for Windows CE +----------------- + + +**************************************************************************** +* Compiler Specific Changes * +**************************************************************************** + + +**************************************************************************** +* Tools * +**************************************************************************** + +- Build System + +- Assistant + +- Designer + +- Linguist + +- rcc + + +- moc + + +- uic + + +- uic3 + + +- qmake + + +- configure + + +- qtconfig + + +**************************************************************************** +* Plugins * +**************************************************************************** + + +**************************************************************************** +* Important Behavior Changes * +**************************************************************************** + diff --git a/doc/src/demos/affine.qdoc b/doc/src/demos/affine.qdoc index adc1a78681..c14a452849 100644 --- a/doc/src/demos/affine.qdoc +++ b/doc/src/demos/affine.qdoc @@ -26,7 +26,7 @@ ****************************************************************************/ /*! - \example demos/affine + \example painting/affine \title Affine Transformations In this demo we show Qt's ability to perform affine transformations diff --git a/doc/src/demos/books.qdoc b/doc/src/examples/books.qdoc similarity index 98% rename from doc/src/demos/books.qdoc rename to doc/src/examples/books.qdoc index 7eccd5b8e1..64a4613b13 100644 --- a/doc/src/demos/books.qdoc +++ b/doc/src/examples/books.qdoc @@ -26,7 +26,7 @@ ****************************************************************************/ /*! - \example demos/books + \example sql/books \title Books Demonstration The Books demonstration shows how Qt's SQL classes can be used with the model/view diff --git a/doc/src/demos/boxes.qdoc b/doc/src/examples/boxes.qdoc similarity index 97% rename from doc/src/demos/boxes.qdoc rename to doc/src/examples/boxes.qdoc index 52ee63baed..92db09d3d7 100644 --- a/doc/src/demos/boxes.qdoc +++ b/doc/src/examples/boxes.qdoc @@ -26,7 +26,7 @@ ****************************************************************************/ /*! - \example demos/boxes + \example graphicsview/boxes \title Boxes This demo shows Qt's ability to combine advanced OpenGL rendering with the diff --git a/doc/src/demos/chip.qdoc b/doc/src/examples/chip.qdoc similarity index 97% rename from doc/src/demos/chip.qdoc rename to doc/src/examples/chip.qdoc index eda0bed02a..07b12f9960 100644 --- a/doc/src/demos/chip.qdoc +++ b/doc/src/examples/chip.qdoc @@ -26,7 +26,7 @@ ****************************************************************************/ /*! - \example demos/chip + \example graphicsview/chip \title 40000 Chips This demo shows how to visualize a huge scene with 40000 chip items diff --git a/doc/src/demos/composition.qdoc b/doc/src/examples/composition.qdoc similarity index 97% rename from doc/src/demos/composition.qdoc rename to doc/src/examples/composition.qdoc index c2eadc7308..53ca3dbf7a 100644 --- a/doc/src/demos/composition.qdoc +++ b/doc/src/examples/composition.qdoc @@ -26,7 +26,7 @@ ****************************************************************************/ /*! - \example demos/composition + \example painting/composition \title Composition Modes This demo shows some of the more advanced composition modes supported by Qt. diff --git a/doc/src/demos/deform.qdoc b/doc/src/examples/deform.qdoc similarity index 94% rename from doc/src/demos/deform.qdoc rename to doc/src/examples/deform.qdoc index 7b11a9a95a..1a81053248 100644 --- a/doc/src/demos/deform.qdoc +++ b/doc/src/examples/deform.qdoc @@ -26,10 +26,10 @@ ****************************************************************************/ /*! - \example demos/deform + \example painting/deform \title Vector Deformation - This demo shows how to use advanced vector techniques to draw text + This example shows how to use advanced vector techniques to draw text using a \c QPainterPath. \image deform-demo.png diff --git a/doc/src/demos/digiflip.qdoc b/doc/src/examples/digiflip.qdoc similarity index 92% rename from doc/src/demos/digiflip.qdoc rename to doc/src/examples/digiflip.qdoc index 33f083f957..ae3b18216b 100644 --- a/doc/src/demos/digiflip.qdoc +++ b/doc/src/examples/digiflip.qdoc @@ -26,6 +26,6 @@ ****************************************************************************/ /*! - \example demos/embedded/digiflip - \title Digiflip Demonstration + \example embedded/digiflip + \title Digiflip */ diff --git a/doc/src/demos/embeddeddialogs.qdoc b/doc/src/examples/embeddeddialogs.qdoc similarity index 96% rename from doc/src/demos/embeddeddialogs.qdoc rename to doc/src/examples/embeddeddialogs.qdoc index e80f76c113..685bcf8e22 100644 --- a/doc/src/demos/embeddeddialogs.qdoc +++ b/doc/src/examples/embeddeddialogs.qdoc @@ -26,7 +26,7 @@ ****************************************************************************/ /*! - \example demos/embeddeddialogs + \example graphicsview/embeddeddialogs \title Embedded Dialogs This example shows how to embed standard dialogs into diff --git a/doc/src/demos/flickable.qdoc b/doc/src/examples/flickable.qdoc similarity index 92% rename from doc/src/demos/flickable.qdoc rename to doc/src/examples/flickable.qdoc index 540857be96..378bfcaf47 100644 --- a/doc/src/demos/flickable.qdoc +++ b/doc/src/examples/flickable.qdoc @@ -26,8 +26,8 @@ ****************************************************************************/ /*! - \example demos/embedded/flickable - \title Flickable List Demonstration + \example embedded/flickable + \title Flickable List \image flickable-demo.png */ diff --git a/doc/src/demos/flightinfo.qdoc b/doc/src/examples/flightinfo.qdoc similarity index 92% rename from doc/src/demos/flightinfo.qdoc rename to doc/src/examples/flightinfo.qdoc index e812dbff75..f3b5e32197 100644 --- a/doc/src/demos/flightinfo.qdoc +++ b/doc/src/examples/flightinfo.qdoc @@ -26,8 +26,8 @@ ****************************************************************************/ /*! - \example demos/embedded/flightinfo - \title Flight Info Demonstration + \example embedded/flightinfo + \title Flight Info \image flightinfo-demo.png */ diff --git a/doc/src/demos/gradients.qdoc b/doc/src/examples/gradients.qdoc similarity index 94% rename from doc/src/demos/gradients.qdoc rename to doc/src/examples/gradients.qdoc index 1f29a4ae10..430ce3ce87 100644 --- a/doc/src/demos/gradients.qdoc +++ b/doc/src/examples/gradients.qdoc @@ -26,10 +26,10 @@ ****************************************************************************/ /*! - \example demos/gradients + \example painting/gradients \title Gradients - In this demo we show the various types of gradients that can + In this example we show the various types of gradients that can be used in Qt. \image gradients-demo.png diff --git a/doc/src/demos/interview.qdoc b/doc/src/examples/interview.qdoc similarity index 90% rename from doc/src/demos/interview.qdoc rename to doc/src/examples/interview.qdoc index fa40ed24e8..0be40fda85 100644 --- a/doc/src/demos/interview.qdoc +++ b/doc/src/examples/interview.qdoc @@ -26,10 +26,10 @@ ****************************************************************************/ /*! - \example demos/interview + \example itemviews/interview \title Interview - The Interview demonstration explores the flexibility and scalability of the + The Interview example explores the flexibility and scalability of the model/view framework by presenting an infinitely deep data structure using a model and three different types of view. diff --git a/doc/src/demos/lightmaps.qdoc b/doc/src/examples/lightmaps.qdoc similarity index 92% rename from doc/src/demos/lightmaps.qdoc rename to doc/src/examples/lightmaps.qdoc index a8594f9d9b..0b5b807919 100644 --- a/doc/src/demos/lightmaps.qdoc +++ b/doc/src/examples/lightmaps.qdoc @@ -26,8 +26,8 @@ ****************************************************************************/ /*! - \example demos/embedded/lightmaps - \title Light Maps Demonstration + \example embedded/lightmaps + \title Light Maps \image lightmaps-demo.png */ diff --git a/doc/src/demos/macmainwindow.qdoc b/doc/src/examples/macmainwindow.qdoc similarity index 84% rename from doc/src/demos/macmainwindow.qdoc rename to doc/src/examples/macmainwindow.qdoc index 31c02307e7..d245398f4f 100644 --- a/doc/src/demos/macmainwindow.qdoc +++ b/doc/src/examples/macmainwindow.qdoc @@ -26,17 +26,17 @@ ****************************************************************************/ /*! - \example demos/macmainwindow - \title Mac Main Window Demo + \example mainwindows/macmainwindow + \title Mac Main Window Example - This demo shows how to create a main window that has the + This example shows how to create a main window that has the same appearance as other Mac OS X applications such as Mail or iTunes. This includes customizing the item views and QSplitter and wrapping native widgets such as the search field. \image macmainwindow.png - See \c{$QTDIR/demos/macmainwindow} for the source code. + See \c{$QTDIR/examples/mainwindows/macmainwindow} for the source code. */ diff --git a/doc/src/demos/mainwindow.qdoc b/doc/src/examples/mainwindow.qdoc similarity index 90% rename from doc/src/demos/mainwindow.qdoc rename to doc/src/examples/mainwindow.qdoc index dee72022af..ef9d128628 100644 --- a/doc/src/demos/mainwindow.qdoc +++ b/doc/src/examples/mainwindow.qdoc @@ -26,10 +26,10 @@ ****************************************************************************/ /*! - \example demos/mainwindow + \example mainwindows/mainwindow \title Main Window - The Main Window demonstration shows Qt's extensive support for tool bars, + The Main Window example shows Qt's extensive support for tool bars, dock windows, menus, and other standard application features. \image mainwindow-demo.png diff --git a/doc/src/demos/pathstroke.qdoc b/doc/src/examples/pathstroke.qdoc similarity index 92% rename from doc/src/demos/pathstroke.qdoc rename to doc/src/examples/pathstroke.qdoc index 8e864e2615..b433a42814 100644 --- a/doc/src/demos/pathstroke.qdoc +++ b/doc/src/examples/pathstroke.qdoc @@ -26,10 +26,10 @@ ****************************************************************************/ /*! - \example demos/pathstroke + \example painting/pathstroke \title Path Stroking - In this demo we show some of the various types of pens that can be + In this example we show some of the various types of pens that can be used in Qt. \image pathstroke-demo.png diff --git a/doc/src/demos/raycasting.qdoc b/doc/src/examples/raycasting.qdoc similarity index 92% rename from doc/src/demos/raycasting.qdoc rename to doc/src/examples/raycasting.qdoc index 5c03e2092f..ae5be0f707 100644 --- a/doc/src/demos/raycasting.qdoc +++ b/doc/src/examples/raycasting.qdoc @@ -26,8 +26,8 @@ ****************************************************************************/ /*! - \example demos/embedded/raycasting - \title Ray Casting Demonstration + \example embedded/raycasting + \title Ray Casting \image raycasting-demo.png */ diff --git a/doc/src/demos/spreadsheet.qdoc b/doc/src/examples/spreadsheet.qdoc similarity index 90% rename from doc/src/demos/spreadsheet.qdoc rename to doc/src/examples/spreadsheet.qdoc index 5c6b4dfb26..8bcecc99ed 100644 --- a/doc/src/demos/spreadsheet.qdoc +++ b/doc/src/examples/spreadsheet.qdoc @@ -26,10 +26,10 @@ ****************************************************************************/ /*! - \example demos/spreadsheet + \example itemviews/spreadsheet \title Spreadsheet - The Spreadsheet demonstration shows how a table view can be used to create a + The Spreadsheet example shows how a table view can be used to create a simple spreadsheet application. Custom delegates are used to render different types of data in distinctive colors. diff --git a/doc/src/demos/sqlbrowser.qdoc b/doc/src/examples/sqlbrowser.qdoc similarity index 89% rename from doc/src/demos/sqlbrowser.qdoc rename to doc/src/examples/sqlbrowser.qdoc index 53af037be0..f7ec7951a8 100644 --- a/doc/src/demos/sqlbrowser.qdoc +++ b/doc/src/examples/sqlbrowser.qdoc @@ -26,10 +26,10 @@ ****************************************************************************/ /*! - \example demos/sqlbrowser + \example sql/sqlbrowser \title SQL Browser - The SQL Browser demonstration shows how a data browser can be used to visualize + The SQL Browser example shows how a data browser can be used to visualize the results of SQL statements on a live database. \image sqlbrowser-demo.png diff --git a/doc/src/demos/styledemo.qdoc b/doc/src/examples/styledemo.qdoc similarity index 91% rename from doc/src/demos/styledemo.qdoc rename to doc/src/examples/styledemo.qdoc index 415d2843b7..5a5bb5b47d 100644 --- a/doc/src/demos/styledemo.qdoc +++ b/doc/src/examples/styledemo.qdoc @@ -26,8 +26,8 @@ ****************************************************************************/ /*! - \example demos/embedded/styledemo - \title Embedded Styles Demonstration + \example embedded/styledemo + \title Embedded Styles \image styledemo-demo.png */ diff --git a/doc/src/demos/sub-attaq.qdoc b/doc/src/examples/sub-attaq.qdoc similarity index 90% rename from doc/src/demos/sub-attaq.qdoc rename to doc/src/examples/sub-attaq.qdoc index 247d0d1fa9..0c8e587463 100644 --- a/doc/src/demos/sub-attaq.qdoc +++ b/doc/src/examples/sub-attaq.qdoc @@ -26,10 +26,10 @@ ****************************************************************************/ /*! - \example demos/sub-attaq + \example animation/sub-attaq \title Sub-Attaq - This demo shows Qt's ability to combine \l{The Animation Framework}{the animation framework} + This example shows Qt's ability to combine \l{The Animation Framework}{the animation framework} and \l{The State Machine Framework}{the state machine framework} to create a game. \image sub-attaq-demo.png diff --git a/doc/src/demos/textedit.qdoc b/doc/src/examples/textedit.qdoc similarity index 89% rename from doc/src/demos/textedit.qdoc rename to doc/src/examples/textedit.qdoc index 8c50dbacf8..1a1171d542 100644 --- a/doc/src/demos/textedit.qdoc +++ b/doc/src/examples/textedit.qdoc @@ -26,10 +26,10 @@ ****************************************************************************/ /*! - \example demos/textedit + \example richtext/textedit \title Text Edit - The Text Edit demonstration shows Qt's rich text editing facilities in action, + The Text Edit example shows Qt's rich text editing facilities in action, providing an example document for you to experiment with. \image textedit-demo.png diff --git a/doc/src/examples/transformations.qdoc b/doc/src/examples/transformations.qdoc index 26b558c15f..2d9f9f770e 100644 --- a/doc/src/examples/transformations.qdoc +++ b/doc/src/examples/transformations.qdoc @@ -364,8 +364,8 @@ QTransform documentation. The Qt reference documentation provides several painting - demos. Among these is the \l {demos/affine}{Affine - Transformations} demo that shows Qt's ability to perform - transformations on painting operations. The demo also allows the + examples. Among these is the \l {painting/affine}{Affine + Transformations} example that shows Qt's ability to perform + transformations on painting operations. The example also allows the user to experiment with the various transformation operations. */ diff --git a/doc/src/demos/undo.qdoc b/doc/src/examples/undo.qdoc similarity index 94% rename from doc/src/demos/undo.qdoc rename to doc/src/examples/undo.qdoc index 7b64371f38..29c320ab05 100644 --- a/doc/src/demos/undo.qdoc +++ b/doc/src/examples/undo.qdoc @@ -26,10 +26,10 @@ ****************************************************************************/ /*! - \example demos/undo + \example tools/undo \title Undo Framework - This demo shows Qt's undo framework in action. + This example shows Qt's undo framework in action. \image undodemo.png diff --git a/doc/src/painting-and-printing/coordsys.qdoc b/doc/src/painting-and-printing/coordsys.qdoc index 35702b97da..96eebd01e0 100644 --- a/doc/src/painting-and-printing/coordsys.qdoc +++ b/doc/src/painting-and-printing/coordsys.qdoc @@ -195,8 +195,8 @@ \endtable You can also twist the coordinate system around the origin using - the QPainter::shear() function. See the \l {demos/affine}{Affine - Transformations} demo for a visualization of a sheared coordinate + the QPainter::shear() function. See the \l {painting/affine}{Affine + Transformations} example for a visualization of a sheared coordinate system. All the transformation operations operate on QPainter's transformation matrix that you can retrieve using the QPainter::worldTransform() function. A matrix transforms a point @@ -285,7 +285,7 @@ For a demonstation of Qt's ability to perform affine transformations on painting operations, see the \l - {demos/affine}{Affine Transformations} demo which allows the user + {painting/affine}{Affine Transformations} example which allows the user to experiment with the transformation operations. See also the \l {painting/transformations}{Transformations} example which shows how transformations influence the way that QPainter renders diff --git a/doc/src/sql-programming/sql-programming.qdoc b/doc/src/sql-programming/sql-programming.qdoc index 68b1a2fe44..55f97484bb 100644 --- a/doc/src/sql-programming/sql-programming.qdoc +++ b/doc/src/sql-programming/sql-programming.qdoc @@ -603,7 +603,7 @@ \image qdatawidgetmapper-simple.png - The \l{demos/books}{Books} demonstration shows how information can + The \l{sql/books}{Books} example shows how information can be presented for easy access by using QDataWidgetMapper and a set of simple input widgets. */ diff --git a/examples/animation/README b/examples/animation/README index 6a892f8655..e723a28722 100644 --- a/examples/animation/README +++ b/examples/animation/README @@ -3,36 +3,6 @@ smooth GUI's. By animating Qt properties, the framework provides great freedom for animating widgets and other QObjects. The framework can also be used with the Graphics View framework. -The example launcher provided with Qt can be used to explore each of the -examples in this directory. -Documentation for these examples can be found via the Tutorial and Examples +Documentation for these examples can be found via the Examples link in the main Qt documentation. - - -Finding the Qt Examples and Demos launcher -========================================== - -On Windows: - -The launcher can be accessed via the Windows Start menu. Select the menu -entry entitled "Qt Examples and Demos" entry in the submenu containing -the Qt tools. - -On Mac OS X: - -For the binary distribution, the qtdemo executable is installed in the -/Developer/Applications/Qt directory. For the source distribution, it is -installed alongside the other Qt tools on the path specified when Qt is -configured. - -On Unix/Linux: - -The qtdemo executable is installed alongside the other Qt tools on the path -specified when Qt is configured. - -On all platforms: - -The source code for the launcher can be found in the demos/qtdemo directory -in the Qt package. This example is built at the same time as the Qt libraries, -tools, examples, and demonstrations. diff --git a/examples/desktop/README b/examples/desktop/README index efe569a604..4a949d1cf7 100644 --- a/examples/desktop/README +++ b/examples/desktop/README @@ -6,36 +6,5 @@ support for desktop services can be used to improve the appearance of applications and take advantage of underlying desktop facilities. -The example launcher provided with Qt can be used to explore each of the -examples in this directory. - -Documentation for these examples can be found via the Tutorial and Examples +Documentation for these examples can be found via the Examples link in the main Qt documentation. - - -Finding the Qt Examples and Demos launcher -========================================== - -On Windows: - -The launcher can be accessed via the Windows Start menu. Select the menu -entry entitled "Qt Examples and Demos" entry in the submenu containing -the Qt tools. - -On Mac OS X: - -For the binary distribution, the qtdemo executable is installed in the -/Developer/Applications/Qt directory. For the source distribution, it is -installed alongside the other Qt tools on the path specified when Qt is -configured. - -On Unix/Linux: - -The qtdemo executable is installed alongside the other Qt tools on the path -specified when Qt is configured. - -On all platforms: - -The source code for the launcher can be found in the demos/qtdemo directory -in the Qt package. This example is built at the same time as the Qt libraries, -tools, examples, and demonstrations. diff --git a/examples/dialogs/README b/examples/dialogs/README index ab0f884fcb..090b011061 100644 --- a/examples/dialogs/README +++ b/examples/dialogs/README @@ -5,36 +5,5 @@ Custom dialogs can also be created for specialized modal or modeless interactions with users. -The example launcher provided with Qt can be used to explore each of the -examples in this directory. - -Documentation for these examples can be found via the Tutorial and Examples +Documentation for these examples can be found via the Examples link in the main Qt documentation. - - -Finding the Qt Examples and Demos launcher -========================================== - -On Windows: - -The launcher can be accessed via the Windows Start menu. Select the menu -entry entitled "Qt Examples and Demos" entry in the submenu containing -the Qt tools. - -On Mac OS X: - -For the binary distribution, the qtdemo executable is installed in the -/Developer/Applications/Qt directory. For the source distribution, it is -installed alongside the other Qt tools on the path specified when Qt is -configured. - -On Unix/Linux: - -The qtdemo executable is installed alongside the other Qt tools on the path -specified when Qt is configured. - -On all platforms: - -The source code for the launcher can be found in the demos/qtdemo directory -in the Qt package. This example is built at the same time as the Qt libraries, -tools, examples, and demonstrations. diff --git a/examples/draganddrop/README b/examples/draganddrop/README index f4efd2e40b..90dc55bf2f 100644 --- a/examples/draganddrop/README +++ b/examples/draganddrop/README @@ -5,36 +5,5 @@ most appropriate formats. Drag and drop can also be implemented for internal use by applications. -The example launcher provided with Qt can be used to explore each of the -examples in this directory. - -Documentation for these examples can be found via the Tutorial and Examples +Documentation for these examples can be found via the Examples link in the main Qt documentation. - - -Finding the Qt Examples and Demos launcher -========================================== - -On Windows: - -The launcher can be accessed via the Windows Start menu. Select the menu -entry entitled "Qt Examples and Demos" entry in the submenu containing -the Qt tools. - -On Mac OS X: - -For the binary distribution, the qtdemo executable is installed in the -/Developer/Applications/Qt directory. For the source distribution, it is -installed alongside the other Qt tools on the path specified when Qt is -configured. - -On Unix/Linux: - -The qtdemo executable is installed alongside the other Qt tools on the path -specified when Qt is configured. - -On all platforms: - -The source code for the launcher can be found in the demos/qtdemo directory -in the Qt package. This example is built at the same time as the Qt libraries, -tools, examples, and demonstrations. diff --git a/examples/graphicsview/README b/examples/graphicsview/README index 6c38c18683..e710fc3c13 100644 --- a/examples/graphicsview/README +++ b/examples/graphicsview/README @@ -5,36 +5,5 @@ These examples demonstrate the fundamental aspects of canvas programming with Qt. -The example launcher provided with Qt can be used to explore each of the -examples in this directory. - -Documentation for these examples can be found via the Tutorial and Examples +Documentation for these examples can be found via the Examples link in the main Qt documentation. - - -Finding the Qt Examples and Demos launcher -========================================== - -On Windows: - -The launcher can be accessed via the Windows Start menu. Select the menu -entry entitled "Qt Examples and Demos" entry in the submenu containing -the Qt tools. - -On Mac OS X: - -For the binary distribution, the qtdemo executable is installed in the -/Developer/Applications/Qt directory. For the source distribution, it is -installed alongside the other Qt tools on the path specified when Qt is -configured. - -On Unix/Linux: - -The qtdemo executable is installed alongside the other Qt tools on the path -specified when Qt is configured. - -On all platforms: - -The source code for the launcher can be found in the demos/qtdemo directory -in the Qt package. This example is built at the same time as the Qt libraries, -tools, examples, and demonstrations. diff --git a/examples/ipc/README b/examples/ipc/README index 71e2f46c18..83a157a42e 100644 --- a/examples/ipc/README +++ b/examples/ipc/README @@ -1,35 +1,5 @@ These examples demonstrate IPC support in Qt. -The example launcher provided with Qt can be used to explore each of the -examples in this directory. -Documentation for these examples can be found via the Tutorial and Examples +Documentation for these examples can be found via the Examples link in the main Qt documentation. - - -Finding the Qt Examples and Demos launcher -========================================== - -On Windows: - -The launcher can be accessed via the Windows Start menu. Select the menu -entry entitled "Qt Examples and Demos" entry in the submenu containing -the Qt tools. - -On Mac OS X: - -For the binary distribution, the qtdemo executable is installed in the -/Developer/Applications/Qt directory. For the source distribution, it is -installed alongside the other Qt tools on the path specified when Qt is -configured. - -On Unix/Linux: - -The qtdemo executable is installed alongside the other Qt tools on the path -specified when Qt is configured. - -On all platforms: - -The source code for the launcher can be found in the demos/qtdemo directory -in the Qt package. This example is built at the same time as the Qt libraries, -tools, examples, and demonstrations. diff --git a/examples/itemviews/README b/examples/itemviews/README index 0ac70f4904..bded96a849 100644 --- a/examples/itemviews/README +++ b/examples/itemviews/README @@ -4,36 +4,5 @@ from the way it is represented to the user, and provides support for customized rendering through the use of delegates. -The example launcher provided with Qt can be used to explore each of the -examples in this directory. - -Documentation for these examples can be found via the Tutorial and Examples +Documentation for these examples can be found via the Examples link in the main Qt documentation. - - -Finding the Qt Examples and Demos launcher -========================================== - -On Windows: - -The launcher can be accessed via the Windows Start menu. Select the menu -entry entitled "Qt Examples and Demos" entry in the submenu containing -the Qt tools. - -On Mac OS X: - -For the binary distribution, the qtdemo executable is installed in the -/Developer/Applications/Qt directory. For the source distribution, it is -installed alongside the other Qt tools on the path specified when Qt is -configured. - -On Unix/Linux: - -The qtdemo executable is installed alongside the other Qt tools on the path -specified when Qt is configured. - -On all platforms: - -The source code for the launcher can be found in the demos/qtdemo directory -in the Qt package. This example is built at the same time as the Qt libraries, -tools, examples, and demonstrations. diff --git a/examples/itemviews/interview/interview.pro b/examples/itemviews/interview/interview.pro index bf39328e99..fec3ec1168 100644 --- a/examples/itemviews/interview/interview.pro +++ b/examples/itemviews/interview/interview.pro @@ -11,10 +11,10 @@ build_all:!build_pass { } # install -target.path = $$[QT_INSTALL_DEMOS]/qtbase/interview +target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/itemviews/interview sources.files = $$SOURCES $$HEADERS $$RESOURCES README *.pro images -sources.path = $$[QT_INSTALL_DEMOS]/qtbase/interview +sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/itemviews/interview INSTALLS += target sources -symbian: CONFIG += qt_demo -QT += widgets widgets +QT += widgets +symbian: CONFIG += qt_example diff --git a/examples/itemviews/itemviews.pro b/examples/itemviews/itemviews.pro index d82e1ee0c0..3048aa18d6 100644 --- a/examples/itemviews/itemviews.pro +++ b/examples/itemviews/itemviews.pro @@ -8,12 +8,14 @@ SUBDIRS = addressbook \ editabletreemodel \ fetchmore \ frozencolumn \ + interview \ pixelator \ puzzle \ simpledommodel \ simpletreemodel \ simplewidgetmapper \ - spinboxdelegate + spinboxdelegate \ + spreadsheet # install sources.files = README *.pro diff --git a/examples/itemviews/spreadsheet/spreadsheet.pro b/examples/itemviews/spreadsheet/spreadsheet.pro index dc079866a3..6a3d8b5983 100644 --- a/examples/itemviews/spreadsheet/spreadsheet.pro +++ b/examples/itemviews/spreadsheet/spreadsheet.pro @@ -27,9 +27,9 @@ build_all:!build_pass { } # install -target.path = $$[QT_INSTALL_DEMOS]/qtbase/spreadsheet +target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/itemviews/spreadsheet sources.files = $$SOURCES $$RESOURCES *.pro images $$HEADERS -sources.path = $$[QT_INSTALL_DEMOS]/qtbase/spreadsheet +sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/itemviews/spreadsheet INSTALLS += target sources -symbian: CONFIG += qt_demo +symbian: CONFIG += qt_example diff --git a/examples/layouts/README b/examples/layouts/README index edaea78463..589400280d 100644 --- a/examples/layouts/README +++ b/examples/layouts/README @@ -6,36 +6,5 @@ Custom layouts can be used to provide more control over the positions and sizes of child widgets. -The example launcher provided with Qt can be used to explore each of the -examples in this directory. - -Documentation for these examples can be found via the Tutorial and Examples +Documentation for these examples can be found via the Examples link in the main Qt documentation. - - -Finding the Qt Examples and Demos launcher -========================================== - -On Windows: - -The launcher can be accessed via the Windows Start menu. Select the menu -entry entitled "Qt Examples and Demos" entry in the submenu containing -the Qt tools. - -On Mac OS X: - -For the binary distribution, the qtdemo executable is installed in the -/Developer/Applications/Qt directory. For the source distribution, it is -installed alongside the other Qt tools on the path specified when Qt is -configured. - -On Unix/Linux: - -The qtdemo executable is installed alongside the other Qt tools on the path -specified when Qt is configured. - -On all platforms: - -The source code for the launcher can be found in the demos/qtdemo directory -in the Qt package. This example is built at the same time as the Qt libraries, -tools, examples, and demonstrations. diff --git a/examples/linguist/README b/examples/linguist/README index d1ef0057e4..15817742da 100644 --- a/examples/linguist/README +++ b/examples/linguist/README @@ -2,36 +2,5 @@ Internationalization is a core feature of Qt. These examples show how to access translation and localization facilities at run-time. -The example launcher provided with Qt can be used to explore each of the -examples in this directory. - -Documentation for these examples can be found via the Tutorial and Examples +Documentation for these examples can be found via the Examples link in the main Qt documentation. - - -Finding the Qt Examples and Demos launcher -========================================== - -On Windows: - -The launcher can be accessed via the Windows Start menu. Select the menu -entry entitled "Qt Examples and Demos" entry in the submenu containing -the Qt tools. - -On Mac OS X: - -For the binary distribution, the qtdemo executable is installed in the -/Developer/Applications/Qt directory. For the source distribution, it is -installed alongside the other Qt tools on the path specified when Qt is -configured. - -On Unix/Linux: - -The qtdemo executable is installed alongside the other Qt tools on the path -specified when Qt is configured. - -On all platforms: - -The source code for the launcher can be found in the demos/qtdemo directory -in the Qt package. This example is built at the same time as the Qt libraries, -tools, examples, and demonstrations. diff --git a/examples/mainwindows/README b/examples/mainwindows/README index 15a6c23e4b..b63adee6e3 100644 --- a/examples/mainwindows/README +++ b/examples/mainwindows/README @@ -5,36 +5,5 @@ separate forms of user input are unified in an integrated action system that also supports keyboard shortcuts and accelerator keys in menu items. -The example launcher provided with Qt can be used to explore each of the -examples in this directory. - -Documentation for these examples can be found via the Tutorial and Examples +Documentation for these examples can be found via the Examples link in the main Qt documentation. - - -Finding the Qt Examples and Demos launcher -========================================== - -On Windows: - -The launcher can be accessed via the Windows Start menu. Select the menu -entry entitled "Qt Examples and Demos" entry in the submenu containing -the Qt tools. - -On Mac OS X: - -For the binary distribution, the qtdemo executable is installed in the -/Developer/Applications/Qt directory. For the source distribution, it is -installed alongside the other Qt tools on the path specified when Qt is -configured. - -On Unix/Linux: - -The qtdemo executable is installed alongside the other Qt tools on the path -specified when Qt is configured. - -On all platforms: - -The source code for the launcher can be found in the demos/qtdemo directory -in the Qt package. This example is built at the same time as the Qt libraries, -tools, examples, and demonstrations. diff --git a/examples/mainwindows/macmainwindow/macmainwindow.pro b/examples/mainwindows/macmainwindow/macmainwindow.pro index 6773a669d0..8db88375f5 100644 --- a/examples/mainwindows/macmainwindow/macmainwindow.pro +++ b/examples/mainwindows/macmainwindow/macmainwindow.pro @@ -16,9 +16,9 @@ LIBS += -framework Cocoa -framework Carbon # install mac { -target.path = $$[QT_INSTALL_DEMOS]/qtbase/macmainwindow +target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/mainwindows/macmainwindow sources.files = $$SOURCES *.pro *.html -sources.path = $$[QT_INSTALL_DEMOS]/qtbase/macmainwindow +sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/mainwindows/macmainwindow INSTALLS += target sources } QT += widgets widgets diff --git a/examples/mainwindows/mainwindow/mainwindow.pro b/examples/mainwindows/mainwindow/mainwindow.pro index bbb7c80a21..afe03a5788 100644 --- a/examples/mainwindows/mainwindow/mainwindow.pro +++ b/examples/mainwindows/mainwindow/mainwindow.pro @@ -9,10 +9,10 @@ build_all:!build_pass { RESOURCES += mainwindow.qrc # install -target.path = $$[QT_INSTALL_DEMOS]/qtbase/mainwindow +target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/mainwindows/mainwindow sources.files = $$SOURCES $$HEADERS $$FORMS $$RESOURCES *.png *.jpg *.pro -sources.path = $$[QT_INSTALL_DEMOS]/qtbase/mainwindow +sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/mainwindows/mainwindow INSTALLS += target sources -symbian: CONFIG += qt_demo -QT += widgets widgets +QT += widgets +symbian: CONFIG += qt_example diff --git a/examples/mainwindows/mainwindows.pro b/examples/mainwindows/mainwindows.pro index f685744228..9ed8e7aaff 100644 --- a/examples/mainwindows/mainwindows.pro +++ b/examples/mainwindows/mainwindows.pro @@ -1,10 +1,13 @@ TEMPLATE = subdirs SUBDIRS = application \ + mainwindow \ mdi \ menus \ recentfiles \ sdi +mac* && !qpa: SUBDIRS += macmainwindow + # install target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/mainwindows sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS mainwindows.pro README diff --git a/examples/network/README b/examples/network/README index 23721df4c3..23682e4aef 100644 --- a/examples/network/README +++ b/examples/network/README @@ -5,36 +5,5 @@ These examples demonstrate the fundamental aspects of network programming with Qt. -The example launcher provided with Qt can be used to explore each of the -examples in this directory. - -Documentation for these examples can be found via the Tutorial and Examples +Documentation for these examples can be found via the Examples link in the main Qt documentation. - - -Finding the Qt Examples and Demos launcher -========================================== - -On Windows: - -The launcher can be accessed via the Windows Start menu. Select the menu -entry entitled "Qt Examples and Demos" entry in the submenu containing -the Qt tools. - -On Mac OS X: - -For the binary distribution, the qtdemo executable is installed in the -/Developer/Applications/Qt directory. For the source distribution, it is -installed alongside the other Qt tools on the path specified when Qt is -configured. - -On Unix/Linux: - -The qtdemo executable is installed alongside the other Qt tools on the path -specified when Qt is configured. - -On all platforms: - -The source code for the launcher can be found in the demos/qtdemo directory -in the Qt package. This example is built at the same time as the Qt libraries, -tools, examples, and demonstrations. diff --git a/examples/network/securesocketclient/certificateinfo.cpp b/examples/network/securesocketclient/certificateinfo.cpp index b1a9acb0b2..9c9ffdeb4c 100644 --- a/examples/network/securesocketclient/certificateinfo.cpp +++ b/examples/network/securesocketclient/certificateinfo.cpp @@ -65,8 +65,8 @@ void CertificateInfo::setCertificateChain(const QList &chain) for (int i = 0; i < chain.size(); ++i) { const QSslCertificate &cert = chain.at(i); form->certificationPathView->addItem(tr("%1%2 (%3)").arg(!i ? QString() : tr("Issued by: ")) - .arg(cert.subjectInfo(QSslCertificate::Organization)) - .arg(cert.subjectInfo(QSslCertificate::CommonName))); + .arg(cert.subjectInfo(QSslCertificate::Organization).join(QLatin1String(" "))) + .arg(cert.subjectInfo(QSslCertificate::CommonName).join(QLatin1String(" ")))); } form->certificationPathView->setCurrentIndex(0); @@ -78,19 +78,19 @@ void CertificateInfo::updateCertificateInfo(int index) if (index >= 0 && index < chain.size()) { const QSslCertificate &cert = chain.at(index); QStringList lines; - lines << tr("Organization: %1").arg(cert.subjectInfo(QSslCertificate::Organization)) - << tr("Subunit: %1").arg(cert.subjectInfo(QSslCertificate::OrganizationalUnitName)) - << tr("Country: %1").arg(cert.subjectInfo(QSslCertificate::CountryName)) - << tr("Locality: %1").arg(cert.subjectInfo(QSslCertificate::LocalityName)) - << tr("State/Province: %1").arg(cert.subjectInfo(QSslCertificate::StateOrProvinceName)) - << tr("Common Name: %1").arg(cert.subjectInfo(QSslCertificate::CommonName)) + lines << tr("Organization: %1").arg(cert.subjectInfo(QSslCertificate::Organization).join(QLatin1String(" "))) + << tr("Subunit: %1").arg(cert.subjectInfo(QSslCertificate::OrganizationalUnitName).join(QLatin1String(" "))) + << tr("Country: %1").arg(cert.subjectInfo(QSslCertificate::CountryName).join(QLatin1String(" "))) + << tr("Locality: %1").arg(cert.subjectInfo(QSslCertificate::LocalityName).join(QLatin1String(" "))) + << tr("State/Province: %1").arg(cert.subjectInfo(QSslCertificate::StateOrProvinceName).join(QLatin1String(" "))) + << tr("Common Name: %1").arg(cert.subjectInfo(QSslCertificate::CommonName).join(QLatin1String(" "))) << QString() - << tr("Issuer Organization: %1").arg(cert.issuerInfo(QSslCertificate::Organization)) - << tr("Issuer Unit Name: %1").arg(cert.issuerInfo(QSslCertificate::OrganizationalUnitName)) - << tr("Issuer Country: %1").arg(cert.issuerInfo(QSslCertificate::CountryName)) - << tr("Issuer Locality: %1").arg(cert.issuerInfo(QSslCertificate::LocalityName)) - << tr("Issuer State/Province: %1").arg(cert.issuerInfo(QSslCertificate::StateOrProvinceName)) - << tr("Issuer Common Name: %1").arg(cert.issuerInfo(QSslCertificate::CommonName)); + << tr("Issuer Organization: %1").arg(cert.issuerInfo(QSslCertificate::Organization).join(QLatin1String(" "))) + << tr("Issuer Unit Name: %1").arg(cert.issuerInfo(QSslCertificate::OrganizationalUnitName).join(QLatin1String(" "))) + << tr("Issuer Country: %1").arg(cert.issuerInfo(QSslCertificate::CountryName).join(QLatin1String(" "))) + << tr("Issuer Locality: %1").arg(cert.issuerInfo(QSslCertificate::LocalityName).join(QLatin1String(" "))) + << tr("Issuer State/Province: %1").arg(cert.issuerInfo(QSslCertificate::StateOrProvinceName).join(QLatin1String(" "))) + << tr("Issuer Common Name: %1").arg(cert.issuerInfo(QSslCertificate::CommonName).join(QLatin1String(" "))); foreach (QString line, lines) form->certificateInfoView->addItem(line); } else { diff --git a/examples/opengl/README b/examples/opengl/README index 69bd134246..b891fb4192 100644 --- a/examples/opengl/README +++ b/examples/opengl/README @@ -6,36 +6,5 @@ These examples demonstrate the basic techniques used to take advantage of OpenGL in Qt applications. -The example launcher provided with Qt can be used to explore each of the -examples in this directory. - -Documentation for these examples can be found via the Tutorial and Examples +Documentation for these examples can be found via the Examples link in the main Qt documentation. - - -Finding the Qt Examples and Demos launcher -========================================== - -On Windows: - -The launcher can be accessed via the Windows Start menu. Select the menu -entry entitled "Qt Examples and Demos" entry in the submenu containing -the Qt tools. - -On Mac OS X: - -For the binary distribution, the qtdemo executable is installed in the -/Developer/Applications/Qt directory. For the source distribution, it is -installed alongside the other Qt tools on the path specified when Qt is -configured. - -On Unix/Linux: - -The qtdemo executable is installed alongside the other Qt tools on the path -specified when Qt is configured. - -On all platforms: - -The source code for the launcher can be found in the demos/qtdemo directory -in the Qt package. This example is built at the same time as the Qt libraries, -tools, examples, and demonstrations. diff --git a/examples/painting/README b/examples/painting/README index 4f9dca0181..541c553159 100644 --- a/examples/painting/README +++ b/examples/painting/README @@ -7,36 +7,5 @@ with Qt, from basic concepts such as drawing simple primitives to the use of transformations. -The example launcher provided with Qt can be used to explore each of the -examples in this directory. - -Documentation for these examples can be found via the Tutorial and Examples +Documentation for these examples can be found via the Examples link in the main Qt documentation. - - -Finding the Qt Examples and Demos launcher -========================================== - -On Windows: - -The launcher can be accessed via the Windows Start menu. Select the menu -entry entitled "Qt Examples and Demos" entry in the submenu containing -the Qt tools. - -On Mac OS X: - -For the binary distribution, the qtdemo executable is installed in the -/Developer/Applications/Qt directory. For the source distribution, it is -installed alongside the other Qt tools on the path specified when Qt is -configured. - -On Unix/Linux: - -The qtdemo executable is installed alongside the other Qt tools on the path -specified when Qt is configured. - -On all platforms: - -The source code for the launcher can be found in the demos/qtdemo directory -in the Qt package. This example is built at the same time as the Qt libraries, -tools, examples, and demonstrations. diff --git a/examples/painting/affine/affine.pro b/examples/painting/affine/affine.pro index 4e4eee8882..1441811851 100644 --- a/examples/painting/affine/affine.pro +++ b/examples/painting/affine/affine.pro @@ -13,12 +13,16 @@ include($$SHARED_FOLDER/shared.pri) RESOURCES += affine.qrc # install -target.path = $$[QT_INSTALL_DEMOS]/qtbase/affine +target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/painting/affine sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro *.html *.jpg -sources.path = $$[QT_INSTALL_DEMOS]/qtbase/affine +sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/painting/affine INSTALLS += target sources -symbian: CONFIG += qt_demo +symbian { + CONFIG += qt_example +} + +maemo5: CONFIG += qt_example wince*: { DEPLOYMENT_PLUGIN += qjpeg diff --git a/examples/painting/composition/composition.pro b/examples/painting/composition/composition.pro index 00c500ea3b..c8e5ab0af3 100644 --- a/examples/painting/composition/composition.pro +++ b/examples/painting/composition/composition.pro @@ -12,12 +12,12 @@ contains(QT_CONFIG, opengl) { } # install -target.path = $$[QT_INSTALL_DEMOS]/qtbase/composition +target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/painting/composition sources.files = $$SOURCES $$HEADERS $$RESOURCES *.png *.jpg *.pro *.html -sources.path = $$[QT_INSTALL_DEMOS]/qtbase/composition +sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/painting/composition INSTALLS += target sources -symbian: CONFIG += qt_demo +symbian: CONFIG += qt_example win32-msvc* { QMAKE_CXXFLAGS += /Zm500 diff --git a/examples/painting/deform/deform.pro b/examples/painting/deform/deform.pro index d1c8938ad0..2bfc5d32cd 100644 --- a/examples/painting/deform/deform.pro +++ b/examples/painting/deform/deform.pro @@ -13,12 +13,12 @@ contains(QT_CONFIG, opengl) { } # install -target.path = $$[QT_INSTALL_DEMOS]/qtbase/deform +target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/painting/deform sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro *.html -sources.path = $$[QT_INSTALL_DEMOS]/qtbase/deform +sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/painting/deform INSTALLS += target sources symbian { TARGET.UID3 = 0xA000A63D - CONFIG += qt_demo + CONFIG += qt_example } diff --git a/examples/painting/gradients/gradients.pro b/examples/painting/gradients/gradients.pro index ff292efba1..66f19c0801 100644 --- a/examples/painting/gradients/gradients.pro +++ b/examples/painting/gradients/gradients.pro @@ -12,9 +12,9 @@ contains(QT_CONFIG, opengl) { } # install -target.path = $$[QT_INSTALL_DEMOS]/qtbase/gradients +target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/painting/gradients sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro *.html -sources.path = $$[QT_INSTALL_DEMOS]/qtbase/gradients +sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/painting/gradients INSTALLS += target sources -symbian: CONFIG += qt_demo +symbian: CONFIG += qt_example diff --git a/examples/painting/painting.pro b/examples/painting/painting.pro index 68d4d73b62..263cc7326b 100644 --- a/examples/painting/painting.pro +++ b/examples/painting/painting.pro @@ -1,6 +1,12 @@ TEMPLATE = subdirs SUBDIRS = basicdrawing \ concentriccircles \ + examples_affine \ + examples_composition \ + examples_deform \ + examples_gradients \ + examples_pathstroke \ + painting_shared \ imagecomposition \ painterpaths \ transformations \ @@ -15,3 +21,18 @@ INSTALLS += target sources symbian: CONFIG += qt_example QT += widgets maemo5: CONFIG += qt_example + +examples_affine.subdir = affine +examples_composition.subdir = composition +examples_deform.subdir = deform +examples_gradients.subdir = gradients +examples_pathstroke.subdir = pathstroke +painting_shared.subdir = shared + +!ordered { + examples_affine.depends = painting_shared + examples_deform.depends = painting_shared + examples_gradients.depends = painting_shared + examples_composition.depends = painting_shared + examples_pathstroke.depends = painting_shared +} diff --git a/examples/painting/pathstroke/pathstroke.pro b/examples/painting/pathstroke/pathstroke.pro index af6482fb48..d3f6596390 100644 --- a/examples/painting/pathstroke/pathstroke.pro +++ b/examples/painting/pathstroke/pathstroke.pro @@ -13,12 +13,12 @@ contains(QT_CONFIG, opengl) { } # install -target.path = $$[QT_INSTALL_DEMOS]/qtbase/pathstroke +target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/painting/pathstroke sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro *.html -sources.path = $$[QT_INSTALL_DEMOS]/qtbase/pathstroke +sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/painting/pathstroke INSTALLS += target sources symbian { TARGET.UID3 = 0xA000A63E - CONFIG += qt_demo + CONFIG += qt_example } diff --git a/examples/painting/shared/shared.pro b/examples/painting/shared/shared.pro index 78aaaefe48..18f1d72398 100644 --- a/examples/painting/shared/shared.pro +++ b/examples/painting/shared/shared.pro @@ -26,9 +26,9 @@ HEADERS += \ RESOURCES += shared.qrc # install -target.path = $$[QT_INSTALL_DEMOS]/qtbase/shared +target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/painting/shared sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro *.pri images -sources.path = $$[QT_INSTALL_DEMOS]/qtbase/shared +sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/painting/shared INSTALLS += sources !cross_compile:INSTALLS += target diff --git a/examples/qtconcurrent/README b/examples/qtconcurrent/README index af659af2cc..4a1a149789 100644 --- a/examples/qtconcurrent/README +++ b/examples/qtconcurrent/README @@ -3,36 +3,5 @@ concurrent programming which includes implementations of the well-known map-reduce and filter-reduce algorithms. -The example launcher provided with Qt can be used to explore each of the -examples in this directory. - -Documentation for these examples can be found via the Tutorial and Examples +Documentation for these examples can be found via the Examples link in the main Qt documentation. - - -Finding the Qt Examples and Demos launcher -========================================== - -On Windows: - -The launcher can be accessed via the Windows Start menu. Select the menu -entry entitled "Qt Examples and Demos" entry in the submenu containing -the Qt tools. - -On Mac OS X: - -For the binary distribution, the qtdemo executable is installed in the -/Developer/Applications/Qt directory. For the source distribution, it is -installed alongside the other Qt tools on the path specified when Qt is -configured. - -On Unix/Linux: - -The qtdemo executable is installed alongside the other Qt tools on the path -specified when Qt is configured. - -On all platforms: - -The source code for the launcher can be found in the demos/qtdemo directory -in the Qt package. This example is built at the same time as the Qt libraries, -tools, examples, and demonstrations. diff --git a/examples/qtestlib/README b/examples/qtestlib/README index e89bf5d726..7ca55b2eb3 100644 --- a/examples/qtestlib/README +++ b/examples/qtestlib/README @@ -4,35 +4,5 @@ in unit testing frameworks as well as extensions for testing graphical user interfaces. -The examples in this directory should be run from the command line so -that output printed to the console can be examined. - -Documentation for these examples can be found via the "Tutorial and Examples" +Documentation for these examples can be found via the Examples link in the main Qt documentation. - -Finding the Qt Examples and Demos launcher -========================================== - -On Windows: - -The launcher can be accessed via the Windows Start menu. Select the menu -entry entitled "Qt Examples and Demos" entry in the submenu containing -the Qt tools. - -On Mac OS X: - -For the binary distribution, the qtdemo executable is installed in the -/Developer/Applications/Qt directory. For the source distribution, it is -installed alongside the other Qt tools on the path specified when Qt is -configured. - -On Unix/Linux: - -The qtdemo executable is installed alongside the other Qt tools on the path -specified when Qt is configured. - -On all platforms: - -The source code for the launcher can be found in the demos/qtdemo directory -in the Qt package. This example is built at the same time as the Qt libraries, -tools, examples, and demonstrations. diff --git a/examples/qws/README b/examples/qws/README index d7cf21a5c5..d24fa59a35 100644 --- a/examples/qws/README +++ b/examples/qws/README @@ -3,36 +3,5 @@ for use on systems with limited resources, specialized hardware, and small screens. -The example launcher provided with Qt can be used to explore each of the -examples in this directory. - -Documentation for these examples can be found via the Tutorial and Examples +Documentation for these examples can be found via the Examples link in the main Qt documentation. - - -Finding the Qt Examples and Demos launcher -========================================== - -On Windows: - -The launcher can be accessed via the Windows Start menu. Select the menu -entry entitled "Qt Examples and Demos" entry in the submenu containing -the Qt tools. - -On Mac OS X: - -For the binary distribution, the qtdemo executable is installed in the -/Developer/Applications/Qt directory. For the source distribution, it is -installed alongside the other Qt tools on the path specified when Qt is -configured. - -On Unix/Linux: - -The qtdemo executable is installed alongside the other Qt tools on the path -specified when Qt is configured. - -On all platforms: - -The source code for the launcher can be found in the demos/qtdemo directory -in the Qt package. This example is built at the same time as the Qt libraries, -tools, examples, and demonstrations. diff --git a/examples/richtext/README b/examples/richtext/README index 6697b237f5..647029b8a2 100644 --- a/examples/richtext/README +++ b/examples/richtext/README @@ -7,36 +7,5 @@ Text is rendered using anti-aliased outline fonts to provide the best possible on-screen representation. -The example launcher provided with Qt can be used to explore each of the -examples in this directory. - -Documentation for these examples can be found via the Tutorial and Examples +Documentation for these examples can be found via the Examples link in the main Qt documentation. - - -Finding the Qt Examples and Demos launcher -========================================== - -On Windows: - -The launcher can be accessed via the Windows Start menu. Select the menu -entry entitled "Qt Examples and Demos" entry in the submenu containing -the Qt tools. - -On Mac OS X: - -For the binary distribution, the qtdemo executable is installed in the -/Developer/Applications/Qt directory. For the source distribution, it is -installed alongside the other Qt tools on the path specified when Qt is -configured. - -On Unix/Linux: - -The qtdemo executable is installed alongside the other Qt tools on the path -specified when Qt is configured. - -On all platforms: - -The source code for the launcher can be found in the demos/qtdemo directory -in the Qt package. This example is built at the same time as the Qt libraries, -tools, examples, and demonstrations. diff --git a/examples/richtext/richtext.pro b/examples/richtext/richtext.pro index e60e9c345e..8b36c4ba42 100644 --- a/examples/richtext/richtext.pro +++ b/examples/richtext/richtext.pro @@ -1,7 +1,8 @@ TEMPLATE = subdirs SUBDIRS = calendar \ orderform \ - syntaxhighlighter + syntaxhighlighter \ + textedit # install target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/richtext diff --git a/examples/richtext/textedit/textedit.pro b/examples/richtext/textedit/textedit.pro index 02561f82ba..e5732ebfd3 100644 --- a/examples/richtext/textedit/textedit.pro +++ b/examples/richtext/textedit/textedit.pro @@ -14,10 +14,10 @@ build_all:!build_pass { } # install -target.path = $$[QT_INSTALL_DEMOS]/qtbase/textedit +target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/richtext/textedit sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro *.html *.doc images -sources.path = $$[QT_INSTALL_DEMOS]/qtbase/textedit +sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/richtext/textedit INSTALLS += target sources -symbian: CONFIG += qt_demo -QT += widgets widgets +QT += widgets +symbian: CONFIG += qt_example diff --git a/examples/sql/README b/examples/sql/README index 56b4b3e11f..70f910114a 100644 --- a/examples/sql/README +++ b/examples/sql/README @@ -5,36 +5,5 @@ SQL support is integrated with Qt's model/view architecture, making it easier to provide GUI integration for your database applications. -The example launcher provided with Qt can be used to explore each of the -examples in this directory. - -Documentation for these examples can be found via the Tutorial and Examples +Documentation for these examples can be found via the Examples link in the main Qt documentation. - - -Finding the Qt Examples and Demos launcher -========================================== - -On Windows: - -The launcher can be accessed via the Windows Start menu. Select the menu -entry entitled "Qt Examples and Demos" entry in the submenu containing -the Qt tools. - -On Mac OS X: - -For the binary distribution, the qtdemo executable is installed in the -/Developer/Applications/Qt directory. For the source distribution, it is -installed alongside the other Qt tools on the path specified when Qt is -configured. - -On Unix/Linux: - -The qtdemo executable is installed alongside the other Qt tools on the path -specified when Qt is configured. - -On all platforms: - -The source code for the launcher can be found in the demos/qtdemo directory -in the Qt package. This example is built at the same time as the Qt libraries, -tools, examples, and demonstrations. diff --git a/examples/statemachine/README b/examples/statemachine/README index 2879e67d65..a0ac35a89b 100644 --- a/examples/statemachine/README +++ b/examples/statemachine/README @@ -1,36 +1,6 @@ Qt is provided with a powerful hierchical finite state machine through the Qt State Machine classes. -The example launcher provided with Qt can be used to explore each of the -examples in this directory. -Documentation for these examples can be found via the Tutorial and Examples +Documentation for these examples can be found via the Examples link in the main Qt documentation. - - -Finding the Qt Examples and Demos launcher -========================================== - -On Windows: - -The launcher can be accessed via the Windows Start menu. Select the menu -entry entitled "Qt Examples and Demos" entry in the submenu containing -the Qt tools. - -On Mac OS X: - -For the binary distribution, the qtdemo executable is installed in the -/Developer/Applications/Qt directory. For the source distribution, it is -installed alongside the other Qt tools on the path specified when Qt is -configured. - -On Unix/Linux: - -The qtdemo executable is installed alongside the other Qt tools on the path -specified when Qt is configured. - -On all platforms: - -The source code for the launcher can be found in the demos/qtdemo directory -in the Qt package. This example is built at the same time as the Qt libraries, -tools, examples, and demonstrations. diff --git a/examples/threads/README b/examples/threads/README index e4b426f9c7..c5427ea9a9 100644 --- a/examples/threads/README +++ b/examples/threads/README @@ -5,36 +5,5 @@ mechanism can now be used to communicate between threads. Additionally, it is now possible to move objects between threads. -The example launcher provided with Qt can be used to explore each of the -examples in this directory. - -Documentation for these examples can be found via the Tutorial and Examples +Documentation for these examples can be found via the Examples link in the main Qt documentation. - - -Finding the Qt Examples and Demos launcher -========================================== - -On Windows: - -The launcher can be accessed via the Windows Start menu. Select the menu -entry entitled "Qt Examples and Demos" entry in the submenu containing -the Qt tools. - -On Mac OS X: - -For the binary distribution, the qtdemo executable is installed in the -/Developer/Applications/Qt directory. For the source distribution, it is -installed alongside the other Qt tools on the path specified when Qt is -configured. - -On Unix/Linux: - -The qtdemo executable is installed alongside the other Qt tools on the path -specified when Qt is configured. - -On all platforms: - -The source code for the launcher can be found in the demos/qtdemo directory -in the Qt package. This example is built at the same time as the Qt libraries, -tools, examples, and demonstrations. diff --git a/examples/tools/README b/examples/tools/README index b0926f2fb6..db5c107c82 100644 --- a/examples/tools/README +++ b/examples/tools/README @@ -5,36 +5,5 @@ Other classes provide application infrastructure support, handling plugin loading and managing configuration files. -The example launcher provided with Qt can be used to explore each of the -examples in this directory. - -Documentation for these examples can be found via the Tutorial and Examples +Documentation for these examples can be found via the Examples link in the main Qt documentation. - - -Finding the Qt Examples and Demos launcher -========================================== - -On Windows: - -The launcher can be accessed via the Windows Start menu. Select the menu -entry entitled "Qt Examples and Demos" entry in the submenu containing -the Qt tools. - -On Mac OS X: - -For the binary distribution, the qtdemo executable is installed in the -/Developer/Applications/Qt directory. For the source distribution, it is -installed alongside the other Qt tools on the path specified when Qt is -configured. - -On Unix/Linux: - -The qtdemo executable is installed alongside the other Qt tools on the path -specified when Qt is configured. - -On all platforms: - -The source code for the launcher can be found in the demos/qtdemo directory -in the Qt package. This example is built at the same time as the Qt libraries, -tools, examples, and demonstrations. diff --git a/examples/tools/tools.pro b/examples/tools/tools.pro index fb138b188a..cfab2f9def 100644 --- a/examples/tools/tools.pro +++ b/examples/tools/tools.pro @@ -13,6 +13,7 @@ SUBDIRS = codecs \ settingseditor \ styleplugin \ treemodelcompleter \ + undo \ undoframework plugandpaint.depends = plugandpaintplugins diff --git a/examples/tools/undo/undo.pro b/examples/tools/undo/undo.pro index 89f06bdfc7..ace6e49e8a 100644 --- a/examples/tools/undo/undo.pro +++ b/examples/tools/undo/undo.pro @@ -10,10 +10,10 @@ build_all:!build_pass { RESOURCES += undo.qrc # install -target.path = $$[QT_INSTALL_DEMOS]/qtbase/undo +target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tools/undo sources.files = $$SOURCES $$HEADERS *.pro icons $$RESOURCES $$FORMS -sources.path = $$[QT_INSTALL_DEMOS]/qtbase/undo +sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tools/undo INSTALLS += target sources -symbian: CONFIG += qt_demo QT += widgets +symbian: CONFIG += qt_example diff --git a/examples/tutorials/README b/examples/tutorials/README index 0aab26348b..54c0b17706 100644 --- a/examples/tutorials/README +++ b/examples/tutorials/README @@ -1,37 +1,6 @@ Qt is supplied with tutorials that have been written to provide developers with an introduction to the Qt API. -The example and demo launcher can be used to explore these tutorials, lets -you view the documentation in Qt Assistant, and is able to launch each part -in a series of tutorial programs. -Documentation for tutorials can be found in the Tutorial and Examples section -of the Qt documentation. - - -Finding the Qt Examples and Demos launcher -========================================== - -On Windows: - -The launcher can be accessed via the Windows Start menu. Select the menu -entry entitled "Qt Examples and Demos" entry in the submenu containing -the Qt tools. - -On Mac OS X: - -For the binary distribution, the qtdemo executable is installed in the -/Developer/Applications/Qt directory. For the source distribution, it is -installed alongside the other Qt tools on the path specified when Qt is -configured. - -On Unix/Linux: - -The qtdemo executable is installed alongside the other Qt tools on the path -specified when Qt is configured. - -On all platforms: - -The source code for the launcher can be found in the demos/qtdemo directory -in the Qt package. This example is built at the same time as the Qt libraries, -tools, examples, and demonstrations. +Documentation for tutorials can be found in the Tutorials +link in the main documentation. diff --git a/examples/webkit/webkit-guide/_index.html b/examples/webkit/webkit-guide/_index.html index 709f951c8f..5d7dd11d63 100644 --- a/examples/webkit/webkit-guide/_index.html +++ b/examples/webkit/webkit-guide/_index.html @@ -94,7 +94,6 @@ a[href^='http://waplabdc.nokia-boston.com']:before { content: url(http://waplabd @@ -159,7 +158,6 @@ a[href^='http://waplabdc.nokia-boston.com']:before { content: url(http://waplabd diff --git a/examples/widgets/README b/examples/widgets/README index fd16c67acd..e862f07b71 100644 --- a/examples/widgets/README +++ b/examples/widgets/README @@ -9,36 +9,5 @@ be used to change the appearance of standard widgets and appropriately written custom widgets. -The example launcher provided with Qt can be used to explore each of the -examples in this directory. - -Documentation for these examples can be found via the Tutorial and Examples +Documentation for these examples can be found via the Examples link in the main Qt documentation. - - -Finding the Qt Examples and Demos launcher -========================================== - -On Windows: - -The launcher can be accessed via the Windows Start menu. Select the menu -entry entitled "Qt Examples and Demos" entry in the submenu containing -the Qt tools. - -On Mac OS X: - -For the binary distribution, the qtdemo executable is installed in the -/Developer/Applications/Qt directory. For the source distribution, it is -installed alongside the other Qt tools on the path specified when Qt is -configured. - -On Unix/Linux: - -The qtdemo executable is installed alongside the other Qt tools on the path -specified when Qt is configured. - -On all platforms: - -The source code for the launcher can be found in the demos/qtdemo directory -in the Qt package. This example is built at the same time as the Qt libraries, -tools, examples, and demonstrations. diff --git a/examples/xml/README b/examples/xml/README index a6d81bb58a..a1a963006d 100644 --- a/examples/xml/README +++ b/examples/xml/README @@ -5,36 +5,5 @@ classes enable more complex document-level operations to be performed on XML files. -The example launcher provided with Qt can be used to explore each of the -examples in this directory. - -Documentation for these examples can be found via the Tutorial and Examples +Documentation for these examples can be found via the Examples link in the main Qt documentation. - - -Finding the Qt Examples and Demos launcher -========================================== - -On Windows: - -The launcher can be accessed via the Windows Start menu. Select the menu -entry entitled "Qt Examples and Demos" entry in the submenu containing -the Qt tools. - -On Mac OS X: - -For the binary distribution, the qtdemo executable is installed in the -/Developer/Applications/Qt directory. For the source distribution, it is -installed alongside the other Qt tools on the path specified when Qt is -configured. - -On Unix/Linux: - -The qtdemo executable is installed alongside the other Qt tools on the path -specified when Qt is configured. - -On all platforms: - -The source code for the launcher can be found in the demos/qtdemo directory -in the Qt package. This example is built at the same time as the Qt libraries, -tools, examples, and demonstrations. diff --git a/mkspecs/modules/qt_core.pri b/mkspecs/modules/qt_core.pri new file mode 100644 index 0000000000..2a960f1607 --- /dev/null +++ b/mkspecs/modules/qt_core.pri @@ -0,0 +1,7 @@ +QT_MODULE_BASE = /home/laknoll/dev/qt/base +QT_MODULE_BIN_BASE = /home/laknoll/dev/qt/base/bin +QT_MODULE_INCLUDE_BASE = /home/laknoll/dev/qt/base/include +QT_MODULE_IMPORT_BASE = /home/laknoll/dev/qt/base/imports +QT_MODULE_LIB_BASE = /home/laknoll/dev/qt/base/lib +QT_MODULE_PLUGIN_BASE = /home/laknoll/dev/qt/base/plugins +include(/home/laknoll/dev/qt/base/src/modules/qt_core.pri) diff --git a/mkspecs/modules/qt_dbus.pri b/mkspecs/modules/qt_dbus.pri new file mode 100644 index 0000000000..bb68563c52 --- /dev/null +++ b/mkspecs/modules/qt_dbus.pri @@ -0,0 +1,7 @@ +QT_MODULE_BASE = /home/laknoll/dev/qt/base +QT_MODULE_BIN_BASE = /home/laknoll/dev/qt/base/bin +QT_MODULE_INCLUDE_BASE = /home/laknoll/dev/qt/base/include +QT_MODULE_IMPORT_BASE = /home/laknoll/dev/qt/base/imports +QT_MODULE_LIB_BASE = /home/laknoll/dev/qt/base/lib +QT_MODULE_PLUGIN_BASE = /home/laknoll/dev/qt/base/plugins +include(/home/laknoll/dev/qt/base/src/modules/qt_dbus.pri) diff --git a/mkspecs/modules/qt_gui.pri b/mkspecs/modules/qt_gui.pri new file mode 100644 index 0000000000..c25c5b76b8 --- /dev/null +++ b/mkspecs/modules/qt_gui.pri @@ -0,0 +1,7 @@ +QT_MODULE_BASE = /home/laknoll/dev/qt/base +QT_MODULE_BIN_BASE = /home/laknoll/dev/qt/base/bin +QT_MODULE_INCLUDE_BASE = /home/laknoll/dev/qt/base/include +QT_MODULE_IMPORT_BASE = /home/laknoll/dev/qt/base/imports +QT_MODULE_LIB_BASE = /home/laknoll/dev/qt/base/lib +QT_MODULE_PLUGIN_BASE = /home/laknoll/dev/qt/base/plugins +include(/home/laknoll/dev/qt/base/src/modules/qt_gui.pri) diff --git a/mkspecs/modules/qt_network.pri b/mkspecs/modules/qt_network.pri new file mode 100644 index 0000000000..5c4a253294 --- /dev/null +++ b/mkspecs/modules/qt_network.pri @@ -0,0 +1,7 @@ +QT_MODULE_BASE = /home/laknoll/dev/qt/base +QT_MODULE_BIN_BASE = /home/laknoll/dev/qt/base/bin +QT_MODULE_INCLUDE_BASE = /home/laknoll/dev/qt/base/include +QT_MODULE_IMPORT_BASE = /home/laknoll/dev/qt/base/imports +QT_MODULE_LIB_BASE = /home/laknoll/dev/qt/base/lib +QT_MODULE_PLUGIN_BASE = /home/laknoll/dev/qt/base/plugins +include(/home/laknoll/dev/qt/base/src/modules/qt_network.pri) diff --git a/mkspecs/modules/qt_opengl.pri b/mkspecs/modules/qt_opengl.pri new file mode 100644 index 0000000000..a22c4817c7 --- /dev/null +++ b/mkspecs/modules/qt_opengl.pri @@ -0,0 +1,7 @@ +QT_MODULE_BASE = /home/laknoll/dev/qt/base +QT_MODULE_BIN_BASE = /home/laknoll/dev/qt/base/bin +QT_MODULE_INCLUDE_BASE = /home/laknoll/dev/qt/base/include +QT_MODULE_IMPORT_BASE = /home/laknoll/dev/qt/base/imports +QT_MODULE_LIB_BASE = /home/laknoll/dev/qt/base/lib +QT_MODULE_PLUGIN_BASE = /home/laknoll/dev/qt/base/plugins +include(/home/laknoll/dev/qt/base/src/modules/qt_opengl.pri) diff --git a/mkspecs/modules/qt_platformsupport.pri b/mkspecs/modules/qt_platformsupport.pri new file mode 100644 index 0000000000..a21d9e46fe --- /dev/null +++ b/mkspecs/modules/qt_platformsupport.pri @@ -0,0 +1,7 @@ +QT_MODULE_BASE = /home/laknoll/dev/qt/base +QT_MODULE_BIN_BASE = /home/laknoll/dev/qt/base/bin +QT_MODULE_INCLUDE_BASE = /home/laknoll/dev/qt/base/include +QT_MODULE_IMPORT_BASE = /home/laknoll/dev/qt/base/imports +QT_MODULE_LIB_BASE = /home/laknoll/dev/qt/base/lib +QT_MODULE_PLUGIN_BASE = /home/laknoll/dev/qt/base/plugins +include(/home/laknoll/dev/qt/base/src/modules/qt_platformsupport.pri) diff --git a/mkspecs/modules/qt_sql.pri b/mkspecs/modules/qt_sql.pri new file mode 100644 index 0000000000..5712c57e59 --- /dev/null +++ b/mkspecs/modules/qt_sql.pri @@ -0,0 +1,7 @@ +QT_MODULE_BASE = /home/laknoll/dev/qt/base +QT_MODULE_BIN_BASE = /home/laknoll/dev/qt/base/bin +QT_MODULE_INCLUDE_BASE = /home/laknoll/dev/qt/base/include +QT_MODULE_IMPORT_BASE = /home/laknoll/dev/qt/base/imports +QT_MODULE_LIB_BASE = /home/laknoll/dev/qt/base/lib +QT_MODULE_PLUGIN_BASE = /home/laknoll/dev/qt/base/plugins +include(/home/laknoll/dev/qt/base/src/modules/qt_sql.pri) diff --git a/mkspecs/modules/qt_testlib.pri b/mkspecs/modules/qt_testlib.pri new file mode 100644 index 0000000000..2aa59752a1 --- /dev/null +++ b/mkspecs/modules/qt_testlib.pri @@ -0,0 +1,7 @@ +QT_MODULE_BASE = /home/laknoll/dev/qt/base +QT_MODULE_BIN_BASE = /home/laknoll/dev/qt/base/bin +QT_MODULE_INCLUDE_BASE = /home/laknoll/dev/qt/base/include +QT_MODULE_IMPORT_BASE = /home/laknoll/dev/qt/base/imports +QT_MODULE_LIB_BASE = /home/laknoll/dev/qt/base/lib +QT_MODULE_PLUGIN_BASE = /home/laknoll/dev/qt/base/plugins +include(/home/laknoll/dev/qt/base/src/modules/qt_testlib.pri) diff --git a/mkspecs/modules/qt_uilib.pri b/mkspecs/modules/qt_uilib.pri new file mode 100644 index 0000000000..41856bb1e2 --- /dev/null +++ b/mkspecs/modules/qt_uilib.pri @@ -0,0 +1,7 @@ +QT_MODULE_BASE = /home/laknoll/dev/qt/base +QT_MODULE_BIN_BASE = /home/laknoll/dev/qt/base/bin +QT_MODULE_INCLUDE_BASE = /home/laknoll/dev/qt/base/include +QT_MODULE_IMPORT_BASE = /home/laknoll/dev/qt/base/imports +QT_MODULE_LIB_BASE = /home/laknoll/dev/qt/base/lib +QT_MODULE_PLUGIN_BASE = /home/laknoll/dev/qt/base/plugins +include(/home/laknoll/dev/qt/base/src/modules/qt_uilib.pri) diff --git a/mkspecs/modules/qt_uitools.pri b/mkspecs/modules/qt_uitools.pri new file mode 100644 index 0000000000..b6753aa7ca --- /dev/null +++ b/mkspecs/modules/qt_uitools.pri @@ -0,0 +1,7 @@ +QT_MODULE_BASE = /home/laknoll/dev/qt/base +QT_MODULE_BIN_BASE = /home/laknoll/dev/qt/base/bin +QT_MODULE_INCLUDE_BASE = /home/laknoll/dev/qt/base/include +QT_MODULE_IMPORT_BASE = /home/laknoll/dev/qt/base/imports +QT_MODULE_LIB_BASE = /home/laknoll/dev/qt/base/lib +QT_MODULE_PLUGIN_BASE = /home/laknoll/dev/qt/base/plugins +include(/home/laknoll/dev/qt/base/src/modules/qt_uitools.pri) diff --git a/mkspecs/modules/qt_widgets.pri b/mkspecs/modules/qt_widgets.pri new file mode 100644 index 0000000000..7f231cd30d --- /dev/null +++ b/mkspecs/modules/qt_widgets.pri @@ -0,0 +1,7 @@ +QT_MODULE_BASE = /home/laknoll/dev/qt/base +QT_MODULE_BIN_BASE = /home/laknoll/dev/qt/base/bin +QT_MODULE_INCLUDE_BASE = /home/laknoll/dev/qt/base/include +QT_MODULE_IMPORT_BASE = /home/laknoll/dev/qt/base/imports +QT_MODULE_LIB_BASE = /home/laknoll/dev/qt/base/lib +QT_MODULE_PLUGIN_BASE = /home/laknoll/dev/qt/base/plugins +include(/home/laknoll/dev/qt/base/src/modules/qt_widgets.pri) diff --git a/mkspecs/modules/qt_xml.pri b/mkspecs/modules/qt_xml.pri new file mode 100644 index 0000000000..6333e4c71a --- /dev/null +++ b/mkspecs/modules/qt_xml.pri @@ -0,0 +1,7 @@ +QT_MODULE_BASE = /home/laknoll/dev/qt/base +QT_MODULE_BIN_BASE = /home/laknoll/dev/qt/base/bin +QT_MODULE_INCLUDE_BASE = /home/laknoll/dev/qt/base/include +QT_MODULE_IMPORT_BASE = /home/laknoll/dev/qt/base/imports +QT_MODULE_LIB_BASE = /home/laknoll/dev/qt/base/lib +QT_MODULE_PLUGIN_BASE = /home/laknoll/dev/qt/base/plugins +include(/home/laknoll/dev/qt/base/src/modules/qt_xml.pri) diff --git a/mkspecs/qmodule.pri b/mkspecs/qmodule.pri new file mode 100644 index 0000000000..4cca34fc5c --- /dev/null +++ b/mkspecs/qmodule.pri @@ -0,0 +1,26 @@ +QMAKE_LFLAGS = -Wl,-rpath-link,$$QT_BUILD_TREE/lib $$QMAKE_LFLAGS +QT_LFLAGS_ODBC = -lodbc +styles += cde mac motif plastique cleanlooks windows +decorations += default windows styled +mouse-drivers += pc +gfx-drivers += linuxfb +mouse-drivers += linuxtp +kbd-drivers += tty +kbd-drivers += um +QT_CFLAGS_DBUS = -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include +QT_LIBS_DBUS = -L/lib -ldbus-1 -lpthread -lrt +QT_CFLAGS_GLIB = -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include +QT_LIBS_GLIB = -pthread -lgthread-2.0 -lrt -lglib-2.0 +QT_CFLAGS_GSTREAMER = -pthread -I/usr/include/gstreamer-0.10 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libxml2 +QT_LIBS_GSTREAMER = -pthread -lgstreamer-0.10 -lgobject-2.0 -lgmodule-2.0 -lxml2 -lgthread-2.0 -lrt -lglib-2.0 +QMAKE_CFLAGS_FONTCONFIG = -I/usr/include/freetype2 +QMAKE_LIBS_FONTCONFIG = -lfontconfig -lfreetype +DEFINES += QT_NO_CORESERVICES +PRECOMPILED_DIR = .pch/debug-shared +OBJECTS_DIR = .obj/debug-shared +MOC_DIR = .moc/debug-shared +RCC_DIR = .rcc/debug-shared +UI_DIR = .uic/debug-shared +QMAKE_RPATHDIR += "/home/laknoll/dev/qt/base/lib" +sql-drivers = +sql-plugins = sqlite diff --git a/mkspecs/win32-msvc2005/qmake.conf b/mkspecs/win32-msvc2005/qmake.conf index a9f725c4b0..98bb01fc0f 100644 --- a/mkspecs/win32-msvc2005/qmake.conf +++ b/mkspecs/win32-msvc2005/qmake.conf @@ -16,7 +16,7 @@ QMAKE_LEX = flex QMAKE_LEXFLAGS = QMAKE_YACC = byacc QMAKE_YACCFLAGS = -d -QMAKE_CFLAGS = -nologo -Zm200 -Zc:wchar_t- +QMAKE_CFLAGS = -nologo -Zm200 -Zc:wchar_t QMAKE_CFLAGS_WARN_ON = -W3 QMAKE_CFLAGS_WARN_OFF = -W0 QMAKE_CFLAGS_RELEASE = -O2 -MD diff --git a/mkspecs/win32-msvc2008/qmake.conf b/mkspecs/win32-msvc2008/qmake.conf index fd115e7535..0c427022d7 100644 --- a/mkspecs/win32-msvc2008/qmake.conf +++ b/mkspecs/win32-msvc2008/qmake.conf @@ -16,7 +16,7 @@ QMAKE_LEX = flex QMAKE_LEXFLAGS = QMAKE_YACC = byacc QMAKE_YACCFLAGS = -d -QMAKE_CFLAGS = -nologo -Zm200 -Zc:wchar_t- +QMAKE_CFLAGS = -nologo -Zm200 -Zc:wchar_t QMAKE_CFLAGS_WARN_ON = -W3 QMAKE_CFLAGS_WARN_OFF = -W0 QMAKE_CFLAGS_RELEASE = -O2 -MD diff --git a/mkspecs/win32-msvc2010/qmake.conf b/mkspecs/win32-msvc2010/qmake.conf index 1cad99e337..b53ff1a478 100644 --- a/mkspecs/win32-msvc2010/qmake.conf +++ b/mkspecs/win32-msvc2010/qmake.conf @@ -16,7 +16,7 @@ QMAKE_LEX = flex QMAKE_LEXFLAGS = QMAKE_YACC = byacc QMAKE_YACCFLAGS = -d -QMAKE_CFLAGS = -nologo -Zm200 -Zc:wchar_t- +QMAKE_CFLAGS = -nologo -Zm200 -Zc:wchar_t QMAKE_CFLAGS_WARN_ON = -W3 QMAKE_CFLAGS_WARN_OFF = -W0 QMAKE_CFLAGS_RELEASE = -O2 -MD diff --git a/src/corelib/codecs/qtextcodec.cpp b/src/corelib/codecs/qtextcodec.cpp index 985f5153ea..0f919fb401 100644 --- a/src/corelib/codecs/qtextcodec.cpp +++ b/src/corelib/codecs/qtextcodec.cpp @@ -1427,48 +1427,6 @@ bool QTextCodec::canEncode(const QString& s) const return (state.invalidChars == 0); } -#ifdef QT3_SUPPORT -/*! - Returns a string representing the current language and - sublanguage, e.g. "pt" for Portuguese, or "pt_br" for Portuguese/Brazil. - - \sa QLocale -*/ -const char *QTextCodec::locale() -{ - static char locale[6]; - QByteArray l = QLocale::system().name().toLatin1(); - int len = qMin(l.length(), 5); - memcpy(locale, l.constData(), len); - locale[len] = '\0'; - - return locale; -} - -/*! - \overload -*/ - -QByteArray QTextCodec::fromUnicode(const QString& uc, int& lenInOut) const -{ - QByteArray result = convertFromUnicode(uc.constData(), lenInOut, 0); - lenInOut = result.length(); - return result; -} - -/*! - \overload - - \a a contains the source characters; \a len contains the number of - characters in \a a to use. -*/ -QString QTextCodec::toUnicode(const QByteArray& a, int len) const -{ - len = qMin(a.size(), len); - return convertToUnicode(a.constData(), len, 0); -} -#endif - /*! \overload @@ -1552,22 +1510,6 @@ QByteArray QTextEncoder::fromUnicode(const QChar *uc, int len) return result; } -#ifdef QT3_SUPPORT -/*! - \overload - - Converts \a lenInOut characters (not bytes) from \a uc, and returns the - result in a QByteArray. The number of characters read is returned in - the \a lenInOut parameter. -*/ -QByteArray QTextEncoder::fromUnicode(const QString& uc, int& lenInOut) -{ - QByteArray result = c->fromUnicode(uc.constData(), lenInOut, &state); - lenInOut = result.length(); - return result; -} -#endif - /*! \class QTextDecoder \brief The QTextDecoder class provides a state-based decoder. diff --git a/src/corelib/codecs/qtextcodec.h b/src/corelib/codecs/qtextcodec.h index 270e96aaf7..015c0941f2 100644 --- a/src/corelib/codecs/qtextcodec.h +++ b/src/corelib/codecs/qtextcodec.h @@ -134,17 +134,6 @@ protected: QTextCodec(); virtual ~QTextCodec(); -public: -#ifdef QT3_SUPPORT - static QT3_SUPPORT QTextCodec* codecForContent(const char*, int) { return 0; } - static QT3_SUPPORT const char* locale(); - static QT3_SUPPORT QTextCodec* codecForName(const char* hint, int) { return codecForName(QByteArray(hint)); } - QT3_SUPPORT QByteArray fromUnicode(const QString& uc, int& lenInOut) const; - QT3_SUPPORT QString toUnicode(const QByteArray&, int len) const; - QT3_SUPPORT QByteArray mimeName() const { return name(); } - static QT3_SUPPORT QTextCodec *codecForIndex(int i) { return codecForName(availableCodecs().value(i)); } -#endif - private: friend class QTextCodecCleanup; static QTextCodec *cftr; @@ -165,9 +154,6 @@ public: ~QTextEncoder(); QByteArray fromUnicode(const QString& str); QByteArray fromUnicode(const QChar *uc, int len); -#ifdef QT3_SUPPORT - QT3_SUPPORT QByteArray fromUnicode(const QString& uc, int& lenInOut); -#endif bool hasFailure() const; private: const QTextCodec *c; diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp index e5626b4632..ca8b30fc00 100644 --- a/src/corelib/global/qglobal.cpp +++ b/src/corelib/global/qglobal.cpp @@ -2471,11 +2471,6 @@ void qCritical(const char *msg, ...) va_end(ap); } -#ifdef QT3_SUPPORT -void qSystemWarning(const char *msg, int code) - { qCritical("%s (%s)", msg, qt_error_string(code).toLocal8Bit().constData()); } -#endif // QT3_SUPPORT - void qErrnoWarning(const char *msg, ...) { // qt_error_string() will allocate anyway, so we don't have @@ -3031,54 +3026,6 @@ int qrand() with meaningful parameter names in their signatures. */ -#if defined(QT3_SUPPORT) && !defined(QT_NO_SETTINGS) -QT_BEGIN_INCLUDE_NAMESPACE -#include -QT_END_INCLUDE_NAMESPACE - -static const char *qInstallLocation(QLibraryInfo::LibraryLocation loc) -{ - static QByteArray ret; - ret = QLibraryInfo::location(loc).toLatin1(); - return ret.constData(); -} -const char *qInstallPath() -{ - return qInstallLocation(QLibraryInfo::PrefixPath); -} -const char *qInstallPathDocs() -{ - return qInstallLocation(QLibraryInfo::DocumentationPath); -} -const char *qInstallPathHeaders() -{ - return qInstallLocation(QLibraryInfo::HeadersPath); -} -const char *qInstallPathLibs() -{ - return qInstallLocation(QLibraryInfo::LibrariesPath); -} -const char *qInstallPathBins() -{ - return qInstallLocation(QLibraryInfo::BinariesPath); -} -const char *qInstallPathPlugins() -{ - return qInstallLocation(QLibraryInfo::PluginsPath); -} -const char *qInstallPathData() -{ - return qInstallLocation(QLibraryInfo::DataPath); -} -const char *qInstallPathTranslations() -{ - return qInstallLocation(QLibraryInfo::TranslationsPath); -} -const char *qInstallPathSysconf() -{ - return qInstallLocation(QLibraryInfo::SettingsPath); -} -#endif struct QInternal_CallBackTable { QVector > callbacks; diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index 4fa6a9954b..af9d86c2ca 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -1031,18 +1031,10 @@ redefine to built-in booleans to make autotests work properly */ #endif #if defined(QT_NO_DEPRECATED) -/* disable Qt3 support as well */ -# undef QT3_SUPPORT_WARNINGS -# undef QT3_SUPPORT # undef QT_DEPRECATED # undef QT_DEPRECATED_VARIABLE # undef QT_DEPRECATED_CONSTRUCTOR #elif defined(QT_DEPRECATED_WARNINGS) -# ifdef QT3_SUPPORT -/* enable Qt3 support warnings as well */ -# undef QT3_SUPPORT_WARNINGS -# define QT3_SUPPORT_WARNINGS -# endif # undef QT_DEPRECATED # define QT_DEPRECATED Q_DECL_DEPRECATED # undef QT_DEPRECATED_VARIABLE @@ -1058,28 +1050,6 @@ redefine to built-in booleans to make autotests work properly */ # define QT_DEPRECATED_CONSTRUCTOR #endif -#if defined(QT3_SUPPORT_WARNINGS) -# if !defined(QT_COMPAT_WARNINGS) /* also enable compat */ -# define QT_COMPAT_WARNINGS -# endif -# undef QT3_SUPPORT -# define QT3_SUPPORT Q_DECL_DEPRECATED -# undef QT3_SUPPORT_VARIABLE -# define QT3_SUPPORT_VARIABLE Q_DECL_VARIABLE_DEPRECATED -# undef QT3_SUPPORT_CONSTRUCTOR -# define QT3_SUPPORT_CONSTRUCTOR explicit Q_DECL_CONSTRUCTOR_DEPRECATED -#elif defined(QT3_SUPPORT) /* define back to nothing */ -# if !defined(QT_COMPAT) /* also enable qt3 support */ -# define QT_COMPAT -# endif -# undef QT3_SUPPORT -# define QT3_SUPPORT -# undef QT3_SUPPORT_VARIABLE -# define QT3_SUPPORT_VARIABLE -# undef QT3_SUPPORT_CONSTRUCTOR -# define QT3_SUPPORT_CONSTRUCTOR explicit -#endif - /* moc compats (signals/slots) */ #ifndef QT_MOC_COMPAT # if defined(QT3_SUPPORT) @@ -1173,31 +1143,6 @@ template inline const T &qBound(const T &min, const T &val, const T &max) { return qMax(min, qMin(max, val)); } -#ifdef QT3_SUPPORT -typedef qint8 Q_INT8; -typedef quint8 Q_UINT8; -typedef qint16 Q_INT16; -typedef quint16 Q_UINT16; -typedef qint32 Q_INT32; -typedef quint32 Q_UINT32; -typedef qint64 Q_INT64; -typedef quint64 Q_UINT64; - -typedef qint64 Q_LLONG; -typedef quint64 Q_ULLONG; -#if defined(Q_OS_WIN64) -typedef __int64 Q_LONG; /* word up to 64 bit signed */ -typedef unsigned __int64 Q_ULONG; /* word up to 64 bit unsigned */ -#else -typedef long Q_LONG; /* word up to 64 bit signed */ -typedef unsigned long Q_ULONG; /* word up to 64 bit unsigned */ -#endif - -# define QABS(a) qAbs(a) -# define QMAX(a, b) qMax((a), (b)) -# define QMIN(a, b) qMin((a), (b)) -#endif - /* Data stream functions are provided by many classes (defined in qdatastream.h) */ @@ -1659,27 +1604,6 @@ Q_CORE_EXPORT bool qSharedBuild(); inline int qMacVersion() { return QSysInfo::MacintoshVersion; } #endif -#ifdef QT3_SUPPORT -inline QT3_SUPPORT bool qSysInfo(int *wordSize, bool *bigEndian) -{ - *wordSize = QSysInfo::WordSize; - *bigEndian = (QSysInfo::ByteOrder == QSysInfo::BigEndian); - return true; -} -#endif - -#if defined(Q_OS_WIN) || defined(Q_OS_CYGWIN) -#if defined(QT3_SUPPORT) -inline QT3_SUPPORT bool qt_winUnicode() { return true; } -inline QT3_SUPPORT int qWinVersion() { return QSysInfo::WindowsVersion; } -#endif - -// ### Qt 5: remove Win9x support macros QT_WA and QT_WA_INLINE. -#define QT_WA(unicode, ansi) unicode -#define QT_WA_INLINE(unicode, ansi) (unicode) - -#endif /* Q_OS_WIN */ - #ifndef Q_OUTOFLINE_TEMPLATE # define Q_OUTOFLINE_TEMPLATE #endif @@ -1749,9 +1673,6 @@ Q_CORE_EXPORT void qFatal(const char *, ...) /* print fatal message and exit */ #endif ; -#ifdef QT3_SUPPORT -Q_CORE_EXPORT QT3_SUPPORT void qSystemWarning(const char *msg, int code = -1); -#endif /* QT3_SUPPORT */ Q_CORE_EXPORT void qErrnoWarning(int code, const char *msg, ...); Q_CORE_EXPORT void qErrnoWarning(const char *msg, ...); @@ -1853,11 +1774,6 @@ Q_CORE_EXPORT void qt_message_output(QtMsgType, const char *buf); typedef void (*QtMsgHandler)(QtMsgType, const char *); Q_CORE_EXPORT QtMsgHandler qInstallMsgHandler(QtMsgHandler); -#ifdef QT3_SUPPORT -inline QT3_SUPPORT void qSuppressObsoleteWarnings(bool = true) {} -inline QT3_SUPPORT void qObsolete(const char *, const char * = 0, const char * = 0) {} -#endif - #if !defined(Q_UNIMPLEMENTED) # define Q_UNIMPLEMENTED() qWarning("%s:%d: %s: Unimplemented code.", __FILE__, __LINE__, Q_FUNC_INFO) #endif @@ -2491,9 +2407,15 @@ Q_CORE_EXPORT QString qtTrId(const char *id, int n = -1); classes contains a private copy constructor and assignment operator to disable copying (the compiler gives an error message). */ +#ifdef Q_COMPILER_DEFAULT_DELETE_MEMBERS +#define Q_DISABLE_COPY(Class) \ + Class(const Class &) = delete;\ + Class &operator=(const Class &) = delete; +#else #define Q_DISABLE_COPY(Class) \ Class(const Class &); \ Class &operator=(const Class &); +#endif class QByteArray; Q_CORE_EXPORT QByteArray qgetenv(const char *varName); @@ -2508,27 +2430,6 @@ inline int qIntCast(float f) { return int(f); } Q_CORE_EXPORT void qsrand(uint seed); Q_CORE_EXPORT int qrand(); -/* - Compat functions that were generated by configure -*/ -#ifdef QT3_SUPPORT -#ifndef QT_PRODUCT_LICENSEE -# define QT_PRODUCT_LICENSEE QLibraryInfo::licensee() -#endif -#ifndef QT_PRODUCT_LICENSE -# define QT_PRODUCT_LICENSE QLibraryInfo::licensedProducts() -#endif -QT3_SUPPORT Q_CORE_EXPORT const char *qInstallPath(); -QT3_SUPPORT Q_CORE_EXPORT const char *qInstallPathDocs(); -QT3_SUPPORT Q_CORE_EXPORT const char *qInstallPathHeaders(); -QT3_SUPPORT Q_CORE_EXPORT const char *qInstallPathLibs(); -QT3_SUPPORT Q_CORE_EXPORT const char *qInstallPathBins(); -QT3_SUPPORT Q_CORE_EXPORT const char *qInstallPathPlugins(); -QT3_SUPPORT Q_CORE_EXPORT const char *qInstallPathData(); -QT3_SUPPORT Q_CORE_EXPORT const char *qInstallPathTranslations(); -QT3_SUPPORT Q_CORE_EXPORT const char *qInstallPathSysconf(); -#endif - #if defined(Q_OS_SYMBIAN) #ifdef SYMBIAN_BUILD_GCE @@ -2612,8 +2513,6 @@ Q_CORE_EXPORT int qt_symbian_exception2Error(const std::exception& ex); #define QT_MODULE_OPENGL 0x000008 #define QT_MODULE_SQL 0x000010 #define QT_MODULE_XML 0x000020 -#define QT_MODULE_QT3SUPPORTLIGHT 0x000040 -#define QT_MODULE_QT3SUPPORT 0x000080 #define QT_MODULE_SVG 0x000100 #define QT_MODULE_ACTIVEQT 0x000200 #define QT_MODULE_GRAPHICSVIEW 0x000400 @@ -2641,7 +2540,6 @@ Q_CORE_EXPORT int qt_symbian_exception2Error(const std::exception& ex); | QT_MODULE_DBUS) #define QT_EDITION_DESKTOPLIGHT (QT_MODULE_CORE \ | QT_MODULE_GUI \ - | QT_MODULE_QT3SUPPORTLIGHT \ | QT_MODULE_TEST \ | QT_MODULE_DBUS) #define QT_EDITION_OPENSOURCE (QT_MODULE_CORE \ @@ -2655,8 +2553,6 @@ Q_CORE_EXPORT int qt_symbian_exception2Error(const std::exception& ex); | QT_MODULE_XMLPATTERNS \ | QT_MODULE_SCRIPT \ | QT_MODULE_SCRIPTTOOLS \ - | QT_MODULE_QT3SUPPORTLIGHT \ - | QT_MODULE_QT3SUPPORT \ | QT_MODULE_SVG \ | QT_MODULE_DECLARATIVE \ | QT_MODULE_GRAPHICSVIEW \ @@ -2723,12 +2619,6 @@ QT_LICENSED_MODULE(Script) #if (QT_EDITION & QT_MODULE_SCRIPTTOOLS) QT_LICENSED_MODULE(ScriptTools) #endif -#if (QT_EDITION & QT_MODULE_QT3SUPPORTLIGHT) -QT_LICENSED_MODULE(Qt3SupportLight) -#endif -#if (QT_EDITION & QT_MODULE_QT3SUPPORT) -QT_LICENSED_MODULE(Qt3Support) -#endif #if (QT_EDITION & QT_MODULE_SVG) QT_LICENSED_MODULE(Svg) #endif diff --git a/src/corelib/global/qnamespace.h b/src/corelib/global/qnamespace.h index 38d4a85b89..44e59e6cf8 100644 --- a/src/corelib/global/qnamespace.h +++ b/src/corelib/global/qnamespace.h @@ -66,7 +66,6 @@ Qt { Q_ENUMS(ScrollBarPolicy FocusPolicy ContextMenuPolicy) Q_ENUMS(ArrowType ToolButtonStyle PenStyle PenCapStyle PenJoinStyle BrushStyle) Q_ENUMS(FillRule MaskMode BGMode ClipOperation SizeMode) - Q_ENUMS(BackgroundMode) // Qt3 Q_ENUMS(Axis Corner LayoutDirection SizeHint Orientation DropAction) Q_FLAGS(Alignment Orientations DropActions) Q_FLAGS(DockWidgetAreas ToolBarAreas) @@ -159,18 +158,6 @@ public: }; Q_DECLARE_FLAGS(MouseButtons, MouseButton) -#ifdef QT3_SUPPORT - enum ButtonState_enum { - ShiftButton = Qt::ShiftModifier, - ControlButton = Qt::ControlModifier, - AltButton = Qt::AltModifier, - MetaButton = Qt::MetaModifier, - Keypad = Qt::KeypadModifier, - KeyButtonMask = Qt::KeyboardModifierMask - }; - typedef int ButtonState; -#endif - enum Orientation { Horizontal = 0x1, Vertical = 0x2 @@ -189,10 +176,6 @@ public: enum SortOrder { AscendingOrder, DescendingOrder -#if defined(QT3_SUPPORT) && !defined(Q_MOC_RUN) - ,Ascending = AscendingOrder, - Descending = DescendingOrder -#endif }; enum TileRule { @@ -221,9 +204,6 @@ public: AlignVertical_Mask = AlignTop | AlignBottom | AlignVCenter, AlignCenter = AlignVCenter | AlignHCenter -#if defined(QT3_SUPPORT) && !defined(Q_MOC_RUN) - , AlignAuto = AlignLeft -#endif }; Q_DECLARE_FLAGS(Alignment, AlignmentFlag) @@ -243,22 +223,7 @@ public: TextForceRightToLeft = 0x40000, TextLongestVariant = 0x80000, TextBypassShaping = 0x100000 - -#if defined(QT3_SUPPORT) && !defined(Q_MOC_RUN) - ,SingleLine = TextSingleLine, - DontClip = TextDontClip, - ExpandTabs = TextExpandTabs, - ShowPrefix = TextShowMnemonic, - WordBreak = TextWordWrap, - BreakAnywhere = TextWrapAnywhere, - DontPrint = TextDontPrint, - IncludeTrailingSpaces = TextIncludeTrailingSpaces, - NoAccel = TextHideMnemonic -#endif }; -#ifdef QT3_SUPPORT - typedef TextFlag TextFlags; -#endif enum TextElideMode { ElideLeft, @@ -533,36 +498,11 @@ public: OpaqueMode }; -#ifdef QT3_SUPPORT - enum PaintUnit { // paint unit - PixelUnit, - LoMetricUnit, // obsolete - HiMetricUnit, // obsolete - LoEnglishUnit, // obsolete - HiEnglishUnit, // obsolete - TwipsUnit // obsolete - }; - - enum GUIStyle { - MacStyle, - WindowsStyle, - Win3Style, - PMStyle, - MotifStyle - }; -#endif - enum Key { Key_Escape = 0x01000000, // misc keys Key_Tab = 0x01000001, Key_Backtab = 0x01000002, -#if defined(QT3_SUPPORT) && !defined(Q_MOC_RUN) - Key_BackTab = Key_Backtab, -#endif Key_Backspace = 0x01000003, -#if defined(QT3_SUPPORT) && !defined(Q_MOC_RUN) - Key_BackSpace = Key_Backspace, -#endif Key_Return = 0x01000004, Key_Enter = 0x01000005, Key_Insert = 0x01000006, @@ -578,13 +518,7 @@ public: Key_Right = 0x01000014, Key_Down = 0x01000015, Key_PageUp = 0x01000016, -#if defined(QT3_SUPPORT) && !defined(Q_MOC_RUN) - Key_Prior = Key_PageUp, -#endif Key_PageDown = 0x01000017, -#if defined(QT3_SUPPORT) && !defined(Q_MOC_RUN) - Key_Next = Key_PageDown, -#endif Key_Shift = 0x01000020, // modifiers Key_Control = 0x01000021, Key_Meta = 0x01000022, @@ -770,41 +704,7 @@ public: Key_Yacute = 0x0dd, Key_THORN = 0x0de, Key_ssharp = 0x0df, -#if defined(QT3_SUPPORT) && !defined(Q_MOC_RUN) - Key_agrave = Key_Agrave, - Key_aacute = Key_Aacute, - Key_acircumflex = Key_Acircumflex, - Key_atilde = Key_Atilde, - Key_adiaeresis = Key_Adiaeresis, - Key_aring = Key_Aring, - Key_ae = Key_AE, - Key_ccedilla = Key_Ccedilla, - Key_egrave = Key_Egrave, - Key_eacute = Key_Eacute, - Key_ecircumflex = Key_Ecircumflex, - Key_ediaeresis = Key_Ediaeresis, - Key_igrave = Key_Igrave, - Key_iacute = Key_Iacute, - Key_icircumflex = Key_Icircumflex, - Key_idiaeresis = Key_Idiaeresis, - Key_eth = Key_ETH, - Key_ntilde = Key_Ntilde, - Key_ograve = Key_Ograve, - Key_oacute = Key_Oacute, - Key_ocircumflex = Key_Ocircumflex, - Key_otilde = Key_Otilde, - Key_odiaeresis = Key_Odiaeresis, -#endif Key_division = 0x0f7, -#if defined(QT3_SUPPORT) && !defined(Q_MOC_RUN) - Key_oslash = Key_Ooblique, - Key_ugrave = Key_Ugrave, - Key_uacute = Key_Uacute, - Key_ucircumflex = Key_Ucircumflex, - Key_udiaeresis = Key_Udiaeresis, - Key_yacute = Key_Yacute, - Key_thorn = Key_THORN, -#endif Key_ydiaeresis = 0x0ff, // International input method support (X keycode - 0xEE00, the @@ -904,9 +804,6 @@ public: Key_MediaPlay = 0x01000080, Key_MediaStop = 0x01000081, Key_MediaPrevious = 0x01000082, -#if defined(QT3_SUPPORT) && !defined(Q_MOC_RUN) - Key_MediaPrev = Key_MediaPrevious, -#endif Key_MediaNext = 0x01000083, Key_MediaRecord = 0x01000084, Key_MediaPause = 0x1000085, @@ -1122,9 +1019,6 @@ public: RadialGradientPattern, ConicalGradientPattern, TexturePattern = 24 -#if defined(QT3_SUPPORT) && !defined(Q_MOC_RUN) - , CustomPattern = TexturePattern -#endif }; enum SizeMode { @@ -1132,66 +1026,6 @@ public: RelativeSize }; -#if defined(QT3_SUPPORT) -#if defined(Q_OS_MAC) -#ifndef qdoc - typedef int MacintoshVersion; - - enum -#else - enum MacintoshVersion -#endif - { - //Unknown - MV_Unknown = 0x0000, - - //Version numbers - MV_9 = QSysInfo::MV_9, - MV_10_DOT_0 = QSysInfo::MV_10_0, - MV_10_DOT_1 = QSysInfo::MV_10_1, - MV_10_DOT_2 = QSysInfo::MV_10_2, - MV_10_DOT_3 = QSysInfo::MV_10_3, - MV_10_DOT_4 = QSysInfo::MV_10_4, - - //Code names - MV_CHEETAH = QSysInfo::MV_CHEETAH, - MV_PUMA = QSysInfo::MV_PUMA, - MV_JAGUAR = QSysInfo::MV_JAGUAR, - MV_PANTHER = QSysInfo::MV_PANTHER, - MV_TIGER = QSysInfo::MV_TIGER - }; -#endif // Q_OS_MAC - -#if defined(Q_OS_WIN) || defined(Q_OS_CYGWIN) -#ifndef qdoc - typedef int WindowsVersion; - - enum -#else - enum WindowsVersion -#endif - { - WV_32s = QSysInfo::WV_32s, - WV_95 = QSysInfo::WV_95, - WV_98 = QSysInfo::WV_98, - WV_Me = QSysInfo::WV_Me, - WV_DOS_based= QSysInfo::WV_DOS_based, - - WV_NT = QSysInfo::WV_NT, - WV_2000 = QSysInfo::WV_2000, - WV_XP = QSysInfo::WV_XP, - WV_2003 = QSysInfo::WV_2003, - WV_NT_based = QSysInfo::WV_NT_based, - - WV_CE = QSysInfo::WV_CE, - WV_CENET = QSysInfo::WV_CENET, - WV_CE_5 = QSysInfo::WV_CE_5, - WV_CE_6 = QSysInfo::WV_CE_6, - WV_CE_based = QSysInfo::WV_CE_based - }; -#endif // Q_OS_WIN -#endif // QT3_SUPPORT - enum UIEffect { UI_General, UI_AnimateMenu, @@ -1228,26 +1062,6 @@ public: LastCursor = DragLinkCursor, BitmapCursor = 24, CustomCursor = 25 - -#if defined(QT3_SUPPORT) && !defined(Q_MOC_RUN) - , - arrowCursor = ArrowCursor, - upArrowCursor = UpArrowCursor, - crossCursor = CrossCursor, - waitCursor = WaitCursor, - ibeamCursor = IBeamCursor, - sizeVerCursor = SizeVerCursor, - sizeHorCursor = SizeHorCursor, - sizeBDiagCursor = SizeBDiagCursor, - sizeFDiagCursor = SizeFDiagCursor, - sizeAllCursor = SizeAllCursor, - blankCursor = BlankCursor, - splitVCursor = SplitVCursor, - splitHCursor = SplitHCursor, - pointingHandCursor = PointingHandCursor, - forbiddenCursor = ForbiddenCursor, - whatsThisCursor = WhatsThisCursor -#endif }; enum TextFormat { @@ -1261,15 +1075,7 @@ public: IgnoreAspectRatio, KeepAspectRatio, KeepAspectRatioByExpanding -#if defined(QT3_SUPPORT) && !defined(Q_MOC_RUN) - , ScaleFree = IgnoreAspectRatio, - ScaleMin = KeepAspectRatio, - ScaleMax = KeepAspectRatioByExpanding -#endif }; -#ifdef QT3_SUPPORT - typedef AspectRatioMode ScaleMode; -#endif // This is for Q3TextEdit only, actually. enum AnchorAttribute { @@ -1310,28 +1116,6 @@ public: Q_DECLARE_FLAGS(ToolBarAreas, ToolBarArea) -#ifdef QT3_SUPPORT - enum Dock { - DockUnmanaged, - DockTornOff, - DockTop, - DockBottom, - DockRight, - DockLeft, - DockMinimized - , - Unmanaged = DockUnmanaged, - TornOff = DockTornOff, - Top = DockTop, - Bottom = DockBottom, - Right = DockRight, - Left = DockLeft, - Minimized = DockMinimized - }; - // compatibility - typedef Dock ToolBarDock; -#endif - enum DateFormat { TextDate, // default Qt ISODate, // ISO 8601 @@ -1366,31 +1150,6 @@ public: ScrollBarAlwaysOn }; -#ifdef QT3_SUPPORT - enum BackgroundMode { - FixedColor, - FixedPixmap, - NoBackground, - PaletteForeground, - PaletteButton, - PaletteLight, - PaletteMidlight, - PaletteDark, - PaletteMid, - PaletteText, - PaletteBrightText, - PaletteBase, - PaletteBackground, - PaletteShadow, - PaletteHighlight, - PaletteHighlightedText, - PaletteButtonText, - PaletteLink, - PaletteLinkVisited, - X11ParentRelative - }; -#endif - enum CaseSensitivity { CaseInsensitive, CaseSensitive @@ -1401,12 +1160,6 @@ public: TopRightCorner = 0x00001, BottomLeftCorner = 0x00002, BottomRightCorner = 0x00003 -#if defined(QT3_SUPPORT) && !defined(Q_MOC_RUN) - ,TopLeft = TopLeftCorner, - TopRight = TopRightCorner, - BottomLeft = BottomLeftCorner, - BottomRight = BottomRightCorner -#endif }; enum ConnectionType { @@ -1438,8 +1191,7 @@ public: enum ClipOperation { NoClip, ReplaceClip, - IntersectClip, - UniteClip + IntersectClip }; // Shape = 0x1, BoundingRect = 0x2 @@ -1818,14 +1570,6 @@ public: static bool callFunction(InternalFunction func, void **); }; -#ifdef QT3_SUPPORT -typedef qint32 QCOORD; // coordinate type -enum { - QCOORD_MAX = 2147483647, - QCOORD_MIN = -QCOORD_MAX - 1 -}; -#endif - QT_END_NAMESPACE QT_END_HEADER diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc index 09611e67f4..2d102e7ba1 100644 --- a/src/corelib/global/qnamespace.qdoc +++ b/src/corelib/global/qnamespace.qdoc @@ -2201,52 +2201,6 @@ TargetMoveAction is not used on the Mac. */ -#if defined(Q_OS_WIN) && defined(QT3_SUPPORT) -/*! - \enum Qt::WindowsVersion - \compat - - \value WV_32s - \value WV_95 - \value WV_98 - \value WV_Me - \value WV_DOS_based - \value WV_NT - \value WV_2000 - \value WV_XP - \value WV_2003 - \value WV_NT_based - \value WV_CE - \value WV_CENET - \value WV_CE_based - \value WV_CE_5 - \value WV_CE_6 -*/ -#endif - -#if defined(Q_OS_MAC) && defined(QT3_SUPPORT) -/*! - \enum Qt::MacintoshVersion - \compat - - \value MV_Unknown Use QSysInfo::MV_Unknown instead. - \value MV_9 Use QSysInfo::MV_9 instead. - \value MV_10_DOT_0 Use QSysInfo::MV_10_0 instead. - \value MV_10_DOT_1 Use QSysInfo::MV_10_1 instead. - \value MV_10_DOT_2 Use QSysInfo::MV_10_2 instead. - \value MV_10_DOT_3 Use QSysInfo::MV_10_3 instead. - \value MV_10_DOT_4 Use QSysInfo::MV_10_4 instead. - - \value MV_CHEETAH Use QSysInfo::MV_10_0 instead. - \value MV_PUMA Use QSysInfo::MV_10_1 instead. - \value MV_JAGUAR Use QSysInfo::MV_10_2 instead. - \value MV_PANTHER Use QSysInfo::MV_10_3 instead. - \value MV_TIGER Use QSysInfo::MV_10_4 instead. - - \sa QSysInfo::MacVersion -*/ -#endif - /*! \typedef Qt::ToolBarDock \compat diff --git a/src/corelib/io/qdatastream.cpp b/src/corelib/io/qdatastream.cpp index b397c1a29c..af4ec3bc60 100644 --- a/src/corelib/io/qdatastream.cpp +++ b/src/corelib/io/qdatastream.cpp @@ -294,31 +294,6 @@ QDataStream::QDataStream(QIODevice *d) q_status = Ok; } -#ifdef QT3_SUPPORT -/*! - \fn QDataStream::QDataStream(QByteArray *array, int mode) - \compat - - Constructs a data stream that operates on the given \a array. The - \a mode specifies how the byte array is to be used, and is - usually either QIODevice::ReadOnly or QIODevice::WriteOnly. -*/ -QDataStream::QDataStream(QByteArray *a, int mode) -{ - QBuffer *buf = new QBuffer(a); -#ifndef QT_NO_QOBJECT - buf->blockSignals(true); -#endif - buf->open(QIODevice::OpenMode(mode)); - dev = buf; - owndev = true; - byteorder = BigEndian; - ver = DefaultStreamVersion; - noswap = QSysInfo::ByteOrder == QSysInfo::BigEndian; - q_status = Ok; -} -#endif - /*! \fn QDataStream::QDataStream(QByteArray *a, QIODevice::OpenMode mode) @@ -587,6 +562,8 @@ void QDataStream::setByteOrder(ByteOrder bo) \value Qt_4_6 Version 12 (Qt 4.6, Qt 4.7, Qt 4.8) \value Qt_4_7 Same as Qt_4_6. \value Qt_4_8 Same as Qt_4_6. + \value Qt_4_9 Same as Qt_4_6. + \value Qt_5_0 Same as Qt_4_6. \sa setVersion(), version() */ @@ -1307,20 +1284,6 @@ int QDataStream::skipRawData(int len) } } -#ifdef QT3_SUPPORT -/*! - \fn QDataStream &QDataStream::readRawBytes(char *str, uint len) - - Use readRawData() instead. -*/ - -/*! - \fn QDataStream &QDataStream::writeRawBytes(const char *str, uint len) - - Use writeRawData() instead. -*/ -#endif - QT_END_NAMESPACE #endif // QT_NO_DATASTREAM diff --git a/src/corelib/io/qdatastream.h b/src/corelib/io/qdatastream.h index 57d68e2f39..1ae0573f6c 100644 --- a/src/corelib/io/qdatastream.h +++ b/src/corelib/io/qdatastream.h @@ -113,9 +113,6 @@ public: QDataStream(); explicit QDataStream(QIODevice *); -#ifdef QT3_SUPPORT - QDataStream(QByteArray *, int mode); -#endif QDataStream(QByteArray *, QIODevice::OpenMode flags); QDataStream(const QByteArray &); virtual ~QDataStream(); @@ -125,9 +122,6 @@ public: void unsetDevice(); bool atEnd() const; -#ifdef QT3_SUPPORT - inline QT3_SUPPORT bool eof() const { return atEnd(); } -#endif Status status() const; void setStatus(Status status); @@ -177,15 +171,6 @@ public: int skipRawData(int len); -#ifdef QT3_SUPPORT - inline QT3_SUPPORT QDataStream &readRawBytes(char *str, uint len) - { readRawData(str, static_cast(len)); return *this; } - inline QT3_SUPPORT QDataStream &writeRawBytes(const char *str, uint len) - { writeRawData(str, static_cast(len)); return *this; } - inline QT3_SUPPORT bool isPrintableData() const { return false; } - inline QT3_SUPPORT void setPrintableData(bool) {} -#endif - private: Q_DISABLE_COPY(QDataStream) diff --git a/src/corelib/io/qdir.cpp b/src/corelib/io/qdir.cpp index 9426618875..3621deea28 100644 --- a/src/corelib/io/qdir.cpp +++ b/src/corelib/io/qdir.cpp @@ -91,10 +91,6 @@ QDirPrivate::QDirPrivate(const QString &path, const QStringList &nameFilters_, Q , nameFilters(nameFilters_) , sort(sort_) , filters(filters_) -#ifdef QT3_SUPPORT - , filterSepChar(0) - , matchAllDirs(false) -#endif , fileListsInitialized(false) { setPath(path.isEmpty() ? QString::fromLatin1(".") : path); @@ -118,10 +114,6 @@ QDirPrivate::QDirPrivate(const QDirPrivate ©) , nameFilters(copy.nameFilters) , sort(copy.sort) , filters(copy.filters) -#ifdef QT3_SUPPORT - , filterSepChar(copy.filterSepChar) - , matchAllDirs(copy.matchAllDirs) -#endif , fileListsInitialized(false) , dirEntry(copy.dirEntry) , metaData(copy.metaData) @@ -1288,10 +1280,6 @@ QStringList QDir::entryList(const QStringList &nameFilters, Filters filters, if (filters == NoFilter) filters = d->filters; -#ifdef QT3_SUPPORT - if (d->matchAllDirs) - filters |= AllDirs; -#endif if (sort == NoSort) sort = d->sort; @@ -1334,10 +1322,6 @@ QFileInfoList QDir::entryInfoList(const QStringList &nameFilters, Filters filter if (filters == NoFilter) filters = d->filters; -#ifdef QT3_SUPPORT - if (d->matchAllDirs) - filters |= AllDirs; -#endif if (sort == NoSort) sort = d->sort; @@ -2177,145 +2161,6 @@ QStringList QDir::nameFiltersFromString(const QString &nameFilter) \sa Q_INIT_RESOURCE(), {The Qt Resource System} */ -#ifdef QT3_SUPPORT - -/*! - \fn bool QDir::matchAllDirs() const - - Use filter() & AllDirs instead. -*/ -bool QDir::matchAllDirs() const -{ - const QDirPrivate* d = d_ptr.constData(); - return d->matchAllDirs; -} - - -/*! - \fn void QDir::setMatchAllDirs(bool on) - - Use setFilter() instead. -*/ -void QDir::setMatchAllDirs(bool on) -{ - QDirPrivate* d = d_ptr.data(); - d->initFileEngine(); - d->clearFileLists(); - - d->matchAllDirs = on; -} - -/*! - Use nameFilters() instead. -*/ -QString QDir::nameFilter() const -{ - const QDirPrivate* d = d_ptr.constData(); - return nameFilters().join(QString(d->filterSepChar)); -} - -/*! - Use setNameFilters() instead. - - The \a nameFilter is a wildcard (globbing) filter that understands - "*" and "?" wildcards. (See \l{QRegExp wildcard matching}.) You may - specify several filter entries, each separated by spaces or by - semicolons. - - For example, if you want entryList() and entryInfoList() to list - all files ending with either ".cpp" or ".h", you would use either - dir.setNameFilters("*.cpp *.h") or dir.setNameFilters("*.cpp;*.h"). - - \oldcode - QString filter = "*.cpp *.cxx *.cc"; - dir.setNameFilter(filter); - \newcode - QString filter = "*.cpp *.cxx *.cc"; - dir.setNameFilters(filter.split(' ')); - \endcode -*/ -void QDir::setNameFilter(const QString &nameFilter) -{ - QDirPrivate* d = d_ptr.data(); - d->initFileEngine(); - d->clearFileLists(); - - d->filterSepChar = QDirPrivate::getFilterSepChar(nameFilter); - d->nameFilters = QDirPrivate::splitFilters(nameFilter, d->filterSepChar); -} - -/*! - \fn QString QDir::absPath() const - - Use absolutePath() instead. -*/ - -/*! - \fn QString QDir::absFilePath(const QString &fileName, bool acceptAbsPath) const - - Use absoluteFilePath(\a fileName) instead. - - The \a acceptAbsPath parameter is ignored. -*/ - -/*! - \fn bool QDir::mkdir(const QString &dirName, bool acceptAbsPath) const - - Use mkdir(\a dirName) instead. - - The \a acceptAbsPath parameter is ignored. -*/ - -/*! - \fn bool QDir::rmdir(const QString &dirName, bool acceptAbsPath) const - - Use rmdir(\a dirName) instead. - - The \a acceptAbsPath parameter is ignored. -*/ - -/*! - \fn QStringList QDir::entryList(const QString &nameFilter, Filters filters, - SortFlags sort) const - \overload - - Use the overload that takes a name filter string list as first - argument instead of a combination of attribute filter flags. -*/ - -/*! - \fn QFileInfoList QDir::entryInfoList(const QString &nameFilter, Filters filters, - SortFlags sort) const - \overload - - Use the overload that takes a name filter string list as first - argument instead of a combination of attribute filter flags. -*/ - -/*! - \fn void QDir::convertToAbs() - - Use makeAbsolute() instead. -*/ - -/*! - \fn QString QDir::cleanDirPath(const QString &name) - - Use cleanPath() instead. -*/ - -/*! - \typedef QDir::FilterSpec - - Use QDir::Filters instead. -*/ - -/*! - \typedef QDir::SortSpec - - Use QDir::SortFlags instead. -*/ -#endif // QT3_SUPPORT #ifndef QT_NO_DEBUG_STREAM QDebug operator<<(QDebug debug, QDir::Filters filters) diff --git a/src/corelib/io/qdir.h b/src/corelib/io/qdir.h index e2f43f06b6..de5fb1bf00 100644 --- a/src/corelib/io/qdir.h +++ b/src/corelib/io/qdir.h @@ -67,17 +67,11 @@ public: NoSymLinks = 0x008, AllEntries = Dirs | Files | Drives, TypeMask = 0x00f, -#ifdef QT3_SUPPORT - All = AllEntries, -#endif Readable = 0x010, Writable = 0x020, Executable = 0x040, PermissionMask = 0x070, -#ifdef QT3_SUPPORT - RWEMask = 0x070, -#endif Modified = 0x080, Hidden = 0x100, @@ -92,14 +86,8 @@ public: NoDotDot = 0x4000, NoFilter = -1 -#ifdef QT3_SUPPORT - ,DefaultFilter = NoFilter -#endif }; Q_DECLARE_FLAGS(Filters, Filter) -#ifdef QT3_SUPPORT - typedef Filters FilterSpec; -#endif enum SortFlag { Name = 0x00, Time = 0x01, @@ -114,9 +102,6 @@ public: LocaleAware = 0x40, Type = 0x80, NoSort = -1 -#ifdef QT3_SUPPORT - ,DefaultSort = NoSort -#endif }; Q_DECLARE_FLAGS(SortFlags, SortFlag) @@ -223,36 +208,6 @@ public: static QString cleanPath(const QString &path); void refresh() const; - -#ifdef QT3_SUPPORT - typedef SortFlags SortSpec; - inline QT3_SUPPORT QString absPath() const { return absolutePath(); } - inline QT3_SUPPORT QString absFilePath(const QString &fileName, bool acceptAbsPath = true) const - { Q_UNUSED(acceptAbsPath); return absoluteFilePath(fileName); } - QT3_SUPPORT bool matchAllDirs() const; - QT3_SUPPORT void setMatchAllDirs(bool on); - inline QT3_SUPPORT QStringList entryList(const QString &nameFilter, Filters filters = NoFilter, - SortFlags sort = NoSort) const - { return entryList(nameFiltersFromString(nameFilter), filters, sort); } - inline QT3_SUPPORT QFileInfoList entryInfoList(const QString &nameFilter, - Filters filters = NoFilter, - SortFlags sort = NoSort) const - { return entryInfoList(nameFiltersFromString(nameFilter), filters, sort); } - - QT3_SUPPORT QString nameFilter() const; - QT3_SUPPORT void setNameFilter(const QString &nameFilter); - - inline QT3_SUPPORT bool mkdir(const QString &dirName, bool acceptAbsPath) const - { Q_UNUSED(acceptAbsPath); return mkdir(dirName); } - inline QT3_SUPPORT bool rmdir(const QString &dirName, bool acceptAbsPath) const - { Q_UNUSED(acceptAbsPath); return rmdir(dirName); } - - inline QT3_SUPPORT void convertToAbs() { makeAbsolute(); } - inline QT3_SUPPORT static QString currentDirPath() { return currentPath(); } - inline QT3_SUPPORT static QString homeDirPath() { return homePath(); } - inline QT3_SUPPORT static QString rootDirPath() { return rootPath(); } - inline QT3_SUPPORT static QString cleanDirPath(const QString &name) { return cleanPath(name); } -#endif // QT3_SUPPORT }; Q_DECLARE_OPERATORS_FOR_FLAGS(QDir::Filters) diff --git a/src/corelib/io/qdir_p.h b/src/corelib/io/qdir_p.h index 3e00529070..7644a0391e 100644 --- a/src/corelib/io/qdir_p.h +++ b/src/corelib/io/qdir_p.h @@ -77,11 +77,6 @@ public: QDir::SortFlags sort; QDir::Filters filters; -#ifdef QT3_SUPPORT - QChar filterSepChar; - bool matchAllDirs; -#endif - QScopedPointer fileEngine; mutable bool fileListsInitialized; diff --git a/src/corelib/io/qfile.cpp b/src/corelib/io/qfile.cpp index 66edf58214..47f57f7fdb 100644 --- a/src/corelib/io/qfile.cpp +++ b/src/corelib/io/qfile.cpp @@ -364,20 +364,14 @@ QFilePrivate::setError(QFile::FileError err, int errNum) QIODevice. \value AutoCloseHandle The file handle passed into open() should be - closed by close(), the default behaviour is that close just flushes - the file and the app is responsible for closing the file handle. When - opening a file by name, this flag is ignored as Qt always "owns" the + closed by close(), the default behavior is that close just flushes + the file and the application is responsible for closing the file handle. + When opening a file by name, this flag is ignored as Qt always owns the file handle and must close it. + \value DontCloseHandle If not explicitly closed, the underlying file + handle is left open when the QFile object is destroyed. */ -#ifdef QT3_SUPPORT -/*! - \typedef QFile::PermissionSpec - - Use QFile::Permission instead. -*/ -#endif - #ifdef QT_NO_QOBJECT QFile::QFile() : QIODevice(*new QFilePrivate) diff --git a/src/corelib/io/qfile.h b/src/corelib/io/qfile.h index e4a74859db..554b2954e1 100644 --- a/src/corelib/io/qfile.h +++ b/src/corelib/io/qfile.h @@ -87,9 +87,6 @@ public: ResizeError = 12, PermissionsError = 13, CopyError = 14 -#ifdef QT3_SUPPORT - , ConnectError = 30 -#endif }; enum Permission { @@ -186,14 +183,6 @@ public: virtual QAbstractFileEngine *fileEngine() const; -#ifdef QT3_SUPPORT - typedef Permission PermissionSpec; - inline QT3_SUPPORT QString name() const { return fileName(); } - inline QT3_SUPPORT void setName(const QString &aName) { setFileName(aName); } - inline QT3_SUPPORT bool open(OpenMode aFlags, FILE *f) { return open(f, aFlags); } - inline QT3_SUPPORT bool open(OpenMode aFlags, int fd) { return open(fd, aFlags); } -#endif - protected: #ifdef QT_NO_QOBJECT QFile(QFilePrivate &dd); diff --git a/src/corelib/io/qfileinfo.cpp b/src/corelib/io/qfileinfo.cpp index ca42c87454..ee40c589a2 100644 --- a/src/corelib/io/qfileinfo.cpp +++ b/src/corelib/io/qfileinfo.cpp @@ -851,19 +851,6 @@ QDir QFileInfo::absoluteDir() const return QDir(absolutePath()); } -#ifdef QT3_SUPPORT -/*! - Use absoluteDir() or the dir() overload that takes no parameters - instead. -*/ -QDir QFileInfo::dir(bool absPath) const -{ - if (absPath) - return absoluteDir(); - return dir(); -} -#endif //QT3_SUPPORT - /*! Returns true if the user can read the file; otherwise returns false. diff --git a/src/corelib/io/qfileinfo.h b/src/corelib/io/qfileinfo.h index 5b1b48b7d5..6ca0ae79e0 100644 --- a/src/corelib/io/qfileinfo.h +++ b/src/corelib/io/qfileinfo.h @@ -139,40 +139,6 @@ public: bool caching() const; void setCaching(bool on); -#ifdef QT3_SUPPORT - enum Permission { - ReadOwner = QFile::ReadOwner, WriteOwner = QFile::WriteOwner, ExeOwner = QFile::ExeOwner, - ReadUser = QFile::ReadUser, WriteUser = QFile::WriteUser, ExeUser = QFile::ExeUser, - ReadGroup = QFile::ReadGroup, WriteGroup = QFile::WriteGroup, ExeGroup = QFile::ExeGroup, - ReadOther = QFile::ReadOther, WriteOther = QFile::WriteOther, ExeOther = QFile::ExeOther - }; - Q_DECLARE_FLAGS(PermissionSpec, Permission) - - inline QT3_SUPPORT QString baseName(bool complete) { - if(complete) - return completeBaseName(); - return baseName(); - } - inline QT3_SUPPORT QString extension(bool complete = true) const { - if(complete) - return completeSuffix(); - return suffix(); - } - inline QT3_SUPPORT QString absFilePath() const { return absoluteFilePath(); } - - inline QT3_SUPPORT QString dirPath(bool absPath = false) const { - if(absPath) - return absolutePath(); - return path(); - } - QT3_SUPPORT QDir dir(bool absPath) const; - inline QT3_SUPPORT bool convertToAbs() { return makeAbsolute(); } -#if !defined(Q_NO_TYPESAFE_FLAGS) - inline QT3_SUPPORT bool permission(PermissionSpec permissions) const - { return permission(QFile::Permissions(static_cast(permissions))); } -#endif -#endif - protected: QSharedDataPointer d_ptr; private: @@ -190,14 +156,7 @@ private: Q_DECLARE_TYPEINFO(QFileInfo, Q_MOVABLE_TYPE); -#ifdef QT3_SUPPORT -Q_DECLARE_OPERATORS_FOR_FLAGS(QFileInfo::PermissionSpec) -#endif - typedef QList QFileInfoList; -#ifdef QT3_SUPPORT -typedef QList::Iterator QFileInfoListIterator; -#endif QT_END_NAMESPACE diff --git a/src/corelib/io/qiodevice.cpp b/src/corelib/io/qiodevice.cpp index ea00cb4a1f..4371d9cbef 100644 --- a/src/corelib/io/qiodevice.cpp +++ b/src/corelib/io/qiodevice.cpp @@ -1790,31 +1790,6 @@ QString QIODevice::errorString() const Use write(\a data) instead. */ -#if defined QT3_SUPPORT -QIODevice::Status QIODevice::status() const -{ -#if !defined(QT_NO_QOBJECT) - const QFile *f = qobject_cast(this); - if (f) return (int) f->error(); -#endif - return isOpen() ? 0 /* IO_Ok */ : 8 /* IO_UnspecifiedError */; -} - -/*! - For device specific error handling, please refer to the - individual device documentation. - - \sa qobject_cast() -*/ -void QIODevice::resetStatus() -{ -#if !defined(QT_NO_QOBJECT) - QFile *f = qobject_cast(this); - if (f) f->unsetError(); -#endif -} -#endif - #if !defined(QT_NO_DEBUG_STREAM) QDebug operator<<(QDebug debug, QIODevice::OpenMode modes) { diff --git a/src/corelib/io/qiodevice.h b/src/corelib/io/qiodevice.h index 328e329401..7d4afca850 100644 --- a/src/corelib/io/qiodevice.h +++ b/src/corelib/io/qiodevice.h @@ -167,81 +167,10 @@ protected: private: Q_DECLARE_PRIVATE(QIODevice) Q_DISABLE_COPY(QIODevice) - -#ifdef QT3_SUPPORT -public: - typedef qint64 Offset; - - inline QT3_SUPPORT int flags() const { return static_cast(openMode()); } - inline QT3_SUPPORT int mode() const { return static_cast(openMode()); } - inline QT3_SUPPORT int state() const; - - inline QT3_SUPPORT bool isDirectAccess() const { return !isSequential(); } - inline QT3_SUPPORT bool isSequentialAccess() const { return isSequential(); } - inline QT3_SUPPORT bool isCombinedAccess() const { return false; } - inline QT3_SUPPORT bool isBuffered() const { return true; } - inline QT3_SUPPORT bool isRaw() const { return false; } - inline QT3_SUPPORT bool isSynchronous() const { return true; } - inline QT3_SUPPORT bool isAsynchronous() const { return false; } - inline QT3_SUPPORT bool isTranslated() const { return (openMode() & Text) != 0; } - inline QT3_SUPPORT bool isInactive() const { return !isOpen(); } - - typedef int Status; - QT3_SUPPORT Status status() const; - QT3_SUPPORT void resetStatus(); - - inline QT3_SUPPORT Offset at() const { return pos(); } - inline QT3_SUPPORT bool at(Offset offset) { return seek(offset); } - - inline QT3_SUPPORT qint64 readBlock(char *data, quint64 maxlen) { return read(data, maxlen); } - inline QT3_SUPPORT qint64 writeBlock(const char *data, quint64 len) { return write(data, len); } - inline QT3_SUPPORT qint64 writeBlock(const QByteArray &data) { return write(data); } - - inline QT3_SUPPORT int getch() { char c; return getChar(&c) ? int(uchar(c)) : -1; } - inline QT3_SUPPORT int putch(int c) { return putChar(char(c)) ? int(uchar(c)) : -1; } - inline QT3_SUPPORT int ungetch(int c) { ungetChar(uchar(c)); return c; } -#endif }; Q_DECLARE_OPERATORS_FOR_FLAGS(QIODevice::OpenMode) -#ifdef QT3_SUPPORT -static QT3_SUPPORT_VARIABLE const uint IO_Direct = 0x0100; -static QT3_SUPPORT_VARIABLE const uint IO_Sequential = 0x0200; -static QT3_SUPPORT_VARIABLE const uint IO_Combined = 0x0300; -static QT3_SUPPORT_VARIABLE const uint IO_TypeMask = 0x0300; - -static QT3_SUPPORT_VARIABLE const uint IO_Raw = 0x0000; -static QT3_SUPPORT_VARIABLE const uint IO_Async = 0x0000; - -#define IO_ReadOnly QIODevice::ReadOnly -#define IO_WriteOnly QIODevice::WriteOnly -#define IO_ReadWrite QIODevice::ReadWrite -#define IO_Append QIODevice::Append -#define IO_Truncate QIODevice::Truncate -#define IO_Translate QIODevice::Text -#define IO_ModeMask 0x00ff - -static QT3_SUPPORT_VARIABLE const uint IO_Open = 0x1000; -static QT3_SUPPORT_VARIABLE const uint IO_StateMask = 0xf000; - -static QT3_SUPPORT_VARIABLE const uint IO_Ok = 0; -static QT3_SUPPORT_VARIABLE const uint IO_ReadError = 1; -static QT3_SUPPORT_VARIABLE const uint IO_WriteError = 2; -static QT3_SUPPORT_VARIABLE const uint IO_FatalError = 3; -static QT3_SUPPORT_VARIABLE const uint IO_ResourceError = 4; -static QT3_SUPPORT_VARIABLE const uint IO_OpenError = 5; -static QT3_SUPPORT_VARIABLE const uint IO_ConnectError = 5; -static QT3_SUPPORT_VARIABLE const uint IO_AbortError = 6; -static QT3_SUPPORT_VARIABLE const uint IO_TimeOutError = 7; -static QT3_SUPPORT_VARIABLE const uint IO_UnspecifiedError = 8; - -inline QT3_SUPPORT int QIODevice::state() const -{ - return isOpen() ? 0x1000 : 0; -} -#endif - #if !defined(QT_NO_DEBUG_STREAM) class QDebug; Q_CORE_EXPORT QDebug operator<<(QDebug debug, QIODevice::OpenMode modes); diff --git a/src/corelib/io/qnoncontiguousbytedevice.cpp b/src/corelib/io/qnoncontiguousbytedevice.cpp index 5568920061..113ba4b4bb 100644 --- a/src/corelib/io/qnoncontiguousbytedevice.cpp +++ b/src/corelib/io/qnoncontiguousbytedevice.cpp @@ -479,7 +479,7 @@ qint64 QByteDeviceWrappingIoDevice::writeData( const char* data, qint64 maxSize) */ /*! - \fn static QNonContiguousByteDevice* QNonContiguousByteDeviceFactory::create(QIODevice *device); + \fn static QNonContiguousByteDevice* QNonContiguousByteDeviceFactory::create(QIODevice *device) Create a QNonContiguousByteDevice out of a QIODevice. For QFile, QBuffer and all other QIoDevice, sequential or not. @@ -501,7 +501,7 @@ QNonContiguousByteDevice* QNonContiguousByteDeviceFactory::create(QIODevice *dev } /*! - \fn static QNonContiguousByteDevice* QNonContiguousByteDeviceFactory::create(QRingBuffer *ringBuffer); + \fn static QNonContiguousByteDevice* QNonContiguousByteDeviceFactory::create(QSharedPointer ringBuffer) Create a QNonContiguousByteDevice out of a QRingBuffer. @@ -513,7 +513,7 @@ QNonContiguousByteDevice* QNonContiguousByteDeviceFactory::create(QSharedPointer } /*! - \fn static QNonContiguousByteDevice* QNonContiguousByteDeviceFactory::create(QByteArray *byteArray); + \fn static QNonContiguousByteDevice* QNonContiguousByteDeviceFactory::create(QByteArray *byteArray) Create a QNonContiguousByteDevice out of a QByteArray. @@ -525,7 +525,7 @@ QNonContiguousByteDevice* QNonContiguousByteDeviceFactory::create(QByteArray *by } /*! - \fn static QIODevice* QNonContiguousByteDeviceFactory::wrap(QNonContiguousByteDevice* byteDevice); + \fn static QIODevice* QNonContiguousByteDeviceFactory::wrap(QNonContiguousByteDevice* byteDevice) Wrap the \a byteDevice (possibly again) into a QIODevice. diff --git a/src/corelib/io/qprocess_win.cpp b/src/corelib/io/qprocess_win.cpp index 1761c0edee..510f72312e 100644 --- a/src/corelib/io/qprocess_win.cpp +++ b/src/corelib/io/qprocess_win.cpp @@ -46,6 +46,7 @@ #include #include #include +#include #include #include #include @@ -256,24 +257,19 @@ static QString qt_create_commandline(const QString &program, const QStringList & for (int i=0; i0 && tmp.at(i-1) == QLatin1Char('\\')) { + while (i > 0 && tmp.at(i - 1) == QLatin1Char('\\')) --i; - endQuote += QLatin1Char('\\'); - } - args += QLatin1String(" \"") + tmp.left(i) + endQuote; - } else { - args += QLatin1Char(' ') + tmp; + tmp.insert(i, QLatin1Char('"')); + tmp.prepend(QLatin1Char('"')); } + args += QLatin1Char(' ') + tmp; } return args; } diff --git a/src/corelib/io/qsettings.cpp b/src/corelib/io/qsettings.cpp index 79b2728f58..7e40e5f73b 100644 --- a/src/corelib/io/qsettings.cpp +++ b/src/corelib/io/qsettings.cpp @@ -3547,278 +3547,6 @@ QSettings::Format QSettings::registerFormat(const QString &extension, ReadFunc r return QSettings::Format((int)QSettings::CustomFormat1 + index); } -#ifdef QT3_SUPPORT -void QSettings::setPath_helper(Scope scope, const QString &organization, const QString &application) -{ - Q_D(QSettings); - if (d->pendingChanges) - d->flush(); - QSettingsPrivate *oldPriv = d; - QSettingsPrivate *newPriv = QSettingsPrivate::create(oldPriv->format, scope, organization, application); - static_cast(*newPriv) = static_cast(*oldPriv); // copy the QObject stuff over (hack) - d_ptr.reset(newPriv); -} - -/*! \fn bool QSettings::writeEntry(const QString &key, bool value) - - Sets the value of setting \a key to \a value. - - Use setValue() instead. -*/ - -/*! \fn bool QSettings::writeEntry(const QString &key, double value) - - \overload -*/ - -/*! \fn bool QSettings::writeEntry(const QString &key, int value) - - \overload -*/ - -/*! \fn bool QSettings::writeEntry(const QString &key, const char *value) - - \overload -*/ - -/*! \fn bool QSettings::writeEntry(const QString &key, const QString &value) - - \overload -*/ - -/*! \fn bool QSettings::writeEntry(const QString &key, const QStringList &value) - - \overload -*/ - -/*! \fn bool QSettings::writeEntry(const QString &key, const QStringList &value, QChar separator) - - \overload - - Use setValue(\a key, \a value) instead. You don't need \a separator. -*/ - -/*! \fn QStringList QSettings::readListEntry(const QString &key, bool *ok = 0) - - Returns the value of setting \a key converted to a QStringList. - - If \a ok is not 0, *\a{ok} is set to true if the key exists, - otherwise *\a{ok} is set to false. - - Use value() instead. - - \oldcode - bool ok; - QStringList list = settings.readListEntry("recentFiles", &ok); - \newcode - bool ok = settings.contains("recentFiles"); - QStringList list = settings.value("recentFiles").toStringList(); - \endcode -*/ - -/*! \fn QStringList QSettings::readListEntry(const QString &key, QChar separator, bool *ok) - - Returns the value of setting \a key converted to a QStringList. - \a separator is ignored. - - If \a ok is not 0, *\a{ok} is set to true if the key exists, - otherwise *\a{ok} is set to false. - - Use value() instead. - - \oldcode - bool ok; - QStringList list = settings.readListEntry("recentFiles", ":", &ok); - \newcode - bool ok = settings.contains("recentFiles"); - QStringList list = settings.value("recentFiles").toStringList(); - \endcode -*/ - -/*! \fn QString QSettings::readEntry(const QString &key, const QString &defaultValue, bool *ok) - - Returns the value for setting \a key converted to a QString. If - the setting doesn't exist, returns \a defaultValue. - - If \a ok is not 0, *\a{ok} is set to true if the key exists, - otherwise *\a{ok} is set to false. - - Use value() instead. - - \oldcode - bool ok; - QString str = settings.readEntry("userName", "administrator", &ok); - \newcode - bool ok = settings.contains("userName"); - QString str = settings.value("userName", "administrator").toString(); - \endcode -*/ - -/*! \fn int QSettings::readNumEntry(const QString &key, int defaultValue, bool *ok) - - Returns the value for setting \a key converted to an \c int. If - the setting doesn't exist, returns \a defaultValue. - - If \a ok is not 0, *\a{ok} is set to true if the key exists, - otherwise *\a{ok} is set to false. - - Use value() instead. - - \oldcode - bool ok; - int max = settings.readNumEntry("maxConnections", 30, &ok); - \newcode - bool ok = settings.contains("maxConnections"); - int max = settings.value("maxConnections", 30).toInt(); - \endcode -*/ - -/*! \fn double QSettings::readDoubleEntry(const QString &key, double defaultValue, bool *ok) - - Returns the value for setting \a key converted to a \c double. If - the setting doesn't exist, returns \a defaultValue. - - If \a ok is not 0, *\a{ok} is set to true if the key exists, - otherwise *\a{ok} is set to false. - - Use value() instead. - - \oldcode - bool ok; - double pi = settings.readDoubleEntry("pi", 3.141592, &ok); - \newcode - bool ok = settings.contains("pi"); - double pi = settings.value("pi", 3.141592).toDouble(); - \endcode -*/ - -/*! \fn bool QSettings::readBoolEntry(const QString &key, bool defaultValue, bool *ok) - - Returns the value for setting \a key converted to a \c bool. If - the setting doesn't exist, returns \a defaultValue. - - If \a ok is not 0, *\a{ok} is set to true if the key exists, - otherwise *\a{ok} is set to false. - - Use value() instead. - - \oldcode - bool ok; - bool grid = settings.readBoolEntry("showGrid", true, &ok); - \newcode - bool ok = settings.contains("showGrid"); - bool grid = settings.value("showGrid", true).toBool(); - \endcode -*/ - -/*! \fn bool QSettings::removeEntry(const QString &key) - - Use remove() instead. -*/ - -/*! \enum QSettings::System - \compat - - \value Unix Unix systems (X11 and Embedded Linux) - \value Windows Microsoft Windows systems - \value Mac Mac OS X systems - - \sa insertSearchPath(), removeSearchPath() -*/ - -/*! \fn void QSettings::insertSearchPath(System system, const QString &path) - - This function is implemented as a no-op. It is provided for - source compatibility with Qt 3. The new QSettings class has no - concept of "search path". -*/ - -/*! \fn void QSettings::removeSearchPath(System system, const QString &path) - - This function is implemented as a no-op. It is provided for - source compatibility with Qt 3. The new QSettings class has no - concept of "search path". -*/ - -/*! \fn void QSettings::setPath(const QString &organization, const QString &application, \ - Scope scope) - - Specifies the \a organization, \a application, and \a scope to - use by the QSettings object. - - Use the appropriate constructor instead, with QSettings::UserScope - instead of QSettings::User and QSettings::SystemScope instead of - QSettings::Global. - - \oldcode - QSettings settings; - settings.setPath("twikimaster.com", "Kanooth", QSettings::Global); - \newcode - QSettings settings(QSettings::SystemScope, "twikimaster.com", "Kanooth"); - \endcode -*/ - -/*! \fn void QSettings::resetGroup() - - Sets the current group to be the empty string. - - Use endGroup() instead (possibly multiple times). - - \oldcode - QSettings settings; - settings.beginGroup("mainWindow"); - settings.beginGroup("leftPanel"); - ... - settings.resetGroup(); - \newcode - QSettings settings; - settings.beginGroup("mainWindow"); - settings.beginGroup("leftPanel"); - ... - settings.endGroup(); - settings.endGroup(); - \endcode -*/ - -/*! \fn QStringList QSettings::entryList(const QString &key) const - - Returns a list of all sub-keys of \a key. - - Use childKeys() instead. - - \oldcode - QSettings settings; - QStringList keys = settings.entryList("cities"); - ... - \newcode - QSettings settings; - settings.beginGroup("cities"); - QStringList keys = settings.childKeys(); - ... - settings.endGroup(); - \endcode -*/ - -/*! \fn QStringList QSettings::subkeyList(const QString &key) const - - Returns a list of all sub-keys of \a key. - - Use childGroups() instead. - - \oldcode - QSettings settings; - QStringList groups = settings.entryList("cities"); - ... - \newcode - QSettings settings; - settings.beginGroup("cities"); - QStringList groups = settings.childKeys(); - ... - settings.endGroup(); - \endcode -*/ -#endif - QT_END_NAMESPACE #endif // QT_NO_SETTINGS diff --git a/src/corelib/io/qsettings.h b/src/corelib/io/qsettings.h index 155e5c14a6..b144a9af4c 100644 --- a/src/corelib/io/qsettings.h +++ b/src/corelib/io/qsettings.h @@ -54,10 +54,6 @@ QT_END_NAMESPACE #ifndef QT_NO_SETTINGS -#ifdef QT3_SUPPORT -#include -#endif - #include QT_BEGIN_NAMESPACE @@ -115,11 +111,6 @@ public: enum Scope { UserScope, SystemScope -#ifdef QT3_SUPPORT - , - User = UserScope, - Global = SystemScope -#endif }; #ifndef QT_NO_QOBJECT @@ -194,113 +185,12 @@ public: static Format registerFormat(const QString &extension, ReadFunc readFunc, WriteFunc writeFunc, Qt::CaseSensitivity caseSensitivity = Qt::CaseSensitive); -#ifdef QT3_SUPPORT - inline QT3_SUPPORT bool writeEntry(const QString &key, bool value) - { setValue(key, value); return isWritable(); } - inline QT3_SUPPORT bool writeEntry(const QString &key, double value) - { setValue(key, value); return isWritable(); } - inline QT3_SUPPORT bool writeEntry(const QString &key, int value) - { setValue(key, value); return isWritable(); } - inline QT3_SUPPORT bool writeEntry(const QString &key, const char *value) - { setValue(key, QString::fromAscii(value)); return isWritable(); } - inline QT3_SUPPORT bool writeEntry(const QString &key, const QString &value) - { setValue(key, value); return isWritable(); } - inline QT3_SUPPORT bool writeEntry(const QString &key, const QStringList &value) - { setValue(key, value); return isWritable(); } - inline QT3_SUPPORT bool writeEntry(const QString &key, const QStringList &value, QChar separator) - { setValue(key, value.join(QString(separator))); return isWritable(); } - inline QT3_SUPPORT QStringList readListEntry(const QString &key, bool *ok = 0) - { - if (ok) - *ok = contains(key); - return value(key).toStringList(); - } - inline QT3_SUPPORT QStringList readListEntry(const QString &key, QChar separator, bool *ok = 0) - { - if (ok) - *ok = contains(key); - QString str = value(key).toString(); - if (str.isEmpty()) - return QStringList(); - return str.split(separator); - } - inline QT3_SUPPORT QString readEntry(const QString &key, const QString &defaultValue = QString(), - bool *ok = 0) - { - if (ok) - *ok = contains(key); - return value(key, defaultValue).toString(); - } - inline QT3_SUPPORT int readNumEntry(const QString &key, int defaultValue = 0, bool *ok = 0) - { - if (ok) - *ok = contains(key); - return value(key, defaultValue).toInt(); - } - inline QT3_SUPPORT double readDoubleEntry(const QString &key, double defaultValue = 0, - bool *ok = 0) - { - if (ok) - *ok = contains(key); - return value(key, defaultValue).toDouble(); - } - inline QT3_SUPPORT bool readBoolEntry(const QString &key, bool defaultValue = false, - bool *ok = 0) - { - if (ok) - *ok = contains(key); - return value(key, defaultValue).toBool(); - } - inline QT3_SUPPORT bool removeEntry(const QString &key) - { remove(key); return true; } - - enum System { Unix, Windows, Mac }; - inline QT3_SUPPORT void insertSearchPath(System, const QString &) {} - inline QT3_SUPPORT void removeSearchPath(System, const QString &) {} - - inline QT3_SUPPORT void setPath(const QString &organization, const QString &application, - Scope scope = Global) - { - setPath_helper(scope == Global ? QSettings::SystemScope : QSettings::UserScope, - organization, application); - } - inline QT3_SUPPORT void resetGroup() - { - while (!group().isEmpty()) - endGroup(); - } - inline QT3_SUPPORT QStringList entryList(const QString &key) const - { - QSettings *that = const_cast(this); - QStringList result; - - that->beginGroup(key); - result = that->childKeys(); - that->endGroup(); - return result; - } - inline QT3_SUPPORT QStringList subkeyList(const QString &key) const - { - QSettings *that = const_cast(this); - QStringList result; - - that->beginGroup(key); - result = that->childGroups(); - that->endGroup(); - return result; - } -#endif - protected: #ifndef QT_NO_QOBJECT bool event(QEvent *event); #endif private: -#ifdef QT3_SUPPORT - void setPath_helper(Scope scope, const QString &organization, const QString &application); -#endif - Q_DISABLE_COPY(QSettings) }; diff --git a/src/corelib/io/qtextstream.cpp b/src/corelib/io/qtextstream.cpp index 7289bb6c03..177f73def3 100644 --- a/src/corelib/io/qtextstream.cpp +++ b/src/corelib/io/qtextstream.cpp @@ -3107,304 +3107,6 @@ QLocale QTextStream::locale() const return d->locale; } -#ifdef QT3_SUPPORT -/*! - \class QTextIStream - \brief The QTextIStream class is a convenience class for input streams. - - \compat - \reentrant - - Use QTextStream instead. -*/ - -/*! - \fn QTextIStream::QTextIStream(const QString *string) - - Use QTextStream(&\a{string}, QIODevice::ReadOnly) instead. -*/ -/*! - \fn QTextIStream::QTextIStream(QByteArray *byteArray) - - Use QTextStream(&\a{byteArray}, QIODevice::ReadOnly) instead. -*/ -/*! - \fn QTextIStream::QTextIStream(FILE *file) - - Use QTextStream(\a{file}, QIODevice::ReadOnly) instead. -*/ - -/*! - \class QTextOStream - \brief The QTextOStream class is a convenience class for output streams. - - \compat - \reentrant - - Use QTextStream instead. -*/ - -/*! - \fn QTextOStream::QTextOStream(QString *string) - - Use QTextStream(&\a{string}, QIODevice::WriteOnly) instead. -*/ -/*! - \fn QTextOStream::QTextOStream(QByteArray *byteArray) - - Use QTextStream(&\a{byteArray}, QIODevice::WriteOnly) instead. -*/ -/*! - \fn QTextOStream::QTextOStream(FILE *file) - - Use QTextStream(\a{file}, QIODevice::WriteOnly) instead. -*/ - -/*! \internal -*/ -int QTextStream::flagsInternal() const -{ - Q_D(const QTextStream); - - int f = 0; - switch (d->fieldAlignment) { - case AlignLeft: f |= left; break; - case AlignRight: f |= right; break; - case AlignCenter: f |= internal; break; - default: - break; - } - switch (d->integerBase) { - case 2: f |= bin; break; - case 8: f |= oct; break; - case 10: f |= dec; break; - case 16: f |= hex; break; - default: - break; - } - switch (d->realNumberNotation) { - case FixedNotation: f |= fixed; break; - case ScientificNotation: f |= scientific; break; - default: - break; - } - if (d->numberFlags & ShowBase) - f |= showbase; - if (d->numberFlags & ForcePoint) - f |= showpoint; - if (d->numberFlags & ForceSign) - f |= showpos; - if (d->numberFlags & UppercaseBase) - f |= uppercase; - return f; -} - -/*! \internal -*/ -int QTextStream::flagsInternal(int newFlags) -{ - int oldFlags = flagsInternal(); - - if (newFlags & left) - setFieldAlignment(AlignLeft); - else if (newFlags & right) - setFieldAlignment(AlignRight); - else if (newFlags & internal) - setFieldAlignment(AlignCenter); - - if (newFlags & bin) - setIntegerBase(2); - else if (newFlags & oct) - setIntegerBase(8); - else if (newFlags & dec) - setIntegerBase(10); - else if (newFlags & hex) - setIntegerBase(16); - - if (newFlags & showbase) - setNumberFlags(numberFlags() | ShowBase); - if (newFlags & showpos) - setNumberFlags(numberFlags() | ForceSign); - if (newFlags & showpoint) - setNumberFlags(numberFlags() | ForcePoint); - if (newFlags & uppercase) - setNumberFlags(numberFlags() | UppercaseBase); - - if (newFlags & fixed) - setRealNumberNotation(FixedNotation); - else if (newFlags & scientific) - setRealNumberNotation(ScientificNotation); - - return oldFlags; -} - -#ifndef QT_NO_TEXTCODEC -/*! - Use setCodec() and setAutoDetectUnicode() instead. -*/ -void QTextStream::setEncoding(Encoding encoding) -{ - Q_D(QTextStream); - resetCodecConverterStateHelper(&d->readConverterState); - resetCodecConverterStateHelper(&d->writeConverterState); - - switch (encoding) { - case Locale: - d->writeConverterState.flags |= QTextCodec::IgnoreHeader; - setCodec(QTextCodec::codecForLocale()); - d->autoDetectUnicode = true; - break; - case Latin1: - d->readConverterState.flags |= QTextCodec::IgnoreHeader; - d->writeConverterState.flags |= QTextCodec::IgnoreHeader; - setCodec(QTextCodec::codecForName("ISO-8859-1")); - d->autoDetectUnicode = false; - break; - case Unicode: - setCodec(QTextCodec::codecForName("UTF-16")); - d->autoDetectUnicode = false; - break; - case RawUnicode: - d->readConverterState.flags |= QTextCodec::IgnoreHeader; - d->writeConverterState.flags |= QTextCodec::IgnoreHeader; - setCodec(QTextCodec::codecForName("UTF-16")); - d->autoDetectUnicode = false; - break; - case UnicodeNetworkOrder: - d->readConverterState.flags |= QTextCodec::IgnoreHeader; - d->writeConverterState.flags |= QTextCodec::IgnoreHeader; - setCodec(QTextCodec::codecForName("UTF-16BE")); - d->autoDetectUnicode = false; - break; - case UnicodeReverse: - d->readConverterState.flags |= QTextCodec::IgnoreHeader; - d->writeConverterState.flags |= QTextCodec::IgnoreHeader; - setCodec(QTextCodec::codecForName("UTF-16LE")); - d->autoDetectUnicode = false; - break; - case UnicodeUTF8: - d->writeConverterState.flags |= QTextCodec::IgnoreHeader; - setCodec(QTextCodec::codecForName("UTF-8")); - d->autoDetectUnicode = true; - break; - } -} -#endif - -/*! - \enum QTextStream::Encoding - \compat - - \value Latin1 Use setCodec(QTextCodec::codecForName("ISO-8859-1")) instead. - \value Locale Use setCodec(QTextCodec::codecForLocale()) instead. - \value RawUnicode Use setCodec(QTextCodec::codecForName("UTF-16")) instead. - \value Unicode Use setCodec(QTextCodec::codecForName("UTF-16")) instead. - \value UnicodeNetworkOrder Use setCodec(QTextCodec::codecForName("UTF-16BE")) instead. - \value UnicodeReverse Use setCodec(QTextCodec::codecForName("UTF-16LE")) instead. - \value UnicodeUTF8 Use setCodec(QTextCodec::codecForName("UTF-8")) instead. - - Also, for all encodings except QTextStream::Latin1 and - QTextStream::UTF8, you need to call setAutoDetectUnicode(false) - to obtain the Qt 3 behavior in addition to the setCodec() call. - - \sa setCodec(), setAutoDetectUnicode() -*/ - -/*! - \fn int QTextStream::flags() const - - Use fieldAlignment(), padChar(), fieldWidth(), numberFlags(), - integerBase(), realNumberNotation(), and realNumberNotation - instead. -*/ - -/*! - \fn int QTextStream::flags(int) - - Use setFieldAlignment(), setPadChar(), setFieldWidth(), - setNumberFlags(), setIntegerBase(), setRealNumberNotation(), and - setRealNumberNotation instead. -*/ - -/*! - \fn int QTextStream::setf(int) - - Use setFieldAlignment(), setPadChar(), setFieldWidth(), - setNumberFlags(), setIntegerBase(), setRealNumberNotation(), and - setRealNumberNotation instead. -*/ - -/*! - \fn int QTextStream::setf(int, int) - - Use setFieldAlignment(), setPadChar(), setFieldWidth(), - setNumberFlags(), setIntegerBase(), setRealNumberNotation(), and - setRealNumberNotation instead. -*/ - -/*! - \fn int QTextStream::unsetf(int) - - Use setFieldAlignment(), setPadChar(), setFieldWidth(), - setNumberFlags(), setIntegerBase(), setRealNumberNotation(), and - setRealNumberNotation instead. -*/ - -/*! - \fn int QTextStream::width(int) - - Use setFieldWidth() instead. -*/ - -/*! - \fn int QTextStream::fill(int) - - Use setPadChar() instead. -*/ - -/*! - \fn int QTextStream::precision(int) - - Use setRealNumberPrecision() instead. -*/ - -/*! - \fn int QTextStream::read() - - Use readAll() or readLine() instead. -*/ - -/*! - \fn int QTextStream::unsetDevice() - - Use setDevice(0) instead. -*/ - -/*! - \variable QTextStream::skipws - \variable QTextStream::left - \variable QTextStream::right - \variable QTextStream::internal - \variable QTextStream::bin - \variable QTextStream::oct - \variable QTextStream::dec - \variable QTextStream::hex - \variable QTextStream::showbase - \variable QTextStream::showpoint - \variable QTextStream::uppercase - \variable QTextStream::showpos - \variable QTextStream::scientific - \variable QTextStream::fixed - \variable QTextStream::basefield - \variable QTextStream::adjustfield - \variable QTextStream::floatfield - \compat - - Use the new \l{QTextStream manipulators} instead. -*/ - -#endif - QT_END_NAMESPACE #ifndef QT_NO_QOBJECT diff --git a/src/corelib/io/qtextstream.h b/src/corelib/io/qtextstream.h index 3747fab6f6..db038855a8 100644 --- a/src/corelib/io/qtextstream.h +++ b/src/corelib/io/qtextstream.h @@ -48,12 +48,6 @@ #include #include -#ifndef QT_NO_TEXTCODEC -# ifdef QT3_SUPPORT -# include -# endif -#endif - #include #ifdef Status @@ -199,63 +193,7 @@ public: QTextStream &operator<<(const char *c); QTextStream &operator<<(const void *ptr); -#ifdef QT3_SUPPORT - // not marked as QT3_SUPPORT to avoid double compiler warnings, as - // they are used in the QT3_SUPPORT functions below. - inline QT3_SUPPORT int flags() const { return flagsInternal(); } - inline QT3_SUPPORT int flags(int f) { return flagsInternal(f); } - - inline QT3_SUPPORT int setf(int bits) - { int old = flagsInternal(); flagsInternal(flagsInternal() | bits); return old; } - inline QT3_SUPPORT int setf(int bits, int mask) - { int old = flagsInternal(); flagsInternal(flagsInternal() | (bits & mask)); return old; } - inline QT3_SUPPORT int unsetf(int bits) - { int old = flagsInternal(); flagsInternal(flagsInternal() & ~bits); return old; } - - inline QT3_SUPPORT int width(int w) - { int old = fieldWidth(); setFieldWidth(w); return old; } - inline QT3_SUPPORT int fill(int f) - { QChar ch = padChar(); setPadChar(QChar(f)); return ch.unicode(); } - inline QT3_SUPPORT int precision(int p) - { int old = realNumberPrecision(); setRealNumberPrecision(p); return old; } - - enum { - skipws = 0x0001, // skip whitespace on input - left = 0x0002, // left-adjust output - right = 0x0004, // right-adjust output - internal = 0x0008, // pad after sign - bin = 0x0010, // binary format integer - oct = 0x0020, // octal format integer - dec = 0x0040, // decimal format integer - hex = 0x0080, // hex format integer - showbase = 0x0100, // show base indicator - showpoint = 0x0200, // force decimal point (float) - uppercase = 0x0400, // upper-case hex output - showpos = 0x0800, // add '+' to positive integers - scientific = 0x1000, // scientific float output - fixed = 0x2000 // fixed float output - }; - enum { - basefield = bin | oct | dec | hex, - adjustfield = left | right | internal, - floatfield = scientific | fixed - }; - -#ifndef QT_NO_TEXTCODEC - enum Encoding { Locale, Latin1, Unicode, UnicodeNetworkOrder, - UnicodeReverse, RawUnicode, UnicodeUTF8 }; - QT3_SUPPORT void setEncoding(Encoding encoding); -#endif - inline QT3_SUPPORT QString read() { return readAll(); } - inline QT3_SUPPORT void unsetDevice() { setDevice(0); } -#endif - private: -#ifdef QT3_SUPPORT - int flagsInternal() const; - int flagsInternal(int flags); -#endif - Q_DISABLE_COPY(QTextStream) QScopedPointer d_ptr; @@ -344,32 +282,6 @@ inline QTextStreamManipulator qSetRealNumberPrecision(int precision) return QTextStreamManipulator(func, precision); } -#ifdef QT3_SUPPORT -typedef QTextStream QTS; - -class Q_CORE_EXPORT QTextIStream : public QTextStream -{ -public: - inline explicit QTextIStream(const QString *s) : QTextStream(const_cast(s), QIODevice::ReadOnly) {} - inline explicit QTextIStream(QByteArray *a) : QTextStream(a, QIODevice::ReadOnly) {} - inline QTextIStream(FILE *f) : QTextStream(f, QIODevice::ReadOnly) {} - -private: - Q_DISABLE_COPY(QTextIStream) -}; - -class Q_CORE_EXPORT QTextOStream : public QTextStream -{ -public: - inline explicit QTextOStream(QString *s) : QTextStream(s, QIODevice::WriteOnly) {} - inline explicit QTextOStream(QByteArray *a) : QTextStream(a, QIODevice::WriteOnly) {} - inline QTextOStream(FILE *f) : QTextStream(f, QIODevice::WriteOnly) {} - -private: - Q_DISABLE_COPY(QTextOStream) -}; -#endif - QT_END_NAMESPACE QT_END_HEADER diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp index 881365678f..b948a43080 100644 --- a/src/corelib/io/qurl.cpp +++ b/src/corelib/io/qurl.cpp @@ -189,9 +189,6 @@ #include "qstack.h" #include "qvarlengtharray.h" #include "qdebug.h" -#if defined QT3_SUPPORT -#include "qfileinfo.h" -#endif #ifndef QT_BOOTSTRAPPED #include "qtldurl_p.h" #endif @@ -5466,6 +5463,7 @@ void QUrl::removeAllEncodedQueryItems(const QByteArray &key) if (end < d->query.size()) ++end; // remove additional '%' d->query.remove(pos, end - pos); + query = d->query.constData(); //required if remove detach; } else { pos = end + 1; } @@ -6362,35 +6360,6 @@ bool QUrl::isParentOf(const QUrl &childUrl) const Use QFileInfo(path()).absolutePath() or QFileInfo(path()) instead. */ -#ifdef QT3_SUPPORT -void QUrl::setFileName(const QString &txt) -{ - QFileInfo fileInfo(path()); - fileInfo.setFile(txt); - setPath(fileInfo.filePath()); -} - -QString QUrl::fileName() const -{ - QFileInfo fileInfo(path()); - return fileInfo.fileName(); -} - -QString QUrl::dirPath() const -{ - QFileInfo fileInfo(path()); - if (fileInfo.isAbsolute()) { - QString absPath = fileInfo.absolutePath(); -#ifdef Q_OS_WIN - if (absPath.size() > 1 && absPath.at(1) == QLatin1Char(':')) - absPath = absPath.mid(2); -#endif - return absPath; - } - return fileInfo.path(); -} -#endif - #ifndef QT_NO_DATASTREAM /*! \relates QUrl diff --git a/src/corelib/io/qurl.h b/src/corelib/io/qurl.h index d57a0c77df..e62cd0a85b 100644 --- a/src/corelib/io/qurl.h +++ b/src/corelib/io/qurl.h @@ -221,58 +221,8 @@ public: static QStringList idnWhitelist(); static void setIdnWhitelist(const QStringList &); -#if defined QT3_SUPPORT - inline QT3_SUPPORT QString protocol() const { return scheme(); } - inline QT3_SUPPORT void setProtocol(const QString &s) { setScheme(s); } - inline QT3_SUPPORT void setUser(const QString &s) { setUserName(s); } - inline QT3_SUPPORT QString user() const { return userName(); } - inline QT3_SUPPORT bool hasUser() const { return !userName().isEmpty(); } - inline QT3_SUPPORT bool hasPassword() const { return !password().isEmpty(); } - inline QT3_SUPPORT bool hasHost() const { return !host().isEmpty(); } - inline QT3_SUPPORT bool hasPort() const { return port() != -1; } - inline QT3_SUPPORT bool hasPath() const { return !path().isEmpty(); } - inline QT3_SUPPORT void setQuery(const QString &txt) - { - setEncodedQuery(txt.toLatin1()); - } - inline QT3_SUPPORT QString query() const - { - return QString::fromLatin1(encodedQuery().constData()); - } - inline QT3_SUPPORT QString ref() const { return fragment(); } - inline QT3_SUPPORT void setRef(const QString &txt) { setFragment(txt); } - inline QT3_SUPPORT bool hasRef() const { return !fragment().isEmpty(); } - inline QT3_SUPPORT void addPath(const QString &p) { setPath(path() + QLatin1Char('/') + p); } - QT3_SUPPORT void setFileName(const QString &txt); - QT3_SUPPORT QString fileName() const; - QT3_SUPPORT QString dirPath() const; - static inline QT3_SUPPORT void decode(QString &url) - { - url = QUrl::fromPercentEncoding(url.toLatin1()); - } - static inline QT3_SUPPORT void encode(QString &url) - { - url = QString::fromLatin1(QUrl::toPercentEncoding(url).constData()); - } - inline QT3_SUPPORT operator QString() const { return toString(); } - inline QT3_SUPPORT bool cdUp() - { - *this = resolved(QUrl(QLatin1String(".."))); - return true; - } - static inline QT3_SUPPORT bool isRelativeUrl(const QString &url) - { - return QUrl(url).isRelative(); - } -#endif - QString errorString() const; -protected: -#if defined (QT3_SUPPORT) - inline QT3_SUPPORT void reset() { clear(); } -#endif - private: QUrlPrivate *d; public: diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp index e00db5e01a..c134881f31 100644 --- a/src/corelib/kernel/qcoreapplication.cpp +++ b/src/corelib/kernel/qcoreapplication.cpp @@ -176,9 +176,6 @@ extern QString qAppFileName(); #endif int QCoreApplicationPrivate::app_compile_version = 0x040000; //we don't know exactly, but it's at least 4.0.0 -#if defined(QT3_SUPPORT) -bool QCoreApplicationPrivate::useQt3Support = true; -#endif #if !defined(Q_OS_WIN) #ifdef Q_OS_MAC @@ -337,9 +334,6 @@ QCoreApplicationPrivate::QCoreApplicationPrivate(int &aargc, char **aargv, uint in_exec(false), aboutToQuitEmitted(false), threadData_clean(false) { app_compile_version = flags & 0xffffff; -#if defined(QT3_SUPPORT) - useQt3Support = !(flags & 0x01000000); -#endif static const char *const empty = ""; if (argc == 0 || argv == 0) { argc = 0; @@ -1261,20 +1255,7 @@ void QCoreApplication::postEvent(QObject *receiver, QEvent *event, int priority) // delete the event on exceptions to protect against memory leaks till the event is // properly owned in the postEventList QScopedPointer eventDeleter(event); - if (data->postEventList.isEmpty() || data->postEventList.last().priority >= priority) { - // optimization: we can simply append if the last event in - // the queue has higher or equal priority - data->postEventList.append(QPostEvent(receiver, event, priority)); - } else { - // insert event in descending priority order, using upper - // bound for a given priority (to ensure proper ordering - // of events with the same priority) - QPostEventList::iterator begin = data->postEventList.begin() - + data->postEventList.insertionOffset, - end = data->postEventList.end(); - QPostEventList::iterator at = qUpperBound(begin, end, priority); - data->postEventList.insert(at, QPostEvent(receiver, event, priority)); - } + data->postEventList.addEvent(QPostEvent(receiver, event, priority)); eventDeleter.take(); event->posted = true; ++receiver->d_func()->postedEvents; @@ -1372,20 +1353,6 @@ void QCoreApplicationPrivate::sendPostedEvents(QObject *receiver, int event_type ++data->postEventList.recursion; -#ifdef QT3_SUPPORT - if (event_type == QEvent::ChildInserted) { - if (receiver) { - // optimize sendPostedEvents(w, QEvent::ChildInserted) calls away - receiver->d_func()->sendPendingChildInsertedEvents(); - --data->postEventList.recursion; - return; - } - - // ChildInserted events are sent in response to *Request - event_type = QEvent::ChildInsertedRequest; - } -#endif - QMutexLocker locker(&data->postEventList.mutex); // by default, we assume that the event dispatcher can go to sleep after @@ -1434,7 +1401,7 @@ void QCoreApplicationPrivate::sendPostedEvents(QObject *receiver, int event_type // cannot send deferred delete if (!event_type && !receiver) { // don't lose the event - data->postEventList.append(pe); + data->postEventList.addEvent(pe); const_cast(pe).event = 0; } continue; @@ -1536,11 +1503,6 @@ void QCoreApplication::removePostedEvents(QObject *receiver) void QCoreApplication::removePostedEvents(QObject *receiver, int eventType) { -#ifdef QT3_SUPPORT - if (eventType == QEvent::ChildInserted) - eventType = QEvent::ChildInsertedRequest; -#endif - QThreadData *data = receiver ? receiver->d_func()->threadData : QThreadData::current(); QMutexLocker locker(&data->postEventList.mutex); @@ -1563,10 +1525,6 @@ void QCoreApplication::removePostedEvents(QObject *receiver, int eventType) if ((!receiver || pe.receiver == receiver) && (pe.event && (eventType == 0 || pe.event->type() == eventType))) { --pe.receiver->d_func()->postedEvents; -#ifdef QT3_SUPPORT - if (pe.event->type() == QEvent::ChildInsertedRequest) - pe.receiver->d_func()->pendingChildInsertedEvents.clear(); -#endif pe.event->posted = false; events.append(pe.event); const_cast(pe).event = 0; @@ -2558,109 +2516,6 @@ bool QCoreApplication::hasPendingEvents() return false; } -#ifdef QT3_SUPPORT -/*! \fn void QCoreApplication::lock() - - In Qt 3, this function locked the Qt library mutex, allowing - non-GUI threads to perform basic printing operations using - QPainter. - - In Qt 4, this is no longer supported, since painting is only - supported from within a paint event handler. This function does - nothing. - - \sa QWidget::paintEvent() -*/ - -/*! \fn void QCoreApplication::unlock(bool wakeUpGui) - - In Qt 3, this function unlocked the Qt library mutex. The mutex - allowed non-GUI threads to perform basic printing operations - using QPainter. - - In Qt 4, this is no longer supported, since painting is only - supported from within a paint event handler. This function does - nothing. -*/ - -/*! \fn bool QCoreApplication::locked() - - This function does nothing. It is there to keep old code working. - It always returns false. - - See lock() for details. -*/ - -/*! \fn bool QCoreApplication::tryLock() - - This function does nothing. It is there to keep old code working. - It always returns false. - - See lock() for details. -*/ - -/*! \fn void QCoreApplication::processOneEvent() - \obsolete - - Waits for an event to occur, processes it, then returns. - - This function is useful for adapting Qt to situations where the - event processing must be grafted onto existing program loops. - - Using this function in new applications may be an indication of design - problems. - - \sa processEvents(), exec(), QTimer -*/ - -/*! \obsolete - - This function enters the main event loop (recursively). Do not call - it unless you really know what you are doing. -*/ -int QCoreApplication::enter_loop() -{ - if (!QCoreApplicationPrivate::checkInstance("enter_loop")) - return -1; - if (QThreadData::current() != self->d_func()->threadData) { - qWarning("QCoreApplication::enter_loop: Must be called from the main thread"); - return -1; - } - QEventLoop eventLoop; - int returnCode = eventLoop.exec(); - return returnCode; -} - -/*! \obsolete - - This function exits from a recursive call to the main event loop. - Do not call it unless you are an expert. -*/ -void QCoreApplication::exit_loop() -{ - if (!QCoreApplicationPrivate::checkInstance("exit_loop")) - return; - QThreadData *data = QThreadData::current(); - if (data != self->d_func()->threadData) { - qWarning("QCoreApplication::exit_loop: Must be called from the main thread"); - return; - } - if (!data->eventLoops.isEmpty()) - data->eventLoops.top()->exit(); -} - -/*! \obsolete - - Returns the current loop level. -*/ -int QCoreApplication::loopLevel() -{ - if (!QCoreApplicationPrivate::checkInstance("loopLevel")) - return -1; - return self->d_func()->threadData->eventLoops.size(); -} -#endif - /* \fn void QCoreApplication::watchUnixSignal(int signal, bool watch) \internal diff --git a/src/corelib/kernel/qcoreapplication.h b/src/corelib/kernel/qcoreapplication.h index c3d174d878..04d538d1b3 100644 --- a/src/corelib/kernel/qcoreapplication.h +++ b/src/corelib/kernel/qcoreapplication.h @@ -46,10 +46,6 @@ #include #include -#ifdef QT_INCLUDE_COMPAT -#include -#endif - #if defined(Q_OS_WIN) && !defined(tagMSG) typedef struct tagMSG MSG; #endif @@ -79,9 +75,6 @@ class Q_CORE_EXPORT QCoreApplication : public QObject Q_DECLARE_PRIVATE(QCoreApplication) public: enum { ApplicationFlags = QT_VERSION -#if !defined(QT3_SUPPORT) - | 0x01000000 -#endif }; QCoreApplication(int &argc, char **argv, int = ApplicationFlags); @@ -155,19 +148,6 @@ public: static void flush(); -#if defined(QT3_SUPPORT) - inline QT3_SUPPORT void lock() {} - inline QT3_SUPPORT void unlock(bool = true) {} - inline QT3_SUPPORT bool locked() { return false; } - inline QT3_SUPPORT bool tryLock() { return false; } - - static inline QT3_SUPPORT void processOneEvent() - { processEvents(QEventLoop::WaitForMoreEvents); } - static QT3_SUPPORT int enter_loop(); - static QT3_SUPPORT void exit_loop(); - static QT3_SUPPORT int loopLevel(); -#endif - #if defined(Q_OS_WIN) virtual bool winEventFilter(MSG *message, long *result); #endif diff --git a/src/corelib/kernel/qcoreapplication_p.h b/src/corelib/kernel/qcoreapplication_p.h index 22585a1ce9..62026141a1 100644 --- a/src/corelib/kernel/qcoreapplication_p.h +++ b/src/corelib/kernel/qcoreapplication_p.h @@ -141,9 +141,6 @@ public: static uint attribs; static inline bool testAttribute(uint flag) { return attribs & (1 << flag); } static int app_compile_version; -#if defined(QT3_SUPPORT) - static bool useQt3Support; -#endif static QSettings *trolltechConf(); }; diff --git a/src/corelib/kernel/qcoreevent.cpp b/src/corelib/kernel/qcoreevent.cpp index 49c6da42c6..0c3a3b8777 100644 --- a/src/corelib/kernel/qcoreevent.cpp +++ b/src/corelib/kernel/qcoreevent.cpp @@ -505,65 +505,6 @@ QChildEvent::~QChildEvent() false. */ -/*! - \class QCustomEvent - \brief The QCustomEvent class provides support for custom events. - - \compat - - QCustomEvent has a \c{void *} that can be used to store custom - data. - - In Qt 3, QObject::customEvent() took a QCustomEvent pointer. We - found out that this approach was unsatisfactory, because - there was often no safe way of deleting the data held in the - \c{void *}. - - In Qt 4, QObject::customEvent() takes a plain QEvent pointer. - You can add custom data by subclassing. - - \sa QObject::customEvent(), QCoreApplication::notify() -*/ - -/*! - \fn QCustomEvent::QCustomEvent(int type, void *data) - - Constructs a custom event object with the event \a type and a - pointer to \a data. The value of \a type must be at least as - large as QEvent::User. By default, the data pointer is set to 0. -*/ -#ifdef QT3_SUPPORT -QCustomEvent::QCustomEvent(int type, void *data) - : QEvent(static_cast(type)) -{ - d = reinterpret_cast(data); -} - -/*! \internal -*/ -QCustomEvent::~QCustomEvent() -{ -} -#endif -/*! - \fn void QCustomEvent::setData(void *data) - - \compat - - Sets the generic data pointer to \a data. - - \sa data() -*/ - -/*! - \fn void *QCustomEvent::data() const - - \compat - - Returns a pointer to the generic event data. - - \sa setData() -*/ /*! \fn bool QChildEvent::inserted() const diff --git a/src/corelib/kernel/qcoreevent.h b/src/corelib/kernel/qcoreevent.h index 791b207dea..831a403975 100644 --- a/src/corelib/kernel/qcoreevent.h +++ b/src/corelib/kernel/qcoreevent.h @@ -89,9 +89,6 @@ public: Quit = 20, // request to quit application ParentChange = 21, // widget has been reparented ParentAboutToChange = 131, // sent just before the parent change is done -#ifdef QT3_SUPPORT - Reparent = ParentChange, -#endif ThreadChange = 22, // object has changed threads WindowActivate = 24, // window was activated WindowDeactivate = 25, // window was deactivated @@ -118,11 +115,6 @@ public: DragResponse = 64, // drag accepted/rejected ChildAdded = 68, // new child widget ChildPolished = 69, // polished child widget -#ifdef QT3_SUPPORT - ChildInsertedRequest = 67, // send ChildInserted compatibility events to receiver - ChildInserted = 70, // compatibility child inserted - LayoutHint = 72, // compatibility relayout request -#endif ChildRemoved = 71, // deleted child widget ShowWindowRequest = 73, // widget's window should be mapped PolishRequest = 74, // widget should be polished @@ -174,18 +166,8 @@ public: Shortcut = 117, // shortcut triggered ShortcutOverride = 51, // shortcut override request -#ifdef QT3_SUPPORT - Accel = 30, // accelerator event - AccelAvailable = 32, // accelerator available event - AccelOverride = ShortcutOverride, // accelerator override event -#endif - WhatsThisClicked = 118, -#ifdef QT3_SUPPORT - CaptionChange = WindowTitleChange, - IconChange = WindowIconChange, -#endif ToolBarChange = 120, // toolbar visibility toggled ApplicationActivate = 121, // application has been changed to active @@ -297,6 +279,7 @@ public: Expose = 208, InputMethodQuery = 209, + OrientationChange = 210, // Screen orientation has changed // 512 reserved for Qt Jambi's MetaCall event // 513 reserved for Qt Jambi's DeleteOnMainThread event @@ -364,26 +347,12 @@ public: ~QChildEvent(); QObject *child() const { return c; } bool added() const { return type() == ChildAdded; } -#ifdef QT3_SUPPORT - QT3_SUPPORT bool inserted() const { return type() == ChildInserted; } -#endif bool polished() const { return type() == ChildPolished; } bool removed() const { return type() == ChildRemoved; } protected: QObject *c; }; -#ifdef QT3_SUPPORT -class Q_CORE_EXPORT QCustomEvent : public QEvent -{ -public: - QT3_SUPPORT_CONSTRUCTOR QCustomEvent(int type, void *data = 0); - ~QCustomEvent(); - QT3_SUPPORT void *data() const { return d; } - QT3_SUPPORT void setData(void* aData) { d = reinterpret_cast(aData); } -}; -#endif - class Q_CORE_EXPORT QDynamicPropertyChangeEvent : public QEvent { public: diff --git a/src/corelib/kernel/qeventloop.h b/src/corelib/kernel/qeventloop.h index 46ee118ce5..5bd4146352 100644 --- a/src/corelib/kernel/qeventloop.h +++ b/src/corelib/kernel/qeventloop.h @@ -66,10 +66,6 @@ public: ExcludeUserInputEvents = 0x01, ExcludeSocketNotifiers = 0x02, WaitForMoreEvents = 0x04, -#ifdef QT3_SUPPORT - ExcludeUserInput = ExcludeUserInputEvents, - WaitForMore = WaitForMoreEvents, -#endif X11ExcludeTimers = 0x08 #ifdef QT_DEPRECATED , DeferredDeletion = 0x10 diff --git a/src/corelib/kernel/qmetaobject.cpp b/src/corelib/kernel/qmetaobject.cpp index b4c37f4778..c8ac15c1fa 100644 --- a/src/corelib/kernel/qmetaobject.cpp +++ b/src/corelib/kernel/qmetaobject.cpp @@ -2283,11 +2283,7 @@ bool QMetaProperty::write(QObject *object, const QVariant &value) const QVariant v = value; uint t = QVariant::Invalid; if (isEnumType()) { - if (v.type() == QVariant::String -#ifdef QT3_SUPPORT - || v.type() == QVariant::CString -#endif - ) { + if (v.type() == QVariant::String) { if (isFlagType()) v = QVariant(menum.keysToValue(value.toByteArray())); else diff --git a/src/corelib/kernel/qmetatype.cpp b/src/corelib/kernel/qmetatype.cpp index e5ef021ed1..c97f9d260e 100644 --- a/src/corelib/kernel/qmetatype.cpp +++ b/src/corelib/kernel/qmetatype.cpp @@ -764,9 +764,6 @@ bool QMetaType::save(QDataStream &stream, int type, const void *data) case QMetaType::QEasingCurve: stream << *static_cast(data); break; -#endif -#ifdef QT3_SUPPORT - case QMetaType::QColorGroup: #endif case QMetaType::QFont: case QMetaType::QPixmap: @@ -973,9 +970,6 @@ bool QMetaType::load(QDataStream &stream, int type, void *data) case QMetaType::QEasingCurve: stream >> *static_cast< NS(QEasingCurve)*>(data); break; -#endif -#ifdef QT3_SUPPORT - case QMetaType::QColorGroup: #endif case QMetaType::QFont: case QMetaType::QPixmap: diff --git a/src/corelib/kernel/qmetatype.h b/src/corelib/kernel/qmetatype.h index da59a8fa2b..5df7658a13 100644 --- a/src/corelib/kernel/qmetatype.h +++ b/src/corelib/kernel/qmetatype.h @@ -72,6 +72,7 @@ public: QVariantHash = 28, QEasingCurve = 29, LastCoreType = QEasingCurve, FirstGuiType = 64 /* QFont */, + QFont = 64, QPixmap = 65, QBrush = 66, QColor = 67, QPalette = 68, QImage = 69, QPolygon = 70, QRegion = 71, QBitmap = 72, QCursor = 73, QKeySequence = 74, QPen = 75, @@ -314,9 +315,6 @@ class QEasingCurve; class QWidget; class QObject; -#ifdef QT3_SUPPORT -class QColorGroup; -#endif class QFont; class QPixmap; class QBrush; @@ -384,9 +382,6 @@ Q_DECLARE_BUILTIN_METATYPE(QRegExp, QRegExp) #endif Q_DECLARE_BUILTIN_METATYPE(QEasingCurve, QEasingCurve) -#ifdef QT3_SUPPORT -Q_DECLARE_BUILTIN_METATYPE(QColorGroup, QColorGroup) -#endif Q_DECLARE_BUILTIN_METATYPE(QFont, QFont) Q_DECLARE_BUILTIN_METATYPE(QPixmap, QPixmap) Q_DECLARE_BUILTIN_METATYPE(QBrush, QBrush) diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp index a958efd64f..d573741654 100644 --- a/src/corelib/kernel/qobject.cpp +++ b/src/corelib/kernel/qobject.cpp @@ -203,22 +203,6 @@ void QObjectPrivate::resetDeleteWatch(QObjectPrivate *d, int *oldWatch, int dele } #endif -#ifdef QT3_SUPPORT -void QObjectPrivate::sendPendingChildInsertedEvents() -{ - Q_Q(QObject); - for (int i = 0; i < pendingChildInsertedEvents.size(); ++i) { - QObject *c = pendingChildInsertedEvents.at(i).data(); - if (!c || c->parent() != q) - continue; - QChildEvent childEvent(QEvent::ChildInserted, c); - QCoreApplication::sendEvent(q, &childEvent); - } - pendingChildInsertedEvents.clear(); -} - -#endif - /*!\internal For a given metaobject, compute the signal offset, and the method offset (including signals) @@ -737,29 +721,6 @@ QObject::QObject(QObject *parent) qt_addObject(this); } -#ifdef QT3_SUPPORT -/*! - \overload QObject() - \obsolete - - Creates a new QObject with the given \a parent and object \a name. - */ -QObject::QObject(QObject *parent, const char *name) - : d_ptr(new QObjectPrivate) -{ - Q_D(QObject); - qt_addObject(d_ptr->q_ptr = this); - d->threadData = (parent && !parent->thread()) ? parent->d_func()->threadData : QThreadData::current(); - d->threadData->ref(); - if (parent) { - if (!check_parent_thread(parent, parent ? parent->d_func()->threadData : 0, d->threadData)) - parent = 0; - setParent(parent); - } - setObjectName(QString::fromAscii(name)); -} -#endif - /*! \internal */ QObject::QObject(QObjectPrivate &dd, QObject *parent) @@ -1079,56 +1040,6 @@ void QObject::setObjectName(const QString &name) d->declarativeData->objectNameChanged(d->declarativeData, this); } - -#ifdef QT3_SUPPORT -/*! \internal - QObject::child is compat but needs to call itself recursively, - that's why we need this helper. -*/ -static QObject *qChildHelper(const char *objName, const char *inheritsClass, - bool recursiveSearch, const QObjectList &children) -{ - if (children.isEmpty()) - return 0; - - bool onlyWidgets = (inheritsClass && qstrcmp(inheritsClass, "QWidget") == 0); - const QLatin1String oName(objName); - for (int i = 0; i < children.size(); ++i) { - QObject *obj = children.at(i); - if (onlyWidgets) { - if (obj->isWidgetType() && (!objName || obj->objectName() == oName)) - return obj; - } else if ((!inheritsClass || obj->inherits(inheritsClass)) - && (!objName || obj->objectName() == oName)) - return obj; - if (recursiveSearch && (obj = qChildHelper(objName, inheritsClass, - recursiveSearch, obj->children()))) - return obj; - } - return 0; -} - - -/*! - Searches the children and optionally grandchildren of this object, - and returns a child that is called \a objName that inherits \a - inheritsClass. If \a inheritsClass is 0 (the default), any class - matches. - - If \a recursiveSearch is true (the default), child() performs a - depth-first search of the object's children. - - If there is no such object, this function returns 0. If there are - more than one, the first one found is returned. -*/ -QObject* QObject::child(const char *objName, const char *inheritsClass, - bool recursiveSearch) const -{ - Q_D(const QObject); - return qChildHelper(objName, inheritsClass, recursiveSearch, d->children); -} -#endif - /*! \fn bool QObject::isWidgetType() const @@ -1157,17 +1068,8 @@ bool QObject::event(QEvent *e) timerEvent((QTimerEvent*)e); break; -#ifdef QT3_SUPPORT - case QEvent::ChildInsertedRequest: - d_func()->sendPendingChildInsertedEvents(); - break; -#endif - case QEvent::ChildAdded: case QEvent::ChildPolished: -#ifdef QT3_SUPPORT - case QEvent::ChildInserted: -#endif case QEvent::ChildRemoved: childEvent((QChildEvent*)e); break; @@ -1483,7 +1385,7 @@ void QObjectPrivate::setThreadData_helper(QThreadData *currentData, QThreadData continue; if (pe.receiver == q) { // move this post event to the targetList - targetData->postEventList.append(pe); + targetData->postEventList.addEvent(pe); const_cast(pe).event = 0; ++eventsMoved; } @@ -1636,102 +1538,6 @@ void QObject::killTimer(int id) \sa findChild(), findChildren(), parent(), setParent() */ -#ifdef QT3_SUPPORT -static void objSearch(QObjectList &result, - const QObjectList &list, - const char *inheritsClass, - bool onlyWidgets, - const char *objName, - QRegExp *rx, - bool recurse) -{ - for (int i = 0; i < list.size(); ++i) { - QObject *obj = list.at(i); - if (!obj) - continue; - bool ok = true; - if (onlyWidgets) - ok = obj->isWidgetType(); - else if (inheritsClass && !obj->inherits(inheritsClass)) - ok = false; - if (ok) { - if (objName) - ok = (obj->objectName() == QLatin1String(objName)); -#ifndef QT_NO_REGEXP - else if (rx) - ok = (rx->indexIn(obj->objectName()) != -1); -#endif - } - if (ok) // match! - result.append(obj); - if (recurse) { - QObjectList clist = obj->children(); - if (!clist.isEmpty()) - objSearch(result, clist, inheritsClass, - onlyWidgets, objName, rx, recurse); - } - } -} - -/*! - \internal - - Searches the children and optionally grandchildren of this object, - and returns a list of those objects that are named or that match - \a objName and inherit \a inheritsClass. If \a inheritsClass is 0 - (the default), all classes match. If \a objName is 0 (the - default), all object names match. - - If \a regexpMatch is true (the default), \a objName is a regular - expression that the objects's names must match. The syntax is that - of a QRegExp. If \a regexpMatch is false, \a objName is a string - and object names must match it exactly. - - Note that \a inheritsClass uses single inheritance from QObject, - the way inherits() does. According to inherits(), QWidget - inherits QObject but not QPaintDevice. This does not quite match - reality, but is the best that can be done on the wide variety of - compilers Qt supports. - - Finally, if \a recursiveSearch is true (the default), queryList() - searches \e{n}th-generation as well as first-generation children. - - If all this seems a bit complex for your needs, the simpler - child() function may be what you want. - - This somewhat contrived example disables all the buttons in this - window: - - \snippet doc/src/snippets/code/src_corelib_kernel_qobject.cpp 9 - - \warning Delete the list as soon you have finished using it. The - list contains pointers that may become invalid at almost any time - without notice (as soon as the user closes a window you may have - dangling pointers, for example). - - \sa child() children(), parent(), inherits(), objectName(), QRegExp -*/ - -QObjectList QObject::queryList(const char *inheritsClass, - const char *objName, - bool regexpMatch, - bool recursiveSearch) const -{ - Q_D(const QObject); - QObjectList list; - bool onlyWidgets = (inheritsClass && qstrcmp(inheritsClass, "QWidget") == 0); -#ifndef QT_NO_REGEXP - if (regexpMatch && objName) { // regexp matching - QRegExp rx(QString::fromLatin1(objName)); - objSearch(list, d->children, inheritsClass, onlyWidgets, 0, &rx, recursiveSearch); - } else -#endif - { - objSearch(list, d->children, inheritsClass, onlyWidgets, objName, 0, recursiveSearch); - } - return list; -} -#endif /*! \fn T *QObject::findChild(const QString &name) const @@ -1949,16 +1755,6 @@ void QObjectPrivate::setParent_helper(QObject *o) if (!isWidget) { QChildEvent e(QEvent::ChildAdded, q); QCoreApplication::sendEvent(parent, &e); -#ifdef QT3_SUPPORT - if (QCoreApplicationPrivate::useQt3Support) { - if (parent->d_func()->pendingChildInsertedEvents.isEmpty()) { - QCoreApplication::postEvent(parent, - new QEvent(QEvent::ChildInsertedRequest), - Qt::HighEventPriority); - } - parent->d_func()->pendingChildInsertedEvents.append(q); - } -#endif } } } @@ -2940,7 +2736,7 @@ bool QObject::disconnect(const QObject *sender, const char *signal, \a receiver. Returns true if the connection is successfully broken; otherwise returns false. - This function provides the same posibilities like + This function provides the same possibilities like disconnect(const QObject *sender, const char *signal, const QObject *receiver, const char *method) but uses QMetaMethod to represent the signal and the method to be disconnected. @@ -2958,7 +2754,7 @@ bool QObject::disconnect(const QObject *sender, const char *signal, QMetaMethod() may be used as wildcard in the meaning "any signal" or "any slot in receiving object". In the same way 0 can be used for \a receiver in the meaning "any receiving object". In this case - method shoud also be QMetaMethod(). \a sender parameter should be never 0. + method should also be QMetaMethod(). \a sender parameter should be never 0. \sa disconnect(const QObject *sender, const char *signal, const QObject *receiver, const char *method) */ diff --git a/src/corelib/kernel/qobject.h b/src/corelib/kernel/qobject.h index 0fa28c0e63..1c367eb8d1 100644 --- a/src/corelib/kernel/qobject.h +++ b/src/corelib/kernel/qobject.h @@ -188,14 +188,6 @@ public: } #endif -#ifdef QT3_SUPPORT - QT3_SUPPORT QObject *child(const char *objName, const char *inheritsClass = 0, - bool recursiveSearch = true) const; - QT3_SUPPORT QObjectList queryList(const char *inheritsClass = 0, - const char *objName = 0, - bool regexpMatch = true, - bool recursiveSearch = true) const; -#endif inline const QObjectList &children() const { return d_ptr->children; } void setParent(QObject *); @@ -204,44 +196,14 @@ public: static bool connect(const QObject *sender, const char *signal, - const QObject *receiver, const char *member, Qt::ConnectionType = -#ifdef qdoc - Qt::AutoConnection -#else -#ifdef QT3_SUPPORT - Qt::AutoCompatConnection -#else - Qt::AutoConnection -#endif -#endif - ); + const QObject *receiver, const char *member, Qt::ConnectionType = Qt::AutoConnection); static bool connect(const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, - Qt::ConnectionType type = -#ifdef qdoc - Qt::AutoConnection -#else -#ifdef QT3_SUPPORT - Qt::AutoCompatConnection -#else - Qt::AutoConnection -#endif -#endif - ); + Qt::ConnectionType type = Qt::AutoConnection); inline bool connect(const QObject *sender, const char *signal, - const char *member, Qt::ConnectionType type = -#ifdef qdoc - Qt::AutoConnection -#else -#ifdef QT3_SUPPORT - Qt::AutoCompatConnection -#else - Qt::AutoConnection -#endif -#endif - ) const; + const char *member, Qt::ConnectionType type = Qt::AutoConnection) const; static bool disconnect(const QObject *sender, const char *signal, const QObject *receiver, const char *member); @@ -292,29 +254,6 @@ protected: virtual void connectNotify(const char *signal); virtual void disconnectNotify(const char *signal); -#ifdef QT3_SUPPORT -public: - QT3_SUPPORT_CONSTRUCTOR QObject(QObject *parent, const char *name); - inline QT3_SUPPORT void insertChild(QObject *o) - { if (o) o->setParent(this); } - inline QT3_SUPPORT void removeChild(QObject *o) - { if (o) o->setParent(0); } - inline QT3_SUPPORT bool isA(const char *classname) const - { return qstrcmp(classname, metaObject()->className()) == 0; } - inline QT3_SUPPORT const char *className() const { return metaObject()->className(); } - inline QT3_SUPPORT const char *name() const { return objectName().latin1_helper(); } - inline QT3_SUPPORT const char *name(const char *defaultName) const - { QString s = objectName(); return s.isEmpty()?defaultName:s.latin1_helper(); } - inline QT3_SUPPORT void setName(const char *aName) { setObjectName(QLatin1String(aName)); } -protected: - inline QT3_SUPPORT bool checkConnectArgs(const char *signal, - const QObject *, - const char *member) - { return QMetaObject::checkConnectArgs(signal, member); } - static inline QT3_SUPPORT QByteArray normalizeSignalSlot(const char *signalSlot) - { return QMetaObject::normalizedSignature(signalSlot); } -#endif - protected: QObject(QObjectPrivate &dd, QObject *parent = 0); diff --git a/src/corelib/kernel/qobject_p.h b/src/corelib/kernel/qobject_p.h index 3968a31bb8..9151e8eb7b 100644 --- a/src/corelib/kernel/qobject_p.h +++ b/src/corelib/kernel/qobject_p.h @@ -157,10 +157,6 @@ public: void addConnection(int signal, Connection *c); void cleanConnectionLists(); -#ifdef QT3_SUPPORT - void sendPendingChildInsertedEvents(); -#endif - static inline Sender *setCurrentSender(QObject *receiver, Sender *sender); static inline void resetCurrentSender(QObject *receiver, @@ -190,14 +186,6 @@ public: Sender *currentSender; // object currently activating the object mutable quint32 connectedSignals[2]; -#ifdef QT3_SUPPORT - QVector< QWeakPointer > pendingChildInsertedEvents; -#else - // preserve binary compatibility with code compiled without Qt 3 support - // keeping the binary layout stable helps the Qt Creator debugger - void *unused; -#endif - QList > eventFilters; union { QObject *currentChildBeingDeleted; diff --git a/src/corelib/kernel/qobjectdefs.h b/src/corelib/kernel/qobjectdefs.h index efce4d5456..705956869d 100644 --- a/src/corelib/kernel/qobjectdefs.h +++ b/src/corelib/kernel/qobjectdefs.h @@ -83,9 +83,6 @@ class QString; #define Q_OVERRIDE(text) #define Q_ENUMS(x) #define Q_FLAGS(x) -#ifdef QT3_SUPPORT -# define Q_SETS(x) -#endif #define Q_SCRIPTABLE #define Q_INVOKABLE #define Q_SIGNAL @@ -188,9 +185,6 @@ private: #define Q_OVERRIDE(text) Q_OVERRIDE(text) #define Q_ENUMS(x) Q_ENUMS(x) #define Q_FLAGS(x) Q_FLAGS(x) -#ifdef QT3_SUPPORT -# define Q_SETS(x) Q_SETS(x) -#endif /* tmake ignore Q_OBJECT */ #define Q_OBJECT Q_OBJECT /* tmake ignore Q_OBJECT */ @@ -233,12 +227,6 @@ Q_CORE_EXPORT const char *qFlagLocation(const char *method); # define SIGNAL(a) "2"#a #endif -#ifdef QT3_SUPPORT -#define METHOD_CODE 0 // member type codes -#define SLOT_CODE 1 -#define SIGNAL_CODE 2 -#endif - #define QMETHOD_CODE 0 // member type codes #define QSLOT_CODE 1 #define QSIGNAL_CODE 2 @@ -461,10 +449,6 @@ struct Q_CORE_EXPORT QMetaObject int static_metacall(Call, int, void **) const; static int metacall(QObject *, Call, int, void **); -#ifdef QT3_SUPPORT - QT3_SUPPORT const char *superClassName() const; -#endif - struct { // private data const QMetaObject *superdata; const char *stringdata; @@ -494,11 +478,6 @@ inline const char *QMetaObject::className() const inline const QMetaObject *QMetaObject::superClass() const { return d.superdata; } -#ifdef QT3_SUPPORT -inline const char *QMetaObject::superClassName() const -{ return d.superdata ? d.superdata->className() : 0; } -#endif - QT_END_NAMESPACE QT_END_HEADER diff --git a/src/corelib/kernel/qsignalmapper.cpp b/src/corelib/kernel/qsignalmapper.cpp index 2306450300..665b9e22b5 100644 --- a/src/corelib/kernel/qsignalmapper.cpp +++ b/src/corelib/kernel/qsignalmapper.cpp @@ -121,18 +121,6 @@ QSignalMapper::QSignalMapper(QObject* parent) { } -#ifdef QT3_SUPPORT -/*! - \overload QSignalMapper() - \obsolete - */ -QSignalMapper::QSignalMapper(QObject *parent, const char *name) - : QObject(*new QSignalMapperPrivate, parent) -{ - setObjectName(QString::fromAscii(name)); -} -#endif - /*! Destroys the QSignalMapper. */ diff --git a/src/corelib/kernel/qsignalmapper.h b/src/corelib/kernel/qsignalmapper.h index c28b9df319..72593679a9 100644 --- a/src/corelib/kernel/qsignalmapper.h +++ b/src/corelib/kernel/qsignalmapper.h @@ -85,11 +85,6 @@ public Q_SLOTS: private: Q_DISABLE_COPY(QSignalMapper) Q_PRIVATE_SLOT(d_func(), void _q_senderDestroyed()) - -#ifdef QT3_SUPPORT -public: - QT3_SUPPORT_CONSTRUCTOR QSignalMapper(QObject *parent, const char *name); -#endif }; #endif // QT_NO_SIGNALMAPPER diff --git a/src/corelib/kernel/qsocketnotifier.cpp b/src/corelib/kernel/qsocketnotifier.cpp index d59838ba23..5e99d1d483 100644 --- a/src/corelib/kernel/qsocketnotifier.cpp +++ b/src/corelib/kernel/qsocketnotifier.cpp @@ -185,40 +185,6 @@ QSocketNotifier::QSocketNotifier(int socket, Type type, QObject *parent) } } -#ifdef QT3_SUPPORT -/*! - \obsolete - - Use the QSocketNotifier() constructor combined with the - QObject::setObjectName() function instead. - - \oldcode - QSocketNotifier *notifier = new QSocketNotifier(socket, type, parent, name); - \newcode - QSocketNotifier *notifier = new QSocketNotifier(socket, type, parent); - notifier->setObjectName(name); - \endcode -*/ - -QSocketNotifier::QSocketNotifier(int socket, Type type, QObject *parent, - const char *name) - : QObject(parent) -{ - setObjectName(QString::fromAscii(name)); - if (socket < 0) - qWarning("QSocketNotifier: Invalid socket specified"); - sockfd = socket; - sntype = type; - snenabled = true; - - Q_D(QObject); - if (!d->threadData->eventDispatcher) { - qWarning("QSocketNotifier: Can only be used with threads started with QThread"); - } else { - d->threadData->eventDispatcher->registerSocketNotifier(this); - } -} -#endif /*! Destroys this socket notifier. */ diff --git a/src/corelib/kernel/qsocketnotifier.h b/src/corelib/kernel/qsocketnotifier.h index 4390d17c62..07dc129825 100644 --- a/src/corelib/kernel/qsocketnotifier.h +++ b/src/corelib/kernel/qsocketnotifier.h @@ -59,9 +59,6 @@ public: enum Type { Read, Write, Exception }; QSocketNotifier(int socket, Type, QObject *parent = 0); -#ifdef QT3_SUPPORT - QT3_SUPPORT_CONSTRUCTOR QSocketNotifier(int socket, Type, QObject *parent, const char *name); -#endif ~QSocketNotifier(); inline int socket() const { return sockfd; } diff --git a/src/corelib/kernel/qtimer.cpp b/src/corelib/kernel/qtimer.cpp index 0edcb3b3ac..5870885c63 100644 --- a/src/corelib/kernel/qtimer.cpp +++ b/src/corelib/kernel/qtimer.cpp @@ -147,18 +147,6 @@ QTimer::QTimer(QObject *parent) } -#ifdef QT3_SUPPORT -/*! - Constructs a timer called \a name, with a \a parent. -*/ - -QTimer::QTimer(QObject *parent, const char *name) - : QObject(parent), id(INV_TIMER), single(0), nulltimer(0) -{ - setObjectName(QString::fromAscii(name)); -} -#endif - /*! Destroys the timer. */ @@ -235,24 +223,6 @@ void QTimer::start(int msec) } -#ifdef QT3_SUPPORT -/*! \overload start() - - Call setSingleShot(\a sshot) and start(\a msec) instead. -*/ - -int QTimer::start(int msec, bool sshot) -{ - if (id >=0 && nulltimer && !msec && sshot) - return id; - stop(); - setInterval(msec); - setSingleShot(sshot); - start(); - return timerId(); -} -#endif - /*! Stops the timer. diff --git a/src/corelib/kernel/qtimer.h b/src/corelib/kernel/qtimer.h index 02f6ba455b..707bc83d3c 100644 --- a/src/corelib/kernel/qtimer.h +++ b/src/corelib/kernel/qtimer.h @@ -61,9 +61,6 @@ class Q_CORE_EXPORT QTimer : public QObject Q_PROPERTY(bool active READ isActive) public: explicit QTimer(QObject *parent = 0); -#ifdef QT3_SUPPORT - QT3_SUPPORT_CONSTRUCTOR QTimer(QObject *parent, const char *name); -#endif ~QTimer(); inline bool isActive() const { return id >= 0; } @@ -83,11 +80,6 @@ public Q_SLOTS: void start(); void stop(); -#ifdef QT3_SUPPORT - inline QT_MOC_COMPAT void changeInterval(int msec) { start(msec); } - QT_MOC_COMPAT int start(int msec, bool sshot); -#endif - Q_SIGNALS: void timeout(); diff --git a/src/corelib/kernel/qtranslator.cpp b/src/corelib/kernel/qtranslator.cpp index d2554229e2..1b3e06dd69 100644 --- a/src/corelib/kernel/qtranslator.cpp +++ b/src/corelib/kernel/qtranslator.cpp @@ -332,18 +332,6 @@ QTranslator::QTranslator(QObject * parent) { } -#ifdef QT3_SUPPORT -/*! - \overload QTranslator() - \obsolete - */ -QTranslator::QTranslator(QObject * parent, const char * name) - : QObject(*new QTranslatorPrivate, parent) -{ - setObjectName(QString::fromAscii(name)); -} -#endif - /*! Destroys the object and frees any allocated resources. */ diff --git a/src/corelib/kernel/qtranslator.h b/src/corelib/kernel/qtranslator.h index 495137c4cd..0a9bbde953 100644 --- a/src/corelib/kernel/qtranslator.h +++ b/src/corelib/kernel/qtranslator.h @@ -61,9 +61,6 @@ class Q_CORE_EXPORT QTranslator : public QObject Q_OBJECT public: explicit QTranslator(QObject *parent = 0); -#ifdef QT3_SUPPORT - QT3_SUPPORT_CONSTRUCTOR QTranslator(QObject * parent, const char * name); -#endif ~QTranslator(); // ### Qt 5: Merge (with "int n = -1") @@ -85,11 +82,6 @@ public: const QString & suffix = QString()); bool load(const uchar *data, int len); -#ifdef QT3_SUPPORT - QT3_SUPPORT QString find(const char *context, const char *sourceText, const char * comment = 0) const - { return translate(context, sourceText, comment); } -#endif - private: Q_DISABLE_COPY(QTranslator) Q_DECLARE_PRIVATE(QTranslator) diff --git a/src/corelib/kernel/qvariant.cpp b/src/corelib/kernel/qvariant.cpp index 7f750b38f2..01e12ee968 100644 --- a/src/corelib/kernel/qvariant.cpp +++ b/src/corelib/kernel/qvariant.cpp @@ -2886,21 +2886,6 @@ void* QVariant::data() } -#ifdef QT3_SUPPORT -/*! \internal - */ -void *QVariant::castOrDetach(Type t) -{ - if (d.type != uint(t)) { - if (!convert(t)) - create(t, 0); - } else { - detach(); - } - return data(); -} -#endif - /*! Returns true if this is a NULL variant, false otherwise. */ diff --git a/src/corelib/kernel/qvariant.h b/src/corelib/kernel/qvariant.h index 6aa0fabc2c..e77fc90b92 100644 --- a/src/corelib/kernel/qvariant.h +++ b/src/corelib/kernel/qvariant.h @@ -226,13 +226,6 @@ class Q_CORE_EXPORT QVariant bool canConvert(Type t) const; bool convert(Type t); -#ifdef QT3_SUPPORT - inline QT3_SUPPORT bool canCast(Type t) const - { return canConvert(t); } - inline QT3_SUPPORT bool cast(Type t) - { return convert(t); } -#endif - inline bool isValid() const; bool isNull() const; @@ -280,27 +273,6 @@ class Q_CORE_EXPORT QVariant QEasingCurve toEasingCurve() const; #endif -#ifdef QT3_SUPPORT - inline QT3_SUPPORT int &asInt(); - inline QT3_SUPPORT uint &asUInt(); - inline QT3_SUPPORT qlonglong &asLongLong(); - inline QT3_SUPPORT qulonglong &asULongLong(); - inline QT3_SUPPORT bool &asBool(); - inline QT3_SUPPORT double &asDouble(); - inline QT3_SUPPORT QByteArray &asByteArray(); - inline QT3_SUPPORT QBitArray &asBitArray(); - inline QT3_SUPPORT QString &asString(); - inline QT3_SUPPORT QStringList &asStringList(); - inline QT3_SUPPORT QDate &asDate(); - inline QT3_SUPPORT QTime &asTime(); - inline QT3_SUPPORT QDateTime &asDateTime(); - inline QT3_SUPPORT QList &asList(); - inline QT3_SUPPORT QMap &asMap(); - inline QT3_SUPPORT QPoint &asPoint(); - inline QT3_SUPPORT QRect &asRect(); - inline QT3_SUPPORT QSize &asSize(); -#endif //QT3_SUPPORT - #ifndef QT_NO_DATASTREAM void load(QDataStream &ds); void save(QDataStream &ds) const; @@ -308,12 +280,6 @@ class Q_CORE_EXPORT QVariant static const char *typeToName(Type type); static Type nameToType(const char *name); -#ifdef QT3_SUPPORT - inline QT3_SUPPORT_CONSTRUCTOR QVariant(bool val, int) { create(Bool, &val); } - inline QT3_SUPPORT const QByteArray toCString() const { return toByteArray(); } - inline QT3_SUPPORT QByteArray &asCString() { return *reinterpret_cast(castOrDetach(ByteArray)); } -#endif - void *data(); const void *constData() const; inline const void *data() const { return constData(); } @@ -412,9 +378,6 @@ protected: static const Handler *handler; void create(int type, const void *copy); -#ifdef QT3_SUPPORT - void *castOrDetach(Type t); -#endif bool cmp(const QVariant &other) const; private: @@ -424,10 +387,6 @@ private: // force compile error when implicit conversion is not wanted inline QVariant(const char *) { Q_ASSERT(false); } #endif -#ifndef QT3_SUPPORT - // force compile error, prevent QVariant(QVariant::Type, int) to be called - inline QVariant(bool, int) { Q_ASSERT(false); } -#endif public: typedef Private DataPtr; inline DataPtr &data_ptr() { return d; } @@ -477,45 +436,6 @@ inline void qVariantSetValue(QVariant &v, const QVariant &t) inline QVariant::QVariant() {} inline bool QVariant::isValid() const { return d.type != Invalid; } -#ifdef QT3_SUPPORT -inline int &QVariant::asInt() -{ return *reinterpret_cast(castOrDetach(Int)); } -inline uint &QVariant::asUInt() -{ return *reinterpret_cast(castOrDetach(UInt)); } -inline qlonglong &QVariant::asLongLong() -{ return *reinterpret_cast(castOrDetach(LongLong)); } -inline qulonglong &QVariant::asULongLong() -{ return *reinterpret_cast(castOrDetach(ULongLong)); } -inline bool &QVariant::asBool() -{ return *reinterpret_cast(castOrDetach(Bool)); } -inline double &QVariant::asDouble() -{ return *reinterpret_cast(castOrDetach(Double)); } -inline QByteArray& QVariant::asByteArray() -{ return *reinterpret_cast(castOrDetach(ByteArray)); } -inline QBitArray& QVariant::asBitArray() -{ return *reinterpret_cast(castOrDetach(BitArray)); } -inline QString& QVariant::asString() -{ return *reinterpret_cast(castOrDetach(String)); } -inline QStringList& QVariant::asStringList() -{ return *reinterpret_cast(castOrDetach(StringList)); } -inline QDate& QVariant::asDate() -{ return *reinterpret_cast(castOrDetach(Date)); } -inline QTime& QVariant::asTime() -{ return *reinterpret_cast(castOrDetach(Time)); } -inline QDateTime& QVariant::asDateTime() -{ return *reinterpret_cast(castOrDetach(DateTime)); } -inline QList& QVariant::asList() -{ return *reinterpret_cast *>(castOrDetach(List)); } -inline QMap& QVariant::asMap() -{ return *reinterpret_cast *>(castOrDetach(Map)); } -inline QPoint &QVariant::asPoint() -{ return *reinterpret_cast(castOrDetach(Point)); } -inline QRect &QVariant::asRect() -{ return *reinterpret_cast(castOrDetach(Rect)); } -inline QSize &QVariant::asSize() -{ return *reinterpret_cast(castOrDetach(Size)); } -#endif //QT3_SUPPORT - template inline void QVariant::setValue(const T &avalue) { qVariantSetValue(*this, avalue); } diff --git a/src/corelib/plugin/qlibrary.h b/src/corelib/plugin/qlibrary.h index 72ba054ec7..0154e949b3 100644 --- a/src/corelib/plugin/qlibrary.h +++ b/src/corelib/plugin/qlibrary.h @@ -99,10 +99,6 @@ public: void setLoadHints(LoadHints hints); LoadHints loadHints() const; -#ifdef QT3_SUPPORT - inline QT3_SUPPORT QString library() const { return fileName(); } - inline QT3_SUPPORT void setAutoUnload( bool ) {} -#endif private: QLibraryPrivate *d; bool did_load; diff --git a/src/corelib/thread/qmutex.h b/src/corelib/thread/qmutex.h index 0f3a72d43f..cc667560db 100644 --- a/src/corelib/thread/qmutex.h +++ b/src/corelib/thread/qmutex.h @@ -76,20 +76,6 @@ public: void unlock(); //### Qt5: make inline; inline void unlockInline(); -#if defined(QT3_SUPPORT) - inline QT3_SUPPORT bool locked() - { - if (!tryLock()) - return true; - unlock(); - return false; - } - inline QT3_SUPPORT_CONSTRUCTOR QMutex(bool recursive) - { - new (this) QMutex(recursive ? Recursive : NonRecursive); - } -#endif - private: void lockInternal(); void unlockInternal(); @@ -217,10 +203,6 @@ public: static inline void unlock() {} static inline void unlockInline() {} -#if defined(QT3_SUPPORT) - static inline QT3_SUPPORT bool locked() { return false; } -#endif - private: Q_DISABLE_COPY(QMutex) }; diff --git a/src/corelib/thread/qthread.h b/src/corelib/thread/qthread.h index 878a13c882..bc529fd53b 100644 --- a/src/corelib/thread/qthread.h +++ b/src/corelib/thread/qthread.h @@ -116,12 +116,6 @@ protected: static void msleep(unsigned long); static void usleep(unsigned long); -#ifdef QT3_SUPPORT -public: - inline QT3_SUPPORT bool finished() const { return isFinished(); } - inline QT3_SUPPORT bool running() const { return isRunning(); } -#endif - protected: QThread(QThreadPrivate &dd, QObject *parent = 0); diff --git a/src/corelib/thread/qthread_p.h b/src/corelib/thread/qthread_p.h index 13df3e6fea..461d93dd50 100644 --- a/src/corelib/thread/qthread_p.h +++ b/src/corelib/thread/qthread_p.h @@ -93,6 +93,8 @@ inline bool operator<(const QPostEvent &pe, int priority) return priority < pe.priority; } +// This class holds the list of posted events. +// The list has to be kept sorted by priority class QPostEventList : public QList { public: @@ -109,6 +111,25 @@ public: inline QPostEventList() : QList(), recursion(0), startOffset(0), insertionOffset(0) { } + + void addEvent(const QPostEvent &ev) { + int priority = ev.priority; + if (isEmpty() || last().priority >= priority) { + // optimization: we can simply append if the last event in + // the queue has higher or equal priority + append(ev); + } else { + // insert event in descending priority order, using upper + // bound for a given priority (to ensure proper ordering + // of events with the same priority) + QPostEventList::iterator at = qUpperBound(begin() + insertionOffset, end(), priority); + insert(at, ev); + } + } +private: + //hides because they do not keep that list sorted. addEvent must be used + using QList::append; + using QList::insert; }; #ifndef QT_NO_THREAD diff --git a/src/corelib/tools/qbytearray.h b/src/corelib/tools/qbytearray.h index 2cb79c3f51..9f54f1a831 100644 --- a/src/corelib/tools/qbytearray.h +++ b/src/corelib/tools/qbytearray.h @@ -110,19 +110,6 @@ Q_CORE_EXPORT int qstrnicmp(const char *, const char *, uint len); Q_CORE_EXPORT int qvsnprintf(char *str, size_t n, const char *fmt, va_list ap); Q_CORE_EXPORT int qsnprintf(char *str, size_t n, const char *fmt, ...); -#ifdef QT3_SUPPORT -inline QT3_SUPPORT void *qmemmove(void *dst, const void *src, uint len) -{ return memmove(dst, src, len); } -inline QT3_SUPPORT uint cstrlen(const char *str) -{ return uint(strlen(str)); } -inline QT3_SUPPORT char *cstrcpy(char *dst, const char *src) -{ return qstrcpy(dst,src); } -inline QT3_SUPPORT int cstrcmp(const char *str1, const char *str2) -{ return strcmp(str1,str2); } -inline QT3_SUPPORT int cstrncmp(const char *str1, const char *str2, uint len) -{ return strncmp(str1,str2,len); } -#endif - // qChecksum: Internet checksum Q_CORE_EXPORT quint16 qChecksum(const char *s, uint len); @@ -234,13 +221,6 @@ public: QByteArray leftJustified(int width, char fill = ' ', bool truncate = false) const; QByteArray rightJustified(int width, char fill = ' ', bool truncate = false) const; -#ifdef QT3_SUPPORT - inline QT3_SUPPORT QByteArray leftJustify(uint width, char aFill = ' ', bool aTruncate = false) const - { return leftJustified(int(width), aFill, aTruncate); } - inline QT3_SUPPORT QByteArray rightJustify(uint width, char aFill = ' ', bool aTruncate = false) const - { return rightJustified(int(width), aFill, aTruncate); } -#endif - QByteArray &prepend(char c); QByteArray &prepend(const char *s); QByteArray &prepend(const char *s, int len); @@ -356,29 +336,6 @@ public: int length() const { return d->size; } bool isNull() const; - // compatibility -#ifdef QT3_SUPPORT - QT3_SUPPORT_CONSTRUCTOR QByteArray(int size); - inline QT3_SUPPORT QByteArray& duplicate(const QByteArray& a) { *this = a; return *this; } - inline QT3_SUPPORT QByteArray& duplicate(const char *a, uint n) - { *this = QByteArray(a, n); return *this; } - inline QT3_SUPPORT void resetRawData(const char *, uint) { clear(); } - inline QT3_SUPPORT QByteArray lower() const { return toLower(); } - inline QT3_SUPPORT QByteArray upper() const { return toUpper(); } - inline QT3_SUPPORT QByteArray stripWhiteSpace() const { return trimmed(); } - inline QT3_SUPPORT QByteArray simplifyWhiteSpace() const { return simplified(); } - inline QT3_SUPPORT int find(char c, int from = 0) const { return indexOf(c, from); } - inline QT3_SUPPORT int find(const char *c, int from = 0) const { return indexOf(c, from); } - inline QT3_SUPPORT int find(const QByteArray &ba, int from = 0) const { return indexOf(ba, from); } - inline QT3_SUPPORT int findRev(char c, int from = -1) const { return lastIndexOf(c, from); } - inline QT3_SUPPORT int findRev(const char *c, int from = -1) const { return lastIndexOf(c, from); } - inline QT3_SUPPORT int findRev(const QByteArray &ba, int from = -1) const { return lastIndexOf(ba, from); } -#ifndef QT_NO_CAST_TO_ASCII - QT3_SUPPORT int find(const QString &s, int from = 0) const; - QT3_SUPPORT int findRev(const QString &s, int from = -1) const; -#endif -#endif - private: operator QNoImplicitBoolCast() const; static Data shared_null; @@ -438,10 +395,6 @@ inline bool QByteArray::isDetached() const { return d->ref == 1; } inline QByteArray::QByteArray(const QByteArray &a) : d(a.d) { d->ref.ref(); } -#ifdef QT3_SUPPORT -inline QByteArray::QByteArray(int aSize) : d(&shared_null) -{ d->ref.ref(); if (aSize > 0) fill('\0', aSize); } -#endif inline int QByteArray::capacity() const { return d->alloc; } diff --git a/src/corelib/tools/qcache.h b/src/corelib/tools/qcache.h index 16861c9869..c42a908f5c 100644 --- a/src/corelib/tools/qcache.h +++ b/src/corelib/tools/qcache.h @@ -96,10 +96,6 @@ class QCache public: inline explicit QCache(int maxCost = 100); -#ifdef QT3_SUPPORT - inline QT3_SUPPORT_CONSTRUCTOR QCache(int maxCost, int /* dummy */) - : f(0), l(0), mx(maxCost), total(0) {} -#endif inline ~QCache() { clear(); } inline int maxCost() const { return mx; } @@ -123,11 +119,6 @@ public: private: void trim(int m); - -#ifdef QT3_SUPPORT - inline QT3_SUPPORT T *find(const Key &key) const { return object(key); } -#endif - }; template diff --git a/src/corelib/tools/qchar.h b/src/corelib/tools/qchar.h index 3ec53bd18e..b7793403bd 100644 --- a/src/corelib/tools/qchar.h +++ b/src/corelib/tools/qchar.h @@ -89,13 +89,6 @@ public: ObjectReplacementCharacter = 0xfffc, ByteOrderMark = 0xfeff, ByteOrderSwapped = 0xfffe, -#ifdef QT3_SUPPORT - null = Null, - replacement = ReplacementCharacter, - byteOrderMark = ByteOrderMark, - byteOrderSwapped = ByteOrderSwapped, - nbsp = Nbsp, -#endif ParagraphSeparator = 0x2029, LineSeparator = 0x2028 }; @@ -173,10 +166,6 @@ public: Square, Compat, Fraction - -#ifdef QT3_SUPPORT - , Single = NoDecomposition -#endif }; enum Joining @@ -338,22 +327,6 @@ public: static QString QT_FASTCALL decomposition(uint ucs4); -#ifdef QT3_SUPPORT - inline QT3_SUPPORT bool mirrored() const { return hasMirrored(); } - inline QT3_SUPPORT QChar lower() const { return toLower(); } - inline QT3_SUPPORT QChar upper() const { return toUpper(); } - static inline QT3_SUPPORT bool networkOrdered() { - return QSysInfo::ByteOrder == QSysInfo::BigEndian; - } -#ifdef Q_COMPILER_MANGLES_RETURN_TYPE - inline QT3_SUPPORT const char latin1() const { return toLatin1(); } - inline QT3_SUPPORT const char ascii() const { return toAscii(); } -#else - inline QT3_SUPPORT char latin1() const { return toLatin1(); } - inline QT3_SUPPORT char ascii() const { return toAscii(); } -#endif -#endif - private: #ifdef QT_NO_CAST_FROM_ASCII QChar(char c); diff --git a/src/corelib/tools/qdatetime.h b/src/corelib/tools/qdatetime.h index be14df7841..62bdcab7cc 100644 --- a/src/corelib/tools/qdatetime.h +++ b/src/corelib/tools/qdatetime.h @@ -76,10 +76,6 @@ public: int weekNumber(int *yearNum = 0) const; #ifndef QT_NO_TEXTDATE -#ifdef QT3_SUPPORT - static QT3_SUPPORT QString monthName(int month) { return shortMonthName(month); } - static QT3_SUPPORT QString dayName(int weekday) { return shortDayName(weekday); } -#endif // ### Qt 5: merge these functions. static QString shortMonthName(int month); static QString shortMonthName(int month, MonthNameType type); @@ -118,18 +114,11 @@ public: #endif static bool isValid(int y, int m, int d); static bool isLeapYear(int year); -#ifdef QT3_SUPPORT - inline static QT3_SUPPORT bool leapYear(int year) { return isLeapYear(year); } -#endif // ### Qt 5: remove these two functions static uint gregorianToJulian(int y, int m, int d); static void julianToGregorian(uint jd, int &y, int &m, int &d); -#ifdef QT3_SUPPORT - static QT3_SUPPORT QDate currentDate(Qt::TimeSpec spec); -#endif - static inline QDate fromJulianDay(int jd) { QDate d; d.jd = jd; return d; } inline int toJulianDay() const { return jd; } @@ -187,10 +176,6 @@ public: #endif static bool isValid(int h, int m, int s, int ms = 0); -#ifdef QT3_SUPPORT - static QT3_SUPPORT QTime currentTime(Qt::TimeSpec spec); -#endif - void start(); int restart(); int elapsed() const; @@ -273,21 +258,6 @@ public: static QDateTime fromMSecsSinceEpoch(qint64 msecs); static qint64 currentMSecsSinceEpoch(); -#ifdef QT3_SUPPORT - inline QT3_SUPPORT void setTime_t(uint secsSince1Jan1970UTC, Qt::TimeSpec spec) { - setTime_t(secsSince1Jan1970UTC); - if (spec == Qt::UTC) - *this = toUTC(); - } - static inline QT3_SUPPORT QDateTime currentDateTime(Qt::TimeSpec spec) { - if (spec == Qt::LocalTime) - return currentDateTime(); - else - return currentDateTime().toUTC(); - } - -#endif - private: friend class QDateTimePrivate; void detach(); @@ -300,24 +270,6 @@ private: }; Q_DECLARE_TYPEINFO(QDateTime, Q_MOVABLE_TYPE); -#ifdef QT3_SUPPORT -inline QDate QDate::currentDate(Qt::TimeSpec spec) -{ - if (spec == Qt::LocalTime) - return currentDate(); - else - return QDateTime::currentDateTime().toUTC().date(); -} - -inline QTime QTime::currentTime(Qt::TimeSpec spec) -{ - if (spec == Qt::LocalTime) - return currentTime(); - else - return QDateTime::currentDateTime().toUTC().time(); -} -#endif - #ifndef QT_NO_DATASTREAM Q_CORE_EXPORT QDataStream &operator<<(QDataStream &, const QDate &); Q_CORE_EXPORT QDataStream &operator>>(QDataStream &, QDate &); diff --git a/src/corelib/tools/qlinkedlist.h b/src/corelib/tools/qlinkedlist.h index 18afb29e9e..9f2834a7d7 100644 --- a/src/corelib/tools/qlinkedlist.h +++ b/src/corelib/tools/qlinkedlist.h @@ -227,21 +227,6 @@ public: { std::list tmp; qCopy(constBegin(), constEnd(), std::back_inserter(tmp)); return tmp; } #endif -#ifdef QT3_SUPPORT - // compatibility - inline QT3_SUPPORT iterator remove(iterator pos) { return erase(pos); } - inline QT3_SUPPORT int findIndex(const T& t) const - { int i=0; for (const_iterator it = begin(); it != end(); ++it, ++i) if(*it == t) return i; return -1;} - inline QT3_SUPPORT iterator find(iterator from, const T& t) - { while (from != end() && !(*from == t)) ++from; return from; } - inline QT3_SUPPORT iterator find(const T& t) - { return find(begin(), t); } - inline QT3_SUPPORT const_iterator find(const_iterator from, const T& t) const - { while (from != end() && !(*from == t)) ++from; return from; } - inline QT3_SUPPORT const_iterator find(const T& t) const - { return find(begin(), t); } -#endif - // comfort QLinkedList &operator+=(const QLinkedList &l); QLinkedList operator+(const QLinkedList &l) const; diff --git a/src/corelib/tools/qlist.h b/src/corelib/tools/qlist.h index 4eb05d63b6..f8f62cc8b2 100644 --- a/src/corelib/tools/qlist.h +++ b/src/corelib/tools/qlist.h @@ -310,20 +310,6 @@ public: typedef const value_type &const_reference; typedef qptrdiff difference_type; -#ifdef QT3_SUPPORT - inline QT3_SUPPORT iterator remove(iterator pos) { return erase(pos); } - inline QT3_SUPPORT int remove(const T &t) { return removeAll(t); } - inline QT3_SUPPORT int findIndex(const T& t) const { return indexOf(t); } - inline QT3_SUPPORT iterator find(const T& t) - { int i = indexOf(t); return (i == -1 ? end() : (begin()+i)); } - inline QT3_SUPPORT const_iterator find (const T& t) const - { int i = indexOf(t); return (i == -1 ? end() : (begin()+i)); } - inline QT3_SUPPORT iterator find(iterator from, const T& t) - { int i = indexOf(t, from - begin()); return i == -1 ? end() : begin()+i; } - inline QT3_SUPPORT const_iterator find(const_iterator from, const T& t) const - { int i = indexOf(t, from - begin()); return i == -1 ? end() : begin()+i; } -#endif - // comfort QList &operator+=(const QList &l); inline QList operator+(const QList &l) const diff --git a/src/corelib/tools/qmap.h b/src/corelib/tools/qmap.h index 39b3eb8af1..36d8eefbdb 100644 --- a/src/corelib/tools/qmap.h +++ b/src/corelib/tools/qmap.h @@ -249,9 +249,6 @@ public: inline const Key &key() const { return concrete(i)->key; } inline T &value() const { return concrete(i)->value; } -#ifdef QT3_SUPPORT - inline QT3_SUPPORT T &data() const { return concrete(i)->value; } -#endif inline T &operator*() const { return concrete(i)->value; } inline T *operator->() const { return &concrete(i)->value; } inline bool operator==(const iterator &o) const { return i == o.i; } @@ -323,9 +320,6 @@ public: inline const Key &key() const { return concrete(i)->key; } inline const T &value() const { return concrete(i)->value; } -#ifdef QT3_SUPPORT - inline QT3_SUPPORT const T &data() const { return concrete(i)->value; } -#endif inline const T &operator*() const { return concrete(i)->value; } inline const T *operator->() const { return &concrete(i)->value; } inline bool operator==(const const_iterator &o) const { return i == o.i; } @@ -379,10 +373,6 @@ public: inline const_iterator end() const { return const_iterator(e); } inline const_iterator constEnd() const { return const_iterator(e); } iterator erase(iterator it); -#ifdef QT3_SUPPORT - inline QT3_SUPPORT iterator remove(iterator it) { return erase(it); } - inline QT3_SUPPORT void erase(const Key &aKey) { remove(aKey); } -#endif // more Qt typedef iterator Iterator; @@ -396,13 +386,7 @@ public: iterator upperBound(const Key &key); const_iterator upperBound(const Key &key) const; iterator insert(const Key &key, const T &value); -#ifdef QT3_SUPPORT - QT3_SUPPORT iterator insert(const Key &key, const T &value, bool overwrite); -#endif iterator insertMulti(const Key &key, const T &value); -#ifdef QT3_SUPPORT - inline QT3_SUPPORT iterator replace(const Key &aKey, const T &aValue) { return insert(aKey, aValue); } -#endif QMap &unite(const QMap &other); // STL compatibility @@ -571,26 +555,6 @@ Q_INLINE_TEMPLATE typename QMap::iterator QMap::insert(const Key return iterator(node); } -#ifdef QT3_SUPPORT -template -Q_INLINE_TEMPLATE typename QMap::iterator QMap::insert(const Key &akey, - const T &avalue, - bool aoverwrite) -{ - detach(); - - QMapData::Node *update[QMapData::LastLevel + 1]; - QMapData::Node *node = mutableFindNode(update, akey); - if (node == e) { - node = node_create(d, update, akey, avalue); - } else { - if (aoverwrite) - concrete(node)->value = avalue; - } - return iterator(node); -} -#endif - template Q_INLINE_TEMPLATE typename QMap::iterator QMap::insertMulti(const Key &akey, const T &avalue) diff --git a/src/corelib/tools/qrect.h b/src/corelib/tools/qrect.h index cbed04f628..5d6db9867e 100644 --- a/src/corelib/tools/qrect.h +++ b/src/corelib/tools/qrect.h @@ -73,15 +73,6 @@ public: int bottom() const; QRect normalized() const; -#ifdef QT3_SUPPORT - QT3_SUPPORT int &rLeft() { return x1; } - QT3_SUPPORT int &rTop() { return y1; } - QT3_SUPPORT int &rRight() { return x2; } - QT3_SUPPORT int &rBottom() { return y2; } - - QT3_SUPPORT QRect normalize() const { return normalized(); } -#endif - int x() const; int y() const; void setLeft(int pos); @@ -120,18 +111,10 @@ public: void moveTo(int x, int t); void moveTo(const QPoint &p); -#ifdef QT3_SUPPORT - QT3_SUPPORT void moveBy(int dx, int dy) { translate(dx, dy); } - QT3_SUPPORT void moveBy(const QPoint &p) { translate(p); } -#endif - void setRect(int x, int y, int w, int h); inline void getRect(int *x, int *y, int *w, int *h) const; void setCoords(int x1, int y1, int x2, int y2); -#ifdef QT3_SUPPORT - QT3_SUPPORT void addCoords(int x1, int y1, int x2, int y2); -#endif inline void getCoords(int *x1, int *y1, int *x2, int *y2) const; inline void adjust(int x1, int y1, int x2, int y2); @@ -162,12 +145,6 @@ public: friend Q_CORE_EXPORT_INLINE bool operator==(const QRect &, const QRect &); friend Q_CORE_EXPORT_INLINE bool operator!=(const QRect &, const QRect &); -#ifdef QT3_SUPPORT - inline QT3_SUPPORT void rect(int *x, int *y, int *w, int *h) const { getRect(x, y, w, h); } - inline QT3_SUPPORT void coords(int *ax1, int *ay1, int *ax2, int *ay2) const - { getCoords(ax1, ay1, ax2, ay2); } -#endif - private: #if defined(Q_WS_X11) friend void qt_setCoords(QRect *r, int xp1, int yp1, int xp2, int yp2); @@ -421,13 +398,6 @@ inline void QRect::setCoords(int xp1, int yp1, int xp2, int yp2) y2 = yp2; } -#ifdef QT3_SUPPORT -inline void QRect::addCoords(int dx1, int dy1, int dx2, int dy2) -{ - adjust(dx1, dy1, dx2, dy2); -} -#endif - inline QRect QRect::adjusted(int xp1, int yp1, int xp2, int yp2) const { return QRect(QPoint(x1 + xp1, y1 + yp1), QPoint(x2 + xp2, y2 + yp2)); } diff --git a/src/corelib/tools/qregexp.h b/src/corelib/tools/qregexp.h index 12e42a95b7..4ce2f6e0be 100644 --- a/src/corelib/tools/qregexp.h +++ b/src/corelib/tools/qregexp.h @@ -45,9 +45,6 @@ #ifndef QT_NO_REGEXP #include -#ifdef QT3_SUPPORT -#include -#endif QT_BEGIN_HEADER @@ -91,37 +88,16 @@ public: void setPattern(const QString &pattern); Qt::CaseSensitivity caseSensitivity() const; void setCaseSensitivity(Qt::CaseSensitivity cs); -#ifdef QT3_SUPPORT - inline QT3_SUPPORT bool caseSensitive() const { return caseSensitivity() == Qt::CaseSensitive; } - inline QT3_SUPPORT void setCaseSensitive(bool sensitive) - { setCaseSensitivity(sensitive ? Qt::CaseSensitive : Qt::CaseInsensitive); } -#endif PatternSyntax patternSyntax() const; void setPatternSyntax(PatternSyntax syntax); -#ifdef QT3_SUPPORT - inline QT3_SUPPORT bool wildcard() const { return patternSyntax() == Wildcard; } - inline QT3_SUPPORT void setWildcard(bool aWildcard) - { setPatternSyntax(aWildcard ? Wildcard : RegExp); } -#endif bool isMinimal() const; void setMinimal(bool minimal); -#ifdef QT3_SUPPORT - inline QT3_SUPPORT bool minimal() const { return isMinimal(); } -#endif bool exactMatch(const QString &str) const; int indexIn(const QString &str, int offset = 0, CaretMode caretMode = CaretAtZero) const; int lastIndexIn(const QString &str, int offset = -1, CaretMode caretMode = CaretAtZero) const; -#ifdef QT3_SUPPORT - inline QT3_SUPPORT int search(const QString &str, int from = 0, - CaretMode caretMode = CaretAtZero) const - { return indexIn(str, from, caretMode); } - inline QT3_SUPPORT int searchRev(const QString &str, int from = -1, - CaretMode caretMode = CaretAtZero) const - { return lastIndexIn(str, from, caretMode); } -#endif int matchedLength() const; #ifndef QT_NO_REGEXP_CAPTURE #ifdef QT_DEPRECATED @@ -140,15 +116,6 @@ public: static QString escape(const QString &str); -#ifdef QT3_SUPPORT - inline QT3_SUPPORT_CONSTRUCTOR QRegExp(const QString &aPattern, bool cs, bool aWildcard = false) - { - new (this) - QRegExp(aPattern, cs ? Qt::CaseSensitive : Qt::CaseInsensitive, - aWildcard ? Wildcard : RegExp); - } -#endif - private: QRegExpPrivate *priv; }; diff --git a/src/corelib/tools/qscopedpointer.h b/src/corelib/tools/qscopedpointer.h index b15bcacd97..a24f62e7ba 100644 --- a/src/corelib/tools/qscopedpointer.h +++ b/src/corelib/tools/qscopedpointer.h @@ -208,8 +208,10 @@ template > class QScopedArrayPointer : public QScopedPointer { public: + inline QScopedArrayPointer() : QScopedPointer(0) {} + template - explicit inline QScopedArrayPointer(D *p = 0, typename QtPrivate::QScopedArrayEnsureSameType::Type = 0) + explicit inline QScopedArrayPointer(D *p, typename QtPrivate::QScopedArrayEnsureSameType::Type = 0) : QScopedPointer(p) { } diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp index e27afb8586..afb396ce50 100644 --- a/src/corelib/tools/qstring.cpp +++ b/src/corelib/tools/qstring.cpp @@ -102,10 +102,6 @@ QT_BEGIN_NAMESPACE QTextCodec *QString::codecForCStrings; #endif -#ifdef QT3_SUPPORT -static QHash *asciiCache = 0; -#endif - #ifdef QT_USE_ICU // qlocale_icu.cpp extern bool qt_ucol_strcoll(const QChar *source, int sourceLength, const QChar *target, int targetLength, int *result); @@ -802,9 +798,9 @@ const QString::Null QString::null = { }; */ QString::Data QString::shared_null = { Q_BASIC_ATOMIC_INITIALIZER(1), - 0, 0, shared_null.array, 0, 0, 0, 0, 0, 0, {0} }; + 0, 0, shared_null.array, 0, 0, 0, 0, 0, {0} }; QString::Data QString::shared_empty = { Q_BASIC_ATOMIC_INITIALIZER(1), - 0, 0, shared_empty.array, 0, 0, 0, 0, 0, 0, {0} }; + 0, 0, shared_empty.array, 0, 0, 0, 0, 0, {0} }; int QString::grow(int size) { @@ -1058,7 +1054,7 @@ QString::QString(const QChar *unicode, int size) Q_CHECK_PTR(d); d->ref = 1; d->alloc = d->size = size; - d->clean = d->asciiCache = d->simpletext = d->righttoleft = d->capacity = 0; + d->clean = d->simpletext = d->righttoleft = d->capacity = 0; d->data = d->array; memcpy(d->array, unicode, size * sizeof(QChar)); d->array[size] = '\0'; @@ -1091,7 +1087,7 @@ QString::QString(const QChar *unicode) Q_CHECK_PTR(d); d->ref = 1; d->alloc = d->size = size; - d->clean = d->asciiCache = d->simpletext = d->righttoleft = d->capacity = 0; + d->clean = d->simpletext = d->righttoleft = d->capacity = 0; d->data = d->array; memcpy(d->array, unicode, size * sizeof(QChar)); d->array[size] = '\0'; @@ -1116,7 +1112,7 @@ QString::QString(int size, QChar ch) Q_CHECK_PTR(d); d->ref = 1; d->alloc = d->size = size; - d->clean = d->asciiCache = d->simpletext = d->righttoleft = d->capacity = 0; + d->clean = d->simpletext = d->righttoleft = d->capacity = 0; d->data = d->array; d->array[size] = '\0'; ushort *i = d->array + size; @@ -1139,7 +1135,7 @@ QString::QString(int size, Qt::Initialization) Q_CHECK_PTR(d); d->ref = 1; d->alloc = d->size = size; - d->clean = d->asciiCache = d->simpletext = d->righttoleft = d->capacity = 0; + d->clean = d->simpletext = d->righttoleft = d->capacity = 0; d->data = d->array; d->array[size] = '\0'; } @@ -1161,7 +1157,7 @@ QString::QString(QChar ch) d = reinterpret_cast(buf); d->ref = 1; d->alloc = d->size = 1; - d->clean = d->asciiCache = d->simpletext = d->righttoleft = d->capacity = 0; + d->clean = d->simpletext = d->righttoleft = d->capacity = 0; d->data = d->array; d->array[0] = ch.unicode(); d->array[1] = '\0'; @@ -1222,12 +1218,6 @@ QString::QString(QChar ch) // ### Qt 5: rename freeData() to avoid confusion. See task 197625. void QString::free(Data *d) { -#ifdef QT3_SUPPORT - if (d->asciiCache) { - Q_ASSERT(asciiCache); - asciiCache->remove(d); - } -#endif qFree(d); } @@ -1344,7 +1334,6 @@ void QString::realloc(int alloc) x->size = qMin(alloc, d->size); ::memcpy(x->array, d->data, x->size * sizeof(QChar)); x->array[x->size] = 0; - x->asciiCache = 0; x->ref = 1; x->alloc = alloc; x->clean = d->clean; @@ -1356,12 +1345,6 @@ void QString::realloc(int alloc) QString::free(d); d = x; } else { -#ifdef QT3_SUPPORT - if (d->asciiCache) { - Q_ASSERT(asciiCache); - asciiCache->remove(d); - } -#endif Data *p = static_cast(qRealloc(d, sizeof(Data) + alloc * sizeof(QChar))); Q_CHECK_PTR(p); d = p; @@ -3794,7 +3777,7 @@ QString::Data *QString::fromLatin1_helper(const char *str, int size) Q_CHECK_PTR(d); d->ref = 1; d->alloc = d->size = size; - d->clean = d->asciiCache = d->simpletext = d->righttoleft = d->capacity = 0; + d->clean = d->simpletext = d->righttoleft = d->capacity = 0; d->data = d->array; d->array[size] = '\0'; ushort *dst = d->data; @@ -3868,44 +3851,6 @@ QString QString::fromLatin1(const char *str, int size) } -#ifdef QT3_SUPPORT - -/*! - \internal -*/ -const char *QString::ascii_helper() const -{ - if (!asciiCache) - asciiCache = new QHash(); - - d->asciiCache = true; - QByteArray ascii = toAscii(); - QByteArray old = asciiCache->value(d); - if (old == ascii) - return old.constData(); - asciiCache->insert(d, ascii); - return ascii.constData(); -} - -/*! - \internal -*/ -const char *QString::latin1_helper() const -{ - if (!asciiCache) - asciiCache = new QHash(); - - d->asciiCache = true; - QByteArray ascii = toLatin1(); - QByteArray old = asciiCache->value(d); - if (old == ascii) - return old.constData(); - asciiCache->insert(d, ascii); - return ascii.constData(); -} - -#endif - /*! Returns a QString initialized with the first \a size characters of the 8-bit string \a str. @@ -4636,25 +4581,16 @@ QString& QString::fill(QChar ch, int size) sensitivity setting \a cs. */ + /*! \overload compare() + \since 4.2 Lexically compares this string with the \a other string and returns an integer less than, equal to, or greater than zero if this string is less than, equal to, or greater than the other string. - Equivalent to \c {compare(*this, other)}. -*/ -int QString::compare(const QString &other) const -{ - return ucstrcmp(constData(), length(), other.constData(), other.length()); -} - -/*! - \overload compare() - \since 4.2 - Same as compare(*this, \a other, \a cs). */ int QString::compare(const QString &other, Qt::CaseSensitivity cs) const @@ -7196,7 +7132,7 @@ QString QString::fromRawData(const QChar *unicode, int size) x->ref = 1; x->alloc = x->size = size; *x->array = '\0'; - x->clean = x->asciiCache = x->simpletext = x->righttoleft = x->capacity = 0; + x->clean = x->simpletext = x->righttoleft = x->capacity = 0; return QString(x, 0); } @@ -7219,12 +7155,6 @@ QString &QString::setRawData(const QChar *unicode, int size) if (d->ref != 1 || (d->data == d->array && d->alloc)) { *this = fromRawData(unicode, size); } else { -#ifdef QT3_SUPPORT - if (d->asciiCache) { - Q_ASSERT(asciiCache); - asciiCache->remove(d); - } -#endif if (unicode) { d->data = (ushort *)unicode; } else { @@ -7233,7 +7163,7 @@ QString &QString::setRawData(const QChar *unicode, int size) } d->alloc = d->size = size; *d->array = '\0'; - d->clean = d->asciiCache = d->simpletext = d->righttoleft = d->capacity = 0; + d->clean = d->simpletext = d->righttoleft = d->capacity = 0; } return *this; } diff --git a/src/corelib/tools/qstring.h b/src/corelib/tools/qstring.h index c61d09e37d..154012d132 100644 --- a/src/corelib/tools/qstring.h +++ b/src/corelib/tools/qstring.h @@ -46,9 +46,6 @@ #include #include #include -#ifdef QT_INCLUDE_COMPAT -#include -#endif #ifndef QT_NO_STL # include @@ -340,16 +337,10 @@ public: QString &setUnicode(const QChar *unicode, int size); inline QString &setUtf16(const ushort *utf16, int size); - // ### Qt 5: merge these two functions - int compare(const QString &s) const; - int compare(const QString &s, Qt::CaseSensitivity cs) const; - + int compare(const QString &s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; int compare(const QLatin1String &other, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; - // ### Qt 5: merge these two functions - static inline int compare(const QString &s1, const QString &s2) - { return s1.compare(s2); } - static inline int compare(const QString &s1, const QString &s2, Qt::CaseSensitivity cs) + static inline int compare(const QString &s1, const QString &s2, Qt::CaseSensitivity cs = Qt::CaseSensitive) { return s1.compare(s2, cs); } static inline int compare(const QString& s1, const QLatin1String &s2, @@ -504,86 +495,6 @@ public: inline QString &operator=(const Null &) { *this = QString(); return *this; } inline bool isNull() const { return d == &shared_null; } -#ifdef QT3_SUPPORT - inline QT3_SUPPORT const char *ascii() const { return ascii_helper(); } - inline QT3_SUPPORT const char *latin1() const { return latin1_helper(); } - inline QT3_SUPPORT QByteArray utf8() const { return toUtf8(); } - inline QT3_SUPPORT QByteArray local8Bit() const{ return toLocal8Bit(); } - inline QT3_SUPPORT void setLength(int nl) { resize(nl); } - inline QT3_SUPPORT QString copy() const { return *this; } - inline QT3_SUPPORT QString &remove(QChar c, bool cs) - { return remove(c, cs?Qt::CaseSensitive:Qt::CaseInsensitive); } - inline QT3_SUPPORT QString &remove(const QString &s, bool cs) - { return remove(s, cs?Qt::CaseSensitive:Qt::CaseInsensitive); } - inline QT3_SUPPORT QString &replace(QChar c, const QString &after, bool cs) - { return replace(c, after, cs?Qt::CaseSensitive:Qt::CaseInsensitive); } - inline QT3_SUPPORT QString &replace(const QString &before, const QString &after, bool cs) - { return replace(before, after, cs?Qt::CaseSensitive:Qt::CaseInsensitive); } -#ifndef QT_NO_CAST_FROM_ASCII - inline QT3_SUPPORT QString &replace(char c, const QString &after, bool cs) - { return replace(QChar::fromAscii(c), after, cs ? Qt::CaseSensitive : Qt::CaseInsensitive); } - // strange overload, required to avoid GCC 3.3 error - inline QT3_SUPPORT QString &replace(char c, const QString &after, Qt::CaseSensitivity cs) - { return replace(QChar::fromAscii(c), after, cs ? Qt::CaseSensitive : Qt::CaseInsensitive); } -#endif - inline QT3_SUPPORT int find(QChar c, int i = 0, bool cs = true) const - { return indexOf(c, i, cs?Qt::CaseSensitive:Qt::CaseInsensitive); } - inline QT3_SUPPORT int find(const QString &s, int i = 0, bool cs = true) const - { return indexOf(s, i, cs?Qt::CaseSensitive:Qt::CaseInsensitive); } - inline QT3_SUPPORT int findRev(QChar c, int i = -1, bool cs = true) const - { return lastIndexOf(c, i, cs?Qt::CaseSensitive:Qt::CaseInsensitive); } - inline QT3_SUPPORT int findRev(const QString &s, int i = -1, bool cs = true) const - { return lastIndexOf(s, i, cs?Qt::CaseSensitive:Qt::CaseInsensitive); } -#ifndef QT_NO_REGEXP - inline QT3_SUPPORT int find(const QRegExp &rx, int i=0) const - { return indexOf(rx, i); } - inline QT3_SUPPORT int findRev(const QRegExp &rx, int i=-1) const - { return lastIndexOf(rx, i); } - inline QT3_SUPPORT int find(QRegExp &rx, int i=0) const - { return indexOf(rx, i); } - inline QT3_SUPPORT int findRev(QRegExp &rx, int i=-1) const - { return lastIndexOf(rx, i); } -#endif - inline QT3_SUPPORT QBool contains(QChar c, bool cs) const - { return contains(c, cs?Qt::CaseSensitive:Qt::CaseInsensitive); } - inline QT3_SUPPORT QBool contains(const QString &s, bool cs) const - { return contains(s, cs?Qt::CaseSensitive:Qt::CaseInsensitive); } - inline QT3_SUPPORT bool startsWith(const QString &s, bool cs) const - { return startsWith(s, cs?Qt::CaseSensitive:Qt::CaseInsensitive); } - inline QT3_SUPPORT bool endsWith(const QString &s, bool cs) const - { return endsWith(s, cs?Qt::CaseSensitive:Qt::CaseInsensitive); } - inline QT3_SUPPORT QChar constref(uint i) const - { return at(i); } - QT3_SUPPORT QChar &ref(uint i); - inline QT3_SUPPORT QString leftJustify(int width, QChar aFill = QLatin1Char(' '), bool trunc=false) const - { return leftJustified(width, aFill, trunc); } - inline QT3_SUPPORT QString rightJustify(int width, QChar aFill = QLatin1Char(' '), bool trunc=false) const - { return rightJustified(width, aFill, trunc); } - inline QT3_SUPPORT QString lower() const { return toLower(); } - inline QT3_SUPPORT QString upper() const { return toUpper(); } - inline QT3_SUPPORT QString stripWhiteSpace() const { return trimmed(); } - inline QT3_SUPPORT QString simplifyWhiteSpace() const { return simplified(); } - inline QT3_SUPPORT QString &setUnicodeCodes(const ushort *unicode_as_ushorts, int aSize) - { return setUtf16(unicode_as_ushorts, aSize); } - inline QT3_SUPPORT const ushort *ucs2() const { return utf16(); } - inline static QT3_SUPPORT QString fromUcs2(const ushort *unicode, int size = -1) - { return fromUtf16(unicode, size); } - inline QT3_SUPPORT QString &setAscii(const char *str, int len = -1) - { *this = fromAscii(str, len); return *this; } - inline QT3_SUPPORT QString &setLatin1(const char *str, int len = -1) - { *this = fromLatin1(str, len); return *this; } -protected: - friend class QObject; - const char *ascii_helper() const; - const char *latin1_helper() const; -public: -#ifndef QT_NO_CAST_TO_ASCII - inline QT3_SUPPORT operator const char *() const { return ascii_helper(); } -private: - QT3_SUPPORT operator QNoImplicitBoolCast() const; -public: -#endif -#endif bool isSimpleText() const { if (!d->clean) updateProperties(); return d->simpletext; } bool isRightToLeft() const; @@ -607,7 +518,6 @@ private: ushort clean : 1; ushort simpletext : 1; ushort righttoleft : 1; - ushort asciiCache : 1; ushort capacity : 1; ushort reserved : 11; // ### Qt5: try to ensure that "array" is aligned to 16 bytes on both 32- and 64-bit @@ -857,18 +767,6 @@ public: #endif ushort& unicode() { return s.data()[i].unicode(); } -#ifdef QT3_SUPPORT - inline QT3_SUPPORT bool mirrored() const { return hasMirrored(); } - inline QT3_SUPPORT QChar lower() const { return QChar(*this).toLower(); } - inline QT3_SUPPORT QChar upper() const { return QChar(*this).toUpper(); } -#ifdef Q_COMPILER_MANGLES_RETURN_TYPE - const QT3_SUPPORT char latin1() const { return QChar(*this).toLatin1(); } - const QT3_SUPPORT char ascii() const { return QChar(*this).toAscii(); } -#else - QT3_SUPPORT char latin1() const { return QChar(*this).toLatin1(); } - QT3_SUPPORT char ascii() const { return QChar(*this).toAscii(); } -#endif -#endif }; inline void QCharRef::setRow(uchar arow) { QChar(*this).setRow(arow); } @@ -1008,12 +906,6 @@ inline int QByteArray::indexOf(const QString &s, int from) const { return indexOf(s.toAscii(), from); } inline int QByteArray::lastIndexOf(const QString &s, int from) const { return lastIndexOf(s.toAscii(), from); } -# ifdef QT3_SUPPORT -inline int QByteArray::find(const QString &s, int from) const -{ return indexOf(s.toAscii(), from); } -inline int QByteArray::findRev(const QString &s, int from) const -{ return lastIndexOf(s.toAscii(), from); } -# endif // QT3_SUPPORT #endif // QT_NO_CAST_TO_ASCII #if !defined(QT_USE_FAST_OPERATOR_PLUS) && !defined(QT_USE_QSTRINGBUILDER) @@ -1066,30 +958,11 @@ inline QString QString::fromStdWString(const QStdWString &s) # endif #endif -#ifdef QT3_SUPPORT -inline QChar &QString::ref(uint i) -{ - if (int(i) > d->size || d->ref != 1) - resize(qMax(int(i), d->size)); - return reinterpret_cast(d->data[i]); -} -#endif - #if !defined(QT_NO_DATASTREAM) || (defined(QT_BOOTSTRAPPED) && !defined(QT_BUILD_QMAKE)) Q_CORE_EXPORT QDataStream &operator<<(QDataStream &, const QString &); Q_CORE_EXPORT QDataStream &operator>>(QDataStream &, QString &); #endif -#ifdef QT3_SUPPORT -class QConstString : public QString -{ -public: - inline QT3_SUPPORT_CONSTRUCTOR QConstString(const QChar *aUnicode, int aSize) - :QString(aUnicode, aSize){} // cannot use fromRawData() due to changed semantics - inline QT3_SUPPORT const QString &string() const { return *this; } -}; -#endif - Q_DECLARE_TYPEINFO(QString, Q_MOVABLE_TYPE); Q_DECLARE_SHARED(QString) Q_DECLARE_OPERATORS_FOR_FLAGS(QString::SectionFlags) diff --git a/src/corelib/tools/qstringbuilder.cpp b/src/corelib/tools/qstringbuilder.cpp index 45de6bc1c3..1cc7e5d2c3 100644 --- a/src/corelib/tools/qstringbuilder.cpp +++ b/src/corelib/tools/qstringbuilder.cpp @@ -162,6 +162,8 @@ void QAbstractConcatenable::convertFromAscii(const char *a, int len, QChar *&out } #endif if (len == -1) { + if (!a) + return; while (*a) *out++ = QLatin1Char(*a++); } else { diff --git a/src/corelib/tools/qstringbuilder.h b/src/corelib/tools/qstringbuilder.h index 709d84a578..594ab2f183 100644 --- a/src/corelib/tools/qstringbuilder.h +++ b/src/corelib/tools/qstringbuilder.h @@ -352,6 +352,8 @@ template <> struct QConcatenable : private QAbstractConcatenable #endif static inline void appendTo(const char *a, char *&out) { + if (!a) + return; while (*a) *out++ = *a++; } diff --git a/src/corelib/tools/qstringlist.cpp b/src/corelib/tools/qstringlist.cpp index 8b47137fd8..44cc692b2f 100644 --- a/src/corelib/tools/qstringlist.cpp +++ b/src/corelib/tools/qstringlist.cpp @@ -234,42 +234,6 @@ void QtPrivate::QStringList_sort(QStringList *that) } -#ifdef QT3_SUPPORT -/*! - \fn QStringList QStringList::split(const QChar &sep, const QString &str, bool allowEmptyEntries) - - \overload - - This version of the function uses a QChar as separator. - - \sa join() QString::section() -*/ - -/*! - \fn QStringList QStringList::split(const QString &sep, const QString &str, bool allowEmptyEntries) - - \overload - - This version of the function uses a QString as separator. - - \sa join() QString::section() -*/ -#ifndef QT_NO_REGEXP -/*! - \fn QStringList QStringList::split(const QRegExp &sep, const QString &str, bool allowEmptyEntries) - - Use QString::split(\a sep, QString::SkipEmptyParts) or - QString::split(\a sep, QString::KeepEmptyParts) instead. - - Be aware that the QString::split()'s return value is a - QStringList that always contains at least one element, even if \a - str is empty. - - \sa join() QString::section() -*/ -#endif -#endif // QT3_SUPPORT - /*! \fn QStringList QStringList::filter(const QString &str, Qt::CaseSensitivity cs) const diff --git a/src/corelib/tools/qstringlist.h b/src/corelib/tools/qstringlist.h index 2159512b20..efb7f46c9b 100644 --- a/src/corelib/tools/qstringlist.h +++ b/src/corelib/tools/qstringlist.h @@ -48,9 +48,6 @@ #include #include #include -#ifdef QT_INCLUDE_COMPAT -#include -#endif QT_BEGIN_HEADER @@ -108,24 +105,6 @@ public: inline int lastIndexOf(const QString &str, int from = -1) const { return QList::lastIndexOf(str, from); } #endif -#ifdef QT3_SUPPORT - static inline QT3_SUPPORT QStringList split(const QString &sep, const QString &str, bool allowEmptyEntries = false); - static inline QT3_SUPPORT QStringList split(const QChar &sep, const QString &str, bool allowEmptyEntries = false); - inline QT3_SUPPORT QStringList grep(const QString &str, bool cs = true) const - { return filter(str, cs ? Qt::CaseSensitive : Qt::CaseInsensitive); } - -#ifndef QT_NO_REGEXP - static inline QT3_SUPPORT QStringList split(const QRegExp &sep, const QString &str, bool allowEmptyEntries = false); - inline QT3_SUPPORT QStringList grep(const QRegExp &rx) const { return filter(rx); } - inline QT3_SUPPORT QStringList &gres(const QRegExp &rx, const QString &after) - { return replaceInStrings(rx, after); } -#endif - inline QT3_SUPPORT QStringList &gres(const QString &before, const QString &after, bool cs = true) - { return replaceInStrings(before, after, cs ? Qt::CaseSensitive : Qt::CaseInsensitive); } - - inline Iterator QT3_SUPPORT fromLast() { return (isEmpty() ? end() : --end()); } - inline ConstIterator QT3_SUPPORT fromLast() const { return (isEmpty() ? end() : --end()); } -#endif }; namespace QtPrivate { @@ -214,36 +193,6 @@ inline int QStringList::lastIndexOf(QRegExp &rx, int from) const #endif -#ifdef QT3_SUPPORT -inline QStringList QStringList::split(const QChar &sep, const QString &str, bool allowEmptyEntries) -{ - if (str.isEmpty()) - return QStringList(); - return str.split(sep, allowEmptyEntries ? QString::KeepEmptyParts - : QString::SkipEmptyParts); -} - -inline QStringList QStringList::split(const QString &sep, const QString &str, bool allowEmptyEntries) -{ - if (str.isEmpty()) - return QStringList(); - return str.split(sep, allowEmptyEntries ? QString::KeepEmptyParts - : QString::SkipEmptyParts); -} - -#ifndef QT_NO_REGEXP -inline QStringList QStringList::split(const QRegExp &sep, const QString &str, bool allowEmptyEntries) -{ - if (str.isEmpty()) - return QStringList(); - return str.split(sep, allowEmptyEntries ? QString::KeepEmptyParts - : QString::SkipEmptyParts); -} -#endif // QT_NO_REGEXP - -#endif // QT3_SUPPORT - - #ifndef QT_NO_DATASTREAM inline QDataStream &operator>>(QDataStream &in, QStringList &list) { diff --git a/src/dbus/dbus.pro b/src/dbus/dbus.pro index 12efd8638b..c91c2f6ad7 100644 --- a/src/dbus/dbus.pro +++ b/src/dbus/dbus.pro @@ -35,7 +35,7 @@ win32 { } load(qt_module_config) -HEADERS += $$QT_SOURCE_TREE/src/dub/qtdbusversion.h +HEADERS += $$QT_SOURCE_TREE/src/dbus/qtdbusversion.h PUB_HEADERS = qdbusargument.h \ qdbusconnectioninterface.h \ diff --git a/src/gui/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp index 9e6a8d6e52..fff27cd908 100644 --- a/src/gui/kernel/qevent.cpp +++ b/src/gui/kernel/qevent.cpp @@ -48,6 +48,7 @@ #include "qmime.h" #include "private/qdnd_p.h" #include "qevent_p.h" +#include "qmath.h" #ifdef Q_OS_SYMBIAN #include "private/qcore_symbian_p.h" @@ -161,7 +162,7 @@ QInputEvent::~QInputEvent() position explicitly. */ -QMouseEvent::QMouseEvent(Type type, const QPoint &position, Qt::MouseButton button, +QMouseEvent::QMouseEvent(Type type, const QPointF &position, Qt::MouseButton button, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers) : QInputEvent(type, modifiers), p(position), b(button), mouseState(buttons) { @@ -193,28 +194,20 @@ QMouseEvent::~QMouseEvent() modifiers. */ -QMouseEvent::QMouseEvent(Type type, const QPoint &pos, const QPoint &globalPos, +QMouseEvent::QMouseEvent(Type type, const QPointF &pos, const QPointF &globalPos, Qt::MouseButton button, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers) : QInputEvent(type, modifiers), p(pos), g(globalPos), b(button), mouseState(buttons) {} -/*! - \internal -*/ -QMouseEvent *QMouseEvent::createExtendedMouseEvent(Type type, const QPointF &pos, - const QPoint &globalPos, Qt::MouseButton button, - Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers) -{ - return new QMouseEventEx(type, pos, globalPos, button, buttons, modifiers); -} - /*! \fn bool QMouseEvent::hasExtendedInfo() const \internal */ /*! + \fn QPointF QMouseEvent::posF() const + \since 4.4 Returns the position of the mouse cursor as a QPointF, relative to the @@ -226,28 +219,6 @@ QMouseEvent *QMouseEvent::createExtendedMouseEvent(Type type, const QPointF &pos \sa x() y() pos() globalPos() */ -QPointF QMouseEvent::posF() const -{ - return hasExtendedInfo() ? reinterpret_cast(this)->posF : QPointF(pos()); -} - -/*! - \internal -*/ -QMouseEventEx::QMouseEventEx(Type type, const QPointF &pos, const QPoint &globalPos, - Qt::MouseButton button, Qt::MouseButtons buttons, - Qt::KeyboardModifiers modifiers) - : QMouseEvent(type, pos.toPoint(), globalPos, button, buttons, modifiers), posF(pos) -{ - d = reinterpret_cast(this); -} - -/*! - \internal -*/ -QMouseEventEx::~QMouseEventEx() -{ -} /*! \fn const QPoint &QMouseEvent::pos() const @@ -440,8 +411,8 @@ QMouseEventEx::~QMouseEventEx() receiving widget, while \a oldPos is the previous mouse cursor's position relative to the receiving widget. */ -QHoverEvent::QHoverEvent(Type type, const QPoint &pos, const QPoint &oldPos) - : QEvent(type), p(pos), op(oldPos) +QHoverEvent::QHoverEvent(Type type, const QPointF &pos, const QPointF &oldPos, Qt::KeyboardModifiers modifiers) + : QInputEvent(type, modifiers), p(pos), op(oldPos) { } @@ -507,7 +478,7 @@ QHoverEvent::~QHoverEvent() \sa pos() delta() state() */ #ifndef QT_NO_WHEELEVENT -QWheelEvent::QWheelEvent(const QPoint &pos, int delta, +QWheelEvent::QWheelEvent(const QPointF &pos, int delta, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers, Qt::Orientation orient) : QInputEvent(Wheel, modifiers), p(pos), d(delta), mouseState(buttons), o(orient) @@ -533,7 +504,7 @@ QWheelEvent::~QWheelEvent() \sa pos() globalPos() delta() state() */ -QWheelEvent::QWheelEvent(const QPoint &pos, const QPoint& globalPos, int delta, +QWheelEvent::QWheelEvent(const QPointF &pos, const QPointF& globalPos, int delta, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers, Qt::Orientation orient) : QInputEvent(Wheel, modifiers), p(pos), g(globalPos), d(delta), mouseState(buttons), o(orient) @@ -4355,4 +4326,101 @@ const QScrollEventPrivate *QScrollEvent::d_func() const return reinterpret_cast(d); } +/*! + \enum QScreenOrientationChangeEvent::Orientation + + This enum describes the orientations that a device can have. + + \value Portrait The device is in a position where its top edge is pointing up. + + \value Landscape The device is rotated clockwise 90 degrees, so that its left edge is pointing up. + + \value PortraitInverted The device is rotated 180 degrees, so that its bottom edge is pointing up. + + \value LandscapeInverted The device is counterclockwise 90 degrees, so that its right edge is pointing up. + + \sa QScreenOrientationChangeEvent::orientation() + \sa QScreenOrientationChangeEvent::orientationInDegrees() +*/ + +/*! + Creates a new QScreenOrientationChangeEvent + \a screenOrientationInDegrees is the new screen orientation, expressed in degrees. + The orientation must be expressed in steps of 90 degrees. +*/ +QScreenOrientationChangeEvent::QScreenOrientationChangeEvent(qint32 screenOrientationInDegrees) + : QEvent(QEvent::OrientationChange) +{ + d = reinterpret_cast(new QScreenOrientationChangeEventPrivate()); + d_func()->orientationInDegrees = screenOrientationInDegrees; + + qint32 orientationIndex = (qAbs(screenOrientationInDegrees) % 360) / 90; + // flip around the negative coords to correct order. + if (screenOrientationInDegrees < 0) { + if (orientationIndex == 1) + orientationIndex = 3; + else if (orientationIndex == 3) + orientationIndex = 1; + } + + orientationIndex = qPow(2, orientationIndex); + d_func()->orientation = (QScreenOrientationChangeEvent::Orientation)(orientationIndex); + d_func()->isValid = (screenOrientationInDegrees % 90 == 0); +} + +/*! + Creates a new QScreenOrientationChangeEvent + \a orientation is the new orientation of the screen. +*/ +QScreenOrientationChangeEvent::QScreenOrientationChangeEvent(QScreenOrientationChangeEvent::Orientation screenOrientation) + : QEvent(QEvent::OrientationChange) +{ + d = reinterpret_cast(new QScreenOrientationChangeEventPrivate()); + d_func()->orientation = screenOrientation; + d_func()->orientationInDegrees = 90 * ((uint)screenOrientation); + d_func()->isValid = true; +} + +/*! + Destroys QScreenOrientationChangeEvent. +*/ +QScreenOrientationChangeEvent::~QScreenOrientationChangeEvent() +{ + delete reinterpret_cast(d); +} + +/*! + Returns the orientation of the screen. +*/ +QScreenOrientationChangeEvent::Orientation QScreenOrientationChangeEvent::orientation() const +{ + return d_func()->orientation; +} + +/*! + Returns the screen orientation in degrees. + The orientation is expressed in steps of 90 degrees and depends on the previous value of the orientation. + This is intended to allow for smooth animations from one orientation to the other. +*/ +qint32 QScreenOrientationChangeEvent::orientationInDegrees() const +{ + return d_func()->orientationInDegrees; +} + +/*! + \internal +*/ +QScreenOrientationChangeEventPrivate *QScreenOrientationChangeEvent::d_func() +{ + return reinterpret_cast(d); +} + +/*! + \internal +*/ +const QScreenOrientationChangeEventPrivate *QScreenOrientationChangeEvent::d_func() const +{ + return reinterpret_cast(d); +} + QT_END_NAMESPACE diff --git a/src/gui/kernel/qevent.h b/src/gui/kernel/qevent.h index 59d50df268..de0d6b3793 100644 --- a/src/gui/kernel/qevent.h +++ b/src/gui/kernel/qevent.h @@ -84,62 +84,62 @@ protected: class Q_GUI_EXPORT QMouseEvent : public QInputEvent { public: - QMouseEvent(Type type, const QPoint &pos, Qt::MouseButton button, + QMouseEvent(Type type, const QPointF &pos, Qt::MouseButton button, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers); - QMouseEvent(Type type, const QPoint &pos, const QPoint &globalPos, + QMouseEvent(Type type, const QPointF &pos, const QPointF &globalPos, Qt::MouseButton button, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers); ~QMouseEvent(); - inline const QPoint &pos() const { return p; } - inline const QPoint &globalPos() const { return g; } - inline int x() const { return p.x(); } - inline int y() const { return p.y(); } - inline int globalX() const { return g.x(); } - inline int globalY() const { return g.y(); } + inline QPoint pos() const { return p.toPoint(); } + inline QPoint globalPos() const { return g.toPoint(); } + inline int x() const { return qRound(p.x()); } + inline int y() const { return qRound(p.y()); } + inline int globalX() const { return qRound(g.x()); } + inline int globalY() const { return qRound(g.y()); } inline Qt::MouseButton button() const { return b; } inline Qt::MouseButtons buttons() const { return mouseState; } - static QMouseEvent *createExtendedMouseEvent(Type type, const QPointF &pos, - const QPoint &globalPos, Qt::MouseButton button, - Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers); - inline bool hasExtendedInfo() const { return reinterpret_cast(d) == this; } - QPointF posF() const; + const QPointF &posF() const { return p; } + const QPointF &globalPosF() const { return g; } protected: - QPoint p, g; + QPointF p, g; Qt::MouseButton b; Qt::MouseButtons mouseState; }; -class Q_GUI_EXPORT QHoverEvent : public QEvent +class Q_GUI_EXPORT QHoverEvent : public QInputEvent { public: - QHoverEvent(Type type, const QPoint &pos, const QPoint &oldPos); + QHoverEvent(Type type, const QPointF &pos, const QPointF &oldPos, Qt::KeyboardModifiers modifiers = Qt::NoModifier); ~QHoverEvent(); - inline const QPoint &pos() const { return p; } - inline const QPoint &oldPos() const { return op; } + inline QPoint pos() const { return p.toPoint(); } + inline QPoint oldPos() const { return op.toPoint(); } + + inline const QPointF &posF() const { return p; } + inline const QPointF &oldPosF() const { return op; } protected: - QPoint p, op; + QPointF p, op; }; #ifndef QT_NO_WHEELEVENT class Q_GUI_EXPORT QWheelEvent : public QInputEvent { public: - QWheelEvent(const QPoint &pos, int delta, + QWheelEvent(const QPointF &pos, int delta, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers, Qt::Orientation orient = Qt::Vertical); - QWheelEvent(const QPoint &pos, const QPoint& globalPos, int delta, + QWheelEvent(const QPointF &pos, const QPointF& globalPos, int delta, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers, Qt::Orientation orient = Qt::Vertical); ~QWheelEvent(); inline int delta() const { return d; } - inline const QPoint &pos() const { return p; } - inline const QPoint &globalPos() const { return g; } + inline QPoint pos() const { return p.toPoint(); } + inline QPoint globalPos() const { return g.toPoint(); } inline int x() const { return p.x(); } inline int y() const { return p.y(); } inline int globalX() const { return g.x(); } @@ -148,9 +148,12 @@ public: inline Qt::MouseButtons buttons() const { return mouseState; } Qt::Orientation orientation() const { return o; } + inline const QPointF &posF() const { return p; } + inline const QPointF &globalPosF() const { return g; } + protected: - QPoint p; - QPoint g; + QPointF p; + QPointF g; int d; Qt::MouseButtons mouseState; Qt::Orientation o; @@ -819,6 +822,30 @@ private: const QScrollEventPrivate *d_func() const; }; +class QScreenOrientationChangeEventPrivate; +class Q_GUI_EXPORT QScreenOrientationChangeEvent : public QEvent +{ +public: + enum Orientation { + Portrait = 1, + Landscape = 2, + PortraitInverted = 4, + LandscapeInverted = 8 + }; + QScreenOrientationChangeEvent(qint32 screenOrientationInDegrees); + QScreenOrientationChangeEvent(Orientation screenOrientation); + ~QScreenOrientationChangeEvent(); + + bool isValid() const; + qint32 orientationInDegrees() const; + Orientation orientation() const; + +private: + QScreenOrientationChangeEventPrivate *d_func(); + const QScreenOrientationChangeEventPrivate *d_func() const; + +}; + QT_END_NAMESPACE QT_END_HEADER diff --git a/src/gui/kernel/qevent_p.h b/src/gui/kernel/qevent_p.h index 731cfc97f2..59eb270230 100644 --- a/src/gui/kernel/qevent_p.h +++ b/src/gui/kernel/qevent_p.h @@ -81,20 +81,6 @@ protected: friend class QKeyEvent; }; -// ### Qt 5: remove -class QMouseEventEx : public QMouseEvent -{ -public: - QMouseEventEx(Type type, const QPointF &pos, const QPoint &globalPos, - Qt::MouseButton button, Qt::MouseButtons buttons, - Qt::KeyboardModifiers modifiers); - ~QMouseEventEx(); - -protected: - QPointF posF; - friend class QMouseEvent; -}; - class QTouchEventTouchPointPrivate { public: @@ -167,6 +153,17 @@ public: QScrollEvent::ScrollState state; }; +class QScreenOrientationChangeEventPrivate +{ +public: + inline QScreenOrientationChangeEventPrivate() + { + } + QScreenOrientationChangeEvent::Orientation orientation; + qint32 orientationInDegrees; + bool isValid; +}; + QT_END_NAMESPACE #endif // QEVENT_P_H diff --git a/src/gui/painting/qbrush.cpp b/src/gui/painting/qbrush.cpp index 98ed02879a..d644bbace1 100644 --- a/src/gui/painting/qbrush.cpp +++ b/src/gui/painting/qbrush.cpp @@ -1277,7 +1277,7 @@ QDataStream &operator>>(QDataStream &s, QBrush &b) {coordinate mode} use coordinateMode(). - \sa {demos/gradients}{The Gradients Demo}, QBrush + \sa {painting/gradients}{The Gradients Example}, QBrush */ /*! @@ -1587,8 +1587,8 @@ bool QGradient::operator==(const QGradient &gradient) returns the final stop point of the gradient, and the start() function returning the start point of the gradient. - \sa QRadialGradient, QConicalGradient, {demos/gradients}{The - Gradients Demo} + \sa QRadialGradient, QConicalGradient, {painting/gradients}{The + Gradients Example} */ @@ -1773,8 +1773,8 @@ void QLinearGradient::setFinalStop(const QPointF &stop) radius() functions returning the gradient's center, focal point and radius respectively. - \sa QLinearGradient, QConicalGradient, {demos/gradients}{The - Gradients Demo} + \sa QLinearGradient, QConicalGradient, {painting/gradients}{The + Gradients Example} */ static QPointF qt_radial_gradient_adapt_focal_point(const QPointF ¢er, @@ -2143,8 +2143,8 @@ void QRadialGradient::setFocalPoint(const QPointF &focalPoint) gradient can be specified through its radius or final stop points, respectively. - \sa QLinearGradient, QRadialGradient, {demos/gradients}{The - Gradients Demo} + \sa QLinearGradient, QRadialGradient, {painting/gradients}{The + Gradients Example} */ diff --git a/src/gui/painting/qcosmeticstroker.cpp b/src/gui/painting/qcosmeticstroker.cpp index d694b4b9a8..cdc0978ed7 100644 --- a/src/gui/painting/qcosmeticstroker.cpp +++ b/src/gui/painting/qcosmeticstroker.cpp @@ -409,10 +409,11 @@ void QCosmeticStroker::calculateLastPoint(qreal rx1, qreal ry1, qreal rx2, qreal if (clipLine(rx1, ry1, rx2, ry2)) return; - int x1 = toF26Dot6(rx1); - int y1 = toF26Dot6(ry1); - int x2 = toF26Dot6(rx2); - int y2 = toF26Dot6(ry2); + const int half = 32; + int x1 = toF26Dot6(rx1) + half; + int y1 = toF26Dot6(ry1) + half; + int x2 = toF26Dot6(rx2) + half; + int y2 = toF26Dot6(ry2) + half; int dx = qAbs(x2 - x1); int dy = qAbs(y2 - y1); @@ -424,6 +425,7 @@ void QCosmeticStroker::calculateLastPoint(qreal rx1, qreal ry1, qreal rx2, qreal swapped = true; qSwap(y1, y2); qSwap(x1, x2); + --x1; --x2; --y1; --y2; } int xinc = F16Dot16FixedDiv(x2 - x1, y2 - y1); int x = x1 << 10; @@ -455,6 +457,7 @@ void QCosmeticStroker::calculateLastPoint(qreal rx1, qreal ry1, qreal rx2, qreal swapped = true; qSwap(x1, x2); qSwap(y1, y2); + --x1; --x2; --y1; --y2; } int yinc = F16Dot16FixedDiv(y2 - y1, x2 - x1); int y = y1 << 10; @@ -525,7 +528,9 @@ void QCosmeticStroker::drawPath(const QVectorPath &path) const QPainterPath::ElementType *e = subPath(type, end, points, &closed); if (closed) { const qreal *p = points + 2*(e-type); - calculateLastPoint(p[-4], p[-3], p[-2], p[-1]); + QPointF p1 = QPointF(p[-4], p[-3]) * state->matrix; + QPointF p2 = QPointF(p[-2], p[-1]) * state->matrix; + calculateLastPoint(p1.x(), p1.y(), p2.x(), p2.y()); } int caps = (!closed & drawCaps) ? CapBegin : NoCaps; // qDebug() << "closed =" << closed << capString(caps); @@ -577,8 +582,10 @@ void QCosmeticStroker::drawPath(const QVectorPath &path) // handle closed path case bool closed = path.hasImplicitClose() || (points[0] == end[-2] && points[1] == end[-1]); int caps = (!closed & drawCaps) ? CapBegin : NoCaps; - if (closed) - calculateLastPoint(end[-2], end[-1], points[0], points[1]); + if (closed) { + QPointF p2 = QPointF(end[-2], end[-1]) * state->matrix; + calculateLastPoint(p2.x(), p2.y(), p.x(), p.y()); + } points += 2; while (points < end) { @@ -656,8 +663,8 @@ void QCosmeticStroker::renderCubicSubdivision(QCosmeticStroker::PointF *points, qreal dy = points[3].y - points[0].y; qreal len = ((qreal).25) * (qAbs(dx) + qAbs(dy)); - if (qAbs(dx * (points[0].y - points[2].y) - dy * (points[0].x - points[2].x)) > len || - qAbs(dx * (points[0].y - points[1].y) - dy * (points[0].x - points[1].x)) > len) { + if (qAbs(dx * (points[0].y - points[2].y) - dy * (points[0].x - points[2].x)) >= len || + qAbs(dx * (points[0].y - points[1].y) - dy * (points[0].x - points[1].x)) >= len) { splitCubic(points); --level; diff --git a/src/gui/painting/qmatrix.cpp b/src/gui/painting/qmatrix.cpp index d2c84f0485..767706a5bc 100644 --- a/src/gui/painting/qmatrix.cpp +++ b/src/gui/painting/qmatrix.cpp @@ -177,7 +177,7 @@ QT_BEGIN_NAMESPACE \endtable \sa QPainter, QTransform, {Coordinate System}, - {demos/affine}{Affine Transformations Demo}, {Transformations Example} + {painting/affine}{Affine Transformations Example}, {Transformations Example} */ diff --git a/src/gui/painting/qoutlinemapper.cpp b/src/gui/painting/qoutlinemapper.cpp index 7c17c1b46e..8b607b28b8 100644 --- a/src/gui/painting/qoutlinemapper.cpp +++ b/src/gui/painting/qoutlinemapper.cpp @@ -47,6 +47,8 @@ QT_BEGIN_NAMESPACE +static const qreal aliasedCoordinateDelta = 0.5 - 0.015625; + #define qreal_to_fixed_26_6(f) (int(f * 64)) @@ -214,6 +216,13 @@ void QOutlineMapper::endOutline() elements = m_elements_dev.data(); } + if (m_round_coords) { + // round coordinates to match outlines drawn with drawLine_midpoint_i + for (int i = 0; i < m_elements.size(); ++i) + elements[i] = QPointF(qFloor(elements[i].x() + aliasedCoordinateDelta), + qFloor(elements[i].y() + aliasedCoordinateDelta)); + } + controlPointRect = boundingRect(elements, element_count); #ifdef QT_DEBUG_CONVERT diff --git a/src/gui/painting/qoutlinemapper_p.h b/src/gui/painting/qoutlinemapper_p.h index 1432d6fc4b..388858ca44 100644 --- a/src/gui/painting/qoutlinemapper_p.h +++ b/src/gui/painting/qoutlinemapper_p.h @@ -95,7 +95,8 @@ public: m_tags(0), m_contours(0), m_polygon_dev(0), - m_in_clip_elements(false) + m_in_clip_elements(false), + m_round_coords(false) { } @@ -201,6 +202,8 @@ public: QT_FT_Outline *convertPath(const QPainterPath &path); QT_FT_Outline *convertPath(const QVectorPath &path); + void setCoordinateRounding(bool coordinateRounding) { m_round_coords = coordinateRounding; } + inline QPainterPath::ElementType *elementTypes() const { return m_element_types.size() == 0 ? 0 : m_element_types.data(); } public: @@ -234,6 +237,9 @@ public: bool m_valid; bool m_in_clip_elements; + +private: + bool m_round_coords; }; QT_END_NAMESPACE diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp index c93cb88135..09ffc8ec59 100644 --- a/src/gui/painting/qpaintengine_raster.cpp +++ b/src/gui/painting/qpaintengine_raster.cpp @@ -118,6 +118,8 @@ void dumpClip(int width, int height, const QClipData *clip); // 4 pixels. #define int_dim(pos, dim) (int(pos+dim) - int(pos)) +static const qreal aliasedCoordinateDelta = 0.5 - 0.015625; + #ifdef Q_OS_WIN static inline bool winClearTypeFontsEnabled() @@ -165,6 +167,10 @@ enum LineDrawMode { LineDrawIncludeLastPixel }; +static void drawEllipse_midpoint_i(const QRect &rect, const QRect &clip, + ProcessSpans pen_func, ProcessSpans brush_func, + QSpanData *pen_data, QSpanData *brush_data); + struct QRasterFloatPoint { qreal x; qreal y; @@ -479,10 +485,6 @@ bool QRasterPaintEngine::begin(QPaintDevice *device) } #endif -#if defined(Q_OS_WIN) - d->isPlain45DegreeRotation = true; -#endif - if (d->mono_surface) d->glyphCacheType = QFontEngineGlyphCache::Raster_Mono; #if defined(Q_OS_WIN) @@ -586,33 +588,6 @@ void QRasterPaintEngine::updateMatrix(const QTransform &matrix) s->flags.tx_noshear = qt_scaleForTransform(s->matrix, &s->txscale); ensureOutlineMapper(); - -#ifdef Q_OS_WIN - Q_D(QRasterPaintEngine); - d->isPlain45DegreeRotation = false; - if (txop >= QTransform::TxRotate) { - d->isPlain45DegreeRotation = - (qFuzzyIsNull(matrix.m11()) - && qFuzzyIsNull(matrix.m12() - qreal(1)) - && qFuzzyIsNull(matrix.m21() + qreal(1)) - && qFuzzyIsNull(matrix.m22()) - ) - || - (qFuzzyIsNull(matrix.m11() + qreal(1)) - && qFuzzyIsNull(matrix.m12()) - && qFuzzyIsNull(matrix.m21()) - && qFuzzyIsNull(matrix.m22() + qreal(1)) - ) - || - (qFuzzyIsNull(matrix.m11()) - && qFuzzyIsNull(matrix.m12() + qreal(1)) - && qFuzzyIsNull(matrix.m21() - qreal(1)) - && qFuzzyIsNull(matrix.m22()) - ) - ; - } -#endif - } @@ -1182,8 +1157,7 @@ void QRasterPaintEngine::clip(const QVectorPath &path, Qt::ClipOperation op) const QPainterPath::ElementType *types = path.elements(); // There are some cases that are not supported by clip(QRect) - if (op != Qt::UniteClip && (op != Qt::IntersectClip || !s->clip - || s->clip->hasRectClip || s->clip->hasRegionClip)) { + if (op != Qt::IntersectClip || !s->clip || s->clip->hasRectClip || s->clip->hasRegionClip) { if (s->matrix.type() <= QTransform::TxScale && ((path.shape() == QVectorPath::RectangleHint) || (isRect(points, path.elementCount()) @@ -1226,18 +1200,6 @@ void QRasterPaintEngine::clip(const QVectorPath &path, Qt::ClipOperation op) newClip->fixup(); - if (op == Qt::UniteClip) { - // merge clips - QClipData *result = new QClipData(d->rasterBuffer->height()); - QClipData *current = s->clip ? s->clip : new QClipData(d->rasterBuffer->height()); - qt_merge_clip(current, newClip, result); - result->fixup(); - delete newClip; - if (!s->clip) - delete current; - newClip = result; - } - if (s->flags.has_clip_ownership) delete s->clip; @@ -1263,7 +1225,7 @@ void QRasterPaintEngine::clip(const QRect &rect, Qt::ClipOperation op) if (op == Qt::NoClip) { qrasterpaintengine_state_setNoClip(s); - } else if (op == Qt::UniteClip || s->matrix.type() > QTransform::TxScale) { + } else if (s->matrix.type() > QTransform::TxScale) { QPaintEngineEx::clip(rect, op); return; @@ -1348,7 +1310,6 @@ void QRasterPaintEngine::clip(const QRegion ®ion, Qt::ClipOperation op) if (op == Qt::NoClip) { qrasterpaintengine_state_setNoClip(s); } else if (s->matrix.type() > QTransform::TxScale - || op == Qt::UniteClip || (op == Qt::IntersectClip && !clip->hasRectClip && !clip->hasRegionClip) || (op == Qt::ReplaceClip && !baseClip->hasRectClip && !baseClip->hasRegionClip)) { QPaintEngineEx::clip(region, op); @@ -1662,10 +1623,10 @@ void QRasterPaintEngine::stroke(const QVectorPath &path, const QPen &pen) static inline QRect toNormalizedFillRect(const QRectF &rect) { - int x1 = qRound(rect.x()); - int y1 = qRound(rect.y()); - int x2 = qRound(rect.right()); - int y2 = qRound(rect.bottom()); + int x1 = qRound(rect.x() + aliasedCoordinateDelta); + int y1 = qRound(rect.y() + aliasedCoordinateDelta); + int x2 = qRound(rect.right() + aliasedCoordinateDelta); + int y2 = qRound(rect.bottom() + aliasedCoordinateDelta); if (x2 < x1) qSwap(x1, x2); @@ -1935,7 +1896,9 @@ void QRasterPaintEngine::drawPolygon(const QPointF *points, int pointCount, Poly // Do the fill... ensureBrush(); if (s->brushData.blend) { + d->outlineMapper->setCoordinateRounding(s->penData.blend && s->flags.fast_pen && s->lastPen.brush().isOpaque()); fillPolygon(points, pointCount, mode); + d->outlineMapper->setCoordinateRounding(false); } } @@ -1982,6 +1945,7 @@ void QRasterPaintEngine::drawPolygon(const QPoint *points, int pointCount, Polyg if (s->brushData.blend) { // Compose polygon fill.., ensureOutlineMapper(); + d->outlineMapper->setCoordinateRounding(s->penData.blend != 0); d->outlineMapper->beginOutline(mode == WindingMode ? Qt::WindingFill : Qt::OddEvenFill); d->outlineMapper->moveTo(*points); const QPoint *p = points; @@ -1995,6 +1959,7 @@ void QRasterPaintEngine::drawPolygon(const QPoint *points, int pointCount, Polyg ProcessSpans brushBlend = d->getBrushFunc(d->outlineMapper->controlPointRect, &s->brushData); d->rasterize(d->outlineMapper->outline(), brushBlend, &s->brushData, d->rasterBuffer.data()); + d->outlineMapper->setCoordinateRounding(false); } } @@ -2244,7 +2209,10 @@ void QRasterPaintEngine::drawImage(const QRectF &r, const QImage &img, const QRe int sr_b = qCeil(sr.bottom()) - 1; if (s->matrix.type() <= QTransform::TxScale && !s->flags.antialiased && sr_l == sr_r && sr_t == sr_b) { + // as fillRect will apply the aliased coordinate delta we need to + // subtract it here as we don't use it for image drawing QTransform old = s->matrix; + s->matrix = s->matrix * QTransform::fromTranslate(-aliasedCoordinateDelta, -aliasedCoordinateDelta); // Do whatever fillRect() does, but without premultiplying the color if it's already premultiplied. QRgb color = img.pixel(sr_l, sr_t); @@ -2388,9 +2356,11 @@ void QRasterPaintEngine::drawImage(const QRectF &r, const QImage &img, const QRe d->initializeRasterizer(&d->image_filler_xform); d->rasterizer->setAntialiased(s->flags.antialiased); + const QPointF offs = s->flags.antialiased ? QPointF() : QPointF(aliasedCoordinateDelta, aliasedCoordinateDelta); + const QRectF &rect = r.normalized(); - const QPointF a = s->matrix.map((rect.topLeft() + rect.bottomLeft()) * 0.5f); - const QPointF b = s->matrix.map((rect.topRight() + rect.bottomRight()) * 0.5f); + const QPointF a = s->matrix.map((rect.topLeft() + rect.bottomLeft()) * 0.5f) - offs; + const QPointF b = s->matrix.map((rect.topRight() + rect.bottomRight()) * 0.5f) - offs; if (s->flags.tx_noshear) d->rasterizer->rasterizeLine(a, b, rect.height() / rect.width()); @@ -2399,12 +2369,13 @@ void QRasterPaintEngine::drawImage(const QRectF &r, const QImage &img, const QRe return; } #endif + const qreal offs = s->flags.antialiased ? qreal(0) : aliasedCoordinateDelta; QPainterPath path; path.addRect(r); QTransform m = s->matrix; s->matrix = QTransform(m.m11(), m.m12(), m.m13(), m.m21(), m.m22(), m.m23(), - m.m31(), m.m32(), m.m33()); + m.m31() - offs, m.m32() - offs, m.m33()); fillPath(path, &d->image_filler_xform); s->matrix = m; } else { @@ -2856,6 +2827,7 @@ bool QRasterPaintEngine::drawCachedGlyphs(int numGlyphs, const glyph_t *glyphs, rightShift = 3; // divide by 8 int margin = cache->glyphMargin(); + const QFixed offs = QFixed::fromReal(aliasedCoordinateDelta); const uchar *bits = image.bits(); for (int i=0; isetFontScale(matrix.m11()); ti.fontEngine->getGlyphPositions(ti.glyphs, matrix, ti.flags, glyphs, positions); + const QFixed aliasDelta = QFixed::fromReal(aliasedCoordinateDelta); + for (int i=0; igetCharacterData(glyphs[i], tmetrics, glyphBitmapBytes, glyphBitmapSize); - const int x = qFloor(positions[i].x + tmetrics.HorizBearingX()); - const int y = qFloor(positions[i].y - tmetrics.HorizBearingY()); + const int x = qFloor(positions[i].x + tmetrics.HorizBearingX() + aliasDelta); + const int y = qFloor(positions[i].y - tmetrics.HorizBearingY() + aliasDelta); alphaPenBlt(glyphBitmapBytes, glyphBitmapSize.iWidth, 8, x, y, glyphBitmapSize.iWidth, glyphBitmapSize.iHeight); } @@ -3010,6 +2984,19 @@ QRasterPaintEnginePrivate::getBrushFunc(const QRectF &rect, return isUnclipped(rect, 0) ? data->unclipped_blend : data->blend; } +inline ProcessSpans +QRasterPaintEnginePrivate::getPenFunc(const QRectF &rect, + const QSpanData *data) const +{ + Q_Q(const QRasterPaintEngine); + const QRasterPaintEngineState *s = q->state(); + + if (!s->flags.fast_pen && s->matrix.type() > QTransform::TxTranslate) + return data->blend; + const int penWidth = s->flags.fast_pen ? 1 : qCeil(s->lastPen.widthF()); + return isUnclipped(rect, penWidth) ? data->unclipped_blend : data->blend; +} + /*! \reimp */ @@ -3089,6 +3076,7 @@ void QRasterPaintEngine::drawTextItem(const QPointF &p, const QTextItem &textIte for(int i = 0; i < glyphs.size(); i++) { QImage img = fontEngine->alphaMapForGlyph(glyphs[i]); glyph_metrics_t metrics = fontEngine->boundingBox(glyphs[i]); + // ### hm, perhaps an QFixed offs = QFixed::fromReal(aliasedCoordinateDelta) is needed here? alphaPenBlt(img.bits(), img.bytesPerLine(), img.depth(), qRound(positions[i].x + metrics.x), qRound(positions[i].y + metrics.y), @@ -3269,6 +3257,30 @@ void QRasterPaintEngine::drawLines(const QLineF *lines, int lineCount) */ void QRasterPaintEngine::drawEllipse(const QRectF &rect) { + Q_D(QRasterPaintEngine); + QRasterPaintEngineState *s = state(); + + ensurePen(); + if (((qpen_style(s->lastPen) == Qt::SolidLine && s->flags.fast_pen) + || (qpen_style(s->lastPen) == Qt::NoPen)) + && !s->flags.antialiased + && qMax(rect.width(), rect.height()) < QT_RASTER_COORD_LIMIT + && !rect.isEmpty() + && s->matrix.type() <= QTransform::TxScale) // no shear + { + ensureBrush(); + const QRectF r = s->matrix.mapRect(rect); + ProcessSpans penBlend = d->getPenFunc(r, &s->penData); + ProcessSpans brushBlend = d->getBrushFunc(r, &s->brushData); + const QRect brect = QRect(int(r.x()), int(r.y()), + int_dim(r.x(), r.width()), + int_dim(r.y(), r.height())); + if (brect == r) { + drawEllipse_midpoint_i(brect, d->deviceRect, penBlend, brushBlend, + &s->penData, &s->brushData); + return; + } + } QPaintEngineEx::drawEllipse(rect); } @@ -4221,7 +4233,6 @@ static void qt_span_clip(int count, const QSpan *spans, void *userData) } break; - case Qt::UniteClip: case Qt::ReplaceClip: clipData->newClip->appendSpans(spans, count); break; @@ -4767,6 +4778,125 @@ void QSpanData::initTexture(const QImage *image, int alpha, QTextureData::Type _ adjustSpanMethods(); } +/*! + \internal + \a x and \a y is relative to the midpoint of \a rect. +*/ +static inline void drawEllipsePoints(int x, int y, int length, + const QRect &rect, + const QRect &clip, + ProcessSpans pen_func, ProcessSpans brush_func, + QSpanData *pen_data, QSpanData *brush_data) +{ + if (length == 0) + return; + + QT_FT_Span outline[4]; + const int midx = rect.x() + (rect.width() + 1) / 2; + const int midy = rect.y() + (rect.height() + 1) / 2; + + x = x + midx; + y = midy - y; + + // topleft + outline[0].x = midx + (midx - x) - (length - 1) - (rect.width() & 0x1); + outline[0].len = qMin(length, x - outline[0].x); + outline[0].y = y; + outline[0].coverage = 255; + + // topright + outline[1].x = x; + outline[1].len = length; + outline[1].y = y; + outline[1].coverage = 255; + + // bottomleft + outline[2].x = outline[0].x; + outline[2].len = outline[0].len; + outline[2].y = midy + (midy - y) - (rect.height() & 0x1); + outline[2].coverage = 255; + + // bottomright + outline[3].x = x; + outline[3].len = length; + outline[3].y = outline[2].y; + outline[3].coverage = 255; + + if (brush_func && outline[0].x + outline[0].len < outline[1].x) { + QT_FT_Span fill[2]; + + // top fill + fill[0].x = outline[0].x + outline[0].len - 1; + fill[0].len = qMax(0, outline[1].x - fill[0].x); + fill[0].y = outline[1].y; + fill[0].coverage = 255; + + // bottom fill + fill[1].x = outline[2].x + outline[2].len - 1; + fill[1].len = qMax(0, outline[3].x - fill[1].x); + fill[1].y = outline[3].y; + fill[1].coverage = 255; + + int n = (fill[0].y >= fill[1].y ? 1 : 2); + n = qt_intersect_spans(fill, n, clip); + if (n > 0) + brush_func(n, fill, brush_data); + } + if (pen_func) { + int n = (outline[1].y >= outline[2].y ? 2 : 4); + n = qt_intersect_spans(outline, n, clip); + if (n > 0) + pen_func(n, outline, pen_data); + } +} + +/*! + \internal + Draws an ellipse using the integer point midpoint algorithm. +*/ +static void drawEllipse_midpoint_i(const QRect &rect, const QRect &clip, + ProcessSpans pen_func, ProcessSpans brush_func, + QSpanData *pen_data, QSpanData *brush_data) +{ + const qreal a = qreal(rect.width()) / 2; + const qreal b = qreal(rect.height()) / 2; + qreal d = b*b - (a*a*b) + 0.25*a*a; + + int x = 0; + int y = (rect.height() + 1) / 2; + int startx = x; + + // region 1 + while (a*a*(2*y - 1) > 2*b*b*(x + 1)) { + if (d < 0) { // select E + d += b*b*(2*x + 3); + ++x; + } else { // select SE + d += b*b*(2*x + 3) + a*a*(-2*y + 2); + drawEllipsePoints(startx, y, x - startx + 1, rect, clip, + pen_func, brush_func, pen_data, brush_data); + startx = ++x; + --y; + } + } + drawEllipsePoints(startx, y, x - startx + 1, rect, clip, + pen_func, brush_func, pen_data, brush_data); + + // region 2 + d = b*b*(x + 0.5)*(x + 0.5) + a*a*((y - 1)*(y - 1) - b*b); + const int miny = rect.height() & 0x1; + while (y > miny) { + if (d < 0) { // select SE + d += b*b*(2*x + 2) + a*a*(-2*y + 3); + ++x; + } else { // select S + d += a*a*(-2*y + 3); + } + --y; + drawEllipsePoints(x, y, 1, rect, clip, + pen_func, brush_func, pen_data, brush_data); + } +} /*! \fn void QRasterPaintEngine::drawPoints(const QPoint *points, int pointCount) diff --git a/src/gui/painting/qpaintengine_raster_p.h b/src/gui/painting/qpaintengine_raster_p.h index 9bdfbff9f6..d387e1312a 100644 --- a/src/gui/painting/qpaintengine_raster_p.h +++ b/src/gui/painting/qpaintengine_raster_p.h @@ -314,6 +314,7 @@ public: bool isUnclipped_normalized(const QRect &rect) const; bool isUnclipped(const QRect &rect, int penWidth) const; bool isUnclipped(const QRectF &rect, int penWidth) const; + ProcessSpans getPenFunc(const QRectF &rect, const QSpanData *data) const; ProcessSpans getBrushFunc(const QRect &rect, const QSpanData *data) const; ProcessSpans getBrushFunc(const QRectF &rect, const QSpanData *data) const; @@ -356,10 +357,6 @@ public: uint mono_surface : 1; uint outlinemapper_xform_dirty : 1; -#ifdef Q_OS_WIN - uint isPlain45DegreeRotation : 1; -#endif - QScopedPointer rasterizer; }; diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp index d46b30b6e2..be5c41ce76 100644 --- a/src/gui/painting/qpainter.cpp +++ b/src/gui/painting/qpainter.cpp @@ -1092,19 +1092,19 @@ void QPainterPrivate::updateState(QPainterState *newState) function that draws the outline of the given path (i.e. strokes the path). - See also the \l {demos/deform}{Vector Deformation} demo which + See also the \l {painting/deform}{Vector Deformation} example which shows how to use advanced vector techniques to draw text using a - QPainterPath, the \l {demos/gradients}{Gradients} demo which shows + QPainterPath, the \l {painting/gradients}{Gradients} example which shows the different types of gradients that are available in Qt, and the \l - {demos/pathstroke}{Path Stroking} demo which shows Qt's built-in + {painting/pathstroke}{Path Stroking} example which shows Qt's built-in dash patterns and shows how custom patterns can be used to extend the range of available patterns. \table \header - \o \l {demos/deform}{Vector Deformation} - \o \l {demos/gradients}{Gradients} - \o \l {demos/pathstroke}{Path Stroking} + \o \l {painting/deform}{Vector Deformation} + \o \l {painting/gradients}{Gradients} + \o \l {painting/pathstroke}{Path Stroking} \row \o \inlineimage qpainter-vectordeformation.png \o \inlineimage qpainter-gradients.png @@ -1196,7 +1196,7 @@ void QPainterPrivate::updateState(QPainterState *newState) rotate it clockwise and translate() to translate it (i.e. adding a given offset to the points). You can also twist the coordinate system around the origin using the shear() function. See the \l - {demos/affine}{Affine Transformations} demo for a visualization of + {painting/affine}{Affine Transformations} example for a visualization of a sheared coordinate system. See also the \l {painting/transformations}{Transformations} @@ -1207,9 +1207,9 @@ void QPainterPrivate::updateState(QPainterState *newState) \table 100% \row \o - \bold {Affine Transformations Demo} + \bold {Affine Transformations Example} - The \l {demos/affine}{Affine Transformations} demo show Qt's + The \l {painting/affine}{Affine Transformations} example shows Qt's ability to perform affine transformations on painting operations. The demo also allows the user to experiment with the transformation operations and see the results immediately. @@ -1293,8 +1293,8 @@ void QPainterPrivate::updateState(QPainterState *newState) \o \bold {Composition Modes Demo} - The \l {demos/composition}{Composition Modes} demo, available in - Qt's demo directory, allows you to experiment with the various + The \l {painting/composition}{Composition Modes} example, available in + Qt's examples directory, allows you to experiment with the various composition modes and see the results immediately. \endtable @@ -2526,8 +2526,6 @@ QRegion QPainter::clipRegion() const } if (info.operation == Qt::IntersectClip) region &= info.region * matrix; - else if (info.operation == Qt::UniteClip) - region |= info.region * matrix; else if (info.operation == Qt::NoClip) { lastWasNothing = true; region = QRegion(); @@ -2547,9 +2545,6 @@ QRegion QPainter::clipRegion() const if (info.operation == Qt::IntersectClip) { region &= QRegion((info.path * matrix).toFillPolygon().toPolygon(), info.path.fillRule()); - } else if (info.operation == Qt::UniteClip) { - region |= QRegion((info.path * matrix).toFillPolygon().toPolygon(), - info.path.fillRule()); } else if (info.operation == Qt::NoClip) { lastWasNothing = true; region = QRegion(); @@ -2573,8 +2568,6 @@ QRegion QPainter::clipRegion() const region &= matrix.mapRect(info.rect); else region &= matrix.map(QRegion(info.rect)); - } else if (info.operation == Qt::UniteClip) { - region |= QRegion(info.rect) * matrix; } else if (info.operation == Qt::NoClip) { lastWasNothing = true; region = QRegion(); @@ -2597,8 +2590,6 @@ QRegion QPainter::clipRegion() const region &= matrix.mapRect(info.rectf.toRect()); else region &= matrix.map(QRegion(info.rectf.toRect())); - } else if (info.operation == Qt::UniteClip) { - region |= QRegion(info.rectf.toRect()) * matrix; } else if (info.operation == Qt::NoClip) { lastWasNothing = true; region = QRegion(); @@ -2687,7 +2678,7 @@ QRectF QPainter::clipBoundingRect() const } // Accumulate the bounding box in device space. This is not 100% - // precise, but it fits within the guarantee and it is resonably + // precise, but it fits within the guarantee and it is reasonably // fast. QRectF bounds; for (int i=0; istate->clipInfo.size(); ++i) { @@ -2709,8 +2700,6 @@ QRectF QPainter::clipBoundingRect() const bounds = r; else if (info.operation == Qt::IntersectClip) bounds &= r; - else if (info.operation == Qt::UniteClip) - bounds |= r; } @@ -2739,7 +2728,7 @@ void QPainter::setClipRect(const QRectF &rect, Qt::ClipOperation op) Q_D(QPainter); if (d->extended) { - if ((!d->state->clipEnabled && op != Qt::NoClip) || (d->state->clipOperation == Qt::NoClip && op == Qt::UniteClip)) + if ((!d->state->clipEnabled && op != Qt::NoClip)) op = Qt::ReplaceClip; if (!d->engine) { @@ -2797,7 +2786,7 @@ void QPainter::setClipRect(const QRect &rect, Qt::ClipOperation op) return; } - if ((!d->state->clipEnabled && op != Qt::NoClip) || (d->state->clipOperation == Qt::NoClip && op == Qt::UniteClip)) + if ((!d->state->clipEnabled && op != Qt::NoClip)) op = Qt::ReplaceClip; if (d->extended) { @@ -2852,7 +2841,7 @@ void QPainter::setClipRegion(const QRegion &r, Qt::ClipOperation op) return; } - if ((!d->state->clipEnabled && op != Qt::NoClip) || (d->state->clipOperation == Qt::NoClip && op == Qt::UniteClip)) + if ((!d->state->clipEnabled && op != Qt::NoClip)) op = Qt::ReplaceClip; if (d->extended) { @@ -3257,7 +3246,7 @@ void QPainter::setClipPath(const QPainterPath &path, Qt::ClipOperation op) return; } - if ((!d->state->clipEnabled && op != Qt::NoClip) || (d->state->clipOperation == Qt::NoClip && op == Qt::UniteClip)) + if ((!d->state->clipEnabled && op != Qt::NoClip)) op = Qt::ReplaceClip; if (d->extended) { @@ -3374,7 +3363,7 @@ void QPainter::fillPath(const QPainterPath &path, const QBrush &brush) \endtable \sa {painting/painterpaths}{the Painter Paths - example},{demos/deform}{the Vector Deformation demo} + example},{painting/deform}{the Vector Deformation example} */ void QPainter::drawPath(const QPainterPath &path) { @@ -5658,6 +5647,8 @@ void QPainter::drawImage(const QRectF &targetRect, const QImage &image, const QR } /*! + \fn void QPainter::drawGlyphRun(const QPointF &position, const QGlyphRun &glyphs) + Draws the glyphs represented by \a glyphs at \a position. The \a position gives the edge of the baseline for the string of glyphs. The glyphs will be retrieved from the font selected on \a glyphs and at offsets given by the positions in \a glyphs. diff --git a/src/gui/painting/qpainterpath.cpp b/src/gui/painting/qpainterpath.cpp index c238578199..8bb599f9f0 100644 --- a/src/gui/painting/qpainterpath.cpp +++ b/src/gui/painting/qpainterpath.cpp @@ -305,19 +305,19 @@ static void qt_debug_path(const QPainterPath &path) \section1 Examples Qt provides the \l {painting/painterpaths}{Painter Paths Example} - and the \l {demos/deform}{Vector Deformation Demo} which are - located in Qt's example and demo directories respectively. + and the \l {painting/deform}{Vector Deformation example} which are + located in Qt's example directory. The \l {painting/painterpaths}{Painter Paths Example} shows how painter paths can be used to build complex shapes for rendering and lets the user experiment with the filling and stroking. The - \l {demos/deform}{Vector Deformation Demo} shows how to use + \l {painting/deform}{Vector Deformation Example} shows how to use QPainterPath to draw text. \table \header \o \l {painting/painterpaths}{Painter Paths Example} - \o \l {demos/deform}{Vector Deformation Demo} + \o \l {painting/deform}{Vector Deformation Example} \row \o \inlineimage qpainterpath-example.png \o \inlineimage qpainterpath-demo.png diff --git a/src/gui/painting/qpen.cpp b/src/gui/painting/qpen.cpp index cc652d84f2..7185f0d346 100644 --- a/src/gui/painting/qpen.cpp +++ b/src/gui/painting/qpen.cpp @@ -214,14 +214,14 @@ typedef QPenPrivate QPenData; \table 100% \row \o \inlineimage qpen-demo.png - \o \bold {\l {demos/pathstroke}{The Path Stroking Demo}} + \o \bold {\l {painting/pathstroke}{The Path Stroking Example}} - The Path Stroking demo shows Qt's built-in dash patterns and shows + The Path Stroking example shows Qt's built-in dash patterns and shows how custom patterns can be used to extend the range of available patterns. \endtable - \sa QPainter, QBrush, {demos/pathstroke}{Path Stroking Demo}, + \sa QPainter, QBrush, {painting/pathstroke}{Path Stroking Example}, {Scribble Example} */ diff --git a/src/gui/painting/qrasterizer.cpp b/src/gui/painting/qrasterizer.cpp index 6c5edbc44d..1d3f581b88 100644 --- a/src/gui/painting/qrasterizer.cpp +++ b/src/gui/painting/qrasterizer.cpp @@ -62,8 +62,8 @@ typedef int Q16Dot16; #define SPAN_BUFFER_SIZE 256 -#define COORD_ROUNDING 0 // 0: round up, 1: round down -#define COORD_OFFSET 0 // 26.6, 32 is half a pixel +#define COORD_ROUNDING 1 // 0: round up, 1: round down +#define COORD_OFFSET 32 // 26.6, 32 is half a pixel static inline QT_FT_Vector PointToVector(const QPointF &p) { diff --git a/src/gui/painting/qtransform.cpp b/src/gui/painting/qtransform.cpp index 4d7b3391a6..e42eec6f96 100644 --- a/src/gui/painting/qtransform.cpp +++ b/src/gui/painting/qtransform.cpp @@ -223,8 +223,8 @@ QT_BEGIN_NAMESPACE \snippet doc/src/snippets/transform/main.cpp 2 \endtable - \sa QPainter, {Coordinate System}, {demos/affine}{Affine - Transformations Demo}, {Transformations Example} + \sa QPainter, {Coordinate System}, {painting/affine}{Affine + Transformations Example}, {Transformations Example} */ /*! diff --git a/src/gui/text/qfont.cpp b/src/gui/text/qfont.cpp index 846d5a3814..b85c045064 100644 --- a/src/gui/text/qfont.cpp +++ b/src/gui/text/qfont.cpp @@ -73,7 +73,8 @@ #include #endif -#include +#include +#include // #define QFONTCACHE_DEBUG #ifdef QFONTCACHE_DEBUG @@ -140,7 +141,7 @@ bool QFontDef::exactMatch(const QFontDef &other) const && weight == other.weight && style == other.style && this_family == other_family - && styleName == other.styleName + && (styleName.isEmpty() || other.styleName.isEmpty() || styleName == other.styleName) && (this_foundry.isEmpty() || other_foundry.isEmpty() || this_foundry == other_foundry) diff --git a/src/gui/text/qfont_p.h b/src/gui/text/qfont_p.h index 4ae31c38d6..ebc842c794 100644 --- a/src/gui/text/qfont_p.h +++ b/src/gui/text/qfont_p.h @@ -113,7 +113,7 @@ struct QFontDef && styleStrategy == other.styleStrategy && ignorePitch == other.ignorePitch && fixedPitch == other.fixedPitch && family == other.family - && styleName == other.styleName + && (styleName.isEmpty() || other.styleName.isEmpty() || styleName == other.styleName) && hintingPreference == other.hintingPreference #ifdef Q_WS_X11 && addStyle == other.addStyle diff --git a/src/gui/text/qfontdatabase.cpp b/src/gui/text/qfontdatabase.cpp index 5369ac52f3..98b43d5b5e 100644 --- a/src/gui/text/qfontdatabase.cpp +++ b/src/gui/text/qfontdatabase.cpp @@ -218,16 +218,17 @@ struct QtFontStyle Key(const QString &styleString); Key() : style(QFont::StyleNormal), weight(QFont::Normal), stretch(0) { } - Key(const Key &o) : style(o.style), + Key(const Key &o) : styleName(o.styleName), style(o.style), weight(o.weight), stretch(o.stretch) { } + QString styleName; uint style : 2; signed int weight : 8; signed int stretch : 12; bool operator==(const Key & other) { - return (style == other.style && + return styleName == other.styleName && style == other.style && weight == other.weight && - (stretch == 0 || other.stretch == 0 || stretch == other.stretch)); + (stretch == 0 || other.stretch == 0 || stretch == other.stretch); } bool operator!=(const Key &other) { return !operator==(other); @@ -292,7 +293,7 @@ struct QtFontStyle }; QtFontStyle::Key::Key(const QString &styleString) - : style(QFont::StyleNormal), weight(QFont::Normal), stretch(0) + : styleName(styleString), style(QFont::StyleNormal), weight(QFont::Normal), stretch(0) { weight = getFontWeight(styleString); @@ -1139,6 +1140,12 @@ static QtFontStyle *bestStyle(QtFontFoundry *foundry, const QtFontStyle::Key &st for ( int i = 0; i < foundry->count; i++ ) { QtFontStyle *style = foundry->styles[i]; + if (!styleKey.styleName.isEmpty() && styleKey.styleName == style->key.styleName) { + dist = 0; + best = i; + break; + } + int d = qAbs( styleKey.weight - style->key.weight ); if ( styleKey.stretch != 0 && style->key.stretch != 0 ) { @@ -1532,7 +1539,8 @@ static QString styleStringHelper(int weight, QFont::Style style) */ QString QFontDatabase::styleString(const QFont &font) { - return styleStringHelper(font.weight(), font.style()); + return font.styleName().isEmpty() ? styleStringHelper(font.weight(), font.style()) + : font.styleName(); } /*! @@ -1542,7 +1550,8 @@ QString QFontDatabase::styleString(const QFont &font) */ QString QFontDatabase::styleString(const QFontInfo &fontInfo) { - return styleStringHelper(fontInfo.weight(), fontInfo.style()); + return fontInfo.styleName().isEmpty() ? styleStringHelper(fontInfo.weight(), fontInfo.style()) + : fontInfo.styleName(); } @@ -1793,8 +1802,12 @@ QStringList QFontDatabase::styles(const QString &family) const } } - for (int i = 0; i < allStyles.count; i++) - l.append(styleStringHelper(allStyles.styles[i]->key.weight, (QFont::Style)allStyles.styles[i]->key.style)); + for (int i = 0; i < allStyles.count; i++) { + l.append(allStyles.styles[i]->key.styleName.isEmpty() ? + styleStringHelper(allStyles.styles[i]->key.weight, + (QFont::Style)allStyles.styles[i]->key.style) : + allStyles.styles[i]->key.styleName); + } return l; } @@ -2017,9 +2030,16 @@ QFont QFontDatabase::font(const QString &family, const QString &style, if (!s) // no styles found? return QGuiApplication::font(); - QFont fnt(family, pointSize, s->key.weight); - fnt.setStyle((QFont::Style)s->key.style); - return fnt; + if (s->key.styleName.isEmpty()) { + QFont fnt(family, pointSize, s->key.weight); + fnt.setStyle((QFont::Style)s->key.style); + return fnt; + } else { + // found a perfect match + QFont fnt(family, pointSize); + fnt.setStyleName(s->key.styleName); + return fnt; + } } diff --git a/src/gui/text/qfontenginedirectwrite.cpp b/src/gui/text/qfontenginedirectwrite.cpp index 890cad9824..d6932738f5 100644 --- a/src/gui/text/qfontenginedirectwrite.cpp +++ b/src/gui/text/qfontenginedirectwrite.cpp @@ -390,6 +390,60 @@ glyph_metrics_t QFontEngineDirectWrite::boundingBox(const QGlyphLayout &glyphs) return glyph_metrics_t(0, -m_ascent, w - lastRightBearing(glyphs), m_ascent + m_descent, w, 0); } +glyph_metrics_t QFontEngineDirectWrite::alphaMapBoundingBox(glyph_t glyph, QFixed subPixelPosition, + const QTransform &matrix, + GlyphFormat /*format*/) +{ + glyph_metrics_t bbox = QFontEngine::boundingBox(glyph, matrix); // To get transformed advance + + UINT16 glyphIndex = glyph; + FLOAT glyphAdvance = 0; + + DWRITE_GLYPH_OFFSET glyphOffset; + glyphOffset.advanceOffset = 0; + glyphOffset.ascenderOffset = 0; + + DWRITE_GLYPH_RUN glyphRun; + glyphRun.fontFace = m_directWriteFontFace; + glyphRun.fontEmSize = fontDef.pixelSize; + glyphRun.glyphCount = 1; + glyphRun.glyphIndices = &glyphIndex; + glyphRun.glyphAdvances = &glyphAdvance; + glyphRun.isSideways = false; + glyphRun.bidiLevel = 0; + glyphRun.glyphOffsets = &glyphOffset; + + DWRITE_MATRIX transform; + transform.dx = subPixelPosition.toReal(); + transform.dy = 0; + transform.m11 = matrix.m11(); + transform.m12 = matrix.m12(); + transform.m21 = matrix.m21(); + transform.m22 = matrix.m22(); + + IDWriteGlyphRunAnalysis *glyphAnalysis = NULL; + HRESULT hr = m_directWriteFactory->CreateGlyphRunAnalysis( + &glyphRun, + 1.0f, + &transform, + DWRITE_RENDERING_MODE_CLEARTYPE_NATURAL_SYMMETRIC, + DWRITE_MEASURING_MODE_NATURAL, + 0.0, 0.0, + &glyphAnalysis + ); + + if (SUCCEEDED(hr)) { + RECT rect; + glyphAnalysis->GetAlphaTextureBounds(DWRITE_TEXTURE_CLEARTYPE_3x1, &rect); + glyphAnalysis->Release(); + + return glyph_metrics_t(rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, + bbox.xoff, bbox.yoff); + } else { + return glyph_metrics_t(); + } +} + glyph_metrics_t QFontEngineDirectWrite::boundingBox(glyph_t g) { if (m_directWriteFontFace == 0) @@ -459,9 +513,10 @@ qreal QFontEngineDirectWrite::maxCharWidth() const extern uint qt_pow_gamma[256]; -QImage QFontEngineDirectWrite::alphaMapForGlyph(glyph_t glyph, QFixed subPixelPosition) +QImage QFontEngineDirectWrite::alphaMapForGlyph(glyph_t glyph, QFixed subPixelPosition, + const QTransform &xform) { - QImage im = imageForGlyph(glyph, subPixelPosition, 0, QTransform()); + QImage im = imageForGlyph(glyph, subPixelPosition, 0, xform); QImage indexed(im.width(), im.height(), QImage::Format_Indexed8); QVector colors(256); @@ -492,12 +547,8 @@ QImage QFontEngineDirectWrite::imageForGlyph(glyph_t t, int margin, const QTransform &xform) { - glyph_metrics_t metrics = QFontEngine::boundingBox(t, xform); - int width = (metrics.width + margin * 2 + 4).ceil().toInt() ; - int height = (metrics.height + margin * 2 + 4).ceil().toInt(); - UINT16 glyphIndex = t; - FLOAT glyphAdvance = metrics.xoff.toReal(); + FLOAT glyphAdvance = 0; DWRITE_GLYPH_OFFSET glyphOffset; glyphOffset.advanceOffset = 0; @@ -513,12 +564,9 @@ QImage QFontEngineDirectWrite::imageForGlyph(glyph_t t, glyphRun.bidiLevel = 0; glyphRun.glyphOffsets = &glyphOffset; - QFixed x = margin - metrics.x.round() + subPixelPosition; - QFixed y = margin - metrics.y.floor(); - DWRITE_MATRIX transform; - transform.dx = x.toReal(); - transform.dy = y.toReal(); + transform.dx = subPixelPosition.toReal(); + transform.dy = 0; transform.m11 = xform.m11(); transform.m12 = xform.m12(); transform.m21 = xform.m21(); @@ -537,48 +585,54 @@ QImage QFontEngineDirectWrite::imageForGlyph(glyph_t t, if (SUCCEEDED(hr)) { RECT rect; - rect.left = 0; - rect.top = 0; - rect.right = width; - rect.bottom = height; + glyphAnalysis->GetAlphaTextureBounds(DWRITE_TEXTURE_CLEARTYPE_3x1, &rect); + + rect.left -= margin; + rect.top -= margin; + rect.right += margin; + rect.bottom += margin; + + int width = rect.right - rect.left; + int height = rect.bottom - rect.top; int size = width * height * 3; - BYTE *alphaValues = new BYTE[size]; - qMemSet(alphaValues, size, 0); + if (size > 0) { + BYTE *alphaValues = new BYTE[size]; + qMemSet(alphaValues, size, 0); - hr = glyphAnalysis->CreateAlphaTexture(DWRITE_TEXTURE_CLEARTYPE_3x1, - &rect, - alphaValues, - size); + hr = glyphAnalysis->CreateAlphaTexture(DWRITE_TEXTURE_CLEARTYPE_3x1, + &rect, + alphaValues, + size); - if (SUCCEEDED(hr)) { - QImage img(width, height, QImage::Format_RGB32); - img.fill(0xffffffff); + if (SUCCEEDED(hr)) { + QImage img(width, height, QImage::Format_RGB32); + img.fill(0xffffffff); - for (int y=0; y(img.scanLine(y)); - BYTE *src = alphaValues + width * 3 * y; + for (int y=0; y(img.scanLine(y)); + BYTE *src = alphaValues + width * 3 * y; - for (int x=0; xRelease(); + + return img; + } else { + delete[] alphaValues; + glyphAnalysis->Release(); + + qErrnoWarning("QFontEngineDirectWrite::imageForGlyph: CreateAlphaTexture failed"); } - - delete[] alphaValues; - glyphAnalysis->Release(); - - return img; - } else { - delete[] alphaValues; - glyphAnalysis->Release(); - - qErrnoWarning("QFontEngineDirectWrite::imageForGlyph: CreateAlphaTexture failed"); } - } else { qErrnoWarning("QFontEngineDirectWrite::imageForGlyph: CreateGlyphRunAnalysis failed"); } diff --git a/src/gui/text/qfontenginedirectwrite_p.h b/src/gui/text/qfontenginedirectwrite_p.h index d0086fc49b..edf1e6a182 100644 --- a/src/gui/text/qfontenginedirectwrite_p.h +++ b/src/gui/text/qfontenginedirectwrite_p.h @@ -86,6 +86,10 @@ public: glyph_metrics_t boundingBox(const QGlyphLayout &glyphs); glyph_metrics_t boundingBox(glyph_t g); + glyph_metrics_t alphaMapBoundingBox(glyph_t glyph, + QFixed subPixelPosition, + const QTransform &matrix, + GlyphFormat format); QFixed ascent() const; QFixed descent() const; @@ -97,7 +101,7 @@ public: bool supportsSubPixelPositions() const; - QImage alphaMapForGlyph(glyph_t glyph, QFixed subPixelPosition); + QImage alphaMapForGlyph(glyph_t, QFixed subPixelPosition, const QTransform &t); QImage alphaRGBMapForGlyph(glyph_t t, QFixed subPixelPosition, int margin, const QTransform &xform); diff --git a/src/gui/text/qglyphrun.cpp b/src/gui/text/qglyphrun.cpp index 18b6357863..cc825525c4 100644 --- a/src/gui/text/qglyphrun.cpp +++ b/src/gui/text/qglyphrun.cpp @@ -175,7 +175,8 @@ QRawFont QGlyphRun::rawFont() const } /*! - Sets the font in which to look up the glyph indexes to \a font. + Sets the font in which to look up the glyph indexes to the \a rawFont + specified. \sa rawFont(), setGlyphIndexes() */ diff --git a/src/gui/text/qharfbuzz_copy_p.h b/src/gui/text/qharfbuzz_copy_p.h index 835d8fb1a6..10356e4aea 100644 --- a/src/gui/text/qharfbuzz_copy_p.h +++ b/src/gui/text/qharfbuzz_copy_p.h @@ -66,6 +66,13 @@ typedef enum { HB_Err_Out_Of_Memory = 0xDEAD } HB_Error; +typedef enum { + HB_NoBreak, + HB_SoftHyphen, + HB_Break, + HB_ForcedBreak +} HB_LineBreakType; + typedef QT_PREPEND_NAMESPACE(quint32) HB_Glyph; typedef void * HB_Font; typedef void * HB_Face; diff --git a/src/gui/text/qplatformfontdatabase_qpa.cpp b/src/gui/text/qplatformfontdatabase_qpa.cpp index 7e829dbd3f..059dc3e188 100644 --- a/src/gui/text/qplatformfontdatabase_qpa.cpp +++ b/src/gui/text/qplatformfontdatabase_qpa.cpp @@ -52,7 +52,7 @@ extern void qt_registerFont(const QString &familyname, const QString &foundrynam const QSupportedWritingSystems &writingSystems, void *hanlde); /*! - \fn void QPlatformFontDatabase::registerQPF2Font(const QByteArray &dataArray, void *) + \fn void QPlatformFontDatabase::registerQPF2Font(const QByteArray &dataArray, void *handle) Registers the pre-rendered QPF2 font contained in the given \a dataArray. @@ -149,17 +149,26 @@ public: QVector vector; }; +/*! + Constructs a new object to handle supported writing systems. +*/ QSupportedWritingSystems::QSupportedWritingSystems() { d = new QWritingSystemsPrivate; } +/*! + Constructs a copy of the \a other writing systems object. +*/ QSupportedWritingSystems::QSupportedWritingSystems(const QSupportedWritingSystems &other) { d = other.d; d->ref.ref(); } +/*! + Constructs a copy of the \a other writing systems object. +*/ QSupportedWritingSystems &QSupportedWritingSystems::operator=(const QSupportedWritingSystems &other) { if (d != other.d) { @@ -171,12 +180,18 @@ QSupportedWritingSystems &QSupportedWritingSystems::operator=(const QSupportedWr return *this; } +/*! + Destroys the supported writing systems object. +*/ QSupportedWritingSystems::~QSupportedWritingSystems() { if (!d->ref.deref()) delete d; } +/*! + \internal +*/ void QSupportedWritingSystems::detach() { if (d->ref != 1) { @@ -187,12 +202,20 @@ void QSupportedWritingSystems::detach() } } +/*! + Sets or clears support for the specified \a writingSystem based on the + value given by \a support. +*/ void QSupportedWritingSystems::setSupported(QFontDatabase::WritingSystem writingSystem, bool support) { detach(); d->vector[writingSystem] = support; } +/*! + Returns true if the writing system specified by \a writingSystem is + supported; otherwise returns false. +*/ bool QSupportedWritingSystems::supported(QFontDatabase::WritingSystem writingSystem) const { return d->vector.at(writingSystem); @@ -210,10 +233,12 @@ bool QSupportedWritingSystems::supported(QFontDatabase::WritingSystem writingSys */ /*! - This function is called once at startup by Qts internal fontdatabase. Reimplement this function - in a subclass for a convenient place to initialise the internal fontdatabase. + This function is called once at startup by Qt's internal font database. + Reimplement this function in a subclass for a convenient place to initialize + the internal font database. - The default implementation looks in the fontDir() location and registers all qpf2 fonts. + The default implementation looks in the fontDir() location and registers all + QPF2 fonts. */ void QPlatformFontDatabase::populateFontDatabase() { @@ -294,7 +319,7 @@ QStringList QPlatformFontDatabase::addApplicationFont(const QByteArray &fontData } /*! - + Releases the specified font \a handle. */ void QPlatformFontDatabase::releaseHandle(void *handle) { @@ -303,7 +328,7 @@ void QPlatformFontDatabase::releaseHandle(void *handle) } /*! - + Returns the directory containing the fonts used by the database. */ QString QPlatformFontDatabase::fontDir() const { diff --git a/src/gui/text/qrawfont.cpp b/src/gui/text/qrawfont.cpp index 71762df09f..4c65ad5de0 100644 --- a/src/gui/text/qrawfont.cpp +++ b/src/gui/text/qrawfont.cpp @@ -392,6 +392,30 @@ qreal QRawFont::unitsPerEm() const return d->fontEngine->emSquareSize().toReal(); } +/*! + Returns the thickness for drawing lines (underline, overline, etc.) + along with text drawn in this font. + */ +qreal QRawFont::lineThickness() const +{ + if (!isValid()) + return 0.0; + + return d->fontEngine->lineThickness().toReal(); +} + +/*! + Returns the position from baseline for drawing underlines below the text + rendered with this font. + */ +qreal QRawFont::underlinePosition() const +{ + if (!isValid()) + return 0.0; + + return d->fontEngine->underlinePosition().toReal(); +} + /*! Returns the family name of this QRawFont. */ @@ -652,6 +676,9 @@ extern int qt_script_for_writing_system(QFontDatabase::WritingSystem writingSyst /*! Fetches the physical representation based on a \a font query. The physical font returned is the font that will be preferred by Qt in order to display text in the selected \a writingSystem. + + \warning This function is potentially expensive and should not be called in performance + sensitive code. */ QRawFont QRawFont::fromFont(const QFont &font, QFontDatabase::WritingSystem writingSystem) { diff --git a/src/gui/text/qrawfont.h b/src/gui/text/qrawfont.h index aca33af127..e94bd99b8c 100644 --- a/src/gui/text/qrawfont.h +++ b/src/gui/text/qrawfont.h @@ -111,6 +111,8 @@ public: qreal xHeight() const; qreal averageCharWidth() const; qreal maxCharWidth() const; + qreal lineThickness() const; + qreal underlinePosition() const; qreal unitsPerEm() const; @@ -133,6 +135,7 @@ public: private: friend class QRawFontPrivate; + friend class QTextLayout; void detach(); diff --git a/src/gui/text/qstatictext.cpp b/src/gui/text/qstatictext.cpp index baa9eebb79..10c494dec9 100644 --- a/src/gui/text/qstatictext.cpp +++ b/src/gui/text/qstatictext.cpp @@ -425,14 +425,17 @@ namespace { public: DrawTextItemRecorder(bool untransformedCoordinates, bool useBackendOptimizations) : m_dirtyPen(false), m_useBackendOptimizations(useBackendOptimizations), - m_untransformedCoordinates(untransformedCoordinates) + m_untransformedCoordinates(untransformedCoordinates), m_currentColor(Qt::black) { } virtual void updateState(const QPaintEngineState &newState) { - if (newState.state() & QPaintEngine::DirtyPen) + if (newState.state() & QPaintEngine::DirtyPen + && newState.pen().color() != m_currentColor) { m_dirtyPen = true; + m_currentColor = newState.pen().color(); + } } virtual void drawTextItem(const QPointF &position, const QTextItem &textItem) @@ -448,7 +451,7 @@ namespace { currentItem.positionOffset = m_glyphs.size(); // Offset into position pool currentItem.useBackendOptimizations = m_useBackendOptimizations; if (m_dirtyPen) - currentItem.color = state->pen().color(); + currentItem.color = m_currentColor; QTransform matrix = m_untransformedCoordinates ? QTransform() : state->transform(); matrix.translate(position.x(), position.y()); @@ -519,6 +522,7 @@ namespace { bool m_dirtyPen; bool m_useBackendOptimizations; bool m_untransformedCoordinates; + QColor m_currentColor; }; class DrawTextItemDevice: public QPaintDevice diff --git a/src/gui/text/qtextlayout.cpp b/src/gui/text/qtextlayout.cpp index 03e00ed0df..918ddcc280 100644 --- a/src/gui/text/qtextlayout.cpp +++ b/src/gui/text/qtextlayout.cpp @@ -1002,15 +1002,46 @@ QList QTextLayout::glyphRuns(int from, int length) const if (length < 0) length = text().length(); - QList glyphs; + QHash, QGlyphRun> glyphRunHash; for (int i=0; ilines.size(); ++i) { if (d->lines[i].from > from + length) break; - else if (d->lines[i].from + d->lines[i].length >= from) - glyphs += QTextLine(i, d).glyphRuns(from, length); + else if (d->lines[i].from + d->lines[i].length >= from) { + QList glyphRuns = QTextLine(i, d).glyphRuns(from, length); + + for (int j = 0; j < glyphRuns.size(); j++) { + const QGlyphRun &glyphRun = glyphRuns.at(j); + QRawFont rawFont = glyphRun.rawFont(); + + QFontEngine *fontEngine = rawFont.d->fontEngine; + QTextItem::RenderFlags flags; + if (glyphRun.underline()) + flags |= QTextItem::Underline; + if (glyphRun.overline()) + flags |= QTextItem::Overline; + if (glyphRun.strikeOut()) + flags |= QTextItem::StrikeOut; + QPair key(fontEngine, int(flags)); + // merge the glyph runs using the same font + if (glyphRunHash.contains(key)) { + QGlyphRun &oldGlyphRun = glyphRunHash[key]; + + QVector indexes = oldGlyphRun.glyphIndexes(); + QVector positions = oldGlyphRun.positions(); + + indexes += glyphRun.glyphIndexes(); + positions += glyphRun.positions(); + + oldGlyphRun.setGlyphIndexes(indexes); + oldGlyphRun.setPositions(positions); + } else { + glyphRunHash[key] = glyphRun; + } + } + } } - return glyphs; + return glyphRunHash.values(); } #endif // QT_NO_RAWFONT @@ -2075,19 +2106,65 @@ static void setPenAndDrawBackground(QPainter *p, const QPen &defaultPen, const Q } -namespace { - struct GlyphInfo - { - GlyphInfo(const QGlyphLayout &layout, const QPointF &position, - const QTextItemInt::RenderFlags &renderFlags) - : glyphLayout(layout), itemPosition(position), flags(renderFlags) - { - } +static QGlyphRun glyphRunWithInfo(QFontEngine *fontEngine, const QGlyphLayout &glyphLayout, + const QPointF &pos, const QTextItem::RenderFlags &flags) +{ + QGlyphRun glyphRun; - QGlyphLayout glyphLayout; - QPointF itemPosition; - QTextItem::RenderFlags flags; - }; + // Make a font for this particular engine + QRawFont font; + QRawFontPrivate *fontD = QRawFontPrivate::get(font); + fontD->fontEngine = fontEngine; + fontD->fontEngine->ref.ref(); + +#if defined(Q_WS_WIN) + if (fontEngine->supportsSubPixelPositions()) + fontD->hintingPreference = QFont::PreferVerticalHinting; + else + fontD->hintingPreference = QFont::PreferFullHinting; +#elif defined(Q_WS_MAC) + fontD->hintingPreference = QFont::PreferNoHinting; +#elif !defined(QT_NO_FREETYPE) + if (fontEngine->type() == QFontEngine::Freetype) { + QFontEngineFT *freeTypeEngine = static_cast(fontEngine); + switch (freeTypeEngine->defaultHintStyle()) { + case QFontEngineFT::HintNone: + fontD->hintingPreference = QFont::PreferNoHinting; + break; + case QFontEngineFT::HintLight: + fontD->hintingPreference = QFont::PreferVerticalHinting; + break; + case QFontEngineFT::HintMedium: + case QFontEngineFT::HintFull: + fontD->hintingPreference = QFont::PreferFullHinting; + break; + }; + } +#endif + + QVarLengthArray glyphsArray; + QVarLengthArray positionsArray; + + fontEngine->getGlyphPositions(glyphLayout, QTransform(), flags, glyphsArray, + positionsArray); + Q_ASSERT(glyphsArray.size() == positionsArray.size()); + + QVector glyphs; + QVector positions; + for (int i=0; i QTextLine::glyphRuns(int from, int length) const if (length < 0) length = textLength(); - QHash glyphLayoutHash; - QTextLineItemIterator iterator(eng, i); qreal y = line.y.toReal() + line.base().toReal(); + QList glyphRuns; while (!iterator.atEnd()) { QScriptItem &si = iterator.next(); if (si.analysis.flags >= QScriptAnalysis::TabOrObject) @@ -2191,8 +2267,8 @@ QList QTextLine::glyphRuns(int from, int length) const continue; QGlyphLayout subLayout = glyphLayout.mid(start, end - start); - glyphLayoutHash.insertMulti(multiFontEngine->engine(which), - GlyphInfo(subLayout, pos, flags)); + glyphRuns.append(glyphRunWithInfo(multiFontEngine->engine(which), + subLayout, pos, flags)); for (int i = 0; i < subLayout.numGlyphs; i++) { pos += QPointF(subLayout.advances_x[i].toReal(), subLayout.advances_y[i].toReal()); @@ -2203,101 +2279,15 @@ QList QTextLine::glyphRuns(int from, int length) const } QGlyphLayout subLayout = glyphLayout.mid(start, end - start); - glyphLayoutHash.insertMulti(multiFontEngine->engine(which), - GlyphInfo(subLayout, pos, flags)); - + glyphRuns.append(glyphRunWithInfo(multiFontEngine->engine(which), + subLayout, pos, flags)); } else { - glyphLayoutHash.insertMulti(mainFontEngine, - GlyphInfo(glyphLayout, pos, flags)); + glyphRuns.append(glyphRunWithInfo(mainFontEngine, glyphLayout, pos, flags)); } } } - QHash, QGlyphRun> glyphsHash; - - QList keys = glyphLayoutHash.uniqueKeys(); - for (int i=0; ifontEngine = fontEngine; - fontD->fontEngine->ref.ref(); - -#if defined(Q_WS_WIN) - if (fontEngine->supportsSubPixelPositions()) - fontD->hintingPreference = QFont::PreferVerticalHinting; - else - fontD->hintingPreference = QFont::PreferFullHinting; -#elif defined(Q_WS_MAC) - fontD->hintingPreference = QFont::PreferNoHinting; -#elif !defined(QT_NO_FREETYPE) - if (fontEngine->type() == QFontEngine::Freetype) { - QFontEngineFT *freeTypeEngine = static_cast(fontEngine); - switch (freeTypeEngine->defaultHintStyle()) { - case QFontEngineFT::HintNone: - fontD->hintingPreference = QFont::PreferNoHinting; - break; - case QFontEngineFT::HintLight: - fontD->hintingPreference = QFont::PreferVerticalHinting; - break; - case QFontEngineFT::HintMedium: - case QFontEngineFT::HintFull: - fontD->hintingPreference = QFont::PreferFullHinting; - break; - }; - } -#endif - - QList glyphLayouts = glyphLayoutHash.values(fontEngine); - for (int j=0; j glyphsArray; - QVarLengthArray positionsArray; - - fontEngine->getGlyphPositions(glyphLayout, QTransform(), flags, glyphsArray, - positionsArray); - Q_ASSERT(glyphsArray.size() == positionsArray.size()); - - QVector glyphs; - QVector positions; - for (int i=0; i key(fontEngine, int(flags)); - if (!glyphsHash.contains(key)) { - glyphsHash.insert(key, glyphIndexes); - } else { - QGlyphRun &glyphRun = glyphsHash[key]; - - QVector indexes = glyphRun.glyphIndexes(); - QVector positions = glyphRun.positions(); - - indexes += glyphIndexes.glyphIndexes(); - positions += glyphIndexes.positions(); - - glyphRun.setGlyphIndexes(indexes); - glyphRun.setPositions(positions); - } - } - } - - return glyphsHash.values(); + return glyphRuns; } #endif // QT_NO_RAWFONT diff --git a/src/network/access/qftp.cpp b/src/network/access/qftp.cpp index 50a3b1edaa..a7f96fa463 100644 --- a/src/network/access/qftp.cpp +++ b/src/network/access/qftp.cpp @@ -1434,36 +1434,6 @@ QFtp::QFtp(QObject *parent) SIGNAL(listInfo(QUrlInfo))); } -#ifdef QT3_SUPPORT -/*! - Use one of the constructors that doesn't take the \a name - argument and then use setObjectName() instead. -*/ -QFtp::QFtp(QObject *parent, const char *name) - : QObject(*new QFtpPrivate, parent) -{ - Q_D(QFtp); - setObjectName(QLatin1String(name)); - d->errorString = tr("Unknown error"); - - connect(&d->pi, SIGNAL(connectState(int)), - SLOT(_q_piConnectState(int))); - connect(&d->pi, SIGNAL(finished(QString)), - SLOT(_q_piFinished(QString))); - connect(&d->pi, SIGNAL(error(int,QString)), - SLOT(_q_piError(int,QString))); - connect(&d->pi, SIGNAL(rawFtpReply(int,QString)), - SLOT(_q_piFtpReply(int,QString))); - - connect(&d->pi.dtp, SIGNAL(readyRead()), - SIGNAL(readyRead())); - connect(&d->pi.dtp, SIGNAL(dataTransferProgress(qint64,qint64)), - SIGNAL(dataTransferProgress(qint64,qint64))); - connect(&d->pi.dtp, SIGNAL(listInfo(QUrlInfo)), - SIGNAL(listInfo(QUrlInfo))); -} -#endif - /*! \enum QFtp::State diff --git a/src/network/access/qftp.h b/src/network/access/qftp.h index 2a58344780..671b9ba7c7 100644 --- a/src/network/access/qftp.h +++ b/src/network/access/qftp.h @@ -124,10 +124,6 @@ public: qint64 bytesAvailable() const; qint64 read(char *data, qint64 maxlen); -#ifdef QT3_SUPPORT - inline QT3_SUPPORT qint64 readBlock(char *data, quint64 maxlen) - { return read(data, qint64(maxlen)); } -#endif QByteArray readAll(); int currentId() const; @@ -155,11 +151,6 @@ Q_SIGNALS: void commandFinished(int, bool); void done(bool); -#ifdef QT3_SUPPORT -public: - QT3_SUPPORT_CONSTRUCTOR QFtp(QObject *parent, const char *name); -#endif - private: Q_DISABLE_COPY(QFtp) Q_DECLARE_PRIVATE(QFtp) diff --git a/src/network/access/qhttp.h b/src/network/access/qhttp.h index 9018b767ff..83b23f85f9 100644 --- a/src/network/access/qhttp.h +++ b/src/network/access/qhttp.h @@ -232,10 +232,6 @@ public: qint64 bytesAvailable() const; qint64 read(char *data, qint64 maxlen); -#ifdef QT3_SUPPORT - inline QT3_SUPPORT qint64 readBlock(char *data, quint64 maxlen) - { return read(data, qint64(maxlen)); } -#endif QByteArray readAll(); int currentId() const; diff --git a/src/network/access/qhttpnetworkconnection.cpp b/src/network/access/qhttpnetworkconnection.cpp index d950af4ee2..a8a4fd9ae7 100644 --- a/src/network/access/qhttpnetworkconnection.cpp +++ b/src/network/access/qhttpnetworkconnection.cpp @@ -46,6 +46,7 @@ #include #include #include +#include "private/qhostinfo_p.h" #include #include @@ -83,7 +84,8 @@ const int QHttpNetworkConnectionPrivate::defaultRePipelineLength = 2; QHttpNetworkConnectionPrivate::QHttpNetworkConnectionPrivate(const QString &hostName, quint16 port, bool encrypt) : state(RunningState), hostName(hostName), port(port), encrypt(encrypt), - channelCount(defaultChannelCount) + channelCount(defaultChannelCount), + networkLayerState(Unknown) #ifndef QT_NO_NETWORKPROXY , networkProxy(QNetworkProxy::NoProxy) #endif @@ -94,7 +96,8 @@ QHttpNetworkConnectionPrivate::QHttpNetworkConnectionPrivate(const QString &host QHttpNetworkConnectionPrivate::QHttpNetworkConnectionPrivate(quint16 channelCount, const QString &hostName, quint16 port, bool encrypt) : state(RunningState), hostName(hostName), port(port), encrypt(encrypt), - channelCount(channelCount) + channelCount(channelCount), + networkLayerState(Unknown) #ifndef QT_NO_NETWORKPROXY , networkProxy(QNetworkProxy::NoProxy) #endif @@ -174,6 +177,45 @@ int QHttpNetworkConnectionPrivate::indexOf(QAbstractSocket *socket) const return 0; } +// If the connection is in the InProgress state channel errors should not always be +// emitted. This function will check the status of the connection channels if we +// have not decided the networkLayerState and will return true if the channel error +// should be emitted by the channel. +bool QHttpNetworkConnectionPrivate::shouldEmitChannelError(QAbstractSocket *socket) +{ + Q_Q(QHttpNetworkConnection); + + bool emitError = true; + int i = indexOf(socket); + int otherSocket = (i == 0 ? 1 : 0); + + if (networkLayerState == QHttpNetworkConnectionPrivate::InProgress) { + if (channels[otherSocket].isSocketBusy() && (channels[otherSocket].state != QHttpNetworkConnectionChannel::ClosingState)) { + // this was the first socket to fail. + channels[i].close(); + emitError = false; + } + else { + // Both connection attempts has failed. + networkLayerState = QHttpNetworkConnectionPrivate::Unknown; + channels[i].close(); + emitError = true; + } + } else { + if ((networkLayerState == QHttpNetworkConnectionPrivate::IPv4) && (channels[i].networkLayerPreference != QAbstractSocket::IPv4Protocol) + || (networkLayerState == QHttpNetworkConnectionPrivate::IPv6) && (channels[i].networkLayerPreference != QAbstractSocket::IPv6Protocol)) { + // First connection worked so this is the second one to complete and it failed. + channels[i].close(); + QMetaObject::invokeMethod(q, "_q_startNextRequest", Qt::QueuedConnection); + emitError = false; + } + if (networkLayerState == QHttpNetworkConnectionPrivate::Unknown) + qWarning() << "We got a connection error when networkLayerState is Unknown"; + } + return emitError; +} + + qint64 QHttpNetworkConnectionPrivate::uncompressedBytesAvailable(const QHttpNetworkReply &reply) const { return reply.d_func()->responseData.byteAmount(); @@ -469,17 +511,23 @@ QHttpNetworkReply* QHttpNetworkConnectionPrivate::queueRequest(const QHttpNetwor break; } - // this used to be called via invokeMethod and a QueuedConnection - // It is the only place _q_startNextRequest is called directly without going - // through the event loop using a QueuedConnection. - // This is dangerous because of recursion that might occur when emitting - // signals as DirectConnection from this code path. Therefore all signal - // emissions that can come out from this code path need to - // be QueuedConnection. - // We are currently trying to fine-tune this. - _q_startNextRequest(); - - + // For Happy Eyeballs the networkLayerState is set to Unkown + // untill we have started the first connection attempt. So no + // request will be started untill we know if IPv4 or IPv6 + // should be used. + if (networkLayerState == Unknown) { + startHostInfoLookup(); + } else if ( networkLayerState == IPv4 || networkLayerState == IPv6 ) { + // this used to be called via invokeMethod and a QueuedConnection + // It is the only place _q_startNextRequest is called directly without going + // through the event loop using a QueuedConnection. + // This is dangerous because of recursion that might occur when emitting + // signals as DirectConnection from this code path. Therefore all signal + // emissions that can come out from this code path need to + // be QueuedConnection. + // We are currently trying to fine-tune this. + _q_startNextRequest(); + } return reply; } @@ -781,6 +829,10 @@ void QHttpNetworkConnectionPrivate::removeReply(QHttpNetworkReply *reply) // although it is called _q_startNextRequest, it will actually start multiple requests when possible void QHttpNetworkConnectionPrivate::_q_startNextRequest() { + // If there is no network layer state decided we should not start any new requests. + if (networkLayerState == Unknown || networkLayerState == InProgress) + return; + // If the QHttpNetworkConnection is currently paused then bail out immediately if (state == PausedState) return; @@ -830,11 +882,15 @@ void QHttpNetworkConnectionPrivate::_q_startNextRequest() // connected or not. This is to reuse connected channels before we connect new once. int queuedRequest = highPriorityQueue.count() + lowPriorityQueue.count(); for (int i = 0; i < channelCount; ++i) { - if (channels[i].socket->state() == QAbstractSocket::ConnectingState) + if ((channels[i].socket->state() == QAbstractSocket::ConnectingState) || (channels[i].socket->state() == QAbstractSocket::HostLookupState)) queuedRequest--; if ( queuedRequest <=0 ) break; if (!channels[i].reply && !channels[i].isSocketBusy() && (channels[i].socket->state() == QAbstractSocket::UnconnectedState)) { + if (networkLayerState == IPv4) + channels[i].networkLayerPreference = QAbstractSocket::IPv4Protocol; + else if (networkLayerState == IPv6) + channels[i].networkLayerPreference = QAbstractSocket::IPv6Protocol; channels[i].ensureConnection(); queuedRequest--; } @@ -853,6 +909,100 @@ void QHttpNetworkConnectionPrivate::readMoreLater(QHttpNetworkReply *reply) } } + + +// The first time we start the connection is used we do not know if we +// should use IPv4 or IPv6. So we start a hostlookup to figure this out. +// Later when we do the connection the socket will not need to do another +// lookup as then the hostinfo will already be in the cache. +void QHttpNetworkConnectionPrivate::startHostInfoLookup() +{ + // At this time all channels should be unconnected. + Q_ASSERT(!channels[0].isSocketBusy()); + Q_ASSERT(!channels[1].isSocketBusy()); + + networkLayerState = InProgress; + + // check if we already now can descide if this is IPv4 or IPv6 + QHostAddress temp; + if (temp.setAddress(hostName)) { + if (temp.protocol() == QAbstractSocket::IPv4Protocol) { + networkLayerState = QHttpNetworkConnectionPrivate::IPv4; + QMetaObject::invokeMethod(this->q_func(), "_q_startNextRequest", Qt::QueuedConnection); + return; + } else if (temp.protocol() == QAbstractSocket::IPv6Protocol) { + networkLayerState = QHttpNetworkConnectionPrivate::IPv6; + QMetaObject::invokeMethod(this->q_func(), "_q_startNextRequest", Qt::QueuedConnection); + return; + } + } else { + int hostLookupId; + bool immediateResultValid = false; + QHostInfo hostInfo = qt_qhostinfo_lookup(hostName, + this->q_func(), + SLOT(_q_hostLookupFinished(QHostInfo)), + &immediateResultValid, + &hostLookupId); + if (immediateResultValid) { + _q_hostLookupFinished(hostInfo); + } + } +} + + +void QHttpNetworkConnectionPrivate::_q_hostLookupFinished(QHostInfo info) +{ + bool bIpv4 = false; + bool bIpv6 = false; + + foreach (QHostAddress address, info.addresses()) { + if (address.protocol() == QAbstractSocket::IPv4Protocol) + bIpv4 = true; + else if (address.protocol() == QAbstractSocket::IPv6Protocol) + bIpv6 = true; + } + + if (bIpv4 && bIpv6) + startNetworkLayerStateLookup(); + else if (bIpv4) { + networkLayerState = QHttpNetworkConnectionPrivate::IPv4; + QMetaObject::invokeMethod(this->q_func(), "_q_startNextRequest", Qt::QueuedConnection); + } else if (bIpv6) { + networkLayerState = QHttpNetworkConnectionPrivate::IPv6; + QMetaObject::invokeMethod(this->q_func(), "_q_startNextRequest", Qt::QueuedConnection); + } else { + if (dequeueRequest(channels[0].socket)) { + emitReplyError(channels[0].socket, channels[0].reply, QNetworkReply::HostNotFoundError); + networkLayerState = QHttpNetworkConnectionPrivate::Unknown; + } else { + // Should not happen + qWarning() << "QHttpNetworkConnectionPrivate::_q_hostLookupFinished could not dequeu request"; + networkLayerState = QHttpNetworkConnectionPrivate::Unknown; + } + } +} + + +// This will be used if the host lookup found both and Ipv4 and +// Ipv6 address. Then we will start up two connections and pick +// the network layer of the one that finish first. The second +// connection will then be disconnected. +void QHttpNetworkConnectionPrivate::startNetworkLayerStateLookup() +{ + // At this time all channels should be unconnected. + Q_ASSERT(!channels[0].isSocketBusy()); + Q_ASSERT(!channels[1].isSocketBusy()); + + networkLayerState = InProgress; + + channels[0].networkLayerPreference = QAbstractSocket::IPv4Protocol; + channels[1].networkLayerPreference = QAbstractSocket::IPv6Protocol; + + channels[0].ensureConnection(); // Possibly delay this one.. + channels[1].ensureConnection(); +} + + #ifndef QT_NO_BEARERMANAGEMENT QHttpNetworkConnection::QHttpNetworkConnection(const QString &hostName, quint16 port, bool encrypt, QObject *parent, QSharedPointer networkSession) : QObject(*(new QHttpNetworkConnectionPrivate(hostName, port, encrypt)), parent) diff --git a/src/network/access/qhttpnetworkconnection_p.h b/src/network/access/qhttpnetworkconnection_p.h index 6c953be58d..0c86fd94b9 100644 --- a/src/network/access/qhttpnetworkconnection_p.h +++ b/src/network/access/qhttpnetworkconnection_p.h @@ -82,6 +82,7 @@ QT_BEGIN_NAMESPACE class QHttpNetworkRequest; class QHttpNetworkReply; class QByteArray; +class QHostInfo; class QHttpNetworkConnectionPrivate; class Q_AUTOTEST_EXPORT QHttpNetworkConnection : public QObject @@ -132,6 +133,7 @@ private: friend class QHttpNetworkConnectionChannel; Q_PRIVATE_SLOT(d_func(), void _q_startNextRequest()) + Q_PRIVATE_SLOT(d_func(), void _q_hostLookupFinished(QHostInfo)) }; @@ -152,6 +154,13 @@ public: PausedState = 1, }; + enum NetworkLayerPreferenceState { + Unknown, + InProgress, + IPv4, + IPv6 + }; + QHttpNetworkConnectionPrivate(const QString &hostName, quint16 port, bool encrypt); QHttpNetworkConnectionPrivate(quint16 channelCount, const QString &hostName, quint16 port, bool encrypt); ~QHttpNetworkConnectionPrivate(); @@ -160,6 +169,7 @@ public: void pauseConnection(); void resumeConnection(); ConnectionState state; + NetworkLayerPreferenceState networkLayerState; enum { ChunkSize = 4096 }; @@ -179,9 +189,14 @@ public: void copyCredentials(int fromChannel, QAuthenticator *auth, bool isProxy); + void startHostInfoLookup(); + void startNetworkLayerStateLookup(); + // private slots void _q_startNextRequest(); // send the next request from the queue + void _q_hostLookupFinished(QHostInfo info); + void createAuthorization(QAbstractSocket *socket, QHttpNetworkRequest &request); QString errorDetail(QNetworkReply::NetworkError errorCode, QAbstractSocket *socket, @@ -198,6 +213,7 @@ public: const int channelCount; QHttpNetworkConnectionChannel *channels; // parallel connections to the server + bool shouldEmitChannelError(QAbstractSocket *socket); qint64 uncompressedBytesAvailable(const QHttpNetworkReply &reply) const; qint64 uncompressedBytesAvailableNextBlock(const QHttpNetworkReply &reply) const; diff --git a/src/network/access/qhttpnetworkconnectionchannel.cpp b/src/network/access/qhttpnetworkconnectionchannel.cpp index 7c644ad4b9..b8ed8ee567 100644 --- a/src/network/access/qhttpnetworkconnectionchannel.cpp +++ b/src/network/access/qhttpnetworkconnectionchannel.cpp @@ -80,6 +80,7 @@ QHttpNetworkConnectionChannel::QHttpNetworkConnectionChannel() #endif , pipeliningSupported(PipeliningSupportUnknown) , connection(0) + , networkLayerPreference(QAbstractSocket::AnyIPProtocol) { // Inlining this function in the header leads to compiler error on // release-armv5, on at least timebox 9.2 and 10.1. @@ -594,7 +595,7 @@ bool QHttpNetworkConnectionChannel::ensureConnection() if (ssl) { #ifndef QT_NO_OPENSSL QSslSocket *sslSocket = qobject_cast(socket); - sslSocket->connectToHostEncrypted(connectHost, connectPort); + sslSocket->connectToHostEncrypted(connectHost, connectPort, QIODevice::ReadWrite, networkLayerPreference); if (ignoreAllSslErrors) sslSocket->ignoreSslErrors(); sslSocket->ignoreSslErrors(ignoreSslErrorsList); @@ -613,12 +614,12 @@ bool QHttpNetworkConnectionChannel::ensureConnection() && connection->cacheProxy().type() == QNetworkProxy::NoProxy && connection->transparentProxy().type() == QNetworkProxy::NoProxy) { #endif - socket->connectToHost(connectHost, connectPort, QIODevice::ReadWrite | QIODevice::Unbuffered); + socket->connectToHost(connectHost, connectPort, QIODevice::ReadWrite | QIODevice::Unbuffered, networkLayerPreference); // For an Unbuffered QTcpSocket, the read buffer size has a special meaning. socket->setReadBufferSize(1*1024); #ifndef QT_NO_NETWORKPROXY } else { - socket->connectToHost(connectHost, connectPort); + socket->connectToHost(connectHost, connectPort, QIODevice::ReadWrite, networkLayerPreference); // limit the socket read buffer size. we will read everything into // the QHttpNetworkReply anyway, so let's grow only that and not @@ -1002,6 +1003,25 @@ void QHttpNetworkConnectionChannel::_q_disconnected() void QHttpNetworkConnectionChannel::_q_connected() { + // For the Happy Eyeballs we need to check if this is the first channel to connect. + if (!pendingEncrypt) { + if (connection->d_func()->networkLayerState == QHttpNetworkConnectionPrivate::InProgress) { + if (networkLayerPreference == QAbstractSocket::IPv4Protocol) + connection->d_func()->networkLayerState = QHttpNetworkConnectionPrivate::IPv4; + else if (networkLayerPreference == QAbstractSocket::IPv6Protocol) + connection->d_func()->networkLayerState = QHttpNetworkConnectionPrivate::IPv6; + } else { + if (((connection->d_func()->networkLayerState == QHttpNetworkConnectionPrivate::IPv4) && (networkLayerPreference != QAbstractSocket::IPv4Protocol)) + || ((connection->d_func()->networkLayerState == QHttpNetworkConnectionPrivate::IPv6) && (networkLayerPreference != QAbstractSocket::IPv6Protocol))) { + close(); + // This is the second connection so it has to be closed and we can schedule it for another request. + QMetaObject::invokeMethod(connection, "_q_startNextRequest", Qt::QueuedConnection); + return; + } + //The connections networkLayerState had already been decided. + } + } + // improve performance since we get the request sent by the kernel ASAP //socket->setSocketOption(QAbstractSocket::LowDelayOption, 1); // We have this commented out now. It did not have the effect we wanted. If we want to @@ -1089,6 +1109,11 @@ void QHttpNetworkConnectionChannel::_q_error(QAbstractSocket::SocketError socket QPointer that = connection; QString errorString = connection->d_func()->errorDetail(errorCode, socket, socket->errorString()); + // In the InProgress state the channel should not emit the error. + // This will instead be handled by the connection. + if (!connection->d_func()->shouldEmitChannelError(socket)) + return; + // Need to dequeu the request so that we can emit the error. if (!reply) connection->d_func()->dequeueRequest(socket); diff --git a/src/network/access/qhttpnetworkconnectionchannel_p.h b/src/network/access/qhttpnetworkconnectionchannel_p.h index f635cc9557..8400f62ab9 100644 --- a/src/network/access/qhttpnetworkconnectionchannel_p.h +++ b/src/network/access/qhttpnetworkconnectionchannel_p.h @@ -136,6 +136,8 @@ public: void detectPipeliningSupport(); QHttpNetworkConnectionChannel(); + + QAbstractSocket::NetworkLayerProtocol networkLayerPreference; void setConnection(QHttpNetworkConnection *c); QPointer connection; diff --git a/src/network/access/qnetworkreplyhttpimpl.cpp b/src/network/access/qnetworkreplyhttpimpl.cpp index f4c905f007..df0a32dd6c 100644 --- a/src/network/access/qnetworkreplyhttpimpl.cpp +++ b/src/network/access/qnetworkreplyhttpimpl.cpp @@ -365,6 +365,7 @@ qint64 QNetworkReplyHttpImpl::readData(char* data, qint64 maxlen) void QNetworkReplyHttpImpl::setReadBufferSize(qint64 size) { + Q_UNUSED(size); // FIXME, unsupported right now return; } @@ -379,7 +380,8 @@ bool QNetworkReplyHttpImpl::canReadLine () const if (d->cacheLoadDevice) return d->cacheLoadDevice->canReadLine() || d->downloadMultiBuffer.canReadLine(); - // FIXME zerocopy buffer? + if (d->downloadZerocopyBuffer) + return memchr(d->downloadZerocopyBuffer + d->downloadBufferReadPosition, '\n', d->downloadBufferCurrentSize - d->downloadBufferReadPosition); return d->downloadMultiBuffer.canReadLine(); } @@ -876,6 +878,7 @@ void QNetworkReplyHttpImplPrivate::postRequest() delegate->isPipeliningUsed, QSharedPointer(), delegate->incomingContentLength); + replyDownloadData(delegate->synchronousDownloadData); httpError(delegate->incomingErrorCode, delegate->incomingErrorDetail); } else { replyDownloadMetaData @@ -1168,7 +1171,6 @@ void QNetworkReplyHttpImplPrivate::replyDownloadProgressSlot(qint64 bytesReceive void QNetworkReplyHttpImplPrivate::httpAuthenticationRequired(const QHttpNetworkRequest &, QAuthenticator *auth) { - Q_Q(QNetworkReplyHttpImpl); managerPrivate->authenticationRequired(auth, q_func(), synchronous, url, &urlForLastAuthentication); } diff --git a/src/network/access/qnetworkrequest.cpp b/src/network/access/qnetworkrequest.cpp index 5608f1f9a3..7f61ef9239 100644 --- a/src/network/access/qnetworkrequest.cpp +++ b/src/network/access/qnetworkrequest.cpp @@ -77,28 +77,33 @@ QT_BEGIN_NAMESPACE List of known header types that QNetworkRequest parses. Each known header is also represented in raw form with its full HTTP name. - \value ContentTypeHeader corresponds to the HTTP Content-Type - header and contains a string containing the media (MIME) type and - any auxiliary data (for instance, charset) + \value ContentDispositionHeader Corresponds to the HTTP + Content-Disposition header and contains a string containing the + disposition type (for instance, attachment) and a parameter (for + instance, filename). - \value ContentLengthHeader corresponds to the HTTP Content-Length + \value ContentTypeHeader Corresponds to the HTTP Content-Type + header and contains a string containing the media (MIME) type and + any auxiliary data (for instance, charset). + + \value ContentLengthHeader Corresponds to the HTTP Content-Length header and contains the length in bytes of the data transmitted. - \value LocationHeader corresponds to the HTTP Location + \value LocationHeader Corresponds to the HTTP Location header and contains a URL representing the actual location of the data, including the destination URL in case of redirections. - \value LastModifiedHeader corresponds to the HTTP Last-Modified + \value LastModifiedHeader Corresponds to the HTTP Last-Modified header and contains a QDateTime representing the last modification - date of the contents + date of the contents. - \value CookieHeader corresponds to the HTTP Cookie header + \value CookieHeader Corresponds to the HTTP Cookie header and contains a QList representing the cookies to - be sent back to the server + be sent back to the server. - \value SetCookieHeader corresponds to the HTTP Set-Cookie + \value SetCookieHeader Corresponds to the HTTP Set-Cookie header and contains a QList representing the - cookies sent by the server to be stored locally + cookies sent by the server to be stored locally. \sa header(), setHeader(), rawHeader(), setRawHeader() */ diff --git a/src/network/kernel/qhostaddress.cpp b/src/network/kernel/qhostaddress.cpp index bff351c34f..3dd7461a75 100644 --- a/src/network/kernel/qhostaddress.cpp +++ b/src/network/kernel/qhostaddress.cpp @@ -38,19 +38,18 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ - #include "qhostaddress.h" #include "qhostaddress_p.h" #include "qdebug.h" +#if defined(Q_OS_WIN) +#include +#endif #include "qplatformdefs.h" #include "qstringlist.h" #include "qendian.h" #ifndef QT_NO_DATASTREAM #include #endif -#if defined(Q_OS_WINCE) -#include -#endif #ifdef QT_LINUXBASE # include @@ -65,7 +64,6 @@ QT_BEGIN_NAMESPACE } while (0) #ifdef Q_OS_WIN -# if !defined (QT_NO_IPV6) // sockaddr_in6 size changed between old and new SDK // Only the new version is the correct one, so always // use this structure. @@ -90,12 +88,6 @@ typedef struct { struct qt_in6_addr sin6_addr; /* IPv6 address */ u_long sin6_scope_id; /* set of interfaces for a scope */ } qt_sockaddr_in6; -# else -typedef void * qt_sockaddr_in6 ; -# endif -# ifndef AF_INET6 -# define AF_INET6 23 /* Internetwork Version 6 */ -# endif #else #define qt_sockaddr_in6 sockaddr_in6 #define qt_s6_addr s6_addr @@ -545,10 +537,8 @@ QHostAddress::QHostAddress(const struct sockaddr *sockaddr) { if (sockaddr->sa_family == AF_INET) setAddress(htonl(((sockaddr_in *)sockaddr)->sin_addr.s_addr)); -#ifndef QT_NO_IPV6 else if (sockaddr->sa_family == AF_INET6) setAddress(((qt_sockaddr_in6 *)sockaddr)->sin6_addr.qt_s6_addr); -#endif } /*! @@ -700,10 +690,8 @@ void QHostAddress::setAddress(const struct sockaddr *sockaddr) clear(); if (sockaddr->sa_family == AF_INET) setAddress(htonl(((sockaddr_in *)sockaddr)->sin_addr.s_addr)); -#ifndef QT_NO_IPV6 else if (sockaddr->sa_family == AF_INET6) setAddress(((qt_sockaddr_in6 *)sockaddr)->sin6_addr.qt_s6_addr); -#endif } /*! diff --git a/src/network/kernel/qhostaddress.h b/src/network/kernel/qhostaddress.h index efb3198fc0..3d364de6e6 100644 --- a/src/network/kernel/qhostaddress.h +++ b/src/network/kernel/qhostaddress.h @@ -117,15 +117,6 @@ public: bool isNull() const; void clear(); -#ifdef QT3_SUPPORT - inline QT3_SUPPORT quint32 ip4Addr() const { return toIPv4Address(); } - inline QT3_SUPPORT bool isIPv4Address() const { return protocol() == QAbstractSocket::IPv4Protocol - || protocol() == QAbstractSocket::UnknownNetworkLayerProtocol; } - inline QT3_SUPPORT bool isIp4Addr() const { return protocol() == QAbstractSocket::IPv4Protocol - || protocol() == QAbstractSocket::UnknownNetworkLayerProtocol; } - inline QT3_SUPPORT bool isIPv6Address() const { return protocol() == QAbstractSocket::IPv6Protocol; } -#endif - bool isInSubnet(const QHostAddress &subnet, int netmask) const; bool isInSubnet(const QPair &subnet) const; diff --git a/src/network/kernel/qhostinfo_unix.cpp b/src/network/kernel/qhostinfo_unix.cpp index 0a56bc309a..37444ae2d9 100644 --- a/src/network/kernel/qhostinfo_unix.cpp +++ b/src/network/kernel/qhostinfo_unix.cpp @@ -149,9 +149,7 @@ QHostInfo QHostInfoAgent::fromName(const QString &hostName) // Reverse lookups using getnameinfo are broken on darwin, use gethostbyaddr instead. #if !defined (QT_NO_GETADDRINFO) && !defined (Q_OS_DARWIN) sockaddr_in sa4; -#ifndef QT_NO_IPV6 sockaddr_in6 sa6; -#endif sockaddr *sa = 0; QT_SOCKLEN_T saSize = 0; if (address.protocol() == QAbstractSocket::IPv4Protocol) { @@ -161,7 +159,6 @@ QHostInfo QHostInfoAgent::fromName(const QString &hostName) sa4.sin_family = AF_INET; sa4.sin_addr.s_addr = htonl(address.toIPv4Address()); } -#ifndef QT_NO_IPV6 else { sa = (sockaddr *)&sa6; saSize = sizeof(sa6); @@ -169,7 +166,6 @@ QHostInfo QHostInfoAgent::fromName(const QString &hostName) sa6.sin6_family = AF_INET6; memcpy(sa6.sin6_addr.s6_addr, address.toIPv6Address().c, sizeof(sa6.sin6_addr.s6_addr)); } -#endif char hbuf[NI_MAXHOST]; if (sa && getnameinfo(sa, saSize, hbuf, sizeof(hbuf), 0, 0, 0) == 0) @@ -231,7 +227,6 @@ QHostInfo QHostInfoAgent::fromName(const QString &hostName) if (!addresses.contains(addr)) addresses.append(addr); } -#ifndef QT_NO_IPV6 else if (node->ai_family == AF_INET6) { QHostAddress addr; sockaddr_in6 *sa6 = (sockaddr_in6 *) node->ai_addr; @@ -241,7 +236,6 @@ QHostInfo QHostInfoAgent::fromName(const QString &hostName) if (!addresses.contains(addr)) addresses.append(addr); } -#endif node = node->ai_next; } if (addresses.isEmpty() && node == 0) { diff --git a/src/network/kernel/qnetworkinterface_unix.cpp b/src/network/kernel/qnetworkinterface_unix.cpp index 0ce21f905f..528e195ef6 100644 --- a/src/network/kernel/qnetworkinterface_unix.cpp +++ b/src/network/kernel/qnetworkinterface_unix.cpp @@ -80,10 +80,9 @@ static QHostAddress addressFromSockaddr(sockaddr *sa) if (sa->sa_family == AF_INET) address.setAddress(htonl(((sockaddr_in *)sa)->sin_addr.s_addr)); -#ifndef QT_NO_IPV6 else if (sa->sa_family == AF_INET6) address.setAddress(((sockaddr_in6 *)sa)->sin6_addr.s6_addr); -#endif + return address; } diff --git a/src/network/kernel/qnetworkproxy.cpp b/src/network/kernel/qnetworkproxy.cpp index 4f9836e863..1062663b23 100644 --- a/src/network/kernel/qnetworkproxy.cpp +++ b/src/network/kernel/qnetworkproxy.cpp @@ -1191,6 +1191,11 @@ void QNetworkProxyQuery::setUrl(const QUrl &url) } #ifndef QT_NO_BEARERMANAGEMENT +/*! + Returns the network configuration component of the query. + + \sa setNetworkConfiguration() +*/ QNetworkConfiguration QNetworkProxyQuery::networkConfiguration() const { return d ? d->config : QNetworkConfiguration(); @@ -1206,7 +1211,7 @@ QNetworkConfiguration QNetworkProxyQuery::networkConfiguration() const you should first start the QNetworkSession and obtain the active configuration from its properties. - \sa networkConfiguration + \sa networkConfiguration() */ void QNetworkProxyQuery::setNetworkConfiguration(const QNetworkConfiguration &networkConfiguration) { diff --git a/src/network/socket/qabstractsocket.cpp b/src/network/socket/qabstractsocket.cpp index 5316626638..b662a75259 100644 --- a/src/network/socket/qabstractsocket.cpp +++ b/src/network/socket/qabstractsocket.cpp @@ -483,7 +483,8 @@ QAbstractSocketPrivate::QAbstractSocketPrivate() hostLookupId(-1), socketType(QAbstractSocket::UnknownSocketType), state(QAbstractSocket::UnconnectedState), - socketError(QAbstractSocket::UnknownSocketError) + socketError(QAbstractSocket::UnknownSocketError), + preferredNetworkLayerProtocol(QAbstractSocket::UnknownNetworkLayerProtocol) { } @@ -892,6 +893,7 @@ void QAbstractSocketPrivate::startConnectingByName(const QString &host) void QAbstractSocketPrivate::_q_startConnecting(const QHostInfo &hostInfo) { Q_Q(QAbstractSocket); + addresses.clear(); if (state != QAbstractSocket::HostLookupState) return; @@ -899,7 +901,16 @@ void QAbstractSocketPrivate::_q_startConnecting(const QHostInfo &hostInfo) qWarning("QAbstractSocketPrivate::_q_startConnecting() received hostInfo for wrong lookup ID %d expected %d", hostInfo.lookupId(), hostLookupId); } - addresses = hostInfo.addresses(); + // Only add the addresses for the prefered network layer. + // Or all if prefered network layer is not set. + if (preferredNetworkLayerProtocol == QAbstractSocket::UnknownNetworkLayerProtocol || preferredNetworkLayerProtocol == QAbstractSocket::AnyIPProtocol) { + addresses = hostInfo.addresses(); + } else { + foreach (QHostAddress address, hostInfo.addresses()) + if (address.protocol() == preferredNetworkLayerProtocol) + addresses += address; + } + #if defined(QABSTRACTSOCKET_DEBUG) QString s = QLatin1String("{"); @@ -993,17 +1004,6 @@ void QAbstractSocketPrivate::_q_connectToNextAddress() host.toString().toLatin1().constData(), port, addresses.count()); #endif -#if defined(QT_NO_IPV6) - if (host.protocol() == QAbstractSocket::IPv6Protocol) { - // If we have no IPv6 support, then we will not be able to - // connect. So we just pretend we didn't see this address. -#if defined(QABSTRACTSOCKET_DEBUG) - qDebug("QAbstractSocketPrivate::_q_connectToNextAddress(), skipping IPv6 entry"); -#endif - continue; - } -#endif - if (!initSocketLayer(host.protocol())) { // hope that the next address is better #if defined(QABSTRACTSOCKET_DEBUG) @@ -1330,8 +1330,12 @@ bool QAbstractSocket::isValid() const \sa state(), peerName(), peerAddress(), peerPort(), waitForConnected() */ void QAbstractSocket::connectToHost(const QString &hostName, quint16 port, - OpenMode openMode) + OpenMode openMode, + NetworkLayerProtocol protocol) { + Q_D(QAbstractSocket); + d->preferredNetworkLayerProtocol = protocol; + QMetaObject::invokeMethod(this, "connectToHostImplementation", Qt::DirectConnection, Q_ARG(QString, hostName), @@ -2501,10 +2505,6 @@ void QAbstractSocket::disconnectFromHostImplementation() return; } -#ifdef QT3_SUPPORT - emit connectionClosed(); // compat signal -#endif - // Disable and delete read notification if (d->socketEngine) d->socketEngine->setReadNotificationEnabled(false); @@ -2567,9 +2567,6 @@ void QAbstractSocket::disconnectFromHostImplementation() emit stateChanged(d->state); emit readChannelFinished(); // we got an EOF -#ifdef QT3_SUPPORT - emit delayedCloseFinished(); // compat signal -#endif // only emit disconnected if we were connected before if (previousState == ConnectedState || previousState == ClosingState) emit disconnected(); @@ -2747,78 +2744,6 @@ QNetworkProxy QAbstractSocket::proxy() const } #endif // QT_NO_NETWORKPROXY -#ifdef QT3_SUPPORT -/*! - \enum QAbstractSocket::Error - \compat - - Use QAbstractSocket::SocketError instead. - - \value ErrConnectionRefused Use QAbstractSocket::ConnectionRefusedError instead. - \value ErrHostNotFound Use QAbstractSocket::HostNotFoundError instead. - \value ErrSocketRead Use QAbstractSocket::UnknownSocketError instead. -*/ - -/*! - \typedef QAbstractSocket::State - \compat - - Use QAbstractSocket::SocketState instead. - - \table - \header \o Qt 3 enum value \o Qt 4 enum value - \row \o \c Idle \o \l UnconnectedState - \row \o \c HostLookup \o \l HostLookupState - \row \o \c Connecting \o \l ConnectingState - \row \o \c Connected \o \l ConnectedState - \row \o \c Closing \o \l ClosingState - \row \o \c Connection \o \l ConnectedState - \endtable -*/ - -/*! - \fn int QAbstractSocket::socket() const - - Use socketDescriptor() instead. -*/ - -/*! - \fn void QAbstractSocket::setSocket(int socket) - - Use setSocketDescriptor() instead. -*/ - -/*! - \fn Q_ULONG QAbstractSocket::waitForMore(int msecs, bool *timeout = 0) const - - Use waitForReadyRead() instead. - - \oldcode - bool timeout; - Q_ULONG numBytes = socket->waitForMore(30000, &timeout); - \newcode - qint64 numBytes = 0; - if (socket->waitForReadyRead(msecs)) - numBytes = socket->bytesAvailable(); - bool timeout = (error() == QAbstractSocket::SocketTimeoutError); - \endcode - - \sa waitForReadyRead(), bytesAvailable(), error(), SocketTimeoutError -*/ - -/*! - \fn void QAbstractSocket::connectionClosed() - - Use disconnected() instead. -*/ - -/*! - \fn void QAbstractSocket::delayedCloseFinished() - - Use disconnected() instead. -*/ -#endif // QT3_SUPPORT - #ifndef QT_NO_DEBUG_STREAM Q_NETWORK_EXPORT QDebug operator<<(QDebug debug, QAbstractSocket::SocketError error) { diff --git a/src/network/socket/qabstractsocket.h b/src/network/socket/qabstractsocket.h index 2717ceb58a..b757092915 100644 --- a/src/network/socket/qabstractsocket.h +++ b/src/network/socket/qabstractsocket.h @@ -108,15 +108,6 @@ public: BoundState, ListeningState, ClosingState -#ifdef QT3_SUPPORT - , - Idle = UnconnectedState, - HostLookup = HostLookupState, - Connecting = ConnectingState, - Connected = ConnectedState, - Closing = ClosingState, - Connection = ConnectedState -#endif }; enum SocketOption { LowDelayOption, // TCP_NODELAY @@ -129,7 +120,7 @@ public: virtual ~QAbstractSocket(); // ### Qt 5: Make connectToHost() and disconnectFromHost() virtual. - void connectToHost(const QString &hostName, quint16 port, OpenMode mode = ReadWrite); + void connectToHost(const QString &hostName, quint16 port, OpenMode mode = ReadWrite, NetworkLayerProtocol protocol = AnyIPProtocol); void connectToHost(const QHostAddress &address, quint16 port, OpenMode mode = ReadWrite); void disconnectFromHost(); @@ -221,32 +212,6 @@ private: Q_PRIVATE_SLOT(d_func(), void _q_abortConnectionAttempt()) Q_PRIVATE_SLOT(d_func(), void _q_testConnection()) Q_PRIVATE_SLOT(d_func(), void _q_forceDisconnect()) - -#ifdef QT3_SUPPORT -public: - enum Error { - ErrConnectionRefused = ConnectionRefusedError, - ErrHostNotFound = HostNotFoundError, - ErrSocketRead = UnknownSocketError - }; - inline QT3_SUPPORT int socket() const { return socketDescriptor(); } - inline QT3_SUPPORT void setSocket(int socket) { setSocketDescriptor(socket); } - inline QT3_SUPPORT qulonglong waitForMore(int msecs, bool *timeout = 0) const - { - QAbstractSocket *that = const_cast(this); - if (that->waitForReadyRead(msecs)) - return qulonglong(bytesAvailable()); - if (error() == SocketTimeoutError && timeout) - *timeout = true; - return 0; - } - typedef SocketState State; -Q_SIGNALS: - QT_MOC_COMPAT void connectionClosed(); // same as disconnected() - QT_MOC_COMPAT void delayedCloseFinished(); // same as disconnected() - - -#endif }; #ifndef QT_NO_DEBUG_STREAM diff --git a/src/network/socket/qabstractsocket_p.h b/src/network/socket/qabstractsocket_p.h index cf7d98895f..978fb1433a 100644 --- a/src/network/socket/qabstractsocket_p.h +++ b/src/network/socket/qabstractsocket_p.h @@ -156,6 +156,8 @@ public: QAbstractSocket::SocketError socketError; + QAbstractSocket::NetworkLayerProtocol preferredNetworkLayerProtocol; + bool prePauseReadSocketNotifierState; bool prePauseWriteSocketNotifierState; bool prePauseExceptionSocketNotifierState; diff --git a/src/network/socket/qnativesocketengine.cpp b/src/network/socket/qnativesocketengine.cpp index 875852265e..2dc6a40d99 100644 --- a/src/network/socket/qnativesocketengine.cpp +++ b/src/network/socket/qnativesocketengine.cpp @@ -203,6 +203,7 @@ void QNativeSocketEnginePrivate::setError(QAbstractSocket::SocketError error, Er case BroadcastingInitFailedErrorString: socketErrorString = QNativeSocketEngine::tr("Unable to initialize broadcast socket"); break; + // should not happen anymore case NoIpV6ErrorString: socketErrorString = QNativeSocketEngine::tr("Attempt to use IPv6 socket on a platform with no IPv6 support"); break; @@ -345,14 +346,6 @@ bool QNativeSocketEngine::initialize(QAbstractSocket::SocketType socketType, QAb if (isValid()) close(); -#if defined(QT_NO_IPV6) - if (protocol == QAbstractSocket::IPv6Protocol) { - d->setError(QAbstractSocket::UnsupportedSocketOperationError, - QNativeSocketEnginePrivate::NoIpV6ErrorString); - return false; - } -#endif - // Create the socket if (!d->createNewSocket(socketType, protocol)) { #if defined (QNATIVESOCKETENGINE_DEBUG) @@ -511,13 +504,6 @@ bool QNativeSocketEngine::connectToHost(const QHostAddress &address, quint16 por Q_D(QNativeSocketEngine); Q_CHECK_VALID_SOCKETLAYER(QNativeSocketEngine::connectToHost(), false); -#if defined (QT_NO_IPV6) - if (address.protocol() == QAbstractSocket::IPv6Protocol) { - d->setError(QAbstractSocket::UnsupportedSocketOperationError, - QNativeSocketEnginePrivate::NoIpV6ErrorString); - return false; - } -#endif if (!d->checkProxy(address)) return false; @@ -581,13 +567,6 @@ bool QNativeSocketEngine::bind(const QHostAddress &address, quint16 port) Q_D(QNativeSocketEngine); Q_CHECK_VALID_SOCKETLAYER(QNativeSocketEngine::bind(), false); -#if defined (QT_NO_IPV6) - if (address.protocol() == QAbstractSocket::IPv6Protocol) { - d->setError(QAbstractSocket::UnsupportedSocketOperationError, - QNativeSocketEnginePrivate::NoIpV6ErrorString); - return false; - } -#endif if (!d->checkProxy(address)) return false; diff --git a/src/network/socket/qnativesocketengine_unix.cpp b/src/network/socket/qnativesocketengine_unix.cpp index 26053981ce..246b5ede9b 100644 --- a/src/network/socket/qnativesocketengine_unix.cpp +++ b/src/network/socket/qnativesocketengine_unix.cpp @@ -124,7 +124,6 @@ static void qt_ignore_sigpipe() */ static inline void qt_socket_getPortAndAddress(const qt_sockaddr *s, quint16 *port, QHostAddress *addr) { -#if !defined(QT_NO_IPV6) if (s->a.sa_family == AF_INET6) { Q_IPV6ADDR tmp; memcpy(&tmp, &s->a6.sin6_addr, sizeof(tmp)); @@ -144,7 +143,7 @@ static inline void qt_socket_getPortAndAddress(const qt_sockaddr *s, quint16 *po *port = ntohs(s->a6.sin6_port); return; } -#endif + if (port) *port = ntohs(s->a4.sin_port); if (addr) { @@ -162,12 +161,7 @@ static inline void qt_socket_getPortAndAddress(const qt_sockaddr *s, quint16 *po bool QNativeSocketEnginePrivate::createNewSocket(QAbstractSocket::SocketType socketType, QAbstractSocket::NetworkLayerProtocol socketProtocol) { -#ifndef QT_NO_IPV6 int protocol = (socketProtocol == QAbstractSocket::IPv6Protocol || socketProtocol == QAbstractSocket::AnyIPProtocol) ? AF_INET6 : AF_INET; -#else - Q_UNUSED(socketProtocol); - int protocol = AF_INET; -#endif int type = (socketType == QAbstractSocket::UdpSocket) ? SOCK_DGRAM : SOCK_STREAM; int socket = qt_safe_socket(protocol, type, 0); @@ -238,24 +232,20 @@ int QNativeSocketEnginePrivate::option(QNativeSocketEngine::SocketOption opt) co n = SO_KEEPALIVE; break; case QNativeSocketEngine::MulticastTtlOption: -#ifndef QT_NO_IPV6 if (socketProtocol == QAbstractSocket::IPv6Protocol) { level = IPPROTO_IPV6; n = IPV6_MULTICAST_HOPS; } else -#endif { level = IPPROTO_IP; n = IP_MULTICAST_TTL; } break; case QNativeSocketEngine::MulticastLoopbackOption: -#ifndef QT_NO_IPV6 if (socketProtocol == QAbstractSocket::IPv6Protocol) { level = IPPROTO_IPV6; n = IPV6_MULTICAST_LOOP; } else -#endif { level = IPPROTO_IP; n = IP_MULTICAST_LOOP; @@ -343,24 +333,20 @@ bool QNativeSocketEnginePrivate::setOption(QNativeSocketEngine::SocketOption opt n = SO_KEEPALIVE; break; case QNativeSocketEngine::MulticastTtlOption: -#ifndef QT_NO_IPV6 if (socketProtocol == QAbstractSocket::IPv6Protocol) { level = IPPROTO_IPV6; n = IPV6_MULTICAST_HOPS; } else -#endif { level = IPPROTO_IP; n = IP_MULTICAST_TTL; } break; case QNativeSocketEngine::MulticastLoopbackOption: -#ifndef QT_NO_IPV6 if (socketProtocol == QAbstractSocket::IPv6Protocol) { level = IPPROTO_IPV6; n = IPV6_MULTICAST_LOOP; } else -#endif { level = IPPROTO_IP; n = IP_MULTICAST_LOOP; @@ -381,7 +367,6 @@ bool QNativeSocketEnginePrivate::nativeConnect(const QHostAddress &addr, quint16 struct sockaddr *sockAddrPtr = 0; QT_SOCKLEN_T sockAddrSize = 0; -#if !defined(QT_NO_IPV6) struct sockaddr_in6 sockAddrIPv6; if (addr.protocol() == QAbstractSocket::IPv6Protocol) { @@ -402,10 +387,6 @@ bool QNativeSocketEnginePrivate::nativeConnect(const QHostAddress &addr, quint16 sockAddrSize = sizeof(sockAddrIPv6); sockAddrPtr = (struct sockaddr *) &sockAddrIPv6; } else -#if 0 - {} -#endif -#endif if (addr.protocol() == QAbstractSocket::IPv4Protocol) { memset(&sockAddrIPv4, 0, sizeof(sockAddrIPv4)); sockAddrIPv4.sin_family = AF_INET; @@ -492,7 +473,7 @@ bool QNativeSocketEnginePrivate::nativeBind(const QHostAddress &address, quint16 struct sockaddr *sockAddrPtr = 0; QT_SOCKLEN_T sockAddrSize = 0; -#if !defined(QT_NO_IPV6) + struct sockaddr_in6 sockAddrIPv6; if (address.protocol() == QAbstractSocket::IPv6Protocol || address.protocol() == QAbstractSocket::AnyIPProtocol) { @@ -516,7 +497,6 @@ bool QNativeSocketEnginePrivate::nativeBind(const QHostAddress &address, quint16 sockAddrSize = sizeof(sockAddrIPv6); sockAddrPtr = (struct sockaddr *) &sockAddrIPv6; } else -#endif if (address.protocol() == QAbstractSocket::IPv4Protocol) { memset(&sockAddrIPv4, 0, sizeof(sockAddrIPv4)); sockAddrIPv4.sin_family = AF_INET; @@ -612,7 +592,6 @@ static bool multicastMembershipHelper(QNativeSocketEnginePrivate *d, int sockArgSize; ip_mreq mreq4; -#ifndef QT_NO_IPV6 ipv6_mreq mreq6; if (groupAddress.protocol() == QAbstractSocket::IPv6Protocol) { @@ -625,7 +604,6 @@ static bool multicastMembershipHelper(QNativeSocketEnginePrivate *d, memcpy(&mreq6.ipv6mr_multiaddr, &ip6, sizeof(ip6)); mreq6.ipv6mr_interface = interface.index(); } else -#endif if (groupAddress.protocol() == QAbstractSocket::IPv4Protocol) { level = IPPROTO_IP; sockOpt = how4; @@ -679,11 +657,7 @@ bool QNativeSocketEnginePrivate::nativeJoinMulticastGroup(const QHostAddress &gr const QNetworkInterface &interface) { return multicastMembershipHelper(this, -#ifndef QT_NO_IPV6 IPV6_JOIN_GROUP, -#else - 0, -#endif IP_ADD_MEMBERSHIP, groupAddress, interface); @@ -693,11 +667,7 @@ bool QNativeSocketEnginePrivate::nativeLeaveMulticastGroup(const QHostAddress &g const QNetworkInterface &interface) { return multicastMembershipHelper(this, -#ifndef QT_NO_IPV6 IPV6_LEAVE_GROUP, -#else - 0, -#endif IP_DROP_MEMBERSHIP, groupAddress, interface); @@ -705,7 +675,6 @@ bool QNativeSocketEnginePrivate::nativeLeaveMulticastGroup(const QHostAddress &g QNetworkInterface QNativeSocketEnginePrivate::nativeMulticastInterface() const { -#ifndef QT_NO_IPV6 if (socketProtocol == QAbstractSocket::IPv6Protocol) { uint v; QT_SOCKOPTLEN_T sizeofv = sizeof(v); @@ -713,7 +682,6 @@ QNetworkInterface QNativeSocketEnginePrivate::nativeMulticastInterface() const return QNetworkInterface(); return QNetworkInterface::interfaceFromIndex(v); } -#endif struct in_addr v = { 0 }; QT_SOCKOPTLEN_T sizeofv = sizeof(v); @@ -737,12 +705,10 @@ QNetworkInterface QNativeSocketEnginePrivate::nativeMulticastInterface() const bool QNativeSocketEnginePrivate::nativeSetMulticastInterface(const QNetworkInterface &iface) { -#ifndef QT_NO_IPV6 if (socketProtocol == QAbstractSocket::IPv6Protocol) { uint v = iface.index(); return (::setsockopt(socketDescriptor, IPPROTO_IPV6, IPV6_MULTICAST_IF, &v, sizeof(v)) != -1); } -#endif struct in_addr v; if (iface.isValid()) { @@ -871,7 +837,6 @@ qint64 QNativeSocketEnginePrivate::nativeSendDatagram(const char *data, qint64 l struct sockaddr *sockAddrPtr = 0; QT_SOCKLEN_T sockAddrSize = 0; -#if !defined(QT_NO_IPV6) struct sockaddr_in6 sockAddrIPv6; if (host.protocol() == QAbstractSocket::IPv6Protocol || socketProtocol == QAbstractSocket::IPv6Protocol) { @@ -884,7 +849,7 @@ qint64 QNativeSocketEnginePrivate::nativeSendDatagram(const char *data, qint64 l sockAddrSize = sizeof(sockAddrIPv6); sockAddrPtr = (struct sockaddr *)&sockAddrIPv6; } else -#endif + if (host.protocol() == QAbstractSocket::IPv4Protocol) { memset(&sockAddrIPv4, 0, sizeof(sockAddrIPv4)); sockAddrIPv4.sin_family = AF_INET; @@ -941,11 +906,9 @@ bool QNativeSocketEnginePrivate::fetchConnectionParameters() case AF_INET: socketProtocol = QAbstractSocket::IPv4Protocol; break; -#if !defined (QT_NO_IPV6) case AF_INET6: socketProtocol = QAbstractSocket::IPv6Protocol; break; -#endif default: socketProtocol = QAbstractSocket::UnknownNetworkLayerProtocol; break; diff --git a/src/network/socket/qnativesocketengine_win.cpp b/src/network/socket/qnativesocketengine_win.cpp index ba62bd6da2..67a9a2131a 100644 --- a/src/network/socket/qnativesocketengine_win.cpp +++ b/src/network/socket/qnativesocketengine_win.cpp @@ -165,7 +165,6 @@ static QByteArray qt_prettyDebug(const char *data, int len, int maxLength) */ static inline void qt_socket_getPortAndAddress(SOCKET socketDescriptor, const qt_sockaddr *sa, quint16 *port, QHostAddress *address) { -#if !defined (QT_NO_IPV6) if (sa->a.sa_family == AF_INET6) { const qt_sockaddr_in6 *sa6 = &sa->a6; Q_IPV6ADDR tmp; @@ -178,7 +177,7 @@ static inline void qt_socket_getPortAndAddress(SOCKET socketDescriptor, const qt if (port) WSANtohs(socketDescriptor, sa6->sin6_port, port); } else -#endif + if (sa->a.sa_family == AF_INET) { const sockaddr_in *sa4 = &sa->a4; unsigned long addr; @@ -200,7 +199,7 @@ static inline void qt_socket_getPortAndAddress(SOCKET socketDescriptor, const qt void QNativeSocketEnginePrivate::setPortAndAddress(sockaddr_in * sockAddrIPv4, qt_sockaddr_in6 * sockAddrIPv6, quint16 port, const QHostAddress & address, sockaddr ** sockAddrPtr, QT_SOCKLEN_T *sockAddrSize) { -#if !defined(QT_NO_IPV6) + if (address.protocol() == QAbstractSocket::IPv6Protocol || address.protocol() == QAbstractSocket::AnyIPProtocol || socketProtocol == QAbstractSocket::IPv6Protocol) { @@ -213,7 +212,7 @@ void QNativeSocketEnginePrivate::setPortAndAddress(sockaddr_in * sockAddrIPv4, q *sockAddrSize = sizeof(qt_sockaddr_in6); *sockAddrPtr = (struct sockaddr *) sockAddrIPv6; } else -#endif + if (address.protocol() == QAbstractSocket::IPv4Protocol || address.protocol() == QAbstractSocket::UnknownNetworkLayerProtocol) { memset(sockAddrIPv4, 0, sizeof(sockaddr_in)); @@ -403,24 +402,21 @@ int QNativeSocketEnginePrivate::option(QNativeSocketEngine::SocketOption opt) co n = SO_KEEPALIVE; break; case QNativeSocketEngine::MulticastTtlOption: -#ifndef QT_NO_IPV6 + if (socketProtocol == QAbstractSocket::IPv6Protocol) { level = IPPROTO_IPV6; n = IPV6_MULTICAST_HOPS; } else -#endif { level = IPPROTO_IP; n = IP_MULTICAST_TTL; } break; case QNativeSocketEngine::MulticastLoopbackOption: -#ifndef QT_NO_IPV6 if (socketProtocol == QAbstractSocket::IPv6Protocol) { level = IPPROTO_IPV6; n = IPV6_MULTICAST_LOOP; } else -#endif { level = IPPROTO_IP; n = IP_MULTICAST_LOOP; @@ -487,24 +483,20 @@ bool QNativeSocketEnginePrivate::setOption(QNativeSocketEngine::SocketOption opt n = SO_KEEPALIVE; break; case QNativeSocketEngine::MulticastTtlOption: -#ifndef QT_NO_IPV6 if (socketProtocol == QAbstractSocket::IPv6Protocol) { level = IPPROTO_IPV6; n = IPV6_MULTICAST_HOPS; } else -#endif { level = IPPROTO_IP; n = IP_MULTICAST_TTL; } break; case QNativeSocketEngine::MulticastLoopbackOption: -#ifndef QT_NO_IPV6 if (socketProtocol == QAbstractSocket::IPv6Protocol) { level = IPPROTO_IPV6; n = IPV6_MULTICAST_LOOP; } else -#endif { level = IPPROTO_IP; n = IP_MULTICAST_LOOP; @@ -545,11 +537,9 @@ bool QNativeSocketEnginePrivate::fetchConnectionParameters() case AF_INET: socketProtocol = QAbstractSocket::IPv4Protocol; break; -#if !defined (QT_NO_IPV6) case AF_INET6: socketProtocol = QAbstractSocket::IPv6Protocol; break; -#endif default: socketProtocol = QAbstractSocket::UnknownNetworkLayerProtocol; break; @@ -714,7 +704,7 @@ bool QNativeSocketEnginePrivate::nativeBind(const QHostAddress &a, quint16 port) // binding to a multicast address address = QHostAddress(QHostAddress::AnyIPv6); } -#if !defined (QT_NO_IPV6) && defined (IPV6_V6ONLY) +#if defined (IPV6_V6ONLY) //This is default in current windows versions, it may change in future so set it explicitly if (QSysInfo::windowsVersion() >= QSysInfo::WV_6_0) { ipv6only = 1; @@ -729,7 +719,7 @@ bool QNativeSocketEnginePrivate::nativeBind(const QHostAddress &a, quint16 port) } break; case QAbstractSocket::AnyIPProtocol: -#if !defined (QT_NO_IPV6) && defined (IPV6_V6ONLY) +#if defined (IPV6_V6ONLY) if (QSysInfo::windowsVersion() >= QSysInfo::WV_6_0) ipv6only = ::setsockopt(socketDescriptor, IPPROTO_IPV6, IPV6_V6ONLY, (char*)&ipv6only, sizeof(ipv6only) ); else @@ -849,7 +839,6 @@ static bool multicastMembershipHelper(QNativeSocketEnginePrivate *d, int sockArgSize; struct ip_mreq mreq4; -#ifndef QT_NO_IPV6 struct ipv6_mreq mreq6; if (groupAddress.protocol() == QAbstractSocket::IPv6Protocol) { @@ -862,7 +851,7 @@ static bool multicastMembershipHelper(QNativeSocketEnginePrivate *d, memcpy(&mreq6.ipv6mr_multiaddr, &ip6, sizeof(ip6)); mreq6.ipv6mr_interface = iface.index(); } else -#endif + if (groupAddress.protocol() == QAbstractSocket::IPv4Protocol) { level = IPPROTO_IP; sockOpt = how4; @@ -904,11 +893,7 @@ bool QNativeSocketEnginePrivate::nativeJoinMulticastGroup(const QHostAddress &gr const QNetworkInterface &iface) { return multicastMembershipHelper(this, -#ifndef QT_NO_IPV6 IPV6_JOIN_GROUP, -#else - 0, -#endif IP_ADD_MEMBERSHIP, groupAddress, iface); @@ -918,11 +903,7 @@ bool QNativeSocketEnginePrivate::nativeLeaveMulticastGroup(const QHostAddress &g const QNetworkInterface &iface) { return multicastMembershipHelper(this, -#ifndef QT_NO_IPV6 IPV6_LEAVE_GROUP, -#else - 0, -#endif IP_DROP_MEMBERSHIP, groupAddress, iface); @@ -930,7 +911,6 @@ bool QNativeSocketEnginePrivate::nativeLeaveMulticastGroup(const QHostAddress &g QNetworkInterface QNativeSocketEnginePrivate::nativeMulticastInterface() const { -#ifndef QT_NO_IPV6 if (socketProtocol == QAbstractSocket::IPv6Protocol) { uint v; QT_SOCKOPTLEN_T sizeofv = sizeof(v); @@ -938,7 +918,6 @@ QNetworkInterface QNativeSocketEnginePrivate::nativeMulticastInterface() const return QNetworkInterface(); return QNetworkInterface::interfaceFromIndex(v); } -#endif struct in_addr v; v.s_addr = 0; @@ -965,12 +944,11 @@ QNetworkInterface QNativeSocketEnginePrivate::nativeMulticastInterface() const bool QNativeSocketEnginePrivate::nativeSetMulticastInterface(const QNetworkInterface &iface) { -#ifndef QT_NO_IPV6 + if (socketProtocol == QAbstractSocket::IPv6Protocol) { uint v = iface.isValid() ? iface.index() : 0; return (::setsockopt(socketDescriptor, IPPROTO_IPV6, IPV6_MULTICAST_IF, (char *) &v, sizeof(v)) != -1); } -#endif struct in_addr v; if (iface.isValid()) { diff --git a/src/network/socket/qudpsocket.cpp b/src/network/socket/qudpsocket.cpp index 6bc93dd7f0..009ce92d8e 100644 --- a/src/network/socket/qudpsocket.cpp +++ b/src/network/socket/qudpsocket.cpp @@ -192,15 +192,6 @@ bool QUdpSocketPrivate::doEnsureInitialized(const QHostAddress &bindAddress, qui proto = address->protocol(); } -#if defined(QT_NO_IPV6) - Q_Q(QUdpSocket); - if (proto == QUdpSocket::IPv6Protocol) { - socketError = QUdpSocket::UnsupportedSocketOperationError; - q->setErrorString(QUdpSocket::tr("This platform does not support IPv6")); - return false; - } -#endif - // now check if the socket engine is initialized and to the right type if (!socketEngine || !socketEngine->isValid()) { resolveProxy(remoteAddress.toString(), bindPort); diff --git a/src/network/ssl/qsslcertificate.cpp b/src/network/ssl/qsslcertificate.cpp index 6100c68a2d..7403590f8c 100644 --- a/src/network/ssl/qsslcertificate.cpp +++ b/src/network/ssl/qsslcertificate.cpp @@ -307,6 +307,9 @@ static QString _q_SubjectInfoToString(QSslCertificate::SubjectInfo info) case QSslCertificate::OrganizationalUnitName: str = QLatin1String("OU"); break; case QSslCertificate::CountryName: str = QLatin1String("C"); break; case QSslCertificate::StateOrProvinceName: str = QLatin1String("ST"); break; + case QSslCertificate::DistinguishedNameQualifier: str = QLatin1String("dnQualifier"); break; + case QSslCertificate::SerialNumber: str = QLatin1String("serialNumber"); break; + case QSslCertificate::EmailAddress: str = QLatin1String("emailAddress"); break; } return str; } @@ -320,14 +323,14 @@ static QString _q_SubjectInfoToString(QSslCertificate::SubjectInfo info) \sa subjectInfo() */ -QString QSslCertificate::issuerInfo(SubjectInfo info) const +QStringList QSslCertificate::issuerInfo(SubjectInfo info) const { // lazy init if (d->issuerInfo.isEmpty() && d->x509) d->issuerInfo = _q_mapFromX509Name(q_X509_get_issuer_name(d->x509)); - return d->issuerInfo.value(_q_SubjectInfoToString(info)); + return d->issuerInfo.values(_q_SubjectInfoToString(info)); } /*! @@ -337,14 +340,14 @@ QString QSslCertificate::issuerInfo(SubjectInfo info) const \sa subjectInfo() */ -QString QSslCertificate::issuerInfo(const QByteArray &tag) const +QStringList QSslCertificate::issuerInfo(const QByteArray &tag) const { // lazy init if (d->issuerInfo.isEmpty() && d->x509) d->issuerInfo = _q_mapFromX509Name(q_X509_get_issuer_name(d->x509)); - return d->issuerInfo.value(QString::fromLatin1(tag)); + return d->issuerInfo.values(QString::fromLatin1(tag)); } /*! @@ -356,14 +359,14 @@ QString QSslCertificate::issuerInfo(const QByteArray &tag) const \sa issuerInfo() */ -QString QSslCertificate::subjectInfo(SubjectInfo info) const +QStringList QSslCertificate::subjectInfo(SubjectInfo info) const { // lazy init if (d->subjectInfo.isEmpty() && d->x509) d->subjectInfo = _q_mapFromX509Name(q_X509_get_subject_name(d->x509)); - return d->subjectInfo.value(_q_SubjectInfoToString(info)); + return d->subjectInfo.values(_q_SubjectInfoToString(info)); } /*! @@ -372,14 +375,14 @@ QString QSslCertificate::subjectInfo(SubjectInfo info) const \sa issuerInfo() */ -QString QSslCertificate::subjectInfo(const QByteArray &tag) const +QStringList QSslCertificate::subjectInfo(const QByteArray &tag) const { // lazy init if (d->subjectInfo.isEmpty() && d->x509) d->subjectInfo = _q_mapFromX509Name(q_X509_get_subject_name(d->x509)); - return d->subjectInfo.value(QString::fromLatin1(tag)); + return d->subjectInfo.values(QString::fromLatin1(tag)); } /*! @@ -711,7 +714,7 @@ static QMap _q_mapFromX509Name(X509_NAME *name) const char *obj = q_OBJ_nid2sn(q_OBJ_obj2nid(q_X509_NAME_ENTRY_get_object(e))); unsigned char *data = 0; int size = q_ASN1_STRING_to_UTF8(&data, q_X509_NAME_ENTRY_get_data(e)); - info[QString::fromUtf8(obj)] = QString::fromUtf8((char*)data, size); + info.insertMulti(QString::fromUtf8(obj), QString::fromUtf8((char*)data, size)); q_CRYPTO_free(data); } return info; @@ -867,6 +870,9 @@ QDebug operator<<(QDebug debug, QSslCertificate::SubjectInfo info) case QSslCertificate::LocalityName: debug << "LocalityName"; break; case QSslCertificate::OrganizationalUnitName: debug << "OrganizationalUnitName"; break; case QSslCertificate::StateOrProvinceName: debug << "StateOrProvinceName"; break; + case QSslCertificate::DistinguishedNameQualifier: debug << "DistinguishedNameQualifier"; break; + case QSslCertificate::SerialNumber: debug << "SerialNumber"; break; + case QSslCertificate::EmailAddress: debug << "EmailAddress"; break; } return debug; } diff --git a/src/network/ssl/qsslcertificate.h b/src/network/ssl/qsslcertificate.h index b942bd8a25..8abaa3f73e 100644 --- a/src/network/ssl/qsslcertificate.h +++ b/src/network/ssl/qsslcertificate.h @@ -76,7 +76,10 @@ public: LocalityName, OrganizationalUnitName, CountryName, - StateOrProvinceName + StateOrProvinceName, + DistinguishedNameQualifier, + SerialNumber, + EmailAddress }; QSslCertificate(QIODevice *device, QSsl::EncodingFormat format = QSsl::Pem); @@ -96,10 +99,10 @@ public: QByteArray version() const; QByteArray serialNumber() const; QByteArray digest(QCryptographicHash::Algorithm algorithm = QCryptographicHash::Md5) const; - QString issuerInfo(SubjectInfo info) const; - QString issuerInfo(const QByteArray &tag) const; - QString subjectInfo(SubjectInfo info) const; - QString subjectInfo(const QByteArray &tag) const; + QStringList issuerInfo(SubjectInfo info) const; + QStringList issuerInfo(const QByteArray &tag) const; + QStringList subjectInfo(SubjectInfo info) const; + QStringList subjectInfo(const QByteArray &tag) const; QMultiMap alternateSubjectNames() const; QDateTime effectiveDate() const; QDateTime expiryDate() const; diff --git a/src/network/ssl/qsslsocket.cpp b/src/network/ssl/qsslsocket.cpp index df61fb6c18..f191ed9324 100644 --- a/src/network/ssl/qsslsocket.cpp +++ b/src/network/ssl/qsslsocket.cpp @@ -405,7 +405,7 @@ QSslSocket::~QSslSocket() \sa connectToHost(), startClientEncryption(), waitForConnected(), waitForEncrypted() */ -void QSslSocket::connectToHostEncrypted(const QString &hostName, quint16 port, OpenMode mode) +void QSslSocket::connectToHostEncrypted(const QString &hostName, quint16 port, OpenMode mode, NetworkLayerProtocol protocol) { Q_D(QSslSocket); if (d->state == ConnectedState || d->state == ConnectingState) { @@ -419,7 +419,7 @@ void QSslSocket::connectToHostEncrypted(const QString &hostName, quint16 port, O // Note: When connecting to localhost, some platforms (e.g., HP-UX and some BSDs) // establish the connection immediately (i.e., first attempt). - connectToHost(hostName, port, mode); + connectToHost(hostName, port, mode, protocol); } /*! @@ -434,7 +434,8 @@ void QSslSocket::connectToHostEncrypted(const QString &hostName, quint16 port, O \sa connectToHostEncrypted() */ void QSslSocket::connectToHostEncrypted(const QString &hostName, quint16 port, - const QString &sslPeerName, OpenMode mode) + const QString &sslPeerName, OpenMode mode, + NetworkLayerProtocol protocol) { Q_D(QSslSocket); if (d->state == ConnectedState || d->state == ConnectingState) { @@ -449,7 +450,7 @@ void QSslSocket::connectToHostEncrypted(const QString &hostName, quint16 port, // Note: When connecting to localhost, some platforms (e.g., HP-UX and some BSDs) // establish the connection immediately (i.e., first attempt). - connectToHost(hostName, port, mode); + connectToHost(hostName, port, mode, protocol); } /*! @@ -1740,7 +1741,7 @@ void QSslSocket::connectToHostImplementation(const QString &hostName, quint16 po d->plainSocket->setProperty("_q_user-agent", property("_q_user-agent")); #endif QIODevice::open(openMode); - d->plainSocket->connectToHost(hostName, port, openMode); + d->plainSocket->connectToHost(hostName, port, openMode, d->preferredNetworkLayerProtocol); d->cachedSocketDescriptor = d->plainSocket->socketDescriptor(); } diff --git a/src/network/ssl/qsslsocket.h b/src/network/ssl/qsslsocket.h index 1e7c67ce91..f175ffd946 100644 --- a/src/network/ssl/qsslsocket.h +++ b/src/network/ssl/qsslsocket.h @@ -85,8 +85,8 @@ public: ~QSslSocket(); // Autostarting the SSL client handshake. - void connectToHostEncrypted(const QString &hostName, quint16 port, OpenMode mode = ReadWrite); - void connectToHostEncrypted(const QString &hostName, quint16 port, const QString &sslPeerName, OpenMode mode = ReadWrite); + void connectToHostEncrypted(const QString &hostName, quint16 port, OpenMode mode = ReadWrite, NetworkLayerProtocol protocol = AnyIPProtocol); + void connectToHostEncrypted(const QString &hostName, quint16 port, const QString &sslPeerName, OpenMode mode = ReadWrite, NetworkLayerProtocol protocol = AnyIPProtocol); bool setSocketDescriptor(int socketDescriptor, SocketState state = ConnectedState, OpenMode openMode = ReadWrite); diff --git a/src/network/ssl/qsslsocket_openssl.cpp b/src/network/ssl/qsslsocket_openssl.cpp index fb41b7c9e9..479a6bd60e 100644 --- a/src/network/ssl/qsslsocket_openssl.cpp +++ b/src/network/ssl/qsslsocket_openssl.cpp @@ -420,7 +420,11 @@ init_context: QByteArray ace = QUrl::toAce(tlsHostName); // only send the SNI header if the URL is valid and not an IP if (!ace.isEmpty() && !QHostAddress().setAddress(tlsHostName)) { +#if OPENSSL_VERSION_NUMBER >= 0x10000000L + if (!q_SSL_ctrl(ssl, SSL_CTRL_SET_TLSEXT_HOSTNAME, TLSEXT_NAMETYPE_host_name, ace.data())) +#else if (!q_SSL_ctrl(ssl, SSL_CTRL_SET_TLSEXT_HOSTNAME, TLSEXT_NAMETYPE_host_name, ace.constData())) +#endif qWarning("could not set SSL_CTRL_SET_TLSEXT_HOSTNAME, Server Name Indication disabled"); } } @@ -1262,10 +1266,17 @@ bool QSslSocketBackendPrivate::startHandshake() // if we're the server, don't check CN if (mode == QSslSocket::SslClientMode) { QString peerName = (verificationPeerName.isEmpty () ? q->peerName() : verificationPeerName); - QString commonName = configuration.peerCertificate.subjectInfo(QSslCertificate::CommonName); + QStringList commonNameList = configuration.peerCertificate.subjectInfo(QSslCertificate::CommonName); + bool matched = false; - if (!isMatchingHostname(commonName.toLower(), peerName.toLower())) { - bool matched = false; + foreach (const QString &commonName, commonNameList) { + if (isMatchingHostname(commonName.toLower(), peerName.toLower())) { + matched = true; + break; + } + } + + if (!matched) { foreach (const QString &altName, configuration.peerCertificate .alternateSubjectNames().values(QSsl::DnsEntry)) { if (isMatchingHostname(altName.toLower(), peerName.toLower())) { @@ -1273,15 +1284,15 @@ bool QSslSocketBackendPrivate::startHandshake() break; } } + } - if (!matched) { - // No matches in common names or alternate names. - QSslError error(QSslError::HostNameMismatch, configuration.peerCertificate); - errors << error; - emit q->peerVerifyError(error); - if (q->state() != QAbstractSocket::ConnectedState) - return false; - } + if (!matched) { + // No matches in common names or alternate names. + QSslError error(QSslError::HostNameMismatch, configuration.peerCertificate); + errors << error; + emit q->peerVerifyError(error); + if (q->state() != QAbstractSocket::ConnectedState) + return false; } } } else { diff --git a/src/network/ssl/qsslsocket_openssl_symbols.cpp b/src/network/ssl/qsslsocket_openssl_symbols.cpp index 6d29b294a1..b652833b45 100644 --- a/src/network/ssl/qsslsocket_openssl_symbols.cpp +++ b/src/network/ssl/qsslsocket_openssl_symbols.cpp @@ -210,8 +210,12 @@ DEFINEFUNC(int, SSL_library_init, void, DUMMYARG, return -1, return) DEFINEFUNC(void, SSL_load_error_strings, void, DUMMYARG, return, DUMMYARG) DEFINEFUNC(SSL *, SSL_new, SSL_CTX *a, a, return 0, return) #if OPENSSL_VERSION_NUMBER >= 0x0090806fL && !defined(OPENSSL_NO_TLSEXT) +#if OPENSSL_VERSION_NUMBER >= 0x10000000L +DEFINEFUNC4(long, SSL_ctrl, SSL *a, a, int cmd, cmd, long larg, larg, void *parg, parg, return -1, return) +#else DEFINEFUNC4(long, SSL_ctrl, SSL *a, a, int cmd, cmd, long larg, larg, const void *parg, parg, return -1, return) #endif +#endif DEFINEFUNC3(int, SSL_read, SSL *a, a, void *b, b, int c, c, return -1, return) DEFINEFUNC3(void, SSL_set_bio, SSL *a, a, BIO *b, b, BIO *c, c, return, DUMMYARG) DEFINEFUNC(void, SSL_set_accept_state, SSL *a, a, return, DUMMYARG) diff --git a/src/network/ssl/qsslsocket_openssl_symbols_p.h b/src/network/ssl/qsslsocket_openssl_symbols_p.h index 00f56d65af..658aa144a7 100644 --- a/src/network/ssl/qsslsocket_openssl_symbols_p.h +++ b/src/network/ssl/qsslsocket_openssl_symbols_p.h @@ -318,8 +318,12 @@ int q_SSL_library_init(); void q_SSL_load_error_strings(); SSL *q_SSL_new(SSL_CTX *a); #if OPENSSL_VERSION_NUMBER >= 0x0090806fL && !defined(OPENSSL_NO_TLSEXT) +#if OPENSSL_VERSION_NUMBER >= 0x10000000L +long q_SSL_ctrl(SSL *ssl,int cmd, long larg, void *parg); +#else long q_SSL_ctrl(SSL *ssl,int cmd, long larg, const void *parg); #endif +#endif int q_SSL_read(SSL *a, void *b, int c); void q_SSL_set_bio(SSL *a, BIO *b, BIO *c); void q_SSL_set_accept_state(SSL *a); diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp index b2f4b34b02..ab103ba836 100644 --- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp +++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp @@ -1691,6 +1691,8 @@ void QGL2PaintEngineExPrivate::drawCachedGlyphs(QFontEngineGlyphCache::Type glyp } int numGlyphs = vertexCoordinates->vertexCount() / 4; + if (numGlyphs == 0) + return; if (elementIndices.size() < numGlyphs*6) { Q_ASSERT(elementIndices.size() % 6 == 0); @@ -2318,41 +2320,6 @@ void QGL2PaintEngineEx::clip(const QVectorPath &path, Qt::ClipOperation op) state()->currentClip = d->maxClip; state()->clipTestEnabled = true; break; - case Qt::UniteClip: { - d->resetClipIfNeeded(); - ++d->maxClip; - if (state()->rectangleClip.isValid()) { - QPainterPath path; - path.addRect(state()->rectangleClip); - - // flush the existing clip rectangle to the depth buffer - d->writeClip(qtVectorPathForPath(state()->matrix.inverted().map(path)), d->maxClip); - } - - state()->clipTestEnabled = false; -#ifndef QT_GL_NO_SCISSOR_TEST - QRect oldRectangleClip = state()->rectangleClip; - - state()->rectangleClip = state()->rectangleClip.united(pathRect); - d->updateClipScissorTest(); - - QRegion extendRegion = QRegion(state()->rectangleClip) - oldRectangleClip; - - if (!extendRegion.isEmpty()) { - QPainterPath extendPath; - extendPath.addRegion(extendRegion); - - // first clear the depth buffer in the extended region - d->writeClip(qtVectorPathForPath(state()->matrix.inverted().map(extendPath)), 0); - } -#endif - // now write the clip path - d->writeClip(path, d->maxClip); - state()->canRestoreClip = false; - state()->currentClip = d->maxClip; - state()->clipTestEnabled = true; - break; - } default: break; } diff --git a/src/opengl/qgl.h b/src/opengl/qgl.h index 28c56a969a..26c0025342 100644 --- a/src/opengl/qgl.h +++ b/src/opengl/qgl.h @@ -83,7 +83,11 @@ typedef GLfloat GLdouble; typedef GLfloat GLdouble; # endif #else -# include +# if defined(Q_OS_MAC) +# include +# else +# include +# endif #endif QT_BEGIN_NAMESPACE diff --git a/src/opengl/qpaintengine_opengl.cpp b/src/opengl/qpaintengine_opengl.cpp index e05f312404..3c35c0334c 100644 --- a/src/opengl/qpaintengine_opengl.cpp +++ b/src/opengl/qpaintengine_opengl.cpp @@ -2413,11 +2413,6 @@ void QOpenGLPaintEngine::updateClipRegion(const QRegion &clipRegion, Qt::ClipOpe else state()->clipRegion = region; break; - case Qt::UniteClip: - state()->clipRegion |= region; - if (d->use_system_clip) - state()->clipRegion &= sysClip; - break; default: break; } diff --git a/src/plugins/generic/touchscreen/70-qtouchscreen.rules b/src/plugins/generic/touchscreen/70-qtouchscreen.rules new file mode 100644 index 0000000000..8119a14382 --- /dev/null +++ b/src/plugins/generic/touchscreen/70-qtouchscreen.rules @@ -0,0 +1 @@ +KERNEL=="event*", ENV{ID_INPUT_TOUCHPAD}=="1", ENV{QT_TOUCH}="1", MODE="0644" diff --git a/src/plugins/generic/touchscreen/README b/src/plugins/generic/touchscreen/README new file mode 100644 index 0000000000..76f695371d --- /dev/null +++ b/src/plugins/generic/touchscreen/README @@ -0,0 +1,45 @@ +Generic plug-in for evdev touch events + +(a) Using as a QPA generic plug-in + +1. set up the touch device +2. sudo apt-get install libmtdev-dev libudev-dev +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. run apps like this: app -platform xcb -plugin LinuxTouchScreen + +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, define FORCE_TO_ACTIVE_WINDOW in +qtoucheventsenderqpa.cpp. This will map the touch surface to the +active window instead. + +Only touch events are generated (via +QWindowSystemInterface::handleTouchEvent), mouse events are not. This +is because on desktop the touch device will usually act as a +single-touch mouse replacement anyway. For pointer-less systems the +code needs to be extended to generate also mouse events (by calling +handleMouseEvent too). + +(b) Using in a compositor + +The classes (QTouchScreenHandler, QTouchScreenHandlerThread) are also +suitable for direct inclusion into an application, e.g. a Wayland +compositor. The compositor will then usually register its own +QTouchScreenObserver because relying on the QTouchEvents generated by +the QPA event sender is often not satisfactory, as some low-level +details may get lost, and due to performance reasons. + + +Known issues: + +The udev rule matches any touchpad device. If there are multiple ones, +specify the device as described above. + +On recent distributions (e.g. Ubuntu 11.04) you may need to remove +50-synaptics.conf from /usr/share/X11/xorg.conf.d (followed by +logout/login) otherwise no evdev events can be read. diff --git a/tests/arthur/htmlgenerator/main.cpp b/src/plugins/generic/touchscreen/main.cpp similarity index 62% rename from tests/arthur/htmlgenerator/main.cpp rename to src/plugins/generic/touchscreen/main.cpp index ca787616a4..8ad756355d 100644 --- a/tests/arthur/htmlgenerator/main.cpp +++ b/src/plugins/generic/touchscreen/main.cpp @@ -1,10 +1,10 @@ /**************************************************************************** ** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the test suite of the Qt Toolkit. +** This file is part of the plugins of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -38,17 +38,43 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -#include -#include "htmlgenerator.h" +#include +#include "qtouchscreen.h" +#include "qtoucheventsenderqpa.h" -int main(int argc, char **argv) +QT_BEGIN_NAMESPACE + +class QTouchScreenPlugin : public QGenericPlugin { - QApplication app(argc, argv); +public: + QTouchScreenPlugin(); - HTMLGenerator generator; + QStringList keys() const; + QObject* create(const QString &key, const QString &specification); +}; - generator.run(argc, argv); +QTouchScreenPlugin::QTouchScreenPlugin() +{ +} + +QStringList QTouchScreenPlugin::keys() const +{ + return QStringList() << "LinuxTouchScreen"; +} + +QObject* QTouchScreenPlugin::create(const QString &key, + const QString &spec) +{ + if (!key.compare(QLatin1String("LinuxTouchScreen"), Qt::CaseInsensitive)) { + QTouchScreenHandler *h = new QTouchScreenHandler(spec); + h->addObserver(new QTouchEventSenderQPA); + return h; + } return 0; -} + } + +Q_EXPORT_PLUGIN2(qtouchscreenplugin, QTouchScreenPlugin) + +QT_END_NAMESPACE diff --git a/src/plugins/generic/touchscreen/qtoucheventsenderqpa.cpp b/src/plugins/generic/touchscreen/qtoucheventsenderqpa.cpp new file mode 100644 index 0000000000..7dff55b1bc --- /dev/null +++ b/src/plugins/generic/touchscreen/qtoucheventsenderqpa.cpp @@ -0,0 +1,113 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the 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 + +QT_BEGIN_NAMESPACE + +//#define POINT_DEBUG +//#define FORCE_TO_ACTIVE_WINDOW + +void QTouchEventSenderQPA::touch_configure(int x_min, int x_max, int y_min, int y_max) +{ + hw_range_x_min = x_min; + hw_range_x_max = x_max; + hw_range_y_min = y_min; + hw_range_y_max = y_max; +} + +void QTouchEventSenderQPA::touch_point(QEvent::Type state, + const QList &points) +{ +#ifdef FORCE_TO_ACTIVE_WINDOW + QWidget *win = QApplication::activeWindow(); // ### migrate to QWindow later on + if (!win) { +#ifdef POINT_DEBUG + qDebug("sendTouchEvent: No active window"); +#endif + return; + } + const QRect winRect = win->geometry(); +#else + const QRect winRect = QApplication::desktop()->screenGeometry(); +#endif + +#ifdef POINT_DEBUG + qDebug() << points.size() << "points" << winRect << state; +#endif + + QList touchPoints = points; + // Translate the coordinates and set the normalized position. QPA expects + // 'area' to be in screen coordinates, while the device reports them in its + // own system with (0, 0) being the center point of the device. + for (int i = 0; i < touchPoints.size(); ++i) { + QWindowSystemInterface::TouchPoint &tp(touchPoints[i]); + + // Translate so that (0, 0) is the top-left corner. + const int hw_x = qBound(hw_range_x_min, int(tp.area.left()), hw_range_x_max) - hw_range_x_min; + const int hw_y = qBound(hw_range_y_min, int(tp.area.top()), hw_range_y_max) - hw_range_y_min; + + // Get a normalized position in range 0..1. + const int hw_w = hw_range_x_max - hw_range_x_min; + const int hw_h = hw_range_y_max - hw_range_y_min; + tp.normalPosition = QPointF(hw_x / qreal(hw_w), + hw_y / qreal(hw_h)); + + qreal nx = tp.normalPosition.x(); + qreal ny = tp.normalPosition.y(); + + // Generate a screen position that is always inside the active window or the default screen. + const int wx = winRect.left() + int(nx * winRect.width()); + const int wy = winRect.top() + int(ny * winRect.height()); + tp.area.moveTopLeft(QPoint(wx, wy)); + +#ifdef POINT_DEBUG + qDebug() << " " << i << tp.area << tp.state << tp.id << tp.isPrimary << tp.pressure; +#endif + } + + QWindowSystemInterface::handleTouchEvent(0, state, QTouchEvent::TouchScreen, touchPoints); +} + +QT_END_NAMESPACE diff --git a/tests/arthur/performancediff/main.cpp b/src/plugins/generic/touchscreen/qtoucheventsenderqpa.h similarity index 70% rename from tests/arthur/performancediff/main.cpp rename to src/plugins/generic/touchscreen/qtoucheventsenderqpa.h index d16596703b..68d621a4e5 100644 --- a/tests/arthur/performancediff/main.cpp +++ b/src/plugins/generic/touchscreen/qtoucheventsenderqpa.h @@ -1,10 +1,10 @@ /**************************************************************************** ** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the test suite of the Qt Toolkit. +** This file is part of the plugins module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -38,17 +38,31 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -#include -#include "performancediff.h" +#ifndef QTOUCHEVENTSENDERQPA_H +#define QTOUCHEVENTSENDERQPA_H -int main(int argc, char **argv) +#include "qtouchscreen.h" + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +class QTouchEventSenderQPA : public QTouchScreenObserver { - QApplication app(argc, argv); +public: + void touch_configure(int x_min, int x_max, int y_min, int y_max); + void touch_point(QEvent::Type state, const QList &points); - PerformanceDiff generator; +private: + int hw_range_x_min; + int hw_range_x_max; + int hw_range_y_min; + int hw_range_y_max; +}; - generator.run(argc, argv); +QT_END_NAMESPACE - return 0; -} +QT_END_HEADER + +#endif // QTOUCHEVENTSENDERQPA_H diff --git a/src/plugins/generic/touchscreen/qtouchscreen.cpp b/src/plugins/generic/touchscreen/qtouchscreen.cpp new file mode 100644 index 0000000000..2bbed6a62f --- /dev/null +++ b/src/plugins/generic/touchscreen/qtouchscreen.cpp @@ -0,0 +1,324 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the 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 "qtouchscreen.h" +#include +#include +#include +#include + +#include + +extern "C" { +#include +} + +//#define POINT_DEBUG + +QT_BEGIN_NAMESPACE + +class QTouchScreenData +{ +public: + QTouchScreenData(QTouchScreenHandler *q_ptr); + + void handle(input_event *data); + + QTouchScreenHandler *q; + QEvent::Type m_state; + QEvent::Type m_prevState; + QList m_touchPoints; + + struct Slot { + int trackingId; + int x; + int y; + Qt::TouchPointState state; + bool primary; + Slot() : trackingId(0), x(0), y(0), state(Qt::TouchPointPressed), primary(false) { } + }; + QMap m_slots; + QMap m_lastReport; + int m_currentSlot; + + int hw_range_x_min; + int hw_range_x_max; + int hw_range_y_min; + int hw_range_y_max; + QString hw_name; + + QList m_observers; +}; + +QTouchScreenData::QTouchScreenData(QTouchScreenHandler *q_ptr) + : q(q_ptr), + m_state(QEvent::TouchBegin), + m_prevState(m_state), + m_currentSlot(0), + hw_range_x_min(0), hw_range_x_max(0), + hw_range_y_min(0), hw_range_y_max(0) +{ +} + +QTouchScreenHandler::QTouchScreenHandler(const QString &spec) + : m_notify(0), m_fd(-1), m_mtdev(0), d(0) +{ + setObjectName(QLatin1String("LinuxInputSubsystem Touch Handler")); + + QString dev = QLatin1String("/dev/input/event5"); + try_udev(&dev); + + 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)); + 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(readData())); + } else { + qWarning("Cannot open input device '%s': %s", qPrintable(dev), strerror(errno)); + return; + } + + m_mtdev = (mtdev *) calloc(1, sizeof(mtdev)); + int mtdeverr = mtdev_open(m_mtdev, m_fd); + if (mtdeverr) { + qWarning("mtdev_open failed: %d", mtdeverr); + QT_CLOSE(m_fd); + return; + } + + d = new QTouchScreenData(this); + + input_absinfo absInfo; + memset(&absInfo, 0, sizeof(input_absinfo)); + if (!ioctl(m_fd, EVIOCGABS(ABS_X), &absInfo) >= 0) { + qDebug("min X: %d max X: %d", absInfo.minimum, absInfo.maximum); + d->hw_range_x_min = absInfo.minimum; + d->hw_range_x_max = absInfo.maximum; + } + if (!ioctl(m_fd, EVIOCGABS(ABS_Y), &absInfo) >= 0) { + qDebug("min Y: %d max Y: %d", absInfo.minimum, absInfo.maximum); + d->hw_range_y_min = absInfo.minimum; + d->hw_range_y_max = absInfo.maximum; + } + char name[1024]; + if (ioctl(m_fd, EVIOCGNAME(sizeof(name) - 1), name) >= 0) { + d->hw_name = QString::fromUtf8(name); + qDebug() << "device name" << d->hw_name; + } +} + +QTouchScreenHandler::~QTouchScreenHandler() +{ + if (m_fd >= 0) + QT_CLOSE(m_fd); + + if (m_mtdev) { + mtdev_close(m_mtdev); + free(m_mtdev); + } + + 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); +} + +void QTouchScreenHandler::try_udev(QString *path) +{ + udev *u = udev_new(); + udev_enumerate *ue = udev_enumerate_new(u); + udev_enumerate_add_match_subsystem(ue, "input"); + udev_enumerate_add_match_property(ue, "QT_TOUCH", "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); + *path = QString::fromLocal8Bit(udev_device_get_devnode(udevice)); + qDebug("from udev: %s", qPrintable(*path)); + udev_device_unref(udevice); + } + udev_enumerate_unref(ue); + udev_unref(u); +} + +void QTouchScreenHandler::readData() +{ + input_event buffer[32]; + int n = 0; + n = mtdev_get(m_mtdev, m_fd, buffer, sizeof(buffer) / sizeof(input_event)); + if (n < 0) { + if (errno != EINTR && errno != EAGAIN) + qWarning("Could not read from input device: %s", strerror(errno)); + } else if (n > 0) { + for (int i = 0; i < n; ++i) { + input_event *data = &buffer[i]; + d->handle(data); + } + } +} + +void QTouchScreenData::handle(input_event *data) +{ + if (data->type == EV_ABS) { + if (data->code == ABS_MT_POSITION_X) { + m_slots[m_currentSlot].x = data->value; + } else if (data->code == ABS_MT_POSITION_Y) { + m_slots[m_currentSlot].y = data->value; + } else if (data->code == ABS_MT_SLOT) { + m_currentSlot = data->value; + } else if (data->code == ABS_MT_TRACKING_ID) { + if (data->value == -1) { + bool wasPrimary = m_slots[m_currentSlot].primary; + m_lastReport.remove(m_slots[m_currentSlot].trackingId); + m_slots.remove(m_currentSlot); + if (wasPrimary && !m_slots.isEmpty()) + m_slots[m_slots.keys().at(0)].primary = true; + } else { + m_slots[m_currentSlot].trackingId = data->value; + m_slots[m_currentSlot].primary = m_slots.count() == 1; + } + } else if (data->code == ABS_MT_TOUCH_MAJOR) { + if (data->value == 0) + m_slots[m_currentSlot].state = Qt::TouchPointReleased; + } + } else if (data->type == EV_SYN && data->code == SYN_REPORT) { + m_touchPoints.clear(); + QList keys = m_slots.keys(); + int ignoredSlotCount = 0; + for (int i = 0; i < keys.count(); ++i) { + const Slot &slot(m_slots.value(keys.at(i))); + if (slot.trackingId == 0) { + ++ignoredSlotCount; + continue; + } + QWindowSystemInterface::TouchPoint tp; + tp.id = slot.trackingId; + tp.isPrimary = slot.primary; + tp.pressure = slot.state == Qt::TouchPointReleased ? 0 : 1; + tp.area = QRectF(slot.x, slot.y, 1, 1); + tp.state = slot.state; + if (slot.state == Qt::TouchPointMoved && m_lastReport.contains(slot.trackingId)) { + QPoint lastPos = m_lastReport.value(slot.trackingId); + if (lastPos.x() == slot.x && lastPos.y() == slot.y) + tp.state = Qt::TouchPointStationary; + } + m_touchPoints.append(tp); + m_lastReport.insert(slot.trackingId, QPoint(slot.x, slot.y)); + } + if (m_slots.count() - ignoredSlotCount == 0) + m_state = QEvent::TouchEnd; + + // Skip if state is TouchUpdate and all points are Stationary. + bool skip = false; + if (m_state == QEvent::TouchUpdate) { + skip = true; + for (int i = 0; i < m_touchPoints.count(); ++i) + if (m_touchPoints.at(i).state != Qt::TouchPointStationary) { + skip = false; + break; + } + } + + // ### TODO Add timestamps and remove points that stay unchanged for too long. + // The user's finger may fall off the touchscreen, which means there will be + // no released event sent ever for that particular point. + +#ifdef POINT_DEBUG + qDebug() << m_touchPoints.count() << "touchpoints, event type" << m_state; + for (int i = 0; i < m_touchPoints.count(); ++i) + qDebug() << " " << m_touchPoints[i].id << m_touchPoints[i].state << m_touchPoints[i].area; +#endif + + if (!skip && !(m_state == m_prevState && m_state == QEvent::TouchEnd)) + for (int i = 0; i < m_observers.count(); ++i) + m_observers.at(i)->touch_point(m_state, m_touchPoints); + + for (int i = 0; i < keys.count(); ++i) { + Slot &slot(m_slots[keys.at(i)]); + if (slot.state == Qt::TouchPointPressed) + slot.state = Qt::TouchPointMoved; + } + m_prevState = m_state; + if (m_state == QEvent::TouchBegin) + m_state = QEvent::TouchUpdate; + else if (m_state == QEvent::TouchEnd) + m_state = QEvent::TouchBegin; + } +} + + +QTouchScreenHandlerThread::QTouchScreenHandlerThread(const QString &spec, + QTouchScreenObserver *observer) + : m_spec(spec), m_handler(0), m_observer(observer) +{ + start(); +} + +QTouchScreenHandlerThread::~QTouchScreenHandlerThread() +{ + quit(); + wait(); +} + +void QTouchScreenHandlerThread::run() +{ + m_handler = new QTouchScreenHandler(m_spec); + m_handler->addObserver(m_observer); + exec(); + delete m_handler; + m_handler = 0; +} + + +QT_END_NAMESPACE diff --git a/tests/arthur/datagenerator/xmlgenerator.h b/src/plugins/generic/touchscreen/qtouchscreen.h similarity index 54% rename from tests/arthur/datagenerator/xmlgenerator.h rename to src/plugins/generic/touchscreen/qtouchscreen.h index ef0911b60c..915a213d41 100644 --- a/tests/arthur/datagenerator/xmlgenerator.h +++ b/src/plugins/generic/touchscreen/qtouchscreen.h @@ -1,10 +1,10 @@ /**************************************************************************** ** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the test suite of the Qt Toolkit. +** This file is part of the plugins module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -38,36 +38,69 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -#ifndef XMLGENERATOR_H -#define XMLGENERATOR_H -#include "xmldata.h" +#ifndef QTOUCHSCREEN_H +#define QTOUCHSCREEN_H -#include -#include -#include +#include #include +#include +#include +#include +QT_BEGIN_HEADER -class XMLGenerator +struct mtdev; + +QT_BEGIN_NAMESPACE + +class QSocketNotifier; +class QTouchScreenData; + +class QTouchScreenObserver { public: - XMLGenerator(const QString &baseDir); - - void startSuite(const QString &name); - void startTestcase(const QString &testcase); - void addImage(const QString &engine, const QString &image, - const XMLData &data, GeneratorFlags flags); - void endTestcase(); - void endSuite(); - - void checkDirs(const QDateTime &dt, const QString &baseDir); - void generateOutput(const QString &baseDir); - QString generateData() const; -private: - QMap engines; - QString currentSuite; - QString currentTestcase; + virtual void touch_configure(int x_min, int x_max, int y_min, int y_max) = 0; + virtual void touch_point(QEvent::Type state, const QList &points) = 0; }; -#endif +class QTouchScreenHandler : public QObject +{ + Q_OBJECT + +public: + QTouchScreenHandler(const QString &spec = QString()); + ~QTouchScreenHandler(); + void addObserver(QTouchScreenObserver *observer); + +private slots: + void readData(); + +private: + void try_udev(QString *path); + + QSocketNotifier *m_notify; + int m_fd; + mtdev *m_mtdev; + QTouchScreenData *d; +}; + +class QTouchScreenHandlerThread : public QThread +{ +public: + QTouchScreenHandlerThread(const QString &spec, QTouchScreenObserver *observer); + ~QTouchScreenHandlerThread(); + void run(); + QTouchScreenHandler *handler() { return m_handler; } + +private: + QString m_spec; + QTouchScreenHandler *m_handler; + QTouchScreenObserver *m_observer; +}; + +QT_END_NAMESPACE + +QT_END_HEADER + +#endif // QTOUCHSCREEN_H diff --git a/src/plugins/generic/touchscreen/touchscreen.pro b/src/plugins/generic/touchscreen/touchscreen.pro new file mode 100644 index 0000000000..26725190b0 --- /dev/null +++ b/src/plugins/generic/touchscreen/touchscreen.pro @@ -0,0 +1,18 @@ +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 -lmtdev diff --git a/src/plugins/platforms/wayland/qwaylanddisplay.cpp b/src/plugins/platforms/wayland/qwaylanddisplay.cpp index f3e2e9fb94..1314eda012 100644 --- a/src/plugins/platforms/wayland/qwaylanddisplay.cpp +++ b/src/plugins/platforms/wayland/qwaylanddisplay.cpp @@ -311,7 +311,7 @@ void QWaylandDisplay::displayHandleGlobal(uint32_t id, wl_shell_add_listener(mShell, &shellListener, this); } else if (interface == "wl_input_device") { QWaylandInputDevice *inputDevice = - new QWaylandInputDevice(mDisplay, id); + new QWaylandInputDevice(this, id); mInputDevices.append(inputDevice); } else if (interface == "wl_selection_offer") { QWaylandClipboard::instance(display)->createSelectionOffer(id); diff --git a/src/plugins/platforms/wayland/qwaylandinputdevice.cpp b/src/plugins/platforms/wayland/qwaylandinputdevice.cpp index 7f3737613f..c1e2325766 100644 --- a/src/plugins/platforms/wayland/qwaylandinputdevice.cpp +++ b/src/plugins/platforms/wayland/qwaylandinputdevice.cpp @@ -45,10 +45,9 @@ #include "qwaylandwindow.h" #include "qwaylandbuffer.h" -#include - #include #include +#include #include #include @@ -58,13 +57,17 @@ #include #endif -QWaylandInputDevice::QWaylandInputDevice(struct wl_display *display, +//#define POINT_DEBUG + +QWaylandInputDevice::QWaylandInputDevice(QWaylandDisplay *display, uint32_t id) - : mDisplay(display) - , mInputDevice(wl_input_device_create(display, id, 1)) + : mQDisplay(display) + , mDisplay(display->wl_display()) + , mInputDevice(wl_input_device_create(mDisplay, id, 1)) , mPointerFocus(NULL) , mKeyboardFocus(NULL) , mButtons(0) + , mTouchState(QEvent::TouchBegin) { wl_input_device_add_listener(mInputDevice, &inputDeviceListener, @@ -338,12 +341,168 @@ void QWaylandInputDevice::inputHandleKeyboardFocus(void *data, #endif } +void QWaylandInputDevice::inputHandleTouchDown(void *data, + struct wl_input_device *wl_input_device, + uint32_t time, + int id, + int x, + int y) +{ + QWaylandInputDevice *inputDevice = (QWaylandInputDevice *) data; + inputDevice->handleTouchPoint(id, x, y, Qt::TouchPointPressed); +} + +void QWaylandInputDevice::inputHandleTouchUp(void *data, + struct wl_input_device *wl_input_device, + uint32_t time, + int id) +{ + QWaylandInputDevice *inputDevice = (QWaylandInputDevice *) data; + inputDevice->handleTouchPoint(id, 0, 0, Qt::TouchPointReleased); +} + +void QWaylandInputDevice::inputHandleTouchMotion(void *data, + struct wl_input_device *wl_input_device, + uint32_t time, + int id, + int x, + int y) +{ + QWaylandInputDevice *inputDevice = (QWaylandInputDevice *) data; + inputDevice->handleTouchPoint(id, x, y, Qt::TouchPointMoved); +} + +void QWaylandInputDevice::handleTouchPoint(int id, int x, int y, Qt::TouchPointState state) +{ + QWindowSystemInterface::TouchPoint tp; + + // Find out the coordinates for Released events. + bool coordsOk = false; + if (state == Qt::TouchPointReleased) + for (int i = 0; i < mPrevTouchPoints.count(); ++i) + if (mPrevTouchPoints.at(i).id == id) { + tp.area = mPrevTouchPoints.at(i).area; + coordsOk = true; + break; + } + + if (!coordsOk) { + // x and y are surface relative. + // We need a global (screen) position. + + QWaylandWindow *win = mPointerFocus; + if (!win) + win = mKeyboardFocus; +#ifdef POINT_DEBUG + qDebug() << "surface relative coords" << x << y << "using window" << win; +#endif + if (!win) + return; + + QRect winRect = win->geometry(); + + // Get a normalized position (0..1). + const qreal nx = x / qreal(winRect.width()); + const qreal ny = y / qreal(winRect.height()); + tp.normalPosition = QPointF(nx, ny); + + // Map to screen. + QPlatformScreen *screen = mQDisplay->screens().at(0); + QRect screenRect = screen->geometry(); + x = int(nx * screenRect.width()); + y = int(ny * screenRect.height()); + +#ifdef POINT_DEBUG + qDebug() << "normalized position" << nx << ny + << "win rect" << winRect << "screen rect" << screenRect; + qDebug() << "mapped to screen position" << x << y; +#endif + + tp.area = QRectF(x, y, 1, 1); + } + + tp.state = state; + tp.id = id; + tp.isPrimary = mTouchPoints.isEmpty(); + tp.pressure = tp.state == Qt::TouchPointReleased ? 0 : 1; + mTouchPoints.append(tp); +} + +void QWaylandInputDevice::inputHandleTouchFrame(void *data, struct wl_input_device *wl_input_device) +{ + QWaylandInputDevice *inputDevice = (QWaylandInputDevice *) data; + inputDevice->handleTouchFrame(); +} + +void QWaylandInputDevice::handleTouchFrame() +{ + // Copy all points, that are in the previous but not in the current list, as stationary. + for (int i = 0; i < mPrevTouchPoints.count(); ++i) { + const QWindowSystemInterface::TouchPoint &prevPoint(mPrevTouchPoints.at(i)); + if (prevPoint.state == Qt::TouchPointReleased) + continue; + bool found = false; + for (int j = 0; j < mTouchPoints.count(); ++j) + if (mTouchPoints.at(j).id == prevPoint.id) { + found = true; + break; + } + if (!found) { + QWindowSystemInterface::TouchPoint p = prevPoint; + p.state = Qt::TouchPointStationary; + mTouchPoints.append(p); + } + } + + if (mTouchPoints.isEmpty()) { + mPrevTouchPoints.clear(); + return; + } + +#ifdef POINT_DEBUG + qDebug() << mTouchPoints.count() << "touchpoints, event type" << mTouchState; + for (int i = 0; i < mTouchPoints.count(); ++i) + qDebug() << " " << mTouchPoints[i].id << mTouchPoints[i].state << mTouchPoints[i].area; +#endif + + QWindowSystemInterface::handleTouchEvent(0, mTouchState, QTouchEvent::TouchScreen, mTouchPoints); + + bool allReleased = true; + for (int i = 0; i < mTouchPoints.count(); ++i) + if (mTouchPoints.at(i).state != Qt::TouchPointReleased) { + allReleased = false; + break; + } + + mPrevTouchPoints = mTouchPoints; + mTouchPoints.clear(); + + if (allReleased) { +#ifdef POINT_DEBUG + qDebug() << mTouchPoints.count() << "touchpoints, event type" << QEvent::TouchEnd; +#endif + QWindowSystemInterface::handleTouchEvent(0, QEvent::TouchEnd, QTouchEvent::TouchScreen, mTouchPoints); + mTouchState = QEvent::TouchBegin; + mPrevTouchPoints.clear(); + } else if (mTouchState == QEvent::TouchBegin) + mTouchState = QEvent::TouchUpdate; +} + +void QWaylandInputDevice::inputHandleTouchCancel(void *data, struct wl_input_device *wl_input_device) +{ +} + const struct wl_input_device_listener QWaylandInputDevice::inputDeviceListener = { QWaylandInputDevice::inputHandleMotion, QWaylandInputDevice::inputHandleButton, QWaylandInputDevice::inputHandleKey, QWaylandInputDevice::inputHandlePointerFocus, QWaylandInputDevice::inputHandleKeyboardFocus, + QWaylandInputDevice::inputHandleTouchDown, + QWaylandInputDevice::inputHandleTouchUp, + QWaylandInputDevice::inputHandleTouchMotion, + QWaylandInputDevice::inputHandleTouchFrame, + QWaylandInputDevice::inputHandleTouchCancel }; void QWaylandInputDevice::attach(QWaylandBuffer *buffer, int x, int y) diff --git a/src/plugins/platforms/wayland/qwaylandinputdevice.h b/src/plugins/platforms/wayland/qwaylandinputdevice.h index e5be5bb8d2..008ecf144d 100644 --- a/src/plugins/platforms/wayland/qwaylandinputdevice.h +++ b/src/plugins/platforms/wayland/qwaylandinputdevice.h @@ -48,21 +48,24 @@ #include #include #include +#include #include QT_BEGIN_NAMESPACE class QWaylandWindow; +class QWaylandDisplay; class QWaylandInputDevice { public: - QWaylandInputDevice(struct wl_display *display, uint32_t id); + QWaylandInputDevice(QWaylandDisplay *display, uint32_t id); void attach(QWaylandBuffer *buffer, int x, int y); void handleWindowDestroyed(QWaylandWindow *window); struct wl_input_device *wl_input_device() const { return mInputDevice; } private: + QWaylandDisplay *mQDisplay; struct wl_display *mDisplay; struct wl_input_device *mInputDevice; QWaylandWindow *mPointerFocus; @@ -95,6 +98,32 @@ private: uint32_t time, struct wl_surface *surface, struct wl_array *keys); + static void inputHandleTouchDown(void *data, + struct wl_input_device *wl_input_device, + uint32_t time, + int id, + int x, + int y); + static void inputHandleTouchUp(void *data, + struct wl_input_device *wl_input_device, + uint32_t time, + int id); + static void inputHandleTouchMotion(void *data, + struct wl_input_device *wl_input_device, + uint32_t time, + int id, + int x, + int y); + static void inputHandleTouchFrame(void *data, + struct wl_input_device *wl_input_device); + static void inputHandleTouchCancel(void *data, + struct wl_input_device *wl_input_device); + + void handleTouchPoint(int id, int x, int y, Qt::TouchPointState state); + void handleTouchFrame(); + QList mTouchPoints; + QList mPrevTouchPoints; + QEvent::Type mTouchState; }; QT_END_NAMESPACE diff --git a/src/plugins/platforms/wayland/qwaylandwindow.cpp b/src/plugins/platforms/wayland/qwaylandwindow.cpp index 2376df55c9..f685dae729 100644 --- a/src/plugins/platforms/wayland/qwaylandwindow.cpp +++ b/src/plugins/platforms/wayland/qwaylandwindow.cpp @@ -146,8 +146,8 @@ void QWaylandWindow::newSurfaceCreated() { if (mBuffer) { wl_surface_attach(mSurface,mBuffer->buffer(),0,0); - QWindowSystemInterface::handleExposeEvent(window(), QRect(QPoint(), geometry().size())); - wl_surface_damage(mSurface,0,0,mBuffer->size().width(),mBuffer->size().height()); + // do not damage the surface here, as this leads to graphical corruptions in the compositor until + // the first frame has been rendered } } diff --git a/src/plugins/platforms/wayland/wayland_sha1.txt b/src/plugins/platforms/wayland/wayland_sha1.txt index a696e760d5..9596f7b0a8 100644 --- a/src/plugins/platforms/wayland/wayland_sha1.txt +++ b/src/plugins/platforms/wayland/wayland_sha1.txt @@ -1,3 +1,3 @@ This version of the Qt Wayland plugin is checked against the following sha1 from the Wayland repository: -bfea3d6befdb688d5354e6f15a9400ea637febf9 +aa7bbb210b7121b9314993228960240358e9b123 diff --git a/src/plugins/platforms/wayland/windowmanager_integration/qwaylandwindowmanager-client-protocol.h b/src/plugins/platforms/wayland/windowmanager_integration/qwaylandwindowmanager-client-protocol.h index 73673aef6f..e781b16c41 100644 --- a/src/plugins/platforms/wayland/windowmanager_integration/qwaylandwindowmanager-client-protocol.h +++ b/src/plugins/platforms/wayland/windowmanager_integration/qwaylandwindowmanager-client-protocol.h @@ -36,71 +36,67 @@ struct wl_client; struct wl_windowmanager; -struct wl_proxy; - -extern void -wl_proxy_marshal(struct wl_proxy *p, uint32_t opcode, ...); -extern struct wl_proxy * -wl_proxy_create(struct wl_proxy *factory, - const struct wl_interface *interface); -extern struct wl_proxy * -wl_proxy_create_for_id(struct wl_display *display, - const struct wl_interface *interface, uint32_t id); -extern void -wl_proxy_destroy(struct wl_proxy *proxy); - -extern int -wl_proxy_add_listener(struct wl_proxy *proxy, - void (**implementation)(void), void *data); - -extern void -wl_proxy_set_user_data(struct wl_proxy *proxy, void *user_data); - -extern void * -wl_proxy_get_user_data(struct wl_proxy *proxy); - extern const struct wl_interface wl_windowmanager_interface; -#define wl_WINDOWMANAGER_MAP_CLIENT_TO_PROCESS 0 -#define wl_WINDOWMANAGER_AUTHENTICATE_WITH_TOKEN 1 +struct wl_windowmanager_listener { + void (*client_onscreen_visibility)(void *data, + struct wl_windowmanager *wl_windowmanager, + int visible); + void (*set_screen_rotation)(void *data, + struct wl_windowmanager *wl_windowmanager, + int rotation); +}; + +static inline int +wl_windowmanager_add_listener(struct wl_windowmanager *wl_windowmanager, + const struct wl_windowmanager_listener *listener, void *data) +{ + return wl_proxy_add_listener((struct wl_proxy *) wl_windowmanager, + (void (**)(void)) listener, data); +} + +#define WL_WINDOWMANAGER_MAP_CLIENT_TO_PROCESS 0 +#define WL_WINDOWMANAGER_AUTHENTICATE_WITH_TOKEN 1 static inline struct wl_windowmanager * -wl_windowmanager_create(struct wl_display *display, uint32_t id) +wl_windowmanager_create(struct wl_display *display, uint32_t id, uint32_t version) { - return (struct wl_windowmanager *) - wl_proxy_create_for_id(display, &wl_windowmanager_interface, id); + wl_display_bind(display, id, "wl_windowmanager", version); + + return (struct wl_windowmanager *) + wl_proxy_create_for_id(display, &wl_windowmanager_interface, id); } static inline void wl_windowmanager_set_user_data(struct wl_windowmanager *wl_windowmanager, void *user_data) { - wl_proxy_set_user_data((struct wl_proxy *) wl_windowmanager, user_data); + wl_proxy_set_user_data((struct wl_proxy *) wl_windowmanager, user_data); } static inline void * wl_windowmanager_get_user_data(struct wl_windowmanager *wl_windowmanager) { - return wl_proxy_get_user_data((struct wl_proxy *) wl_windowmanager); + return wl_proxy_get_user_data((struct wl_proxy *) wl_windowmanager); } static inline void wl_windowmanager_destroy(struct wl_windowmanager *wl_windowmanager) { - wl_proxy_destroy((struct wl_proxy *) wl_windowmanager); + wl_proxy_destroy((struct wl_proxy *) wl_windowmanager); } static inline void wl_windowmanager_map_client_to_process(struct wl_windowmanager *wl_windowmanager, uint32_t processid) { - wl_proxy_marshal((struct wl_proxy *) wl_windowmanager, - wl_WINDOWMANAGER_MAP_CLIENT_TO_PROCESS, processid); + wl_proxy_marshal((struct wl_proxy *) wl_windowmanager, + WL_WINDOWMANAGER_MAP_CLIENT_TO_PROCESS, processid); } static inline void -wl_windowmanager_authenticate_with_token(struct wl_windowmanager *wl_windowmanager, const char *wl_authentication_token) +wl_windowmanager_authenticate_with_token(struct wl_windowmanager *wl_windowmanager, const char *processid) { - wl_proxy_marshal((struct wl_proxy *) wl_windowmanager, - wl_WINDOWMANAGER_AUTHENTICATE_WITH_TOKEN, wl_authentication_token); + wl_proxy_marshal((struct wl_proxy *) wl_windowmanager, + WL_WINDOWMANAGER_AUTHENTICATE_WITH_TOKEN, processid); } #ifdef __cplusplus diff --git a/src/plugins/platforms/wayland/windowmanager_integration/qwaylandwindowmanagerintegration.cpp b/src/plugins/platforms/wayland/windowmanager_integration/qwaylandwindowmanagerintegration.cpp index 4236f395cb..7390c52740 100644 --- a/src/plugins/platforms/wayland/windowmanager_integration/qwaylandwindowmanagerintegration.cpp +++ b/src/plugins/platforms/wayland/windowmanager_integration/qwaylandwindowmanagerintegration.cpp @@ -43,6 +43,15 @@ #include "qwaylandwindowmanager-client-protocol.h" #include +#include +#include +#include +#include + +const struct wl_windowmanager_listener QWaylandWindowManagerIntegration::mWindowManagerListener = { + QWaylandWindowManagerIntegration::wlHandleOnScreenVisibilityChange, + QWaylandWindowManagerIntegration::wlHandleScreenOrientationChange, +}; QWaylandWindowManagerIntegration *QWaylandWindowManagerIntegration::createIntegration(QWaylandDisplay *waylandDisplay) { @@ -70,9 +79,12 @@ struct wl_windowmanager *QWaylandWindowManagerIntegration::windowManager() const void QWaylandWindowManagerIntegration::wlHandleListenerGlobal(wl_display *display, uint32_t id, const char *interface, uint32_t version, void *data) { + Q_UNUSED(version); if (strcmp(interface, "wl_windowmanager") == 0) { QWaylandWindowManagerIntegration *integration = static_cast(data); - integration->mWaylandWindowManager = wl_windowmanager_create(display, id); + integration->mWaylandWindowManager = wl_windowmanager_create(display, id, 1); + + wl_windowmanager_add_listener(integration->mWaylandWindowManager, &mWindowManagerListener, integration); } } @@ -90,3 +102,22 @@ void QWaylandWindowManagerIntegration::authenticateWithToken(const QByteArray &t if (mWaylandWindowManager) wl_windowmanager_authenticate_with_token(mWaylandWindowManager, authToken.constData()); } + +void QWaylandWindowManagerIntegration::wlHandleOnScreenVisibilityChange(void *data, struct wl_windowmanager *wl_windowmanager, int visible) +{ + Q_UNUSED(data); + Q_UNUSED(wl_windowmanager); + QEvent evt(visible != 0 ? QEvent::ApplicationActivated : QEvent::ApplicationDeactivated); + + QCoreApplication::sendEvent(QCoreApplication::instance(), &evt); + + qDebug() << "OnScreenVisibility" << (visible != 0); +} + +void QWaylandWindowManagerIntegration::wlHandleScreenOrientationChange(void *data, struct wl_windowmanager *wl_windowmanager, int screenOrientation) +{ + Q_UNUSED(data); + Q_UNUSED(wl_windowmanager); + QScreenOrientationChangeEvent event(screenOrientation); + QCoreApplication::sendEvent(QCoreApplication::instance(), &event); +} diff --git a/src/plugins/platforms/wayland/windowmanager_integration/qwaylandwindowmanagerintegration.h b/src/plugins/platforms/wayland/windowmanager_integration/qwaylandwindowmanagerintegration.h index 0e3781dbe2..6b4658c7e1 100644 --- a/src/plugins/platforms/wayland/windowmanager_integration/qwaylandwindowmanagerintegration.h +++ b/src/plugins/platforms/wayland/windowmanager_integration/qwaylandwindowmanagerintegration.h @@ -62,9 +62,14 @@ private: static void wlHandleListenerGlobal(wl_display *display, uint32_t id, const char *interface, uint32_t version, void *data); + static void wlHandleOnScreenVisibilityChange(void *data, struct wl_windowmanager *wl_windowmanager, int visible); + static void wlHandleScreenOrientationChange(void *data, struct wl_windowmanager *wl_windowmanager, int screenOrientation); private: + QWaylandDisplay *mWaylandDisplay; struct wl_windowmanager *mWaylandWindowManager; + + static const struct wl_windowmanager_listener mWindowManagerListener; }; #endif // QWAYLANDWINDOWMANAGERINTEGRATION_H diff --git a/src/plugins/platforms/wayland/windowmanager_integration/wayland-windowmanager-protocol.c b/src/plugins/platforms/wayland/windowmanager_integration/wayland-windowmanager-protocol.c index 0250801b1f..8125dec4d3 100644 --- a/src/plugins/platforms/wayland/windowmanager_integration/wayland-windowmanager-protocol.c +++ b/src/plugins/platforms/wayland/windowmanager_integration/wayland-windowmanager-protocol.c @@ -26,12 +26,18 @@ #include "wayland-util.h" static const struct wl_message wl_windowmanager_requests[] = { - { "map_client_to_process", "u" }, - { "authenticate_with_token", "s" }, + { "map_client_to_process", "u", NULL }, + { "authenticate_with_token", "s", NULL }, +}; + +static const struct wl_message wl_windowmanager_events[] = { + { "client_onscreen_visibility", "i", NULL }, + { "set_screen_rotation", "i", NULL }, }; WL_EXPORT const struct wl_interface wl_windowmanager_interface = { - "wl_windowmanager", 1, - ARRAY_LENGTH(wl_windowmanager_requests), wl_windowmanager_requests, - 0, NULL, + "wl_windowmanager", 1, + ARRAY_LENGTH(wl_windowmanager_requests), wl_windowmanager_requests, + ARRAY_LENGTH(wl_windowmanager_events), wl_windowmanager_events, }; + diff --git a/src/widgets/graphicsview/qgraphicsproxywidget.cpp b/src/widgets/graphicsview/qgraphicsproxywidget.cpp index 127578c7c9..0b8cccaaeb 100644 --- a/src/widgets/graphicsview/qgraphicsproxywidget.cpp +++ b/src/widgets/graphicsview/qgraphicsproxywidget.cpp @@ -274,12 +274,12 @@ void QGraphicsProxyWidgetPrivate::sendWidgetMouseEvent(QGraphicsSceneMouseEvent pos = mapToReceiver(pos, receiver); // Send mouse event. - QMouseEvent *mouseEvent = QMouseEvent::createExtendedMouseEvent(type, pos, - receiver->mapToGlobal(pos.toPoint()), event->button(), - event->buttons(), event->modifiers()); + QMouseEvent mouseEvent(type, pos, + receiver->mapToGlobal(pos.toPoint()), event->button(), + event->buttons(), event->modifiers()); QWidget *embeddedMouseGrabberPtr = (QWidget *)embeddedMouseGrabber; - QApplicationPrivate::sendMouseEvent(receiver, mouseEvent, alienWidget, widget, + QApplicationPrivate::sendMouseEvent(receiver, &mouseEvent, alienWidget, widget, &embeddedMouseGrabberPtr, lastWidgetUnderMouse, event->spontaneous()); embeddedMouseGrabber = embeddedMouseGrabberPtr; @@ -302,8 +302,7 @@ void QGraphicsProxyWidgetPrivate::sendWidgetMouseEvent(QGraphicsSceneMouseEvent #endif } - event->setAccepted(mouseEvent->isAccepted()); - delete mouseEvent; + event->setAccepted(mouseEvent.isAccepted()); } void QGraphicsProxyWidgetPrivate::sendWidgetKeyEvent(QKeyEvent *event) diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp index fd745c16b5..0e1b691b36 100644 --- a/src/widgets/kernel/qapplication.cpp +++ b/src/widgets/kernel/qapplication.cpp @@ -1221,8 +1221,8 @@ bool QApplication::compressEvent(QEvent *event, QObject *receiver, QPostEventLis || event->type() == QEvent::LanguageChange || event->type() == QEvent::UpdateSoftKeys || event->type() == QEvent::InputMethod)) { - for (int i = 0; i < postedEvents->size(); ++i) { - const QPostEvent &cur = postedEvents->at(i); + for (QPostEventList::const_iterator it = postedEvents->constBegin(); it != postedEvents->constEnd(); ++it) { + const QPostEvent &cur = *it; if (cur.receiver != receiver || cur.event == 0 || cur.event->type() != event->type()) continue; if (cur.event->type() == QEvent::LayoutRequest @@ -2651,7 +2651,8 @@ void QApplicationPrivate::dispatchEnterLeave(QWidget* enter, QWidget* leave) { if (w->testAttribute(Qt::WA_Hover) && (!QApplication::activePopupWidget() || QApplication::activePopupWidget() == w->window())) { Q_ASSERT(instance()); - QHoverEvent he(QEvent::HoverLeave, QPoint(-1, -1), w->mapFromGlobal(QApplicationPrivate::instance()->hoverGlobalPos)); + QHoverEvent he(QEvent::HoverLeave, QPoint(-1, -1), w->mapFromGlobal(QApplicationPrivate::instance()->hoverGlobalPos), + QApplication::keyboardModifiers()); qApp->d_func()->notify_helper(w, &he); } } @@ -2664,7 +2665,8 @@ void QApplicationPrivate::dispatchEnterLeave(QWidget* enter, QWidget* leave) { QApplication::sendEvent(w, &enterEvent); if (w->testAttribute(Qt::WA_Hover) && (!QApplication::activePopupWidget() || QApplication::activePopupWidget() == w->window())) { - QHoverEvent he(QEvent::HoverEnter, w->mapFromGlobal(posEnter), QPoint(-1, -1)); + QHoverEvent he(QEvent::HoverEnter, w->mapFromGlobal(posEnter), QPoint(-1, -1), + QApplication::keyboardModifiers()); qApp->d_func()->notify_helper(w, &he); } } @@ -3826,7 +3828,7 @@ bool QApplication::notify(QObject *receiver, QEvent *e) while (w) { if (w->testAttribute(Qt::WA_Hover) && (!QApplication::activePopupWidget() || QApplication::activePopupWidget() == w->window())) { - QHoverEvent he(QEvent::HoverMove, relpos, relpos - diff); + QHoverEvent he(QEvent::HoverMove, relpos, relpos - diff, mouse->modifiers()); d->notify_helper(w, &he); } if (w->isWindow() || w->testAttribute(Qt::WA_NoMousePropagation)) diff --git a/src/widgets/platforms/mac/qfontdatabase_mac.cpp b/src/widgets/platforms/mac/qfontdatabase_mac.cpp index 724dbf6c4a..b7335d684e 100644 --- a/src/widgets/platforms/mac/qfontdatabase_mac.cpp +++ b/src/widgets/platforms/mac/qfontdatabase_mac.cpp @@ -106,12 +106,14 @@ if (QSysInfo::MacintoshVersion >= QSysInfo::MV_10_5) { CTFontDescriptorRef font = (CTFontDescriptorRef)CFArrayGetValueAtIndex(fonts, i); QCFString family_name = (CFStringRef)CTFontDescriptorCopyAttribute(font, kCTFontFamilyNameAttribute); + QCFString style_name = (CFStringRef)CTFontDescriptorCopyAttribute(font, kCTFontStyleNameAttribute); QtFontFamily *family = db->family(family_name, true); for(int ws = 1; ws < QFontDatabase::WritingSystemsCount; ++ws) family->writingSystems[ws] = QtFontFamily::Supported; QtFontFoundry *foundry = family->foundry(foundry_name, true); QtFontStyle::Key styleKey; + styleKey.styleName = style_name; if(QCFType styles = (CFDictionaryRef)CTFontDescriptorCopyAttribute(font, kCTFontTraitsAttribute)) { if(CFNumberRef weight = (CFNumberRef)CFDictionaryGetValue(styles, kCTFontWeightTrait)) { Q_ASSERT(CFNumberIsFloatType(weight)); diff --git a/src/widgets/platforms/mac/qpaintengine_mac.cpp b/src/widgets/platforms/mac/qpaintengine_mac.cpp index 802c455ab8..0d459a5d89 100644 --- a/src/widgets/platforms/mac/qpaintengine_mac.cpp +++ b/src/widgets/platforms/mac/qpaintengine_mac.cpp @@ -798,9 +798,6 @@ QCoreGraphicsPaintEngine::updateClipPath(const QPainterPath &p, Qt::ClipOperatio } else if(op == Qt::IntersectClip) { d->current.clip = d->current.clip.intersected(clipRegion); d->setClip(&d->current.clip); - } else if(op == Qt::UniteClip) { - d->current.clip = d->current.clip.united(clipRegion); - d->setClip(&d->current.clip); } } } @@ -822,8 +819,6 @@ QCoreGraphicsPaintEngine::updateClipRegion(const QRegion &clipRegion, Qt::ClipOp d->current.clip = d->current.clip.intersected(clipRegion); else if(op == Qt::ReplaceClip) d->current.clip = clipRegion; - else if(op == Qt::UniteClip) - d->current.clip = d->current.clip.united(clipRegion); d->setClip(&d->current.clip); } } diff --git a/src/widgets/platforms/win/qprintengine_win.cpp b/src/widgets/platforms/win/qprintengine_win.cpp index ebce404c3c..5ba33c043c 100644 --- a/src/widgets/platforms/win/qprintengine_win.cpp +++ b/src/widgets/platforms/win/qprintengine_win.cpp @@ -586,8 +586,7 @@ void QWin32PrintEngine::updateClipPath(const QPainterPath &clipPath, Qt::ClipOpe const int ops[] = { -1, // Qt::NoClip, covered above RGN_COPY, // Qt::ReplaceClip - RGN_AND, // Qt::IntersectClip - RGN_OR // Qt::UniteClip + RGN_AND // Qt::IntersectClip }; Q_ASSERT(op > 0 && unsigned(op) <= sizeof(ops) / sizeof(int)); SelectClipPath(d->hdc, ops[op]); diff --git a/src/widgets/platforms/x11/qfontdatabase_x11.cpp b/src/widgets/platforms/x11/qfontdatabase_x11.cpp index 958daa2506..ed94fa6be1 100644 --- a/src/widgets/platforms/x11/qfontdatabase_x11.cpp +++ b/src/widgets/platforms/x11/qfontdatabase_x11.cpp @@ -1034,13 +1034,14 @@ static void loadFontConfig() FcChar8 *file_value; int index_value; FcChar8 *foundry_value; + FcChar8 *style_value; FcBool scalable; { FcObjectSet *os = FcObjectSetCreate(); FcPattern *pattern = FcPatternCreate(); const char *properties [] = { - FC_FAMILY, FC_WEIGHT, FC_SLANT, + FC_FAMILY, FC_STYLE, FC_WEIGHT, FC_SLANT, FC_SPACING, FC_FILE, FC_INDEX, FC_LANG, FC_CHARSET, FC_FOUNDRY, FC_SCALABLE, FC_PIXEL_SIZE, FC_WEIGHT, FC_WIDTH, @@ -1085,6 +1086,8 @@ static void loadFontConfig() scalable = FcTrue; if (FcPatternGetString(fonts->fonts[i], FC_FOUNDRY, 0, &foundry_value) != FcResultMatch) foundry_value = 0; + if (FcPatternGetString(fonts->fonts[i], FC_STYLE, 0, &style_value) != FcResultMatch) + style_value = 0; QtFontFamily *family = db->family(familyName, true); FcLangSet *langset = 0; @@ -1142,6 +1145,7 @@ static void loadFontConfig() family->fontFileIndex = index_value; QtFontStyle::Key styleKey; + styleKey.styleName = style_value ? QString::fromUtf8((const char *) style_value) : QString(); styleKey.style = (slant_value == FC_SLANT_ITALIC) ? QFont::StyleItalic : ((slant_value == FC_SLANT_OBLIQUE) diff --git a/src/widgets/platforms/x11/qpaintengine_x11.cpp b/src/widgets/platforms/x11/qpaintengine_x11.cpp index a7ea84c918..6b480815cf 100644 --- a/src/widgets/platforms/x11/qpaintengine_x11.cpp +++ b/src/widgets/platforms/x11/qpaintengine_x11.cpp @@ -2078,11 +2078,6 @@ void QX11PaintEngine::updateClipRegion_dev(const QRegion &clipRegion, Qt::ClipOp else d->crgn = clipRegion; break; - case Qt::UniteClip: - d->crgn |= clipRegion; - if (!sysClip.isEmpty()) - d->crgn = d->crgn.intersected(sysClip); - break; default: break; } diff --git a/src/widgets/widgets/qmaccocoaviewcontainer_mac.mm b/src/widgets/widgets/qmaccocoaviewcontainer_mac.mm index 92b8fb77fa..5bb7a3bbf2 100644 --- a/src/widgets/widgets/qmaccocoaviewcontainer_mac.mm +++ b/src/widgets/widgets/qmaccocoaviewcontainer_mac.mm @@ -84,7 +84,7 @@ developer to provide the autorelease pool. The following is a snippet of subclassing QMacCocoaViewContainer to wrap a NSSearchField. - \snippet demos/macmainwindow/macmainwindow.mm 0 + \snippet examples/mainwindows/macmainwindow/macmainwindow.mm 0 */ diff --git a/tests/arthur/.gitattributes b/tests/arthur/.gitattributes deleted file mode 100644 index b7fa3a03c1..0000000000 --- a/tests/arthur/.gitattributes +++ /dev/null @@ -1,2 +0,0 @@ -data/*/*.svg -crlf -data/qps/*.qps -crlf diff --git a/tests/arthur/.gitignore b/tests/arthur/.gitignore deleted file mode 100644 index 7f0c1fa2cd..0000000000 --- a/tests/arthur/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -bin/shower -lance/lance diff --git a/tests/arthur/README b/tests/arthur/README deleted file mode 100644 index 0178351b95..0000000000 --- a/tests/arthur/README +++ /dev/null @@ -1,84 +0,0 @@ -This is a simple regression testing framework for Arthur. - -There are three parts to it. - -1) datagenerator . which is the main part. it's used to - run all the tests, create output png files, - measure rendering performance and output it in - data.xml file. datagenerator reads in - framework.ini to figure out where to look for tests. - if the framework.ini file isn't in the current directory - you have to specify its location with the -framework - parameter. by default datagenerator generates output in the - current directory - to specify output directory pass in - -output parameter followed by a directory name. if the given - directory doesn't exist it will be created. - - it's recommended to always specify -iterations argument (followed - by the number). if the argument has been specified datagenerator - will try to render all testcases the given amount of times yielding - a lot more precise results. - - if one wants to test just a specified engine -engine argument - should be specified (followed by the desired engine name). - - individual testsuites can be run with -suite paramenter. - individual testcases from testcases can also be reran with - -testcase paramenter. - - given files can also be tested individually. if the option -file - is specified with a SVG file engines will be tested against just - that file and output will be written directly to stdout (not files). - it's useful when optimizing one engine with particular case in - mind. - - Example command line: - ./bin/datagenerator -framework data/framework.ini -output sampleout -iterations 5 -engine [ENGINE] - -2) htmlgenerator. which is used to generate html pages out of - generated output (generated by datagenerator). htmlgenerator also - reads in the framework.ini file. so the option -framework also - applies. but htmlgenerator takes a mandatory directory name as the - second argument. the mandatory directory name is the directory to - which you output the files generated by datagenerator (either - whatever followed the -output or the current directory) - - htmlgenerator will generate html pages that can be viewed to - manually inspect the results. - - Example command line: - ./bin/htmlgenerator -framework data/framework.ini sampleout - -3) performancediff. diffs the performance data between two output - directories. so assuming you already have data for all the engines, - you change something in an engine. to see the performance - difference run - ./bin/datagenerator -framework data/framework.ini -output newoutput -iterations 5 - and then - ./bin/performancediff sampleout newoutput - - The performance results will be printed out. - - The two first columns are in ms. The last one is a - percentage of difference. - - After the percentage a '+' or a '-' sign followed by a - number will be sometimes printed. - - '+' signifies the new results were mathematically better. '-' is of - course just the opposite. - the number following '+' is the minimum rendering time the engine - spent rendering the given file up till this moment. - the number following '-' is the maximum rendering time the engine - spent rendering the given file up till this moment. - - (if the current results are out of the scope from within maximum and - minimum number then the respective sign is printed out.) -------------------------------------------------------------------- - -Note that the generated output directories can be copied from one -machine to the other. htmlgenerator will generate webpages for all -engines with valid data.xml files. So if you want add NativeWin32 and -NativeMac engines you'll have to have someone with a windows and mac -run datagenerator with "-engine NativeWin32" or "-engine NativeMac" -options and then sending you the respective output directories. diff --git a/tests/arthur/arthurtester.pri b/tests/arthur/arthurtester.pri deleted file mode 100644 index 87ca08292e..0000000000 --- a/tests/arthur/arthurtester.pri +++ /dev/null @@ -1,21 +0,0 @@ -DEFINES += QT_COMPAT_WARNINGS QT_NO_CAST_TO_ASCII - -INCLUDEPATH += $$COMMON_FOLDER - -include($$COMMON_FOLDER/common.pri) - -#build_all:!build_pass { -# CONFIG -= build_all -# CONFIG += release -#} -#contains(CONFIG, debug_and_release_target) { -# CONFIG(debug, debug|release) { -# LIBS+=-L$$COMMON_FOLDER/debug -# } else { -# LIBS+=-L$$COMMON_FOLDER/release -# } -#} else { -# LIBS += -L$$COMMON_FOLDER -#} -# -#LIBS += -ltestcommon diff --git a/tests/arthur/arthurtester.pro b/tests/arthur/arthurtester.pro deleted file mode 100644 index 443ec56c30..0000000000 --- a/tests/arthur/arthurtester.pro +++ /dev/null @@ -1,6 +0,0 @@ -# -*-Mode:makefile-*- -TEMPLATE = subdirs -SUBDIRS = datagenerator htmlgenerator \ - performancediff shower lance - - diff --git a/tests/arthur/common/common.pri b/tests/arthur/common/common.pri deleted file mode 100644 index 1f84904474..0000000000 --- a/tests/arthur/common/common.pri +++ /dev/null @@ -1,18 +0,0 @@ -VPATH+=$$PWD -INCLUDEPATH += $$PWD - -contains(QT_CONFIG, opengl)|contains(QT_CONFIG, opengles1)|contains(QT_CONFIG, opengles2):DEFINES += BUILD_OPENGL - -SOURCES += \ - xmldata.cpp \ - paintcommands.cpp \ - qengines.cpp \ - framework.cpp - -HEADERS += \ - xmldata.h \ - paintcommands.h \ - qengines.h \ - framework.h - -RESOURCES += images.qrc diff --git a/tests/arthur/common/common.pro b/tests/arthur/common/common.pro deleted file mode 100644 index 2a1f8f04fb..0000000000 --- a/tests/arthur/common/common.pro +++ /dev/null @@ -1,20 +0,0 @@ -# -*- Mode: makefile -*- -# -# not used as a library all binaries include common.pri anyway -# -#COMMON_FOLDER = ../common -#include(../arthurtester.pri) -#TEMPLATE = lib -#CONFIG += static -#QT += xml opengl svg - -#build_all:!build_pass { -# CONFIG -= build_all -# CONFIG += release -#} - -#TARGET = testcommon - -#include(common.pri) - - diff --git a/tests/arthur/common/framework.cpp b/tests/arthur/common/framework.cpp deleted file mode 100644 index cfe996db90..0000000000 --- a/tests/arthur/common/framework.cpp +++ /dev/null @@ -1,130 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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 "framework.h" - -#include -#include -#include -#include -#include - -Framework::Framework() - : qsettings(0) -{ -} - -Framework::Framework(const QString &file) - : qsettings(0) -{ - load(file); -} - -Framework::~Framework() -{ - delete qsettings; - qsettings = 0; -} - -QString Framework::basePath() const -{ - if (!qsettings) - return QString(); - - QFileInfo fi(qsettings->fileName()); - return fi.absolutePath(); -} - - -QStringList Framework::suites() const -{ - if (!qsettings) - return QStringList(); - - QStringList tests = qsettings->childGroups(); - qDebug()<<"here suites "<beginGroup(QString("Blacklist")); - QStringList engines = qsettings->childKeys(); - foreach(QString engineName, engines) { - QStringList testcases = qsettings->value(engineName).toStringList(); - m_blacklist.insert(engineName, testcases); - qDebug()<<"Blacklists for "<endGroup(); - } -} - -QString Framework::outputDir() const -{ - qsettings->beginGroup("General"); - QString outputDirName = qsettings->value("outputDir").toString(); - qsettings->endGroup(); - return outputDirName; -} - -QSettings * Framework::settings() const -{ - return qsettings; -} diff --git a/tests/arthur/common/framework.h b/tests/arthur/common/framework.h deleted file mode 100644 index 0fa496f6cc..0000000000 --- a/tests/arthur/common/framework.h +++ /dev/null @@ -1,76 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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 FRAMEWORK_H -#define FRAMEWORK_H - -#include -#include -#include - -QT_FORWARD_DECLARE_CLASS(QSettings) - -class Framework -{ -public: - Framework(); - Framework(const QString &file); - ~Framework(); - - bool isValid() const; - - void load(const QString &file); - - QSettings *settings() const; - - - QString basePath() const; - QString outputDir() const; - - QStringList suites() const; - - bool isTestBlacklisted(const QString &engineName, - const QString &testcase) const; -private: - QSettings *qsettings; - QMap m_blacklist; -}; - -#endif diff --git a/tests/arthur/common/qengines.cpp b/tests/arthur/common/qengines.cpp deleted file mode 100644 index 8bd90be5b7..0000000000 --- a/tests/arthur/common/qengines.cpp +++ /dev/null @@ -1,733 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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 "qengines.h" -#include "paintcommands.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// For QApplicationPrivate::graphics_system_name -#include - -QEngine::~QEngine() -{ -} - -Q_GLOBAL_STATIC(QtEngines, qtengines_global) -QtEngines * QtEngines::self() -{ - return qtengines_global(); -} - - -QList QtEngines::engines() const -{ - return m_engines; -} - - -QList QtEngines::foreignEngines() const -{ - return m_foreignEngines; -} - - -QEngine * QtEngines::defaultEngine() const -{ - return m_defaultEngine; -} - - -QtEngines::QtEngines() -{ - init(); -} - - -void QtEngines::init() -{ - m_defaultEngine = new RasterEngine; - m_engines << m_defaultEngine - << new NativeEngine - << new WidgetEngine; - -#if defined(BUILD_OPENGL) - if (QGLFormat::hasOpenGL()) - m_engines << new GLEngine; -#endif - -#ifndef QT_NO_PRINTER - m_engines << new PDFEngine -#ifdef Q_WS_X11 - << new PSEngine -#endif -#ifdef Q_WS_WIN - << new WinPrintEngine -#endif - ; -#endif //QT_NO_PRINTER - - m_foreignEngines << new RSVGEngine; -} - -RasterEngine::RasterEngine() -{ - -} - -QString RasterEngine::name() const -{ - return QLatin1String("Raster"); -} - - -void RasterEngine::prepare(const QSize &size, const QColor &fillColor) -{ - image = QImage(size, QImage::Format_ARGB32_Premultiplied); - QPainter p(&image); - p.setCompositionMode(QPainter::CompositionMode_Source); - p.fillRect(image.rect(), fillColor); -} - - -void RasterEngine::render(QSvgRenderer *r, const QString &) -{ - QPainter p(&image); - r->render(&p); - p.end(); -} - - -void RasterEngine::render(const QStringList &qpsScript, - const QString &absFilePath) -{ - QPainter pt(&image); - PaintCommands pcmd(qpsScript, 800, 800); - pcmd.setPainter(&pt); - pcmd.setFilePath(absFilePath); - pcmd.runCommands(); - pt.end(); -} - -bool RasterEngine::drawOnPainter(QPainter *p) -{ - p->drawImage(0, 0, image); - return true; -} - -void RasterEngine::save(const QString &file) -{ - image.save(file, "PNG"); -} - - -NativeEngine::NativeEngine() -{ - -} - - -QString NativeEngine::name() const -{ -#ifdef Q_WS_X11 -#ifndef QT_NO_XRENDER - return QLatin1String("NativeXRender"); -#else - return QLatin1String("NativeXLib"); -#endif -#elif (defined Q_WS_WIN32) - return QLatin1String("NativeWin32"); -#elif (defined Q_WS_MAC) - return QLatin1String("NativeMac"); -#elif defined(Q_WS_QWS) - return QLatin1String("NativeEmbedded"); -#endif -} - - -void NativeEngine::prepare(const QSize &size, const QColor &fillColor) -{ - pixmap = QPixmap(size); - pixmap.fill(fillColor); -} - - -void NativeEngine::render(QSvgRenderer *r, const QString &) -{ - QPainter p(&pixmap); - r->render(&p); - p.end(); -} - - -void NativeEngine::render(const QStringList &qpsScript, - const QString &absFilePath) -{ - QPainter pt(&pixmap); - PaintCommands pcmd(qpsScript, 800, 800); - pcmd.setPainter(&pt); - pcmd.setFilePath(absFilePath); - pcmd.runCommands(); - pt.end(); -} - -bool NativeEngine::drawOnPainter(QPainter *p) -{ - p->drawPixmap(0, 0, pixmap); - return true; -} - -void NativeEngine::save(const QString &file) -{ - pixmap.save(file, "PNG"); -} - - -#if defined(BUILD_OPENGL) -GLEngine::GLEngine() - : pbuffer(0), widget(0) -{ - usePixelBuffers = QGLPixelBuffer::hasOpenGLPbuffers(); -} - - -QString GLEngine::name() const -{ - return QLatin1String("OpenGL"); -} - -void GLEngine::prepare(const QSize &_size, const QColor &color) -{ - size = _size; - fillColor = color; - if (usePixelBuffers) { - pbuffer = new QGLPixelBuffer(size, QGLFormat(QGL::SampleBuffers)); - } else { - widget = new QGLWidget(QGLFormat(QGL::SampleBuffers)); - widget->setAutoFillBackground(false); - widget->resize(size); - widget->show(); - QApplication::flush(); - QApplication::syncX(); - } -} - -void GLEngine::render(QSvgRenderer *r, const QString &) -{ - QPainter *p; - if (usePixelBuffers) - p = new QPainter(pbuffer); - else - p = new QPainter(widget); - p->fillRect(0, 0, size.width(), size.height(), fillColor); - r->render(p); - p->end(); - delete p; -} - -void GLEngine::render(const QStringList &qpsScript, - const QString &absFilePath) -{ - QPainter *p; - if (usePixelBuffers) - p = new QPainter(pbuffer); - else - p = new QPainter(widget); - - PaintCommands pcmd(qpsScript, 800, 800); - pcmd.setPainter(p); - pcmd.setFilePath(absFilePath); - pcmd.runCommands(); - p->end(); - delete p; -} - -bool GLEngine::drawOnPainter(QPainter *p) -{ - if (usePixelBuffers) { - QImage img = pbuffer->toImage(); - p->drawImage(0, 0, img); - } else { - QImage img = widget->grabFrameBuffer(); - p->drawImage(0, 0, img); - } - return true; -} - - -void GLEngine::save(const QString &file) -{ - if (usePixelBuffers) { - QImage img = pbuffer->toImage(); - img.save(file, "PNG"); - } else { - QImage img = widget->grabFrameBuffer(); - img.save(file, "PNG"); - } -} - -void GLEngine::cleanup() -{ - delete pbuffer; - delete widget; -} - -#endif - -class WidgetEngineWidget : public QWidget -{ -public: - WidgetEngineWidget(QWidget* =0); - - void paintEvent(QPaintEvent*); - void render(QSvgRenderer*); - void render(QStringList const&,QString const&); - - QSize m_size; - QColor m_fillColor; - -private: - QSvgRenderer* m_svgr; - QStringList m_qpsScript; - QString m_absFilePath; -}; - -WidgetEngineWidget::WidgetEngineWidget(QWidget* parent) - : QWidget(parent) - , m_size() - , m_fillColor() - , m_svgr(0) - , m_qpsScript() - , m_absFilePath() -{} - -void WidgetEngineWidget::render(QSvgRenderer* r) -{ - m_svgr = r; - repaint(); - m_svgr = 0; -} - -void WidgetEngineWidget::render(QStringList const& qpsScript, QString const& absFilePath) -{ - m_qpsScript = qpsScript; - m_absFilePath = absFilePath; - repaint(); - m_qpsScript = QStringList(); - m_absFilePath = QString(); -} - -void WidgetEngineWidget::paintEvent(QPaintEvent*) -{ - if (m_svgr) { - QPainter p(this); - p.fillRect(0, 0, m_size.width(), m_size.height(), m_fillColor); - m_svgr->render(&p); - p.end(); - } - else { - QPainter p(this); - - PaintCommands pcmd(m_qpsScript, 800, 800); - pcmd.setPainter(&p); - pcmd.setFilePath(m_absFilePath); - pcmd.runCommands(); - p.end(); - } -} - -WidgetEngine::WidgetEngine() - : m_widget(0) -{ -} - - -QString WidgetEngine::name() const -{ - QString gs = QApplicationPrivate::graphics_system_name; - if (!gs.isEmpty()) gs[0] = gs[0].toUpper(); - return QString::fromLatin1("Widget") + gs; -} - -void WidgetEngine::prepare(const QSize &size, const QColor &color) -{ - m_widget = new WidgetEngineWidget; - m_widget->m_size = size; - m_widget->m_fillColor = color; - m_widget->setAutoFillBackground(false); - m_widget->resize(size); - m_widget->show(); - QApplication::flush(); - QApplication::syncX(); -} - -void WidgetEngine::render(QSvgRenderer *r, const QString &) -{ - m_widget->render(r); -} - -void WidgetEngine::render(const QStringList &qpsScript, - const QString &absFilePath) -{ - m_widget->render(qpsScript, absFilePath); -} - -bool WidgetEngine::drawOnPainter(QPainter *p) -{ - p->drawPixmap(0, 0, QPixmap::grabWindow(m_widget->winId())); - return true; -} - - -void WidgetEngine::save(const QString &file) -{ - QImage img = QPixmap::grabWindow(m_widget->winId()).toImage(); - img.save(file, "PNG"); -} - -void WidgetEngine::cleanup() -{ - delete m_widget; -} - -#ifndef QT_NO_PRINTER -PDFEngine::PDFEngine() -{ -} - - -QString PDFEngine::name() const -{ - return QLatin1String("PDF"); -} - -void PDFEngine::prepare(const QSize &size, const QColor &fillColor) -{ - Q_UNUSED(fillColor); - - static int i = 1; - - m_size = size; - printer = new QPrinter(QPrinter::ScreenResolution); - printer->setOutputFormat(QPrinter::PdfFormat); - printer->setFullPage(true); - //printer->setOrientation(QPrinter::Landscape); - m_tempFile = QDir::tempPath() + QString("temp%1.pdf").arg(i++); - printer->setOutputFileName(m_tempFile); -} - -void PDFEngine::render(QSvgRenderer *r, const QString &) -{ - QPainter p(printer); - r->render(&p); - p.end(); -} - - -void PDFEngine::render(const QStringList &qpsScript, - const QString &absFilePath) -{ - QPainter pt(printer); - PaintCommands pcmd(qpsScript, 800, 800); - pcmd.setPainter(&pt); - pcmd.setFilePath(absFilePath); - pcmd.runCommands(); - pt.end(); -} - -bool PDFEngine::drawOnPainter(QPainter *) -{ - return false; -} - -void PDFEngine::save(const QString &file) -{ -#ifdef USE_ACROBAT - QString psFile = m_tempFile; - psFile.replace(".pdf", ".ps"); - QProcess toPs; - QStringList args1; - args1 << "-toPostScript" - << "-level3" - << "-transQuality" - << "1"; - args1 << m_tempFile; - toPs.start("acroread", args1); - toPs.waitForFinished(); - - QProcess convert; - QStringList args; - args << psFile; - args << QString("-resize") - << QString("%1x%2") - .arg(m_size.width()) - .arg(m_size.height()); - args << file; - - convert.start("convert", args); - convert.waitForFinished(); - QFile::remove(psFile); -#else - QProcess toPng; - QStringList args1; - args1 << "-sDEVICE=png16m" - << QString("-sOutputFile=") + file - << "-r97x69" - << "-dBATCH" - << "-dNOPAUSE"; - args1 << m_tempFile; - toPng.start("gs", args1); - toPng.waitForFinished(); -#endif - - QString pfile = file; - pfile.replace(".png", ".pdf"); - QFile::rename(m_tempFile, pfile); -// QFile::remove(m_tempFile); -} - -void PDFEngine::cleanup() -{ - delete printer; printer = 0; -} - -#ifdef Q_WS_X11 -PSEngine::PSEngine() -{ -} - - -QString PSEngine::name() const -{ - return QLatin1String("PS"); -} - -void PSEngine::prepare(const QSize &size, const QColor &fillColor) -{ - Q_UNUSED(fillColor); - - static int i = 1; - - m_size = size; - printer = new QPrinter(QPrinter::ScreenResolution); - printer->setOutputFormat(QPrinter::PostScriptFormat); - printer->setFullPage(true); - m_tempFile = QDir::tempPath() + QString("temp%1.ps").arg(i++); - printer->setOutputFileName(m_tempFile); -} - -void PSEngine::render(QSvgRenderer *r, const QString &) -{ - QPainter p(printer); - r->render(&p); - p.end(); -} - - -void PSEngine::render(const QStringList &qpsScript, - const QString &absFilePath) -{ - QPainter pt(printer); - PaintCommands pcmd(qpsScript, 800, 800); - pcmd.setPainter(&pt); - pcmd.setFilePath(absFilePath); - pcmd.runCommands(); - pt.end(); -} - -bool PSEngine::drawOnPainter(QPainter *) -{ - return false; -} - -void PSEngine::save(const QString &file) -{ - QProcess toPng; - QStringList args1; - args1 << "-sDEVICE=png16m" - << QString("-sOutputFile=") + file - << "-r97x69" - << "-dBATCH" - << "-dNOPAUSE"; - args1 << m_tempFile; - toPng.start("gs", args1); - toPng.waitForFinished(); - - QString pfile = file; - pfile.replace(".png", ".ps"); - QFile::rename(m_tempFile, pfile); -} - -void PSEngine::cleanup() -{ - delete printer; printer = 0; -} -#endif -#endif //QT_NO_PRINTER - -RSVGEngine::RSVGEngine() -{ - -} - -QString RSVGEngine::name() const -{ - return QLatin1String("RSVG"); -} - -void RSVGEngine::prepare(const QSize &size, const QColor &fillColor) -{ - Q_UNUSED(fillColor); - - m_size = size; -} - -void RSVGEngine::render(QSvgRenderer *, const QString &fileName) -{ - m_fileName = fileName; -} - -void RSVGEngine::render(const QStringList &, const QString &) -{ -} - -bool RSVGEngine::drawOnPainter(QPainter *) -{ - return false; -} - - -void RSVGEngine::save(const QString &file) -{ - QProcess rsvg; - QStringList args; - args << QString("-w %1").arg(m_size.width()); - args << QString("-h %1").arg(m_size.height()); - args << m_fileName; - args << file; - rsvg.start("rsvg", args); - rsvg.waitForFinished(); -} - -void QEngine::cleanup() -{ -} - -#ifdef Q_WS_WIN -WinPrintEngine::WinPrintEngine() -{ -} - - -QString WinPrintEngine::name() const -{ - return QLatin1String("WinPrint"); -} - -void WinPrintEngine::prepare(const QSize &size, const QColor &fillColor) -{ - Q_UNUSED(fillColor); - - static int i = 1; - - m_size = size; - printer = new QPrinter(QPrinter::ScreenResolution); - printer->setFullPage(true); - printer->setPrinterName("HP 2500C Series PS3"); - m_tempFile = QDir::tempPath() + QString("temp%1.ps").arg(i++); - printer->setOutputFileName(m_tempFile); -} - -void WinPrintEngine::render(QSvgRenderer *r, const QString &) -{ - QPainter p(printer); - r->render(&p); - p.end(); -} - - -void WinPrintEngine::render(const QStringList &qpsScript, - const QString &absFilePath) -{ - QPainter pt(printer); - PaintCommands pcmd(qpsScript, 800, 800); - pcmd.setPainter(&pt); - pcmd.setFilePath(absFilePath); - pcmd.runCommands(); - pt.end(); -} - -bool WinPrintEngine::drawOnPainter(QPainter *) -{ - return false; -} - -void WinPrintEngine::save(const QString &file) -{ - QProcess toPng; - QStringList args1; - args1 << "-sDEVICE=png16m" - << QString("-sOutputFile=") + file - << "-r97x69" - << "-dBATCH" - << "-dNOPAUSE"; - args1 << m_tempFile; - toPng.start("gswin32", args1); - toPng.waitForFinished(); - - QString pfile = file; - pfile.replace(".png", ".ps"); - QFile::rename(m_tempFile, pfile); -} - -void WinPrintEngine::cleanup() -{ - delete printer; printer = 0; -} - -#endif diff --git a/tests/arthur/common/qengines.h b/tests/arthur/common/qengines.h deleted file mode 100644 index 0b648a9d27..0000000000 --- a/tests/arthur/common/qengines.h +++ /dev/null @@ -1,241 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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 QENGINES_H -#define QENGINES_H - -#if defined(BUILD_OPENGL) -#include -#endif -#include -#include -#include -#include -#include -#include - -QT_FORWARD_DECLARE_CLASS(QSvgRenderer) -QT_FORWARD_DECLARE_CLASS(QGLWidget) - -class QEngine -{ -public: - virtual ~QEngine(); - virtual QString name() const =0; - virtual void prepare(const QSize &size, const QColor &fillColor = Qt::white) =0; - virtual void render(QSvgRenderer *r, const QString &) =0; - virtual void render(const QStringList &qpsScript, - const QString &absFilePath) =0; - virtual bool drawOnPainter(QPainter *p) =0; - virtual void save(const QString &file) =0; - virtual void cleanup(); -}; - -class QtEngines -{ -public: - static QtEngines *self(); - QtEngines(); - - QList engines() const; - QList foreignEngines() const; - - QEngine *defaultEngine() const; -private: - void init(); -private: - QList m_engines; - QList m_foreignEngines; - QEngine *m_defaultEngine; -}; - -class RasterEngine : public QEngine -{ -public: - RasterEngine(); - - virtual QString name() const; - virtual void prepare(const QSize &size, const QColor &fillColor = Qt::white); - virtual void render(QSvgRenderer *r, const QString &); - virtual void render(const QStringList &qpsScript, - const QString &absFilePath); - virtual bool drawOnPainter(QPainter *p); - virtual void save(const QString &file); -private: - QImage image; -}; - -class NativeEngine : public QEngine -{ -public: - NativeEngine(); - - virtual QString name() const; - virtual void prepare(const QSize &size, const QColor &fillColor = Qt::white); - virtual void render(QSvgRenderer *r, const QString &); - virtual void render(const QStringList &qpsScript, - const QString &absFilePath); - virtual bool drawOnPainter(QPainter *p); - virtual void save(const QString &file); -private: - QPixmap pixmap; -}; - - -#if defined(BUILD_OPENGL) -class GLEngine : public QEngine -{ -public: - GLEngine(); - virtual QString name() const; - virtual void prepare(const QSize &_size, const QColor &fillColor = Qt::white); - virtual void render(QSvgRenderer *r, const QString &); - virtual void render(const QStringList &qpsScript, - const QString &absFilePath); - virtual bool drawOnPainter(QPainter *p); - virtual void save(const QString &file); - virtual void cleanup(); -private: - QGLPixelBuffer *pbuffer; - QGLWidget *widget; - bool usePixelBuffers; - QSize size; - QColor fillColor; -}; -#endif - -class WidgetEngineWidget; -class WidgetEngine : public QEngine -{ -public: - WidgetEngine(); - virtual QString name() const; - virtual void prepare(const QSize &_size, const QColor &fillColor = Qt::white); - virtual void render(QSvgRenderer *r, const QString &); - virtual void render(const QStringList &qpsScript, - const QString &absFilePath); - virtual bool drawOnPainter(QPainter *p); - virtual void save(const QString &file); - virtual void cleanup(); -private: - WidgetEngineWidget *m_widget; -}; - -#ifndef QT_NO_PRINTER -class PDFEngine : public QEngine -{ -public: - PDFEngine(); - - virtual QString name() const; - virtual void prepare(const QSize &size, const QColor &fillColor = Qt::white); - virtual void render(QSvgRenderer *r, const QString &); - virtual void render(const QStringList &qpsScript, - const QString &absFilePath); - virtual bool drawOnPainter(QPainter *p); - virtual void save(const QString &file); - virtual void cleanup(); -private: - QPrinter *printer; - QSize m_size; - QString m_tempFile; -}; - -#ifdef Q_WS_X11 -class PSEngine : public QEngine -{ -public: - PSEngine(); - - virtual QString name() const; - virtual void prepare(const QSize &size, const QColor &fillColor = Qt::white); - virtual void render(QSvgRenderer *r, const QString &); - virtual void render(const QStringList &qpsScript, - const QString &absFilePath); - virtual bool drawOnPainter(QPainter *p); - virtual void save(const QString &file); - virtual void cleanup(); -private: - QPrinter *printer; - QSize m_size; - QString m_tempFile; -}; -#endif - -#ifdef Q_WS_WIN -class WinPrintEngine : public QEngine -{ -public: - WinPrintEngine(); - - virtual QString name() const; - virtual void prepare(const QSize &size, const QColor &fillColor = Qt::white); - virtual void render(QSvgRenderer *r, const QString &); - virtual void render(const QStringList &qpsScript, - const QString &absFilePath); - virtual bool drawOnPainter(QPainter *p); - virtual void save(const QString &file); - virtual void cleanup(); -private: - QPrinter *printer; - QSize m_size; - QString m_tempFile; -}; -#endif -#endif //QT_NO_PRINTER - -class RSVGEngine : public QEngine -{ -public: - RSVGEngine(); - - virtual QString name() const; - virtual void prepare(const QSize &size, const QColor &fillColor = Qt::white); - virtual void render(QSvgRenderer *r, const QString &); - virtual void render(const QStringList &qpsScript, - const QString &absFilePath); - virtual bool drawOnPainter(QPainter *p); - virtual void save(const QString &file); -private: - QString m_fileName; - QSize m_size; -}; - -#endif diff --git a/tests/arthur/common/xmldata.cpp b/tests/arthur/common/xmldata.cpp deleted file mode 100644 index dc5ee62750..0000000000 --- a/tests/arthur/common/xmldata.cpp +++ /dev/null @@ -1,110 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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 "xmldata.h" - - -bool XMLReader::startElement(const QString &, const QString &localName, - const QString &, const QXmlAttributes &attributes) -{ - if (localName == "arthur" ) { - QString engineName = attributes.value("engine"); - QString defaultStr = attributes.value("default"); - QString foreignStr = attributes.value("foreign"); - QString referenceStr = attributes.value("reference"); - QString genDate = attributes.value("generationDate"); - engine = new XMLEngine(engineName, defaultStr == "true"); - engine->foreignEngine = (foreignStr == "true"); - engine->referenceEngine = (referenceStr == "true"); - if (!genDate.isEmpty()) - engine->generationDate = QDateTime::fromString(genDate); - else - engine->generationDate = QDateTime::currentDateTime(); - } else if (localName == "suite") { - QString suiteName = attributes.value("dir"); - suite = new XMLSuite(suiteName); - } else if (localName == "file") { - QString testName = attributes.value("name"); - QString outputName = attributes.value("output"); - file = new XMLFile(testName, outputName); - } else if (localName == "data") { - QString dateStr = attributes.value("date"); - QString timeStr = attributes.value("time_to_render"); - QString itrStr = attributes.value("iterations"); - QString detailsStr = attributes.value("details"); - QString maxElapsedStr = attributes.value("maxElapsed"); - QString minElapsedStr = attributes.value("minElapsed"); - XMLData data(dateStr, timeStr.toInt(), - (!itrStr.isEmpty())?itrStr.toInt():1); - data.details = detailsStr; - if (maxElapsedStr.isEmpty()) - data.maxElapsed = data.timeToRender; - else - data.maxElapsed = maxElapsedStr.toInt(); - if (minElapsedStr.isEmpty()) - data.minElapsed = data.timeToRender; - else - data.minElapsed = minElapsedStr.toInt(); - - file->data.append(data); - } else { - qDebug()<<"Error while parsing element :"<suites.insert(suite->name, suite); - } else if (localName == "file") { - suite->files.insert(file->name, file); - } - return true; -} - -bool XMLReader::fatalError(const QXmlParseException &) -{ - return true; -} diff --git a/tests/arthur/common/xmldata.h b/tests/arthur/common/xmldata.h deleted file mode 100644 index 7df1e330f1..0000000000 --- a/tests/arthur/common/xmldata.h +++ /dev/null @@ -1,153 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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 XMLDATA_H -#define XMLDATA_H - -#include - -#include -#include - -enum GeneratorFlag { - Normal = 0x1 << 0, - Default = 0x1 << 1, - Foreign = 0x1 << 2, - Reference = 0x1 << 3 -}; -Q_DECLARE_FLAGS(GeneratorFlags, GeneratorFlag); - -struct XMLData -{ - XMLData() - : date(QDateTime::currentDateTime()), - timeToRender(0), iterations(0), maxElapsed(0), - minElapsed(0) - {} - XMLData(const QDateTime &dt, int ttr, int itrs = 1) - : date(dt), timeToRender(ttr), - iterations(itrs), maxElapsed(0), minElapsed(0) - {} - XMLData(const QString &dt, int ttr, int itrs = 1) - : timeToRender(ttr), iterations(itrs), - maxElapsed(0), minElapsed(0) - { - date = QDateTime::fromString(dt); - } - QDateTime date; - int timeToRender; - int iterations; - QString details; - int maxElapsed; - int minElapsed; -}; - -struct XMLFile -{ - XMLFile() - {} - XMLFile(const QString &testcase) - : name(testcase) - {} - XMLFile(const QString &testcase, const QString &img) - : name(testcase), output(img) - {} - - QString name; - QString output; - QList data; -}; - -struct XMLSuite -{ - XMLSuite() - {} - XMLSuite(const QString &n) - : name(n) - {} - - QString name; - QMap files; -}; - -struct XMLEngine -{ - XMLEngine() - : defaultEngine(false), foreignEngine(false), - referenceEngine(false) - {} - XMLEngine(const QString &engine, bool def) - : name(engine), defaultEngine(def), foreignEngine(false), - referenceEngine(false) - {} - - QString name; - bool defaultEngine; - bool foreignEngine; - bool referenceEngine; - QMap suites; - QDateTime generationDate; -}; - - - -class XMLReader : public QXmlDefaultHandler -{ -public: - XMLEngine *xmlEngine() const - { - return engine; - } - - bool startElement(const QString &namespaceURI, - const QString &localName, - const QString &qName, - const QXmlAttributes &attributes); - bool endElement(const QString &namespaceURI, - const QString &localName, - const QString &qName); - bool fatalError(const QXmlParseException &exception); -private: - XMLEngine *engine; - XMLSuite *suite; - XMLFile *file; -}; - -#endif diff --git a/tests/arthur/data/1.1/color-prop-03-t.svg b/tests/arthur/data/1.1/color-prop-03-t.svg deleted file mode 100644 index f8c072e0e7..0000000000 --- a/tests/arthur/data/1.1/color-prop-03-t.svg +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Purpose of test is to determine if the color datatype is supported. There are multiple syntaxes for - specifying the same color, such as #37F and #3377FF. For each of the six groups shown here, - each of the shapes in the group uses one of the syntactical forms and all in the group should - be identical in color. - - - The first row uses five forms - 3-digit hex, 6-digit hex, rbg() integer form, rgb() percentage form, - and named ('HTML') colors. - - The second row uses only four forms - 3-digit hex, 6-digit hex, rbg() integer form, rgb() percentage form - - as there are no HTML or X11 names for those colors. - - - color-prop-03-t.svg - Test that viewer has the basic capability to render colors, specified as CSS attributes, using any of the equivalent forms. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $Revision: 1.4 $ - - diff --git a/tests/arthur/data/1.1/coords-trans-01-b.svg b/tests/arthur/data/1.1/coords-trans-01-b.svg deleted file mode 100644 index 69aa614a36..0000000000 --- a/tests/arthur/data/1.1/coords-trans-01-b.svg +++ /dev/null @@ -1,240 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - This test verifies the implementation of transforms. It tests elementary transforms - and transform nesting. - Note that for layout purposes, this test uses nesting of translation with the elementary transforms. - - - The rendered picture should match the reference image exactly except for variations in the labeling text. - - - The test uses the rect element, the fill color (solid primary colors) and transforms. - - - - - coords-trans-01-b - Validates elementary transforms and transformation nesting - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - translate (50, 50) - - - - - rotate(-90) - - - - - skew x (45) - - - - - skew y (45) - - - - - scale (2) - - - - - - - - - - - - - - - - - - - - - - - - - - - scale(25, 95) and translate(2, 2) - - - - - scale(25, 95) then translate(2, 2) - - - - - - - - - $Revision: 1.5 $ - - - diff --git a/tests/arthur/data/1.1/coords-trans-02-t.svg b/tests/arthur/data/1.1/coords-trans-02-t.svg deleted file mode 100644 index cf13b39881..0000000000 --- a/tests/arthur/data/1.1/coords-trans-02-t.svg +++ /dev/null @@ -1,178 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - This test verifies the implementation of transforms. It tests elementary transforms - and transform nesting. - Note that for layout purposes, this test uses nesting of translation with the elementary transforms. - - - The rendered picture should match the reference image exactly except for variations in the labeling text. - - - The test uses the rect element, the fill color (solid primary colors) and transforms. - - - - - coords-trans-02-t - Validates elementary transforms and transformation nesting - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - translate (50, 50) - - - - - rotate(-90) - - - - - - - - $Revision: 1.5 $ - - - diff --git a/tests/arthur/data/1.1/coords-trans-03-t.svg b/tests/arthur/data/1.1/coords-trans-03-t.svg deleted file mode 100644 index d03c18acc2..0000000000 --- a/tests/arthur/data/1.1/coords-trans-03-t.svg +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - This test verifies the implementation of transforms. It tests elementary transforms - and transform nesting. - Note that for layout purposes, this test uses nesting of translation with the elementary transforms. - - - The rendered picture should match the reference image exactly except for variations in the labeling text. - - - The test uses the rect element, the fill color (solid primary colors) and transforms. - - - - - coords-trans-03-t - Validates elementary transforms and transformation nesting - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - skew x (45) - - - - - skew y (45) - - - - - - - - - $Revision: 1.5 $ - - - diff --git a/tests/arthur/data/1.1/coords-trans-04-t.svg b/tests/arthur/data/1.1/coords-trans-04-t.svg deleted file mode 100644 index fee76c9573..0000000000 --- a/tests/arthur/data/1.1/coords-trans-04-t.svg +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - - - - - - - - - - - - - - This test verifies the implementation of transforms. It tests elementary transforms - and transform nesting. - Note that for layout purposes, this test uses nesting of translation with the elementary transforms. - - - The rendered picture should match the reference image exactly except for variations in the labeling text. - - - The test uses the rect element, the fill color (solid primary colors) and transforms. - - - - coords-trans-04-t - Validates elementary transforms and transformation nesting - - - - - - - - - - - - - - - - - - - - - - - - - - - scale (2) - - - - - - - - $Revision: 1.6 $ - - diff --git a/tests/arthur/data/1.1/coords-trans-05-t.svg b/tests/arthur/data/1.1/coords-trans-05-t.svg deleted file mode 100644 index f9ed2d3297..0000000000 --- a/tests/arthur/data/1.1/coords-trans-05-t.svg +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - This test verifies the implementation of transforms. It tests elementary transforms - and transform nesting. - Note that for layout purposes, this test uses nesting of translation with the elementary transforms. - - - The rendered picture should match the reference image exactly except for variations in the labeling text. - - - The test uses the rect element, the fill color (solid primary colors) and transforms. - - - - - coords-trans-05-t - Validates elementary transforms and transformation nesting - - - - - - - - - - - - - - - - - - - - - - - - - - scale(25, 95) - translate(2, 2) - - - - - - - - - $Revision: 1.5 $ - - - diff --git a/tests/arthur/data/1.1/coords-trans-06-t.svg b/tests/arthur/data/1.1/coords-trans-06-t.svg deleted file mode 100644 index 5d12b7a142..0000000000 --- a/tests/arthur/data/1.1/coords-trans-06-t.svg +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - This test verifies the implementation of transforms. It tests elementary transforms - and transform nesting. - Note that for layout purposes, this test uses nesting of translation with the elementary transforms. - - - The rendered picture should match the reference image exactly except for variations in the labeling text. - - - The test uses the rect element, the fill color (solid primary colors) and transforms. - - - - - coords-trans-06-t - Validates elementary transforms and transformation nesting - - - - - - - - - - - - - - - - - - - - scale(25, 95) then translate(2, 2) - - - - - - - - - $Revision: 1.5 $ - - - diff --git a/tests/arthur/data/1.1/fonts-elem-01-t.svg b/tests/arthur/data/1.1/fonts-elem-01-t.svg deleted file mode 100644 index 29cc875849..0000000000 --- a/tests/arthur/data/1.1/fonts-elem-01-t.svg +++ /dev/null @@ -1,103 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - This is a basic test for embedded SVG fonts. The font "Comic Sans" - (available from Microsoft) has been converted into an SVG font and embedded - in the SVG file. The test contains two text areas, each with the character - string "AyÖ@ç" drawn at the same font size. - - The upper area contains the glyphs from the embedded font placed in - the SVG file as path elements. Each glyph is placed at the location it - would be if rendered using normal text rendering (ie. the horizontal - advance between characters has been preserved). - - The lower area contains the text string rendered using the embedded - SVG font. It should appear exactly the same as the upper text area, - ie. font size, character baseline and horizontal advance should be - the same. - - - - - fonts-elem-01-t - Basic test of embedded fonts using glyph outlines - - - - - - - - - - - - - - - - - - - - - - Basic SVG font element - - - - - Placed Glyphs - - - - - - - - - - - - - - - - - - - - - - - - - - SVG Font - - - AyÖ@ç - - - $Revision: 1.3 $ - - diff --git a/tests/arthur/data/1.1/fonts-elem-02-t.svg b/tests/arthur/data/1.1/fonts-elem-02-t.svg deleted file mode 100644 index 13077e359d..0000000000 --- a/tests/arthur/data/1.1/fonts-elem-02-t.svg +++ /dev/null @@ -1,107 +0,0 @@ - - - - - - - - - - - - - - - - - - This is an accuracy test for embedded SVG fonts. The font "Comic Sans" - (available from Microsoft) has been converted into an SVG font and embedded - in the SVG file. The test contains two text areas, each with the character - string "AyÖ@ç" drawn at the same font size. - - The upper area has the placed glyphs as path elements filled with - white over a solid black background (creating a white cutout). The - embedded SVG font text is then drawn over the cutout. An implementation - that passes this test should completely fill the cutout, leaving - a solid black area (some slight antialiasing effects may remain). - - The lower area is the reverse of the upper area, with the placed - black glyphs filling the cutout created by white SVG font text. - An implementation that passes this test should completely fill the - cutout, leaving a solid black area (some slight antialiasing effects - may remain). - - - - fonts-elem-02-t - Basic test of embedded fonts using glyph outlines - - - - - - - - - - - - - - - - - - - - - - SVG font element accuracy - - SVG over Glyphs - - - - - - - - - - - - - - - - - - - AyÖ@ç - - Glyphs over SVG - - AyÖ@ç - - - - - - - - - - - - - - - - - - - - $Revision: 1.3 $ - - diff --git a/tests/arthur/data/1.1/interact-zoom-01-t.svg b/tests/arthur/data/1.1/interact-zoom-01-t.svg deleted file mode 100644 index 2318ec719b..0000000000 --- a/tests/arthur/data/1.1/interact-zoom-01-t.svg +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Verify correct handling by Dynamic (interactive) viewers for the -"zoomAndPan" attribute on the 'svg' element. This is one of a pair of -tests, and tests the value "disable". - - -The test consists of a set of black circles with a blue stroke. - -After the initial picture is displayed, the user should attempt to use -the magnify controls that are required on conforming Dynamic SVG -viewers. The correct behaviour is that the magnify and pan controls -shall have no effect -- the viewer shall disable them. - - -The rendered picture should match the reference image, except for -possible variations in the labelling text (per CSS2 rules). - - - - interact-zoom-01-t - Test "disable" value of zoomAndPan attribute. - - - - - - Test "disable" value of - zoomAndPan attribute. - - - - - - - - - $Revision: 1.5 $ - - diff --git a/tests/arthur/data/1.1/linking-a-04-t.svg b/tests/arthur/data/1.1/linking-a-04-t.svg deleted file mode 100644 index 6eb6b8c7b8..0000000000 --- a/tests/arthur/data/1.1/linking-a-04-t.svg +++ /dev/null @@ -1,124 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Verify the capability to handle basic links out of SVG content - using the 'a' element, with the xlink:href attributes. - There are three subtests, in each of which one - of three colored arrows comprise the content of an 'a' element. The - link destination is expressed by "xlink:href=". - The initial view of this test contains the three arrows, a colored - circle, labelling text, and the usual template legend and frame. - - - The top-most (yellow) arrow links to an external SVG file, which is - local (in the same directory). The target file contains SVG 'text' elements - which comprise a TOC and brief description of all of the test files - for Linking. Upon clicking the first arrow, the image of the linkingToc-t.svg - file should replace the initial view of this test case in the viewer frame. - - - The middle (green) arrow links to an object in this SVG test file, the yellow - circle (id="internal-circle") immediately to its right, using "#circle-object" - as the value of of the xlink:href attribute. - There should be no change to the viewer frame upon clicking this arrow. - - - The bottom-most (blue) arrow links to remote non-SVG content, the W3C home page - using xlink:href attribute value "http://www.w3.org". For viewers in a Web - browser environment, the W3C home page should replace the initial view - of this test case in the browser/viewer frame. For other viewers (e.g., - interactive but SVG-only standalone viewers), the result is undefined, but could - include such actions as a diagnostic "Error parsing..." message. - - - There are several reference images associated with this test case. The first - illustrates the correct "start" or initial state of the rendered SVG file. - The second illustrates the correct image after the first link is activated - (to the linkingToc.svg file). The third (for browser-environment viewers) - should match the current image of the W3C home page, as viewed with a - conventional browser. (Note. This harness does not yet - provide access to multiple PNGs; the first, initial-state PNG is shown.) - - - The test uses the 'rect' and 'polygon' elements, as well as basic fill (solid simple colors), - stroke (black and colored wide and 1-pixel lines), font-family (Arial) and font-size properties. - - - - - - linking-a-04-t - Verify basic out-bound links and the 'a' element. - - - - - Basic out-bound links and the 'a' element. - - - - - - - - - - - - - - - - - - - - id="internal-circle" - - $Revision: 1.8 $ - - diff --git a/tests/arthur/data/1.1/linking-uri-03-t.svg b/tests/arthur/data/1.1/linking-uri-03-t.svg deleted file mode 100644 index 5009ea579b..0000000000 --- a/tests/arthur/data/1.1/linking-uri-03-t.svg +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - - - - - - - - - - - - - - Verify the handling of the allowable xlink attributes on the 'a' element. - The initial view of this test contains a single green triangle, labelling text, - and the usual template legend and frame. - - - There is a link on the triangle, pointing to an external SVG file, which is - local (in the same directory). The target file contains SVG 'text' elements - which comprise a TOC and brief description of all of the BE test files - for Linking. Upon clicking the triangle, the image of the linkingToc-t.svg - file should replace the initial view of this test case in the viewer frame. - - - The purpose of the test is to - verify that viewers tolerate the presence of xlink attributes on the 'a' - element. The presence of the attributes should not change the behavior of - the test in any way. The results of executing the link should be identical - to executing the first (topmost) link of linking-a-01-f. - - - There are two reference images associated with this test case. The first - illustrates the correct "start" or initial state of the rendered SVG file. - The second illustrates the correct image after the link is activated - (to the linkingToc-t.svg file). (Note. This harness does not yet - provide access to multiple PNGs; the first, initial-state PNG is shown.) - - - The test uses the 'rect' element, as well as basic fill (solid simple colors), - stroke (black and colored wide and 1-pixel lines), font-family (Arial) and font-size properties. - - - - linking-uri-03-t - Verify xlink attributes on the 'a' element. - - - - - Simple exercise of xlink attributes on the 'a' element. - - - - Click for TOC - Link to local file - linkingToc-t.svg. - - xlink:type="simple" - xlink:show="replace" - xlink:actuate="onRequest" - xlink:href="linkingToc-t.svg" - xlink:role="figure-out-a-role" - xlink:title="TOC of Linking BE tests." - target="_self" - - $Revision: 1.8 $ - - diff --git a/tests/arthur/data/1.1/metadata-example-01-b.svg b/tests/arthur/data/1.1/metadata-example-01-b.svg deleted file mode 100644 index 24d0613aba..0000000000 --- a/tests/arthur/data/1.1/metadata-example-01-b.svg +++ /dev/null @@ -1,175 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - Check that metadata in a variety of namespaces, inside a metadata - element, does not affect rendering in any way. The file is not valid to the DTD, but is well formed. - - The diagram on the table is a visualization of the RDF metadata in the graphic. - The rendered result should match the reference image and there should be - no error messages or warnings - - - metadata-example-01-b - Verify that the viewer is not perturbed by the presence of metadata. - - - - - Line drawing of woman in antique attire, which - looks legal or perhaps mystical. - image/svg+xml - Sibyll Trelawney - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $Revision: 1.6 $ - - diff --git a/tests/arthur/data/1.1/painting-fill-01-t.svg b/tests/arthur/data/1.1/painting-fill-01-t.svg deleted file mode 100644 index 84b87506b3..0000000000 --- a/tests/arthur/data/1.1/painting-fill-01-t.svg +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Verify the basic capability to handle the fill properties fill:none, - and fill with a color (fill:red) - - - There should be two rectangles, the rectangle on the left hollow (fill:none) and the rectangle on the right filled with red. - - - - painting-fill-01-t.svg - - Test that viewer has the basic capability to handle the <fill,fill-rule,fill-opacity properites> - - - - - - - Basic paint: fill properties. - - - - - - - - - - fill:none - fill:red - - - - - $Revision: 1.4 $ - - - diff --git a/tests/arthur/data/1.1/painting-fill-02-t.svg b/tests/arthur/data/1.1/painting-fill-02-t.svg deleted file mode 100644 index 2ecb8822ab..0000000000 --- a/tests/arthur/data/1.1/painting-fill-02-t.svg +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - The test uses the fill:currentColor property. - - - The rectangle on the left should be green filled, the rectangle on the right should be blue. - The text above the rectangles should be black. - - - - painting-fill-02-t.svg - - Test that viewer has the basic capability to handle the <fill,fill-rule,fill-opacity properites> - - - - - - - Basic paint: fill properties. - fill="currentColor" - - - - - - - - - green - blue - - - - - $Revision: 1.5 $ - - - diff --git a/tests/arthur/data/1.1/painting-fill-03-t.svg b/tests/arthur/data/1.1/painting-fill-03-t.svg deleted file mode 100644 index 837207b7dd..0000000000 --- a/tests/arthur/data/1.1/painting-fill-03-t.svg +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Verify the basic capability to handle the fill rule properties evenodd and nonzero - - - there should be two red filled stars, the leftmost star should be unfilled in the very center. - - - - painting-fill-03-t.svg - - Test that viewer has the basic capability to handle the <fill,fill-rule,fill-opacity properites> - - - - - - - Basic paint: fill properties. - - - - - - - - fill-rule:evenodd - fill-rule:nonzero - - - - - $Revision: 1.4 $ - - - diff --git a/tests/arthur/data/1.1/painting-fill-04-t.svg b/tests/arthur/data/1.1/painting-fill-04-t.svg deleted file mode 100644 index 49a4f7aa08..0000000000 --- a/tests/arthur/data/1.1/painting-fill-04-t.svg +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - - - - - - - - - - - - This tests inheritance of 3 properties. Fill, stroke and stroke-width. There is a g element (id=G1) which - sets fill=blue, stroke=red, and stroke-width=5. The first two rectangles on top should inherit all those - properties. The middle left rectangle has fill=yellow and stroke-width=2, it should inherit the stroke=red - from the parent container. The middle rectangle on the right has stroke=yellow, it should inherit fill and - stroke-width from the parent g. The bottom 2 rectangles are in another g element (id=G2) which is a child - of G1. G2 sets fill=yellow. It should inherit the stroke and stroke width from the parent G1. The two - bottom rectangles set no fill or stroke properties, they should inherit through the parents, stroke=red - and stroke-width=5. - - - The rendered picture should match the reference image, except for possible - variations in the labelling text (per CSS2 rules). - - - The test uses the 'rect' element, as well as basic fill (solid primary colors), - stroke (black 1-pixel lines), font-family (Arial) and font-size properties. - - - - painting-fill-04-t.svg - Test inheritance of painting properties. - - - - - - - - - - - - - - - - $Revision: 1.7 $ - - diff --git a/tests/arthur/data/1.1/painting-stroke-01-t.svg b/tests/arthur/data/1.1/painting-stroke-01-t.svg deleted file mode 100644 index 722112c5bd..0000000000 --- a/tests/arthur/data/1.1/painting-stroke-01-t.svg +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - Verify the basic capability to handle the stroke properties (stroke) - in combination with the rect element . - The pair should be rendered as two blue rectangles, - the upper one without a stroke and the lower with a red stroke. - - - The rendered picture should match the reference image, except for possible - variations in the labelling text (per CSS2 rules). - - - The test uses the 'rect' element, as well as basic fill (solid primary colors), - stroke, stroke:red font-family (Arial) and font-size properties. - - - - painting-stroke-01-t - Test that viewer has the basic capability to handle the <stroke properites> - - - - - - - - Basic paint: stroke properties. - - - stroke:none - stroke:red - - - $Revision: 1.8 $ - - - diff --git a/tests/arthur/data/1.1/painting-stroke-02-t.svg b/tests/arthur/data/1.1/painting-stroke-02-t.svg deleted file mode 100644 index ac02fd1261..0000000000 --- a/tests/arthur/data/1.1/painting-stroke-02-t.svg +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - - - - - - - - - - - Verify the basic capability to handle the stroke properties (stroke, stroke-width - stroke-linejoin)in combination with the rect element and straight-line path commands. - The pair should be rendered as two red rectangles without an interior fill. - The upper rectangle should have a stroke width of 5 with sharp corners. - The lower rectangle should have a stroke width of 5 with round corners. - - - The rendered picture should match the reference image, except for possible - variations in the labelling text (per CSS2 rules). - - - The test uses the 'rect' element, as well as basic fill (solid primary colors), - stroke, stroke:red stroke-width:10 stroke-linejoin:round - font-family (Arial) and font-size properties. - - - - painting-stroke-02-t - Test that viewer has the basic capability to handle the <stroke properites> - - - - - - - - Basic paint: stroke properties. - - - stroke-width:20 - stroke-linejoin:round - - - $Revision: 1.8 $ - - - diff --git a/tests/arthur/data/1.1/painting-stroke-03-t.svg b/tests/arthur/data/1.1/painting-stroke-03-t.svg deleted file mode 100644 index 397a1a8d70..0000000000 --- a/tests/arthur/data/1.1/painting-stroke-03-t.svg +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - - - - - - - - - - - - - Verify the basic capability to handle the stroke properties (stroke, stroke-width - stroke-linejoin, stroke-linecap, stroke-miter) - in combination with the rect element and straight-line path commands. - The pair should be rendered as as two red line segments. - The upper segment should have round end caps. The lower segment - should be chopped off where the two line segments meet. - - - The rendered picture should match the reference image, except for possible - variations in the labelling text (per CSS2 rules). - - - The test uses the 'path' element, as well as basic fill (solid primary colors), - stroke, stroke-width, stroke-linejoin, stroke-linecap, stroke-miter, - font-family (Arial) and font-size properties. - - - - painting-stroke-03-t - Test that viewer has the basic capability to handle the <stroke properties> - - - - - - - - Basic paint: stroke properties. - - - stroke-linecap:round - stroke-miter:1 - - - $Revision: 1.8 $ - - - diff --git a/tests/arthur/data/1.1/painting-stroke-04-t.svg b/tests/arthur/data/1.1/painting-stroke-04-t.svg deleted file mode 100644 index 629026baec..0000000000 --- a/tests/arthur/data/1.1/painting-stroke-04-t.svg +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Verify the dasharray and dashoffset properties. Two lines are drawn, one red - and one black. Both have a dasharray of 10,10 giving a dashed appearance - where the size of the gaps and the size of the dash is equal. The help show this, - the black line has a stroke-dashoffset so that the dashes in the black line match - up with the gaps in the red line. - - - The rendered picture should match the reference image, except for possible - variations in the labelling text (per CSS2 rules). - - - The test uses the 'path' element, stroke, stroke-width, stroke-dasharray and stroke-dashoffset, - font-family (Arial) and font-size properties. - - - - painting-stroke-04-t - Test that viewer has the basic capability to handle the <stroke,stroke-opacity properites> - - - - - - - - Basic paint: stroke properties. - - - stroke:dasharray:10, 10 - stroke:dashoffset:10 - - - $Revision: 1.8 $ - - - diff --git a/tests/arthur/data/1.1/paths-data-01-t.svg b/tests/arthur/data/1.1/paths-data-01-t.svg deleted file mode 100644 index da8d7d023c..0000000000 --- a/tests/arthur/data/1.1/paths-data-01-t.svg +++ /dev/null @@ -1,158 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Test that the viewer has the basic capability to handle the 'path' -element and its data (d) attribute in combination with the cubic -Bezier curveto commands, C, c, S, s (plus Mm and Zz). - - -There are 8 subtests, each composed from the cubic Bezier path commands per -the label by the subtest. On-curve control points (i.e., the curve position) -are marked by small blue squares. Subtests are filled, or stroked, or -both, using simple style properties and colors. - - -The rendered picture should match the reference image exactly, except for possible -variations in the labelling text (per CSS2 rules). - - -The test uses the 'rect' element, as well as basic fill (solid primary colors), -stroke (primary color 1-pixel lines), font-family (Arial) and font-size properties. - - - - paths-data-01-t - Test that the viewer has the basic capability to handle the 'path' element and data (d) attribute in combination with the cubic Bezier curveto, both regular and shorthand/smooth forms - C, c, S, s (along with Mm and Zz). - - - - - - - - Cubic bezier curves drawn with commands: - - - - - - - - - - - M, C, S, m, c, s - - - - - - - - - - - - M, c, c, c, C, z - - - - - - - - - - M, C, Z - - - - - - - - - - - M, C, c, Z - - - - - - - - - - - m, c, s - - - - - - - - - - M, C - - - - - - - - - - - - M, c, s, s, s, z - - - - - - - - - - m, c, z - - $Revision: 1.6 $ - - - diff --git a/tests/arthur/data/1.1/paths-data-02-t.svg b/tests/arthur/data/1.1/paths-data-02-t.svg deleted file mode 100644 index 35054c13cd..0000000000 --- a/tests/arthur/data/1.1/paths-data-02-t.svg +++ /dev/null @@ -1,132 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Test that the viewer has the basic capability to handle the 'path' -element and its data (d) attribute in combination with the quadratic -Bezier curveto commands, Q, q, T, t (plus Mm and Zz). - - -There are 7 subtests, each composed from the quadric Bezier path commands per -the label by the subtest. On-curve control points (i.e., the curve position) -are marked by small colored squares. Subtests are filled, or stroked, or -both, using simple style properties and colors. - - -The rendered picture should match the reference image exactly, except for possible -variations in the labelling text (per CSS2 rules). - - -The test uses the 'rect' element, as well as basic fill (solid primary colors), -stroke (primary color wide and 1-pixel lines), font-family (Arial) and font-size properties. - - - - paths-data-02-t - Test that the viewer has the basic capability to handle the 'path' element and data (d) attribute in combination with the quadratic Bezier curveto commands, both regular and shorthand/smooth forms - Q, q, T, t (along with Mm and Zz). - - - - - Quadric bezier curves drawn with commands: - - - - - M, Q, M, q, z - - - - - - - - - m, q, z, m, q, z - - - - - - - - - M, Q, Z - - - - - - - M, Q, T, Q, z - - - - - - - - - M, Q, Q, z - - - - - - - - M, q, t, t, t, t, z - - - - - - - - - - - M, q, Q, q, Q, z - - - - - - - $Revision: 1.6 $ - - - diff --git a/tests/arthur/data/1.1/paths-data-04-t.svg b/tests/arthur/data/1.1/paths-data-04-t.svg deleted file mode 100644 index 0371945033..0000000000 --- a/tests/arthur/data/1.1/paths-data-04-t.svg +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Verify the basic capability to handle the 'path' element, and its data attribute (d) -in combination with the straight-line path commands. -Two pairs of concentric equilateral triangles are drawn using respectively -M,L,Z and m,l,z. The shapes are identical, with one stroked and -one filled. The fill-mode default of "even-odd" means that -the inner triangle is hollow. - - -The rendered picture should match the reference image exactly, except for possible -variations in the labelling text (per CSS2 rules). - - -The test uses the 'path' element, as well as basic fill (solid primary colors), -stroke (black 1-pixel lines), font-family (Arial) and font-size properties. - - - - - paths-data-04-t - Test that viewer has the basic capability to handle the <path> element and data (d) attribute in combination with the moveto, lineto, and closepath commands - M, L, Z, m, l, and z. - - - - - - - - - - M, L, L, L, Z, - subpath - M, L, L, L, Z - - - - - - - - stroked - - - - - - - - filled - - - $Revision: 1.7 $ - - - diff --git a/tests/arthur/data/1.1/paths-data-05-t.svg b/tests/arthur/data/1.1/paths-data-05-t.svg deleted file mode 100644 index 2227d9949a..0000000000 --- a/tests/arthur/data/1.1/paths-data-05-t.svg +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Verify the basic capability to handle the 'path' element, and its data attribute (d) -in combination with the straight-line path commands. -Two pairs of concentric equilateral triangles are drawn using respectively -M,L,Z and m,l,z. The shapes in each pair are identical, with one stroked and -one filled. The fill-mode default of "even-odd" means that -the inner triangle is hollow. - - -The rendered picture should match the reference image exactly, except for possible -variations in the labelling text (per CSS2 rules). - - -The test uses the 'path' element, as well as basic fill (solid primary colors), -stroke (black 1-pixel lines), font-family (Arial) and font-size properties. - - - - - paths-data-05-t - Test that viewer has the basic capability to handle the <path> element and data (d) attribute in combination with the moveto, lineto, and closepath commands - M, L, Z, m, l, and z. - - - - - - - - - m, l, l, l, z, - subpath - m, l, l, l, z - - - - - - - - - - - - - - - - - $Revision: 1.7 $ - - - diff --git a/tests/arthur/data/1.1/paths-data-06-t.svg b/tests/arthur/data/1.1/paths-data-06-t.svg deleted file mode 100644 index 355ccbef1f..0000000000 --- a/tests/arthur/data/1.1/paths-data-06-t.svg +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - -Verify the basic capability to handle the 'path' element, and its data attribute (d) -in combination with the straight-line path commands. -Two pairs of staircase figures are drawn using -respectively M,H,V,Z and m,h,v,z. The shapes in each pair are identical, with one stroked and -one filled. - - -The rendered picture should match the reference image exactly, except for possible -variations in the labelling text (per CSS2 rules). - - -The test uses the 'path' element, as well as basic fill (solid primary colors), -stroke (black 1-pixel lines), font-family (Arial) and font-size properties. - - - - paths-data-06-t - Test that viewer has the basic capability to handle the <path> element and data (d) attribute in combination with the moveto, lineto, and closepath commands - M, L, Z, m, l, and z. - - - - - - - - - M, H, V, H, - V. H, V, H, - V, Z - - - - - - - - - - - - - - - - - - - - - - $Revision: 1.7 $ - - - diff --git a/tests/arthur/data/1.1/paths-data-07-t.svg b/tests/arthur/data/1.1/paths-data-07-t.svg deleted file mode 100644 index 524d5fdb34..0000000000 --- a/tests/arthur/data/1.1/paths-data-07-t.svg +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - -Verify the basic capability to handle the 'path' element, and its data attribute (d) -in combination with the straight-line path commands. -Two pairs of staircase figures are drawn using -respectively M,H,V,Z and m,h,v,z. The shapes in each pair are identical, with one stroked and -one filled. - - -The rendered picture should match the reference image exactly, except for possible -variations in the labelling text (per CSS2 rules). - - -The test uses the 'path' element, as well as basic fill (solid primary colors), -stroke (black 1-pixel lines), font-family (Arial) and font-size properties. - - - - - paths-data-07-t - Test that viewer has the basic capability to handle the <path> element and data (d) attribute in combination with the moveto, lineto, and closepath commands - M, L, Z, m, l, and z. - - - - - - - - - m, h, v, h - v, h, v, h - v, z - - - - - - - - - - - - - - - - - - - - - $Revision: 1.7 $ - - - diff --git a/tests/arthur/data/1.1/pservers-grad-07-b.svg b/tests/arthur/data/1.1/pservers-grad-07-b.svg deleted file mode 100644 index 00f295779e..0000000000 --- a/tests/arthur/data/1.1/pservers-grad-07-b.svg +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - - - - - - - - - - - - - - - Test that the viewer has basic capability to handle linear gradients - on fills and stroke of objects and text. - - - This test uses the following elements : <linearGradient>, <stop> - and the following properties : stop-color, fill:url(# ), stroke(url# ) - - - Both elements in this test use the same simple gradient. It is a linear gradient from - blue (left) to red (right). From top-down the appearance of objects is as follows. - - - The top rectangle should be filled with the gradient. - - - The next rectangle has no fill, but has a thick stroke on which the gradient is - applied. - - - The rendered picture should match the reference image, except for possible - variations in the labelling text (per CSS2 rules). - - - - pservers-grad-07-b.svg - Test that the viewer has basic capability to handle linear gradients on fills and stroke of objects - . This means it needs to understand the following elements : <linearGradient>, <stop> and the following - properties : stop-color, fill:url(# ), stroke(url# ) - - - - - - - - - - - - - - - - Linear gradient filled rectangle - - - - - Linear gradient on stroke of rectangle - - - $Revision: 1.7 $ - - - diff --git a/tests/arthur/data/1.1/pservers-grad-11-b.svg b/tests/arthur/data/1.1/pservers-grad-11-b.svg deleted file mode 100644 index 4007757d85..0000000000 --- a/tests/arthur/data/1.1/pservers-grad-11-b.svg +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - - - - - - - - - - - - - - - Test that the viewer has basic capability to handle radial gradients - on fills and stroke of objects and text. - - - This test uses the following elements : <radialGradient>, <stop> - and the following properties : stop-color, fill:url(# ), stroke(url# ) - - - From top-down (left to right) the appearance of objects is as follows. - - - The top left rectangle should be a radial gradient from black(in) to red(outside). - The gradiant is applied to the fill of the rectangle. - - - The next rectangle has no fill, but has a thick stroke on which the gradient is - applied. The gradient goes from red(in) to yellow (out). - - - The next item is a text with a radial gradient on the fill. The gradient goes - from black (in) to yellow (out). - - - The last item is a text with a 2 user unit stroke on which a black (in) to red - (out) linear gradient is applied. - - - The rendered picture should match the reference image exactly, except for possible - variations in the labelling text (per CSS2 rules). - - - - pservers-grad-11-b.svg - Test that the viewer has basic capability to handle radial gradients on fills and stroke of objects and text. This means it needs to understand the following elements : <radialGradient>, <stop> and the following properties : stop-color, fill:url(# ), stroke(url# ) - - - - - - - - - - - - - Radial gradient on fill of rectangle - - - - - - - - - Radial gradient on stroke of rectangle - - - - - - - - Gradient on text fill - Radial gradient on text, black to yellow - - - - - - - - Gradient on text stroke - Radial gradient on stroke of text, black to red - - - - $Revision: 1.7 $ - - - diff --git a/tests/arthur/data/1.1/render-elems-01-t.svg b/tests/arthur/data/1.1/render-elems-01-t.svg deleted file mode 100644 index 245789b3c2..0000000000 --- a/tests/arthur/data/1.1/render-elems-01-t.svg +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - - - - - - - - - - - - Verifies that shapes can be filled. - - - There is one pair of octagons. These are filled. - - - The rendered image should match the reference image except for the text which may - show minor layout differences. - - - The test uses the 'path' element, as well as basic fill (solid primary colors), - stroke (primary color 1-pixel and wide lines), font-family (Arial) and font-size properties - - the common prerequisites. - - - - render-elems-01-t - This test validates that shapes can be both filled. - - - - - - - - - - - Shape fill - - - $Revision: 1.6 $ - - - diff --git a/tests/arthur/data/1.1/render-elems-02-t.svg b/tests/arthur/data/1.1/render-elems-02-t.svg deleted file mode 100644 index c42423c66c..0000000000 --- a/tests/arthur/data/1.1/render-elems-02-t.svg +++ /dev/null @@ -1,75 +0,0 @@ - -"> -]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Verifies that shapes can be stroked. - - - There is one pair of octagons. These are stroked. - - - The rendered image should match the reference image except for the text which may - show minor layout differences. - - - The test uses the 'rect' element, as well as basic fill (solid primary colors), - stroke (primary color 1-pixel and wide lines), font-family (Arial) and font-size properties - - the common prerequisites. - - - - render-elems-02-t - This test validates that shapes can be both stroked. - - - - - - - - - - - Shape stroke - - - $Revision: 1.6 $ - - - diff --git a/tests/arthur/data/1.1/render-elems-03-t.svg b/tests/arthur/data/1.1/render-elems-03-t.svg deleted file mode 100644 index 5bfa4b49ec..0000000000 --- a/tests/arthur/data/1.1/render-elems-03-t.svg +++ /dev/null @@ -1,57 +0,0 @@ - -"> -]> - - - - - - - - - - - - - - - - - - Verifies that shapes can be filled, stroked and the order of filling and stroking. - - - There is one pair of octagons. These are filled plus stroked. - - - The rendered image should match the reference image except for the text which may - show minor layout differences. - - - The test uses the 'rect' element, as well as basic fill (solid primary colors), - stroke (primary color 1-pixel and wide lines), font-family (Arial) and font-size properties - - the common prerequisites. - - - - render-elems-03-t - This test validates that shapes can be both filled and stroked. - - - - - - - - - &shape; - &shape; - Shape fill and stroke - - - $Revision: 1.7 $ - - - diff --git a/tests/arthur/data/1.1/render-elems-06-t.svg b/tests/arthur/data/1.1/render-elems-06-t.svg deleted file mode 100644 index 85d983401e..0000000000 --- a/tests/arthur/data/1.1/render-elems-06-t.svg +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Verifies that text can be filled. The - test shows two 'A' characters that are filled and not stroked. - - - The rendered image should match the reference image except for the text which may - show minor layout differences. - - - - render-elems-06-t - This test validates that text can be both filled. - - - - - - - - - - - - - - - - Text fill - - A - A - - - $Revision: 1.3 $ - - - diff --git a/tests/arthur/data/1.1/render-elems-07-t.svg b/tests/arthur/data/1.1/render-elems-07-t.svg deleted file mode 100644 index 60427f2fc4..0000000000 --- a/tests/arthur/data/1.1/render-elems-07-t.svg +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Verifies that text can be stroked. The - The test - shows two characters that are stroked and not filled. - - - The rendered image should match the reference image except for the text which may - show minor layout differences. - - - - render-elems-07-t - This test validates that text can be both stroked. - - - - - - - - - - - - - - - - Text stroke - - A - B - - $Revision: 1.3 $ - - - diff --git a/tests/arthur/data/1.1/render-elems-08-t.svg b/tests/arthur/data/1.1/render-elems-08-t.svg deleted file mode 100644 index 0ba2c543ab..0000000000 --- a/tests/arthur/data/1.1/render-elems-08-t.svg +++ /dev/null @@ -1,78 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Verifies that text can be stroked. - The test - shows two 'A' characters that are both stroked and filled. - - - The rendered image should match the reference image except for the text which may - show minor layout differences. - - - - render-elems-08-t - This test validates that text can be both filled and stroked. - - - - - - - - - - - - - - - - - Text fill and stroke - - A - B - - $Revision: 1.3 $ - - - - diff --git a/tests/arthur/data/1.1/render-groups-03-t.svg b/tests/arthur/data/1.1/render-groups-03-t.svg deleted file mode 100644 index 3f1ca22497..0000000000 --- a/tests/arthur/data/1.1/render-groups-03-t.svg +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - -]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Verifies implicit rendering order (paragraph 3.3) and grouping mechanism (paragraphs 3.4). - It also validates basic Shape, Image and text rendering. - - - This test renders 3 elements: a text string "SVG", then - a shape, then an image. Because of their definition order and coordinates, the image - should be on top of the rectangle and the rectangle on top of the text. None - of the "SVG" should show through the - rectangle and none of the rectangle should show through the image. - - - Prerequisites: the test assumes proper handling of the fill stroke, stroke-width, - font-size rendering properties. It uses the rect, line, text and image elements, as - well as all the elements required for the test template. To ensure that the text string is - overlapped by the other elements and to avoid a dependency on system fonts, an SVG font is used. - - - The rendered image should match the reference image exactly. - - - - render-groups-03-t - This test validates the rendering order of graphic elements. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - SVG - - - - - $Revision: 1.5 $ - - diff --git a/tests/arthur/data/1.1/shapes-circle-01-t.svg b/tests/arthur/data/1.1/shapes-circle-01-t.svg deleted file mode 100644 index d8e5380667..0000000000 --- a/tests/arthur/data/1.1/shapes-circle-01-t.svg +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - The rendered picture should match the reference image, except - for possible variations in the labelling text (per CSS2 rules). - - - - - shapes-circle-01-t - Test ability to handle the 'circle' basic shapes element. - - - - - - - - - - - - $Revision: 1.6 $ - - - diff --git a/tests/arthur/data/1.1/shapes-ellipse-01-t.svg b/tests/arthur/data/1.1/shapes-ellipse-01-t.svg deleted file mode 100644 index c86f23762b..0000000000 --- a/tests/arthur/data/1.1/shapes-ellipse-01-t.svg +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - The rendered picture should match the reference image, except - for possible variations in the labelling text (per CSS2 rules). - - - - - shapes-ellipse-01-t - Test that viewer has the basic capability to handle the <ellipse> element. - - - - - - - - - - - - - - - - - - - - - - - - - $Revision: 1.7 $ - - - diff --git a/tests/arthur/data/1.1/shapes-line-01-t.svg b/tests/arthur/data/1.1/shapes-line-01-t.svg deleted file mode 100644 index e0bffae15b..0000000000 --- a/tests/arthur/data/1.1/shapes-line-01-t.svg +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - The rendered picture should match the reference image, except - for possible variations in the labelling text (per CSS2 rules). - - - - - shapes-line-01-t - Test ability to handle the 'line' basic-shapes element. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $Revision: 1.6 $ - - - diff --git a/tests/arthur/data/1.1/shapes-polygon-01-t.svg b/tests/arthur/data/1.1/shapes-polygon-01-t.svg deleted file mode 100644 index 57995b624e..0000000000 --- a/tests/arthur/data/1.1/shapes-polygon-01-t.svg +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - The rendered picture should match the reference image, except - for possible variations in the labelling text (per CSS2 rules). - - - - shapes-polygon-01-t - Test that viewer has the basic capability to handle the 'polygon' element. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $Revision: 1.6 $ - - - diff --git a/tests/arthur/data/1.1/shapes-polyline-01-t.svg b/tests/arthur/data/1.1/shapes-polyline-01-t.svg deleted file mode 100644 index 9884cdc5e9..0000000000 --- a/tests/arthur/data/1.1/shapes-polyline-01-t.svg +++ /dev/null @@ -1,84 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - The rendered picture should match the reference image, except - for possible variations in the labelling text (per CSS2 rules). - - - - - - shapes-polyline-01-t - Test that viewer has the basic capability to handle the 'polyline' element. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $Revision: 1.7 $ - - - diff --git a/tests/arthur/data/1.1/shapes-rect-01-t.svg b/tests/arthur/data/1.1/shapes-rect-01-t.svg deleted file mode 100644 index 3ea47a6d47..0000000000 --- a/tests/arthur/data/1.1/shapes-rect-01-t.svg +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - The rendered picture should match the reference image, except - for possible variations in the labelling text (per CSS2 rules). - - - - - shapes-rect-01-t - Test that viewer has the basic capability to handle the <rect> element. - - - - - - - - - - - - - - - - - - - - - - - - - - $Revision: 1.7 $ - - - diff --git a/tests/arthur/data/1.1/struct-cond-01-t.svg b/tests/arthur/data/1.1/struct-cond-01-t.svg deleted file mode 100644 index cfe8b91ac1..0000000000 --- a/tests/arthur/data/1.1/struct-cond-01-t.svg +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - This test evaluates a switch statement. The result should be a - green rectangle in the lower left quarter of the output window. - - - The rendered picture should match the reference image, except for possible - variations in the labelling text (per CSS2 rules). - - - The test uses the 'rect' element, as well as basic fill (solid primary colors), - stroke (black 1-pixel lines), font-family (Arial) and font-size properties. - - - - struct-cond-01-t.svg - Test to determine if a simple switch element can be probably evaluated. - - - - - - - - - - - $Revision: 1.6 $ - - - diff --git a/tests/arthur/data/1.1/struct-cond-02-t.svg b/tests/arthur/data/1.1/struct-cond-02-t.svg deleted file mode 100644 index 4a965d3bc1..0000000000 --- a/tests/arthur/data/1.1/struct-cond-02-t.svg +++ /dev/null @@ -1,574 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - This tests ability to use the 'systemLanguage' as a test attribute within a - switch element. To pass, either
    -
  1. the name (in English) of the current - system language, or
  2. -
  3. the names of the three languages (English, French - Japanese) of W3C
  4. -
must appear. The second case - will occur if either the user language is not one of the (60 or so) languages - present in the test, or if there is no user language information available. - - - It is an error to display no output; the last child of switch has no test, so - it will always be taken unless a more suitable child has already evaluated to true. - - - - - In addition, the string "Why don't they just speak <language>" should appear - in the center of the graphic, translated into that language. It is not an error for - some or all of this string to display as 'missing character' glyphs, if no - suitable font is available - however, this is unlikely if the language is indeed - the users primary language. (It can easily occur during testing, however). - - - - struct-cond-02-t - Test that viewer has the basic capability to switch on user langauge - - - - - - - - - - Waarom kan hulle nie net doodgewoon Afrikaans praat nie? - Afrikaans - - - ለáˆáŠ•á‹µáŠá‹ አማርኛ የማይናገሩት᧠- Amharic - - - - لماذا لا يتكلمون اللّغة العربية Ùحسب؟ - Arabic (SA) - - - Защо те проÑто не могат да говорÑÑ‚ българÑки ? - Bulgarian - - - ওরা েকন বাংলা বলেত পাের না ? - Bengali - - - - Per què no poden simplement parlar en català ? - Catalan - - - ProÄ prostÄ› nemluví Äesky ? - Czech - - - Pam dydyn nhw ddim yn siarad Cymraeg ? - Welsh - - - Hvorfor kan de ikke bare tale dansk ? - Danish - - - - Warum sprechen sie nicht einfach Deutsch ? - German (DE) - - - Μα γιατί δεν μποÏοÏν να μιλήσουν Ελληνικά ; - Greek (modern, GR) - - - Why can't they just speak English ? - English (US) - - - ¿Por qué no pueden simplemente hablar en castellano ? - Spanish (ES) - - - Zergatik ezin dute  Euzkeraz bakarrik hitzegin? - Basque - - - خب، چرا Ùارسى صحبت نمى كنند؟ - Farsi - - - Miksi he eivät yksinkertaisesti puhu suomea ? - Finnish - - - - Pourquoi, tout simplement, ne parlent-ils pas en Français ? - French (FR) - - - Carson nach eil iad a'bruidhinn na Gàidhlige ? - Scots Gaelic - - - બદà«àª§àª¾ લોકો ગà«àªœàª°àª¾àª¤à«€ કૅમ નથી બોલતા? - Gujarti (IN) - - - - למה ×”× ×¤×©×•×˜ ×œ× ×ž×“×‘×¨×™× ×¢×‘×¨×™×ª ? - Hebrew (modern) - - - यह लोग हिनà¥à¤¦à¥€ कà¥à¤¯à¥‹à¤‚ नहीं बोल सकते हैं ? - Hindi - - - ZaÅ¡to jednostavno ne govore hrvatski ? - Croatian - - - Miért nem beszélnek egyszerűen magyarul ? - Hungarian - - - Ô»Õ¶Õ¹Õ¸Ö‚Õž Õ¶Ö€Õ¡Õ¶Ö„ Õ¹Õ¥Õ¶ Õ­Õ¸Õ½Õ¸Ö‚Õ´ Õ€Õ¡ÕµÕ¥Ö€Õ¥Õ¶ - - Armenian - - - Mengapa mereka tidak bisa bicara bahasa Indonesia ? - Indonesian - - - Hvers vegna geta þeir ekki réttlátur tala Ãslenska ? - Icelandic - - - Perchè non possono semplicemente parlare italiano ? - Italian - - - - ᓱᒻᒪᓂᒃᑯአáƒá“„ᒃᑎᑠá‘áƒá“ᓇᔭᙱᓚᑦ - Inuktitut - - - ãªãœã€ã¿ã‚“ãªæ—¥æœ¬èªžã‚’話ã—ã¦ãã‚Œãªã„ã®ã‹ï¼Ÿ - Japanese (JP) - - - Kenapa kok ora nganggo  basa Jawa  wae? - Javanese - - - რáƒáƒ¢áƒáƒ› áƒáƒ  ლáƒáƒžáƒáƒ áƒáƒ™áƒáƒ‘ენ ისინი ქáƒáƒ áƒ—ულáƒáƒ“ ? - Georgian - - - Олар неге қазақ Ñ‚iлiнде Ñойлемейдi? - Kazakh - - - ಅವರೠಕನà³à²¨à²¡ ಮಾತನಾಡಬಹà³à²¦à²²à³à²²à²¾? - Kannada - - - ì„¸ê³„ì˜ ëª¨ë“  ì‚¬ëžŒë“¤ì´ í•œêµ­ì–´ 를 ì´í•´í•œë‹¤ë©´ 얼마나 좋ì„까? - Korean - - - Емне үчүн алар кыргызча Ñүйлбйт? - Kirghiz - - - KodÄ—l gi jie nekalba lietuviÅ¡kai ? - Lithuanian - - - Зошто тие едноÑтавно не говорат македонÑки ? - Macedonian - - - लोकांना मराठी का बोलता येत नाही? - Marathi - - - Waarom spreken ze niet gewoon Nederlands ? - Dutch - - - Hvorfor kan de ikke bare snakke norsk ? - Norwegian - - - ସେମାନେ ଉଡିଯା ରେ କହିନà­à¬•à¬¿ କହିବେ ନହିà¬? - Oriya - - - Dlaczego oni nie mówiÄ… po polsku ? - Polish - - - - Porque é que eles não falam simplesmente em Português ? - Portugese (PT) - - - Porque é que eles não falam em Português (do Brasil) ? - Portugese (BR) - - - Porque é que eles não falam simplesmente em Português ? - Portugese - - - De ce ei nu vorbesc moldoveneÅŸte ? - Romanian - - - Почему же они не говорÑÑ‚ по-руÑÑки ? - Russian - - - ते किं संसà¥à¤•à¥ƒà¤¤à¤ƒ माम वदनà¥à¤¤à¤¿ ? - Sanskrit - - - ZaÅ¡to jednostavno ne govore srpski ? - Serbian - - - අà·à¶ºà·’ ඔවුන්ට ඉංගරිස කත෠ෛනබ ? - Sinhalese - - - - Zakaj vendar ne govorijo slovensko ? - Slovenian - - - Pse nuk duan të flasin vetëm shqip ? - Albanian - - - Varför pratar dom inte bara svenska ? - Swedish - - - அவரà¯à®•à®³à¯ à®à®©à¯ தமிழில௠பேசகà¯à®•à¯‚டாத௠? - Tamil - - - - తెలà±à°—ౠలో à°Žà°‚à°¦à±à°•à± మాటà±à°²à°¾à°¡à°°à±? - Telugu - - - ÄŒaro onho ba zaboni toÄiki gap namezanand? - Tajik - - - ทำไมเขาถึงไม่พูด ภาษาไทย - Thai - - - Bakit hindi na lang sila magsalita ng Tagalog ? - Tagalog (Filipino) - - - Neden Türkçe konuÅŸamıyorlar? - Turkish - - - Ðишләп олар татарча Ñүләша алмыйлар? - Tatar - - - Чому б їм не розмовлÑти українÑькою ? - Ukranian - - - ﻦﻴﻫ ﻰﺘﻠﻭﺒ ﻦﻴﻬﻨ ﻦﻭﻴﻜ ﻮﺪﺭﺃ بس ﻮﻩ ﻟﻮﮒ؟ - Urdu (IN) - - - ﻦﻴﻫ ﻰﺘﻠﻭﺒ ﻦﻴﻬﻨ ﻦﻭﻴﻜ ﻮﺪﺭﺃ بس ﻮﻩ ﻟﻮﮒ؟ - Urdu (PK) - - - - Nega ular uzbek tilinda gapirmaidilar? - Uzbek - - - TaÌ£i sao hoÌ£ không thể chỉ noÌi tiêÌng Việt ? - Vietnamese - - - פֿ×ַרװ×ָס רעדט מען ניט פּשוט ייִדיש ? - Yiddish - - - 他们为什么ä¸è¯´ä¸­æ–‡ (中国) ? - Chinese (CN) - - - 他們爲什麽ä¸èªªä¸­æ–‡ï¼ˆå°ç£ï¼‰ï¼Ÿ - Chinese (TW) - - - - You have no (matching) language preference set - ãªãœã€ã¿ã‚“ãªæ—¥æœ¬èªžã‚’話ã—ã¦ãã‚Œãªã„ã®ã‹ï¼Ÿ - Why can't they just speak English ? - Pourquoi, tout simplement, ne parlent-ils pas en Français ? - - - - - - $Revision: 1.8 $ - - diff --git a/tests/arthur/data/1.1/struct-defs-01-t.svg b/tests/arthur/data/1.1/struct-defs-01-t.svg deleted file mode 100644 index 86ccb5ccf0..0000000000 --- a/tests/arthur/data/1.1/struct-defs-01-t.svg +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - - - -]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Test to verify that the defs element is used as a container correctly. - - - In this test a fill is created which is solid red. The view should be a solid red rectangle - centered in the viewport 100 pixels from from left,top and right,bottom. Also, in the - defs sections there are rectangle defined, one to paint over the entire canvas with - a green fill and the other to obscure most of the red rectangle. The green rectangles - should not show in the view as defs are referenced items and are not rendered. - No green should show. - - - The rendered picture should match the reference image, except for possible - variations in the labelling text (per CSS2 rules). - - - The test uses the 'rect' element, as well as basic fill (solid primary colors), - stroke (black 1-pixel lines), font-family (Arial) and font-size properties. - - - - struct-defs-01-t - Test to determine if the defs element is used as a container correctly - - - - - - - - - - - - - $Revision: 1.6 $ - - diff --git a/tests/arthur/data/1.1/struct-group-01-t.svg b/tests/arthur/data/1.1/struct-group-01-t.svg deleted file mode 100644 index f719835c3b..0000000000 --- a/tests/arthur/data/1.1/struct-group-01-t.svg +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - The test checks to see that graphics elements (g) can be nested and that the like attributes can be passed to the children. All the g elements for this test are in the g element whose id=allGs. The two red rectangles and the yellow are in the g labeled rects. The reds inherit a fill color the green rect has a fill specified and it should not be overwritten. The two yellow rectangles should inherit the fill color and the transform attribute, they should be yellow and rotated at -20 degrees. These two rectangles are in g "yellowNrotate", that g is nested inside g "gratuitiousG". The black rectangle in the upper right, has no attributes inherited from its parent. The focus is nesting of g elements and passing on of attributes. - - - The rendered picture should match the reference image, except for possible - variations in the labelling text (per CSS2 rules). - - - The test uses the 'rect' element, as well as basic fill (solid primary colors), - stroke (black 1-pixel lines), font-family (Arial) and font-size properties. - - - - struct-group-01-t - Test that the g element functions correctly as a container. - - - - - - - - - - - - - - - - - - - - $Revision: 1.4 $ - - - diff --git a/tests/arthur/data/1.1/struct-image-01-t.svg b/tests/arthur/data/1.1/struct-image-01-t.svg deleted file mode 100644 index 14bb6c9c86..0000000000 --- a/tests/arthur/data/1.1/struct-image-01-t.svg +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - The image test case checks to see if the basic image formats allowed in - the tiny profile are supported. - The upper right has an JPG image the lower right has a PNG image. They are - the same image. - Those positions are relative to the upper left of the entire canvas. - If any of the components are missing, then an image format is not being - properly supported. - - - The rendered picture should match the reference image, except for possible - variations in the labelling text (per CSS2 rules). - - - - struct-image-01-t - Test that the jpg and png image formats are understood. - - - - - - - - $Revision: 1.8 $ - - - diff --git a/tests/arthur/data/1.1/struct-image-03-t.svg b/tests/arthur/data/1.1/struct-image-03-t.svg deleted file mode 100644 index 1c4c7a4477..0000000000 --- a/tests/arthur/data/1.1/struct-image-03-t.svg +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - This test verifies the support for gamma correction of displayed PNG - images. Several different images are displayed one above the other; - if gamma correction is correctly performed based on the values in - the gAMA chunk in the PNG file, the resulting displayed values are - the same in all of the files (except for rounding error, which gives - some artefacts at the right side of the lowest two images due to the - very high levels of gamma correction needed for this test). - - - - struct-image-03-t - Test gamma correction of PNG images based on gAMA - chunk. Derived from original HTML test by Dave Martindale. - - - - - - - - - - - Gamma correction - - $Revision: 1.6 $ - - - diff --git a/tests/arthur/data/1.1/struct-image-04-t.svg b/tests/arthur/data/1.1/struct-image-04-t.svg deleted file mode 100644 index 904000e9ca..0000000000 --- a/tests/arthur/data/1.1/struct-image-04-t.svg +++ /dev/null @@ -1,126 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - The image test case checks to see if the basic image formats allowed in - the tiny profile are supported using the data: URI schema and base64 encoding.. - The upper right has an JPG image the lower right has a PNG image. They are - the same image. - Those positions are relative to the upper left of the entire canvas. - If any of the components are missing, then an image format is not being - properly supported. - - - The rendered picture should match the reference image, except for possible - variations in the labelling text (per CSS2 rules). - - - - - struct-image-04-t - - Test that jpg and png image formats are understood when inlined with the data: URI scheme. - - - - - - - - - - - - - - - - - - $Revision: 1.4 $ - - - - - - - diff --git a/tests/arthur/data/1.1/styling-pres-01-t.svg b/tests/arthur/data/1.1/styling-pres-01-t.svg deleted file mode 100644 index 8eb03e6d95..0000000000 --- a/tests/arthur/data/1.1/styling-pres-01-t.svg +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - Check that !important in presentation attribute is an error. - A fill attribute is set to red with !important. It thus has no specified - value, and inherits from its parent a green fill. A green rectangle is displayed. - - - styling-pres-01-t - Check !important in presentation attribute is an error - - - - - - - - - - - - $Revision: 1.2 $ - - diff --git a/tests/arthur/data/1.1/text-fonts-01-t.svg b/tests/arthur/data/1.1/text-fonts-01-t.svg deleted file mode 100644 index c545874adc..0000000000 --- a/tests/arthur/data/1.1/text-fonts-01-t.svg +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Purpose of test is to determine if the font family is being - correctly selected. The top two lines of text test serif fonts; - the top line in maroon tests the generic font family 'serif' - and the second line in black tests a selection of commonly - available named serif fonts. The next two lines of text test - sans-serif fonts; - the top line in maroon tests the generic font family 'sans-serif' - and the second line in black tests a selection of commonly - available named sans serif fonts. The following two lines - of text test monospaced fonts; - the top line in maroon tests the generic font family 'monospaced' - and the second line in black tests a selection of commonly - available named monospaced fonts. The lowercase 'i' and uppercase'W' - should be the same width,for monospaced fonts. - - - The seventh line of text, in green, tests for - three non-existent fonts (nonsense names). There is no fallback - generic font specified. The text must be displayed anyway. - - - The first six lines contain two Japanese characters (画像) - at the end of the line. Both of these characters must be displayed, - although it is compliant to display them with the 'missing glyph' - if no suitable font containing Japanese characters can be found. - Most but not all fonts have a visible missing glyph character. - If the selected font has a visible missing glyph character, it should appear - wherever the corresponding glyph is not available. - - - - - text-fonts-01-t.svg - -Test that viewer has the basic capability to handle different font families - - - - - - A serifed face ç”»åƒ - A sans-serif face ç”»åƒ - A mono (iW) face ç”»åƒ - - A serifed face ç”»åƒ - A sans-serif face ç”»åƒ - A mono (iW) face ç”»åƒ - - This must be displayed - - - - - $Revision: 1.5 $ - - - diff --git a/tests/arthur/data/1.1/text-fonts-02-t.svg b/tests/arthur/data/1.1/text-fonts-02-t.svg deleted file mode 100644 index 7d9a565b49..0000000000 --- a/tests/arthur/data/1.1/text-fonts-02-t.svg +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - Purpose of test is to determine if the font weight is being - correctly rendered. A number of font families are specified. The - numerical weight values (100 to 900) should show the lighter weights - on the lower numbers and the heavier weights on the larger numbers. - Heavier is defined to mean 'no lighter'. - - - If only one font weight is available, they should all display at the - same weight. The transition from black to green figures shows the - correct light to bold transition for the common case where two - weights are available. If three or more weights are available, see - the CSS2 specification for how these are allocated to the nine - weight numbers. - - - The absolute keywords 'normal' and bold' are tested - by the first two lines on the right hand side of the test, - the third line of text tests the to 'bolder' - relative keyword and the fourth tests the - 'lighter' relative keyword. - - - - text-fonts-02-t.svg - -Test that viewer has the basic capability to handle different font weights - - - - - 100 - 200 - 300 - 400 - 500 - 600 - 700 - 800 - 900 - This is bold - This is normal - - Blue is bolder - - - Blue is lighter - - - $Revision: 1.7 $ - - diff --git a/tests/arthur/data/1.1/text-intro-01-t.svg b/tests/arthur/data/1.1/text-intro-01-t.svg deleted file mode 100644 index 7a1ef61f2e..0000000000 --- a/tests/arthur/data/1.1/text-intro-01-t.svg +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - Test left-to-right aspect of internationalized text. - - - Various text strings in various languages appear. The main - purpose of the test is to verify that the correct characters - appear and that they appear in the correct order and orientation, even - though the first choice font does not have the right glyphs. - - - Correct rendering requires that each character is rendered. it may be rendered - with the 'missing glyph' if no - glyphs are found in the fonts listed in the content, or in any fallback font - that is available. The first choice font - is a special SVG font that only contains the 'missing glyph'. Missing glyph from - other fonts may conformantly be used, however. - - - - text-intro-01-t - Test left-to-right aspect of internationalized text. - - - - - - - - - - - Test left-to-right text. - - Polish: MogÄ™ jeść szkÅ‚o, i mi ... - Russian: Я могу еÑÑ‚ÑŒ Ñтекло, ... - Greek: ΜποÏÏŽ να φάω ... - Hebrew: ×× ×™ יכול ל×כול זכוכית ... - Yiddish: ×יך קען עסן גל×ָז ×ון ... - - - Chinese:我能åžä¸‹çŽ»ç’ƒè€Œä¸ä¼¤èº«ä½“。 - - - Japanese: ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã¾ã™ã€‚ - - - $Revision: 1.5 $ - - diff --git a/tests/arthur/data/1.1/text-intro-04-t.svg b/tests/arthur/data/1.1/text-intro-04-t.svg deleted file mode 100644 index 22bb4ca817..0000000000 --- a/tests/arthur/data/1.1/text-intro-04-t.svg +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - - -]> - - - - - - - - - - - - - - - Test basic aspect of internationalized text. - - - Various text strings in various languages appear. The main - purpose of the test is to verify that the correct characters - appear and that they appear in the correct order and orientation. - - - Correct rendering requires that each character is rendered. It is not required that a given character - be rendered with any particular font; just that it is rendered. - It may be rendered with the 'missing glyph' if no - glyphs are found in the fonts listed in the content, or in any fallback font that is available. - - - A future version of this test - might include all necessary glyphs as an SVG font. - - - - text-intro-04-t - Test basic of internationalized text. - - - - - Test horizontal text. - - Polish: MogÄ™ jeść szkÅ‚o, i mi nie szkodzi. - Russian: Я могу еÑÑ‚ÑŒ Ñтекло, Ñто мне не вредит. - Greek: ΜποÏÏŽ να φάω σπασμένα γυαλιά χωÏίς να πάθω τίποτα. - - Text "×× ×™ יכול ל×כול זכוכית וזה ×œ× ×ž×–×™×§ לי" is in Hebrew - Yiddish: ×יך קען עסן גל×ָז ×ון עס טוט מיר נישט װײ. - Chinese:我能åžä¸‹çŽ»ç’ƒè€Œä¸ä¼¤èº«ä½“。 - Japanese: ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™ã€‚ãã‚Œã¯ç§ã‚’å‚·ã¤ã‘ã¾ã›ã‚“。 - - - $Revision: 1.9 $ - - diff --git a/tests/arthur/data/1.1/text-ws-01-t.svg b/tests/arthur/data/1.1/text-ws-01-t.svg deleted file mode 100644 index 8b2d7a8433..0000000000 --- a/tests/arthur/data/1.1/text-ws-01-t.svg +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Test for viewer correct handling of whitespace and the 'xml:space' attribute. - There are two sub-tests, for xml:space value "default". - In each test, the content of the 'text' element is written on - multiple lines. The first test of each pair has indented text with leading - space characters, tabs, etc. The second has no indentation, but a line break - before the content and after it. There are no space (or other whitespace) - characters at the ends of the lines. - - - The two test cases are self-descriptive. From the top; - first, "default" value applied to 3 lines of content with indents, space characters, tabs, etc; - second, "default" applied to two lines content with no indent; - - - In each test, the test string is in blue and the reference - image is in black. - The rendered picture should approximately match the reference image, - however there is some question in the reference image concerning the - exact amount of space in the long-space areas. The third test uses the nbsp unicode character - to force the reference white spaces display, which provides an accurate match if the font in use - has the same metrics for that character and the default white space. - Also, variations are possible in the text fonts and layout (per CSS2 rules). - - - The test also uses the 'rect' element, - as well as basic fill (solid primary colors), - stroke (black 1-pixel lines), font-family (Arial) - and font-size properties. - - - - - text-ws-01-t - Test that viewer correctly handle whitespace and the "space" attribute. - - - - - Basic: xml:space attribute - & whitespace handling. - - - - WS with indented lines. - WS with indented lines. - - xml:space='default' - - - - -WS -non-indented lines. - - WS non-indented lines. - - xml:space='default' - - - $Revision: 1.6 $ - - - diff --git a/tests/arthur/data/1.1/text-ws-02-t.svg b/tests/arthur/data/1.1/text-ws-02-t.svg deleted file mode 100644 index 515f503208..0000000000 --- a/tests/arthur/data/1.1/text-ws-02-t.svg +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Test for viewer correct handling of whitespace and the 'xml:space' attribute. - There are two sub-tests, forvalue "preserve". - In each test, the content of the 'text' element is written on - multiple lines. The first test of each pair has indented text with leading - space characters, tabs, etc. The second has no indentation, but a line break - before the content and after it. There are no space (or other whitespace) - characters at the ends of the lines. - - - The two test cases are self-descriptive. From the top; - first, "preserve" applied to essentially the same content as first; - second, "preserve" applied to essentially the same content as second. - - - In each test, the test string is in blue and the reference - image is in black. - The rendered picture should approximately match the reference image, - however there is some question in the reference image concerning the - exact amount of space in the long-space areas. The third test uses the nbsp unicode character - to force the reference white spaces display, which provides an accurate match if the font in use - has the same metrics for that character and the default white space. - Also, variations are possible in the text fonts and layout (per CSS2 rules). - - - The test also uses the 'rect' element, - as well as basic fill (solid primary colors), - stroke (black 1-pixel lines), font-family (Arial) - and font-size properties. - - - - - text-ws-02-t - Test that viewer correctly handle whitespace and the "space" attribute. - - - - - Basic: xml:space attribute - & whitespace handling. - - - - -WS - with - indented lines. - - -  WS   with  indented lines. - - - xml:space='preserve' - - - - WS -non-indented lines. - - WS non-indented lines. - - xml:space='preserve' - - - $Revision: 1.6 $ - - - diff --git a/tests/arthur/data/1.2/07_07.svg b/tests/arthur/data/1.2/07_07.svg deleted file mode 100644 index 11968b2c2d..0000000000 --- a/tests/arthur/data/1.2/07_07.svg +++ /dev/null @@ -1,40 +0,0 @@ - - - Example Nested - Nested transformations - - - - - - - - - - - - - ....Translate(1) - - - - - - - - - ....Rotate(2) - - - - - - - - - ....Translate(3) - - - - - diff --git a/tests/arthur/data/1.2/07_12.svg b/tests/arthur/data/1.2/07_12.svg deleted file mode 100644 index bf372ccd04..0000000000 --- a/tests/arthur/data/1.2/07_12.svg +++ /dev/null @@ -1,21 +0,0 @@ - - - Example ViewBox - uses the viewBox - attribute to automatically create an initial user coordinate - system which causes the graphic to scale to fit into the - viewport no matter what size the viewport is. - - - - - - - Stretch to fit - - diff --git a/tests/arthur/data/1.2/08_02.svg b/tests/arthur/data/1.2/08_02.svg deleted file mode 100644 index 7e3ae41074..0000000000 --- a/tests/arthur/data/1.2/08_02.svg +++ /dev/null @@ -1,26 +0,0 @@ - - - Example cubic01- cubic Bézier commands in path data - Picture showing a simple example of path data - using both a "C" and an "S" command, - along with annotations showing the control points - and end points - - - - - - - - - - - - - - M100,200 C100,100 250,100 250,200 - S400,300 400,200 - diff --git a/tests/arthur/data/1.2/08_03.svg b/tests/arthur/data/1.2/08_03.svg deleted file mode 100644 index 30a240c11b..0000000000 --- a/tests/arthur/data/1.2/08_03.svg +++ /dev/null @@ -1,28 +0,0 @@ - - - - Example quad01 - quadratic Bezier commands in path data - Picture showing a "Q" a "T" command, - along with annotations showing the control points - and end points - - - - - - - - - - - - - - - diff --git a/tests/arthur/data/1.2/08_04.svg b/tests/arthur/data/1.2/08_04.svg deleted file mode 100644 index 1d692b708c..0000000000 --- a/tests/arthur/data/1.2/08_04.svg +++ /dev/null @@ -1,19 +0,0 @@ - - - Example arcs01 - arc commands in path data - Picture of a pie chart with two pie wedges and - a picture of a line with arc blips - - - - - diff --git a/tests/arthur/data/1.2/09_02.svg b/tests/arthur/data/1.2/09_02.svg deleted file mode 100644 index 14df36e8b8..0000000000 --- a/tests/arthur/data/1.2/09_02.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - Example rect02 - rounded rectangles - - - - - - - diff --git a/tests/arthur/data/1.2/09_03.svg b/tests/arthur/data/1.2/09_03.svg deleted file mode 100644 index 93c12be0cd..0000000000 --- a/tests/arthur/data/1.2/09_03.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - Example circle01 - circle filled with red and stroked with blue - - - - diff --git a/tests/arthur/data/1.2/09_04.svg b/tests/arthur/data/1.2/09_04.svg deleted file mode 100644 index 69295567eb..0000000000 --- a/tests/arthur/data/1.2/09_04.svg +++ /dev/null @@ -1,15 +0,0 @@ - - - Example ellipse01 - examples of ellipses - - - - - - - diff --git a/tests/arthur/data/1.2/09_05.svg b/tests/arthur/data/1.2/09_05.svg deleted file mode 100644 index a7407bfdba..0000000000 --- a/tests/arthur/data/1.2/09_05.svg +++ /dev/null @@ -1,20 +0,0 @@ - - - Example line01 - lines expressed in user coordinates - - - - - - - - - - diff --git a/tests/arthur/data/1.2/09_06.svg b/tests/arthur/data/1.2/09_06.svg deleted file mode 100644 index eeae2b499e..0000000000 --- a/tests/arthur/data/1.2/09_06.svg +++ /dev/null @@ -1,16 +0,0 @@ - - - Example polyline01 - increasingly larger bars - - - - \ No newline at end of file diff --git a/tests/arthur/data/1.2/09_07.svg b/tests/arthur/data/1.2/09_07.svg deleted file mode 100644 index 209b6870ef..0000000000 --- a/tests/arthur/data/1.2/09_07.svg +++ /dev/null @@ -1,15 +0,0 @@ - - - Example polygon01 - star and hexagon - - - - - diff --git a/tests/arthur/data/1.2/10_03.svg b/tests/arthur/data/1.2/10_03.svg deleted file mode 100644 index 475c9101a6..0000000000 --- a/tests/arthur/data/1.2/10_03.svg +++ /dev/null @@ -1,15 +0,0 @@ - - - Example tspan01 - using tspan to change visual attributes - - - You are - not - a banana. - - - - - diff --git a/tests/arthur/data/1.2/10_04.svg b/tests/arthur/data/1.2/10_04.svg deleted file mode 100644 index e22babe815..0000000000 --- a/tests/arthur/data/1.2/10_04.svg +++ /dev/null @@ -1,20 +0,0 @@ - - - Example tspan02 - using tspan's dx and dy attributes - for incremental positioning adjustments - - - But you - - are - - - a peach! - - - - - - diff --git a/tests/arthur/data/1.2/10_05.svg b/tests/arthur/data/1.2/10_05.svg deleted file mode 100644 index 0871cd1446..0000000000 --- a/tests/arthur/data/1.2/10_05.svg +++ /dev/null @@ -1,21 +0,0 @@ - - - - Example tspan03 - using tspan's x and y attributes - for multiline text and precise glyph positioning - - - - Cute and - - - fuzzy - - - - - - diff --git a/tests/arthur/data/1.2/10_06.svg b/tests/arthur/data/1.2/10_06.svg deleted file mode 100644 index 1935f42b93..0000000000 --- a/tests/arthur/data/1.2/10_06.svg +++ /dev/null @@ -1,20 +0,0 @@ - - - - - Referenced character data - - - Example tref01 - inline vs reference text content - - Inline character data - - - - - - - diff --git a/tests/arthur/data/1.2/10_07.svg b/tests/arthur/data/1.2/10_07.svg deleted file mode 100644 index 88f9bd2fd7..0000000000 --- a/tests/arthur/data/1.2/10_07.svg +++ /dev/null @@ -1,20 +0,0 @@ - - - - Example textdecoration01 - behavior of 'text-decoration' property - - - Normal text - Text with line-through - Underlined text - - One - word - has - different - underlining - - - diff --git a/tests/arthur/data/1.2/10_08.svg b/tests/arthur/data/1.2/10_08.svg deleted file mode 100644 index 62e7ed0843..0000000000 --- a/tests/arthur/data/1.2/10_08.svg +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - Example toap01 - simple text on a path - - - - We go up, then we go down, then up again - - - - - diff --git a/tests/arthur/data/1.2/10_09.svg b/tests/arthur/data/1.2/10_09.svg deleted file mode 100644 index 2d971fe899..0000000000 --- a/tests/arthur/data/1.2/10_09.svg +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - Example toap02 - tspan within textPath - - - - We go - - up - - - , - - then we go down, then up again - - - - - diff --git a/tests/arthur/data/1.2/10_10.svg b/tests/arthur/data/1.2/10_10.svg deleted file mode 100644 index e2feed5b74..0000000000 --- a/tests/arthur/data/1.2/10_10.svg +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - Example toap03 - text on a path with startOffset attribute - - - - We go up, then we go down, then up again - - - - - diff --git a/tests/arthur/data/1.2/10_11.svg b/tests/arthur/data/1.2/10_11.svg deleted file mode 100644 index 8134ce523d..0000000000 --- a/tests/arthur/data/1.2/10_11.svg +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - Example toap04 - text on a path layout rules - - - - Choose shame or get war - - - - - diff --git a/tests/arthur/data/1.2/11_01.svg b/tests/arthur/data/1.2/11_01.svg deleted file mode 100644 index 2a6d5b5f16..0000000000 --- a/tests/arthur/data/1.2/11_01.svg +++ /dev/null @@ -1,20 +0,0 @@ - - - Gradients apply to leaf nodes - - - - - - - - - - - - - - - diff --git a/tests/arthur/data/1.2/11_02.svg b/tests/arthur/data/1.2/11_02.svg deleted file mode 100644 index 4806892f66..0000000000 --- a/tests/arthur/data/1.2/11_02.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - Everything here has a red background. - The rectangle is not filled, so the red background will show through - - - diff --git a/tests/arthur/data/1.2/11_03.svg b/tests/arthur/data/1.2/11_03.svg deleted file mode 100644 index 219d0759a7..0000000000 --- a/tests/arthur/data/1.2/11_03.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - The viewport has a yellow background. - The rectangle is filled and covers the viewport, so the yellow - background will only show through in the "leftovers" if the - aspect ratio of the viewport differs from thatof the viewBox. - - - diff --git a/tests/arthur/data/1.2/13_01.svg b/tests/arthur/data/1.2/13_01.svg deleted file mode 100644 index d7bba1fe78..0000000000 --- a/tests/arthur/data/1.2/13_01.svg +++ /dev/null @@ -1,20 +0,0 @@ - - - Example lingrad01 - fill a rectangle using a - linear gradient paint server - - - - - - - - - - - - - diff --git a/tests/arthur/data/1.2/13_02.svg b/tests/arthur/data/1.2/13_02.svg deleted file mode 100644 index e7d8b7fd9e..0000000000 --- a/tests/arthur/data/1.2/13_02.svg +++ /dev/null @@ -1,22 +0,0 @@ - - - Example radgrad01 - fill a rectangle by referencing a - radial gradient paint server - - - - - - - - - - - - - - diff --git a/tests/arthur/data/1.2/19_01.svg b/tests/arthur/data/1.2/19_01.svg deleted file mode 100644 index 794ba6f62a..0000000000 --- a/tests/arthur/data/1.2/19_01.svg +++ /dev/null @@ -1,51 +0,0 @@ - - - Example anim01 - demonstrate animation elements - - - - - - - - - - - - - It's alive! - - - - - - - - diff --git a/tests/arthur/data/1.2/19_02.svg b/tests/arthur/data/1.2/19_02.svg deleted file mode 100644 index 69c55d90c6..0000000000 --- a/tests/arthur/data/1.2/19_02.svg +++ /dev/null @@ -1,25 +0,0 @@ - - - Example animMotion01 - demonstrate motion animation computations - - - - - - - - - - - - - - diff --git a/tests/arthur/data/1.2/animation.svg b/tests/arthur/data/1.2/animation.svg deleted file mode 100644 index 7ae56bb3d9..0000000000 --- a/tests/arthur/data/1.2/animation.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/tests/arthur/data/1.2/cubic02.svg b/tests/arthur/data/1.2/cubic02.svg deleted file mode 100644 index 492bb72b8b..0000000000 --- a/tests/arthur/data/1.2/cubic02.svg +++ /dev/null @@ -1,77 +0,0 @@ - - - Example cubic02 - cubic Bezier commands in path data - Picture showing examples of "C" and "S" commands, - along with annotations showing the control points - and end points - - - - - - - - - - - - M100,200 C100,100 400,100 400,200 - - - - - - - - - - M100,500 C25,400 475,400 400,500 - - - - - - - - - - M100,800 C175,700 325,700 400,800 - - - - - - - - - - M600,200 C675,100 975,100 900,200 - - - - - - - - - - M600,500 C600,350 900,650 900,500 - - - - - - - - - - - - - - - M600,800 C625,700 725,700 750,800 - S875,900 900,800 - diff --git a/tests/arthur/data/1.2/fillrule-evenodd.svg b/tests/arthur/data/1.2/fillrule-evenodd.svg deleted file mode 100644 index 0fda125e41..0000000000 --- a/tests/arthur/data/1.2/fillrule-evenodd.svg +++ /dev/null @@ -1,38 +0,0 @@ - - - Example fillrule-evenodd - demonstrates fill-rule:evenodd - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tests/arthur/data/1.2/fillrule-nonzero.svg b/tests/arthur/data/1.2/fillrule-nonzero.svg deleted file mode 100644 index ea71864d76..0000000000 --- a/tests/arthur/data/1.2/fillrule-nonzero.svg +++ /dev/null @@ -1,38 +0,0 @@ - - - Example fillrule-nonzero - demonstrates fill-rule:nonzero - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tests/arthur/data/1.2/linecap.svg b/tests/arthur/data/1.2/linecap.svg deleted file mode 100644 index af0b82447e..0000000000 --- a/tests/arthur/data/1.2/linecap.svg +++ /dev/null @@ -1,32 +0,0 @@ - - - Example linecap - demonstrates three stroke-linecap values - - - - - - - - - - - - - 'butt' cap - - - - - - 'round' cap - - - - - - 'square' cap - - - diff --git a/tests/arthur/data/1.2/linejoin.svg b/tests/arthur/data/1.2/linejoin.svg deleted file mode 100644 index 265e733b95..0000000000 --- a/tests/arthur/data/1.2/linejoin.svg +++ /dev/null @@ -1,29 +0,0 @@ - - - Example linecap - demonstrates three stroke-linecap values - - - - - - - - - - 'miter' join - - - - - - 'round' join - - - - - - 'bevel' join - - - diff --git a/tests/arthur/data/1.2/media01.svg b/tests/arthur/data/1.2/media01.svg deleted file mode 100644 index 7c2a349319..0000000000 --- a/tests/arthur/data/1.2/media01.svg +++ /dev/null @@ -1,20 +0,0 @@ - - - - SVG audio example - - - - - - Press Me - - - - - \ No newline at end of file diff --git a/tests/arthur/data/1.2/media02.svg b/tests/arthur/data/1.2/media02.svg deleted file mode 100644 index 99fa8a0c43..0000000000 --- a/tests/arthur/data/1.2/media02.svg +++ /dev/null @@ -1,13 +0,0 @@ - - SVG 1.2 video example - - - - - - - diff --git a/tests/arthur/data/1.2/media03.svg b/tests/arthur/data/1.2/media03.svg deleted file mode 100644 index 2b3060bb12..0000000000 --- a/tests/arthur/data/1.2/media03.svg +++ /dev/null @@ -1,13 +0,0 @@ - - - Example of two animation elements pointing to the same content. - - - - - diff --git a/tests/arthur/data/1.2/media04.svg b/tests/arthur/data/1.2/media04.svg deleted file mode 100644 index 5c39652059..0000000000 --- a/tests/arthur/data/1.2/media04.svg +++ /dev/null @@ -1,24 +0,0 @@ - - Example of switching on the http://www.w3.org/TR/SVG12/feature#TransformedVideo feature string - - - - - - - - - - - - - - - diff --git a/tests/arthur/data/1.2/media05.svg b/tests/arthur/data/1.2/media05.svg deleted file mode 100644 index e890b02ea1..0000000000 --- a/tests/arthur/data/1.2/media05.svg +++ /dev/null @@ -1,27 +0,0 @@ - - - Example of switching on the http://www.w3.org/TR/SVG12/feature#ComposedVideo feature string - - - - - - - - - Composited title. - - - - - - Non-composited title. - - - diff --git a/tests/arthur/data/1.2/mpath01.svg b/tests/arthur/data/1.2/mpath01.svg deleted file mode 100644 index b77cea64ff..0000000000 --- a/tests/arthur/data/1.2/mpath01.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - mpath example - - - - - diff --git a/tests/arthur/data/1.2/non-scaling-stroke.svg b/tests/arthur/data/1.2/non-scaling-stroke.svg deleted file mode 100644 index fe6af38bd7..0000000000 --- a/tests/arthur/data/1.2/non-scaling-stroke.svg +++ /dev/null @@ -1,15 +0,0 @@ - - - Example non-scaling stroke - - - - - - - - - diff --git a/tests/arthur/data/1.2/noonoo.svg b/tests/arthur/data/1.2/noonoo.svg deleted file mode 100644 index 9e601bd075..0000000000 --- a/tests/arthur/data/1.2/noonoo.svg +++ /dev/null @@ -1,13 +0,0 @@ - - SVG 1.2 video example - - - - - - - diff --git a/tests/arthur/data/1.2/referencedRect.svg b/tests/arthur/data/1.2/referencedRect.svg deleted file mode 100644 index 67473aafab..0000000000 --- a/tests/arthur/data/1.2/referencedRect.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - diff --git a/tests/arthur/data/1.2/referencedRect2.svg b/tests/arthur/data/1.2/referencedRect2.svg deleted file mode 100644 index 383703f6d4..0000000000 --- a/tests/arthur/data/1.2/referencedRect2.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - diff --git a/tests/arthur/data/1.2/solidcolor.svg b/tests/arthur/data/1.2/solidcolor.svg deleted file mode 100644 index 0fc59bbdde..0000000000 --- a/tests/arthur/data/1.2/solidcolor.svg +++ /dev/null @@ -1,16 +0,0 @@ - - - <solidColor> Example - - - - - - - - - - A - - diff --git a/tests/arthur/data/1.2/textArea01.svg b/tests/arthur/data/1.2/textArea01.svg deleted file mode 100644 index 945c34c47f..0000000000 --- a/tests/arthur/data/1.2/textArea01.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - Basic textflow - - - diff --git a/tests/arthur/data/1.2/timed-lyrics.svg b/tests/arthur/data/1.2/timed-lyrics.svg deleted file mode 100644 index 715cd03836..0000000000 --- a/tests/arthur/data/1.2/timed-lyrics.svg +++ /dev/null @@ -1,22 +0,0 @@ - - - - - This document contains the textual lyrics to synchronize with some video content in the referencing document - - - This is some text - - simulating some lyrics - - displayed synchronously - - with some video - - in a different document - - - diff --git a/tests/arthur/data/1.2/use.svg b/tests/arthur/data/1.2/use.svg deleted file mode 100644 index ae0bce6129..0000000000 --- a/tests/arthur/data/1.2/use.svg +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tests/arthur/data/bugs/.gitattributes b/tests/arthur/data/bugs/.gitattributes deleted file mode 100644 index d159e22039..0000000000 --- a/tests/arthur/data/bugs/.gitattributes +++ /dev/null @@ -1,2 +0,0 @@ -openglcurve.svg -crlf -resolve_linear.svg -crlf diff --git a/tests/arthur/data/bugs/gradient-defaults.svg b/tests/arthur/data/bugs/gradient-defaults.svg deleted file mode 100644 index cae3f52c1c..0000000000 --- a/tests/arthur/data/bugs/gradient-defaults.svg +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - diff --git a/tests/arthur/data/bugs/gradient_pen_fill.svg b/tests/arthur/data/bugs/gradient_pen_fill.svg deleted file mode 100644 index 9a76f62149..0000000000 --- a/tests/arthur/data/bugs/gradient_pen_fill.svg +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tests/arthur/data/bugs/openglcurve.svg b/tests/arthur/data/bugs/openglcurve.svg deleted file mode 100644 index a0b43901e6..0000000000 --- a/tests/arthur/data/bugs/openglcurve.svg +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - diff --git a/tests/arthur/data/bugs/org_module.svg b/tests/arthur/data/bugs/org_module.svg deleted file mode 100644 index 44c90c9528..0000000000 --- a/tests/arthur/data/bugs/org_module.svg +++ /dev/null @@ -1,389 +0,0 @@ - - -]> - - - - -G -main overview -cluster1 - -Qt Library - -cluster1_01 - -QtCore.dll - -cluster1_02 - -QtGui.dll - -cluster2 - -about - -cluster2_01 - -about_dialog.hpp - -cluster2_02 - -ui_about_dialog.hpp - -cluster3 - -editor - -cluster3_01 - -docked_edits.hpp - -cluster3_02 - -tabbed_edits.hpp - -cluster3_03 - -editor_component.hpp - -cluster4 - -highlightner - -cluster4_01 - -hml_reader.hpp - -cluster4_02 - -language_builder.hpp - -cluster4_03 - -entity.hpp - -cluster4_04 - -highlightner.hpp - -cluster5 - -mainwindow - -cluster5_01 - -main_window.hpp - -cluster6 - -menubar_toolbar - -cluster6_01 - -actions.hpp - -cluster6_02 - -icons - -cluster6_02_001 - -icon_loader.hpp - -cluster6_02_002 - -ics_entity.hpp - -cluster6_02_003 - -ics_reader.hpp - -cluster7 - -main.cpp - - -QObject - -QObject - - -QAction - -QAction - - -QApplication - -QApplication - - -QDialog - -QDialog - - -QDockWidget - -QDockWidget - - -QIcon - -QIcon - - -QMainWindow - -QMainWindow - - -QTabWidget - -QTabWidget - - -QTextEdit - -QTextEdit - - -AboutDialog - -AboutDialog - - -AboutDialog->QDialog - - -inherits - - -Ui_AboutDialog - -Ui::AboutDialog - - -AboutDialog->Ui_AboutDialog - - -inherits - - -DockedEdits - -DockedEdits - - -DockedEdits->QDockWidget - - -inherits - - -TabbedEdits - -TabbedEdits - - -DockedEdits->TabbedEdits - - -uses - - -TabbedEdits->QTabWidget - - -inherits - - -EditorComponent - -EditorComponent - - -TabbedEdits->EditorComponent - - -uses - - -EditorComponent->QTextEdit - - -inherits - - -HmlReader - -HmlReader - - -HmlReader->QObject - - -inherits - - -Entity - -Entity - - -HmlReader->Entity - - -uses - - -LanguageBuilder - -LanguageBuilder - - -LanguageBuilder->HmlReader - - -uses - - -LanguageBuilder->Entity - - -uses - - -Highlightner - -Highlightner - - -LanguageBuilder->Highlightner - - -creates - - -Highlightner->QObject - - -inherits - - -MainWindow - -MainWindow - - -MainWindow->QMainWindow - - -inherits - - -MainWindow->AboutDialog - - -uses - - -MainWindow->DockedEdits - - -uses - - -Actions - -Actions - - -MainWindow->Actions - - -uses - - -Actions->QObject - - -inherits - - -Actions->QAction - - -uses - - -IconLoader - -IconLoader - - -IconLoader->QObject - - -inherits - - -IconLoader->QIcon - - -uses - - -IcsReader - -IcsReader - - -IconLoader->IcsReader - - -uses - - -IcsEntity - -IcsEntity - - -IcsReader->QObject - - -inherits - - -IcsReader->IcsEntity - - -uses - - -main - -main - - -main->QApplication - - -uses - - -main->MainWindow - - -uses - - - - diff --git a/tests/arthur/data/bugs/resolve_linear.svg b/tests/arthur/data/bugs/resolve_linear.svg deleted file mode 100644 index c1769b2b5f..0000000000 --- a/tests/arthur/data/bugs/resolve_linear.svg +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - diff --git a/tests/arthur/data/bugs/resolve_radial.svg b/tests/arthur/data/bugs/resolve_radial.svg deleted file mode 100644 index 49fb0f8c3b..0000000000 --- a/tests/arthur/data/bugs/resolve_radial.svg +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - diff --git a/tests/arthur/data/bugs/text_pens.svg b/tests/arthur/data/bugs/text_pens.svg deleted file mode 100644 index 3f7c9eb784..0000000000 --- a/tests/arthur/data/bugs/text_pens.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - Text should be drawn in black - Text should be drawn in red - Text should not be drawn at all - diff --git a/tests/arthur/data/framework.ini b/tests/arthur/data/framework.ini deleted file mode 100644 index d90d1c6a6a..0000000000 --- a/tests/arthur/data/framework.ini +++ /dev/null @@ -1,22 +0,0 @@ -[Blacklist] -PS=gearflowers.svg, kde-look.svg - -[1.1] -dir=1.1 -reference=http://www.w3.org/Graphics/SVG/Test/20030813/png/ -referencePrefix=full- - -[1.2] -dir=1.2 - -[bugs] -dir=bugs - -[qps] -dir=qps - -[random] -dir=random - -[oxygen] -dir=oxygen diff --git a/tests/arthur/data/images/alpha.png b/tests/arthur/data/images/alpha.png deleted file mode 100644 index e465b2586d..0000000000 Binary files a/tests/arthur/data/images/alpha.png and /dev/null differ diff --git a/tests/arthur/data/images/bitmap.png b/tests/arthur/data/images/bitmap.png deleted file mode 100644 index d21f8f51bb..0000000000 Binary files a/tests/arthur/data/images/bitmap.png and /dev/null differ diff --git a/tests/arthur/data/images/border.png b/tests/arthur/data/images/border.png deleted file mode 100644 index a3d2fed0a3..0000000000 Binary files a/tests/arthur/data/images/border.png and /dev/null differ diff --git a/tests/arthur/data/images/dome_argb32.png b/tests/arthur/data/images/dome_argb32.png deleted file mode 100644 index e3ccba0c13..0000000000 Binary files a/tests/arthur/data/images/dome_argb32.png and /dev/null differ diff --git a/tests/arthur/data/images/dome_indexed.png b/tests/arthur/data/images/dome_indexed.png deleted file mode 100644 index beefcd514e..0000000000 Binary files a/tests/arthur/data/images/dome_indexed.png and /dev/null differ diff --git a/tests/arthur/data/images/dome_indexed_mask.png b/tests/arthur/data/images/dome_indexed_mask.png deleted file mode 100644 index a62f29f40e..0000000000 Binary files a/tests/arthur/data/images/dome_indexed_mask.png and /dev/null differ diff --git a/tests/arthur/data/images/dome_mono.png b/tests/arthur/data/images/dome_mono.png deleted file mode 100644 index 950c2a7494..0000000000 Binary files a/tests/arthur/data/images/dome_mono.png and /dev/null differ diff --git a/tests/arthur/data/images/dome_mono_128.png b/tests/arthur/data/images/dome_mono_128.png deleted file mode 100644 index 77e48aaab7..0000000000 Binary files a/tests/arthur/data/images/dome_mono_128.png and /dev/null differ diff --git a/tests/arthur/data/images/dome_mono_palette.png b/tests/arthur/data/images/dome_mono_palette.png deleted file mode 100644 index dca3f59245..0000000000 Binary files a/tests/arthur/data/images/dome_mono_palette.png and /dev/null differ diff --git a/tests/arthur/data/images/dome_rgb32.png b/tests/arthur/data/images/dome_rgb32.png deleted file mode 100644 index 27bc02a545..0000000000 Binary files a/tests/arthur/data/images/dome_rgb32.png and /dev/null differ diff --git a/tests/arthur/data/images/dot.png b/tests/arthur/data/images/dot.png deleted file mode 100644 index 17a7b6a0ba..0000000000 Binary files a/tests/arthur/data/images/dot.png and /dev/null differ diff --git a/tests/arthur/data/images/face.png b/tests/arthur/data/images/face.png deleted file mode 100644 index 4f6172d83b..0000000000 Binary files a/tests/arthur/data/images/face.png and /dev/null differ diff --git a/tests/arthur/data/images/gam030.png b/tests/arthur/data/images/gam030.png deleted file mode 100644 index 904c9721bd..0000000000 Binary files a/tests/arthur/data/images/gam030.png and /dev/null differ diff --git a/tests/arthur/data/images/gam045.png b/tests/arthur/data/images/gam045.png deleted file mode 100644 index b649a8a54f..0000000000 Binary files a/tests/arthur/data/images/gam045.png and /dev/null differ diff --git a/tests/arthur/data/images/gam056.png b/tests/arthur/data/images/gam056.png deleted file mode 100644 index e5f959dc96..0000000000 Binary files a/tests/arthur/data/images/gam056.png and /dev/null differ diff --git a/tests/arthur/data/images/gam100.png b/tests/arthur/data/images/gam100.png deleted file mode 100644 index 6c7ba5f1ed..0000000000 Binary files a/tests/arthur/data/images/gam100.png and /dev/null differ diff --git a/tests/arthur/data/images/gam200.png b/tests/arthur/data/images/gam200.png deleted file mode 100644 index daa20fcbc4..0000000000 Binary files a/tests/arthur/data/images/gam200.png and /dev/null differ diff --git a/tests/arthur/data/images/image.png b/tests/arthur/data/images/image.png deleted file mode 100644 index 85d486a790..0000000000 Binary files a/tests/arthur/data/images/image.png and /dev/null differ diff --git a/tests/arthur/data/images/mask.png b/tests/arthur/data/images/mask.png deleted file mode 100644 index c3f3b1b6ca..0000000000 Binary files a/tests/arthur/data/images/mask.png and /dev/null differ diff --git a/tests/arthur/data/images/mask_100.png b/tests/arthur/data/images/mask_100.png deleted file mode 100644 index fc950dc7ed..0000000000 Binary files a/tests/arthur/data/images/mask_100.png and /dev/null differ diff --git a/tests/arthur/data/images/masked.png b/tests/arthur/data/images/masked.png deleted file mode 100644 index 6debec534d..0000000000 Binary files a/tests/arthur/data/images/masked.png and /dev/null differ diff --git a/tests/arthur/data/images/paths.qps b/tests/arthur/data/images/paths.qps deleted file mode 100644 index 414b1628a2..0000000000 --- a/tests/arthur/data/images/paths.qps +++ /dev/null @@ -1,32 +0,0 @@ -setPen black -setBrush 7f7fff - -path_moveTo star 50 0 -path_lineTo star 30 90 -path_lineTo star 100 60 -path_lineTo star 0 20 -path_lineTo star 80 100 - -setFont "times" 50 -path_addText text 0 50 "ABCD, 1234, abcd, #¤%&" - -path_addRect rectncircle 0 0 75 75 -path_addEllipse rectncircle 25 25 75 75 -path_setFillRule rectncircle winding - -path_moveTo curve 100 0 -path_cubicTo curve 100 100 50 50 0 100 - -begin_block drawing -drawPath star -translate 100 0 -drawPath rectncircle -translate 100 0 -drawPath curve -translate -200 100 -drawPath text -end_block - -translate 50 100 -rotate 10 -repeat_block drawing \ No newline at end of file diff --git a/tests/arthur/data/images/pens.qps b/tests/arthur/data/images/pens.qps deleted file mode 100644 index e73b15f982..0000000000 --- a/tests/arthur/data/images/pens.qps +++ /dev/null @@ -1,96 +0,0 @@ -translate 10 10 - -begin_block penstyles -setPen black 0 solidline flatcap -drawLine 0 0 100 0 -setPen black 0 dashline flatcap -drawLine 100 0 100 40 -setPen black 0 dotline flatcap -drawLine 100 40 200 0 -setPen black 0 dashdotline flatcap -drawLine 200 0 300 0 -setPen black 0 dashdotdotline flatcap -drawLine 300 0 400 40 - -translate 0 50 -setPen blue 2 solidline flatcap -drawLine 0 0 100 0 -setPen blue 2 dashline flatcap -drawLine 100 0 100 40 -setPen blue 2 dotline flatcap -drawLine 100 40 200 0 -setPen blue 2 dashdotline flatcap -drawLine 200 0 300 0 -setPen blue 2 dashdotdotline flatcap -drawLine 300 0 400 40 - -translate 0 50 -setPen red 5 solidline flatcap -drawLine 0 0 100 0 -setPen red 5 dashline flatcap -drawLine 100 0 100 40 -setPen red 5 dotline flatcap -drawLine 100 40 200 0 -setPen red 5 dashdotline flatcap -drawLine 200 0 300 0 -setPen red 5 dashdotdotline flatcap -drawLine 300 0 400 40 -end_block - -translate 0 50 -scale 1 2 -repeat_block penstyles - - -# Test cap styles -resetMatrix -translate 420 10 -setPen green 5 dashdotline flatcap -drawLine 0 0 200 0 -setPen green 5 dashdotline roundcap -drawLine 0 20 200 20 -setPen green 5 dashdotline squarecap -drawLine 0 40 200 40 - - -# Test join styles -resetMatrix -translate 420 80 -setBrush nobrush -begin_block joinstyles -setPen orange 10 solidline flatcap miterjoin -drawPolyline [ 0 0 80 0 80 80 0 80 ] - -translate 0 100 -setPen aquamarine 10 solidline squarecap beveljoin -drawPolyline [ 0 0 80 0 80 80 0 80 ] - -translate 0 100 -setPen purple 10 solidline roundcap roundjoin -drawPolyline [ 0 0 80 0 80 80 0 80 ] -end_block - -translate 130 -200 -scale 2 1 -rotate 1 -repeat_block joinstyles - -# transparent lines -resetMatrix -translate 10 400 -setPen #7f000000 -drawLine 0 0 50 0 -setPen #7f000000 1 SolidLine -drawLine 0 10 50 10 -setPen #7f000000 5 SolidLine -drawLine 0 20 50 20 -setPen #7f000000 10 SolidLine -drawLine 0 30 50 30 -setPen #7f000000 -drawLine 0 0 0 50 -setPen #7f000000 1 SolidLine -drawLine 10 0 10 50 -setPen #7f000000 5 SolidLine -drawLine 20 0 20 50 -setPen #7f000000 10 SolidLine -drawLine 30 0 30 50 diff --git a/tests/arthur/data/images/sign.png b/tests/arthur/data/images/sign.png deleted file mode 100644 index 6aac7e150a..0000000000 Binary files a/tests/arthur/data/images/sign.png and /dev/null differ diff --git a/tests/arthur/data/images/solid.png b/tests/arthur/data/images/solid.png deleted file mode 100644 index 371e9c1aee..0000000000 Binary files a/tests/arthur/data/images/solid.png and /dev/null differ diff --git a/tests/arthur/data/images/struct-image-01.jpg b/tests/arthur/data/images/struct-image-01.jpg deleted file mode 100644 index a74e07223b..0000000000 Binary files a/tests/arthur/data/images/struct-image-01.jpg and /dev/null differ diff --git a/tests/arthur/data/images/struct-image-01.png b/tests/arthur/data/images/struct-image-01.png deleted file mode 100644 index 4ed08406dc..0000000000 Binary files a/tests/arthur/data/images/struct-image-01.png and /dev/null differ diff --git a/tests/arthur/data/qps/aliasing.qps b/tests/arthur/data/qps/aliasing.qps deleted file mode 100644 index 59878f9c4d..0000000000 --- a/tests/arthur/data/qps/aliasing.qps +++ /dev/null @@ -1,156 +0,0 @@ - -path_moveTo convexPath 25 0 -path_lineTo convexPath 50 50 -path_lineTo convexPath 25 25 -path_lineTo convexPath 0 50 -path_closeSubpath convexPath - -pixmap_load border.png pixmap - -setRenderHint LineAntialiasing false -translate 10 10 - -begin_block drawing - setPen black 1 - setBrush 7f7fff - drawPath convexPath - - setFont "monospace" 8 - setPen black - drawText 0 68 "QwErTy@" - - - setPen black 1 - setBrush 7f7fff - drawRect 0 80 10 5 - - setPen black 1 - setBrush noBrush - drawRect 20 80 10 5 - - setPen noPen - setBrush 7f7fff - drawRect 40 80 10 5 - - - setPen black 2 - setBrush 7f7fff - drawRect 0 90 10 5 - - setPen black 2 - setBrush noBrush - drawRect 20 90 10 5 - - setPen noPen - setBrush 7f7fff - drawRect 40 90 10 5 - - - setPen black 3 - setBrush 7f7fff - drawRect 0 100 10 5 - - setPen black 3 - setBrush noBrush - drawRect 20 100 10 5 - - setPen noPen - setBrush 7f7fff - drawRect 40 100 10 5 - - - setPen black 1 - setBrush noBrush - drawLine 10 110 20 120 - drawLine 30 120 40 110 - - setPen black 2 - setBrush noBrush - drawLine 10 120 20 130 - drawLine 30 130 40 120 - - setPen black 3 - setBrush noBrush - drawLine 10 130 20 140 - drawLine 30 140 40 130 - - drawPixmap pixmap 0 150 - - setRenderHint SmoothPixmapTransform false - drawPixmap pixmap 20 150 15 15 0 0 10 10 - -end_block - -translate 0 180 -setRenderHint LineAntialiasing true -repeat_block drawing -drawText 15 185 "0.0" - -resetMatrix -translate 70.2 10.2 -setRenderHint LineAntialiasing false -repeat_block drawing -translate 0 180 -setRenderHint LineAntialiasing true -repeat_block drawing -translate -0.2 -0.2 -drawText 15 185 "0.2" - - -resetMatrix -translate 130.4 10.4 -setRenderHint LineAntialiasing false -repeat_block drawing -translate 0 180 -setRenderHint LineAntialiasing true -repeat_block drawing -translate -0.4 -0.4 -drawText 15 185 "0.4" - - -resetMatrix -translate 190.5 10.5 -setRenderHint LineAntialiasing false -repeat_block drawing -translate 0 180 -setRenderHint LineAntialiasing true -repeat_block drawing -translate -0.5 -0.5 -drawText 15 185 "0.5" - - -resetMatrix -translate 250.6 10.6 -setRenderHint LineAntialiasing false -repeat_block drawing -translate 0 180 -setRenderHint LineAntialiasing true -repeat_block drawing -translate -0.6 -0.6 -drawText 15 185 "0.6" - - -resetMatrix -translate 310.8 10.8 -setRenderHint LineAntialiasing false -repeat_block drawing -translate 0 180 -setRenderHint LineAntialiasing true -repeat_block drawing -translate -0.8 -0.8 -drawText 15 185 "0.8" - - -resetMatrix -translate 371 11 -setRenderHint LineAntialiasing false -repeat_block drawing -translate 0 180 -setRenderHint LineAntialiasing true -repeat_block drawing -drawText 15 185 "1.0" - - -resetMatrix -drawText 430 95 "Aliased" -drawText 430 275 "Anti-Aliased" \ No newline at end of file diff --git a/tests/arthur/data/qps/aliasing_qps.png b/tests/arthur/data/qps/aliasing_qps.png deleted file mode 100644 index 183129b5e7..0000000000 Binary files a/tests/arthur/data/qps/aliasing_qps.png and /dev/null differ diff --git a/tests/arthur/data/qps/alphas.qps b/tests/arthur/data/qps/alphas.qps deleted file mode 100644 index 2f72d56203..0000000000 --- a/tests/arthur/data/qps/alphas.qps +++ /dev/null @@ -1,63 +0,0 @@ -# Background --[ start ]--------------- -setPen NoPen - -# Red alpha rect -setBrush #7fff0000 -drawRect 0 0 200 900 -drawRect 400 0 200 900 - -# Blue alpha rect -setBrush #7f0000ff -drawRect 200 0 200 900 -drawRect 600 0 200 900 - - - -# Normal ---------------------------------------- -setBrush #ffff00ff -setPen #ff00ff00 8 SolidLine flatcap miterjoin - -path_moveTo star 100 510 -path_lineTo star 30 590 -path_lineTo star 180 530 -path_lineTo star 20 530 -path_lineTo star 170 590 - -begin_block allItems -drawLine 0 10 200 10 -drawRect 10 50 180 40 -drawEllipse 50 150 100 50 -drawPolygon [ 10 230 50 210 50 280 100 280 150 230 180 280] winding -drawPolyline [ 85 380 50 310 50 360 100 360 150 310 180 360] -drawRoundRect 10 400 80 100 100 100 -drawRoundRect 110 400 80 100 50 50 -drawPath star - -drawPixmap solid.png 10 600 50 50 -drawPixmap alpha.png 10 675 50 50 -drawPixmap masked.png 10 750 50 50 -drawTiledPixmap solid.png 110 600 80 75 80 90 -drawTiledPixmap alpha.png 110 675 80 75 80 90 -drawTiledPixmap masked.png 110 750 80 75 80 90 -end_block - - -# Normal 2nd Quad ------------------------------- -setBrush #ffff00ff -setPen #ff00ff00 10 SolidLine roundcap roundjoin -translate 200 0 -repeat_block allItems - - -# Alpha ----------------------------------------- -setBrush #80ff00ff -setPen #8000ff00 10 SolidLine flatcap miterjoin -translate 200 0 -repeat_block allItems - - -# Alpha 2nd Quad -------------------------------- -setBrush #80ff00ff -setPen #8000ff00 10 SolidLine roundcap roundjoin -translate 200 0 -repeat_block allItems diff --git a/tests/arthur/data/qps/alphas_qps.png b/tests/arthur/data/qps/alphas_qps.png deleted file mode 100644 index 332922a117..0000000000 Binary files a/tests/arthur/data/qps/alphas_qps.png and /dev/null differ diff --git a/tests/arthur/data/qps/arcs.qps b/tests/arthur/data/qps/arcs.qps deleted file mode 100644 index 855c6456d3..0000000000 --- a/tests/arthur/data/qps/arcs.qps +++ /dev/null @@ -1,65 +0,0 @@ -setRenderHint LineAntialiasing - -setPen red - -drawEllipse 0 0 600 400 - -path_moveTo arcs 300 200 -path_arcTo arcs 0 0 600 400 0 10 -path_closeSubpath arcs - -path_moveTo arcs 300 200 -path_arcTo arcs 0 0 600 400 20 30 -path_closeSubpath arcs - -path_moveTo arcs 300 200 -path_arcTo arcs 0 0 600 400 60 45 -path_closeSubpath arcs - -path_moveTo arcs 300 200 -path_arcTo arcs 0 0 600 400 115 60 -path_closeSubpath arcs - -path_moveTo arcs 300 200 -path_arcTo arcs 0 0 600 400 180 90 -path_closeSubpath arcs - -path_moveTo arcs 590 200 -path_arcTo arcs 10 10 580 380 0 360 -path_closeSubpath arcs - -path_moveTo arcs 300 200 -path_arcTo arcs 20 20 560 360 0 -10 -path_closeSubpath arcs - -path_moveTo arcs 300 200 -path_arcTo arcs 20 20 560 360 -20 -30 -path_closeSubpath arcs - -path_moveTo arcs 300 200 -path_arcTo arcs 20 20 560 360 -60 -45 -path_closeSubpath arcs - -path_moveTo arcs 300 200 -path_arcTo arcs 20 20 560 360 -115 -60 -path_closeSubpath arcs - -path_moveTo arcs 300 200 -path_arcTo arcs 20 20 560 360 -180 -90 -path_closeSubpath arcs - -setPen black 1 solidline -setBrush #3f00ff00 -drawPath arcs - -# Then again with a matrix set... -translate 200 400 -rotate 10 -scale 0.5 0.5 -setPen red -setBrush nobrush -drawEllipse 0 0 600 400 - -setPen black 1 solidline -setBrush #3f0000ff -drawPath arcs \ No newline at end of file diff --git a/tests/arthur/data/qps/arcs2.qps b/tests/arthur/data/qps/arcs2.qps deleted file mode 100644 index a2227b6129..0000000000 --- a/tests/arthur/data/qps/arcs2.qps +++ /dev/null @@ -1,44 +0,0 @@ -drawArc 100 100 100 100 0 1440 -drawArc 100 100 100 100 1440 1440 -drawArc 100 100 100 100 2880 1440 -drawArc 100 100 100 100 4320 1440 - -drawArc 100 200 100 100 0 -1440 -drawArc 100 200 100 100 -1440 -1440 -drawArc 100 200 100 100 -2880 -1440 -drawArc 100 200 100 100 -4320 -1440 - -drawArc 200 100 100 100 720 1440 -drawArc 200 100 100 100 2160 1440 -drawArc 200 100 100 100 3600 1440 -drawArc 200 100 100 100 5040 1440 - -drawArc 200 200 100 100 -720 -1440 -drawArc 200 200 100 100 -2160 -1440 -drawArc 200 200 100 100 -3600 -1440 -drawArc 200 200 100 100 -5040 -1440 - - -drawArc 300 100 100 100 3840 480 -drawArc 300 200 100 100 -3840 -480 - -drawArc 300 100 100 100 1600 1340 - -setPen black -drawArc 400 100 200 200 0 5760 -setPen white -drawArc 400 100 200 200 960 960 -drawArc 400 100 200 200 2880 960 -drawArc 400 100 200 200 4800 960 - -setPen black -drawArc 100 350 300 300 160 5760 -drawArc 100 350 300 300 320 5760 -drawArc 100 350 300 300 1920 5760 -drawArc 100 350 300 300 2080 5760 -drawArc 100 350 300 300 3680 5760 -drawArc 100 350 300 300 3840 5760 -drawArc 100 350 300 300 5440 5760 -drawArc 100 350 300 300 5600 5760 -setPen white -drawArc 100 350 300 300 0 5760 diff --git a/tests/arthur/data/qps/arcs2_qps.png b/tests/arthur/data/qps/arcs2_qps.png deleted file mode 100644 index 2c51aadaa9..0000000000 Binary files a/tests/arthur/data/qps/arcs2_qps.png and /dev/null differ diff --git a/tests/arthur/data/qps/arcs_qps.png b/tests/arthur/data/qps/arcs_qps.png deleted file mode 100644 index 7f4d889ba3..0000000000 Binary files a/tests/arthur/data/qps/arcs_qps.png and /dev/null differ diff --git a/tests/arthur/data/qps/background.qps b/tests/arthur/data/qps/background.qps deleted file mode 100644 index 3ea7b32798..0000000000 --- a/tests/arthur/data/qps/background.qps +++ /dev/null @@ -1,133 +0,0 @@ -translate 10 30 -setBackground 7f7fff -setBackgroundMode Transparent -setPen ff7f7f - -path_moveTo path 0 0 -path_lineTo path 25 0 -path_cubicTo path 50 0 25 25 25 50 -path_lineTo path 0 50 - -bitmap_load bitmap.png bitmap - -begin_block drawing - save - drawRect 0 0 50 50 - - translate 60 0 - drawEllipse 0 0 50 50 - - translate 60 0 - drawPolygon [0 0 50 0 25 50 25 25] - - translate 60 0 - drawPath path - - translate 60 0 - drawPie 0 0 50 50 1440 2000 - - translate 60 0 - drawChord 0 0 50 50 1440 2000 - - translate 60 0 - drawLine 0 0 50 0 - drawLine 0 0 50 50 - drawLine 0 0 0 50 - - translate 60 0 - drawPolyline [0 0 50 0 25 50 25 25] - - translate 60 0 - drawArc 0 0 50 50 1440 2000 - - translate 60 0 - drawText 0 10 "Jambi-Bambi" - - translate 80 0 - drawPixmap bitmap 0 0 - restore - - save - setRenderHint Antialiasing - translate 5 55 - drawRect 0 0 50 50 - - translate 60 0 - drawEllipse 0 0 50 50 - - translate 60 0 - drawPolygon [0 0 50 0 25 50 25 25] - - translate 60 0 - drawPath path - - translate 60 0 - drawPie 0 0 50 50 1440 2000 - - translate 60 0 - drawChord 0 0 50 50 1440 2000 - - translate 60 0 - drawLine 0 0 50 0 - drawLine 0 0 50 50 - drawLine 0 0 0 50 - - translate 60 0 - drawPolyline [0 0 50 0 25 50 25 25] - - translate 60 0 - drawArc 0 0 50 50 1440 2000 - - translate 60 0 - drawText 0 10 "Jambi-Bambi" - - translate 80 0 - drawPixmap bitmap 0 0 - restore -end_block - -translate 0 160 -setBackgroundMode Transparent -setPen ff7f7f 0 dotline flatcap beveljoin -repeat_block drawing - -translate 0 160 -setBackgroundMode Opaque -setPen ff7f7f 0 dotline flatcap beveljoin -repeat_block drawing - -translate 0 160 -setBackgroundMode Transparent -setPen ff7f7f 4 dashline flatcap beveljoin -repeat_block drawing - -translate 0 160 -setBackgroundMode OpaqueMode -setPen ff7f7f 4 dashline flatcap beveljoin -repeat_block drawing - -resetMatrix - -translate 5 5 - -setBrush nobrush -setPen black -setBackgroundMode transparent -drawText 10 15 "TransparentMode with solid 0-width pen" -drawRect 0 0 685 135 - -translate 0 160 -drawText 10 15 "TransparentMode with dotted 0-width pen" -drawRect 0 0 685 135 - -translate 0 160 -drawText 10 15 "OpaqueMode with dotted 0-width pen" -drawRect 0 0 685 135 - -translate 0 160 -drawText 10 15 "TransparentMode with dotted 4-width pen" -drawRect 0 0 685 135 - -translate 0 160 -drawText 10 15 "OpaqueMode with solid 4-width pen" -drawRect 0 0 685 135 diff --git a/tests/arthur/data/qps/background_brush.qps b/tests/arthur/data/qps/background_brush.qps deleted file mode 100644 index e542b0670b..0000000000 --- a/tests/arthur/data/qps/background_brush.qps +++ /dev/null @@ -1,2 +0,0 @@ -setBrush #00ff00 crosspattern -import "background.qps" \ No newline at end of file diff --git a/tests/arthur/data/qps/background_brush_qps.png b/tests/arthur/data/qps/background_brush_qps.png deleted file mode 100644 index d16dfcc1e1..0000000000 Binary files a/tests/arthur/data/qps/background_brush_qps.png and /dev/null differ diff --git a/tests/arthur/data/qps/background_qps.png b/tests/arthur/data/qps/background_qps.png deleted file mode 100644 index bcd4703b86..0000000000 Binary files a/tests/arthur/data/qps/background_qps.png and /dev/null differ diff --git a/tests/arthur/data/qps/beziers.qps b/tests/arthur/data/qps/beziers.qps deleted file mode 100644 index 7bd7ef976d..0000000000 --- a/tests/arthur/data/qps/beziers.qps +++ /dev/null @@ -1,144 +0,0 @@ - -setRenderHint LineAntialiasing - -translate 20 20 -path_moveTo fullSize 0 0 -path_cubicTo fullSize 200 100 -100 100 100 0 - -path_moveTo fullSize 0 200 -path_cubicTo fullSize 0 100 100 100 100 200 - -path_moveTo fullSize 0 250 -path_cubicTo fullSize 50 200 50 200 100 250 -drawPath fullSize - -translate 110 0 -scale 10 10 -path_moveTo medSize 0 0 -path_cubicTo medSize 20 10 -10 10 10 0 - -path_moveTo medSize 0 20 -path_cubicTo medSize 0 10 10 10 10 20 - -path_moveTo medSize 0 25 -path_cubicTo medSize 5 20 5 20 10 25 -drawPath medSize - -resetMatrix -translate 240 20 -scale 100 100 -path_moveTo smallSize 0 0 -path_cubicTo smallSize 2 1 -1 1 1 0 - -path_moveTo smallSize 0 2 -path_cubicTo smallSize 0 1 1 1 1 2 - -path_moveTo smallSize 0 2.5 -path_cubicTo smallSize 0.5 2 0.5 2 1 2.5 -drawPath smallSize - -resetMatrix -translate 20 300 -drawPath medSize - -resetMatrix -translate 250 -100 -path_moveTo maxSize 0 500 -path_cubicTo maxSize 1000 0 -500 0 500 500 -drawPath maxSize - -setRenderHint Antialiasing off -resetMatrix - -path_moveTo path1 0 0 -path_cubicTo path1 10 10 0 10 10 0 - -path_moveTo path2 0 0 -path_cubicTo path2 15 15 -5 15 10 0 - -path_moveTo path3 0 0 -path_cubicTo path3 20 20 -10 20 10 0 - -path_moveTo path4 0 0 -path_cubicTo path4 0 5 10 10 0 15 - -path_moveTo path5 0 10 -path_cubicTo path5 10 10 -10 20 0 0 - -path_moveTo path6 0 0 -path_cubicTo path6 10 5 -10 10 0 15 - -setPen black 2 -setBrush nobrush - -translate 10 500 -scale 3 3 -begin_block paths -save -drawPath path1 -translate 20 0 -drawPath path2 -translate 20 0 -drawPath path3 -translate 20 0 -drawPath path4 -translate 20 0 -drawPath path5 -translate 20 0 -drawPath path6 -restore -end_block - -setPen nopen -setBrush black - -translate 0 20 -repeat_block paths - -setRenderHint Antialiasing - -setPen black 2 -setBrush nobrush - -translate 120 -20 -repeat_block paths - -setPen nopen -setBrush black - -translate 0 20 -repeat_block paths - -resetMatrix -path_moveTo miterPath 20 0 -path_cubicTo miterPath 20 20 0 0 1 0 -path_lineTo miterPath -1 -0.2 - -setBrush nobrush - -translate 50 660 -scale 5 5 - -setPen black 4 solidline flatcap miterjoin -drawPath miterPath -setPen red 0 -drawPath miterPath - -path_moveTo miterPath2 21 0.2 -path_lineTo miterPath2 19 0 -path_cubicTo miterPath2 20 0 0 20 0 0 - -translate 30 0 -setPen black 4 solidline flatcap miterjoin -drawPath miterPath2 -setPen red 0 -drawPath miterPath2 - -path_moveTo wonkyPath 0 0 -path_cubicTo wonkyPath 5 15 20 0 17 0 - -translate 30 0 -setPen black 4 solidline flatcap miterjoin -drawPath wonkyPath -setPen red 0 -drawPath wonkyPath diff --git a/tests/arthur/data/qps/beziers_qps.png b/tests/arthur/data/qps/beziers_qps.png deleted file mode 100644 index 4fb1154f33..0000000000 Binary files a/tests/arthur/data/qps/beziers_qps.png and /dev/null differ diff --git a/tests/arthur/data/qps/bitmaps.qps b/tests/arthur/data/qps/bitmaps.qps deleted file mode 100644 index 120242a637..0000000000 --- a/tests/arthur/data/qps/bitmaps.qps +++ /dev/null @@ -1,163 +0,0 @@ - -#setRenderHint SmoothPixmapTransform - -translate 10 50 -setBackground ff7f7f -setPen 3f3f9f - -bitmap_load dome_mono.png the_pixmap - -save - # Draw with opaque pen/bg in transparent/opaque mode - setBackgroundMode Transparent - drawPixmap the_pixmap 0 0 - setBackgroundMode Opaque - drawPixmap the_pixmap 110 0 - - translate 220 0 - - # Draw with alpha pen/bg in transparent/opaque mode - save - setBackground 7fff7f7f - setPen 7f3f3f9f - setBackgroundMode Transparent - drawPixmap the_pixmap 0 0 - setBackgroundMode Opaque - drawPixmap the_pixmap 110 0 - restore - - translate 220 0 - - # Draw with rotated opaque pen/bg in transparent/opaque mode - setBackgroundMode Transparent - save - translate 50 50 - rotate 10 - translate -50 -50 - drawPixmap the_pixmap 0 0 - restore - setBackgroundMode Opaque - translate 110 0 - save - translate 50 50 - rotate 10 - translate -50 -50 - drawPixmap the_pixmap 0 0 - restore -restore - -translate 0 150 - -save - setBackgroundMode Transparent - drawTiledPixmap the_pixmap 0 0 200 100 - setBackgroundMode Opaque - drawTiledPixmap the_pixmap 210 0 200 100 - - translate 440 -10 - save - rotate 10 - drawTiledPixmap the_pixmap 0 0 200 100 - restore -restore - -translate 0 150 -save - setBackgroundMode Transparent - drawTiledPixmap the_pixmap 0 0 200 100 10 20 - setBackgroundMode Opaque - drawTiledPixmap the_pixmap 210 0 200 100 10 20 - - translate 440 -10 - save - rotate 10 - drawTiledPixmap the_pixmap 0 0 200 100 10 20 - restore -restore - - -pixmap_setMask the_pixmap mask_100.png -drawPixmap the_pixmap 0 150 -setBackgroundMode Opaque -drawPixmap the_pixmap 110 150 - -translate 220 150 -save - translate 50 50 - rotate 10 - translate -50 -50 - setBackgroundMode Transparent - drawPixmap the_pixmap 0 0 -restore - -translate 110 0 -save - translate 50 50 - rotate 10 - translate -50 -50 - setBackgroundMode Opaque - drawPixmap the_pixmap 0 0 -restore - -resetMatrix -translate 10 650 -bitmap_load dome_mono.png the_bitmap -setBackgroundMode Transparent - -begin_block draw_subrected - drawPixmap the_bitmap 0 0 50 50 0 0 50 50 - drawPixmap the_bitmap 50 0 50 50 50 0 50 50 - drawPixmap the_bitmap 0 50 50 50 0 50 50 50 - drawPixmap the_bitmap 50 50 50 50 50 50 50 50 -end_block - -translate 110 0 -setBackgroundMode Opaque -repeat_block draw_subrected - -translate 110 0 -save - translate 20 -10 - rotate 10 - setBackgroundMode Transparent - repeat_block draw_subrected -restore - -translate 110 0 -save - translate 20 -10 - rotate 10 - setBackgroundMode Opaque - repeat_block draw_subrected -restore - -# Some helpful texts - -resetMatrix -setPen black -drawText 10 40 "Transparent" -drawText 120 40 "Opaque" -drawText 230 40 "Trans w/alpha" -drawText 340 40 "Opaque w/alpha" -drawText 450 40 "Trans w/xform" -drawText 560 40 "Opaque w/xform" - -drawText 10 190 "Transparent tiled" -drawText 220 190 "Opaque tiled" -drawText 440 190 "Opaque w/xform" - -drawText 10 340 "Transparent tiled w/offset" -drawText 220 340 "Opaque tiled w/offset" -drawText 440 340 "Opaque w/xform w/offset" - -drawText 10 490 "Trans masked" -drawText 120 490 "Opaque masked" -drawText 230 490 "masked w/xform" -drawText 340 490 "masked w/xform" - -drawText 10 640 "Subrected" -drawText 110 640 "Subrected opaque" -drawText 220 640 "subrect w/xform" -drawText 330 640 "subrect w/xform opaque" - - diff --git a/tests/arthur/data/qps/bitmaps_qps.png b/tests/arthur/data/qps/bitmaps_qps.png deleted file mode 100644 index b20d6ba097..0000000000 Binary files a/tests/arthur/data/qps/bitmaps_qps.png and /dev/null differ diff --git a/tests/arthur/data/qps/borderimage.qps b/tests/arthur/data/qps/borderimage.qps deleted file mode 100644 index 8d2e54b302..0000000000 --- a/tests/arthur/data/qps/borderimage.qps +++ /dev/null @@ -1,164 +0,0 @@ -image_load borderimage.png borderimage - -translate -128 -128 -begin_block draw_border - -# top -drawImage borderimage 0 0 16 16 0 0 16 16 -drawImage borderimage 16 0 36 16 16 0 32 16 -drawImage borderimage 52 0 16 16 48 0 16 16 - -# sides -drawImage borderimage 0 16 16 16 0 16 16 32 -drawImage borderimage 52 16 16 16 48 16 16 32 - -#bottom -drawImage borderimage 0 32 16 16 0 48 16 16 -drawImage borderimage 16 32 36 16 16 48 32 16 -drawImage borderimage 52 32 16 16 48 48 16 16 - -end_block draw_border - -resetMatrix - -begin_block draw_column - -translate 1 1 -repeat_block draw_border -translate 0.1 64.1 -repeat_block draw_border -translate 0.1 64.1 -repeat_block draw_border -translate 0.1 64.1 -repeat_block draw_border -translate 0.1 64.1 -repeat_block draw_border -translate 0.1 64.1 -repeat_block draw_border -translate 0.1 64.1 -repeat_block draw_border -translate 0.1 64.1 -repeat_block draw_border -translate 0.1 64.1 -repeat_block draw_border -translate 0.1 64.1 -repeat_block draw_border - -end_block draw_column - -setRenderHint Antialiasing - -resetMatrix -translate 72 0 - -repeat_block draw_column - -resetMatrix -scale 1.25 1.25 -translate 144 0 - -repeat_block draw_border - -resetMatrix -scale 1.25 1.25 -translate 246 0 -rotate 30 - -repeat_block draw_border - -setRenderHint SmoothPixmapTransform - -resetMatrix -scale 1.25 1.25 -translate 144 120 - -repeat_block draw_border - -resetMatrix -scale 1.25 1.25 -translate 246 120 -rotate 30 - -repeat_block draw_border - -resetMatrix -translate 215 260 -scale 3.55 3.55 -rotate 30 - -repeat_block draw_border - -resetMatrix -setRenderHint SmoothPixmapTransform off -setRenderHint Antialiasing off - -translate 480 627 -rotate 180 -repeat_block draw_column - -resetMatrix -setRenderHint Antialiasing - -translate 552 627 -rotate 180 -repeat_block draw_column - -resetMatrix -setRenderHint Antialiasing off - -translate 200.1 520.1 - -begin_block one_pixel_border -drawImage borderimage 0 0 16 16 0 0 16 16 -drawImage borderimage 16 0 64 16 16 0 1 1 -drawImage borderimage 80 0 16 16 48 0 16 16 - -drawImage borderimage 0 16 16 64 16 0 1 1 -drawImage borderimage 80 16 16 64 16 0 1 1 - -drawImage borderimage 0 80 16 16 0 48 16 16 -drawImage borderimage 16 80 64 16 16 0 1 1 -drawImage borderimage 80 80 16 16 48 48 16 16 -end_block one_pixel_border - -resetMatrix - -translate 205.1 626.1 -scale 0.4 0.4 - -repeat_block one_pixel_border - -resetMatrix - -translate 255.1 624.1 -scale 0.4 0.4 -rotate 10 - -repeat_block one_pixel_border - -resetMatrix - -setPen red - -drawRect 0 0 70 680 -drawText 10 670 "aa off" - -drawRect 72 0 70 680 -drawText 80 670 "aa on" - -drawRect 409 0 70 680 -drawText 419 650 "rot 180" -drawText 419 670 "aa off" - -drawRect 481 0 70 680 -drawText 491 650 "rot 180" -drawText 491 670 "aa on" - -drawRect 164 0 224 124 -drawText 174 114 "smoothpixmaptransform off" - -drawRect 164 128 224 134 -drawText 174 252 "smoothpixmaptransform on" - -drawRect 200 520 97 188 -drawText 210 698 "1x1 edges" diff --git a/tests/arthur/data/qps/borderimage_qps.png b/tests/arthur/data/qps/borderimage_qps.png deleted file mode 100644 index ed51d5f60d..0000000000 Binary files a/tests/arthur/data/qps/borderimage_qps.png and /dev/null differ diff --git a/tests/arthur/data/qps/brush_pens.qps b/tests/arthur/data/qps/brush_pens.qps deleted file mode 100644 index c0177a75c9..0000000000 --- a/tests/arthur/data/qps/brush_pens.qps +++ /dev/null @@ -1,101 +0,0 @@ -path_addRect p 0 0 75 75 -path_addEllipse p 25 25 75 75 - -translate 10 10 - -begin_block setup_gradient - gradient_clearStops - gradient_appendStop 0 red - gradient_appendStop 0.1 blue - gradient_appendStop 0.2 yellow - gradient_appendStop 0.3 cyan - gradient_appendStop 0.4 magenta - gradient_appendStop 0.5 green - gradient_appendStop 0.6 black - gradient_appendStop 0.7 indianred - gradient_appendStop 0.8 white - gradient_appendStop 0.9 orange - gradient_appendStop 1 blue - gradient_setLinear 0 0 100 100 -end_block - -setPen brush 0 -setBrush nobrush - -begin_block drawing - save - drawLine 0 0 100 100 - - translate 0 100 - drawPath p - - translate 0 110 - drawRect 0 0 100 100 - - translate 0 110 - drawPolyline [0 0 100 0 50 50] - - drawPoint 40 40 - drawPoint 41 40 - drawPoint 42 40 - drawPoint 43 40 - drawPoint 44 40 - drawPoint 45 40 - drawPoint 46 40 - drawPoint 47 40 - drawPoint 48 40 - drawPoint 49 40 - drawPoint 50 40 - - restore -end_block - -save - translate 110 0 - save - setRenderHint Antialiasing - repeat_block drawing - restore - - setBrush dome_rgb32.png - setPen brush 0 - setBrush nobrush - - translate 110 0 - repeat_block drawing - - translate 110 0 - save - setRenderHint Antialiasing - repeat_block drawing - restore -restore - -translate 0 0 - -save - repeat_block setup_gradient - setPen brush 5 - setBrush nobrush - translate 0 350 - repeat_block drawing - - translate 110 0 - save - setRenderHint Antialiasing - repeat_block drawing - restore - - setBrush dome_rgb32.png - setPen brush 5 - setBrush nobrush - - translate 110 0 - repeat_block drawing - - translate 110 0 - save - setRenderHint Antialiasing - repeat_block drawing - restore -restore diff --git a/tests/arthur/data/qps/brush_pens_qps.png b/tests/arthur/data/qps/brush_pens_qps.png deleted file mode 100644 index 555cfadecb..0000000000 Binary files a/tests/arthur/data/qps/brush_pens_qps.png and /dev/null differ diff --git a/tests/arthur/data/qps/brushes.qps b/tests/arthur/data/qps/brushes.qps deleted file mode 100644 index 2291e29ef4..0000000000 --- a/tests/arthur/data/qps/brushes.qps +++ /dev/null @@ -1,77 +0,0 @@ -# Fill the background -drawRect 0 0 width height - -setRenderHint Antialiasing -setRenderHint SmoothPixmapTransform - -translate 10 10 -# Draw all the pattern types as 40x40 rects using green, transparent background -begin_block drawrects -setBrush green Dense1Pattern -drawRect 0 0 40 40 -setBrush green Dense2Pattern -drawRect 40 0 40 40 -setBrush green Dense3Pattern -drawRect 80 0 40 40 -setBrush green Dense4Pattern -drawRect 120 0 40 40 -setBrush green Dense5Pattern -drawRect 160 0 40 40 -setBrush green Dense6Pattern -drawRect 200 0 40 40 -setBrush green Dense7Pattern -drawRect 240 0 40 40 -setBrush green HorPattern -drawRect 280 0 40 40 -setBrush green VerPattern -drawRect 320 0 40 40 -setBrush green CrossPattern -drawRect 360 0 40 40 -setBrush green BDiagPattern -drawRect 400 0 40 40 -setBrush green FDiagPattern -drawRect 440 0 40 40 -setBrush green DiagCrossPattern -drawRect 480 0 40 40 -setBrush green SolidPattern -drawRect 520 0 40 40 -setBrush green NoBrush -drawRect 560 0 40 40 -gradient_setLinear 0 0 0 40 -drawRect 600 0 40 40 -setBrush face.png -drawRect 640 0 80 40 -end_block - -# Switch to opaque mode -setBackground #7fff7f -setBackgroundMode OpaqueMode -translate 0 50 - -# Draw all the pattern types as 40x40 rects using green, opaque background -repeat_block drawrects - -translate 50 50 -rotate 10 - - -setBackgroundMode TransparentMode -repeat_block drawrects -setBackgroundMode OpaqueMode -translate 0 40 -repeat_block drawrects - - -setBrush dot.png -setPen nopen -resetMatrix -drawRect 0 200 50 50 -drawRect 50 200 50 50 - -setPen red -setBrushOrigin 0 250 -drawRect 0 250 50 50 -setBrushOrigin 50 250 -drawRect 50 250 50 50 - - diff --git a/tests/arthur/data/qps/brushes_qps.png b/tests/arthur/data/qps/brushes_qps.png deleted file mode 100644 index 2ee9648a75..0000000000 Binary files a/tests/arthur/data/qps/brushes_qps.png and /dev/null differ diff --git a/tests/arthur/data/qps/clippaths.qps b/tests/arthur/data/qps/clippaths.qps deleted file mode 100644 index 34e77bee9e..0000000000 --- a/tests/arthur/data/qps/clippaths.qps +++ /dev/null @@ -1,58 +0,0 @@ -path_addRect hor 0 0 50 10 -path_addRect ver 0 0 10 50 - -translate 10 10 -setPen NoPen - -begin_block clipping -save - - setBrush 0x7f7fff - save - setClipPath hor - drawRect 0 0 100 100 - - setClipPath ver IntersectClip - setBrush black CrossPattern - drawRect 0 0 100 100 - restore - - translate 100 0 - save - setClipPath hor - drawRect 0 0 100 100 - - setClipPath ver ReplaceClip - setBrush black CrossPattern - drawRect 0 0 100 100 - restore - - translate 100 0 - save - setClipPath hor - drawRect 0 0 100 100 - - setClipPath ver UniteClip - setBrush black CrossPattern - drawRect 0 0 100 100 - restore - -restore -end_block - -translate 300 0 -setRenderHint Antialiasing -repeat_block clipping - -translate -300 100 -setRenderHint Antialiasing false -scale 1.2 1.2 -repeat_block clipping - -translate 300 0 -setRenderHint Antialiasing -setRenderHint SmoothPixmapTransform -repeat_block clipping - - - diff --git a/tests/arthur/data/qps/clippaths_qps.png b/tests/arthur/data/qps/clippaths_qps.png deleted file mode 100644 index 96580917d5..0000000000 Binary files a/tests/arthur/data/qps/clippaths_qps.png and /dev/null differ diff --git a/tests/arthur/data/qps/clipping.qps b/tests/arthur/data/qps/clipping.qps deleted file mode 100644 index 09a7e776f0..0000000000 --- a/tests/arthur/data/qps/clipping.qps +++ /dev/null @@ -1,179 +0,0 @@ -region_addRect clip 50 0 90 190 -region_addRect clip 0 50 180 90 - -region_addRect clip2 30 30 60 60 - -region_addRect clip3 10 10 60 60 - -path_cubicTo path 90 0 50 50 90 90 -path_cubicTo path 0 90 50 50 0 0 - -path_addRect path2 0 0 90 90 -path_moveTo path2 90 45 -path_arcTo path2 0 0 90 90 0 -360 - -path_addRect emptypath 0 0 0 0 -region_addRect emptyregion 0 0 0 0 - -# Normal clip rect -setClipRect 0 0 50 150 -begin_block repaint -save -setBrush red -setPen nopen -resetMatrix -region_getClipRegion tmpclip -path_getClipPath tmpclippath -drawRect 0 0 width height -setBrush #3f0000ff -setClipRegion tmpclip -drawRect 0 0 width height -setClipPath tmpclippath -setBrush #3f00ff00 -drawRect 0 0 width height -restore -end_block - -# Rotated clip rect -translate 100 0 -rotate 10 -setClipRect 0 0 50 150 -repeat_block repaint - -# simple clip region -resetMatrix -translate 0 200 -setClipRegion clip -repeat_block repaint - -# simle rotated clip region -translate 250 -10 -rotate 10 -setClipRegion clip -repeat_block repaint - -# verify that clip is not xformed with painter -resetMatrix -translate 200 0 -setClipRegion clip -rotate 30 -setBrush red -setPen nopen -drawRect 0 0 width height - -resetMatrix -translate 0 400 -save -setClipRegion clip -setClipRegion clip2 IntersectClip -repeat_block repaint -translate 0 100 -rotate 10 -setClipRegion clip -setClipRegion clip2 IntersectClip -restore - -translate 100 0 -save -setClipRegion clip3 -setClipRegion clip2 UniteClip -repeat_block repaint -translate 0 100 -rotate 10 -setClipRegion clip3 -setClipRegion clip2 UniteClip -repeat_block repaint -restore - -translate 100 0 -save -setClipPath path -repeat_block repaint -translate 50 100 -rotate 45 -setClipPath path -repeat_block repaint -restore - -translate 100 0 -save -setClipPath path -setClipPath path2 IntersectClip -repeat_block repaint -translate 0 100 -rotate 10 -setClipPath path -setClipPath path2 IntersectClip -repeat_block repaint -restore - -translate 100 0 -save -setClipPath path -setClipPath path2 UniteClip -repeat_block repaint -translate 0 100 -rotate 10 -setClipPath path -setClipPath path2 UniteClip -repeat_block repaint -restore - -translate 100 0 -save -setClipPath path -setClipRegion clip3 IntersectClip -repeat_block repaint -translate 0 100 -rotate 10 -setClipRegion clip3 -setClipPath path IntersectClip -repeat_block repaint -restore - -translate 100 0 -save -setClipPath path -setClipRegion clip3 UniteClip -repeat_block repaint -translate 0 100 -rotate 10 -setClipRegion clip3 -setClipPath path UniteClip -repeat_block repaint -restore - -# test that an empty region is not drawn. -resetMatrix -setClipRegion emptyregion -setBrush #3f00ff00 -drawRect 0 0 300 300 -drawText 50 50 "Text should be clipped away by region" -setClipping false - -setClipPath emptypath -setBrush #3fffff00 -drawRect 50 50 300 300 -drawText 70 80 "Text should be clipped away by path" - -# Test that we can extract a clipregion when a matrix is set too -resetMatrix -translate 500 10 -scale 2 1 -setBrush blue -setClipping false -rotate 5 -drawRect 0 0 100 100 -setClipRect 0 0 100 100 -resetMatrix -rotate 10 -region_getClipRegion xclip -setClipRegion xclip -resetMatrix -setBrush #7f00ff00 -drawRect 0 0 width height - -# the below used to assert in debug mode -setClipRect 10 10 20 20 -setClipping false -setClipping true diff --git a/tests/arthur/data/qps/clipping_qps.png b/tests/arthur/data/qps/clipping_qps.png deleted file mode 100644 index 97094a9e86..0000000000 Binary files a/tests/arthur/data/qps/clipping_qps.png and /dev/null differ diff --git a/tests/arthur/data/qps/clipping_state.qps b/tests/arthur/data/qps/clipping_state.qps deleted file mode 100644 index 3a661226a5..0000000000 --- a/tests/arthur/data/qps/clipping_state.qps +++ /dev/null @@ -1,72 +0,0 @@ -path_addRect path1 10 10 50 50 -path_addRect path2 30 30 50 50 - - -# enable/disable a clip path -setPen nopen -setBrush red - -setClipPath path1 -setClipPath path2 UniteClip - -drawRect 0 0 100 100 - -setClipping false - -setBrush #630000ff -drawRect 0 0 100 100 - -setClipping true - -setBrush #6300ff00 -drawRect 0 0 100 100 - - -# enable/disable noclip -translate 150 0 - -setClipPath path1 NoClip - -setClipping false - -setBrush #630000ff -drawRect 0 0 100 100 - -setClipping true - -setBrush #6300ff00 -drawRect 25 25 50 50 - - -# enable/disable full clipping -translate 150 0 - -path_addRect path3 0 0 10 10 -path_addRect path4 20 20 10 10 -setClipPath path3 -setClipPath path4 IntersectClip - -setClipping false - -setBrush #630000ff -drawRect 0 0 100 100 - -setClipping true - -setBrush #6300ff00 -drawRect 25 25 50 50 - -# disable clipping followed by setClipRect -translate 150 0 - -setClipRect 0 0 50 50 ReplaceClip - -setClipping false - -setBrush #630000ff -drawRect 0 0 100 100 - -setClipRect 25 25 75 75 IntersectClip - -setBrush #6300ff00 -drawRect 25 25 50 50 diff --git a/tests/arthur/data/qps/clipping_state_qps.png b/tests/arthur/data/qps/clipping_state_qps.png deleted file mode 100644 index 28bee462c6..0000000000 Binary files a/tests/arthur/data/qps/clipping_state_qps.png and /dev/null differ diff --git a/tests/arthur/data/qps/cliprects.qps b/tests/arthur/data/qps/cliprects.qps deleted file mode 100644 index 7f8e674ca3..0000000000 --- a/tests/arthur/data/qps/cliprects.qps +++ /dev/null @@ -1,57 +0,0 @@ - - -translate 10 10 -setPen NoPen - -begin_block clipping -save - - setBrush 0x7f7fff - save - setClipRect 0 0 50 10 - drawRect 0 0 100 100 - - setClipRect 0 0 10 50 IntersectClip - setBrush black CrossPattern - drawRect 0 0 100 100 - restore - - translate 100 0 - save - setClipRect 0 0 50 10 - drawRect 0 0 100 100 - - setClipRect 0 0 10 50 ReplaceClip - setBrush black CrossPattern - drawRect 0 0 100 100 - restore - - translate 100 0 - save - setClipRect 0 0 50 10 - drawRect 0 0 100 100 - - setClipRect 0 0 10 50 UniteClip - setBrush black CrossPattern - drawRect 0 0 100 100 - restore - -restore -end_block - -translate 300 0 -setRenderHint Antialiasing -repeat_block clipping - -translate -300 100 -setRenderHint Antialiasing false -scale 1.2 1.2 -repeat_block clipping - -translate 300 0 -setRenderHint Antialiasing -setRenderHint SmoothPixmapTransform -repeat_block clipping - - - diff --git a/tests/arthur/data/qps/cliprects_qps.png b/tests/arthur/data/qps/cliprects_qps.png deleted file mode 100644 index 96580917d5..0000000000 Binary files a/tests/arthur/data/qps/cliprects_qps.png and /dev/null differ diff --git a/tests/arthur/data/qps/conical_gradients.qps b/tests/arthur/data/qps/conical_gradients.qps deleted file mode 100644 index d459ed008d..0000000000 --- a/tests/arthur/data/qps/conical_gradients.qps +++ /dev/null @@ -1,82 +0,0 @@ -path_addRect path 300 0 80 80 -path_addEllipse path 340 40 60 60 - -setRenderHint Antialiasing - -setPen black - -begin_block gradients -gradient_clearStops -gradient_appendStop 0 red -gradient_appendStop 0.25 orange -gradient_appendStop 0.5 yellow -gradient_appendStop 0.8 green -gradient_appendStop 1 cyan - -gradient_setConical 40 40 50 -drawRect 0 0 100 100 - -gradient_setConical 140 40 230 -drawEllipse 100 0 100 100 - -gradient_clearStops -gradient_appendStop 0 3f7f7fff -gradient_appendStop 0.5 dfdfffff -gradient_appendStop 1 7f00007f - -gradient_setConical 240 40 50 -drawPolygon [200 0 290 0 250 99] - -gradient_setConical 340 40 230 -drawPath path - -end_block - -translate 0 100 -scale 1 2 -repeat_block gradients - -resetMatrix -translate 0 300 -brushTranslate 30 0 -brushScale 0.9 0.9 -brushRotate 20 -repeat_block gradients - -# Some helpful info perhaps? -resetMatrix -setPen black - -drawText 410 50 "No XForm" -drawText 410 200 "scale 1x2" -drawText 410 300 "brush transform" -drawText 10 450 "50 deg" -drawText 110 450 "230 deg" -drawText 210 450 "50 deg w/alpha " -drawText 310 450 "230 deg w/alpha" - -setPen 3f000000 -setBrush nobrush - -begin_block ellipse_draw - setClipRect 0 0 100 100 - drawEllipse 35 35 11 11 - save - translate 40 40 - rotate -50 - drawLine -100 0 100 0 - restore - translate 100 0 -end_block - -repeat_block ellipse_draw -repeat_block ellipse_draw -repeat_block ellipse_draw - -resetMatrix -translate 0 100 -scale 1 2 -repeat_block ellipse_draw -repeat_block ellipse_draw -repeat_block ellipse_draw -repeat_block ellipse_draw diff --git a/tests/arthur/data/qps/conical_gradients_perspectives.qps b/tests/arthur/data/qps/conical_gradients_perspectives.qps deleted file mode 100644 index 40af97ec0c..0000000000 --- a/tests/arthur/data/qps/conical_gradients_perspectives.qps +++ /dev/null @@ -1,61 +0,0 @@ - -setRenderHint Antialiasing - -setPen #00ff00 - -translate 10 10 -# standard draw -begin_block gradient -gradient_clearStops -gradient_appendStop 0 red -gradient_appendStop 0.25 orange -gradient_appendStop 0.5 yellow -gradient_appendStop 0.8 green -gradient_appendStop 0.9 cyan -gradient_appendStop 1 red - -gradient_setSpread PadSpread -gradient_setConical 140 140 100 -drawRect 0 0 300 300 -end_block gradient - -# Rotation w/o smooth xform -save -translate 350 0 -save - setRenderHint SmoothPixmapTransform on - mapQuadToQuad 0 0 0 300 300 300 300 0 0 50 0 200 300 300 300 0 - repeat_block gradient -restore -restore - -translate 0 320 - -save - setRenderHint SmoothPixmapTransform on - mapQuadToQuad 0 0 0 300 300 300 300 0 0 0 100 300 200 300 300 0 - repeat_block gradient -restore - -save -translate 350 0 -save - setRenderHint SmoothPixmapTransform on - mapQuadToQuad 0 0 0 300 300 300 300 0 0 0 0 300 300 250 300 50 - repeat_block gradient -restore -restore - - -resetMatrix -setPen black -translate 125 20 -drawText 0 0 "No transform" -translate 350 0 -drawText 0 0 "Left Tilted" -resetMatrix -translate 125 350 -drawText 0 0 "Bottom Tilted" -translate 350 0 -drawText 0 0 "Right Tilted" -translate 120 0 diff --git a/tests/arthur/data/qps/conical_gradients_perspectives_qps.png b/tests/arthur/data/qps/conical_gradients_perspectives_qps.png deleted file mode 100644 index 705fa933e4..0000000000 Binary files a/tests/arthur/data/qps/conical_gradients_perspectives_qps.png and /dev/null differ diff --git a/tests/arthur/data/qps/conical_gradients_qps.png b/tests/arthur/data/qps/conical_gradients_qps.png deleted file mode 100644 index 9d8e4537c2..0000000000 Binary files a/tests/arthur/data/qps/conical_gradients_qps.png and /dev/null differ diff --git a/tests/arthur/data/qps/dashes.qps b/tests/arthur/data/qps/dashes.qps deleted file mode 100644 index d7fa73f385..0000000000 --- a/tests/arthur/data/qps/dashes.qps +++ /dev/null @@ -1,265 +0,0 @@ -translate 20 20 - -begin_block draw -save - save - setPen black 1 SolidLine FlatCap BevelJoin - drawPolyline [0 0 80 0 80 30 40 20 0 30] - translate 0 40 - setPen black 1 SolidLine SquareCap BevelJoin - drawPolyline [0 0 80 0 80 30 40 20 0 30] - translate 0 40 - setPen black 1 SolidLine RoundCap BevelJoin - drawPolyline [0 0 80 0 80 30 40 20 0 30] - translate 0 40 - - setPen black 2 SolidLine FlatCap BevelJoin - drawPolyline [0 0 80 0 80 30 40 20 0 30] - translate 0 40 - setPen black 2 SolidLine SquareCap BevelJoin - drawPolyline [0 0 80 0 80 30 40 20 0 30] - translate 0 40 - setPen black 2 SolidLine RoundCap BevelJoin - drawPolyline [0 0 80 0 80 30 40 20 0 30] - translate 0 40 - - setPen black 6 SolidLine FlatCap BevelJoin - drawPolyline [0 0 80 0 80 30 40 20 0 30] - translate 0 40 - setPen black 6 SolidLine SquareCap BevelJoin - drawPolyline [0 0 80 0 80 30 40 20 0 30] - translate 0 40 - setPen black 6 SolidLine RoundCap BevelJoin - drawPolyline [0 0 80 0 80 30 40 20 0 30] - translate 0 40 - restore - - - translate 100 0 - save - setPen black 1 DotLine FlatCap BevelJoin - drawPolyline [0 0 80 0 80 30 40 20 0 30] - translate 0 40 - setPen black 1 DotLine SquareCap BevelJoin - drawPolyline [0 0 80 0 80 30 40 20 0 30] - translate 0 40 - setPen black 1 DotLine RoundCap BevelJoin - drawPolyline [0 0 80 0 80 30 40 20 0 30] - translate 0 40 - - setPen black 2 DotLine FlatCap BevelJoin - drawPolyline [0 0 80 0 80 30 40 20 0 30] - translate 0 40 - setPen black 2 DotLine SquareCap BevelJoin - drawPolyline [0 0 80 0 80 30 40 20 0 30] - translate 0 40 - setPen black 2 DotLine RoundCap BevelJoin - drawPolyline [0 0 80 0 80 30 40 20 0 30] - translate 0 40 - - setPen black 6 DotLine FlatCap BevelJoin - drawPolyline [0 0 80 0 80 30 40 20 0 30] - translate 0 40 - setPen black 6 DotLine SquareCap BevelJoin - drawPolyline [0 0 80 0 80 30 40 20 0 30] - translate 0 40 - setPen black 6 DotLine RoundCap BevelJoin - drawPolyline [0 0 80 0 80 30 40 20 0 30] - translate 0 40 - restore - - translate 100 0 - save - setPen black 1 DashLine FlatCap BevelJoin - drawPolyline [0 0 80 0 80 30 40 20 0 30] - translate 0 40 - setPen black 1 DashLine SquareCap BevelJoin - drawPolyline [0 0 80 0 80 30 40 20 0 30] - translate 0 40 - setPen black 1 DashLine RoundCap BevelJoin - drawPolyline [0 0 80 0 80 30 40 20 0 30] - translate 0 40 - - setPen black 2 DashLine FlatCap BevelJoin - drawPolyline [0 0 80 0 80 30 40 20 0 30] - translate 0 40 - setPen black 2 DashLine SquareCap BevelJoin - drawPolyline [0 0 80 0 80 30 40 20 0 30] - translate 0 40 - setPen black 2 DashLine RoundCap BevelJoin - drawPolyline [0 0 80 0 80 30 40 20 0 30] - translate 0 40 - - setPen black 6 DashLine FlatCap BevelJoin - drawPolyline [0 0 80 0 80 30 40 20 0 30] - translate 0 40 - setPen black 6 DashLine SquareCap BevelJoin - drawPolyline [0 0 80 0 80 30 40 20 0 30] - translate 0 40 - setPen black 6 DashLine RoundCap BevelJoin - drawPolyline [0 0 80 0 80 30 40 20 0 30] - translate 0 40 - restore - - translate 100 0 - - save - setPen black 1 DashDotLine FlatCap BevelJoin - drawPolyline [0 0 80 0 80 30 40 20 0 30] - translate 0 40 - setPen black 1 DashDotLine SquareCap BevelJoin - drawPolyline [0 0 80 0 80 30 40 20 0 30] - translate 0 40 - setPen black 1 DashDotLine RoundCap BevelJoin - drawPolyline [0 0 80 0 80 30 40 20 0 30] - translate 0 40 - - setPen black 2 DashDotLine FlatCap BevelJoin - drawPolyline [0 0 80 0 80 30 40 20 0 30] - translate 0 40 - setPen black 2 DashDotLine SquareCap BevelJoin - drawPolyline [0 0 80 0 80 30 40 20 0 30] - translate 0 40 - setPen black 2 DashDotLine RoundCap BevelJoin - drawPolyline [0 0 80 0 80 30 40 20 0 30] - translate 0 40 - - setPen black 6 DashDotLine FlatCap BevelJoin - drawPolyline [0 0 80 0 80 30 40 20 0 30] - translate 0 40 - setPen black 6 DashDotLine SquareCap BevelJoin - drawPolyline [0 0 80 0 80 30 40 20 0 30] - translate 0 40 - setPen black 6 DashDotLine RoundCap BevelJoin - drawPolyline [0 0 80 0 80 30 40 20 0 30] - translate 0 40 - restore - - translate 100 0 - - save - setPen black 1 DashDotDotLine FlatCap BevelJoin - drawPolyline [0 0 80 0 80 30 40 20 0 30] - translate 0 40 - setPen black 1 DashDotDotLine SquareCap BevelJoin - drawPolyline [0 0 80 0 80 30 40 20 0 30] - translate 0 40 - setPen black 1 DashDotDotLine RoundCap BevelJoin - drawPolyline [0 0 80 0 80 30 40 20 0 30] - translate 0 40 - - setPen black 2 DashDotDotLine FlatCap BevelJoin - drawPolyline [0 0 80 0 80 30 40 20 0 30] - translate 0 40 - setPen black 2 DashDotDotLine SquareCap BevelJoin - drawPolyline [0 0 80 0 80 30 40 20 0 30] - translate 0 40 - setPen black 2 DashDotDotLine RoundCap BevelJoin - drawPolyline [0 0 80 0 80 30 40 20 0 30] - translate 0 40 - - setPen black 4 DashDotDotLine FlatCap BevelJoin - drawPolyline [0 0 80 0 80 30 40 20 0 30] - translate 0 40 - setPen black 4 DashDotDotLine SquareCap BevelJoin - drawPolyline [0 0 80 0 80 30 40 20 0 30] - translate 0 40 - setPen black 4 DashDotDotLine RoundCap BevelJoin - drawPolyline [0 0 80 0 80 30 40 20 0 30] - translate 0 40 - restore - - translate 100 0 - - save - setPen black 1 SolidLine FlatCap BevelJoin - pen_setDashPattern [1 4 9 4 27 4] - drawPolyline [0 0 80 0 80 30 40 20 0 30] - translate 0 40 - setPen black 1 SolidLine SquareCap BevelJoin - pen_setDashPattern [1 4 9 4 27 4] - drawPolyline [0 0 80 0 80 30 40 20 0 30] - translate 0 40 - setPen black 1 SolidLine RoundCap BevelJoin - pen_setDashPattern [1 4 9 4 27 4] - drawPolyline [0 0 80 0 80 30 40 20 0 30] - translate 0 40 - - setPen black 2 SolidLine FlatCap BevelJoin - pen_setDashPattern [1 4 9 4 27 4] - drawPolyline [0 0 80 0 80 30 40 20 0 30] - translate 0 40 - setPen black 2 SolidLine SquareCap BevelJoin - pen_setDashPattern [1 4 9 4 27 4] - drawPolyline [0 0 80 0 80 30 40 20 0 30] - translate 0 40 - setPen black 2 SolidLine RoundCap BevelJoin - pen_setDashPattern [1 4 9 4 27 4] - drawPolyline [0 0 80 0 80 30 40 20 0 30] - translate 0 40 - - setPen black 4 SolidLine FlatCap BevelJoin - pen_setDashPattern [1 4 9 4 27 4] - drawPolyline [0 0 80 0 80 30 40 20 0 30] - translate 0 40 - setPen black 4 SolidLine SquareCap BevelJoin - pen_setDashPattern [1 4 9 4 27 4] - drawPolyline [0 0 80 0 80 30 40 20 0 30] - translate 0 40 - setPen black 4 SolidLine RoundCap BevelJoin - pen_setDashPattern [1 4 9 4 27 4] - drawPolyline [0 0 80 0 80 30 40 20 0 30] - translate 0 40 - restore - -restore -end_block - -translate 0 400 -setRenderHint Antialiasing -repeat_block draw - -translate 0 -20 -drawText 30 0 "Solid" - -translate 100 0 -drawText 20 0 "DotLine" - -translate 100 0 -drawText 10 0 "DashLine" - -translate 100 0 -drawText 0 0 "DashDotLine" - -translate 100 0 -drawText 0 0 "DashDotDotLine" - -translate 100 0 -drawText 0 0 "CustomDashLine" - -resetMatrix - -translate 620 40 - -begin_block width_and_caps_texts - drawText 0 0 "Width=1, FlatCap" - translate 0 40 - drawText 0 0 "Width=1, SquareCap" - translate 0 40 - drawText 0 0 "Width=1, RoundCap" - translate 0 40 - drawText 0 0 "Width=2, FlatCap" - translate 0 40 - drawText 0 0 "Width=2, SquareCap" - translate 0 40 - drawText 0 0 "Width=2, RoundCap" - translate 0 40 - drawText 0 0 "Width=6, FlatCap" - translate 0 40 - drawText 0 0 "Width=6, SqareCap" - translate 0 40 - drawText 0 0 "Width=6, RoundCap" -end_block - -translate 0 80 -repeat_block width_and_caps_texts diff --git a/tests/arthur/data/qps/dashes_qps.png b/tests/arthur/data/qps/dashes_qps.png deleted file mode 100644 index 2b5ac551df..0000000000 Binary files a/tests/arthur/data/qps/dashes_qps.png and /dev/null differ diff --git a/tests/arthur/data/qps/degeneratebeziers.qps b/tests/arthur/data/qps/degeneratebeziers.qps deleted file mode 100644 index d9036dfaa5..0000000000 --- a/tests/arthur/data/qps/degeneratebeziers.qps +++ /dev/null @@ -1,7 +0,0 @@ -path_moveTo degenerate 3427.0918499999997948 3872.1318999999998596 -path_cubicTo degenerate 3427.0918499999997948 3872.1318999999994048 4729.4590867905308187 5176.8613451144155988 5389.9325499999995372 5837.8072499999998399 - -scale 0.05 0.05 -translate -2500 -3000 -setPen black 800 -drawPath degenerate diff --git a/tests/arthur/data/qps/degeneratebeziers_qps.png b/tests/arthur/data/qps/degeneratebeziers_qps.png deleted file mode 100644 index 85aae14a04..0000000000 Binary files a/tests/arthur/data/qps/degeneratebeziers_qps.png and /dev/null differ diff --git a/tests/arthur/data/qps/deviceclipping.qps b/tests/arthur/data/qps/deviceclipping.qps deleted file mode 100644 index cc9abe109a..0000000000 --- a/tests/arthur/data/qps/deviceclipping.qps +++ /dev/null @@ -1,45 +0,0 @@ -setBrush 0xff7f7f -setPen 0x7f0000 - -path_moveTo path -1000000 10000 -path_cubicTo path 100 100 100 150 150 400 -path_closeSubpath path - -begin_block drawing - - drawPath ellipse - - drawLine -1000000 200 200 200 - drawLine 200 -1000000 200 200 - drawLine 200 200 1000000 200 - drawLine 200 200 200 1000000 - drawLine -1000000 -1000000 200 200 - - drawPolygon [-1000000 100 100 -1000000 100 100] - drawRect 300 -500000 1000000 1000000 - - drawPath path - -end_block - -save -translate 20 20 -setBrush #0x7f7f7fff -setPen #0x7f00007f -repeat_block drawing - -translate 20 20 -setRenderHint Antialiasing -setBrush #0x7f7fff7f -setPen #0x7f007f00 -repeat_block drawing -restore - -setPen 0x00007f 2 -setRenderHint Antialiasing - -drawLine 0 -200 200 200 - -setPen 0x007f00 10 - -drawLine 0 -200 200 0 diff --git a/tests/arthur/data/qps/deviceclipping_qps.png b/tests/arthur/data/qps/deviceclipping_qps.png deleted file mode 100644 index 20b2d19c06..0000000000 Binary files a/tests/arthur/data/qps/deviceclipping_qps.png and /dev/null differ diff --git a/tests/arthur/data/qps/drawpoints.qps b/tests/arthur/data/qps/drawpoints.qps deleted file mode 100644 index 9f234142f2..0000000000 --- a/tests/arthur/data/qps/drawpoints.qps +++ /dev/null @@ -1,98 +0,0 @@ -#setRenderHint Antialiasing - -setPen red 0 solidline -begin_block points -drawPoint 00 00 -drawPoint 10 00 -drawPoint 20 00 -drawPoint 30 00 -drawPoint 40 00 -drawPoint 50 00 -drawPoint 00 10 -drawPoint 10 10 -drawPoint 20 10 -drawPoint 30 10 -drawPoint 40 10 -drawPoint 50 10 -drawPoint 00 20 -drawPoint 10 20 -drawPoint 20 20 -drawPoint 30 20 -drawPoint 40 20 -drawPoint 50 20 -drawPoint 00 30 -drawPoint 10 30 -drawPoint 20 30 -drawPoint 30 30 -drawPoint 40 30 -drawPoint 50 30 -drawPoint 00 40 -drawPoint 10 40 -drawPoint 20 40 -drawPoint 30 40 -drawPoint 40 40 -drawPoint 50 40 -drawPoint 00 50 -drawPoint 10 50 -drawPoint 20 50 -drawPoint 30 50 -drawPoint 40 50 -drawPoint 50 50 -end_block points - -translate 100 0 -setPen blue 1 solidline -repeat_block points - -translate 100 0 -setPen green 5 solidline roundcap -repeat_block points - -resetMatrix - -translate 0 100 -scale 3 3 -setPen red 0 solidline roundcap -repeat_block points - -translate 60 0 -setPen blue 1 solidline roundcap -repeat_block points - -translate 60 0 -setPen green 5 solidline roundcap -repeat_block points - -resetMatrix - -translate 0 300 -scale 3 3 -setPen red 0 solidline flatcap -repeat_block points - -translate 60 0 -setPen blue 1 solidline flatcap -repeat_block points - -translate 60 0 -setPen green 5 solidline flatcap -repeat_block points - -resetMatrix -translate 10 500 -setPen black 1 solidline flatcap -drawPoint 0 0 -setPen black 2 solidline flatcap -drawPoint 3 0 -setPen black 3 solidline flatcap -drawPoint 8 0 -setPen black 4 solidline flatcap -drawPoint 15 0 -setPen black 5 solidline flatcap -drawPoint 24 0 -setPen black 6 solidline flatcap -drawPoint 35 0 -setPen black 7 solidline flatcap -drawPoint 48 0 -setPen black 8 solidline flatcap -drawPoint 63 0 diff --git a/tests/arthur/data/qps/drawpoints_qps.png b/tests/arthur/data/qps/drawpoints_qps.png deleted file mode 100644 index b8b1b45e48..0000000000 Binary files a/tests/arthur/data/qps/drawpoints_qps.png and /dev/null differ diff --git a/tests/arthur/data/qps/drawtext.qps b/tests/arthur/data/qps/drawtext.qps deleted file mode 100644 index 668fd8573d..0000000000 --- a/tests/arthur/data/qps/drawtext.qps +++ /dev/null @@ -1,85 +0,0 @@ -setRenderHint Antialiasing - -path_addEllipse path 0 0 width height -setClipPath path - -setFont "times" 3 -drawText 10 10 "This is a very long text that just might become antialiased...." - -setFont "times" 4 -drawText 10 20 "This is a very long text that just might become antialiased...." - -setFont "times" 5 -drawText 10 30 "This is a very long text that just might become antialiased...." - -setFont "times" 6 -drawText 10 40 "This is a very long text that just might become antialiased...." - -setFont "times" 7 -drawText 10 50 "This is a very long text that just might become antialiased...." - -setFont "times" 8 -drawText 10 60 "This is a very long text that just might become antialiased...." - -setFont "times" 9 -drawText 10 70 "This is a very long text that just might become antialiased...." - -setFont "times" 10 -drawText 10 80 "This is a very long text that just might become antialiased...." - -setFont "times" 16 -drawText 10 100 "This is a very long text that just might become antialiased...." - -setFont "times" 17 -drawText 10 120 "This is a very long text that just might become antialiased...." - -setFont "times" 18 -drawText 10 140 "This is a very long text that just might become antialiased...." - -setFont "times" 19 -drawText 10 160 "This is a very long text that just might become antialiased...." - -setFont "times" 20 -drawText 10 180 "This is a very long text that just might become antialiased...." - -translate 0 200 - -setFont "arial" 3 -drawText 10 10 "This is a very long text that just might become antialiased...." - -setFont "arial" 4 -drawText 10 20 "This is a very long text that just might become antialiased...." - -setFont "arial" 5 -drawText 10 30 "This is a very long text that just might become antialiased...." - -setFont "arial" 6 -drawText 10 40 "This is a very long text that just might become antialiased...." - -setFont "arial" 7 -drawText 10 50 "This is a very long text that just might become antialiased...." - -setFont "arial" 8 -drawText 10 60 "This is a very long text that just might become antialiased...." - -setFont "arial" 9 -drawText 10 70 "This is a very long text that just might become antialiased...." - -setFont "arial" 10 -drawText 10 80 "This is a very long text that just might become antialiased...." - -setFont "arial" 16 -drawText 10 100 "This is a very long text that just might become antialiased...." - -setFont "arial" 17 -drawText 10 120 "This is a very long text that just might become antialiased...." - -setFont "arial" 18 -drawText 10 140 "This is a very long text that just might become antialiased...." - -setFont "arial" 19 -drawText 10 160 "This is a very long text that just might become antialiased...." - -setFont "arial" 20 -drawText 10 180 "This is a very long text that just might become antialiased...." - diff --git a/tests/arthur/data/qps/drawtext_qps.png b/tests/arthur/data/qps/drawtext_qps.png deleted file mode 100644 index e1a64045da..0000000000 Binary files a/tests/arthur/data/qps/drawtext_qps.png and /dev/null differ diff --git a/tests/arthur/data/qps/ellipses.qps b/tests/arthur/data/qps/ellipses.qps deleted file mode 100644 index 3cec26b587..0000000000 --- a/tests/arthur/data/qps/ellipses.qps +++ /dev/null @@ -1,83 +0,0 @@ - -surface_begin 0 0 600 600 -translate 0 50 - -setPen nopen -setBrush 0x7f000000 -gradient_clearStops -gradient_appendStop 0 red -gradient_appendStop 0.25 orange -gradient_appendStop 0.5 yellow -gradient_appendStop 0.8 green -gradient_appendStop 1 cyan - -gradient_setSpread PadSpread -gradient_setRadial 20 20 220 200 - -drawEllipse 10 10 80 80 -drawEllipse 50 50 120 90 - -translate 100 0 -brushTranslate 40 20 -brushScale 0.25 0.25 - -setPen black - -drawEllipse 10 10 80 80 -setOpacity 0.5 -setCompositionMode SourceIn -drawEllipse 50 50 120 90 -setOpacity 1.0 -setRenderHint Antialiasing -setCompositionMode Xor -brushTranslate 70 0 -translate 100 0 -drawEllipse 10 10 80 80 - -setPen nopen -drawEllipse 50 50 120 90 - -setOpacity 0.7 -setBrush red -translate 100 0 -setCompositionMode SourceOver - -drawEllipse 10 10 80 80 - -setOpacity 0.6 -setPen black 5.0 -gradient_clearStops -gradient_appendStop 0 red -gradient_appendStop 0.25 orange -gradient_appendStop 0.5 yellow -gradient_appendStop 0.8 green -gradient_appendStop 1 cyan - -gradient_setSpread PadSpread -gradient_setLinear 20 20 120 100 -drawEllipse 50 50 120 90 - - -translate 100 0 - -setOpacity 1.0 -drawEllipse 10 10 80 80 - -setCompositionMode SourceIn -setOpacity 0.7 -setPen black 3.0 -gradient_clearStops -gradient_appendStop 0 red -gradient_appendStop 0.25 orange -gradient_appendStop 0.5 yellow -gradient_appendStop 0.8 green -gradient_appendStop 1 cyan - -gradient_setSpread PadSpread -gradient_setLinear 50 50 80 90 -drawEllipse 50 50 120 90 - -surface_end - -drawText 200 220 "Testing Ellipse drawing with varios combinations" -drawText 200 240 "of features such as brushes, pens and composition modes" diff --git a/tests/arthur/data/qps/ellipses_qps.png b/tests/arthur/data/qps/ellipses_qps.png deleted file mode 100644 index f9cc90b11e..0000000000 Binary files a/tests/arthur/data/qps/ellipses_qps.png and /dev/null differ diff --git a/tests/arthur/data/qps/filltest.qps b/tests/arthur/data/qps/filltest.qps deleted file mode 100644 index c6112fea24..0000000000 --- a/tests/arthur/data/qps/filltest.qps +++ /dev/null @@ -1,410 +0,0 @@ -setPen nopen -setBrush red -translate 0 4 -begin_block polys -drawPolygon [0 0 2 -2 4 0] -drawPolygon [0 2 2 4 4 2] -end_block polys -translate 6 .5 -repeat_block polys -translate 6.5 0 -repeat_block polys -translate 6 .5 -repeat_block polys - -resetMatrix - -translate 0 12 -setPen black -drawPolygon [0 0 5 0 5 5 0 5] - -translate 10 0 -setPen nopen -drawPolygon [0 0 5 0 5 5 0 5] - -translate 10 0 -drawPolygon [0 0 5 0 5 5 0 5] - -setBrush black -path_addRect stroke -.5 -.5 6 6 -path_addRect stroke .5 .5 4 4 -drawPath stroke - -resetMatrix - -translate 0 65 - -setPen red -drawText 0 0 "path" -drawText 40 0 "rect" -drawText 80 0 "img" -drawText 120 0 "pix" -drawText 160 0 "brush" -setPen nopen - -translate 0 5 - -image_load border.png img -pixmap_load border.png pix - -path_addRect rect 0 0 10 10 -begin_block rects -drawPath rect -drawRect 40 0 10 10 -drawImage img 80 0 -drawPixmap pix 120 0 -setBrush border.png -drawRect 160 0 10 10 -setBrush black -end_block rects - -setPen red -drawText 180 10 "0.0" -setPen nopen - -translate 0.1 20 -repeat_block rects -setPen red -drawText 180 10 "0.1" -setPen nopen -translate 0.1 20 -repeat_block rects -setPen red -drawText 180 10 "0.2" -setPen nopen -translate 0.1 20 -repeat_block rects -setPen red -drawText 180 10 "0.3" -setPen nopen -translate 0.1 20 -repeat_block rects -setPen red -drawText 180 10 "0.4" -setPen nopen -translate 0.1 20 -repeat_block rects -setPen red -drawText 180 10 "0.5" -setPen nopen -translate 0.1 20 -repeat_block rects -setPen red -drawText 180 10 "0.6" -setPen nopen -translate 0.1 20 -repeat_block rects -setPen red -drawText 180 10 "0.7" -setPen nopen -translate 0.1 20 -repeat_block rects -setPen red -drawText 180 10 "0.8" -setPen nopen -translate 0.1 20 -repeat_block rects -setPen red -drawText 180 10 "0.9" -setPen nopen -translate 0.1 20 -repeat_block rects -setPen red -drawText 180 10 "1.0" -setPen nopen - -resetMatrix - -translate 0 400 - -setPen red -drawText 0 10 "path" -drawText 0 30 "rect" -drawText 0 50 "img" -drawText 0 70 "pix" -drawText 0 90 "brush" -drawText 0 110 "stroke" -drawText 0 130 "scale" -drawText 0 170 "rotate" -setPen nopen - -translate 50 0 - -begin_block rects -drawPath rect -drawRect 0 20 10 10 -drawImage img 0 40 -drawPixmap pix 0 60 -save -setBrush border.png -drawRect 0 80 10 10 -translate 0 100 -setBrush red -setPen black -drawRect 0 0 10 10 -setBrush border.png -setPen nopen -translate 0 20 -scale 2 2 -drawRect 0 0 10 10 -translate 10 20 -rotate 90 -drawRect 0 0 10 10 -restore -end_block rects - -setPen red -drawText -5 -10 "0.0" -setPen nopen - -translate 40 0.1 -repeat_block rects -setPen red -drawText -5 -10 "0.1" -setPen nopen -translate 40 0.1 -repeat_block rects -setPen red -drawText -5 -10 "0.2" -setPen nopen -translate 40 0.1 -repeat_block rects -setPen red -drawText -5 -10 "0.3" -setPen nopen -translate 40 0.1 -repeat_block rects -setPen red -drawText -5 -10 "0.4" -setPen nopen -translate 40 0.1 -repeat_block rects -setPen red -drawText -5 -10 "0.5" -setPen nopen -translate 40 0.1 -repeat_block rects -setPen red -drawText -5 -10 "0.6" -setPen nopen -translate 40 0.1 -repeat_block rects -setPen red -drawText -5 -10 "0.7" -setPen nopen -translate 40 0.1 -repeat_block rects -setPen red -drawText -5 -10 "0.8" -setPen nopen -translate 40 0.1 -repeat_block rects -setPen red -drawText -5 -10 "0.9" -setPen nopen -translate 40 0.1 -repeat_block rects -setPen red -drawText -5 -10 "1.0" -setPen nopen - -resetMatrix - -translate 0 620 - -setPen red -drawText 0 10 "path" -setPen nopen - -path_addRect rect2 -5 -5 10 10 - -translate 55 5 -drawPath rect2 - -translate 20 0 -rotate 10 -drawPath rect2 -rotate -10 -translate 20 0 -rotate 20 -drawPath rect2 -rotate -20 -translate 20 0 -rotate 30 -drawPath rect2 -rotate -30 -translate 20 0 -rotate 40 -drawPath rect2 -rotate -40 -translate 20 0 -rotate 50 -drawPath rect2 -rotate -50 -translate 20 0 -rotate 60 -drawPath rect2 -rotate -60 -translate 20 0 -rotate 70 -drawPath rect2 -rotate -70 -translate 20 0 -rotate 80 -drawPath rect2 -rotate -80 -translate 20 0 -rotate 90 -drawPath rect2 -rotate -90 - -resetMatrix - -translate 0 600 - -setPen red -drawText 0 10 "rect" -setPen nopen - -translate 55 5 -drawRect -5 -5 10 10 - -translate 20 0 -rotate 10 -drawRect -5 -5 10 10 -rotate -10 -translate 20 0 -rotate 20 -drawRect -5 -5 10 10 -rotate -20 -translate 20 0 -rotate 30 -drawRect -5 -5 10 10 -rotate -30 -translate 20 0 -rotate 40 -drawRect -5 -5 10 10 -rotate -40 -translate 20 0 -rotate 50 -drawRect -5 -5 10 10 -rotate -50 -translate 20 0 -rotate 60 -drawRect -5 -5 10 10 -rotate -60 -translate 20 0 -rotate 70 -drawRect -5 -5 10 10 -rotate -70 -translate 20 0 -rotate 80 -drawRect -5 -5 10 10 -rotate -80 -translate 20 0 -rotate 90 -drawRect -5 -5 10 10 -rotate -90 - -resetMatrix -path_addRect vertical 0.1 0.1 0.2 10 - -translate 0 320 -drawPath vertical -translate 2.2 0 -drawPath vertical -translate 2.2 0 -drawPath vertical -translate 2.2 0 -drawPath vertical -translate 2.2 0 -drawPath vertical - -resetMatrix -path_addRect horizontal 0.1 0.1 10 0.2 - -translate 0 340 -drawPath horizontal -translate 0 2.2 -drawPath horizontal -translate 0 2.2 -drawPath horizontal -translate 0 2.2 -drawPath horizontal -translate 0 2.2 -drawPath horizontal - -setOpacity 0.8 -resetMatrix - -translate 0.1 24.7 -translate 400 0 -#rotate 88.8 -rotate 89.9 -setBrush red -drawPolygon [0 0 300 0 0 173] -setBrush green -drawPolygon [0 173 300 0 300 173] - -resetMatrix - -translate 410 24 -path_lineTo left 0 273 -path_lineTo left 300 273 -path_cubicTo left 50 273 250 0 0 0 - -path_cubicTo right 250 0 50 273 300 273 -path_lineTo right 300 0 - -translate 310 0 -rotate 90 -setBrush red -drawPath left -setBrush green -drawPath right - -resetMatrix -translate 0.1 680.1 -setPen red -setOpacity 1 -drawText 115 -20 "0.1" -drawText 0 0 "pixmap w/ opacity" -setOpacity 0.6 -drawPixmap pix 120 -10 -translate 0 20 -setOpacity 1 -drawText 0 0 "image w/ opacity" -setOpacity 0.6 -drawImage img 120 -10 - -resetMatrix -path_lineTo fillpath 0 50 -path_lineTo fillpath 50 50 -path_moveTo fillpath 70 50 -path_lineTo fillpath 70 100 -path_lineTo fillpath 40 100 -translate 500 400 -drawPath fillpath - -resetMatrix -path_moveTo vectorarne 50 10 -path_lineTo vectorarne 50 50 -path_lineTo vectorarne 100 50 -path_addEllipse vectorarne 350 20 230 230 -path_moveTo vectorarne 500 500 -path_cubicTo vectorarne 20 20 250 30 50 150 -translate 500 550 -scale 0.4 0.4 -setRenderHint antialiasing -drawPath vectorarne - -resetMatrix -translate 200 730 -setRenderHint antialiasing off -setOpacity 1 -setPen red -drawText 0 0 "outline/fill consistency" -setPen red -setBrush green -translate 80 -30 -drawPolygon [13.6965 -99.1837 -71.4767 13.823 32.4596 -33.1847] diff --git a/tests/arthur/data/qps/filltest_qps.png b/tests/arthur/data/qps/filltest_qps.png deleted file mode 100644 index 523e08a5ab..0000000000 Binary files a/tests/arthur/data/qps/filltest_qps.png and /dev/null differ diff --git a/tests/arthur/data/qps/fonts.qps b/tests/arthur/data/qps/fonts.qps deleted file mode 100644 index 5d03308b15..0000000000 --- a/tests/arthur/data/qps/fonts.qps +++ /dev/null @@ -1,64 +0,0 @@ -begin_block drawtexts -setPen red -drawLine 0 20 width 20 -setPen blue - -setFont "times" 12 -drawText 0 20 "(times)" - -setFont "times" 12 bold -drawText 100 20 "(times, 12, bold)" - -setFont "times" 12 normal italic -drawText 250 20 "(times, 12, italic)" - -setFont "times" 12 bold italic -drawText 400 20 "(times, 12, bold, italic)" - -translate 0 20 - -setPen red -drawLine 0 20 width 20 -setPen green - -setFont "helvetica" 12 -drawText 0 20 "(helvetica)" - -setFont "helvetica" 12 bold -drawText 100 20 "(helvetica, 12, bold)" - -setFont "helvetica" 12 normal italic -drawText 250 20 "(helvetica, 12, italic)" - -setFont "helvetica" 12 bold italic -drawText 400 20 "(helvetica, 12, bold, italic)" - -translate 0 20 - -setPen red -drawLine 0 20 width 20 -setPen orange - -setFont "courier" 12 -drawText 0 20 "(courier)" - -setFont "courier" 12 bold -drawText 100 20 "(courier, 12, b)" - -setFont "courier" 12 normal italic -drawText 250 20 "(courier, 12, i)" - -setFont "courier" 12 bold italic -drawText 400 20 "(courier, 12, bi)" -end_block - -# Repeat with scale -translate 0 100 -scale 1 2 -repeat_block drawtexts - -# Repeat with rotation -resetMatrix -translate 100 300 -rotate 20 -repeat_block drawtexts diff --git a/tests/arthur/data/qps/fonts_qps.png b/tests/arthur/data/qps/fonts_qps.png deleted file mode 100644 index cc947233f7..0000000000 Binary files a/tests/arthur/data/qps/fonts_qps.png and /dev/null differ diff --git a/tests/arthur/data/qps/gradients.qps b/tests/arthur/data/qps/gradients.qps deleted file mode 100644 index 78750aad34..0000000000 --- a/tests/arthur/data/qps/gradients.qps +++ /dev/null @@ -1,41 +0,0 @@ -drawText 75 20 "Linear" -drawText 176 20 "Radial" -drawText 277 20 "Conical" -translate 0 30 -drawText 0 50 "AA off" -drawText 0 151 "AA on" - -setPen nopen - -gradient_clearStops -gradient_appendStop 0 0x00000000 -gradient_appendStop 0.001 red -gradient_appendStop 0.2 blue -gradient_appendStop 0.4 yellow -gradient_appendStop 0.6 cyan -gradient_appendStop 0.8 green -gradient_appendStop 0.999 red -gradient_appendStop 1 0x00000000 - -gradient_setSpread PadSpread -gradient_setCoordinateMode ObjectBoundingMode - -begin_block row -save -gradient_setLinear 0.1 0.0 0.9 0.0 -drawRect 50 0 100 100 - -gradient_setRadial 0.5 0.5 0.5 0.5 0.5 -translate 101 0 -drawRect 50 0 100 100 - -gradient_setConical 0.5 0.5 45 -translate 101 0 -drawRect 50 0 100 100 -restore -end_block row - -setRenderHint Antialiasing - -translate 0 101 -repeat_block row diff --git a/tests/arthur/data/qps/gradients_qps.png b/tests/arthur/data/qps/gradients_qps.png deleted file mode 100644 index de2342cf96..0000000000 Binary files a/tests/arthur/data/qps/gradients_qps.png and /dev/null differ diff --git a/tests/arthur/data/qps/image_formats.qps b/tests/arthur/data/qps/image_formats.qps deleted file mode 100644 index c586893662..0000000000 --- a/tests/arthur/data/qps/image_formats.qps +++ /dev/null @@ -1,78 +0,0 @@ - -image_load dome_argb32.png the_pixmap -image_convertToFormat the_pixmap the_pixmap ARGB32_Premultiplied - -begin_block draw_stuff - save - image_convertToFormat the_pixmap converted ARGB32_Premultiplied - drawImage converted 0 0 - translate 0 110 - - image_convertToFormat the_pixmap converted ARGB32 - drawImage converted 0 0 - translate 0 110 - - image_convertToFormat the_pixmap converted RGB32 - drawImage converted 0 0 - translate 0 110 - - image_convertToFormat the_pixmap converted Indexed8 - drawImage converted 0 0 - translate 0 110 - - image_convertToFormat the_pixmap converted MonoLSB - drawImage converted 0 0 - translate 0 110 - - image_convertToFormat the_pixmap converted Mono - drawImage converted 0 0 - translate 0 110 - restore -end_block - - -image_load dome_argb32.png the_pixmap -translate 110 0 -repeat_block draw_stuff - - -image_load dome_rgb32.png the_pixmap -translate 110 0 -repeat_block draw_stuff - -image_load dome_indexed.png the_pixmap -translate 110 0 -repeat_block draw_stuff - - -image_load dome_mono.png the_pixmap -translate 110 0 -repeat_block draw_stuff - -image_load dome_mono_palette.png the_pixmap -translate 110 0 -repeat_block draw_stuff - -image_load dome_indexed_mask.png the_pixmap -translate 110 0 -repeat_block draw_stuff - - -# helpful texts -resetMatrix -setPen black - -drawText 10 670 "ARGB32_PM" -drawText 120 670 "ARGB32" -drawText 230 670 "RGB32" -drawText 340 670 "Indexed" -drawText 450 670 "Mono" -drawText 560 670 "Mono w/lut" -drawText 670 670 "Indexed w/mask" - -drawText 770 50 "ARGB32_PM" -drawText 770 160 "ARGB32" -drawText 770 270 "RGB32" -drawText 770 380 "Indexed" -drawText 770 490 "MonoLSB" -drawText 770 600 "Mono" diff --git a/tests/arthur/data/qps/image_formats_qps.png b/tests/arthur/data/qps/image_formats_qps.png deleted file mode 100644 index 5aa348e97a..0000000000 Binary files a/tests/arthur/data/qps/image_formats_qps.png and /dev/null differ diff --git a/tests/arthur/data/qps/images.qps b/tests/arthur/data/qps/images.qps deleted file mode 100644 index 445980c799..0000000000 --- a/tests/arthur/data/qps/images.qps +++ /dev/null @@ -1,103 +0,0 @@ - -setRenderHint Antialiasing - -setPen #00ff00 - -image_load dome_argb32.png the_image -begin_block draw_stuff - -save - - # standard draw - drawImage the_image 0 0 - - # sub recting - translate 120 0 - drawImage the_image 0 0 40 40 0 0 40 40 - drawImage the_image 60 0 40 40 60 0 40 40 - drawImage the_image 0 60 40 40 0 60 40 40 - drawImage the_image 60 60 40 40 60 60 40 40 - drawImage the_image 0 40 40 20 0 40 40 20 - drawImage the_image 60 40 40 20 60 40 40 20 - drawImage the_image 40 0 20 100 40 0 20 100 - - # subrecting w/scale - translate 120 0 - drawImage the_image 0 0 50 50 0 0 25 25 - drawImage the_image 50 0 50 50 25 0 25 25 - drawImage the_image 0 50 50 50 0 25 25 25 - drawImage the_image 50 50 50 50 25 25 25 25 - - # subrecting w/scale & smooth xform - translate 120 0 - setRenderHint SmoothPixmapTransformation - drawImage the_image 0 0 50 50 0 0 25 25 - drawImage the_image 50 0 50 50 25 0 25 25 - drawImage the_image 0 50 50 50 0 25 25 25 - drawImage the_image 50 50 50 50 25 25 25 25 - - - # Rotation w/o smooth xform - translate 120 0 - save - setRenderHint SmoothPixmapTransform off - rotate 10 - drawImage the_image 0 0 - restore - - # Rotation w smooth xform - translate 120 0 - save - setRenderHint SmoothPixmapTransform - rotate 10 - drawImage the_image 0 0 - restore - -restore - -end_block - - -translate 0 120 -image_load dome_rgb32.png the_image -repeat_block draw_stuff - -translate 0 120 -image_load dome_indexed.png the_image -repeat_block draw_stuff - -translate 0 120 -image_load dome_indexed_mask.png the_image -repeat_block draw_stuff - -translate 0 120 -image_load dome_mono.png the_image -repeat_block draw_stuff - - -resetMatrix -translate 700 60 -setPen black -drawText 0 0 "32 bit w/alpha" -translate 0 120 -drawText 0 0 "32 bit w/o alpha" -translate 0 120 -drawText 0 0 "8 bit indexed" -translate 0 120 -drawText 0 0 "8 bit indexed w/mask" -translate 0 120 -drawText 0 0 "1 bit" -resetMatrix -translate 0 600 -drawText 0 0 "normal" -translate 120 0 -drawText 0 0 "subrect" -translate 120 0 -drawText 0 0 "subrect scale" -translate 120 0 -drawText 0 0 "subrect scale smooth" -translate 120 0 -drawText 0 0 "xform" -translate 120 0 -drawText 0 0 "smooth xform" -translate 120 0 diff --git a/tests/arthur/data/qps/images2.qps b/tests/arthur/data/qps/images2.qps deleted file mode 100644 index a4df446f64..0000000000 --- a/tests/arthur/data/qps/images2.qps +++ /dev/null @@ -1,143 +0,0 @@ -image_load dome_argb32.png the_image -begin_block draw_stuff - -save - # standard draw - drawImage the_image 0 0 - - # flip x - translate 220 0 - scale -1 1 - drawImage the_image 0 0 - scale -1 1 - - # flip y - translate 20 100 - scale 1 -1 - drawImage the_image 0 0 - scale 1 -1 - - # flip x and y - translate 220 0 - scale -1 -1 - drawImage the_image 0 0 - scale -1 -1 - - # flip y and scale - translate 20 10 - save - scale 1 -1.1 - drawImage the_image 0 0 - restore - - # flip y and scale - translate 220 -110 - save - scale -1.1 0.9 - drawImage the_image 0 0 - restore -restore -end_block - -setRenderHint Antialiasing - -resetMatrix -translate 0 120 -repeat_block draw_stuff - -resetMatrix -translate 720 60 -setPen black -drawText 0 0 "aliased" -translate 0 120 -drawText 0 0 "antialiased" -resetMatrix -translate 0 260 -drawText 0 0 "normal" -translate 120 0 -drawText 0 0 "flip x" -translate 120 0 -drawText 0 0 "flip y" -translate 120 0 -drawText 0 0 "flip x and y" -translate 120 0 -drawText 0 0 "flip y and scale" -translate 120 0 -drawText 0 0 "flip x and scale" -translate 120 0 - -setRenderHint SmoothPixmapTransform - -resetMatrix -translate 20 300 -drawImage border.png 0 0 100 100 1 1 8 8 -drawText 0 -5 "subrect color bleeding" -translate 0 120 -drawImage border.png 0 0 100 100 0 0 10 10 - -image_load sign.png the_image -resetMatrix -drawText 240 300 "drawImage() with varying sx/sy offsets" -translate 0 10 -drawRect 240 300 50 50 -drawImage the_image 240 300 50 50 20 0 80 80 -drawRect 300 300 50 50 -drawImage the_image 300 300 50 50 -20 0 80 80 -drawRect 240 370 50 50 -drawImage the_image 240 370 50 50 0 20 80 80 -drawRect 300 370 50 50 -drawImage the_image 300 370 50 50 0 -20 80 80 - -pixmap_load sign.png the_pixmap -translate 220 0 -translate 0 -10 -drawText 240 300 "drawPixmap() with varying sx/sy offsets" -translate 0 10 -drawRect 240 300 50 50 -drawPixmap the_pixmap 240 300 50 50 20 0 80 80 -drawRect 300 300 50 50 -drawPixmap the_pixmap 300 300 50 50 -20 0 80 80 -drawRect 240 370 50 50 -drawPixmap the_pixmap 240 370 50 50 0 20 80 80 -drawRect 300 370 50 50 -drawPixmap the_pixmap 300 370 50 50 0 -20 80 80 - - -resetMatrix -translate 0 170 -drawText 240 300 "drawImage() with varying sx/sy offsets" -translate 0 10 -drawRect 240 300 50 50 -drawImage the_image 240 300 50 50 50 0 50 50 -drawRect 300 300 50 50 -drawImage the_image 300 300 50 50 -20 0 50 50 -drawRect 240 370 50 50 -drawImage the_image 240 370 50 50 0 50 50 50 -drawRect 300 370 50 50 -drawImage the_image 300 370 50 50 0 -20 50 50 - -resetMatrix -translate 220 170 -drawText 240 300 "drawPixmap() with varying sx/sy offsets" -translate 0 10 -drawRect 240 300 50 50 -drawPixmap the_pixmap 240 300 50 50 50 0 50 50 -drawRect 300 300 50 50 -drawPixmap the_pixmap 300 300 50 50 -20 0 50 50 -drawRect 240 370 50 50 -drawPixmap the_pixmap 240 370 50 50 0 50 50 50 -drawRect 300 370 50 50 -drawPixmap the_pixmap 300 370 50 50 0 -20 50 50 - -resetMatrix -drawText 10 620 "drawImage/Pixmap() with negative x/y and sx/sy" -setPen red - -translate 20 640 -drawImage the_image -10 -10 -1 -1 -10 -10 0 0 -drawRect 0 0 80 80 - -translate 100 0 -drawPixmap the_pixmap -10 -10 -1 -1 -10 -10 0 0 -drawRect 0 0 80 80 - diff --git a/tests/arthur/data/qps/images2_qps.png b/tests/arthur/data/qps/images2_qps.png deleted file mode 100644 index ee8936a939..0000000000 Binary files a/tests/arthur/data/qps/images2_qps.png and /dev/null differ diff --git a/tests/arthur/data/qps/images_qps.png b/tests/arthur/data/qps/images_qps.png deleted file mode 100644 index af07cc3651..0000000000 Binary files a/tests/arthur/data/qps/images_qps.png and /dev/null differ diff --git a/tests/arthur/data/qps/join_cap_styles.qps b/tests/arthur/data/qps/join_cap_styles.qps deleted file mode 100644 index f2a07f5b7f..0000000000 --- a/tests/arthur/data/qps/join_cap_styles.qps +++ /dev/null @@ -1,60 +0,0 @@ - -setRenderHint Antialiasing - -path_moveTo p 20 20 -path_cubicTo p 100 20 100 180 180 100 -path_lineTo p 20 180 -path_lineTo p 180 20 - -setPen black 20 solidline roundcap roundjoin -drawPath p -setPen red -drawPath p - -translate 200 0 -setPen black 20 solidline roundcap miterjoin -drawPath p -setPen red -drawPath p - -translate 200 0 -setPen black 20 solidline roundcap beveljoin -drawPath p -setPen red -drawPath p - -translate -400 200 -setPen black 20 solidline squarecap roundjoin -drawPath p -setPen red -drawPath p - -translate 200 0 -setPen black 20 solidline squarecap miterjoin -drawPath p -setPen red -drawPath p - -translate 200 0 -setPen black 20 solidline squarecap beveljoin -drawPath p -setPen red -drawPath p - -translate -400 200 -setPen black 20 solidline flatcap roundjoin -drawPath p -setPen red -drawPath p - -translate 200 0 -setPen black 20 solidline flatcap miterjoin -drawPath p -setPen red -drawPath p - -translate 200 0 -setPen black 20 solidline flatcap beveljoin -drawPath p -setPen red -drawPath p diff --git a/tests/arthur/data/qps/join_cap_styles_duplicate_control_points.qps b/tests/arthur/data/qps/join_cap_styles_duplicate_control_points.qps deleted file mode 100644 index d03f059fb6..0000000000 --- a/tests/arthur/data/qps/join_cap_styles_duplicate_control_points.qps +++ /dev/null @@ -1,65 +0,0 @@ - -setRenderHint Antialiasing - -path_moveTo p 40 70 -path_lineTo p 20 70 -path_cubicTo p 20 70 40 20 80 80 - -path_moveTo p 20 120 -path_cubicTo p 50 60 80 110 80 110 -path_lineTo p 60 110 - -scale 2 2 - -setPen black 10 solidline roundcap roundjoin -drawPath p -setPen red -drawPath p - -translate 100 0 -setPen black 10 solidline roundcap miterjoin -drawPath p -setPen red -drawPath p - -translate 100 0 -setPen black 10 solidline roundcap beveljoin -drawPath p -setPen red -drawPath p - -translate -200 100 -setPen black 10 solidline squarecap roundjoin -drawPath p -setPen red -drawPath p - -translate 100 0 -setPen black 10 solidline squarecap miterjoin -drawPath p -setPen red -drawPath p - -translate 100 0 -setPen black 10 solidline squarecap beveljoin -drawPath p -setPen red -drawPath p - -translate -200 100 -setPen black 10 solidline flatcap roundjoin -drawPath p -setPen red -drawPath p - -translate 100 0 -setPen black 10 solidline flatcap miterjoin -drawPath p -setPen red -drawPath p - -translate 100 0 -setPen black 10 solidline flatcap beveljoin -drawPath p -setPen red -drawPath p diff --git a/tests/arthur/data/qps/join_cap_styles_duplicate_control_points_qps.png b/tests/arthur/data/qps/join_cap_styles_duplicate_control_points_qps.png deleted file mode 100644 index b94f57222c..0000000000 Binary files a/tests/arthur/data/qps/join_cap_styles_duplicate_control_points_qps.png and /dev/null differ diff --git a/tests/arthur/data/qps/join_cap_styles_qps.png b/tests/arthur/data/qps/join_cap_styles_qps.png deleted file mode 100644 index 378d29e781..0000000000 Binary files a/tests/arthur/data/qps/join_cap_styles_qps.png and /dev/null differ diff --git a/tests/arthur/data/qps/linear_gradients.qps b/tests/arthur/data/qps/linear_gradients.qps deleted file mode 100644 index 2f3c80f2a6..0000000000 --- a/tests/arthur/data/qps/linear_gradients.qps +++ /dev/null @@ -1,141 +0,0 @@ -path_addRect path 400 0 80 80 -path_addEllipse path 440 40 60 60 - -setRenderHint Antialiasing - -setPen black - -begin_block gradients -gradient_clearStops -gradient_appendStop 0 red -gradient_appendStop 0.25 orange -gradient_appendStop 0.5 yellow -gradient_appendStop 0.8 green -gradient_appendStop 1 cyan - -gradient_setSpread PadSpread -gradient_setLinear 20 20 70 70 -drawRect 0 0 100 100 - -gradient_setSpread ReflectSpread -gradient_setLinear 120 20 170 70 -drawEllipse 100 0 100 100 - -gradient_setSpread RepeatSpread -gradient_setLinear 220 20 270 70 -drawRoundRect 200 0 100 100 - -gradient_clearStops -gradient_appendStop 0 3f7f7fff -gradient_appendStop 0.5 dfdfffff -gradient_appendStop 1 7f00007f - -gradient_setSpread PadSpread -gradient_setLinear 320 20 340 40 -drawPolygon [300 0 390 0 350 99] - -gradient_setSpread ReflectSpread -gradient_setLinear 420 20 440 40 -drawPath path - -gradient_setSpread RepeatSpread -gradient_setLinear 520 20 540 40 -drawPie 500 0 100 100 720 4320 -end_block - -translate 0 100 -scale 1 2 -repeat_block gradients - -resetMatrix -translate 0 300 -brushTranslate 30 0 -brushScale 0.9 0.9 -brushRotate 20 -repeat_block gradients - -# Vertical gradient tests -resetMatrix -setBrush noBrush -translate 0 400 - -begin_block vertical_gradients -gradient_clearStops -gradient_appendStop 0 red -gradient_appendStop 0.25 orange -gradient_appendStop 0.5 yellow -gradient_appendStop 0.8 green -gradient_appendStop 1 cyan - -gradient_setSpread PadSpread -gradient_setLinear 20 20 20 70 -drawRect 0 0 100 100 - -gradient_setSpread ReflectSpread -gradient_setLinear 120 20 120 70 -drawEllipse 100 0 100 100 - -gradient_setSpread RepeatSpread -gradient_setLinear 220 20 220 70 -drawRoundRect 200 0 100 100 - -gradient_clearStops -gradient_appendStop 0 3f7f7fff -gradient_appendStop 0.5 dfdfffff -gradient_appendStop 1 7f00007f - -gradient_setSpread PadSpread -gradient_setLinear 320 20 320 40 -drawPolygon [300 0 390 0 350 99] - -gradient_setSpread ReflectSpread -gradient_setLinear 420 20 420 40 -drawPath path - -gradient_setSpread RepeatSpread -gradient_setLinear 520 20 520 40 -drawPie 500 0 100 100 720 4320 -end_block - -translate 0 100 -scale 1 1.5 -repeat_block vertical_gradients - -resetMatrix -translate 0 650 -brushTranslate 30 0 -brushScale 0.9 0.9 -brushRotate 20 -repeat_block vertical_gradients - -# Some helpful info perhaps? -resetMatrix -setPen black -# gradient line indicators -drawLine 20 20 70 70 -drawLine 120 20 170 70 -drawLine 220 20 270 70 -drawLine 320 20 340 40 -drawLine 420 20 440 40 -drawLine 520 20 540 40 - -drawLine 20 140 70 240 -drawLine 120 140 170 240 -drawLine 220 140 270 240 -drawLine 320 140 340 180 -drawLine 420 140 440 180 -drawLine 520 140 540 180 - -drawText 610 50 "No XForm" -drawText 610 200 "scale 1x2" -drawText 610 350 "brush transform" -drawText 610 450 "vertical brush" -drawText 610 570 "vertical brush scale 1x1.5" -drawText 610 700 "vertical brush transform" - -drawText 10 780 "Pad" -drawText 110 780 "Reflect" -drawText 210 780 "Repeat" -drawText 310 780 "Pad w/alpha" -drawText 410 780 "Reflect w/alpha" -drawText 510 780 "Repeat w/alpha" diff --git a/tests/arthur/data/qps/linear_gradients_perspectives.qps b/tests/arthur/data/qps/linear_gradients_perspectives.qps deleted file mode 100644 index 4d619b5ccd..0000000000 --- a/tests/arthur/data/qps/linear_gradients_perspectives.qps +++ /dev/null @@ -1,60 +0,0 @@ - -setRenderHint Antialiasing - -setPen #00ff00 - -translate 10 10 -# standard draw -begin_block gradient -gradient_clearStops -gradient_appendStop 0 red -gradient_appendStop 0.25 orange -gradient_appendStop 0.5 yellow -gradient_appendStop 0.8 green -gradient_appendStop 1 cyan - -gradient_setSpread PadSpread -gradient_setLinear 10 10 290 290 -drawRect 0 0 300 300 -end_block gradient - -# Rotation w/o smooth xform -save -translate 350 0 -save - setRenderHint SmoothPixmapTransform on - mapQuadToQuad 0 0 0 300 300 300 300 0 0 50 0 200 300 300 300 0 - repeat_block gradient -restore -restore - -translate 0 320 - -save - setRenderHint SmoothPixmapTransform on - mapQuadToQuad 0 0 0 300 300 300 300 0 0 0 100 300 200 300 300 0 - repeat_block gradient -restore - -save -translate 350 0 -save - setRenderHint SmoothPixmapTransform on - mapQuadToQuad 0 0 0 300 300 300 300 0 0 0 0 300 300 250 300 50 - repeat_block gradient -restore -restore - - -resetMatrix -setPen black -translate 125 20 -drawText 0 0 "No transform" -translate 350 0 -drawText 0 0 "Left Tilted" -resetMatrix -translate 125 350 -drawText 0 0 "Bottom Tilted" -translate 350 0 -drawText 0 0 "Right Tilted" -translate 120 0 diff --git a/tests/arthur/data/qps/linear_gradients_perspectives_qps.png b/tests/arthur/data/qps/linear_gradients_perspectives_qps.png deleted file mode 100644 index 3315ebe498..0000000000 Binary files a/tests/arthur/data/qps/linear_gradients_perspectives_qps.png and /dev/null differ diff --git a/tests/arthur/data/qps/linear_gradients_qps.png b/tests/arthur/data/qps/linear_gradients_qps.png deleted file mode 100644 index a4cdc436a7..0000000000 Binary files a/tests/arthur/data/qps/linear_gradients_qps.png and /dev/null differ diff --git a/tests/arthur/data/qps/linear_resolving_gradients.qps b/tests/arthur/data/qps/linear_resolving_gradients.qps deleted file mode 100644 index 2ad9c00876..0000000000 --- a/tests/arthur/data/qps/linear_resolving_gradients.qps +++ /dev/null @@ -1,75 +0,0 @@ -setRenderHint Antialiasing - -setPen black - -begin_block gradients -gradient_clearStops -gradient_appendStop 0 red -gradient_appendStop 0.25 orange -gradient_appendStop 0.5 yellow -gradient_appendStop 0.8 green -gradient_appendStop 1 cyan - -gradient_setSpread PadSpread -gradient_setCoordinateMode ObjectBoundingMode -gradient_setLinear 0.2 0.2 0.7 0.7 -drawRect 0 0 100 100 - -gradient_setSpread ReflectSpread -gradient_setLinear 0.2 0.2 0.7 0.7 -drawEllipse 100 0 100 100 - -gradient_setSpread RepeatSpread -gradient_setLinear 0.2 0.2 0.7 0.7 -drawRoundRect 200 0 100 100 - -gradient_clearStops -gradient_appendStop 0 3f7f7fff -gradient_appendStop 0.5 dfdfffff -gradient_appendStop 1 7f00007f - -gradient_setSpread PadSpread -gradient_setLinear 0.2 0.2 0.8 0.4 -drawPolygon [300 0 400 0 350 100] - -gradient_setSpread RepeatSpread -gradient_setLinear 0.2 0.2 0.4 0.4 -drawPie 400 0 100 100 720 4320 -end_block - -translate 0 100 -scale 1 2 -repeat_block gradients - -resetMatrix -translate 0 300 -brushTranslate 30 0 -brushScale 0.9 0.9 -brushRotate 20 -repeat_block gradients - -# Some helpful info perhaps? -resetMatrix -setPen black -# gradient line indicators -drawLine 20 20 70 70 -drawLine 120 20 170 70 -drawLine 220 20 270 70 -drawLine 320 20 340 40 -drawLine 420 20 440 40 - -drawLine 20 140 70 240 -drawLine 120 140 170 240 -drawLine 220 140 270 240 -drawLine 320 140 340 180 -drawLine 420 140 440 180 - -drawText 510 50 "No XForm" -drawText 510 200 "scale 1x2" -drawText 510 300 "brush transform" - -drawText 10 450 "Pad" -drawText 110 450 "Reflect" -drawText 210 450 "Repeat" -drawText 310 450 "Pad w/alpha" -drawText 410 450 "Repeat w/alpha" diff --git a/tests/arthur/data/qps/linear_resolving_gradients_qps.png b/tests/arthur/data/qps/linear_resolving_gradients_qps.png deleted file mode 100644 index 2c1c996e92..0000000000 Binary files a/tests/arthur/data/qps/linear_resolving_gradients_qps.png and /dev/null differ diff --git a/tests/arthur/data/qps/lineconsistency.qps b/tests/arthur/data/qps/lineconsistency.qps deleted file mode 100644 index c4b9cafb86..0000000000 --- a/tests/arthur/data/qps/lineconsistency.qps +++ /dev/null @@ -1,70 +0,0 @@ -begin_block draw -setPen red -drawPolygon [1.1 1 3.3 30.6 23.1 39.2 38.9 6.5] -setPen black -drawLine 1.1 1 3.3 30.6 -drawLine 3.3 30.6 23.1 39.2 -drawLine 23.1 39.2 38.9 6.5 -drawLine 38.9 6.5 1.1 1 -end_block draw -drawText 0 60 "0.0 aligned" -translate 0.1 80.1 -repeat_block draw -drawText 0 60 "0.1 aligned" -translate 0.1 80.1 -repeat_block draw -drawText 0 60 "0.2 aligned" -translate 0.1 80.1 -repeat_block draw -drawText 0 60 "0.3 aligned" -translate 0.1 80.1 -repeat_block draw -drawText 0 60 "0.4 aligned" -translate 0.1 80.1 -repeat_block draw -drawText 0 60 "0.5 aligned" -translate 0.1 80.1 -repeat_block draw -drawText 0 60 "0.6 aligned" -translate 0.1 80.1 -repeat_block draw -drawText 0 60 "0.7 aligned" -translate 0.1 80.1 -repeat_block draw -drawText 0 60 "0.8 aligned" -translate 0.1 80.1 -repeat_block draw -drawText 0 60 "0.9 aligned" - -resetMatrix -translate 100 0 -setPen black -drawText 0 20 "Line and text, 0.0 aligned" -drawLine 0 21 160 21 -translate 0 40.1 -drawText 0 20 "Line and text, 0.1 aligned" -drawLine 0 21 160 21 -translate 0 40.1 -drawText 0 20 "Line and text, 0.2 aligned" -drawLine 0 21 160 21 -translate 0 40.1 -drawText 0 20 "Line and text, 0.3 aligned" -drawLine 0 21 160 21 -translate 0 40.1 -drawText 0 20 "Line and text, 0.4 aligned" -drawLine 0 21 160 21 -translate 0 40.1 -drawText 0 20 "Line and text, 0.5 aligned" -drawLine 0 21 160 21 -translate 0 40.1 -drawText 0 20 "Line and text, 0.6 aligned" -drawLine 0 21 160 21 -translate 0 40.1 -drawText 0 20 "Line and text, 0.7 aligned" -drawLine 0 21 160 21 -translate 0 40.1 -drawText 0 20 "Line and text, 0.8 aligned" -drawLine 0 21 160 21 -translate 0 40.1 -drawText 0 20 "Line and text, 0.9 aligned" -drawLine 0 21 160 21 diff --git a/tests/arthur/data/qps/lineconsistency_qps.png b/tests/arthur/data/qps/lineconsistency_qps.png deleted file mode 100644 index 9d19a5dffa..0000000000 Binary files a/tests/arthur/data/qps/lineconsistency_qps.png and /dev/null differ diff --git a/tests/arthur/data/qps/linedashes.qps b/tests/arthur/data/qps/linedashes.qps deleted file mode 100644 index 60c49eba14..0000000000 --- a/tests/arthur/data/qps/linedashes.qps +++ /dev/null @@ -1,92 +0,0 @@ -translate 10 10 - -setPen 0xffff0000 0 solidline squarecap -translate 50 50 -begin_block draw_lines - save - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - restore -end_block - -setPen 0xffff0000 0 dotline squarecap -translate 100 0 -repeat_block draw_lines -setPen 0xffff0000 0 dashdotline squarecap -translate 100 0 -repeat_block draw_lines -setPen 0xffff0000 0 dashdotdotline squarecap -translate 100 0 -repeat_block draw_lines -setPen 0xffff0000 0 dashline squarecap -translate 100 0 -repeat_block draw_lines diff --git a/tests/arthur/data/qps/linedashes2.qps b/tests/arthur/data/qps/linedashes2.qps deleted file mode 100644 index 3ea2a17bd6..0000000000 --- a/tests/arthur/data/qps/linedashes2.qps +++ /dev/null @@ -1,151 +0,0 @@ -translate -30 10 - -setPen 0xffff0000 0 dashline squarecap -pen_setDashPattern [10 5] - -save -translate 100 100 -begin_block lines -drawLine 100 100 200 100 -drawLine 100 100 200 200 -drawLine 100 100 100 200 -end_block - -setPen 0xffff0000 2 dashline squarecap -translate 150 0 -repeat_block lines -restore - -save -save -begin_block horizontal -drawLine 0 0 50 0 -drawLine 3 10 53 10 -drawLine 6 20 56 20 -drawLine 9 30 59 30 - -translate 0 50 - -drawLine 0 0 50 5 -drawLine 3 10 53 15 -drawLine 6 20 56 25 -drawLine 9 30 59 35 - -translate 0 50 - -drawLine 0 0 50 -5 -drawLine 3 10 53 5 -drawLine 6 20 56 15 -drawLine 9 30 59 25 -end_block -restore - -save -translate 80 0 -repeat_block horizontal -restore -save -translate 800 0 -repeat_block horizontal -restore - -translate 180 -40 -save -begin_block vertical -drawLine 0 0 0 50 -drawLine 10 3 10 53 -drawLine 20 6 20 56 -drawLine 30 9 30 59 - -translate 50 0 - -drawLine 0 0 5 50 -drawLine 10 3 15 53 -drawLine 20 6 25 56 -drawLine 30 9 35 59 - -translate 50 0 - -drawLine 0 0 -5 50 -drawLine 10 3 5 53 -drawLine 20 6 15 56 -drawLine 30 9 25 59 -end_block -restore - -save -translate 0 80 -repeat_block vertical -restore -translate 0 800 -repeat_block vertical -restore - -translate 0 200 - -setPen 0xffff0000 2 dashline squarecap -save -repeat_block horizontal -restore -save -translate 80 0 -repeat_block horizontal -restore -save -translate 780 0 -repeat_block horizontal -restore - -translate 360 -240 -save -repeat_block vertical -restore -save -translate 0 80 -repeat_block vertical -restore -translate 0 780 -repeat_block vertical - -resetMatrix -translate 40 400 -setPen 0xffff0000 5 dashdotline flatcap -pen_setDashPattern [1 1 4 1 1 4] -pen_setDashOffset -4 -drawLine 0 0 300 0 -translate 0 8 -pen_setDashOffset -2 -drawLine 0 0 300 0 -translate 0 8 -pen_setDashOffset 0 -drawLine 0 0 300 0 -translate 0 8 -pen_setDashOffset 2 -drawLine 0 0 300 0 -translate 0 8 -pen_setDashOffset 4 -drawLine 0 0 300 0 -translate 0 8 -pen_setDashOffset 6 -drawLine 0 0 300 0 -translate 0 8 -pen_setDashOffset 8 -drawLine 0 0 300 0 -translate 0 8 -pen_setDashOffset 10 -drawLine 0 0 300 0 -translate 0 8 -pen_setDashOffset 12 -drawLine 0 0 300 0 -translate 0 8 -pen_setDashOffset 14 -drawLine 0 0 300 0 -translate 0 8 -pen_setDashOffset 16 -drawLine 0 0 300 0 - -resetMatrix -setPen black 3 dashdotline -pen_setCosmetic true -translate 0 -150 -drawLine 500 160 500 410 diff --git a/tests/arthur/data/qps/linedashes2_aa.qps b/tests/arthur/data/qps/linedashes2_aa.qps deleted file mode 100644 index 299674c697..0000000000 --- a/tests/arthur/data/qps/linedashes2_aa.qps +++ /dev/null @@ -1,2 +0,0 @@ -setRenderHint LineAntialiasing -import "linedashes2.qps" diff --git a/tests/arthur/data/qps/linedashes2_aa_qps.png b/tests/arthur/data/qps/linedashes2_aa_qps.png deleted file mode 100644 index 54c84b3ea9..0000000000 Binary files a/tests/arthur/data/qps/linedashes2_aa_qps.png and /dev/null differ diff --git a/tests/arthur/data/qps/linedashes2_qps.png b/tests/arthur/data/qps/linedashes2_qps.png deleted file mode 100644 index 1d3555e3b0..0000000000 Binary files a/tests/arthur/data/qps/linedashes2_qps.png and /dev/null differ diff --git a/tests/arthur/data/qps/linedashes_qps.png b/tests/arthur/data/qps/linedashes_qps.png deleted file mode 100644 index 9eaa7a56df..0000000000 Binary files a/tests/arthur/data/qps/linedashes_qps.png and /dev/null differ diff --git a/tests/arthur/data/qps/lines.qps b/tests/arthur/data/qps/lines.qps deleted file mode 100644 index 560d034307..0000000000 --- a/tests/arthur/data/qps/lines.qps +++ /dev/null @@ -1,555 +0,0 @@ - -translate 10 10 - -begin_block draw_lines - save - translate 50 50 - - save - setPen 0x7fff0000 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - restore - - # and then draw the lines the other direction - save - setPen 0x7f0000ff - drawLine 50 0 10 0 - rotate 10 - drawLine 50 0 10 0 - rotate 10 - drawLine 50 0 10 0 - rotate 10 - drawLine 50 0 10 0 - rotate 10 - drawLine 50 0 10 0 - rotate 10 - drawLine 50 0 10 0 - rotate 10 - drawLine 50 0 10 0 - rotate 10 - drawLine 50 0 10 0 - rotate 10 - drawLine 50 0 10 0 - rotate 10 - drawLine 50 0 10 0 - rotate 10 - drawLine 50 0 10 0 - rotate 10 - drawLine 50 0 10 0 - rotate 10 - drawLine 50 0 10 0 - rotate 10 - drawLine 50 0 10 0 - rotate 10 - drawLine 50 0 10 0 - rotate 10 - drawLine 50 0 10 0 - rotate 10 - drawLine 50 0 10 0 - rotate 10 - drawLine 50 0 10 0 - rotate 10 - drawLine 50 0 10 0 - rotate 10 - drawLine 50 0 10 0 - rotate 10 - drawLine 50 0 10 0 - rotate 10 - drawLine 50 0 10 0 - rotate 10 - drawLine 50 0 10 0 - rotate 10 - drawLine 50 0 10 0 - rotate 10 - drawLine 50 0 10 0 - rotate 10 - drawLine 50 0 10 0 - rotate 10 - drawLine 50 0 10 0 - rotate 10 - drawLine 50 0 10 0 - rotate 10 - drawLine 50 0 10 0 - rotate 10 - drawLine 50 0 10 0 - rotate 10 - drawLine 50 0 10 0 - rotate 10 - drawLine 50 0 10 0 - rotate 10 - drawLine 50 0 10 0 - rotate 10 - drawLine 50 0 10 0 - rotate 10 - drawLine 50 0 10 0 - rotate 10 - drawLine 50 0 10 0 - restore - - # and now with a clip - save - setClipRect -30 -30 60 60 - setPen 0x7f00ff00 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - rotate 10 - drawLine 10 0 50 0 - restore - - restore -end_block - -save - translate 100 0 - scale 2 2 - repeat_block draw_lines -restore - -translate 0 10 - -save - translate 0 200 - setRenderHint Antialiasing - repeat_block draw_lines -restore - -save - translate 100 200 - scale 2 2 - setRenderHint Antialiasing - repeat_block draw_lines -restore - -translate 320 0 - -setPen black 0 solidline squarecap - -begin_block lines - -# 0 -> 45 degress -drawLine 100 100 200 90 -drawLine 100 100 200 80 -drawLine 100 100 200 70 -drawLine 100 100 200 60 -drawLine 100 100 200 50 -drawLine 100 100 200 40 -drawLine 100 100 200 30 -drawLine 100 100 200 20 -drawLine 100 100 200 10 - -# 45 -drawLine 100 100 200 0 - -# 45 -> 90 -drawLine 100 100 190 0 -drawLine 100 100 180 0 -drawLine 100 100 170 0 -drawLine 100 100 160 0 -drawLine 100 100 150 0 -drawLine 100 100 140 0 -drawLine 100 100 130 0 -drawLine 100 100 120 0 -drawLine 100 100 110 0 - -# 90 -drawLine 100 100 100 0 - -# 90 -> 135 -drawLine 100 100 90 0 -drawLine 100 100 80 0 -drawLine 100 100 70 0 -drawLine 100 100 60 0 -drawLine 100 100 50 0 -drawLine 100 100 40 0 -drawLine 100 100 30 0 -drawLine 100 100 20 0 -drawLine 100 100 10 0 - -# 135 -drawLine 100 100 0 0 - -# 135 -> 180 degress -drawLine 100 100 0 10 -drawLine 100 100 0 20 -drawLine 100 100 0 30 -drawLine 100 100 0 40 -drawLine 100 100 0 50 -drawLine 100 100 0 60 -drawLine 100 100 0 70 -drawLine 100 100 0 80 -drawLine 100 100 0 90 - -# 180 -drawLine 100 100 0 100 - -# 180 -> 225 -drawLine 100 100 0 110 -drawLine 100 100 0 120 -drawLine 100 100 0 130 -drawLine 100 100 0 140 -drawLine 100 100 0 150 -drawLine 100 100 0 160 -drawLine 100 100 0 170 -drawLine 100 100 0 180 -drawLine 100 100 0 190 - -# 225 -drawLine 100 100 0 200 - -# 225 -> 270 -drawLine 100 100 10 200 -drawLine 100 100 20 200 -drawLine 100 100 30 200 -drawLine 100 100 40 200 -drawLine 100 100 50 200 -drawLine 100 100 60 200 -drawLine 100 100 70 200 -drawLine 100 100 80 200 -drawLine 100 100 90 200 - -# 270 -drawLine 100 100 100 200 - -# 270 -> 315 degrees -drawLine 100 100 110 200 -drawLine 100 100 120 200 -drawLine 100 100 130 200 -drawLine 100 100 140 200 -drawLine 100 100 150 200 -drawLine 100 100 160 200 -drawLine 100 100 170 200 -drawLine 100 100 180 200 -drawLine 100 100 190 200 - -# 315 -drawLine 100 100 200 200 - -# 315 -> 360 degress -drawLine 100 100 200 100 -drawLine 100 100 200 110 -drawLine 100 100 200 120 -drawLine 100 100 200 130 -drawLine 100 100 200 140 -drawLine 100 100 200 150 -drawLine 100 100 200 160 -drawLine 100 100 200 170 -drawLine 100 100 200 180 -drawLine 100 100 200 190 - -end_block - - -setRenderHint Antialiasing -setPen 0x7fff0000 -translate 0.5 0.5 -repeat_block lines - -setPen 0x000000 8 -translate 20 240 -drawText 0 0 "Steep slopes:" - -translate 0 10 - -drawLine 0 0 -8 400 -translate 20 0 -drawLine 0 0 -7 400 -translate 20 0 -drawLine 0 0 -6 400 -translate 20 0 -drawLine 0 0 -5 400 -translate 20 0 -drawLine 0 0 -4 400 -translate 20 0 -drawLine 0 0 -3 400 -translate 20 0 -drawLine 0 0 -2 400 -translate 20 0 -drawLine 0 0 -1 400 -translate 20 0 -drawLine 0 0 0 400 -translate 20 0 -drawLine 0 0 1 400 -translate 20 0 -drawLine 0 0 2 400 -translate 20 0 -drawLine 0 0 3 400 -translate 20 0 -drawLine 0 0 4 400 -translate 20 0 -drawLine 0 0 5 400 -translate 20 0 -drawLine 0 0 6 400 -translate 20 0 -drawLine 0 0 7 400 -translate 20 0 -drawLine 0 0 8 400 - -resetMatrix - -translate 20 450 - -drawText 0 0 "Zero length lines:" - -translate 0 20 -drawText 100 10 "Square cap" -save -begin_block points -setPen 0x000000 1 solidline squarecap -drawLine 0 0 0 0 -setPen 0x000000 2 solidline squarecap -drawLine 8 0 8 0 -setPen 0x000000 3 solidline squarecap -drawLine 16 0 16 0 -setPen 0x000000 4 solidline squarecap -drawLine 24 0 24 0 -setPen 0x000000 5 solidline squarecap -drawLine 32 0 32 0 -setPen 0x000000 6 solidline squarecap -drawLine 40 0 40 0 -setPen 0x000000 7 solidline squarecap -drawLine 48 0 48 0 -setPen 0x000000 8 solidline squarecap -drawLine 57 0 57 0 -setPen 0x000000 9 solidline squarecap -drawLine 67 0 67 0 -setPen 0x000000 10 solidline squarecap -drawLine 78 0 78 0 -end_block points -restore - -translate 0 12 -setRenderHint Antialiasing off -repeat_block points -setRenderHint Antialiasing - -translate 0 20 -drawText 100 10 "Round cap" -save -begin_block points2 -setPen 0x000000 1 solidline roundcap -drawLine 0 0 0 0 -setPen 0x000000 2 solidline roundcap -drawLine 8 0 8 0 -setPen 0x000000 3 solidline roundcap -drawLine 16 0 16 0 -setPen 0x000000 4 solidline roundcap -drawLine 24 0 24 0 -setPen 0x000000 5 solidline roundcap -drawLine 32 0 32 0 -setPen 0x000000 6 solidline roundcap -drawLine 40 0 40 0 -setPen 0x000000 7 solidline roundcap -drawLine 48 0 48 0 -setPen 0x000000 8 solidline roundcap -drawLine 57 0 57 0 -setPen 0x000000 9 solidline roundcap -drawLine 67 0 67 0 -setPen 0x000000 10 solidline roundcap -drawLine 78 0 78 0 -end_block points2 -restore - -translate 0 12 -setRenderHint Antialiasing off -repeat_block points2 -setRenderHint Antialiasing - -translate 0 20 -drawText 100 10 "Flat cap" -save -begin_block points3 -setPen 0x000000 1 solidline flatcap -drawLine 0 0 0 0 -setPen 0x000000 2 solidline flatcap -drawLine 8 0 8 0 -setPen 0x000000 3 solidline flatcap -drawLine 16 0 16 0 -setPen 0x000000 4 solidline flatcap -drawLine 24 0 24 0 -setPen 0x000000 5 solidline flatcap -drawLine 32 0 32 0 -setPen 0x000000 6 solidline flatcap -drawLine 40 0 40 0 -setPen 0x000000 7 solidline flatcap -drawLine 48 0 48 0 -setPen 0x000000 8 solidline flatcap -drawLine 57 0 57 0 -setPen 0x000000 9 solidline flatcap -drawLine 67 0 67 0 -setPen 0x000000 10 solidline flatcap -drawLine 78 0 78 0 -end_block points3 -restore - -translate 0 12 -setRenderHint Antialiasing off -repeat_block points3 - -resetMatrix -translate -220 667.226 -drawText 230 -80 "Task 194266 (should see only one line):" -setPen black -drawRect 230.5 -70.5 122 12 -setRenderHint Antialiasing -setPen red -drawLine 236.842105263 -63.775117299 247.368421053 -63.775437504 - -setRenderHint Antialiasing off -resetMatrix -translate 10 640 -setPen black -drawText 0 -10 "Task 207147 (should see two lines):" -drawRect 0.5 0.5 64 64 -setRenderHint Antialiasing -setPen red - -drawLine 4.5 4.5 4.5001 60.5 -drawLine 4.5 4.5 60.5 4.5001 - -setRenderHint Antialiasing off -resetMatrix -translate 10 730 -setPen black -drawText 0 -10 "Task 229459 (should see one diagonal line):" -drawRect 0.5 0.5 64 64 -setPen red 2 solidline flatcap - -setClipRect 2 2 63 63 -drawLine 1.5 1.5 33560000 33560000 diff --git a/tests/arthur/data/qps/lines2.qps b/tests/arthur/data/qps/lines2.qps deleted file mode 100644 index d1a658c46d..0000000000 --- a/tests/arthur/data/qps/lines2.qps +++ /dev/null @@ -1,176 +0,0 @@ -translate 10 20 -drawText 0 0 "Thin lines" - -translate 60 70 - -save -begin_block lines -translate 0 -60 -translate 0 5 -setPen 0x000000 0.05 -drawLine -60 -2 60 2 -translate 0 5 -setPen 0x000000 0.1 -drawLine -60 -2 60 2 -translate 0 5 -setPen 0x000000 0.15 -drawLine -60 -2 60 2 -translate 0 5 -setPen 0x000000 0.2 -drawLine -60 -2 60 2 -translate 0 5 -setPen 0x000000 0.25 -drawLine -60 -2 60 2 -translate 0 5 -setPen 0x000000 0.3 -drawLine -60 -2 60 2 -translate 0 5 -setPen 0x000000 0.35 -drawLine -60 -2 60 2 -translate 0 5 -setPen 0x000000 0.2 -drawLine -60 -2 60 2 -translate 0 5 -setPen 0x000000 0.25 -drawLine -60 -2 60 2 -translate 0 5 -setPen 0x000000 0.5 -drawLine -60 -2 60 2 -translate 0 5 -setPen 0x000000 0.55 -drawLine -60 -2 60 2 -translate 0 5 -setPen 0x000000 0.6 -drawLine -60 -2 60 2 -translate 0 5 -setPen 0x000000 0.65 -drawLine -60 -2 60 2 -translate 0 5 -setPen 0x000000 0.7 -drawLine -60 -2 60 2 -translate 0 5 -setPen 0x000000 0.75 -drawLine -60 -2 60 2 -translate 0 5 -setPen 0x000000 0.8 -drawLine -60 -2 60 2 -translate 0 5 -setPen 0x000000 0.85 -drawLine -60 -2 60 2 -translate 0 5 -setPen 0x000000 0.9 -drawLine -60 -2 60 2 -translate 0 5 -setPen 0x000000 0.95 -drawLine -60 -2 60 2 -translate 0 5 -setPen 0x000000 1 -drawLine -60 -2 60 2 -translate 0 5 -setPen 0x000000 1.05 -drawLine -60 -2 60 2 -translate 0 5 -setPen 0x000000 1.1 -drawLine -60 -2 60 2 -translate 0 5 -setPen 0x000000 1.15 -drawLine -60 -2 60 2 -translate 0 5 -setPen 0x000000 1.2 -drawLine -60 -2 60 2 -translate 0 5 -setPen 0x000000 1.25 -drawLine -60 -2 60 2 -translate 0 5 -setPen 0x000000 1.3 -drawLine -60 -2 60 2 -translate 0 5 -setPen 0x000000 1.35 -drawLine -60 -2 60 2 -translate 0 5 -setPen 0x000000 1.2 -drawLine -60 -2 60 2 -translate 0 5 -setPen 0x000000 1.25 -drawLine -60 -2 60 2 -translate 0 5 -setPen 0x000000 1.5 -drawLine -60 -2 60 2 -translate 0 5 -setPen 0x000000 1.55 -drawLine -60 -2 60 2 -translate 0 5 -setPen 0x000000 1.6 -drawLine -60 -2 60 2 -translate 0 5 -setPen 0x000000 1.65 -drawLine -60 -2 60 2 -translate 0 5 -setPen 0x000000 1.7 -drawLine -60 -2 60 2 -translate 0 5 -setPen 0x000000 1.75 -drawLine -60 -2 60 2 -translate 0 5 -setPen 0x000000 1.8 -drawLine -60 -2 60 2 -translate 0 5 -setPen 0x000000 1.85 -drawLine -60 -2 60 2 -translate 0 5 -setPen 0x000000 1.9 -drawLine -60 -2 60 2 -translate 0 5 -setPen 0x000000 1.95 -drawLine -60 -2 60 2 -translate 0 5 -setPen 0x000000 2 -drawLine -60 -2 60 2 -end_block -restore - -save -translate 150 0 -scale -1 1 -repeat_block lines -restore - -save -translate 80 220 -rotate 90 -repeat_block lines -restore - -save -translate 80 370 -rotate 90 -scale -1 1 -repeat_block lines -restore - -setRenderHint Antialiasing - -translate 300 0 - -save -repeat_block lines -restore - -save -translate 150 0 -scale -1 1 -repeat_block lines -restore - -save -translate 80 220 -rotate 90 -repeat_block lines -restore - -save -translate 80 370 -rotate 90 -scale -1 1 -repeat_block lines -restore diff --git a/tests/arthur/data/qps/lines2_qps.png b/tests/arthur/data/qps/lines2_qps.png deleted file mode 100644 index 54dcd927ce..0000000000 Binary files a/tests/arthur/data/qps/lines2_qps.png and /dev/null differ diff --git a/tests/arthur/data/qps/lines_qps.png b/tests/arthur/data/qps/lines_qps.png deleted file mode 100644 index ec8cc19fe4..0000000000 Binary files a/tests/arthur/data/qps/lines_qps.png and /dev/null differ diff --git a/tests/arthur/data/qps/object_bounding_mode.qps b/tests/arthur/data/qps/object_bounding_mode.qps deleted file mode 100644 index 3024c28682..0000000000 --- a/tests/arthur/data/qps/object_bounding_mode.qps +++ /dev/null @@ -1,35 +0,0 @@ -setRenderHint Antialiasing - -setPen black 5 - -translate 10 10 - -gradient_clearStops -gradient_appendStop 0 red -gradient_appendStop 0.25 orange -gradient_appendStop 0.5 yellow -gradient_appendStop 0.8 green -gradient_appendStop 1 cyan - -gradient_setSpread PadSpread -gradient_setCoordinateMode ObjectBoundingMode -gradient_setLinear 0.2 0.2 0.7 0.7 -gradient_setLinearPen 0.0 0.0 0.0 1.0 - -begin_block objects -drawRect 0 0 100 100 -drawEllipse 100 0 100 100 -drawRoundRect 200 0 100 100 -drawPolygon [300 0 390 0 350 99] -drawPie 400 0 100 100 720 4320 -drawLine 510 10 590 90 -drawRect 610 0 40 100 -drawRect 670 30 100 40 -end_block - -translate 0 120 -repeat_block objects - -translate 10 120 -rotate 10 -repeat_block objects diff --git a/tests/arthur/data/qps/object_bounding_mode_qps.png b/tests/arthur/data/qps/object_bounding_mode_qps.png deleted file mode 100644 index 8066611478..0000000000 Binary files a/tests/arthur/data/qps/object_bounding_mode_qps.png and /dev/null differ diff --git a/tests/arthur/data/qps/pathfill.qps b/tests/arthur/data/qps/pathfill.qps deleted file mode 100644 index 70077debd0..0000000000 --- a/tests/arthur/data/qps/pathfill.qps +++ /dev/null @@ -1,35 +0,0 @@ -setPen afff0000 4 - -setBrush dome_rgb32.png -drawEllipse 10 10 200 200 - -setBrush dome_argb32.png -drawEllipse 220 10 200 200 - -setPen NoPen - -setBrush dome_rgb32.png -drawEllipse 10 220 200 200 - -setBrush dome_argb32.png -drawEllipse 220 220 200 200 - -setBrushOrigin -30 -30 - -setPen afff0000 4 -setBrush dome_rgb32.png -drawEllipse 430 10 200 200 - -setBrush dome_argb32.png -drawEllipse 640 10 200 200 - -setPen NoPen -setBrush dome_rgb32.png -drawEllipse 430 220 200 200 - -setBrush dome_argb32.png -drawEllipse 640 220 200 200 - -setPen black -drawText 150 450 "No offset RGB/ARGB" -drawText 550 450 "-30 offset RGB/ARGB" diff --git a/tests/arthur/data/qps/pathfill_qps.png b/tests/arthur/data/qps/pathfill_qps.png deleted file mode 100644 index 66d09ef879..0000000000 Binary files a/tests/arthur/data/qps/pathfill_qps.png and /dev/null differ diff --git a/tests/arthur/data/qps/paths.qps b/tests/arthur/data/qps/paths.qps deleted file mode 100644 index 414b1628a2..0000000000 --- a/tests/arthur/data/qps/paths.qps +++ /dev/null @@ -1,32 +0,0 @@ -setPen black -setBrush 7f7fff - -path_moveTo star 50 0 -path_lineTo star 30 90 -path_lineTo star 100 60 -path_lineTo star 0 20 -path_lineTo star 80 100 - -setFont "times" 50 -path_addText text 0 50 "ABCD, 1234, abcd, #¤%&" - -path_addRect rectncircle 0 0 75 75 -path_addEllipse rectncircle 25 25 75 75 -path_setFillRule rectncircle winding - -path_moveTo curve 100 0 -path_cubicTo curve 100 100 50 50 0 100 - -begin_block drawing -drawPath star -translate 100 0 -drawPath rectncircle -translate 100 0 -drawPath curve -translate -200 100 -drawPath text -end_block - -translate 50 100 -rotate 10 -repeat_block drawing \ No newline at end of file diff --git a/tests/arthur/data/qps/paths_aa.qps b/tests/arthur/data/qps/paths_aa.qps deleted file mode 100644 index d63ba30f04..0000000000 --- a/tests/arthur/data/qps/paths_aa.qps +++ /dev/null @@ -1,2 +0,0 @@ -setRenderHint LineAntialiasing -import "paths.qps" \ No newline at end of file diff --git a/tests/arthur/data/qps/paths_aa_qps.png b/tests/arthur/data/qps/paths_aa_qps.png deleted file mode 100644 index e51a4ac400..0000000000 Binary files a/tests/arthur/data/qps/paths_aa_qps.png and /dev/null differ diff --git a/tests/arthur/data/qps/paths_qps.png b/tests/arthur/data/qps/paths_qps.png deleted file mode 100644 index 094a84f167..0000000000 Binary files a/tests/arthur/data/qps/paths_qps.png and /dev/null differ diff --git a/tests/arthur/data/qps/pens.qps b/tests/arthur/data/qps/pens.qps deleted file mode 100644 index 507a602fc2..0000000000 --- a/tests/arthur/data/qps/pens.qps +++ /dev/null @@ -1,130 +0,0 @@ -translate 10 10 - -begin_block penstyles -setPen black 0 solidline flatcap -drawLine 0 0 100 0 -setPen black 0 dashline flatcap -drawLine 100 0 100 40 -setPen black 0 dotline flatcap -drawLine 100 40 200 0 -setPen black 0 dashdotline flatcap -drawLine 200 0 300 0 -setPen black 0 dashdotdotline flatcap -drawLine 300 0 400 40 - -translate 0 50 -setPen blue 2 solidline flatcap -drawLine 0 0 100 0 -setPen blue 2 dashline flatcap -drawLine 100 0 100 40 -setPen blue 2 dotline flatcap -drawLine 100 40 200 0 -setPen blue 2 dashdotline flatcap -drawLine 200 0 300 0 -setPen blue 2 dashdotdotline flatcap -drawLine 300 0 400 40 - -translate 0 50 -setPen red 5 solidline flatcap -drawLine 0 0 100 0 -setPen red 5 dashline flatcap -drawLine 100 0 100 40 -setPen red 5 dotline flatcap -drawLine 100 40 200 0 -setPen red 5 dashdotline flatcap -drawLine 200 0 300 0 -setPen red 5 dashdotdotline flatcap -drawLine 300 0 400 40 -end_block - -translate 0 50 -scale 1 2 -repeat_block penstyles - - -# Test cap styles -resetMatrix -translate 420 10 -setPen green 5 dashdotline flatcap -drawLine 0 0 200 0 -setPen green 5 dashdotline roundcap -drawLine 0 20 200 20 -setPen green 5 dashdotline squarecap -drawLine 0 40 200 40 - - -# Test join styles -resetMatrix -translate 420 80 -setBrush nobrush -begin_block joinstyles -setPen orange 10 solidline flatcap miterjoin -drawPolyline [ 0 0 80 0 80 80 0 80 ] - -translate 0 100 -setPen aquamarine 10 solidline squarecap beveljoin -drawPolyline [ 0 0 80 0 80 80 0 80 ] - -translate 0 100 -setPen purple 10 solidline roundcap roundjoin -drawPolyline [ 0 0 80 0 80 80 0 80 ] -end_block - -translate 130 -200 -scale 2 1 -rotate 1 -repeat_block joinstyles - -# transparent lines -resetMatrix -translate 10 400 -setPen #7f000000 -drawLine 0 0 50 0 -setPen #7f000000 1 SolidLine -drawLine 0 10 50 10 -setPen #7f000000 5 SolidLine -drawLine 0 20 50 20 -setPen #7f000000 10 SolidLine -drawLine 0 30 50 30 -setPen #7f000000 -drawLine 0 0 0 50 -setPen #7f000000 1 SolidLine -drawLine 10 0 10 50 -setPen #7f000000 5 SolidLine -drawLine 20 0 20 50 -setPen #7f000000 10 SolidLine -drawLine 30 0 30 50 - -# pen styles -resetMatrix -translate 0 500 -setPen black 0 DashLine -drawLine 20 20 100 20 -translate 0 10 -setPen black 0 DotLine -drawLine 20 20 100 20 -translate 0 10 -setPen black 0 DashDotLine -drawLine 20 20 100 20 -translate 0 10 -setPen black 0 DashDotDotLine -drawLine 20 20 100 20 - -# scaling ellipse -resetMatrix -setPen black 0.008 DashLine -translate 250 550 -rotate 30 -scale 250 250 -drawEllipse -0.4 -0.4 0.8 0.8 - -# scaling path -path_addEllipse star -0.3 -0.3 0.6 0.6 - -resetMatrix -setPen black 0.008 DashLine -translate 250 550 -rotate 30 -scale 250 250 -drawPath star - diff --git a/tests/arthur/data/qps/pens_aa.qps b/tests/arthur/data/qps/pens_aa.qps deleted file mode 100644 index 6408e2fee3..0000000000 --- a/tests/arthur/data/qps/pens_aa.qps +++ /dev/null @@ -1,3 +0,0 @@ -setRenderHint LineAntialiasing - -import "pens.qps" \ No newline at end of file diff --git a/tests/arthur/data/qps/pens_aa_qps.png b/tests/arthur/data/qps/pens_aa_qps.png deleted file mode 100644 index edb29eb566..0000000000 Binary files a/tests/arthur/data/qps/pens_aa_qps.png and /dev/null differ diff --git a/tests/arthur/data/qps/pens_cosmetic.qps b/tests/arthur/data/qps/pens_cosmetic.qps deleted file mode 100644 index 624739d974..0000000000 --- a/tests/arthur/data/qps/pens_cosmetic.qps +++ /dev/null @@ -1,107 +0,0 @@ -path_addEllipse path 22 0 7 7 -path_addRect path 25 5 4 4 - -translate 20 20 - -begin_block lines - save - drawLine 0 0 10 10 - drawLine 2 0 10 0 - drawLine 0 2 0 10 - drawPolygon [12 0 20 0 15 10] - drawPath path - drawEllipse 32 0 8 8 - drawPoint 36 4 - - translate 100 0 - save - scale 4 1 - drawLine 0 0 10 10 - drawLine 2 0 10 0 - drawLine 0 2 0 10 - drawPolygon [12 0 20 0 15 10] - drawPath path - drawEllipse 32 0 8 8 - drawPoint 36 4 - restore - - translate 200 0 - save - scale 1 4 - drawLine 0 0 10 10 - drawLine 2 0 10 0 - drawLine 0 2 0 10 - drawPolygon [12 0 20 0 15 10] - drawPath path - drawEllipse 32 0 8 8 - drawPoint 36 4 - restore - - translate 100 0 - save - scale 4 4 - drawLine 0 0 10 10 - drawLine 2 0 10 0 - drawLine 0 2 0 10 - drawPolygon [12 0 20 0 15 10] - drawPath path - drawEllipse 32 0 8 8 - drawPoint 36 4 - restore - restore -end_block - -drawText 580 15 "non-cosmetic, 0-width" -translate 0 50 - -setPen black 2 -repeat_block lines -drawText 580 15 "non-cosmetic, 2-width" - -translate 0 20 -translate 0 50 -setPen black 0 -pen_setCosmetic true -repeat_block lines -drawText 580 15 "cosmetic, 0-width" - -translate 0 50 -setPen black 2 -pen_setCosmetic true -repeat_block lines -drawText 580 15 "cosmetic, 2-width" - - -setRenderHint Antialiasing -translate 0 20 - -translate 0 50 -setPen black 0 -repeat_block lines -drawText 580 15 "non-cosmetic, 0-width" - -translate 0 50 - -setPen black 2 -repeat_block lines -drawText 580 15 "non-cosmetic, 2-width" - -translate 0 20 -translate 0 50 -setPen black 0 -pen_setCosmetic true -repeat_block lines -drawText 580 15 "cosmetic, 0-width" - -translate 0 50 -setPen black 2 -pen_setCosmetic true -repeat_block lines -drawText 580 15 "cosmetic, 2-width" - - -translate 0 70 -drawText 0 0 "scale(1, 1)" -drawText 150 0 "scale(4, 1)" -drawText 300 0 "scale(1, 4)" -drawText 450 0 "scale(4, 4)" \ No newline at end of file diff --git a/tests/arthur/data/qps/pens_cosmetic_qps.png b/tests/arthur/data/qps/pens_cosmetic_qps.png deleted file mode 100644 index 1bd72e96f9..0000000000 Binary files a/tests/arthur/data/qps/pens_cosmetic_qps.png and /dev/null differ diff --git a/tests/arthur/data/qps/pens_qps.png b/tests/arthur/data/qps/pens_qps.png deleted file mode 100644 index e1d72a7ea5..0000000000 Binary files a/tests/arthur/data/qps/pens_qps.png and /dev/null differ diff --git a/tests/arthur/data/qps/perspectives.qps b/tests/arthur/data/qps/perspectives.qps deleted file mode 100644 index 67b5d6d574..0000000000 --- a/tests/arthur/data/qps/perspectives.qps +++ /dev/null @@ -1,70 +0,0 @@ - -setRenderHint Antialiasing - -setPen #00ff00 - -image_load image.png the_image - -translate 10 10 -# standard draw -drawImage the_image 0 0 - -# Rotation w/o smooth xform -save -translate 350 0 -save - setRenderHint SmoothPixmapTransform on - mapQuadToQuad 0 0 0 300 300 300 300 0 0 50 0 200 300 300 300 0 - drawImage the_image 0 0 -restore -restore - -translate 0 320 - -save - setRenderHint SmoothPixmapTransform on - mapQuadToQuad 0 0 0 300 300 300 300 0 0 0 100 300 200 300 300 0 - drawImage the_image 0 0 -restore - -save -translate 350 0 -save - setRenderHint SmoothPixmapTransform on - mapQuadToQuad 0 0 0 300 300 300 300 0 0 0 0 300 300 250 300 50 - drawImage the_image 0 0 -restore -restore - -setRenderHint SmoothPixmapTransform on -setBrush red -setPen black -resetMatrix -translate 100 720 -rotate_y 85 -scale 7 0.01 -drawRect -150 -150 300 300 - -resetMatrix -setBrush gam030.png -setPen black 30 -translate 700 700 -rotate_y -85 -scale 7 0.01 -drawRect -150 -150 300 300 - -resetMatrix -setPen black -translate 125 20 -drawText 0 0 "No transform" -translate 350 0 -drawText 0 0 "Left Tilted" -resetMatrix -translate 125 350 -drawText 0 0 "Bottom Tilted" -translate 350 0 -drawText 0 0 "Right Tilted" -translate 120 0 -resetMatrix -translate 300 760 -drawText 0 0 "Perspective Clipping" diff --git a/tests/arthur/data/qps/perspectives2.qps b/tests/arthur/data/qps/perspectives2.qps deleted file mode 100644 index cdd78da649..0000000000 --- a/tests/arthur/data/qps/perspectives2.qps +++ /dev/null @@ -1,307 +0,0 @@ -setRenderHint Antialiasing - -image_load zebra.png zebra_png - -image_convertToFormat zebra_png zebra ARGB32_Premultiplied - -translate 75 100 -# standard draw -begin_block row -drawImage zebra -50 -50 - -translate 90 0 -save -rotate_y 50 -drawImage zebra -50 -50 -restore - -translate 65 0 -save -rotate_y 60 -drawImage zebra -50 -50 -restore - -translate 50 0 -save -rotate_y 70 -drawImage zebra -50 -50 -restore - -translate 30 0 -save -rotate_y 80 -drawImage zebra -50 -50 -restore - -translate 24 0 -save -rotate_y 82 -drawImage zebra -50 -50 -restore - -translate 20 0 -save -rotate_y 84 -drawImage zebra -50 -50 -restore - -translate 16 0 -save -rotate_y 86 -drawImage zebra -50 -50 -restore - -translate 12 0 -save -rotate_y 87 -drawImage zebra -50 -50 -restore - -translate 8 0 -save -rotate_y 88 -drawImage zebra -50 -50 -restore - -translate 6 0 -save -rotate_y 89 -drawImage zebra -50 -50 -restore - -translate 6 0 -save -rotate_y 91 -drawImage zebra -50 -50 -restore - -translate 6 0 -save -rotate_y 92 -drawImage zebra -50 -50 -restore - -translate 8 0 -save -rotate_y 93 -drawImage zebra -50 -50 -restore - -translate 12 0 -save -rotate_y 94 -drawImage zebra -50 -50 -restore - -translate 16 0 -save -rotate_y 96 -drawImage zebra -50 -50 -restore - -translate 20 0 -save -rotate_y 98 -drawImage zebra -50 -50 -restore - -translate 24 0 -save -rotate_y 100 -drawImage zebra -50 -50 -restore - -translate 30 0 -save -rotate_y 110 -drawImage zebra -50 -50 -restore - -translate 50 0 -save -rotate_y 120 -drawImage zebra -50 -50 -restore - -translate 65 0 -save -rotate_y 130 -drawImage zebra -50 -50 -restore - -translate 90 0 -save -rotate_y 180 -drawImage zebra -50 -50 -restore -end_block - -resetMatrix -translate 75 280 -setRenderHint SmoothPixmapTransform -repeat_block row - -resetMatrix -setPen black -translate 300 20 -drawText 0 0 "Fast Pixmap Transform" -resetMatrix -translate 300 210 -drawText 0 0 "Smooth Pixmap Transform" - -resetMatrix -translate 0 400 - -image_load dome_argb32.png the_pixmap - -image_convertToFormat the_pixmap dome ARGB32 - -setRenderHint SmoothPixmapTransform false - -translate 75 100 -# standard draw -begin_block row -drawImage dome -50 -50 - -translate 90 0 -save -rotate_y 50 -drawImage dome -50 -50 -restore - -translate 65 0 -save -rotate_y 60 -drawImage dome -50 -50 -restore - -translate 50 0 -save -rotate_y 70 -drawImage dome -50 -50 -restore - -translate 30 0 -save -rotate_y 80 -drawImage dome -50 -50 -restore - -translate 24 0 -save -rotate_y 82 -drawImage dome -50 -50 -restore - -translate 20 0 -save -rotate_y 84 -drawImage dome -50 -50 -restore - -translate 16 0 -save -rotate_y 86 -drawImage dome -50 -50 -restore - -translate 12 0 -save -rotate_y 87 -drawImage dome -50 -50 -restore - -translate 8 0 -save -rotate_y 88 -drawImage dome -50 -50 -restore - -translate 6 0 -save -rotate_y 89 -drawImage dome -50 -50 -restore - -translate 6 0 -save -rotate_y 91 -drawImage dome -50 -50 -restore - -translate 6 0 -save -rotate_y 92 -drawImage dome -50 -50 -restore - -translate 8 0 -save -rotate_y 93 -drawImage dome -50 -50 -restore - -translate 12 0 -save -rotate_y 94 -drawImage dome -50 -50 -restore - -translate 16 0 -save -rotate_y 96 -drawImage dome -50 -50 -restore - -translate 20 0 -save -rotate_y 98 -drawImage dome -50 -50 -restore - -translate 24 0 -save -rotate_y 100 -drawImage dome -50 -50 -restore - -translate 30 0 -save -rotate_y 110 -drawImage dome -50 -50 -restore - -translate 50 0 -save -rotate_y 120 -drawImage dome -50 -50 -restore - -translate 65 0 -save -rotate_y 130 -drawImage dome -50 -50 -restore - -translate 90 0 -save -rotate_y 180 -drawImage dome -50 -50 -restore -end_block - -resetMatrix -translate 0 400 -translate 75 280 -setRenderHint SmoothPixmapTransform -repeat_block row - -resetMatrix -setPen black -translate 0 400 -translate 300 20 -drawText 0 0 "Fast Pixmap Transform" -resetMatrix -translate 0 400 -translate 300 210 -drawText 0 0 "Smooth Pixmap Transform" diff --git a/tests/arthur/data/qps/perspectives2_qps.png b/tests/arthur/data/qps/perspectives2_qps.png deleted file mode 100644 index 34cd570297..0000000000 Binary files a/tests/arthur/data/qps/perspectives2_qps.png and /dev/null differ diff --git a/tests/arthur/data/qps/perspectives_qps.png b/tests/arthur/data/qps/perspectives_qps.png deleted file mode 100644 index befcd51621..0000000000 Binary files a/tests/arthur/data/qps/perspectives_qps.png and /dev/null differ diff --git a/tests/arthur/data/qps/pixmap_rotation.qps b/tests/arthur/data/qps/pixmap_rotation.qps deleted file mode 100644 index f15fef8765..0000000000 --- a/tests/arthur/data/qps/pixmap_rotation.qps +++ /dev/null @@ -1,27 +0,0 @@ -translate 120 120 - -begin_block drawing -save - rotate 90 - drawPixmap solid.png 0 0 - - rotate 90 - drawPixmap solid.png 0 0 - - rotate 90 - drawPixmap solid.png 0 0 - - rotate 90 - drawPixmap solid.png 0 0 -restore -end_block - -resetMatrix - -translate 340 120 -repeat_block drawing - -resetMatrix - -drawText 50 240 "Normal X form" -drawText 270 240 "Smooth xform" \ No newline at end of file diff --git a/tests/arthur/data/qps/pixmap_rotation_qps.png b/tests/arthur/data/qps/pixmap_rotation_qps.png deleted file mode 100644 index 6d693aae66..0000000000 Binary files a/tests/arthur/data/qps/pixmap_rotation_qps.png and /dev/null differ diff --git a/tests/arthur/data/qps/pixmap_scaling.qps b/tests/arthur/data/qps/pixmap_scaling.qps deleted file mode 100644 index c5053adc0a..0000000000 --- a/tests/arthur/data/qps/pixmap_scaling.qps +++ /dev/null @@ -1,527 +0,0 @@ -# Hurra! Force line endings (?) - -translate 5 25 -setFont "arial" 8 - -save - drawText 15 0 "opaque image" - translate 50 50 - save - translate 1 1 - scale 20 20 - drawImage solid2x2.png 0 0 - restore - save - translate -1 1 - scale -20 20 - drawImage solid2x2.png 0 0 - restore - save - translate 1 -1 - scale 20 -20 - drawImage solid2x2.png 0 0 - restore - save - translate -1 -1 - scale -20 -20 - drawImage solid2x2.png 0 0 - restore - - -restore - -save - translate 150 0 - drawText 15 0 "alpha image" - translate 50 50 - save - translate 1 1 - scale 20 20 - drawImage alpha2x2.png 0 0 - restore - save - translate -1 1 - scale -20 20 - drawImage alpha2x2.png 0 0 - restore - save - translate 1 -1 - scale 20 -20 - drawImage alpha2x2.png 0 0 - restore - save - translate -1 -1 - scale -20 -20 - drawImage alpha2x2.png 0 0 - restore -restore - - -save - translate 0 150 - drawText 15 0 "solid pixmap" - translate 50 50 - save - translate 1 1 - scale 20 20 - drawPixmap solid2x2.png 0 0 - restore - save - translate -1 1 - scale -20 20 - drawPixmap solid2x2.png 0 0 - restore - save - translate 1 -1 - scale 20 -20 - drawPixmap solid2x2.png 0 0 - restore - save - translate -1 -1 - scale -20 -20 - drawPixmap solid2x2.png 0 0 - restore -restore - - -save - translate 150 150 - drawText 15 0 "alpha pixmap" - translate 50 50 - save - translate 1 1 - scale 20 20 - drawPixmap alpha2x2.png 0 0 - restore - save - translate -1 1 - scale -20 20 - drawPixmap alpha2x2.png 0 0 - restore - save - translate 1 -1 - scale 20 -20 - drawPixmap alpha2x2.png 0 0 - restore - save - translate -1 -1 - scale -20 -20 - drawPixmap alpha2x2.png 0 0 - restore -restore - - -save - translate 300 10 - save - drawText 0 -10 "subrect solid image" - drawImage solid2x2.png 0 0 50 5 0 0.0 2 0.2 - drawImage solid2x2.png 0 5 50 5 0 0.2 2 0.2 - drawImage solid2x2.png 0 10 50 5 0 0.4 2 0.2 - drawImage solid2x2.png 0 15 50 5 0 0.6 2 0.2 - drawImage solid2x2.png 0 20 50 5 0 0.8 2 0.2 - drawImage solid2x2.png 0 25 50 5 0 1.0 2 0.2 - drawImage solid2x2.png 0 30 50 5 0 1.2 2 0.2 - drawImage solid2x2.png 0 35 50 5 0 1.4 2 0.2 - drawImage solid2x2.png 0 40 50 5 0 1.6 2 0.2 - drawImage solid2x2.png 0 45 50 5 0 1.8 2 0.2 - translate 60 0 - drawImage solid2x2.png 0 0 5 50 0.0 0 0.2 2 - drawImage solid2x2.png 5 0 5 50 0.2 0 0.2 2 - drawImage solid2x2.png 10 0 5 50 0.4 0 0.2 2 - drawImage solid2x2.png 15 0 5 50 0.6 0 0.2 2 - drawImage solid2x2.png 20 0 5 50 0.8 0 0.2 2 - drawImage solid2x2.png 25 0 5 50 1.0 0 0.2 2 - drawImage solid2x2.png 30 0 5 50 1.2 0 0.2 2 - drawImage solid2x2.png 35 0 5 50 1.4 0 0.2 2 - drawImage solid2x2.png 40 0 5 50 1.6 0 0.2 2 - drawImage solid2x2.png 45 0 5 50 1.8 0 0.2 2 - restore - - save - translate 150 0 - drawText 0 -10 "subrect solid image" - drawImage alpha2x2.png 0 0 50 5 0 0.0 2 0.2 - drawImage alpha2x2.png 0 5 50 5 0 0.2 2 0.2 - drawImage alpha2x2.png 0 10 50 5 0 0.4 2 0.2 - drawImage alpha2x2.png 0 15 50 5 0 0.6 2 0.2 - drawImage alpha2x2.png 0 20 50 5 0 0.8 2 0.2 - drawImage alpha2x2.png 0 25 50 5 0 1.0 2 0.2 - drawImage alpha2x2.png 0 30 50 5 0 1.2 2 0.2 - drawImage alpha2x2.png 0 35 50 5 0 1.4 2 0.2 - drawImage alpha2x2.png 0 40 50 5 0 1.6 2 0.2 - drawImage alpha2x2.png 0 45 50 5 0 1.8 2 0.2 - translate 60 0 - drawImage alpha2x2.png 0 0 5 50 0.0 0 0.2 2 - drawImage alpha2x2.png 5 0 5 50 0.2 0 0.2 2 - drawImage alpha2x2.png 10 0 5 50 0.4 0 0.2 2 - drawImage alpha2x2.png 15 0 5 50 0.6 0 0.2 2 - drawImage alpha2x2.png 20 0 5 50 0.8 0 0.2 2 - drawImage alpha2x2.png 25 0 5 50 1.0 0 0.2 2 - drawImage alpha2x2.png 30 0 5 50 1.2 0 0.2 2 - drawImage alpha2x2.png 35 0 5 50 1.4 0 0.2 2 - drawImage alpha2x2.png 40 0 5 50 1.6 0 0.2 2 - drawImage alpha2x2.png 45 0 5 50 1.8 0 0.2 2 - restore - - save - translate 0 100 - drawText 0 -10 "subrect alpha pixmap" - drawPixmap solid2x2.png 0 0 50 5 0 0.0 2 0.2 - drawPixmap solid2x2.png 0 5 50 5 0 0.2 2 0.2 - drawPixmap solid2x2.png 0 10 50 5 0 0.4 2 0.2 - drawPixmap solid2x2.png 0 15 50 5 0 0.6 2 0.2 - drawPixmap solid2x2.png 0 20 50 5 0 0.8 2 0.2 - drawPixmap solid2x2.png 0 25 50 5 0 1.0 2 0.2 - drawPixmap solid2x2.png 0 30 50 5 0 1.2 2 0.2 - drawPixmap solid2x2.png 0 35 50 5 0 1.4 2 0.2 - drawPixmap solid2x2.png 0 40 50 5 0 1.6 2 0.2 - drawPixmap solid2x2.png 0 45 50 5 0 1.8 2 0.2 - translate 60 0 - drawPixmap solid2x2.png 0 0 5 50 0.0 0 0.2 2 - drawPixmap solid2x2.png 5 0 5 50 0.2 0 0.2 2 - drawPixmap solid2x2.png 10 0 5 50 0.4 0 0.2 2 - drawPixmap solid2x2.png 15 0 5 50 0.6 0 0.2 2 - drawPixmap solid2x2.png 20 0 5 50 0.8 0 0.2 2 - drawPixmap solid2x2.png 25 0 5 50 1.0 0 0.2 2 - drawPixmap solid2x2.png 30 0 5 50 1.2 0 0.2 2 - drawPixmap solid2x2.png 35 0 5 50 1.4 0 0.2 2 - drawPixmap solid2x2.png 40 0 5 50 1.6 0 0.2 2 - drawPixmap solid2x2.png 45 0 5 50 1.8 0 0.2 2 - restore - - save - translate 150 100 - drawText 0 -10 "subrect alpha pixmap" - drawPixmap alpha2x2.png 0 0 50 5 0 0.0 2 0.2 - drawPixmap alpha2x2.png 0 5 50 5 0 0.2 2 0.2 - drawPixmap alpha2x2.png 0 10 50 5 0 0.4 2 0.2 - drawPixmap alpha2x2.png 0 15 50 5 0 0.6 2 0.2 - drawPixmap alpha2x2.png 0 20 50 5 0 0.8 2 0.2 - drawPixmap alpha2x2.png 0 25 50 5 0 1.0 2 0.2 - drawPixmap alpha2x2.png 0 30 50 5 0 1.2 2 0.2 - drawPixmap alpha2x2.png 0 35 50 5 0 1.4 2 0.2 - drawPixmap alpha2x2.png 0 40 50 5 0 1.6 2 0.2 - drawPixmap alpha2x2.png 0 45 50 5 0 1.8 2 0.2 - translate 60 0 - drawPixmap alpha2x2.png 0 0 5 50 0.0 0 0.2 2 - drawPixmap alpha2x2.png 5 0 5 50 0.2 0 0.2 2 - drawPixmap alpha2x2.png 10 0 5 50 0.4 0 0.2 2 - drawPixmap alpha2x2.png 15 0 5 50 0.6 0 0.2 2 - drawPixmap alpha2x2.png 20 0 5 50 0.8 0 0.2 2 - drawPixmap alpha2x2.png 25 0 5 50 1.0 0 0.2 2 - drawPixmap alpha2x2.png 30 0 5 50 1.2 0 0.2 2 - drawPixmap alpha2x2.png 35 0 5 50 1.4 0 0.2 2 - drawPixmap alpha2x2.png 40 0 5 50 1.6 0 0.2 2 - drawPixmap alpha2x2.png 45 0 5 50 1.8 0 0.2 2 - restore - -restore - - - -image_load alpha2x2.png alpha2x2 -image_convertToFormat alpha2x2 alpha2x2_argb32 ARGB32 -image_convertToFormat alpha2x2 alpha2x2_argb32pre ARGB32_Premultiplied -image_convertToFormat alpha2x2 alpha2x2_rgb888 Format_RGB888 -image_convertToFormat alpha2x2 alpha2x2_rgb32 RGB32 -image_convertToFormat alpha2x2 alpha2x2_rgb16 Format_RGB16 - -save - translate 0 300 - drawText 15 0 "drawImage - argb32" - translate 50 50 - save - translate 0.5 0.5 - scale 20 20 - drawImage alpha2x2_argb32 0 0 - restore - save - translate -0.5 0.5 - scale -20 20 - drawImage alpha2x2_argb32 0 0 - restore - save - translate 0.5 -0.5 - scale 20 -20 - drawImage alpha2x2_argb32 0 0 - restore - save - translate -0.5 -0.5 - scale -20 -20 - drawImage alpha2x2_argb32 0 0 - restore -restore - -save - translate 150 300 - drawText 15 0 "drawImage - argb32premul" - translate 50 50 - save - translate 0.5 0.5 - scale 20 20 - drawImage alpha2x2_argb32pre 0 0 - restore - save - translate -0.5 0.5 - scale -20 20 - drawImage alpha2x2_argb32pre 0 0 - restore - save - translate 0.5 -0.5 - scale 20 -20 - drawImage alpha2x2_argb32pre 0 0 - restore - save - translate -0.5 -0.5 - scale -20 -20 - drawImage alpha2x2_argb32pre 0 0 - restore -restore - - - -save - translate 0 450 - drawText 15 0 "drawImage - rgb888" - translate 50 50 - save - translate 0.5 0.5 - scale 20 20 - drawImage alpha2x2_rgb888 0 0 - restore - save - translate -0.5 0.5 - scale -20 20 - drawImage alpha2x2_rgb888 0 0 - restore - save - translate 0.5 -0.5 - scale 20 -20 - drawImage alpha2x2_rgb888 0 0 - restore - save - translate -0.5 -0.5 - scale -20 -20 - drawImage alpha2x2_rgb888 0 0 - restore -restore - -save - translate 150 450 - drawText 15 0 "drawImage - rgb32" - translate 50 50 - save - translate 0.5 0.5 - scale 20 20 - drawImage alpha2x2_rgb32 0 0 - restore - save - translate -0.5 0.5 - scale -20 20 - drawImage alpha2x2_rgb32 0 0 - restore - save - translate 0.5 -0.5 - scale 20 -20 - drawImage alpha2x2_rgb32 0 0 - restore - save - translate -0.5 -0.5 - scale -20 -20 - drawImage alpha2x2_rgb32 0 0 - restore -restore - -save - translate 300 450 - drawText 15 0 "drawImage - rgb16" - translate 50 50 - save - translate 0.5 0.5 - scale 20 20 - drawImage alpha2x2_rgb16 0 0 - restore - save - translate -0.5 0.5 - scale -20 20 - drawImage alpha2x2_rgb16 0 0 - restore - save - translate 0.5 -0.5 - scale 20 -20 - drawImage alpha2x2_rgb16 0 0 - restore - save - translate -0.5 -0.5 - scale -20 -20 - drawImage alpha2x2_rgb16 0 0 - restore -restore - - - -save - translate 0 600 - drawText 15 0 "clipping - argb32" - translate 50 50 - setClipRect -30 -30 60 60 ReplaceClip - save - translate 0.5 0.5 - scale 20 20 - drawImage alpha2x2_argb32 0 0 - restore - save - translate -0.5 0.5 - scale -20 20 - drawImage alpha2x2_argb32 0 0 - restore - save - translate 0.5 -0.5 - scale 20 -20 - drawImage alpha2x2_argb32 0 0 - restore - save - translate -0.5 -0.5 - scale -20 -20 - drawImage alpha2x2_argb32 0 0 - restore -restore - -save - translate 150 600 - drawText 15 0 "clipping - argb32premul" - translate 50 50 - setClipRect -30 -30 60 60 ReplaceClip - save - translate 0.5 0.5 - scale 20 20 - drawImage alpha2x2_argb32pre 0 0 - restore - save - translate -0.5 0.5 - scale -20 20 - drawImage alpha2x2_argb32pre 0 0 - restore - save - translate 0.5 -0.5 - scale 20 -20 - drawImage alpha2x2_argb32pre 0 0 - restore - save - translate -0.5 -0.5 - scale -20 -20 - drawImage alpha2x2_argb32pre 0 0 - restore -restore - -save - translate 300 600 - drawText 15 0 "clipping - rgb16" - translate 50 50 - setClipRect -30 -30 60 60 ReplaceClip - save - translate 0.5 0.5 - scale 20 20 - drawImage alpha2x2_rgb16 0 0 - restore - save - translate -0.5 0.5 - scale -20 20 - drawImage alpha2x2_rgb16 0 0 - restore - save - translate 0.5 -0.5 - scale 20 -20 - drawImage alpha2x2_rgb16 0 0 - restore - save - translate -0.5 -0.5 - scale -20 -20 - drawImage alpha2x2_rgb16 0 0 - restore -restore - - -path_addEllipse ellipse -30 -30 60 60 - -save - translate 0 750 - drawText 15 0 "clipping - argb32" - translate 50 50 - setClipPath ellipse ReplaceClip - save - translate 0.5 0.5 - scale 20 20 - drawImage alpha2x2_argb32 0 0 - restore - save - translate -0.5 0.5 - scale -20 20 - drawImage alpha2x2_argb32 0 0 - restore - save - translate 0.5 -0.5 - scale 20 -20 - drawImage alpha2x2_argb32 0 0 - restore - save - translate -0.5 -0.5 - scale -20 -20 - drawImage alpha2x2_argb32 0 0 - restore -restore - -save - translate 150 750 - drawText 15 0 "clipping - argb32premul" - translate 50 50 - setClipPath ellipse ReplaceClip - save - translate 0.5 0.5 - scale 20 20 - drawImage alpha2x2_argb32pre 0 0 - restore - save - translate -0.5 0.5 - scale -20 20 - drawImage alpha2x2_argb32pre 0 0 - restore - save - translate 0.5 -0.5 - scale 20 -20 - drawImage alpha2x2_argb32pre 0 0 - restore - save - translate -0.5 -0.5 - scale -20 -20 - drawImage alpha2x2_argb32pre 0 0 - restore -restore - -save - translate 300 750 - drawText 15 0 "clipping - rgb16" - translate 50 50 - setClipPath ellipse ReplaceClip - save - translate 0.5 0.5 - scale 20 20 - drawImage alpha2x2_rgb16 0 0 - restore - save - translate -0.5 0.5 - scale -20 20 - drawImage alpha2x2_rgb16 0 0 - restore - save - translate 0.5 -0.5 - scale 20 -20 - drawImage alpha2x2_rgb16 0 0 - restore - save - translate -0.5 -0.5 - scale -20 -20 - drawImage alpha2x2_rgb16 0 0 - restore -restore diff --git a/tests/arthur/data/qps/pixmap_subpixel.qps b/tests/arthur/data/qps/pixmap_subpixel.qps deleted file mode 100644 index f3689433c3..0000000000 --- a/tests/arthur/data/qps/pixmap_subpixel.qps +++ /dev/null @@ -1,115 +0,0 @@ - -translate 50 50 - -# Pixmaps at 0.1 offset, unclipped -begin_block draw_pixmaps -save - drawPixmap border.png 0 0 - translate 20.1 0.1 - drawPixmap border.png 0 0 - translate 20.1 0.1 - drawPixmap border.png 0 0 - translate 20.1 0.1 - drawPixmap border.png 0 0 - translate 20.1 0.1 - drawPixmap border.png 0 0 - translate 20.1 0.1 - drawPixmap border.png 0 0 - translate 20.1 0.1 - drawPixmap border.png 0 0 - translate 20.1 0.1 - drawPixmap border.png 0 0 - translate 20.1 0.1 - drawPixmap border.png 0 0 - translate 20.1 0.1 - drawPixmap border.png 0 0 - translate 20.1 0.1 - - drawPixmap border.png 0 0 - translate 20.1 0.1 - drawPixmap border.png 0 0 - translate 20.1 0.1 - drawPixmap border.png 0 0 - translate 20.1 0.1 - drawPixmap border.png 0 0 - translate 20.1 0.1 - drawPixmap border.png 0 0 - translate 20.1 0.1 - drawPixmap border.png 0 0 - translate 20.1 0.1 - drawPixmap border.png 0 0 - translate 20.1 0.1 - drawPixmap border.png 0 0 - translate 20.1 0.1 - drawPixmap border.png 0 0 - translate 20.1 0.1 - drawPixmap border.png 0 0 - translate 20.1 0.1 -restore -end_block - -# Tiled pixmaps at 0.1 offsets, unclipped -translate 0 50 -begin_block draw_tiled -save - drawTiledPixmap border.png 0 0 16 16 0 0 - translate 20.1 0.1 - drawTiledPixmap border.png 0 0 16 16 0 0 - translate 20.1 0.1 - drawTiledPixmap border.png 0 0 16 16 0 0 - translate 20.1 0.1 - drawTiledPixmap border.png 0 0 16 16 0 0 - translate 20.1 0.1 - drawTiledPixmap border.png 0 0 16 16 0 0 - translate 20.1 0.1 - drawTiledPixmap border.png 0 0 16 16 0 0 - translate 20.1 0.1 - drawTiledPixmap border.png 0 0 16 16 0 0 - translate 20.1 0.1 - drawTiledPixmap border.png 0 0 16 16 0 0 - translate 20.1 0.1 - drawTiledPixmap border.png 0 0 16 16 0 0 - translate 20.1 0.1 - drawTiledPixmap border.png 0 0 16 16 0 0 - translate 20.1 0.1 - - drawTiledPixmap border.png 0 0 16 16 0 0 - translate 20.1 0.1 - drawTiledPixmap border.png 0 0 16 16 0 0 - translate 20.1 0.1 - drawTiledPixmap border.png 0 0 16 16 0 0 - translate 20.1 0.1 - drawTiledPixmap border.png 0 0 16 16 0 0 - translate 20.1 0.1 - drawTiledPixmap border.png 0 0 16 16 0 0 - translate 20.1 0.1 - drawTiledPixmap border.png 0 0 16 16 0 0 - translate 20.1 0.1 - drawTiledPixmap border.png 0 0 16 16 0 0 - translate 20.1 0.1 - drawTiledPixmap border.png 0 0 16 16 0 0 - translate 20.1 0.1 - drawTiledPixmap border.png 0 0 16 16 0 0 - translate 20.1 0.1 - drawTiledPixmap border.png 0 0 16 16 0 0 - translate 20.1 0.1 -restore -end_block - - -path_moveTo clip 0 0 -path_lineTo clip width 0 -path_lineTo clip width 400 -path_lineTo clip 0 height -setClipPath clip - -translate 0 50 -# Pixmaps at 0.1 offset, clipped -repeat_block draw_pixmaps - - -# Tiled pixmaps at 0.1 offsets... -translate 0 50 -repeat_block draw_tiled - - diff --git a/tests/arthur/data/qps/pixmap_subpixel_qps.png b/tests/arthur/data/qps/pixmap_subpixel_qps.png deleted file mode 100644 index c691b94b53..0000000000 Binary files a/tests/arthur/data/qps/pixmap_subpixel_qps.png and /dev/null differ diff --git a/tests/arthur/data/qps/pixmaps.qps b/tests/arthur/data/qps/pixmaps.qps deleted file mode 100644 index 65734dd322..0000000000 --- a/tests/arthur/data/qps/pixmaps.qps +++ /dev/null @@ -1,103 +0,0 @@ - -setRenderHint Antialiasing - -setPen #00ff00 - -pixmap_load dome_argb32.png the_pixmap -begin_block draw_stuff - -save - - # standard draw - drawPixmap the_pixmap 0 0 - - # sub recting - translate 120 0 - drawPixmap the_pixmap 0 0 40 40 0 0 40 40 - drawPixmap the_pixmap 60 0 40 40 60 0 40 40 - drawPixmap the_pixmap 0 60 40 40 0 60 40 40 - drawPixmap the_pixmap 60 60 40 40 60 60 40 40 - drawPixmap the_pixmap 0 40 40 20 0 40 40 20 - drawPixmap the_pixmap 60 40 40 20 60 40 40 20 - drawPixmap the_pixmap 40 0 20 100 40 0 20 100 - - # subrecting w/scale - translate 120 0 - drawPixmap the_pixmap 0 0 50 50 0 0 25 25 - drawPixmap the_pixmap 50 0 50 50 25 0 25 25 - drawPixmap the_pixmap 0 50 50 50 0 25 25 25 - drawPixmap the_pixmap 50 50 50 50 25 25 25 25 - - # subrecting w/scale & smooth xform - translate 120 0 - setRenderHint SmoothPixmapTransformation - drawPixmap the_pixmap 0 0 50 50 0 0 25 25 - drawPixmap the_pixmap 50 0 50 50 25 0 25 25 - drawPixmap the_pixmap 0 50 50 50 0 25 25 25 - drawPixmap the_pixmap 50 50 50 50 25 25 25 25 - - - # Rotation w/o smooth xform - translate 120 0 - save - setRenderHint SmoothPixmapTransform off - rotate 10 - drawPixmap the_pixmap 0 0 - restore - - # Rotation w smooth xform - translate 120 0 - save - setRenderHint SmoothPixmapTransform - rotate 10 - drawPixmap the_pixmap 0 0 - restore - -restore - -end_block - - -translate 0 120 -pixmap_load dome_rgb32.png the_pixmap -repeat_block draw_stuff - -translate 0 120 -pixmap_load dome_indexed.png the_pixmap -repeat_block draw_stuff - -translate 0 120 -pixmap_load dome_indexed_mask.png the_pixmap -repeat_block draw_stuff - -translate 0 120 -pixmap_load dome_mono.png the_pixmap -repeat_block draw_stuff - - -resetMatrix -translate 700 60 -setPen black -drawText 0 0 "32 bit w/alpha" -translate 0 120 -drawText 0 0 "32 bit w/o alpha" -translate 0 120 -drawText 0 0 "8 bit indexed" -translate 0 120 -drawText 0 0 "8 bit indexed w/mask" -translate 0 120 -drawText 0 0 "1 bit" -resetMatrix -translate 0 600 -drawText 0 0 "normal" -translate 120 0 -drawText 0 0 "subrect" -translate 120 0 -drawText 0 0 "subrect scale" -translate 120 0 -drawText 0 0 "subrect scale smooth" -translate 120 0 -drawText 0 0 "xform" -translate 120 0 -drawText 0 0 "smooth xform" -translate 120 0 diff --git a/tests/arthur/data/qps/pixmaps_qps.png b/tests/arthur/data/qps/pixmaps_qps.png deleted file mode 100644 index 822b5bcd6f..0000000000 Binary files a/tests/arthur/data/qps/pixmaps_qps.png and /dev/null differ diff --git a/tests/arthur/data/qps/porter_duff.qps b/tests/arthur/data/qps/porter_duff.qps deleted file mode 100644 index ada4f481e6..0000000000 --- a/tests/arthur/data/qps/porter_duff.qps +++ /dev/null @@ -1,248 +0,0 @@ - -translate 0 50 - -surface_begin 0 0 100 100 - -begin_block predraw -setRenderHint Antialiasing -setPen nopen -setBrush 0x7f000000 -drawEllipse 10 10 80 80 -end_block - -setCompositionMode SourceOver - -begin_block postdraw - - -setBrush 0x1fff0000 -drawRect 0 0 50 50 - -setBrush 0xdf00ff00 -drawRect 50 50 50 50 - -setBrush 0x7f0000ff -drawEllipse 30 30 40 40 - -# a black rectangle around -setCompositionMode SourceOver -setPen black -setBrush nobrush -drawRect 0.5 0.5 99 99 - -end_block -surface_end - - -# Destination over -surface_begin 100 0 100 100 -repeat_block predraw -setCompositionMode DestinationOver -repeat_block postdraw -surface_end - - -# Clear -surface_begin 200 0 100 100 -repeat_block predraw -setCompositionMode Clear -repeat_block postdraw -surface_end - - -# Source -surface_begin 300 0 100 100 -repeat_block predraw -setCompositionMode Source -repeat_block postdraw -surface_end - - -# Destination -surface_begin 400 0 100 100 -repeat_block predraw -setCompositionMode Destination -repeat_block postdraw -surface_end - - -# Source In -surface_begin 500 0 100 100 -repeat_block predraw -setCompositionMode SourceIn -repeat_block postdraw -surface_end - -translate 0 50 - -# Destination In -surface_begin 0 100 100 100 -repeat_block predraw -setCompositionMode DestinationIn -repeat_block postdraw -surface_end - - -# Source Out -surface_begin 100 100 100 100 -repeat_block predraw -setCompositionMode SourceOut -repeat_block postdraw -surface_end - - -# Destination Out -surface_begin 200 100 100 100 -repeat_block predraw -setCompositionMode DestinationOut -repeat_block postdraw -surface_end - - -# SourceAtop -surface_begin 300 100 100 100 -repeat_block predraw -setCompositionMode SourceAtop -repeat_block postdraw -surface_end - - -# DestinationAtop -surface_begin 400 100 100 100 -repeat_block predraw -setCompositionMode DestinationAtop -repeat_block postdraw -surface_end - - -# Xor -surface_begin 500 100 100 100 -repeat_block predraw -setCompositionMode Xor -repeat_block postdraw -surface_end - -translate 0 50 - -# Plus -surface_begin 0 200 100 100 -repeat_block predraw -setCompositionMode Plus -repeat_block postdraw -surface_end - - -# Multiply -surface_begin 100 200 100 100 -repeat_block predraw -setCompositionMode Multiply -repeat_block postdraw -surface_end - - -# Screen -surface_begin 200 200 100 100 -repeat_block predraw -setCompositionMode Screen -repeat_block postdraw -surface_end - - -# Overlay -surface_begin 300 200 100 100 -repeat_block predraw -setCompositionMode Overlay -repeat_block postdraw -surface_end - - -# Darken -surface_begin 400 200 100 100 -repeat_block predraw -setCompositionMode Darken -repeat_block postdraw -surface_end - - -# Lighten -surface_begin 500 200 100 100 -repeat_block predraw -setCompositionMode Lighten -repeat_block postdraw -surface_end - -translate 0 50 - -# ColorDodge -surface_begin 0 300 100 100 -repeat_block predraw -setCompositionMode ColorDodge -repeat_block postdraw -surface_end - - -# Multiply -surface_begin 100 300 100 100 -repeat_block predraw -setCompositionMode ColorBurn -repeat_block postdraw -surface_end - - -# Screen -surface_begin 200 300 100 100 -repeat_block predraw -setCompositionMode HardLight -repeat_block postdraw -surface_end - - -# Overlay -surface_begin 300 300 100 100 -repeat_block predraw -setCompositionMode SoftLight -repeat_block postdraw -surface_end - - -# Darken -surface_begin 400 300 100 100 -repeat_block predraw -setCompositionMode Difference -repeat_block postdraw -surface_end - - -# Lighten -surface_begin 500 300 100 100 -repeat_block predraw -setCompositionMode Exclusion -repeat_block postdraw -surface_end - -resetMatrix - -drawText 0 50 "SourceOver" -drawText 100 50 "DestinationOver" -drawText 200 50 "Clear" -drawText 300 50 "Source" -drawText 400 50 "Destination" -drawText 500 50 "SourceIn" -drawText 0 200 "DestinationIn" -drawText 100 200 "SourceOut" -drawText 200 200 "DestinationOut" -drawText 300 200 "SourceAtop" -drawText 400 200 "DestinationAtop" -drawText 500 200 "Xor" -drawText 0 350 "Plus" -drawText 100 350 "Multiply" -drawText 200 350 "Screen" -drawText 300 350 "Overlay" -drawText 400 350 "Darken" -drawText 500 350 "Lighten" -drawText 0 500 "ColorDodge" -drawText 100 500 "ColorBurn" -drawText 200 500 "HardLight" -drawText 300 500 "SoftLight" -drawText 400 500 "Difference" -drawText 500 500 "Exclusion" diff --git a/tests/arthur/data/qps/porter_duff2.qps b/tests/arthur/data/qps/porter_duff2.qps deleted file mode 100644 index a377cc256c..0000000000 --- a/tests/arthur/data/qps/porter_duff2.qps +++ /dev/null @@ -1,256 +0,0 @@ - -translate 0 50 - -surface_begin 0 0 100 100 - -begin_block predraw -setRenderHint Antialiasing -setPen nopen -gradient_clearStops -gradient_appendStop 0 efff0000 -gradient_appendStop 0.5 dfffff00 -gradient_appendStop 1 ef00ff00 - -gradient_setSpread PadSpread -gradient_setLinear 10 10 90 90 -drawEllipse 10 10 80 80 -end_block - -setCompositionMode SourceOver - -begin_block postdraw - -gradient_clearStops -gradient_appendStop 0 afff0000 -gradient_appendStop 0.5 cf0000ff -gradient_appendStop 1 bf00ff00 - -gradient_setSpread PadSpread -gradient_setLinear 0 0 100 0 -drawEllipse 10 10 30 30 -drawEllipse 10 60 30 30 -drawEllipse 60 60 30 30 -drawEllipse 60 10 30 30 -drawEllipse 35 35 30 30 - -# a black rectangle around -setCompositionMode SourceOver -setPen black -setBrush nobrush -drawRect 0.5 0.5 99 99 - -end_block -surface_end - -# Destination over -surface_begin 100 0 100 100 -repeat_block predraw -setCompositionMode DestinationOver -repeat_block postdraw -surface_end - - -# Clear -surface_begin 200 0 100 100 -repeat_block predraw -setCompositionMode Clear -repeat_block postdraw -surface_end - - -# Source -surface_begin 300 0 100 100 -repeat_block predraw -setCompositionMode Source -repeat_block postdraw -surface_end - - -# Destination -surface_begin 400 0 100 100 -repeat_block predraw -setCompositionMode Destination -repeat_block postdraw -surface_end - - -# Source In -surface_begin 500 0 100 100 -repeat_block predraw -setCompositionMode SourceIn -repeat_block postdraw -surface_end - -translate 0 50 - -# Destination In -surface_begin 0 100 100 100 -repeat_block predraw -setCompositionMode DestinationIn -repeat_block postdraw -surface_end - - -# Source Out -surface_begin 100 100 100 100 -repeat_block predraw -setCompositionMode SourceOut -repeat_block postdraw -surface_end - - -# Destination Out -surface_begin 200 100 100 100 -repeat_block predraw -setCompositionMode DestinationOut -repeat_block postdraw -surface_end - - -# SourceAtop -surface_begin 300 100 100 100 -repeat_block predraw -setCompositionMode SourceAtop -repeat_block postdraw -surface_end - - -# DestinationAtop -surface_begin 400 100 100 100 -repeat_block predraw -setCompositionMode DestinationAtop -repeat_block postdraw -surface_end - - -# Xor -surface_begin 500 100 100 100 -repeat_block predraw -setCompositionMode Xor -repeat_block postdraw -surface_end - -translate 0 50 - -# Plus -surface_begin 0 200 100 100 -repeat_block predraw -setCompositionMode Plus -repeat_block postdraw -surface_end - - -# Multiply -surface_begin 100 200 100 100 -repeat_block predraw -setCompositionMode Multiply -repeat_block postdraw -surface_end - - -# Screen -surface_begin 200 200 100 100 -repeat_block predraw -setCompositionMode Screen -repeat_block postdraw -surface_end - - -# Overlay -surface_begin 300 200 100 100 -repeat_block predraw -setCompositionMode Overlay -repeat_block postdraw -surface_end - - -# Darken -surface_begin 400 200 100 100 -repeat_block predraw -setCompositionMode Darken -repeat_block postdraw -surface_end - - -# Lighten -surface_begin 500 200 100 100 -repeat_block predraw -setCompositionMode Lighten -repeat_block postdraw -surface_end - -translate 0 50 - -# ColorDodge -surface_begin 0 300 100 100 -repeat_block predraw -setCompositionMode ColorDodge -repeat_block postdraw -surface_end - - -# Multiply -surface_begin 100 300 100 100 -repeat_block predraw -setCompositionMode ColorBurn -repeat_block postdraw -surface_end - - -# Screen -surface_begin 200 300 100 100 -repeat_block predraw -setCompositionMode HardLight -repeat_block postdraw -surface_end - - -# Overlay -surface_begin 300 300 100 100 -repeat_block predraw -setCompositionMode SoftLight -repeat_block postdraw -surface_end - - -# Darken -surface_begin 400 300 100 100 -repeat_block predraw -setCompositionMode Difference -repeat_block postdraw -surface_end - - -# Lighten -surface_begin 500 300 100 100 -repeat_block predraw -setCompositionMode Exclusion -repeat_block postdraw -surface_end - -resetMatrix - -drawText 0 50 "SourceOver" -drawText 100 50 "DestinationOver" -drawText 200 50 "Clear" -drawText 300 50 "Source" -drawText 400 50 "Destination" -drawText 500 50 "SourceIn" -drawText 0 200 "DestinationIn" -drawText 100 200 "SourceOut" -drawText 200 200 "DestinationOut" -drawText 300 200 "SourceAtop" -drawText 400 200 "DestinationAtop" -drawText 500 200 "Xor" -drawText 0 350 "Plus" -drawText 100 350 "Multiply" -drawText 200 350 "Screen" -drawText 300 350 "Overlay" -drawText 400 350 "Darken" -drawText 500 350 "Lighten" -drawText 0 500 "ColorDodge" -drawText 100 500 "ColorBurn" -drawText 200 500 "HardLight" -drawText 300 500 "SoftLight" -drawText 400 500 "Difference" -drawText 500 500 "Exclusion" diff --git a/tests/arthur/data/qps/porter_duff2_qps.png b/tests/arthur/data/qps/porter_duff2_qps.png deleted file mode 100644 index b4c893be20..0000000000 Binary files a/tests/arthur/data/qps/porter_duff2_qps.png and /dev/null differ diff --git a/tests/arthur/data/qps/porter_duff_qps.png b/tests/arthur/data/qps/porter_duff_qps.png deleted file mode 100644 index c33dade8bd..0000000000 Binary files a/tests/arthur/data/qps/porter_duff_qps.png and /dev/null differ diff --git a/tests/arthur/data/qps/primitives.qps b/tests/arthur/data/qps/primitives.qps deleted file mode 100644 index c4cc92cf5d..0000000000 --- a/tests/arthur/data/qps/primitives.qps +++ /dev/null @@ -1,198 +0,0 @@ -setBrush #ff7f7fff -setPen black 1 solidline -translate 20 20 - -begin_block testblock -save -drawRect 0 0 10 10 -drawRect 20 0 20 10 -drawRect 0 20 10 20 -drawRect 20 20 20 20 -translate 50 0 -setPen NoPen -drawRect 0 0 10 10 -drawRect 20 0 20 10 -drawRect 0 20 10 20 -drawRect 20 20 20 20 -restore - -save -translate 0 50 -drawEllipse 0 0 10 10 -drawEllipse 20 0 20 10 -drawEllipse 0 20 10 20 -drawEllipse 20 20 20 20 -translate 50 0 -setPen NoPen -drawEllipse 0 0 10 10 -drawEllipse 20 0 20 10 -drawEllipse 0 20 10 20 -drawEllipse 20 20 20 20 -restore - -save -translate 0 100 -drawPolygon [ 0 0 30 0 30 30 10 30 10 10 40 10 40 40 0 40 ] -save -translate 0 50 -drawPolygon [ 0 0 30 0 30 30 10 30 10 10 40 10 40 40 0 40 ] Winding -translate 0 45 -drawPolyline [ 0 0 50 0 25 25 ] -restore -setPen NoPen -translate 50 0 -drawPolygon [ 0 0 30 0 30 30 10 30 10 10 40 10 40 40 0 40 ] -save -translate 0 50 -drawPolygon [ 0 0 30 0 30 30 10 30 10 10 40 10 40 40 0 40 ] Winding -restore -save -translate -20 100 -drawPie 0 0 50 50 0 1500 -restore -restore -end_block - -setPen black 1 SolidLine FlatCap -translate 200 0 -scale 2 1 -rotate 10 -repeat_block testblock - -resetMatrix -translate 0 250 -setBrush 7f7f7fff -translate 20 20 -repeat_block testblock - -setPen black 1 SolidLine FlatCap -translate 200 0 -scale 2 1 -rotate 10 -repeat_block testblock - -resetMatrix -save -setRenderHint LineAntialiasing -setBrush 7f7fff -translate 20 500 -repeat_block testblock - -translate 200 0 -scale 2 1 -rotate 10 -repeat_block testblock -restore - -setRenderHint LineAntialiasing false -translate 420 20 -begin_block lines -drawLine 0 0 100 0 -drawLine 0 0 100 10 -drawLine 0 0 100 20 -drawLine 0 0 100 30 -drawLine 0 0 100 40 -drawLine 0 0 100 50 -drawLine 0 0 100 60 -drawLine 0 0 100 70 -drawLine 0 0 100 80 -drawLine 0 0 100 90 -drawLine 0 0 100 100 -drawLine 0 0 90 100 -drawLine 0 0 80 100 -drawLine 0 0 70 100 -drawLine 0 0 60 100 -drawLine 0 0 50 100 -drawLine 0 0 40 100 -drawLine 0 0 30 100 -drawLine 0 0 20 100 -drawLine 0 0 10 100 -drawLine 0 0 0 100 -end_block - -setRenderHint LineAntialiasing -translate 0 120 -repeat_block lines - -translate 0 120 -scale 5 2 -repeat_block lines - -resetMatrix -translate 420 500 -begin_block roundedrects -save -drawRoundedRect 0 0 50 30 5 5 -translate 60 0 -drawRoundedRect 0 0 50 30 7.5 7.5 -translate 60 0 -drawRoundedRect 0 0 50 30 10 10 -translate 60 0 -drawRoundedRect 0 0 50 30 12.5 12.5 -translate 60 0 -drawRoundedRect 0 0 50 30 15 15 -restore -save -translate 0 40 -drawRoundedRect 0 0 50 30 20 20 RelativeSize -translate 60 0 -drawRoundedRect 0 0 50 30 40 40 RelativeSize -translate 60 0 -drawRoundedRect 0 0 50 30 60 60 RelativeSize -translate 60 0 -drawRoundedRect 0 0 50 30 80 80 RelativeSize -translate 60 0 -drawRoundedRect 0 0 50 30 100 100 RelativeSize -restore -end_block - -translate 0.5 80.5 -repeat_block roundedrects - -translate -0.5 79.5 -setRenderHint Antialiasing off -repeat_block roundedrects - -resetMatrix -setRenderHint Antialiasing off -setPen black 1 -begin_block drawShapes -translate 550.5 25 -rotate 45 -setBrush nobrush -drawEllipse -10 -10 20 20 -drawLine 10 0 50 0 -drawRect 50 -7 14 14 -resetMatrix -end_block - -setPen black 2 -translate 25 0 -repeat_block drawShapes - -setPen black 3 -translate 50 0 -repeat_block drawShapes - -setPen black 4 -translate 75 0 -repeat_block drawShapes - -resetMatrix -setRenderHint Antialiasing off -setPen nopen -translate 550 100 -setBrush #7f7f7fff -drawRect -0.5 -0.5 21 21 -setBrush red -drawEllipse 0 0 20 20 -setBrush nobrush -setPen black -drawEllipse 0 0 20 20 - -translate 25 0 -setPen nopen -setBrush #7f7f7fff -drawRect 0 0 20 20 -setBrush red -drawEllipse 0 0 20 20 diff --git a/tests/arthur/data/qps/primitives_qps.png b/tests/arthur/data/qps/primitives_qps.png deleted file mode 100644 index 2d8192a121..0000000000 Binary files a/tests/arthur/data/qps/primitives_qps.png and /dev/null differ diff --git a/tests/arthur/data/qps/radial_gradients.qps b/tests/arthur/data/qps/radial_gradients.qps deleted file mode 100644 index 5a82f8f3bb..0000000000 --- a/tests/arthur/data/qps/radial_gradients.qps +++ /dev/null @@ -1,96 +0,0 @@ -path_addRect path 400 0 80 80 -path_addEllipse path 440 40 60 60 - -setRenderHint Antialiasing - -setPen black - -begin_block gradients -gradient_clearStops -gradient_appendStop 0 red -gradient_appendStop 0.25 orange -gradient_appendStop 0.5 yellow -gradient_appendStop 0.8 green -gradient_appendStop 1 cyan - -gradient_setSpread PadSpread -gradient_setRadial 20 20 50 40 40 -drawRect 0 0 100 100 - -gradient_setSpread ReflectSpread -gradient_setRadial 120 20 50 140 40 -drawEllipse 100 0 100 100 - -gradient_setSpread RepeatSpread -gradient_setRadial 220 20 50 240 40 -drawRoundRect 200 0 100 100 - -gradient_clearStops -gradient_appendStop 0 3f7f7fff -gradient_appendStop 0.5 dfdfffff -gradient_appendStop 1 7f00007f - -gradient_setSpread PadSpread -gradient_setRadial 320 20 50 340 40 -drawPolygon [300 0 390 0 350 99] - -gradient_setSpread ReflectSpread -gradient_setRadial 420 20 50 440 40 -drawPath path - -gradient_setSpread RepeatSpread -gradient_setRadial 520 20 50 540 40 -drawPie 500 0 100 100 720 4320 -end_block - -translate 0 100 -scale 1 2 -repeat_block gradients - -resetMatrix -translate 0 300 -brushTranslate 30 0 -brushScale 0.9 0.9 -brushRotate 20 -repeat_block gradients - -# Some helpful info perhaps? -resetMatrix -setPen black - -drawText 610 50 "No XForm" -drawText 610 200 "scale 1x2" -drawText 610 300 "brush transform" -drawText 10 450 "Pad" -drawText 110 450 "Reflect" -drawText 210 450 "Repeat" -drawText 310 450 "Pad w/alpha" -drawText 410 450 "Reflect w/alpha" -drawText 510 450 "Repeat w/alpha" - -# Radius and focal indicators -setPen 3f000000 -setBrush nobrush - -begin_block ellipse_draw -setClipRect 0 0 100 100 -drawEllipse -30 -30 100 100 -drawEllipse 35 35 11 11 -translate 100 0 -end_block - -repeat_block ellipse_draw -repeat_block ellipse_draw -repeat_block ellipse_draw -repeat_block ellipse_draw -repeat_block ellipse_draw - -resetMatrix -translate 0 100 -scale 1 2 -repeat_block ellipse_draw -repeat_block ellipse_draw -repeat_block ellipse_draw -repeat_block ellipse_draw -repeat_block ellipse_draw -repeat_block ellipse_draw diff --git a/tests/arthur/data/qps/radial_gradients_extended.qps b/tests/arthur/data/qps/radial_gradients_extended.qps deleted file mode 100644 index d80a149252..0000000000 --- a/tests/arthur/data/qps/radial_gradients_extended.qps +++ /dev/null @@ -1,95 +0,0 @@ -path_addRect path 400 0 80 80 -path_addEllipse path 440 40 60 60 - -setRenderHint Antialiasing - -setPen black - -begin_block gradients -gradient_clearStops -gradient_appendStop 0 red -gradient_appendStop 0.25 orange -gradient_appendStop 0.5 yellow -gradient_appendStop 0.8 green -gradient_appendStop 1 cyan - -gradient_setSpread PadSpread -gradient_setRadialExtended 0 0 20 40 40 10 -drawRect 0 0 100 100 - -gradient_setSpread ReflectSpread -gradient_setRadialExtended 120 20 20 140 40 10 -drawEllipse 100 0 100 100 - -gradient_setSpread RepeatSpread -gradient_setRadialExtended 240 20 20 260 40 10 -drawRoundRect 200 0 100 100 - -gradient_clearStops -gradient_appendStop 0 3f7f7fff -gradient_appendStop 0.5 dfdfffff -gradient_appendStop 1 7f00007f - -gradient_setSpread PadSpread -gradient_setRadialExtended 320 20 20 340 40 10 -drawPolygon [300 0 390 0 350 99] - -gradient_setSpread ReflectSpread -gradient_setRadialExtended 420 20 20 440 40 10 -drawPath path - -gradient_setSpread RepeatSpread -gradient_setRadialExtended 520 20 20 540 40 10 -drawPie 500 0 100 100 720 4320 -end_block - -translate 0 100 -scale 1 2 -repeat_block gradients - -resetMatrix -translate 0 300 -brushTranslate 30 0 -brushScale 0.9 0.9 -repeat_block gradients - -# Some helpful info perhaps? -resetMatrix -setPen black - -drawText 610 50 "No XForm" -drawText 610 200 "scale 1x2" -drawText 610 300 "brush transform" -drawText 10 450 "Pad" -drawText 110 450 "Reflect" -drawText 210 450 "Repeat" -drawText 310 450 "Pad w/alpha" -drawText 410 450 "Reflect w/alpha" -drawText 510 450 "Repeat w/alpha" - -# Radius and focal indicators -setPen 3f000000 -setBrush nobrush - -begin_block ellipse_draw -setClipRect 0 0 100 100 -drawEllipse -30 -30 100 100 -drawEllipse 35 35 11 11 -translate 100 0 -end_block - -repeat_block ellipse_draw -repeat_block ellipse_draw -repeat_block ellipse_draw -repeat_block ellipse_draw -repeat_block ellipse_draw - -resetMatrix -translate 0 100 -scale 1 2 -repeat_block ellipse_draw -repeat_block ellipse_draw -repeat_block ellipse_draw -repeat_block ellipse_draw -repeat_block ellipse_draw -repeat_block ellipse_draw diff --git a/tests/arthur/data/qps/radial_gradients_extended_qps.png b/tests/arthur/data/qps/radial_gradients_extended_qps.png deleted file mode 100644 index 45a3e6036c..0000000000 Binary files a/tests/arthur/data/qps/radial_gradients_extended_qps.png and /dev/null differ diff --git a/tests/arthur/data/qps/radial_gradients_perspectives.qps b/tests/arthur/data/qps/radial_gradients_perspectives.qps deleted file mode 100644 index d446782d20..0000000000 --- a/tests/arthur/data/qps/radial_gradients_perspectives.qps +++ /dev/null @@ -1,60 +0,0 @@ - -setRenderHint Antialiasing - -setPen #00ff00 - -translate 10 10 -# standard draw -begin_block gradient -gradient_clearStops -gradient_appendStop 0 red -gradient_appendStop 0.25 orange -gradient_appendStop 0.5 yellow -gradient_appendStop 0.8 green -gradient_appendStop 1 cyan - -gradient_setSpread PadSpread -gradient_setRadial 110 100 230 230 240 -drawRect 0 0 300 300 -end_block gradient - -# Rotation w/o smooth xform -save -translate 350 0 -save - setRenderHint SmoothPixmapTransform on - mapQuadToQuad 0 0 0 300 300 300 300 0 0 50 0 200 300 300 300 0 - repeat_block gradient -restore -restore - -translate 0 320 - -save - setRenderHint SmoothPixmapTransform on - mapQuadToQuad 0 0 0 300 300 300 300 0 0 0 100 300 200 300 300 0 - repeat_block gradient -restore - -save -translate 350 0 -save - setRenderHint SmoothPixmapTransform on - mapQuadToQuad 0 0 0 300 300 300 300 0 0 0 0 300 300 250 300 50 - repeat_block gradient -restore -restore - - -resetMatrix -setPen black -translate 125 20 -drawText 0 0 "No transform" -translate 350 0 -drawText 0 0 "Left Tilted" -resetMatrix -translate 125 350 -drawText 0 0 "Bottom Tilted" -translate 350 0 -drawText 0 0 "Right Tilted" -translate 120 0 diff --git a/tests/arthur/data/qps/radial_gradients_perspectives_qps.png b/tests/arthur/data/qps/radial_gradients_perspectives_qps.png deleted file mode 100644 index d8332508f0..0000000000 Binary files a/tests/arthur/data/qps/radial_gradients_perspectives_qps.png and /dev/null differ diff --git a/tests/arthur/data/qps/radial_gradients_qps.png b/tests/arthur/data/qps/radial_gradients_qps.png deleted file mode 100644 index 11043e80d3..0000000000 Binary files a/tests/arthur/data/qps/radial_gradients_qps.png and /dev/null differ diff --git a/tests/arthur/data/qps/rasterops.qps b/tests/arthur/data/qps/rasterops.qps deleted file mode 100644 index ee3decaf00..0000000000 --- a/tests/arthur/data/qps/rasterops.qps +++ /dev/null @@ -1,84 +0,0 @@ -setPen NoPen - -setBrush black -drawRect 10 10 60 500 - -setCompositionMode SourceOrDestination -translate 20 20 - -begin_block drawShape - setBrush 0xffff0000 - drawEllipse 5 5 30 30 - setBrush 0xff00ff00 - drawRect 0 0 20 20 - setBrush 0xff0000ff - drawRect 20 20 20 20 -end_block - -begin_block loop - setCompositionMode SourceAndDestination - translate 0 50 -repeat_block drawShape - -setCompositionMode SourceXorDestination -translate 0 50 -repeat_block drawShape - -setCompositionMode NotSourceAndNotDestination -translate 0 50 -repeat_block drawShape - -setCompositionMode NotSourceOrNotDestination -translate 0 50 -repeat_block drawShape - -setCompositionMode NotSourceXorDestination -translate 0 50 -repeat_block drawShape - -setCompositionMode NotSource -translate 0 50 -repeat_block drawShape - -setCompositionMode NotSourceAndDestination -translate 0 50 -repeat_block drawShape - -setCompositionMode SourceAndNotDestination -translate 0 50 -repeat_block drawShape -end_block - -resetMatrix -setCompositionMode Source -setBrush white -drawRect 100 10 60 500 -translate 110 20 -repeat_block loop - -resetMatrix -setCompositionMode Source -translate 190 20 -repeat_block loop - -resetMatrix -setPen black -setCompositionMode SourceOver -translate 250 45 -drawText 20 0 "Or ROP" -translate 0 50 -drawText 20 0 "And ROP" -translate 0 50 -drawText 20 0 "Xor ROP" -translate 0 50 -drawText 20 0 "Nor ROP" -translate 0 50 -drawText 20 0 "Nand ROP" -translate 0 50 -drawText 0 0 "NSrcXorDst ROP" -translate 0 50 -drawText 20 0 "NSrc ROP" -translate 0 50 -drawText 0 0 "NSrcAndDst ROP" -translate 0 50 -drawText 0 0 "SrcAndNDst ROP" diff --git a/tests/arthur/data/qps/rasterops_qps.png b/tests/arthur/data/qps/rasterops_qps.png deleted file mode 100644 index 7b93001cd5..0000000000 Binary files a/tests/arthur/data/qps/rasterops_qps.png and /dev/null differ diff --git a/tests/arthur/data/qps/sizes.qps b/tests/arthur/data/qps/sizes.qps deleted file mode 100644 index c585e5a01f..0000000000 --- a/tests/arthur/data/qps/sizes.qps +++ /dev/null @@ -1,87 +0,0 @@ -setPen NoPen -setBrush black - -translate 10 10 - -begin_block testblock -drawRect 0 0 10 10 -drawRect 20 0 11 11 -drawRect 40 0 12 12 -drawRect 60 0 13 13 -drawRect 80 0 14 14 -drawRect 100 0 15 15 -drawRect 120 0 16 16 -drawRect 140 0 17 17 -drawRect 160 0 18 18 -drawRect 180 0 19 19 - -drawEllipse 0 20 10 10 -drawEllipse 20 20 11 11 -drawEllipse 40 20 12 12 -drawEllipse 60 20 13 13 -drawEllipse 80 20 14 14 -drawEllipse 100 20 15 15 -drawEllipse 120 20 16 16 -drawEllipse 140 20 17 17 -drawEllipse 160 20 18 18 -drawEllipse 180 20 19 19 - -drawRoundRect 0 40 10 10 -drawRoundRect 20 40 11 11 -drawRoundRect 40 40 12 12 -drawRoundRect 60 40 13 13 -drawRoundRect 80 40 14 14 -drawRoundRect 100 40 15 15 -drawRoundRect 120 40 16 16 -drawRoundRect 140 40 17 17 -drawRoundRect 160 40 18 18 -drawRoundRect 180 40 19 19 - -drawPie 0 60 10 10 0 4320 -drawPie 20 60 11 11 0 4320 -drawPie 40 60 12 12 0 4320 -drawPie 60 60 13 13 0 4320 -drawPie 80 60 14 14 0 4320 -drawPie 100 60 15 15 0 4320 -drawPie 120 60 16 16 0 4320 -drawPie 140 60 17 17 0 4320 -drawPie 160 60 18 18 0 4320 -drawPie 180 60 19 19 0 4320 - -drawArc 0 80 10 10 0 4320 -drawArc 20 80 11 11 0 4320 -drawArc 40 80 12 12 0 4320 -drawArc 60 80 13 13 0 4320 -drawArc 80 80 14 14 0 4320 -drawArc 100 80 15 15 0 4320 -drawArc 120 80 16 16 0 4320 -drawArc 140 80 17 17 0 4320 -drawArc 160 80 18 18 0 4320 -drawArc 180 80 19 19 0 4320 - -drawChord 0 100 10 10 0 4320 -drawChord 20 100 11 11 0 4320 -drawChord 40 100 12 12 0 4320 -drawChord 60 100 13 13 0 4320 -drawChord 80 100 14 14 0 4320 -drawChord 100 100 15 15 0 4320 -drawChord 120 100 16 16 0 4320 -drawChord 140 100 17 17 0 4320 -drawChord 160 100 18 18 0 4320 -drawChord 180 100 19 19 0 4320 - -end_block - -setPen red -translate 0 150 -repeat_block testblock - -setRenderHint LineAntialiasing - -setPen nopen -translate 0 150 -repeat_block testblock - -setPen red -translate 0 150 -repeat_block testblock diff --git a/tests/arthur/data/qps/sizes_qps.png b/tests/arthur/data/qps/sizes_qps.png deleted file mode 100644 index f9dec796a3..0000000000 Binary files a/tests/arthur/data/qps/sizes_qps.png and /dev/null differ diff --git a/tests/arthur/data/qps/text.qps b/tests/arthur/data/qps/text.qps deleted file mode 100644 index 2a04bb06f5..0000000000 --- a/tests/arthur/data/qps/text.qps +++ /dev/null @@ -1,122 +0,0 @@ -drawText -5 5 "Text that is drawn outside the bounds..." - -translate 20 20 -begin_block text_drawing -save - setFont "sansserif" 10 normal - drawText 0 20 "sansserif 10pt, normal" - - setFont "sansserif" 12 normal - drawText 0 40 "sansserif 12pt, normal" - - setFont "sansserif" 10 bold - drawText 0 60 "sansserif 12pt, bold" - - setFont "sansserif" 10 bold italic - drawText 0 80 "sansserif 10pt, bold italic" - - - translate 0 100 - setPen #7fff0000 - - setFont "sansserif" 10 normal - drawText 0 20 "alpha sansserif 10pt, normal" - - setFont "sansserif" 12 normal - drawText 0 40 "alpha sansserif 12pt, normal" - - setFont "sansserif" 10 bold - drawText 0 60 "alpha sansserif 12pt, bold" - - setFont "sansserif" 10 bold italic - drawText 0 80 "alpha sansserif 10pt, bold italic" - - - translate 0 100 - setPen black - save - scale 0.9 0.9 - - setFont "sansserif" 10 normal - drawText 0 20 "scaled sansserif 10pt, normal" - - setFont "sansserif" 12 normal - drawText 0 40 "scaled sansserif 12pt, normal" - - setFont "sansserif" 10 bold - drawText 0 60 "scaled sansserif 12pt, bold" - - setFont "sansserif" 10 bold italic - drawText 0 80 "scaled sansserif 10pt, bold italic" - restore - - translate 0 100 - setPen black - save - translate 200 90 - rotate 185 - - setFont "sansserif" 10 normal - drawText 0 20 "scaled sansserif 10pt, normal" - - setFont "sansserif" 12 normal - drawText 0 40 "scaled sansserif 12pt, normal" - - setFont "sansserif" 10 bold - drawText 0 60 "scaled sansserif 12pt, bold" - - setFont "sansserif" 10 bold italic - drawText 0 80 "scaled sansserif 10pt, bold italic" - restore - - translate 0 100 - gradient_appendStop 0 red - gradient_appendStop 0.5 #00ff00 - gradient_appendStop 1 blue - gradient_setLinear 0 0 200 0 - setPen brush - - setFont "sansserif" 10 normal - drawText 0 0 "gradient sansserif 10pt, normal" - - setFont "sansserif" 12 normal - drawText 0 20 "gradient sansserif 12pt, normal" - - setFont "sansserif" 10 bold - drawText 0 40 "gradient sansserif 12pt, bold" - - setFont "sansserif" 10 bold italic - drawText 0 60 "gradient sansserif 10pt, bold italic" -restore -end_block - -translate 250 0 -drawText 25 520 "clipped to rectangle" -save - setPen #3f000000 - setBrush nobrush - drawRect 20 0 100 500 - setClipRect 20 0 100 500 - setPen black - repeat_block text_drawing -restore - -translate 150 0 -drawText 25 520 "clipped to path" -save - path_moveTo clip 20 0 - path_cubicTo clip 0 200 40 400 20 400 - path_lineTo clip 30 500 - path_lineTo clip 30 0 - path_lineTo clip 40 0 - path_lineTo clip 40 500 - path_lineTo clip 120 500 - path_lineTo clip 120 0 - path_lineTo clip 20 0 - setPen #3f000000 - setBrush nobrush - drawPath clip - setClipPath clip - setPen black - repeat_block text_drawing -restore diff --git a/tests/arthur/data/qps/text_perspectives.qps b/tests/arthur/data/qps/text_perspectives.qps deleted file mode 100644 index bfa51c4e38..0000000000 --- a/tests/arthur/data/qps/text_perspectives.qps +++ /dev/null @@ -1,100 +0,0 @@ - -setRenderHint Antialiasing - -setPen black - -translate 10 10 -# standard draw -begin_block text -setBrush gray -drawRect 0 0 300 300 - -setFont "times" 3 -drawText 10 10 "Hello World...." - -setFont "times" 4 -drawText 10 20 "Hello World...." - -setFont "times" 5 -drawText 10 30 "Hello World...." - -setFont "times" 6 -drawText 10 40 "Hello World...." - -setFont "times" 7 -drawText 10 50 "Hello World...." - -setFont "times" 8 -drawText 10 60 "Hello World...." - -setFont "times" 9 -drawText 10 70 "Hello World...." - -setFont "times" 10 -drawText 10 80 "Hello World...." - -setFont "times" 16 -drawText 10 100 "Hello World...." - -setFont "times" 17 -drawText 10 120 "Hello World...." - -setFont "times" 18 -drawText 10 140 "Hello World...." - -setFont "times" 20 -drawText 10 160 "Hello World...." - -setFont "times" 22 -drawText 10 180 "Hello World...." - -setFont "times" 24 -drawText 10 205 "Hello World...." - -setFont "times" 26 -drawText 10 230 "Hello World...." - -setFont "times" 32 -drawText 10 260 "Hello World...." -end_block text - -# Rotation w/o smooth xform -save -translate 350 0 -save - setRenderHint SmoothPixmapTransform on - mapQuadToQuad 0 0 0 300 300 300 300 0 0 50 0 200 300 300 300 0 - repeat_block text -restore -restore - -translate 0 320 - -save - setRenderHint SmoothPixmapTransform on - mapQuadToQuad 0 0 0 300 300 300 300 0 0 0 100 300 200 300 300 0 - repeat_block text -restore - -save -translate 350 0 -save - setRenderHint SmoothPixmapTransform on - mapQuadToQuad 0 0 0 300 300 300 300 0 0 0 0 300 300 250 300 50 - repeat_block text -restore -restore - - -resetMatrix -setPen black -translate 125 20 -drawText 0 0 "No transform" -translate 350 0 -drawText 0 0 "Left Tilted" -resetMatrix -translate 125 350 -drawText 0 0 "Bottom Tilted" -translate 350 0 -drawText 0 0 "Right Tilted" -translate 120 0 diff --git a/tests/arthur/data/qps/text_perspectives_qps.png b/tests/arthur/data/qps/text_perspectives_qps.png deleted file mode 100644 index 183ad6ff31..0000000000 Binary files a/tests/arthur/data/qps/text_perspectives_qps.png and /dev/null differ diff --git a/tests/arthur/data/qps/text_qps.png b/tests/arthur/data/qps/text_qps.png deleted file mode 100644 index 9a954938cf..0000000000 Binary files a/tests/arthur/data/qps/text_qps.png and /dev/null differ diff --git a/tests/arthur/data/qps/tiled_pixmap.qps b/tests/arthur/data/qps/tiled_pixmap.qps deleted file mode 100644 index 968eae65df..0000000000 --- a/tests/arthur/data/qps/tiled_pixmap.qps +++ /dev/null @@ -1,82 +0,0 @@ - -translate 0 10 -setRenderHint Antialiasing - -pixmap_load dome_argb32 the_pixmap - -begin_block draw_stuff -save - - # Standard draw - drawTiledPixmap the_pixmap 0 0 150 100 0 0 - - # Standard draw with offset - translate 160 0 - drawTiledPixmap the_pixmap 0 0 150 100 25 25 - - # xformed - translate 160 0 - save - translate 10 -10 - rotate 10 - setRenderHint SmoothPixmapTransform false - drawTiledPixmap the_pixmap 0 0 150 100 25 25 - restore - - # xformed with smooth xform - translate 160 0 - save - translate 10 -10 - rotate 10 - setRenderHint SmoothPixmapTransform - drawTiledPixmap the_pixmap 0 0 150 100 25 25 - restore -restore -end_block - - -translate 0 120 -pixmap_load dome_rgb32 the_pixmap -repeat_block draw_stuff - - -translate 0 120 -pixmap_load dome_indexed the_pixmap -repeat_block draw_stuff - - -translate 0 120 -pixmap_load dome_indexed_mask the_pixmap -repeat_block draw_stuff - - -translate 0 120 -pixmap_load dome_mono the_pixmap -repeat_block draw_stuff - - -################################################################################ -# Some helpful text... -# - -resetMatrix -translate 650 80 -drawText 0 0 "32 bit w/alpha" -translate 0 120 -drawText 0 0 "32 bit w/o alpha" -translate 0 120 -drawText 0 0 "8 bit indexed" -translate 0 120 -drawText 0 0 "8 bit indexed w/mask" -translate 0 120 -drawText 0 0 "1 bit" - -resetMatrix -translate 10 630 -drawText 0 0 "normal" -translate 160 0 -drawText 0 0 "offset" -translate 160 0 -drawText 0 0 "xformed" -translate 160 0 -drawText 0 0 "smooth xformed" \ No newline at end of file diff --git a/tests/arthur/data/qps/tiled_pixmap_qps.png b/tests/arthur/data/qps/tiled_pixmap_qps.png deleted file mode 100644 index 42bd5db645..0000000000 Binary files a/tests/arthur/data/qps/tiled_pixmap_qps.png and /dev/null differ diff --git a/tests/arthur/data/random/arcs02.svg b/tests/arthur/data/random/arcs02.svg deleted file mode 100644 index c0bddf9556..0000000000 --- a/tests/arthur/data/random/arcs02.svg +++ /dev/null @@ -1,59 +0,0 @@ - - - - Example arcs02 - arc options in paths - Pictures showing the result of setting - large-arc-flag and sweep-flag to the four - possible combinations of 0 and 1. - - - - - - Arc start - Arc end - - - - - - - - - - large-arc-flag=0 - sweep-flag=0 - - - - - large-arc-flag=0 - sweep-flag=1 - - - - - large-arc-flag=1 - sweep-flag=0 - - - - - large-arc-flag=1 - sweep-flag=1 - - - - - - - diff --git a/tests/arthur/data/random/atop.svg b/tests/arthur/data/random/atop.svg deleted file mode 100644 index 3aba158242..0000000000 --- a/tests/arthur/data/random/atop.svg +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tests/arthur/data/random/clinton.svg b/tests/arthur/data/random/clinton.svg deleted file mode 100644 index d539754b17..0000000000 --- a/tests/arthur/data/random/clinton.svg +++ /dev/null @@ -1,370 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tests/arthur/data/random/cowboy.svg b/tests/arthur/data/random/cowboy.svg deleted file mode 100644 index dc2865c222..0000000000 --- a/tests/arthur/data/random/cowboy.svg +++ /dev/null @@ -1,4110 +0,0 @@ - - - - - - - A Cowboy - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tests/arthur/data/random/gear_is_rising.svg b/tests/arthur/data/random/gear_is_rising.svg deleted file mode 100644 index f024c3e037..0000000000 --- a/tests/arthur/data/random/gear_is_rising.svg +++ /dev/null @@ -1,702 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tests/arthur/data/random/gearflowers.svg b/tests/arthur/data/random/gearflowers.svg deleted file mode 100644 index 038e202d28..0000000000 --- a/tests/arthur/data/random/gearflowers.svg +++ /dev/null @@ -1,8342 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - Gearflowers - January 8, 2004 - - - Alexandre Rostovtsev - - - Wallpaper design for the KDE SVG contest. Also, hummingbirds are cool. - - - - gear - flower - hummingbird - - - - - Alexandre Rostovtsev - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tests/arthur/data/random/kde-look.svg b/tests/arthur/data/random/kde-look.svg deleted file mode 100644 index f1fe22f303..0000000000 --- a/tests/arthur/data/random/kde-look.svg +++ /dev/null @@ -1,16674 +0,0 @@ - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tests/arthur/data/random/linear_grad_transform.svg b/tests/arthur/data/random/linear_grad_transform.svg deleted file mode 100644 index ef04bfcc9b..0000000000 --- a/tests/arthur/data/random/linear_grad_transform.svg +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/tests/arthur/data/random/longhorn.svg b/tests/arthur/data/random/longhorn.svg deleted file mode 100644 index 8bbf1fa1d3..0000000000 --- a/tests/arthur/data/random/longhorn.svg +++ /dev/null @@ -1,1595 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tests/arthur/data/random/multiply.svg b/tests/arthur/data/random/multiply.svg deleted file mode 100644 index fe26bf700a..0000000000 --- a/tests/arthur/data/random/multiply.svg +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Uluru - - - - - - - - - - diff --git a/tests/arthur/data/random/picasso.svg b/tests/arthur/data/random/picasso.svg deleted file mode 100644 index bc4ae44f31..0000000000 --- a/tests/arthur/data/random/picasso.svg +++ /dev/null @@ -1,2842 +0,0 @@ - - - - - Picasso.pdx - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Girl Before a Mirror - - -Picasso, 1932, oil on canvas; 64 x 51 1/2 in. -The Museum of Modern Art, New York. - - - diff --git a/tests/arthur/data/random/porterduff.svg b/tests/arthur/data/random/porterduff.svg deleted file mode 100644 index d165473358..0000000000 --- a/tests/arthur/data/random/porterduff.svg +++ /dev/null @@ -1,298 +0,0 @@ - - - - - - - - - - - - - - - - - - - - Opaque - - - - - - - clear - - - - - - - - - - - src - - - - - - - - - - - dst - - - - - - - - - - - src-over - - - - - - - - - - - dst-over - - - - - - - - - - - src-in - - - - - - - - - - - dst-in - - - - - - - - - - - src-out - - - - - - - - - - - dst-out - - - - - - - - - - - src-atop - - - - - - - - - - - dst-atop - - - - - - - - - - - xor - - - - - - - - - Partially Transparent - - - - - - clear - - - - - - - - - - - src - - - - - - - - - - - dst - - - - - - - - - - - src-over - - - - - - - - - - - dst-over - - - - - - - - - - - src-in - - - - - - - - - - - dst-in - - - - - - - - - - - src-out - - - - - - - - - - - dst-out - - - - - - - - - - - src-atop - - - - - - - - - - - dst-atop - - - - - - - - - - - xor - - - - - - - - diff --git a/tests/arthur/data/random/radial_grad_transform.svg b/tests/arthur/data/random/radial_grad_transform.svg deleted file mode 100644 index ebc454b424..0000000000 --- a/tests/arthur/data/random/radial_grad_transform.svg +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/tests/arthur/data/random/solidcolor.svg b/tests/arthur/data/random/solidcolor.svg deleted file mode 100644 index 04c940092a..0000000000 --- a/tests/arthur/data/random/solidcolor.svg +++ /dev/null @@ -1,15 +0,0 @@ - - - <solidColor> Example - - - - - - - - - - A - - diff --git a/tests/arthur/data/random/spiral.svg b/tests/arthur/data/random/spiral.svg deleted file mode 100644 index 5c5a4e6002..0000000000 --- a/tests/arthur/data/random/spiral.svg +++ /dev/null @@ -1,536 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tests/arthur/data/random/tests.svg b/tests/arthur/data/random/tests.svg deleted file mode 100644 index 053802abe8..0000000000 --- a/tests/arthur/data/random/tests.svg +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - -MIN ALT: -MAX ALT: -TIME FROM: -TIME TO: -MEZ - -T - - -H - - -H1 - - -W - - -W1 - - - - - - diff --git a/tests/arthur/data/random/tests2.svg b/tests/arthur/data/random/tests2.svg deleted file mode 100644 index e7942c7e19..0000000000 --- a/tests/arthur/data/random/tests2.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - -U - - - - diff --git a/tests/arthur/data/random/tiger.svg b/tests/arthur/data/random/tiger.svg deleted file mode 100644 index ef798a8df1..0000000000 --- a/tests/arthur/data/random/tiger.svg +++ /dev/null @@ -1,728 +0,0 @@ - - - -A less cute tiger - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tests/arthur/data/random/uluru.png b/tests/arthur/data/random/uluru.png deleted file mode 100644 index dd4696491e..0000000000 Binary files a/tests/arthur/data/random/uluru.png and /dev/null differ diff --git a/tests/arthur/data/random/worldcup.svg b/tests/arthur/data/random/worldcup.svg deleted file mode 100644 index dcb708dcba..0000000000 --- a/tests/arthur/data/random/worldcup.svg +++ /dev/null @@ -1,14668 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - CONCACAFConfederation of North, Central American and CaribbeanAssociation Football - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tests/arthur/datagenerator/datagenerator.cpp b/tests/arthur/datagenerator/datagenerator.cpp deleted file mode 100644 index e2a6ffd5df..0000000000 --- a/tests/arthur/datagenerator/datagenerator.cpp +++ /dev/null @@ -1,481 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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 "datagenerator.h" - -#include "qengines.h" -#include "xmlgenerator.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#define W3C_SVG_BASE "http://www.w3.org/Graphics/SVG/Test/20030813/png/" - -static QString createW3CReference(const QString &refUrl, const QString &filename) -{ - QString base(refUrl); - - QString pngFile = filename; - pngFile.replace(".svg", ".png"); - - base += "full-"; - - base += pngFile; - return base; -} - - -static QString createOutFilename(const QString &baseDir, const QString &filename, - QEngine *engine) -{ - QString outFile = filename; - if (outFile.endsWith(".svgz")) - outFile.replace(".svgz", ".png"); - else - outFile.replace(".svg", ".png"); - - outFile.replace(".qps", ".qps.png"); - - if (!baseDir.isEmpty()) - outFile = QString("%1/%2/%3").arg(baseDir) - .arg(engine->name()).arg(outFile); - else - outFile = QString("%1/%2").arg(engine->name()) - .arg(outFile); - - return outFile; -} - -static void usage(const char *progname) -{ - std::cerr << "Couldn't find 'framework.ini' " - << "file and no suite has been specified."<\n" - << "\t-engine |onscreen|printing\n" - << "\t-suite \n" - << "\t-testcase \n" - << "\t-file \n" - << "\t-size \n" - << "\t-fill \n" - << "\t-output \n" - << std::endl; -} - -DataGenerator::DataGenerator() - : iterations(1) - , size(480, 360) - , fillColor(Qt::white) -{ - settings.load(QString("framework.ini")); - renderer = new QSvgRenderer(); -} - -DataGenerator::~DataGenerator() -{ -} - -void DataGenerator::run(int argc, char **argv) -{ - if (!processArguments(argc, argv)) - return; - - if (!fileName.isEmpty()) { - testGivenFile(); - return; - } - if (!settings.isValid() && suiteName.isEmpty()) { - usage(argv[0]); - return; - } - - prepareDirs(); - if (!settings.isValid()) { //only suite specified - XMLGenerator generator(outputDirName); - testSuite(generator, suiteName, - QString(), QString()); - return; - } - - XMLGenerator generator(outputDirName); - QStringList tests = settings.suites(); - qDebug()<<"tests = "<beginGroup(test); - - QString dirName = settings.settings()->value("dir").toString(); - QString refUrl = settings.settings()->value("reference").toString(); - - QDir dir(dirName); - if (!dir.isAbsolute() && !dir.exists()) - dir = QDir(QString("%1/%2").arg(baseDataDir).arg(dirName)); - - testSuite(generator, test, dir.absolutePath(), refUrl); - settings.settings()->endGroup(); - } - generator.generateOutput(outputDirName); -} - -void DataGenerator::testEngines(XMLGenerator &generator, const QString &file, - const QString &refUrl) -{ - QFileInfo fileInfo(file); - - generator.startTestcase(file); - - if (!refUrl.isEmpty()) { - QString ref = createW3CReference(refUrl, fileInfo.fileName()); - generator.addImage("Reference", ref, XMLData(), Reference); - } - - //bool isQpsScript = file.endsWith(".qps"); - bool isSvgFile = file.endsWith(".svg") || file.endsWith(".svgz"); - - if (isSvgFile) { - QDir oldDir = QDir::current(); - if (!baseDataDir.isEmpty()) { - QDir::setCurrent(baseDataDir); - } - renderer->load(fileInfo.absoluteFilePath()); - if (!baseDataDir.isEmpty()) { - QDir::setCurrent(oldDir.absolutePath()); - } - if (!renderer->isValid()) { - qWarning()<<"Error while processing " < engines = QtEngines::self()->engines(); - testGivenEngines(engines, fileInfo, file, generator, Normal); - - engines = QtEngines::self()->foreignEngines(); - testGivenEngines(engines, fileInfo, file, generator, Foreign); - - generator.endTestcase(); -} - -void DataGenerator::prepareDirs() -{ - QList engines = QtEngines::self()->engines(); - QDir outDirs; - foreach(QEngine *engine, engines) { - if (!wantedEngine(engine->name())) - continue; - - QString dirName = engine->name(); - if (!outputDirName.isEmpty()) - dirName = QString("%1/%2").arg(outputDirName).arg(dirName); - outDirs.mkpath(dirName); - } - - engines = QtEngines::self()->foreignEngines(); - foreach(QEngine *engine, engines) { - if (!wantedEngine(engine->name())) - continue; - - QString dirName = engine->name(); - if (!outputDirName.isEmpty()) - dirName = QString("%1/%2").arg(outputDirName).arg(dirName); - outDirs.mkpath(dirName); - } -} - -bool DataGenerator::processArguments(int argc, char **argv) -{ - QString frameworkFile; - for (int i=1; i < argc; ++i) { - QString opt(argv[i]); - if (opt == "-framework") { - frameworkFile = QString(argv[i+1]); - } else if (opt == "-engine") { - engineName = QString(argv[i+1]); - } else if (opt == "-suite") { - suiteName = QString(argv[i+1]); - } else if (opt == "-testcase") { - testcase = QString(argv[i+1]); - } else if (opt == "-file") { - fileName = QString(argv[i+1]); - } else if (opt == "-output") { - outputDirName = QString(argv[i+1]); - } else if (opt == "-iterations") { - iterations = QString(argv[i+1]).toInt(); - } else if (opt == "-size") { - QStringList args = QString(argv[i+1]).split(",", QString::SkipEmptyParts); - size = QSize(args[0].toInt(), args.size() > 1 ? args[1].toInt() : args[0].toInt()); - } else if (opt == "-fill") { - fillColor = QColor(QString(argv[i+1])); - } else if (opt.startsWith('-')) { - qDebug()<<"Unknown option "< engines = QtEngines::self()->engines(); - bool found = false; - if (engineName == QLatin1String("onscreen")|| - engineName == QLatin1String("printing")) - found = true; - else { - for (int i=0; iname() == engineName); - } - if (!found) { - qDebug("No such engine: '%s'\nAvailable engines are:", qPrintable(engineName)); - for (int i=0; iname())); - return false; - } - } - - if (!fileName.isEmpty()) { - baseDataDir = QFileInfo(fileName).absoluteDir().absolutePath(); - } - - return true; -} - -void DataGenerator::testGivenFile() -{ - prepareDirs(); - - XMLGenerator generator(baseDataDir); - generator.startSuite("Single"); - - QFileInfo fileInfo(fileName); - - bool qpsScript = fileName.endsWith("qps"); - if (!qpsScript) { - QDir oldDir = QDir::current(); - if (!baseDataDir.isEmpty()) { - QDir::setCurrent(baseDataDir); - } - renderer->load(fileInfo.absoluteFilePath()); - - if (!baseDataDir.isEmpty()) { - QDir::setCurrent(oldDir.absolutePath()); - } - - if (!renderer->isValid()) { - qWarning()<<"Error while processing " < engines = QtEngines::self()->engines(); - testGivenEngines(engines, fileInfo, fileInfo.fileName(), generator, - Normal); - generator.endSuite(); - - std::cout<< qPrintable(generator.generateData()); -} - -void DataGenerator::testSuite(XMLGenerator &generator, const QString &test, - const QString &dirName, const QString &refUrl) -{ - generator.startSuite(test); - - QDir dir(dirName); - dir.setFilter(QDir::Files | QDir::NoSymLinks); - //dir.setNameFilter() - - foreach (QFileInfo fileInfo, dir.entryInfoList()) { - if (!testcase.isEmpty() && fileInfo.fileName() != testcase) - continue; - QString suffix = fileInfo.suffix().toLower(); - if (suffix != "qps" && suffix != "svg" && suffix != "svgz") - continue; - qDebug()<<"Testing: "< engines, - const QFileInfo &fileInfo, - const QString &file, - XMLGenerator &generator, - GeneratorFlags eflags) -{ - QString fileName = fileInfo.absoluteFilePath(); - bool qpsScript = fileName.endsWith(".qps"); - QStringList qpsContents; - if (qpsScript) { - QString script = loadFile(fileName); - qpsContents = script.split("\n", QString::SkipEmptyParts); - } - - //foreign one don't generate qpsScripts - if ((eflags & Foreign) && qpsScript) - return; - - foreach (QEngine *engine, engines) { - if (!wantedEngine(engine->name())) - continue; - if (settings.isTestBlacklisted(engine->name(), fileInfo.fileName())) { - XMLData data; - data.details = QString("Test blacklisted"); - data.iterations = 1; - generator.addImage(engine->name(), QString(""), data, eflags); - continue; - } - - QString outFilename = createOutFilename(outputDirName, - fileInfo.fileName(), engine); - engine->prepare(qpsScript ? QSize(800, 800) : size, fillColor); - int elapsed = -1; - int maxElapsed = 0; - int minElapsed = 0; - if ((eflags & Foreign)) { - engine->render(renderer, file); - engine->save(outFilename); - } else { - bool saved = false; - //only measure Qt engines - QTime time; - int currentElapsed = 0; - for (int i = 0; i < iterations; ++i) { - if (qpsScript) { - QDir oldDir = QDir::current(); - if (!baseDataDir.isEmpty()) { - QDir::setCurrent(baseDataDir+"/images"); - } - time.start(); - engine->render(qpsContents, fileName); - currentElapsed = time.elapsed(); - if (!baseDataDir.isEmpty()) { - QDir::setCurrent(oldDir.absolutePath()); - } - } else { - time.start(); - engine->render(renderer, file); - currentElapsed = time.elapsed(); - } - if (currentElapsed > maxElapsed) - maxElapsed = currentElapsed; - if (!minElapsed || - currentElapsed < minElapsed) - minElapsed = currentElapsed; - elapsed += currentElapsed; - if (!saved) { - //qDebug()<<"saving "<name(); - engine->save(outFilename); - engine->cleanup(); - engine->prepare(size, fillColor); - saved = true; - } - } - engine->cleanup(); - } - GeneratorFlags flags = Normal; - if (QtEngines::self()->defaultEngine() == engine) - flags |= Default; - flags |= eflags; - if ((eflags & Foreign)) - flags ^= Normal; - XMLData data; - data.date = QDateTime::currentDateTime(); - data.timeToRender = elapsed; - data.iterations = iterations; - data.maxElapsed = maxElapsed; - data.minElapsed = minElapsed; - generator.addImage(engine->name(), outFilename, - data, flags); - } -} - -bool DataGenerator::wantedEngine(const QString &engine) const -{ - if (!engineName.isEmpty() && - engine != engineName) { - if (engineName == "onscreen") { - if (engine.startsWith("Native") || - engine == QLatin1String("Raster") || - engine == QLatin1String("OpenGL")) - return true; - } else if (engineName == QLatin1String("printing")) { - if (engine == QLatin1String("PS") || - engine == QLatin1String("PDF")) - return true; - } - return false; - } - return true; -} diff --git a/tests/arthur/datagenerator/datagenerator.h b/tests/arthur/datagenerator/datagenerator.h deleted file mode 100644 index b37733c233..0000000000 --- a/tests/arthur/datagenerator/datagenerator.h +++ /dev/null @@ -1,103 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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 DATAGENERATOR_H -#define DATAGENERATOR_H - -#include "xmlgenerator.h" -#include "framework.h" - -#include -#include -#include -#include - -QT_FORWARD_DECLARE_CLASS(QSvgRenderer) -QT_FORWARD_DECLARE_CLASS(QEngine) -QT_FORWARD_DECLARE_CLASS(QFileInfo) - -class DataGenerator -{ -public: - DataGenerator(); - ~DataGenerator(); - - void run(int argc, char **argv); -private: - bool processArguments(int argc, char **argv); - void testEngines(XMLGenerator &generator, const QString &file, - const QString &refUrl); - void testDirectory(const QString &dirname, const QString &refUrl); - void testFile(const QString &file, const QString &refUrl, - QTextStream &out, QTextStream &hout); - void testGivenFile(); - void testSuite(XMLGenerator &generator, const QString &suite, - const QString &dirName, const QString &refUrl); - void prepareDirs(); - - void testGivenEngines(const QList engines, - const QFileInfo &fileInfo, - const QString &file, - XMLGenerator &generator, - GeneratorFlags flags); - void testGivenEngines(const QList engines, - const QFileInfo &fileInfo, - const QString &file, - XMLGenerator &generator, - int iterations, - GeneratorFlags flags); - - bool wantedEngine(const QString &engine) const; -private: - QSvgRenderer *renderer; - Framework settings; - - QString engineName; - QString suiteName; - QString testcase; - QString fileName; - QString outputDirName; - QString baseDataDir; - int iterations; - QSize size; - QColor fillColor; -}; - -#endif diff --git a/tests/arthur/datagenerator/datagenerator.pri b/tests/arthur/datagenerator/datagenerator.pri deleted file mode 100644 index 987573f956..0000000000 --- a/tests/arthur/datagenerator/datagenerator.pri +++ /dev/null @@ -1,2 +0,0 @@ -VPATH += $$PWD -SOURCES += datagenerator.cpp xmlgenerator.cpp diff --git a/tests/arthur/datagenerator/datagenerator.pro b/tests/arthur/datagenerator/datagenerator.pro deleted file mode 100644 index 2c320a3418..0000000000 --- a/tests/arthur/datagenerator/datagenerator.pro +++ /dev/null @@ -1,21 +0,0 @@ -# -*- Mode: makefile -*- -COMMON_FOLDER = $$PWD/../common -include(../arthurtester.pri) -CONFIG += debug console -TEMPLATE = app -TARGET = datagenerator -DEPENDPATH += . -INCLUDEPATH += . -DESTDIR = ../bin - -QT += svg xml core-private gui-private -contains(QT_CONFIG, opengl)|contains(QT_CONFIG, opengles1)|contains(QT_CONFIG, opengles2):QT += opengl - -# Input -HEADERS += datagenerator.h \ - xmlgenerator.h -SOURCES += main.cpp datagenerator.cpp \ - xmlgenerator.cpp - -DEFINES += QT_USE_USING_NAMESPACE - diff --git a/tests/arthur/datagenerator/main.cpp b/tests/arthur/datagenerator/main.cpp deleted file mode 100644 index 999bb1c7d0..0000000000 --- a/tests/arthur/datagenerator/main.cpp +++ /dev/null @@ -1,54 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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 "datagenerator.h" - -int main(int argc, char **argv) -{ - QApplication app(argc, argv); - - DataGenerator tester; - - tester.run(argc, argv); - - return 0; -} diff --git a/tests/arthur/datagenerator/xmlgenerator.cpp b/tests/arthur/datagenerator/xmlgenerator.cpp deleted file mode 100644 index 35c990a38c..0000000000 --- a/tests/arthur/datagenerator/xmlgenerator.cpp +++ /dev/null @@ -1,262 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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 "xmlgenerator.h" - -#include "qengines.h" - -#include -#include - -XMLGenerator::XMLGenerator(const QString &baseDir) -{ - QList qengines = QtEngines::self()->engines(); - foreach(QEngine *engine, qengines) { - QString engineDir = engine->name(); - QString fileName = engineDir + "/" + "data.xml"; - - if (!baseDir.isEmpty()) { - engineDir = QString("%1/%2").arg(baseDir).arg(engineDir); - fileName = QString("%1/%2").arg(baseDir).arg(fileName); - } - - if (!QFile::exists(fileName)) - continue; - - - XMLReader handler; - QXmlSimpleReader reader; - reader.setContentHandler(&handler); - reader.setErrorHandler(&handler); - - QFile file(fileName); - if (!file.open(QFile::ReadOnly | QFile::Text)) { - qWarning("Cannot open file '%s', because: %s", - qPrintable(fileName), qPrintable(file.errorString())); - continue; - } - - QXmlInputSource xmlInputSource(&file); - if (reader.parse(xmlInputSource)) { - XMLEngine *engine = handler.xmlEngine(); - checkDirs(engine->generationDate, engineDir); - engines.insert(engine->name, engine); - } - } -} - - -void XMLGenerator::startSuite(const QString &name) -{ - currentSuite = name; -} - - -void XMLGenerator::startTestcase(const QString &testcase) -{ - currentTestcase = testcase; -} - - -void XMLGenerator::addImage(const QString &engineName, const QString &image, - const XMLData &data, GeneratorFlags flags) -{ - XMLEngine *engine; - if (engines.contains(engineName)) - engine = engines[engineName]; - else { - engine = new XMLEngine(engineName, flags & Default); - engine->defaultEngine = (flags & Default); - engine->foreignEngine = (flags & Foreign); - engine->referenceEngine = (flags & Reference); - engine->generationDate = QDateTime::currentDateTime(); - engines.insert(engineName, engine); - } - - XMLSuite *suite; - if (engine->suites.contains(currentSuite)) - suite = engine->suites[currentSuite]; - else { - suite = new XMLSuite(currentSuite); - engine->suites.insert(currentSuite, suite); - } - - XMLFile *file; - if (suite->files.contains(currentTestcase)) - file = suite->files[currentTestcase]; - else { - file = new XMLFile(currentTestcase); - suite->files.insert(currentTestcase, file); - } - - file->output = image; - file->data += data; -} - - -void XMLGenerator::endTestcase() -{ - -} - - -void XMLGenerator::endSuite() -{ - -} - -static void generateDataFile(QTextStream &out, XMLEngine *engine) -{ - QString indent; - out << "name<<"\" default=\""; - if (engine->defaultEngine) { - out<<"true\""; - } else - out<<"false\""; - - out << " foreign=\"" << (engine->foreignEngine?"true":"false") - << "\" reference=\"" << (engine->referenceEngine?"true":"false") - << "\" generationDate=\"" << (engine->generationDate.toString()) - << "\">\n"; - - indent += " "; - foreach(XMLSuite *suite, engine->suites) { - out << indent << "name << "\">\n"; - indent += " "; - - foreach(XMLFile *file, suite->files) { - out << indent << "name<<"\" output=\""<output<<"\">\n"; - indent += " "; - foreach(XMLData data, file->data) { - out << indent - << "\n"; - } - indent.chop(2); - out << indent << "\n"; - } - - indent.chop(2); - out << indent << "\n"; - } - - out << ""; -} - -void XMLGenerator::generateOutput(const QString &baseDir) -{ - QDir dir; - if (!baseDir.isEmpty()) { - dir = QDir(baseDir); - } - foreach(XMLEngine *engine, engines) { - QFile file(QString("%1/%2/data.xml").arg(dir.absolutePath()) - .arg(engine->name)); - - dir.mkpath(QFileInfo(file).absolutePath()); - - if (!file.open(QFile::WriteOnly | QFile::Truncate)) { - fprintf(stderr, "Failed to open output file '%s' for writing\n", - qPrintable(QFileInfo(file).absoluteFilePath())); - return; - } - QTextStream out(&file); - generateDataFile(out, engine); - } -} - -QString XMLGenerator::generateData() const -{ - QString str; - foreach(XMLEngine *engine, engines) { - QTextStream out(&str); - generateDataFile(out, engine); - } - return str; -} - -void XMLGenerator::checkDirs(const QDateTime ¤tDate, const QString &engineDir) -{ - QDateTime yesterday = QDateTime::currentDateTime(); - QDateTime lastWeek = QDateTime::currentDateTime(); - yesterday = yesterday.addDays(-1); - lastWeek = lastWeek.addDays(-7); - - if (currentDate <= yesterday) { - QString newDir = engineDir + ".yesterday"; - if (QFile::exists(engineDir)) { - //### handle last week - QString oldFileName = QString("%1/data.xml").arg(newDir); - XMLReader handler; - QXmlSimpleReader reader; - reader.setContentHandler(&handler); - reader.setErrorHandler(&handler); - QFile file(oldFileName); - if (file.open(QFile::ReadOnly | QFile::Text)) { - QXmlInputSource xmlInputSource(&file); - if (reader.parse(xmlInputSource)) { - XMLEngine *engine = handler.xmlEngine(); - if (engine->generationDate <= lastWeek) { - QString newDir = engineDir + ".lastweek"; - qDebug()<<"Backing last weeks's "<< qPrintable(engine->name); - QStringList args; - args << "-rf"; - args << engineDir; - args << newDir; - QProcess::execute("cp", args); - } - } - } - } - qDebug()<<"Backing yesterday's "<< engineDir; - QStringList args; - args << "-rf"; - args << engineDir; - args << newDir; - QProcess::execute("cp", args); - } -} - - diff --git a/tests/arthur/htmlgenerator/htmlgenerator.cpp b/tests/arthur/htmlgenerator/htmlgenerator.cpp deleted file mode 100644 index 48f681c337..0000000000 --- a/tests/arthur/htmlgenerator/htmlgenerator.cpp +++ /dev/null @@ -1,518 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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 "htmlgenerator.h" - -#include "xmldata.h" - -#include - -#include -#include -#include -#include - -#include - -static void generateIndex(QTextStream &out) -{ - out <<"\ -\n\ - SVG rendering comparison\n\ - \n\ -

QSvg testing framework

\n\ - \n\ - \n\ - \n\ - \n\ - \n\ - \n\ - \n\ - \n\ - \n\ - \n\ - \n\ - \n\ - \n\ - \n\ - \n\ -\n"; -} - - -static void usage(const char *progname) -{ - std::cerr << "Couldn't find 'framework.ini' " - << "file and no output has been specified."<" - << " dirname\n" - << std::endl; -} - - -HTMLGenerator::HTMLGenerator() - : settings(0) -{ - if (QFile::exists("framework.ini")) { - settings = new QSettings("framework.ini", QSettings::IniFormat); - } -} - -void HTMLGenerator::generateIndex(const QString &) -{ - -} - -void HTMLGenerator::generatePages() -{ - foreach(HTMLSuite *suite, suites) { - generateSuite(*suite); - } -} - -struct HTMLPage -{ - QString pageName; - QStringList headings; - QList rows; -}; -void HTMLGenerator::generateSuite(const HTMLSuite &suite) -{ - generateReferencePage(suite); - generateHistoryPages(suite); - generateQtComparisonPage(suite); -} - -void HTMLGenerator::generateReferencePage(const HTMLSuite &suite) -{ - - bool generateReference = false; - QStringList generators; - foreach(HTMLRow *row, suite.rows) { - foreach(HTMLImage refs, row->referenceImages) { - generators += refs.generatorName; - foreach(HTMLImage img, row->images) { - if ((img.flags & Default)) { - generators += img.generatorName; - break; - } - } - foreach(HTMLImage img, row->foreignImages) { - generators += img.generatorName; - } - generateReference = true; - break; - } - if (generateReference) - break; - } - - if (!generateReference) - return; - - QFile file(QString("test-%1-reference.html").arg(suite.name)); - if (!file.open(QFile::WriteOnly | QFile::Truncate)) { - return; - } - - QTextStream out(&file); - generateHeader(out, "Reference Page", generators); - - foreach(HTMLRow *row, suite.rows) { - bool referenceRow = false; - QList images; - foreach(HTMLImage refs, row->referenceImages) { - startGenerateRow(out, row->testcase); - referenceRow = true; - images.append(refs); - break; - } - if (referenceRow) { - foreach(HTMLImage img, row->images) { - if ((img.flags & Default)) { - images.append(img); - break; - } - } - images << row->foreignImages; - - generateImages(out, images); - finishGenerateRow(out, row->testcase); - } - } - - generateFooter(out); -} - -void HTMLGenerator::generateHistoryPages(const HTMLSuite &suite) -{ - QStringList lst; - foreach(XMLEngine *engine, engines) { - generateHistoryForEngine(suite, engine->name); - } -} - -void HTMLGenerator::generateHistoryForEngine(const HTMLSuite &suite, const QString &engine) -{ - QFile file(QString("test-%1-%2-history.html").arg(suite.name).arg(engine)); - if (!file.open(QFile::WriteOnly | QFile::Truncate)) { - return; - } - - QTextStream out(&file); - - QStringList generators; - foreach(HTMLRow *row, suite.rows) { - foreach(HTMLImage refs, row->referenceImages) { - generators += refs.generatorName; - generators += "Today"; - generators += "Yesterday"; - generators += "Last Week"; - break; - } - if (!generators.isEmpty()) - break; - } - if (generators.isEmpty()) { - generators += "Today"; - generators += "Yesterday"; - generators += "Last Week"; - } - generateHeader(out, QString("History for %1 engine").arg(engine), generators); - - foreach(HTMLRow *row, suite.rows) { - QList images; - QStringList generators; - foreach(HTMLImage refs, row->referenceImages) { - generators += refs.generatorName; - images.append(refs); - break; - } - - startGenerateRow(out, row->testcase); - foreach(HTMLImage img, row->images) { - if (img.generatorName == engine) { - images << img; - } - } - - generateHistoryImages(out, images); - finishGenerateRow(out, row->testcase); - } - - generateFooter(out); -} - - -void HTMLGenerator::generateQtComparisonPage(const HTMLSuite &suite) -{ - QFile file(QString("test-%1-comparison.html").arg(suite.name)); - if (!file.open(QFile::WriteOnly | QFile::Truncate)) { - return; - } - - QTextStream out(&file); - - QStringList lst; - foreach(XMLEngine *engine, engines) { - if (!engine->foreignEngine && !engine->referenceEngine) - lst += engine->name; - } - - generateHeader(out, QString("Qt Engine Comparison"), lst); - foreach(HTMLRow *row, suite.rows) { - QList images; - - startGenerateRow(out, row->testcase); - foreach(HTMLImage img, row->images) { - images.append(img); - } - generateImages(out, images); - finishGenerateRow(out, row->testcase); - } - - generateFooter(out); -} - - -void HTMLGenerator::generateHeader(QTextStream &out, const QString &name, - const QStringList &generators) -{ - out << "\n" - << ""<<name<<"\n" - << "\n" - << "Click here to go back to main page\n" - << "

Generated: "<

\n" - << "
Testing suiteHistory
1.11.1 history
1.2 testing suite1.2 QSvg history
Random testing suiteRandom tests QSvg history
\n"; - - out << ""; - foreach(QString generator, generators) { - out <<"\n"; - } - out<<"\n"; - -} - -void HTMLGenerator::startGenerateRow(QTextStream &out, const QString &name) -{ - Q_UNUSED(name); - out <<" \n"; -} - -void HTMLGenerator::generateImages(QTextStream &out, - const QList &images) -{ - out <<" \n"; - foreach(HTMLImage image, images) { - out <<" \n"; - } - out <<" \n"; - out <<" \n"; - foreach(HTMLImage image, images) { - out <<" \n"; - } -} - -void HTMLGenerator::generateHistoryImages(QTextStream &out, - const QList &images) -{ - foreach(HTMLImage image, images) { - if ((image.flags & Reference)) { - out <<" \n"; - } else { - QString genName = image.generatorName; - QString file = image.file.replace(image.generatorName, ""); - out <<" \n" - <<" \n" - <<" \n"; - } - } -} - - -void HTMLGenerator::finishGenerateRow(QTextStream &out, const QString &name) -{ - out <<" \n" - <<" \n"; -} - -void HTMLGenerator::generateFooter(QTextStream &out) -{ - out << "
"<
" - << image.generatorName << ": " - << image.details <<" ms
" - <
\n" - << "\n" - << "\n"; -} - -void HTMLGenerator::run(int argc, char **argv) -{ - processArguments(argc, argv); - - QDir dir; - dir.setFilter(QDir::Dirs | QDir::NoSymLinks | QDir::NoDotAndDotDot); - QFileInfoList list = dir.entryInfoList(); - for (int i = 0; i < list.size(); ++i) { - QFileInfo fileInfo = list.at(i); - - QString dataFile = QString("%1/data.xml") - .arg(fileInfo.absoluteFilePath()); - if (QFile::exists(dataFile)) { - XMLReader handler; - QXmlSimpleReader reader; - reader.setContentHandler(&handler); - reader.setErrorHandler(&handler); - - QFile file(dataFile); - if (!file.open(QFile::ReadOnly | QFile::Text)) { - qWarning("Cannot open file '%s', because: %s", - qPrintable(dataFile), qPrintable(file.errorString())); - continue; - } - - QXmlInputSource xmlInputSource(&file); - if (reader.parse(xmlInputSource)) { - XMLEngine *engine = handler.xmlEngine(); - engines.insert(engine->name, engine); - } - } - } - - if (engines.isEmpty()) { - usage(argv[0]); - return; - } - - convertToHtml(); - generatePages(); -} - -void HTMLGenerator::processArguments(int argc, char **argv) -{ - QString frameworkFile; - for (int i=1; i < argc; ++i) { - QString opt(argv[i]); - if (opt == "-framework") { - frameworkFile = QString(argv[++i]); - } else { - outputDirName = opt; - } - } - - if (!frameworkFile.isEmpty() && QFile::exists(frameworkFile)) { - delete settings; - baseDataDir = QFileInfo(frameworkFile).absoluteDir().absolutePath(); - settings = new QSettings(frameworkFile, QSettings::IniFormat); - } - - if (!outputDirName.isEmpty()) { - QDir::setCurrent(outputDirName); - } - htmlOutputDir = QString("html"); - QDir dir; - dir.mkpath(htmlOutputDir); -} - -void HTMLGenerator::convertToHtml() -{ - foreach(XMLEngine *engine, engines) { - foreach(XMLSuite *suite, engine->suites) { - QString refUrl; - QString refPrefix; - if (settings) { - settings->beginGroup(suite->name); - refUrl = settings->value("reference").toString(); - refPrefix = settings->value("referencePrefix").toString(); - if (refUrl.endsWith('/')) - refUrl.chop(1); - settings->endGroup(); - } - - foreach(XMLFile *file, suite->files) { - HTMLImage image; - image.file = file->output; - image.generatorName = engine->name; - - image.details = file->data.last().iterations == 0 - ? QString::number(-1) - : QString::number(file->data.last().timeToRender - / file->data.last().iterations); - image.flags = Normal; - - if (file->data.last().timeToRender == 0) - image.details = file->data.last().details; - - if (engine->defaultEngine) - image.flags |= Default; - if (engine->foreignEngine) { - image.flags ^= Normal; - image.flags |= Foreign; - } - if (engine->referenceEngine) { - image.flags ^= Normal; - image.flags |= Reference; - } - - if (!outputDirName.isEmpty() && image.file.startsWith(outputDirName)) - image.file.remove(0, outputDirName.length() + 1); // + '/' - HTMLSuite *htmlSuite = suites[suite->name]; - if (!htmlSuite) { - htmlSuite = new HTMLSuite; - htmlSuite->name = suite->name; - suites.insert(suite->name, htmlSuite); - } - HTMLRow *htmlRow = htmlSuite->rows[file->name]; - if (!htmlRow) { - htmlRow = new HTMLRow; - htmlRow->testcase = file->name; - htmlSuite->rows.insert(file->name, htmlRow); - } - - if ((image.flags & Foreign)) - htmlRow->foreignImages.append(image); - else if ((image.flags & Reference)) - htmlRow->referenceImages.append(image); - else { - htmlRow->images.append(image); - } - if (!refUrl.isEmpty()) { - QFileInfo fi(file->output); - HTMLImage image; - image.file = QString("%1/%2%3") - .arg(refUrl) - .arg(refPrefix) - .arg(fi.fileName()); - image.generatorName = QString("Reference"); - image.details = QString("Reference"); - image.flags = Reference; - if (htmlRow) { - htmlRow->referenceImages.append(image); - } - } - } - } - } -} - -void HTMLGenerator::createPerformance() -{ -#if 0 - QFile file(QString("test-performance.html")); - if (!file.open(QFile::WriteOnly | QFile::Truncate)) { - return; - } - - QTextStream out(&file); - foreach(XMLEngine *engine, engines) { - QImage img = createHistoryImage(engine); - QImage ; - - } -#endif -} - - diff --git a/tests/arthur/htmlgenerator/htmlgenerator.h b/tests/arthur/htmlgenerator/htmlgenerator.h deleted file mode 100644 index 7ce5ca92a0..0000000000 --- a/tests/arthur/htmlgenerator/htmlgenerator.h +++ /dev/null @@ -1,126 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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 HTMLGENERATOR_H -#define HTMLGENERATOR_H - -#include "xmldata.h" - -#include -#include -#include - -QT_FORWARD_DECLARE_CLASS(QStringList) -QT_FORWARD_DECLARE_CLASS(QSettings) - -struct HTMLImage -{ -public: - QString file; - QString generatorName; - GeneratorFlags flags; - QString details; -}; - -struct HTMLRow -{ -public: - QString testcase; - QList referenceImages; - QList foreignImages; - QList images; -}; - -struct HTMLSuite -{ -public: - QString name; - QMap rows; -}; - -class HTMLGenerator -{ -public: - HTMLGenerator(); - - void startSuite(const QString &name); - void startRow(const QString &testcase); - void addImage(const QString &generator, const QString &image, - const QString &details, GeneratorFlags flags); - void endRow(); - void endSuite(); - - void generateIndex(const QString &file); - void generatePages(); - - void run(int argc, char **argv); - -private: - void generateSuite(const HTMLSuite &suite); - - void generateReferencePage(const HTMLSuite &suite); - void generateHistoryPages(const HTMLSuite &suite); - void generateHistoryForEngine(const HTMLSuite &suite, const QString &engine); - void generateQtComparisonPage(const HTMLSuite &suite); - - void generateHeader(QTextStream &out, const QString &name, - const QStringList &generators); - void startGenerateRow(QTextStream &out, const QString &name); - void generateImages(QTextStream &out, - const QList &images); - void generateHistoryImages(QTextStream &out, - const QList &images); - void finishGenerateRow(QTextStream &out, const QString &name); - void generateFooter(QTextStream &out); - - void processArguments(int argc, char **argv); - void convertToHtml(); - void createPerformance(); -private: - QMap suites; - QMap engines; - - QSettings *settings; - QString outputDirName; - QString baseDataDir; - QString htmlOutputDir; -}; - -#endif diff --git a/tests/arthur/htmlgenerator/htmlgenerator.pro b/tests/arthur/htmlgenerator/htmlgenerator.pro deleted file mode 100644 index 4f5d5c8c16..0000000000 --- a/tests/arthur/htmlgenerator/htmlgenerator.pro +++ /dev/null @@ -1,19 +0,0 @@ -# -*- Mode: makefile -*- -COMMON_FOLDER = $$PWD/../common -include(../arthurtester.pri) -TEMPLATE = app -TARGET = htmlgenerator -DEPENDPATH += . -INCLUDEPATH += . -DESTDIR = ../bin - -CONFIG += console - -QT += svg xml core-private gui-private -contains(QT_CONFIG, opengl)|contains(QT_CONFIG, opengles1)|contains(QT_CONFIG, opengles2):QT += opengl - -# Input -HEADERS += htmlgenerator.h -SOURCES += main.cpp htmlgenerator.cpp - - diff --git a/tests/arthur/lance/lance.pro b/tests/arthur/lance/lance.pro deleted file mode 100644 index 8f3407cfc9..0000000000 --- a/tests/arthur/lance/lance.pro +++ /dev/null @@ -1,22 +0,0 @@ -COMMON_FOLDER = $$PWD/../common -include(../arthurtester.pri) -CONFIG+=console moc -TEMPLATE = app -INCLUDEPATH += . - -# Input -HEADERS += widgets.h interactivewidget.h -SOURCES += interactivewidget.cpp main.cpp -RESOURCES += icons.qrc - -contains(QT_CONFIG, opengl)|contains(QT_CONFIG, opengles1)|contains(QT_CONFIG, opengles2):QT += opengl - -symbian*: { - testData.files = $$QT_BUILD_TREE/tests/arthur/data/qps - testData.path = . - DEPLOYMENT += testData -} - -QT += xml svg core-private gui-private - - diff --git a/tests/arthur/performancediff/performancediff.cpp b/tests/arthur/performancediff/performancediff.cpp deleted file mode 100644 index 3580f2aefa..0000000000 --- a/tests/arthur/performancediff/performancediff.cpp +++ /dev/null @@ -1,219 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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 "performancediff.h" - -#include "xmldata.h" - -#include - -#include -#include -#include -#include - -#include -#include - - -static const int MIN_TEST_VAL = 20; -static const int TEST_EPSILON = 5; //ms - -static void usage(const char *progname) -{ - std::cerr << "Couldn't find 'framework.ini' " - << "file and no output has been specified."< &engines) -{ - QDir dir(dirName); - dir.setFilter(QDir::Dirs | QDir::NoSymLinks | QDir::NoDotAndDotDot); - QFileInfoList list = dir.entryInfoList(); - for (int i = 0; i < list.size(); ++i) { - QFileInfo fileInfo = list.at(i); - QString dataFile = QString("%1/data.xml") - .arg(fileInfo.absoluteFilePath()); - if (QFile::exists(dataFile)) { - XMLReader handler; - QXmlSimpleReader reader; - reader.setContentHandler(&handler); - reader.setErrorHandler(&handler); - - QFile file(dataFile); - if (!file.open(QFile::ReadOnly | QFile::Text)) { - qWarning("Cannot open file '%s', because: %s", - qPrintable(dataFile), qPrintable(file.errorString())); - continue; - } - - QXmlInputSource xmlInputSource(&file); - if (reader.parse(xmlInputSource)) { - XMLEngine *engine = handler.xmlEngine(); - engines.insert(engine->name, engine); - } - } - } - -} -void PerformanceDiff::run(int argc, char **argv) -{ - processArguments(argc, argv); - - loadEngines(inputDirName, inputEngines); - loadEngines(diffDirName, diffEngines); - - if (inputEngines.isEmpty() || diffEngines.isEmpty()) { - usage(argv[0]); - return; - } - - generateDiff(); - //generateOutput(); -} - -void PerformanceDiff::processArguments(int argc, char **argv) -{ - if (argc != 3) - return; - inputDirName = QString(argv[1]); - diffDirName = QString(argv[2]); -} - -void PerformanceDiff::generateDiff() -{ - qreal totalIn = 0; - qreal totalDiff = 0; - - std::cout<name]; - if (!inEngine) - continue; - foreach(XMLSuite *diffSuite, diffEngine->suites) { - XMLSuite *inSuite = inEngine->suites[diffSuite->name]; - if (!inSuite) - continue; - - foreach(XMLFile *diffFile, diffSuite->files) { - XMLFile *inFile = inSuite->files[diffFile->name]; - if (!inFile) - continue; - - qreal inAvg = 0; - qreal diffAvg = 0; - qreal inMin = 0; - qreal inMax = 0; - foreach(XMLData data, inFile->data) { - inAvg = (double(data.timeToRender)/data.iterations); - if (!inMin) - inMin = data.minElapsed; - else if (data.minElapsed < inMin) - inMin = data.minElapsed; - if (!inMax) - inMax = data.maxElapsed; - else if (inMax < data.maxElapsed) - inMax = data.maxElapsed; - } - //skipping really small tests - if (inAvg < MIN_TEST_VAL) { - continue; - } - - totalIn += inAvg; - foreach(XMLData data, diffFile->data) { - diffAvg = (double(data.timeToRender)/data.iterations); - } - totalDiff += diffAvg; - - QFileInfo fi(diffFile->name); - std::cout.width(80); - std::cout.setf(std::ios::fixed, std::ios::floatfield); - std::cout.setf(std::ios::showpoint); - std::cout << std::resetiosflags(std::ios::right); - std::cout << std::resetiosflags(std::ios::left); - std::cout< TEST_EPSILON)) { - std::cout<<" + ("< inMax && - (qAbs(diffAvg - inMax) > TEST_EPSILON)) { - std::cout<<" - ("< -#include - -QT_FORWARD_DECLARE_CLASS(QStringList) -QT_FORWARD_DECLARE_CLASS(QSettings) - -class PerformanceDiff -{ -public: - PerformanceDiff(); - - //void generateOutput(); - - void run(int argc, char **argv); - -private: - void processArguments(int argc, char **argv); - void generateDiff(); -private: - QMap inputEngines; - QMap diffEngines; - - QSettings *settings; - QString inputDirName; - QString diffDirName; -}; - -#endif diff --git a/tests/arthur/performancediff/performancediff.pro b/tests/arthur/performancediff/performancediff.pro deleted file mode 100644 index 8c1fb98047..0000000000 --- a/tests/arthur/performancediff/performancediff.pro +++ /dev/null @@ -1,19 +0,0 @@ -# -*- Mode: makefile -*- -COMMON_FOLDER = $$PWD/../common -include(../arthurtester.pri) -TEMPLATE = app -TARGET = performancediff -DEPENDPATH += . -INCLUDEPATH += . -DESTDIR = ../bin - -CONFIG += console - -QT += xml svg core-private gui-private -contains(QT_CONFIG, opengl)|contains(QT_CONFIG, opengles1)|contains(QT_CONFIG, opengles2):QT += opengl - -# Input -HEADERS += performancediff.h -SOURCES += main.cpp performancediff.cpp - - diff --git a/tests/arthur/shower/main.cpp b/tests/arthur/shower/main.cpp deleted file mode 100644 index e501dd8e13..0000000000 --- a/tests/arthur/shower/main.cpp +++ /dev/null @@ -1,99 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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 "shower.h" -#include "qengines.h" - -static void usage() -{ - qDebug()<<"shower <-engine engineName> file"; -} - -int main(int argc, char **argv) -{ - QApplication app(argc, argv); - - QString engine = "Raster"; - QString file; - for (int i = 1; i < argc; ++i) { - QString opt = argv[i]; - if (opt == "-engine") { - ++i; - engine = QString(argv[i]); - } else if (opt.startsWith('-')) { - qDebug()<<"Unsupported option "<engines()) { - if (qengine->name() == engine) { - engineExists = true; - } - engineNames.append(qengine->name()); - } - - if (file.isEmpty() || engine.isEmpty()) { - usage(); - return 1; - } - - if (!engineExists) { - qDebug()<<"Engine "< -#include -#include -#include -#include -#include -#include -#include -#include - -static QString loadFile(const QString &name) -{ - QFile file(name); - if (!file.open(QFile::ReadOnly)) { - qDebug("Can't open file '%s'", qPrintable(name)); - return QString(); - } - QTextStream str(&file); - return str.readAll(); -} - -Shower::Shower(const QString &file, - const QString &engineName) - : QWidget(0) -{ - foreach(QEngine *qengine, QtEngines::self()->engines()) { - if (qengine->name() == engineName) { - engine = qengine; - break; - } - } - - QFileInfo fi(file); - baseDataDir = fi.absolutePath(); - if (file.endsWith("svg")) { - renderer = new QSvgRenderer(this); - renderer->load(file); - } else { - qps = QFileInfo(file); - QString script = loadFile(qps.absoluteFilePath()); - qpsScript = script.split("\n", QString::SkipEmptyParts); - renderer = 0; - if (qpsScript.isEmpty()) { - printf("failed to read file: '%s'\n", qPrintable(qps.fileName())); - return; - } - } -} - - -QSize Shower::sizeHint() const -{ - return QSize(600, 600); -} - - -void Shower::paintEvent(QPaintEvent *) -{ - if (buffer.size() != size()) { - buffer = QImage(size(), QImage::Format_ARGB32_Premultiplied); - QPainter p(&buffer); - p.setViewport(0, 0, width(), height()); - p.eraseRect(0, 0, width(), height()); - engine->prepare(size()); - if (renderer) { - engine->render(renderer, QString("sample")); - } else { - engine->render(qpsScript, qps.absoluteFilePath()); - } - if (!engine->drawOnPainter(&p)) { - QString tempFileName = QString("%1sample.png").arg(QDir::tempPath()); - engine->save(tempFileName); - QImage img(tempFileName); - engine->cleanup(); - QFile::remove(tempFileName); - p.drawImage(0, 0, img); - } - } - QPainter pt(this); - pt.drawImage(0, 0, buffer); -} diff --git a/tests/arthur/shower/shower.h b/tests/arthur/shower/shower.h deleted file mode 100644 index 1ad190eb39..0000000000 --- a/tests/arthur/shower/shower.h +++ /dev/null @@ -1,73 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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 SHOWER_H -#define SHOWER_H - -#include -#include -#include -#include -#include - -QT_FORWARD_DECLARE_CLASS(QSvgRenderer) -QT_FORWARD_DECLARE_CLASS(QPaintEvent) -QT_FORWARD_DECLARE_CLASS(QEngine) - -class Shower : public QWidget -{ - Q_OBJECT -public: - Shower(const QString &file, - const QString &engine); - - QSize sizeHint() const; -protected: - void paintEvent(QPaintEvent *e); -private: - QEngine *engine; - QSvgRenderer *renderer; - QImage buffer; - QStringList qpsScript; - QFileInfo qps; - QString baseDataDir; -}; - -#endif diff --git a/tests/arthur/shower/shower.pro b/tests/arthur/shower/shower.pro deleted file mode 100644 index f4f8d47809..0000000000 --- a/tests/arthur/shower/shower.pro +++ /dev/null @@ -1,17 +0,0 @@ -# -*- Mode: makefile -*- -COMMON_FOLDER = $$PWD/../common -include(../arthurtester.pri) -TEMPLATE = app -TARGET = shower -DEPENDPATH += . -INCLUDEPATH += . -DESTDIR = ../bin - -QT += xml svg core-private gui-private -contains(QT_CONFIG, opengl)|contains(QT_CONFIG, opengles1)|contains(QT_CONFIG, opengles2):QT += opengl - -# Input -HEADERS += shower.h -SOURCES += main.cpp shower.cpp - - diff --git a/tests/auto/baselineexample/baselineexample.pro b/tests/auto/baselineexample/baselineexample.pro index 13f03b8f36..3d3d42e8cc 100644 --- a/tests/auto/baselineexample/baselineexample.pro +++ b/tests/auto/baselineexample/baselineexample.pro @@ -15,4 +15,4 @@ TEMPLATE = app SOURCES += tst_baselineexample.cpp DEFINES += SRCDIR=\\\"$$PWD/\\\" -include($$PWD/../../arthur/common/qbaselinetest.pri) +include($$PWD/../../baselineserver/shared/qbaselinetest.pri) diff --git a/tests/auto/gui.pro b/tests/auto/gui.pro index df161f1fb2..cf7db60c6d 100644 --- a/tests/auto/gui.pro +++ b/tests/auto/gui.pro @@ -227,6 +227,7 @@ win32:SUBDIRS -= qtextpiecetable qtextpiecetable \ qtipc \ qtoolbar \ + qstatictext \ symbian:SUBDIRS -= \ qsystemtrayicon \ diff --git a/tests/auto/guiapplauncher/demos.txt b/tests/auto/guiapplauncher/demos.txt index 2835f09477..e69de29bb2 100644 --- a/tests/auto/guiapplauncher/demos.txt +++ b/tests/auto/guiapplauncher/demos.txt @@ -1,14 +0,0 @@ -"Affine Demo", "demos/affine", "affine", 0, -1 -"Books Demo", "demos/books", "books", 0, -1 -"Chip Demo", "demos/chip", "chip", 0, -1 -"Composition Demo", "demos/composition", "composition", 0, -1 -"Deform Demo", "demos/deform", "deform", 0, -1 -"Embeddeddialogs Demo", "demos/embeddeddialogs", "embeddeddialogs", 0, -1 -"Gradients Demo", "demos/gradients", "gradients", 0, -1 -"Interview Demo", "demos/interview", "interview", 0, -1 -"Mainwindow Demo", "demos/mainwindow", "mainwindow", 0, -1 -"PathStroke Demo", "demos/pathstroke", "pathstroke", 0, -1 -"Spreadsheet Demo", "demos/spreadsheet", "spreadsheet", 0, -1 -"Sub-Attac Demo", "demos/sub-attaq", "sub-attaq", 0, -1 -"TextEdit Demo", "demos/textedit", "textedit", 0, -1 -"Undo Demo", "demos/undo", "undo", 0, -1 diff --git a/tests/auto/guiapplauncher/examples.txt b/tests/auto/guiapplauncher/examples.txt index fea7e543f0..65993fae1a 100644 --- a/tests/auto/guiapplauncher/examples.txt +++ b/tests/auto/guiapplauncher/examples.txt @@ -4,6 +4,7 @@ "animation/moveblocks Example", "examples/animation/moveblocks", "moveblocks", 10, -1 "animation/states Example", "examples/animation/states", "states", 10, -1 "animation/stickman Example", "examples/animation/stickman", "stickman", 10, -1 +"animation/sub-attaq Example", "examples/animation/sub-attaq", "sub-attaq", 0, -1 "designer/calculatorbuilder Example", "examples/designer/calculatorbuilder", "calculatorbuilder", 10, -1 "dialogs/standarddialogs Example", "examples/dialogs/standarddialogs", "standarddialogs", 10, -1 "draganddrop/dropsite Example", "examples/draganddrop/dropsite", "dropsite", 10, -1 @@ -15,10 +16,12 @@ "effects/lighting Example", "examples/effects/lighting", "lighting", 10, -1 "graphicsview/anchorlayout Example", "examples/graphicsview/anchorlayout", "anchorlayout", 10, -1 "graphicsview/basicgraphicslayouts Example", "examples/graphicsview/basicgraphicslayouts", "basicgraphicslayouts", 0, -1 +"graphicsview/chip Example", "examples/graphicsview/chip", "chip", 0, -1 "graphicsview/collidingmice Example", "examples/graphicsview/collidingmice", "collidingmice", 10, -1 "graphicsview/diagramscene Example", "examples/graphicsview/diagramscene", "diagramscene", 10, -1 "graphicsview/dragdroprobot Example", "examples/graphicsview/dragdroprobot", "dragdroprobot", 10, -1 "graphicsview/elasticnodes Example", "examples/graphicsview/elasticnodes", "elasticnodes", 10, -1 +"graphicsview/embeddeddialogs Example", "examples/graphicsview/embeddeddialogs", "embeddeddialogs", 0, -1 "graphicsview/flowlayout Example", "examples/graphicsview/flowlayout", "flowlayout", 10, -1 "graphicsview/padnavigator Example", "examples/graphicsview/padnavigator", "padnavigator", 0, -1 "graphicsview/portedasteroids Example", "examples/graphicsview/portedasteroids", "portedasteroids", 10, -1 @@ -34,12 +37,14 @@ "itemviews/editabletreemodel Example", "examples/itemviews/editabletreemodel", "editabletreemodel", 0, -1 "itemviews/fetchmore Example", "examples/itemviews/fetchmore", "fetchmore", 10, -1 "itemviews/frozencolumn Example", "examples/itemviews/frozencolumn", "frozencolumn", 10, -1 +"itemviews/interview Example", "examples/itemviews/interview", "interview", 0, -1 "itemviews/pixelator Example", "examples/itemviews/pixelator", "pixelator", 10, -1 "itemviews/puzzle Example", "examples/itemviews/puzzle", "puzzle", 10, -1 "itemviews/simpledommodel Example", "examples/itemviews/simpledommodel", "simpledommodel", 10, -1 "itemviews/simpletreemodel Example", "examples/itemviews/simpletreemodel", "simpletreemodel", 10, -1 "itemviews/simplewidgetmapper Example", "examples/itemviews/simplewidgetmapper", "simplewidgetmapper", 10, -1 "itemviews/spinboxdelegate Example", "examples/itemviews/spinboxdelegate", "spinboxdelegate", 0, -1 +"itemviews/spreadsheet Example", "examples/itemviews/spreadsheet", "spreadsheet", 0, -1 "itemviews/stardelegate Example", "examples/itemviews/stardelegate", "stardelegate", 10, -1 "layouts/basiclayouts Example", "examples/layouts/basiclayouts", "basiclayouts", 0, -1 "layouts/borderlayout Example", "examples/layouts/borderlayout", "borderlayout", 10, -1 @@ -47,6 +52,7 @@ "layouts/flowlayout Example", "examples/layouts/flowlayout", "flowlayout", 10, -1 "mainwindows/application Example", "examples/mainwindows/application", "application", 6, -1 "mainwindows/dockwidgets Example", "examples/mainwindows/dockwidgets", "dockwidgets", 0, -1 +"mainwindows/mainwindow Example", "examples/mainwindows/mainwindow", "mainwindow", 0, -1 "mainwindows/mdi Example", "examples/mainwindows/mdi", "mdi", 0, -1 "mainwindows/menus Example", "examples/mainwindows/menus", "menus", 10, -1 "mainwindows/recentfiles Example", "examples/mainwindows/recentfiles", "recentfiles", 10, -1 @@ -61,21 +67,29 @@ "opengl/overpainting Example", "examples/opengl/overpainting", "overpainting", 10, -1 "opengl/samplebuffers Example", "examples/opengl/samplebuffers", "samplebuffers", 10, -1 "opengl/textures Example", "examples/opengl/textures", "textures", 10, -1 +"painting/affine Example", "examples/painting/affine", "affine", 0, -1 "painting/basicdrawing Example", "examples/painting/basicdrawing", "basicdrawing", 10, -1 +"painting/composition Example", "examples/painting/composition", "composition", 0, -1 "painting/concentriccircles Example", "examples/painting/concentriccircles", "concentriccircles", 0, -1 +"painting/deform Example", "examples/painting/deform", "deform", 0, -1 "painting/fontsampler Example", "examples/painting/fontsampler", "fontsampler", 0, -1 +"painting/gradients Example", "examples/painting/gradients", "gradients", 0, -1 "painting/imagecomposition Example", "examples/painting/imagecomposition", "imagecomposition", 10, -1 "painting/painterpaths Example", "examples/painting/painterpaths", "painterpaths", 10, -1 +"painting/pathstroke Example", "examples/painting/pathstroke", "pathstroke", 0, -1 "painting/transformations Example", "examples/painting/transformations", "transformations", 0, -1 "qtconcurrent/imagescaling Example", "examples/qtconcurrent/imagescaling", "imagescaling", 10, -1 "richtext/calendar Example", "examples/richtext/calendar", "calendar", 0, -1 "richtext/orderform Example", "examples/richtext/orderform", "orderform", 10, -1 "richtext/syntaxhighlighter Example", "examples/richtext/syntaxhighlighter", "syntaxhighlighter", 0, -1 +"richtext/textedit Example", "examples/richtext/textedit", "textedit", 0, -1 "richtext/textobject Example", "examples/richtext/textobject", "textobject", 10, -1 +"sql/books Example", "examples/sql/books", "books", 0, -1 "statemachine/eventtransitions Example", "examples/statemachine/eventtransitions", "eventtransitions", 10, -1 "statemachine/rogue Example", "examples/statemachine/rogue", "rogue", 10, -1 "statemachine/trafficlight Example", "examples/statemachine/trafficlight", "trafficlight", 0, -1 "statemachine/twowaybutton Example", "examples/statemachine/twowaybutton", "twowaybutton", 10, -1 +"tools/undo Example", "examples/tools/undo", "undo", 0, -1 "tutorials/addressbook/part7 Example", "examples/tutorials/addressbook/part7", "part7", 0, -1 "widgets/analogclock Example", "examples/widgets/analogclock", "analogclock", 6, -1 "widgets/calculator Example", "examples/widgets/calculator", "calculator", 6, -1 diff --git a/tests/arthur/common/images.qrc b/tests/auto/lancelot/images.qrc similarity index 100% rename from tests/arthur/common/images.qrc rename to tests/auto/lancelot/images.qrc diff --git a/tests/arthur/common/images/alpha.png b/tests/auto/lancelot/images/alpha.png similarity index 100% rename from tests/arthur/common/images/alpha.png rename to tests/auto/lancelot/images/alpha.png diff --git a/tests/arthur/common/images/alpha2x2.png b/tests/auto/lancelot/images/alpha2x2.png similarity index 100% rename from tests/arthur/common/images/alpha2x2.png rename to tests/auto/lancelot/images/alpha2x2.png diff --git a/tests/arthur/common/images/bitmap.png b/tests/auto/lancelot/images/bitmap.png similarity index 100% rename from tests/arthur/common/images/bitmap.png rename to tests/auto/lancelot/images/bitmap.png diff --git a/tests/arthur/common/images/border.png b/tests/auto/lancelot/images/border.png similarity index 100% rename from tests/arthur/common/images/border.png rename to tests/auto/lancelot/images/border.png diff --git a/tests/arthur/common/images/borderimage.png b/tests/auto/lancelot/images/borderimage.png similarity index 100% rename from tests/arthur/common/images/borderimage.png rename to tests/auto/lancelot/images/borderimage.png diff --git a/tests/arthur/common/images/dome_argb32.png b/tests/auto/lancelot/images/dome_argb32.png similarity index 100% rename from tests/arthur/common/images/dome_argb32.png rename to tests/auto/lancelot/images/dome_argb32.png diff --git a/tests/arthur/common/images/dome_indexed.png b/tests/auto/lancelot/images/dome_indexed.png similarity index 100% rename from tests/arthur/common/images/dome_indexed.png rename to tests/auto/lancelot/images/dome_indexed.png diff --git a/tests/arthur/common/images/dome_indexed_mask.png b/tests/auto/lancelot/images/dome_indexed_mask.png similarity index 100% rename from tests/arthur/common/images/dome_indexed_mask.png rename to tests/auto/lancelot/images/dome_indexed_mask.png diff --git a/tests/arthur/common/images/dome_mono.png b/tests/auto/lancelot/images/dome_mono.png similarity index 100% rename from tests/arthur/common/images/dome_mono.png rename to tests/auto/lancelot/images/dome_mono.png diff --git a/tests/arthur/common/images/dome_mono_128.png b/tests/auto/lancelot/images/dome_mono_128.png similarity index 100% rename from tests/arthur/common/images/dome_mono_128.png rename to tests/auto/lancelot/images/dome_mono_128.png diff --git a/tests/arthur/common/images/dome_mono_palette.png b/tests/auto/lancelot/images/dome_mono_palette.png similarity index 100% rename from tests/arthur/common/images/dome_mono_palette.png rename to tests/auto/lancelot/images/dome_mono_palette.png diff --git a/tests/arthur/common/images/dome_rgb32.png b/tests/auto/lancelot/images/dome_rgb32.png similarity index 100% rename from tests/arthur/common/images/dome_rgb32.png rename to tests/auto/lancelot/images/dome_rgb32.png diff --git a/tests/arthur/common/images/dot.png b/tests/auto/lancelot/images/dot.png similarity index 100% rename from tests/arthur/common/images/dot.png rename to tests/auto/lancelot/images/dot.png diff --git a/tests/arthur/common/images/face.png b/tests/auto/lancelot/images/face.png similarity index 100% rename from tests/arthur/common/images/face.png rename to tests/auto/lancelot/images/face.png diff --git a/tests/arthur/common/images/gam030.png b/tests/auto/lancelot/images/gam030.png similarity index 100% rename from tests/arthur/common/images/gam030.png rename to tests/auto/lancelot/images/gam030.png diff --git a/tests/arthur/common/images/gam045.png b/tests/auto/lancelot/images/gam045.png similarity index 100% rename from tests/arthur/common/images/gam045.png rename to tests/auto/lancelot/images/gam045.png diff --git a/tests/arthur/common/images/gam056.png b/tests/auto/lancelot/images/gam056.png similarity index 100% rename from tests/arthur/common/images/gam056.png rename to tests/auto/lancelot/images/gam056.png diff --git a/tests/arthur/common/images/gam100.png b/tests/auto/lancelot/images/gam100.png similarity index 100% rename from tests/arthur/common/images/gam100.png rename to tests/auto/lancelot/images/gam100.png diff --git a/tests/arthur/common/images/gam200.png b/tests/auto/lancelot/images/gam200.png similarity index 100% rename from tests/arthur/common/images/gam200.png rename to tests/auto/lancelot/images/gam200.png diff --git a/tests/arthur/common/images/image.png b/tests/auto/lancelot/images/image.png similarity index 100% rename from tests/arthur/common/images/image.png rename to tests/auto/lancelot/images/image.png diff --git a/tests/arthur/common/images/mask.png b/tests/auto/lancelot/images/mask.png similarity index 100% rename from tests/arthur/common/images/mask.png rename to tests/auto/lancelot/images/mask.png diff --git a/tests/arthur/common/images/mask_100.png b/tests/auto/lancelot/images/mask_100.png similarity index 100% rename from tests/arthur/common/images/mask_100.png rename to tests/auto/lancelot/images/mask_100.png diff --git a/tests/arthur/common/images/masked.png b/tests/auto/lancelot/images/masked.png similarity index 100% rename from tests/arthur/common/images/masked.png rename to tests/auto/lancelot/images/masked.png diff --git a/tests/arthur/common/images/sign.png b/tests/auto/lancelot/images/sign.png similarity index 100% rename from tests/arthur/common/images/sign.png rename to tests/auto/lancelot/images/sign.png diff --git a/tests/arthur/common/images/solid.png b/tests/auto/lancelot/images/solid.png similarity index 100% rename from tests/arthur/common/images/solid.png rename to tests/auto/lancelot/images/solid.png diff --git a/tests/arthur/common/images/solid2x2.png b/tests/auto/lancelot/images/solid2x2.png similarity index 100% rename from tests/arthur/common/images/solid2x2.png rename to tests/auto/lancelot/images/solid2x2.png diff --git a/tests/arthur/common/images/struct-image-01.jpg b/tests/auto/lancelot/images/struct-image-01.jpg similarity index 100% rename from tests/arthur/common/images/struct-image-01.jpg rename to tests/auto/lancelot/images/struct-image-01.jpg diff --git a/tests/arthur/common/images/struct-image-01.png b/tests/auto/lancelot/images/struct-image-01.png similarity index 100% rename from tests/arthur/common/images/struct-image-01.png rename to tests/auto/lancelot/images/struct-image-01.png diff --git a/tests/arthur/common/images/zebra.png b/tests/auto/lancelot/images/zebra.png similarity index 100% rename from tests/arthur/common/images/zebra.png rename to tests/auto/lancelot/images/zebra.png diff --git a/tests/auto/lancelot/lancelot.pro b/tests/auto/lancelot/lancelot.pro index c4eaaac6ab..67fff1b411 100644 --- a/tests/auto/lancelot/lancelot.pro +++ b/tests/auto/lancelot/lancelot.pro @@ -3,11 +3,11 @@ QT += xml contains(QT_CONFIG, opengl)|contains(QT_CONFIG, opengles1)|contains(QT_CONFIG, opengles2):QT += opengl SOURCES += tst_lancelot.cpp \ - $$PWD/../../arthur/common/paintcommands.cpp -HEADERS += $$PWD/../../arthur/common/paintcommands.h -RESOURCES += $$PWD/../../arthur/common/images.qrc + paintcommands.cpp +HEADERS += paintcommands.h +RESOURCES += images.qrc -include($$PWD/../../arthur/common/qbaselinetest.pri) +include($$PWD/../../baselineserver/shared/qbaselinetest.pri) !symbian:!wince*:DEFINES += SRCDIR=\\\"$$PWD\\\" linux-g++-maemo:DEFINES += USE_RUNTIME_DIR diff --git a/tests/arthur/common/paintcommands.cpp b/tests/auto/lancelot/paintcommands.cpp similarity index 99% rename from tests/arthur/common/paintcommands.cpp rename to tests/auto/lancelot/paintcommands.cpp index d005ffd215..8735baa3f0 100644 --- a/tests/arthur/common/paintcommands.cpp +++ b/tests/auto/lancelot/paintcommands.cpp @@ -1879,7 +1879,7 @@ void PaintCommands::command_setClipRect(QRegExp re) int w = convertToInt(caps.at(3)); int h = convertToInt(caps.at(4)); - int combine = translateEnum(clipOperationTable, caps.at(5), Qt::UniteClip + 1); + int combine = translateEnum(clipOperationTable, caps.at(5), Qt::IntersectClip + 1); if (combine == -1) combine = Qt::ReplaceClip; @@ -1892,7 +1892,7 @@ void PaintCommands::command_setClipRect(QRegExp re) /***************************************************************************************************/ void PaintCommands::command_setClipPath(QRegExp re) { - int combine = translateEnum(clipOperationTable, re.cap(2), Qt::UniteClip + 1); + int combine = translateEnum(clipOperationTable, re.cap(2), Qt::IntersectClip + 1); if (combine == -1) combine = Qt::ReplaceClip; @@ -1907,7 +1907,7 @@ void PaintCommands::command_setClipPath(QRegExp re) /***************************************************************************************************/ void PaintCommands::command_setClipRegion(QRegExp re) { - int combine = translateEnum(clipOperationTable, re.cap(2), Qt::UniteClip + 1); + int combine = translateEnum(clipOperationTable, re.cap(2), Qt::IntersectClip + 1); if (combine == -1) combine = Qt::ReplaceClip; QRegion r = m_regionMap[re.cap(1)]; diff --git a/tests/arthur/common/paintcommands.h b/tests/auto/lancelot/paintcommands.h similarity index 100% rename from tests/arthur/common/paintcommands.h rename to tests/auto/lancelot/paintcommands.h diff --git a/tests/auto/qapplication/tst_qapplication.cpp b/tests/auto/qapplication/tst_qapplication.cpp index 79cb362d87..997f9a5b38 100644 --- a/tests/auto/qapplication/tst_qapplication.cpp +++ b/tests/auto/qapplication/tst_qapplication.cpp @@ -1515,7 +1515,7 @@ void tst_QApplication::testDeleteLaterProcessEvents() } /* - Test for crash whith QApplication::setDesktopSettingsAware(false). + Test for crash with QApplication::setDesktopSettingsAware(false). */ void tst_QApplication::desktopSettingsAware() { diff --git a/tests/auto/qbytearray/tst_qbytearray.cpp b/tests/auto/qbytearray/tst_qbytearray.cpp index 9889aae09b..54885591a7 100644 --- a/tests/auto/qbytearray/tst_qbytearray.cpp +++ b/tests/auto/qbytearray/tst_qbytearray.cpp @@ -644,7 +644,7 @@ void tst_QByteArray::qstrncpy() QCOMPARE(QByteArray(::qstrncpy(dst.data(), src.data(), src.size())), QByteArray("Tumdelidu")); - // normal copy with length is longer than neccessary + // normal copy with length is longer than necessary src = QByteArray( "Tumdelidum\0foo" ); dst.resize(128*1024); QCOMPARE(QByteArray(::qstrncpy(dst.data(), src.data(), dst.size())), diff --git a/tests/auto/qclipboard/tst_qclipboard.cpp b/tests/auto/qclipboard/tst_qclipboard.cpp index 4c68cefc4c..4d3bb29e13 100644 --- a/tests/auto/qclipboard/tst_qclipboard.cpp +++ b/tests/auto/qclipboard/tst_qclipboard.cpp @@ -140,8 +140,8 @@ void tst_QClipboard::modes() } /* - Test that the apropriate signals are emitted when the cliboard - contents is changed by calling the qt funcitons. + Test that the appropriate signals are emitted when the cliboard + contents is changed by calling the qt functions. */ void tst_QClipboard::testSignals() { @@ -170,7 +170,7 @@ void tst_QClipboard::testSignals() changedSpy.clear(); - // Test the selction mode signal. + // Test the selection mode signal. if (clipboard->supportsSelection()) { clipboard->setText(text, QClipboard::Selection); QCOMPARE(selectionChangedSpy.count(), 1); diff --git a/tests/auto/qcommandlinkbutton/tst_qcommandlinkbutton.cpp b/tests/auto/qcommandlinkbutton/tst_qcommandlinkbutton.cpp index 86d5f240fb..6a51bf4bba 100644 --- a/tests/auto/qcommandlinkbutton/tst_qcommandlinkbutton.cpp +++ b/tests/auto/qcommandlinkbutton/tst_qcommandlinkbutton.cpp @@ -360,7 +360,7 @@ void tst_QCommandLinkButton::toggled() testWidget->toggle(); QVERIFY( toggle_count == 0 ); - // do it again, just to be shure + // do it again, just to be sure resetCounters(); testWidget->toggle(); QVERIFY( toggle_count == 0 ); diff --git a/tests/auto/qeventloop/tst_qeventloop.cpp b/tests/auto/qeventloop/tst_qeventloop.cpp index b31f8cd76c..828366ba49 100644 --- a/tests/auto/qeventloop/tst_qeventloop.cpp +++ b/tests/auto/qeventloop/tst_qeventloop.cpp @@ -59,6 +59,8 @@ #include #endif +#include "../../shared/util.h" + //TESTED_CLASS= //TESTED_FILES= @@ -208,6 +210,7 @@ private slots: void quit(); void processEventsExcludeSocket(); void processEventsExcludeTimers(); + void deliverInDefinedOrder_QTBUG19637(); // keep this test last: void nestedLoops(); @@ -284,7 +287,7 @@ void tst_QEventLoop::onlySymbianActiveScheduler() { // In here we try to use timers and sockets exclusively using the Symbian // active scheduler and no processEvents(). // This test should therefore be run first, so that we can verify that - // the first occurrence of processEvents does not do any initalization that + // the first occurrence of processEvents does not do any initialization that // we depend on. // Open up a pipe so we can test socket notifiers. @@ -837,5 +840,77 @@ void tst_QEventLoop::symbianNestedActiveSchedulerLoop() #endif } +Q_DECLARE_METATYPE(QThread*) + +namespace DeliverInDefinedOrder_QTBUG19637 { + enum { NbThread = 3, NbObject = 500, NbEventQueue = 5, NbEvent = 50 }; + + struct CustomEvent : public QEvent { + CustomEvent(int q, int v) : QEvent(Type(User + q)), value(v) {} + int value; + }; + + struct Object : public QObject { + Q_OBJECT + public: + Object() : count(0) { + for (int i = 0; i < NbEventQueue; i++) + lastReceived[i] = -1; + } + int lastReceived[NbEventQueue]; + int count; + virtual void customEvent(QEvent* e) { + QVERIFY(e->type() >= QEvent::User); + QVERIFY(e->type() < QEvent::User + 5); + uint idx = e->type() - QEvent::User; + int value = static_cast(e)->value; + QVERIFY(lastReceived[idx] < value); + lastReceived[idx] = value; + count++; + } + + public slots: + void moveToThread(QThread *t) { + QObject::moveToThread(t); + } + }; + +} + +void tst_QEventLoop::deliverInDefinedOrder_QTBUG19637() +{ + using namespace DeliverInDefinedOrder_QTBUG19637; + qMetaTypeId(); + QThread threads[NbThread]; + Object objects[NbObject]; + for (int t = 0; t < NbThread; t++) { + threads[t].start(); + } + + int event = 0; + + for (int o = 0; o < NbObject; o++) { + objects[o].moveToThread(&threads[o % NbThread]); + for (int e = 0; e < NbEvent; e++) { + int q = e % NbEventQueue; + QCoreApplication::postEvent(&objects[o], new CustomEvent(q, ++event) , q); + if (e % 7) + QMetaObject::invokeMethod(&objects[o], "moveToThread", Qt::QueuedConnection, Q_ARG(QThread*, &threads[(e+o)%NbThread])); + } + } + + QTest::qWait(30); + for (int o = 0; o < NbObject; o++) { + QTRY_COMPARE(objects[o].count, int(NbEvent)); + } + + for (int t = 0; t < NbThread; t++) { + threads[t].quit(); + threads[t].wait(); + } + +} + + QTEST_MAIN(tst_QEventLoop) #include "tst_qeventloop.moc" diff --git a/tests/auto/qftp/tst_qftp.cpp b/tests/auto/qftp/tst_qftp.cpp index 1fa0787b61..62b454099b 100644 --- a/tests/auto/qftp/tst_qftp.cpp +++ b/tests/auto/qftp/tst_qftp.cpp @@ -1416,7 +1416,7 @@ void tst_QFtp::abort() QVERIFY( bytesDone != bytesTotal ); } } else { - // this could be tested by verifying that no more progress signals are emited + // this could be tested by verifying that no more progress signals are emitted QVERIFY(bytesDone <= bytesTotal); } } else { diff --git a/tests/auto/qgl/tst_qgl.cpp b/tests/auto/qgl/tst_qgl.cpp index 9c51e026d2..7d46ada820 100644 --- a/tests/auto/qgl/tst_qgl.cpp +++ b/tests/auto/qgl/tst_qgl.cpp @@ -1742,12 +1742,6 @@ public: painter->fillRect(rect(), Qt::green); painter->restore(); - painter->save(); - painter->setClipRect(0, 60, 60, 25, Qt::IntersectClip); - painter->setClipRect(60, 60, 50, 25, Qt::UniteClip); - painter->fillRect(rect(), Qt::yellow); - painter->restore(); - painter->restore(); painter->translate(100, 100); @@ -1793,17 +1787,6 @@ public: } painter->fillRect(rect(), Qt::green); painter->restore(); - - painter->save(); - { - QPainterPath path; - path.addRect(0, 60, 60, 25); - path.addRect(10, 10, 10, 10); - painter->setClipPath(path, Qt::IntersectClip); - } - painter->setClipRect(60, 60, 50, 25, Qt::UniteClip); - painter->fillRect(rect(), Qt::yellow); - painter->restore(); } protected: diff --git a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp index 4fd23bfa70..9e90a9f03c 100644 --- a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp +++ b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp @@ -6413,6 +6413,7 @@ void tst_QGraphicsItem::boundingRegion_data() QTest::newRow("(0, 0, 10, 10) | 0.0 | identity | {(0, 0, 10, 10)}") << QLineF(0, 0, 10, 10) << qreal(0.0) << QTransform() << QRegion(QRect(0, 0, 10, 10)); +#if 0 { QRegion r; r += QRect(0, 0, 6, 2); @@ -6430,6 +6431,7 @@ void tst_QGraphicsItem::boundingRegion_data() r += QRect(6, 9, 4, 1); QTest::newRow("(0, 0, 10, 10) | 1.0 | identity | {(0, 0, 10, 10)}") << QLineF(0, 0, 10, 10) << qreal(1.0) << QTransform() << r; } +#endif QTest::newRow("(0, 0, 10, 0) | 0.0 | identity | {(0, 0, 10, 10)}") << QLineF(0, 0, 10, 0) << qreal(0.0) << QTransform() << QRegion(QRect(0, 0, 10, 1)); QTest::newRow("(0, 0, 10, 0) | 0.5 | identity | {(0, 0, 10, 1)}") << QLineF(0, 0, 10, 0) << qreal(0.5) << QTransform() diff --git a/tests/auto/qgraphicsview/tst_qgraphicsview.cpp b/tests/auto/qgraphicsview/tst_qgraphicsview.cpp index 399dddeb4e..196519096c 100644 --- a/tests/auto/qgraphicsview/tst_qgraphicsview.cpp +++ b/tests/auto/qgraphicsview/tst_qgraphicsview.cpp @@ -3054,7 +3054,7 @@ void tst_QGraphicsView::task210599_unsetDragWhileDragging() QApplication::sendEvent(view.viewport(), &move); } - // Check that no draggin has occured... + // Check that no draggin has occurred... QCOMPARE(basePos, view.mapFromScene(0, 0)); } diff --git a/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp b/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp index 5260a1a349..1df9d38bb8 100644 --- a/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp +++ b/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp @@ -2456,7 +2456,7 @@ void tst_QGraphicsWidget::popupMouseGrabber() QCOMPARE(widgetUngrabEventSpy.count(), 1); QCOMPARE(scene.mouseGrabberItem(), (QGraphicsItem *)0); - // Showing it grabs the mosue again + // Showing it grabs the mouse again widget->show(); QCOMPARE(widgetGrabEventSpy.count(), 2); QCOMPARE(scene.mouseGrabberItem(), (QGraphicsItem *)widget); @@ -3175,7 +3175,7 @@ void tst_QGraphicsWidget::initialShow2() // Don't let paint events triggered by the windowing system // influence our test case. We're only interested in knowing // whether a QGraphicsWidget generates an additional repaint - // on the inital show. Hence create a dummy scenario to find out + // on the initial show. Hence create a dummy scenario to find out // how many repaints we should expect. QGraphicsScene dummyScene(0, 0, 200, 200); dummyScene.addItem(new QGraphicsRectItem(0, 0, 100, 100)); diff --git a/tests/auto/qhostinfo/tst_qhostinfo.cpp b/tests/auto/qhostinfo/tst_qhostinfo.cpp index 93c08cdc6b..35c8d8d95c 100644 --- a/tests/auto/qhostinfo/tst_qhostinfo.cpp +++ b/tests/auto/qhostinfo/tst_qhostinfo.cpp @@ -250,7 +250,7 @@ void tst_QHostInfo::initTestCase() void tst_QHostInfo::init() { - // delete the cache so inidividual testcase results are independant from each other + // delete the cache so inidividual testcase results are independent from each other qt_qhostinfo_clear_cache(); QFETCH_GLOBAL(bool, cache); diff --git a/tests/auto/qitemmodel/tst_qitemmodel.cpp b/tests/auto/qitemmodel/tst_qitemmodel.cpp index 4bdfadd9e6..191e9e88a9 100644 --- a/tests/auto/qitemmodel/tst_qitemmodel.cpp +++ b/tests/auto/qitemmodel/tst_qitemmodel.cpp @@ -67,7 +67,7 @@ Q_DECLARE_METATYPE(QModelIndex) See modelstotest.cpp for instructions on how to have your model tested with these tests. Each test such as rowCount have a _data() function which populate the QTest data with - the tests specified by modelstotest.cpp and any extra data needed for that perticular test. + the tests specified by modelstotest.cpp and any extra data needed for that particular test. setupWithNoTestData() fills the QTest data with just the tests and is used by most tests. @@ -192,7 +192,7 @@ void tst_QItemModel::nonDestructiveBasicTest_data() } /*! - nonDestructiveBasicTest trys to call a number of the basic functions (not all) + nonDestructiveBasicTest tries to call a number of the basic functions (not all) to make sure the model doesn't segfault, testing the functions that makes sense. */ void tst_QItemModel::nonDestructiveBasicTest() @@ -516,7 +516,7 @@ void tst_QItemModel::parent() QCOMPARE(currentModel->parent(childIndex), topIndex); } - // Common error test #3, the second colum has the same children + // Common error test #3, the second column has the same children // as the first column in a row. QModelIndex topIndex1 = currentModel->index(0, 1, QModelIndex()); if (currentModel->rowCount(topIndex1) > 0) { @@ -817,7 +817,7 @@ void tst_QItemModel::remove_data() 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); - // Recursive remove's might assert, havn't decided yet... + // 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); //makeTestRow(":one at the middle recursivly", MIDDLE, DEFAULTCOUNT, 2, DNS, 2, DNS, RECURSIVE, START, DEFAULTCOUNT, SUCCESS); //makeTestRow(":one at the end recursivly", END, DEFAULTCOUNT, 2, DNS, 2, DNS, RECURSIVE, START, DEFAULTCOUNT, SUCCESS); @@ -849,7 +849,7 @@ void tst_QItemModel::remove() QFETCH(bool, shouldSucceed); // Populate the test area so we can remove something. See: cleanup() - // parentOfRemoved is stored so that the slots can make sure parentOfRemoved is the index that is emited. + // parentOfRemoved is stored so that the slots can make sure parentOfRemoved is the index that is emitted. parentOfRemoved = testModels->populateTestArea(currentModel); if (count == -1) @@ -866,7 +866,7 @@ void tst_QItemModel::remove() //qDebug() << "remove start:" << start << "count:" << count << "rowCount:" << currentModel->rowCount(parentOfRemoved); // When a row or column is removed there should be two signals. - // Watch to make sure they are emited and get the row/column count when they do get emited by connecting them to a slot + // Watch to make sure they are emitted and get the row/column count when they do get emitted by connecting them to a slot qRegisterMetaType("QModelIndex"); QSignalSpy columnsAboutToBeRemovedSpy(currentModel, SIGNAL(columnsAboutToBeRemoved( const QModelIndex &, int , int ))); QSignalSpy rowsAboutToBeRemovedSpy(currentModel, SIGNAL(rowsAboutToBeRemoved( const QModelIndex &, int , int ))); @@ -914,7 +914,7 @@ void tst_QItemModel::remove() QVERIFY(parentOfRemoved == parent); } - // Only the row signals should have been emited + // Only the row signals should have been emitted if (modelResetSpy.count() >= 1 || modelLayoutChangedSpy.count() >=1 ){ QCOMPARE(columnsAboutToBeRemovedSpy.count(), 0); QCOMPARE(rowsAboutToBeRemovedSpy.count(), 0); @@ -928,7 +928,7 @@ void tst_QItemModel::remove() QCOMPARE(rowsRemovedSpy.count(), numberOfRowsRemovedSignals); } - // The row count should only change *after* rowsAboutToBeRemoved has been emited + // The row count should only change *after* rowsAboutToBeRemoved has been emitted //qDebug() << beforeRemoveRowCount << afterAboutToRemoveRowCount << afterRemoveRowCount << currentModel->rowCount(parentOfRemoved); if (shouldSucceed) { if (modelResetSpy.count() == 0 && modelLayoutChangedSpy.count() == 0){ @@ -978,7 +978,7 @@ void tst_QItemModel::remove() QCOMPARE(rowsRemovedSpy.count(), numberOfRowsRemovedSignals); } - // The column count should only change *after* rowsAboutToBeRemoved has been emited + // The column count should only change *after* rowsAboutToBeRemoved has been emitted if (shouldSucceed) { if (modelResetSpy.count() == 0 && modelLayoutChangedSpy.count() == 0){ QCOMPARE(afterAboutToRemoveColumnCount, beforeRemoveColumnCount); @@ -1160,7 +1160,7 @@ void tst_QItemModel::insert_data() 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); - // Recursive insert's might assert, havn't decided yet... + // 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); //makeTestRow(":one at the middle recursivly", MIDDLE, DEFAULTCOUNT, 2, DNS, 2, DNS, RECURSIVE, START, DEFAULTCOUNT, SUCCESS); //makeTestRow(":one at the end recursivly", END, DEFAULTCOUNT, 2, DNS, 2, DNS, RECURSIVE, START, DEFAULTCOUNT, SUCCESS); @@ -1191,7 +1191,7 @@ void tst_QItemModel::insert() QFETCH(bool, shouldSucceed); // Populate the test area so we can insert something. See: cleanup() - // parentOfInserted is stored so that the slots can make sure parentOfInserted is the index that is emited. + // parentOfInserted is stored so that the slots can make sure parentOfInserted is the index that is emitted. parentOfInserted = testModels->populateTestArea(currentModel); if (count == -1) @@ -1208,7 +1208,7 @@ void tst_QItemModel::insert() //qDebug() << "insert start:" << start << "count:" << count << "rowCount:" << currentModel->rowCount(parentOfInserted); // When a row or column is inserted there should be two signals. - // Watch to make sure they are emited and get the row/column count when they do get emited by connecting them to a slot + // Watch to make sure they are emitted and get the row/column count when they do get emitted by connecting them to a slot qRegisterMetaType("QModelIndex"); QSignalSpy columnsAboutToBeInsertedSpy(currentModel, SIGNAL(columnsAboutToBeInserted( const QModelIndex &, int , int ))); QSignalSpy rowsAboutToBeInsertedSpy(currentModel, SIGNAL(rowsAboutToBeInserted( const QModelIndex &, int , int ))); @@ -1253,7 +1253,7 @@ void tst_QItemModel::insert() QVERIFY(parentOfInserted == parent); } - // Only the row signals should have been emited + // Only the row signals should have been emitted if (modelResetSpy.count() >= 1 || modelLayoutChangedSpy.count() >= 1) { QCOMPARE(columnsAboutToBeInsertedSpy.count(), 0); QCOMPARE(rowsAboutToBeInsertedSpy.count(), 0); @@ -1266,7 +1266,7 @@ void tst_QItemModel::insert() QCOMPARE(columnsInsertedSpy.count(), 0); QCOMPARE(rowsInsertedSpy.count(), numberOfRowsInsertedSignals); } - // The row count should only change *after* rowsAboutToBeInserted has been emited + // The row count should only change *after* rowsAboutToBeInserted has been emitted //qDebug() << beforeInsertRowCount << afterAboutToInsertRowCount << afterInsertRowCount << currentModel->rowCount(parentOfInserted); if (shouldSucceed) { if (modelResetSpy.count() == 0 && modelLayoutChangedSpy.count() == 0) { @@ -1315,7 +1315,7 @@ void tst_QItemModel::insert() QCOMPARE(columnsInsertedSpy.count(), numberOfColumnsInsertedSignals); QCOMPARE(rowsInsertedSpy.count(), numberOfRowsInsertedSignals); } - // The column count should only change *after* rowsAboutToBeInserted has been emited + // The column count should only change *after* rowsAboutToBeInserted has been emitted if (shouldSucceed) { if (modelResetSpy.count() == 0 && modelLayoutChangedSpy.count() == 0) { QCOMPARE(afterAboutToInsertColumnCount, beforeInsertColumnCount); diff --git a/tests/auto/qitemview/tst_qitemview.cpp b/tests/auto/qitemview/tst_qitemview.cpp index 1f43568240..b957f73eec 100644 --- a/tests/auto/qitemview/tst_qitemview.cpp +++ b/tests/auto/qitemview/tst_qitemview.cpp @@ -86,7 +86,7 @@ bool qt_wince_is_mobile() { See viewstotest.cpp for instructions on how to have your view tested with these tests. Each test such as visualRect have a _data() function which populate the QTest data with - tests specified by viewstotest.cpp and any extra data needed for that perticular test. + tests specified by viewstotest.cpp and any extra data needed for that particular test. setupWithNoTestData() fills QTest data with only the tests it is used by most tests. @@ -324,7 +324,7 @@ void tst_QItemView::nonDestructiveBasicTest_data() } /*! - nonDestructiveBasicTest trys to call a number of the basic functions (not all) + nonDestructiveBasicTest tries to call a number of the basic functions (not all) to make sure the view doesn't segfault, testing the functions that makes sense. */ void tst_QItemView::nonDestructiveBasicTest() diff --git a/tests/auto/qkeysequence/tst_qkeysequence.cpp b/tests/auto/qkeysequence/tst_qkeysequence.cpp index 517e44f743..5753fb8df4 100644 --- a/tests/auto/qkeysequence/tst_qkeysequence.cpp +++ b/tests/auto/qkeysequence/tst_qkeysequence.cpp @@ -291,7 +291,7 @@ void tst_QKeySequence::checkMultipleCodes() } /* -* We must ensure that the keyBindings data is allways sorted +* We must ensure that the keyBindings data is always sorted * so that we can safely perform binary searches. */ void tst_QKeySequence::ensureSorted() diff --git a/tests/auto/qlistview/tst_qlistview.cpp b/tests/auto/qlistview/tst_qlistview.cpp index ce3d88f9d7..1c35098152 100644 --- a/tests/auto/qlistview/tst_qlistview.cpp +++ b/tests/auto/qlistview/tst_qlistview.cpp @@ -979,7 +979,7 @@ void tst_QListView::selection_data() << IntList(); // expected items #if defined(Q_OS_WINCE) - // depending on wether the display is double-pixeld, we need + // depending on whether the display is double-pixeld, we need // to click at a different position bool doubledSize = false; int dpi = GetDeviceCaps(GetDC(0), LOGPIXELSX); diff --git a/tests/auto/qmenu/tst_qmenu.cpp b/tests/auto/qmenu/tst_qmenu.cpp index dfa7bf5aec..b3c41e1c2b 100644 --- a/tests/auto/qmenu/tst_qmenu.cpp +++ b/tests/auto/qmenu/tst_qmenu.cpp @@ -302,7 +302,7 @@ void tst_QMenu::mouseActivation() QTest::mouseClick(&menu, Qt::LeftButton, 0, menu.rect().center(), 300); QVERIFY(!menu.isVisible()); - //context menus can allways be accessed with right click except on windows + //context menus can always be accessed with right click except on windows menu.show(); QTest::mouseClick(&menu, Qt::RightButton, 0, menu.rect().center(), 300); QVERIFY(!menu.isVisible()); diff --git a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp index 3b31e84556..782d533bbf 100644 --- a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp +++ b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp @@ -348,6 +348,7 @@ private Q_SLOTS: void getFromHttpIntoBuffer(); void getFromHttpIntoBuffer2_data(); void getFromHttpIntoBuffer2(); + void getFromHttpIntoBufferCanReadLine(); void ioGetFromHttpWithoutContentLength(); @@ -5824,6 +5825,33 @@ void tst_QNetworkReply::getFromHttpIntoBuffer2() } +void tst_QNetworkReply::getFromHttpIntoBufferCanReadLine() +{ + QString header("HTTP/1.0 200 OK\r\nContent-Length: 7\r\n\r\nxxx\nxxx"); + + MiniHttpServer server(header.toAscii()); + server.doClose = true; + + QNetworkRequest request(QUrl("http://localhost:" + QString::number(server.serverPort()))); + 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()); + + QCOMPARE(reply->error(), QNetworkReply::NoError); + QVERIFY(reply->canReadLine()); + QCOMPARE(reply->read(1), QByteArray("x")); + QVERIFY(reply->canReadLine()); + QCOMPARE(reply->read(3), QByteArray("xx\n")); + QVERIFY(!reply->canReadLine()); + QCOMPARE(reply->readAll(), QByteArray("xxx")); + QVERIFY(!reply->canReadLine()); +} + + + // Is handled somewhere else too, introduced this special test to have it more accessible void tst_QNetworkReply::ioGetFromHttpWithoutContentLength() { diff --git a/tests/auto/qpainter/tst_qpainter.cpp b/tests/auto/qpainter/tst_qpainter.cpp index a149e087cd..8898a4874d 100644 --- a/tests/auto/qpainter/tst_qpainter.cpp +++ b/tests/auto/qpainter/tst_qpainter.cpp @@ -1294,7 +1294,7 @@ void tst_QPainter::drawRect2() p.end(); QRect stroke = getPaintedSize(image, Qt::white); - QCOMPARE(stroke, fill.adjusted(0, 0, 1, 1)); + QCOMPARE(stroke.adjusted(1, 1, 0, 0), fill.adjusted(0, 0, 1, 1)); } } @@ -1391,13 +1391,13 @@ void tst_QPainter::drawPath_data() { QPainterPath p; p.addRect(2.25, 2.25, 10, 10); - QTest::newRow("non-aligned rect") << p << QRect(2, 2, 10, 10) << 10 * 10; + QTest::newRow("non-aligned rect") << p << QRect(3, 3, 10, 10) << 10 * 10; } { QPainterPath p; p.addRect(2.25, 2.25, 10.5, 10.5); - QTest::newRow("non-aligned rect 2") << p << QRect(2, 2, 11, 11) << 11 * 11; + QTest::newRow("non-aligned rect 2") << p << QRect(3, 3, 10, 10) << 10 * 10; } { @@ -1820,26 +1820,10 @@ int countPixels(const QImage &img, const QRgb &color) template void testClipping(QImage &img) { - img.fill(0x0); QPainterPath a, b; a.addRect(QRect(2, 2, 4, 4)); b.addRect(QRect(4, 4, 4, 4)); - QPainter p(&img); - p.setClipPath(a); - p.setClipPath(b, Qt::UniteClip); - - p.setClipping(false); - p.setPen(Qt::NoPen); - p.setBrush(QColor(0xff0000)); - p.drawRect(T(0, 0, 10, 10)); - - p.setClipping(true); - p.setBrush(QColor(0x00ff00)); - p.drawRect(T(0, 0, 10, 10)); - - QCOMPARE(countPixels(img, 0xff0000), 72); - QCOMPARE(countPixels(img, 0x00ff00), 28); p.end(); img.fill(0x0); @@ -2002,43 +1986,8 @@ void tst_QPainter::setEqualClipRegionAndPath() QCOMPARE(img1, img2); #endif - // simple uniteclip img1.fill(0x12345678); img2.fill(0x12345678); - { - QPainter p(&img1); - p.setClipRegion(region); - p.setClipRegion(region, Qt::UniteClip); - p.fillRect(0, 0, img1.width(), img1.height(), QColor(Qt::red)); - } - { - QPainter p(&img2); - p.setClipPath(path); - p.setClipPath(path, Qt::UniteClip); - p.fillRect(0, 0, img2.width(), img2.height(), QColor(Qt::red)); - } - QCOMPARE(img1, img2); - img1.fill(0x12345678); - img2.fill(0x12345678); - { - QPainter p(&img1); - p.setClipPath(path); - p.setClipRegion(region, Qt::UniteClip); - p.fillRect(0, 0, img1.width(), img1.height(), QColor(Qt::red)); - } - { - QPainter p(&img2); - p.setClipRegion(region); - p.setClipPath(path, Qt::UniteClip); - p.fillRect(0, 0, img2.width(), img2.height(), QColor(Qt::red)); - } -#if 0 - if (img1 != img2) { - img1.save("setEqualClipRegionAndPath_1.xpm", "XPM"); - img2.save("setEqualClipRegionAndPath_2.xpm", "XPM"); - } -#endif - QCOMPARE(img1, img2); // simple intersectclip img1.fill(0x12345678); diff --git a/tests/auto/qprinterinfo/tst_qprinterinfo.cpp b/tests/auto/qprinterinfo/tst_qprinterinfo.cpp index 582fd4694e..7e5da4a6f8 100644 --- a/tests/auto/qprinterinfo/tst_qprinterinfo.cpp +++ b/tests/auto/qprinterinfo/tst_qprinterinfo.cpp @@ -292,7 +292,7 @@ void tst_QPrinterInfo::testForPrinters() for (int i = 0; i < sysPrinters.size(); ++i) { if (!qtPrinters.value(sysPrinters.at(i))) { - qDebug() << "Avaliable printers: " << qtPrinters; + qDebug() << "Available printers: " << qtPrinters; QFAIL(qPrintable(QString("Printer '%1' reported by system, but not reported by Qt").arg(sysPrinters.at(i)))); } } diff --git a/tests/auto/qpushbutton/tst_qpushbutton.cpp b/tests/auto/qpushbutton/tst_qpushbutton.cpp index 8fcd1bf80b..7742f6b567 100644 --- a/tests/auto/qpushbutton/tst_qpushbutton.cpp +++ b/tests/auto/qpushbutton/tst_qpushbutton.cpp @@ -382,7 +382,7 @@ void tst_QPushButton::toggled() testWidget->toggle(); QVERIFY( toggle_count == 0 ); - // do it again, just to be shure + // do it again, just to be sure resetCounters(); testWidget->toggle(); QVERIFY( toggle_count == 0 ); diff --git a/tests/auto/qscopedpointer/tst_qscopedpointer.cpp b/tests/auto/qscopedpointer/tst_qscopedpointer.cpp index 1a6f944965..06c0ecbafd 100644 --- a/tests/auto/qscopedpointer/tst_qscopedpointer.cpp +++ b/tests/auto/qscopedpointer/tst_qscopedpointer.cpp @@ -72,6 +72,7 @@ private Q_SLOTS: void isNullSignature(); void objectSize(); void comparison(); + void array(); // TODO instanciate on const object }; @@ -437,5 +438,26 @@ void tst_QScopedPointer::comparison() QCOMPARE( int(RefCounted::instanceCount), 0 ); } +void tst_QScopedPointer::array() +{ + int instCount = RefCounted::instanceCount; + { + QScopedArrayPointer array; + array.reset(new RefCounted[42]); + QCOMPARE(instCount + 42, int(RefCounted::instanceCount)); + } + QCOMPARE(instCount, int(RefCounted::instanceCount)); + { + QScopedArrayPointer array(new RefCounted[42]); + QCOMPARE(instCount + 42, int(RefCounted::instanceCount)); + array.reset(new RefCounted[28]); + QCOMPARE(instCount + 28, int(RefCounted::instanceCount)); + array.reset(0); + QCOMPARE(instCount, int(RefCounted::instanceCount)); + } + QCOMPARE(instCount, int(RefCounted::instanceCount)); +} + + QTEST_MAIN(tst_QScopedPointer) #include "tst_qscopedpointer.moc" diff --git a/tests/auto/qshortcut/tst_qshortcut.cpp b/tests/auto/qshortcut/tst_qshortcut.cpp index 01b6b876d1..a78e8cfd27 100644 --- a/tests/auto/qshortcut/tst_qshortcut.cpp +++ b/tests/auto/qshortcut/tst_qshortcut.cpp @@ -1030,7 +1030,7 @@ void tst_QShortcut::context() other1->clear(); other2->clear(); - // edit doens't have focus, so ActiveWindow context should work + // edit doesn't have focus, so ActiveWindow context should work // ..but Focus context shouldn't.. // Changing focus to edit should make focus context work // Application context should always work diff --git a/tests/auto/qsqlrelationaltablemodel/tst_qsqlrelationaltablemodel.cpp b/tests/auto/qsqlrelationaltablemodel/tst_qsqlrelationaltablemodel.cpp index 45c6269148..edc81bc3ec 100644 --- a/tests/auto/qsqlrelationaltablemodel/tst_qsqlrelationaltablemodel.cpp +++ b/tests/auto/qsqlrelationaltablemodel/tst_qsqlrelationaltablemodel.cpp @@ -218,7 +218,7 @@ void tst_QSqlRelationalTableModel::data() QCOMPARE(model.data(model.index(0, 1)).toString(), QString("harry")); QCOMPARE(model.data(model.index(0, 2)).toString(), QString("herr")); - //try a non-existant index + //try a non-existent index QVERIFY2(model.data(model.index(0,4)).isValid() == false,"Invalid index returned valid QVariant"); //check data retrieval when relational key is a non-integer type diff --git a/tests/auto/qsqltablemodel/tst_qsqltablemodel.cpp b/tests/auto/qsqltablemodel/tst_qsqltablemodel.cpp index 0700e9d978..96a1f1caa5 100644 --- a/tests/auto/qsqltablemodel/tst_qsqltablemodel.cpp +++ b/tests/auto/qsqltablemodel/tst_qsqltablemodel.cpp @@ -1293,7 +1293,7 @@ void tst_QSqlTableModel::tableModifyWithBlank() QCOMPARE(model.rowCount(), 1); //verify only one entry QCOMPARE(model.record(0).value(0).toString(), timeString); //verify correct record - //At this point we know that the intial value (timestamp) was succsefully stored in the database + //At this point we know that the initial value (timestamp) was succsefully stored in the database //Attempt to modify the data in the new record //equivalent to query.exec("update test set column3="... command in direct test //set the data in the first column to "col1ModelData" diff --git a/tests/auto/qsslcertificate/more-certificates/test-cn-two-cns-cert.pem b/tests/auto/qsslcertificate/more-certificates/test-cn-two-cns-cert.pem new file mode 100644 index 0000000000..bc43c63f21 --- /dev/null +++ b/tests/auto/qsslcertificate/more-certificates/test-cn-two-cns-cert.pem @@ -0,0 +1,67 @@ +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 10 (0xa) + Signature Algorithm: sha1WithRSAEncryption + Issuer: CN=Westpoint Certificate Test CA, ST=Lancashire, C=UK/emailAddress=ca@example.com, O=Westpoint Certificate Test Root Certification Authority + Validity + Not Before: Jun 21 21:32:19 2011 GMT + Not After : Jun 18 21:32:19 2021 GMT + Subject: CN=www.example.com, CN=www2.example.com, ST=Lancashire, C=UK, O=Some organisation + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (1024 bit) + Modulus: + 00:b8:b3:72:13:cd:17:2c:01:78:16:62:5d:72:71: + 33:14:41:be:0c:17:ac:85:db:f8:1e:e8:55:98:3e: + 7b:46:a5:08:a7:db:0e:dc:78:d8:b7:1e:e0:78:30: + 6e:b9:e2:43:2e:f2:7d:98:fb:b4:a8:5e:63:42:e8: + 5c:26:79:20:5e:f6:0e:1d:12:ac:c5:0e:a4:b6:68: + 79:5f:3d:52:ce:44:f9:20:c9:8e:b3:fb:20:42:d5: + 97:9f:a4:41:8f:b8:b1:8d:c3:14:61:70:b8:d1:f7: + ff:48:99:c1:a0:dd:71:cb:8b:91:e6:60:29:1e:af: + a9:00:91:d2:c3:af:7f:cd:f9 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Basic Constraints: + CA:FALSE + Authority Information Access: + OCSP - URI:http://ocsp.example.com:8888/ + + Signature Algorithm: sha1WithRSAEncryption + 4c:c8:bc:0e:84:4b:bb:9e:c1:7b:81:4d:65:60:e5:d1:86:6a: + 00:f2:fb:ff:6d:a1:23:a1:88:c7:85:4a:b2:3d:24:cf:92:c8: + ab:60:10:b8:17:fa:d2:4f:60:cd:94:40:2a:b7:6e:4a:e9:f9: + 2b:e6:54:70:7f:f3:71:f8:fc:45:df:cf:43:f4:26:d6:73:69: + b3:ff:d9:da:dc:12:05:e2:52:62:2f:d4:b0:0a:e3:a1:e8:f2: + c1:80:b7:44:8e:3a:46:ca:1b:6d:82:c0:16:c2:f6:4f:56:89: + 24:86:42:8e:f9:5e:63:91:7d:88:ff:c4:bd:0d:f5:00:ad:ba: + 6c:fd:5d:02:32:4f:94:3f:4e:10:4a:a6:15:c2:77:e6:be:a0: + ea:15:e3:49:40:e8:f0:7d:e0:fe:33:f2:6b:36:a6:a6:70:52: + 21:d2:ff:ee:ce:2d:46:50:dd:c2:19:4d:9a:1a:f1:a8:e8:45: + 41:2d:6e:29:d3:c8:59:69:dd:1b:5c:21:21:31:b6:be:98:64: + 31:a2:3e:a6:36:9c:27:8f:86:bb:0e:aa:67:f1:0b:e1:ea:d6: + d6:50:72:6c:24:cd:85:8e:32:26:45:44:2e:7c:83:69:54:9b: + 8b:1b:94:71:ba:8e:49:77:dd:d1:d4:30:a6:56:80:95:5e:6b: + b8:11:bf:b0 +-----BEGIN CERTIFICATE----- +MIIDXjCCAkagAwIBAgIBCjANBgkqhkiG9w0BAQUFADCBqzEmMCQGA1UEAxMdV2Vz +dHBvaW50IENlcnRpZmljYXRlIFRlc3QgQ0ExEzARBgNVBAgTCkxhbmNhc2hpcmUx +CzAJBgNVBAYTAlVLMR0wGwYJKoZIhvcNAQkBFg5jYUBleGFtcGxlLmNvbTFAMD4G +A1UEChM3V2VzdHBvaW50IENlcnRpZmljYXRlIFRlc3QgUm9vdCBDZXJ0aWZpY2F0 +aW9uIEF1dGhvcml0eTAeFw0xMTA2MjEyMTMyMTlaFw0yMTA2MTgyMTMyMTlaMHMx +GDAWBgNVBAMTD3d3dy5leGFtcGxlLmNvbTEZMBcGA1UEAxMQd3d3Mi5leGFtcGxl +LmNvbTETMBEGA1UECBMKTGFuY2FzaGlyZTELMAkGA1UEBhMCVUsxGjAYBgNVBAoT +EVNvbWUgb3JnYW5pc2F0aW9uMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC4 +s3ITzRcsAXgWYl1ycTMUQb4MF6yF2/ge6FWYPntGpQin2w7ceNi3HuB4MG654kMu +8n2Y+7SoXmNC6FwmeSBe9g4dEqzFDqS2aHlfPVLORPkgyY6z+yBC1ZefpEGPuLGN +wxRhcLjR9/9ImcGg3XHLi5HmYCker6kAkdLDr3/N+QIDAQABo0gwRjAJBgNVHRME +AjAAMDkGCCsGAQUFBwEBBC0wKzApBggrBgEFBQcwAYYdaHR0cDovL29jc3AuZXhh +bXBsZS5jb206ODg4OC8wDQYJKoZIhvcNAQEFBQADggEBAEzIvA6ES7uewXuBTWVg +5dGGagDy+/9toSOhiMeFSrI9JM+SyKtgELgX+tJPYM2UQCq3bkrp+SvmVHB/83H4 +/EXfz0P0JtZzabP/2drcEgXiUmIv1LAK46Ho8sGAt0SOOkbKG22CwBbC9k9WiSSG +Qo75XmORfYj/xL0N9QCtumz9XQIyT5Q/ThBKphXCd+a+oOoV40lA6PB94P4z8ms2 +pqZwUiHS/+7OLUZQ3cIZTZoa8ajoRUEtbinTyFlp3RtcISExtr6YZDGiPqY2nCeP +hrsOqmfxC+Hq1tZQcmwkzYWOMiZFRC58g2lUm4sblHG6jkl33dHUMKZWgJVea7gR +v7A= +-----END CERTIFICATE----- diff --git a/tests/auto/qsslcertificate/tst_qsslcertificate.cpp b/tests/auto/qsslcertificate/tst_qsslcertificate.cpp index 6e29072d8f..e95af1e97c 100644 --- a/tests/auto/qsslcertificate/tst_qsslcertificate.cpp +++ b/tests/auto/qsslcertificate/tst_qsslcertificate.cpp @@ -114,6 +114,7 @@ private slots: void largeExpirationDate(); void blacklistedCertificates(); void toText(); + void multipleCommonNames(); // ### add tests for certificate bundles (multiple certificates concatenated into a single // structure); both PEM and DER formatted @@ -195,8 +196,8 @@ void tst_QSslCertificate::emptyConstructor() QCOMPARE(certificate.version() , QByteArray()); QCOMPARE(certificate.serialNumber(), QByteArray()); QCOMPARE(certificate.digest(), QCryptographicHash::hash(QByteArray(), QCryptographicHash::Md5)); - QCOMPARE(certificate.issuerInfo(QSslCertificate::Organization), QString()); - QCOMPARE(certificate.subjectInfo(QSslCertificate::Organization), QString()); + QCOMPARE(certificate.issuerInfo(QSslCertificate::Organization), QStringList()); + QCOMPARE(certificate.subjectInfo(QSslCertificate::Organization), QStringList()); QCOMPARE(certificate.alternateSubjectNames(),(QMultiMap())); #ifndef QT_NO_TEXTSTREAM QCOMPARE(certificate.effectiveDate(), QDateTime()); @@ -423,11 +424,11 @@ void tst_QSslCertificate::utf8SubjectNames() static const char *ou = "\xe3\x88\xa7" "A" "\xe3\x89\x81\xef\xbd\xab" "BC"; // the following two tests should help find "\x"-literal encoding bugs in the test itself - QCOMPARE(cert.subjectInfo("O").length(), QString::fromUtf8(o).length()); - QCOMPARE (cert.subjectInfo("O").toUtf8().toHex(), QByteArray(o).toHex()); + QCOMPARE(cert.subjectInfo("O")[0].length(), QString::fromUtf8(o).length()); + QCOMPARE (cert.subjectInfo("O")[0].toUtf8().toHex(), QByteArray(o).toHex()); - QCOMPARE(cert.subjectInfo("O"), QString::fromUtf8(o)); - QCOMPARE(cert.subjectInfo("OU"), QString::fromUtf8(ou)); + QCOMPARE(cert.subjectInfo("O")[0], QString::fromUtf8(o)); + QCOMPARE(cert.subjectInfo("OU")[0], QString::fromUtf8(ou)); } void tst_QSslCertificate::publicKey_data() @@ -680,33 +681,33 @@ void tst_QSslCertificate::certInfo() QRegExp::FixedString).first(); QVERIFY(!cert.isNull()); - QCOMPARE(cert.issuerInfo(QSslCertificate::Organization), QString("CryptSoft Pty Ltd")); - QCOMPARE(cert.issuerInfo(QSslCertificate::CommonName), QString("Test CA (1024 bit)")); - QCOMPARE(cert.issuerInfo(QSslCertificate::LocalityName), QString()); - QCOMPARE(cert.issuerInfo(QSslCertificate::OrganizationalUnitName), QString()); - QCOMPARE(cert.issuerInfo(QSslCertificate::CountryName), QString("AU")); - QCOMPARE(cert.issuerInfo(QSslCertificate::StateOrProvinceName), QString("Queensland")); + QCOMPARE(cert.issuerInfo(QSslCertificate::Organization)[0], QString("CryptSoft Pty Ltd")); + QCOMPARE(cert.issuerInfo(QSslCertificate::CommonName)[0], QString("Test CA (1024 bit)")); + QCOMPARE(cert.issuerInfo(QSslCertificate::LocalityName), QStringList()); + QCOMPARE(cert.issuerInfo(QSslCertificate::OrganizationalUnitName), QStringList()); + QCOMPARE(cert.issuerInfo(QSslCertificate::CountryName)[0], QString("AU")); + QCOMPARE(cert.issuerInfo(QSslCertificate::StateOrProvinceName)[0], QString("Queensland")); - QCOMPARE(cert.issuerInfo("O"), QString("CryptSoft Pty Ltd")); - QCOMPARE(cert.issuerInfo("CN"), QString("Test CA (1024 bit)")); - QCOMPARE(cert.issuerInfo("L"), QString()); - QCOMPARE(cert.issuerInfo("OU"), QString()); - QCOMPARE(cert.issuerInfo("C"), QString("AU")); - QCOMPARE(cert.issuerInfo("ST"), QString("Queensland")); + QCOMPARE(cert.issuerInfo("O")[0], QString("CryptSoft Pty Ltd")); + QCOMPARE(cert.issuerInfo("CN")[0], QString("Test CA (1024 bit)")); + QCOMPARE(cert.issuerInfo("L"), QStringList()); + QCOMPARE(cert.issuerInfo("OU"), QStringList()); + QCOMPARE(cert.issuerInfo("C")[0], QString("AU")); + QCOMPARE(cert.issuerInfo("ST")[0], QString("Queensland")); - QCOMPARE(cert.subjectInfo(QSslCertificate::Organization), QString()); - QCOMPARE(cert.subjectInfo(QSslCertificate::CommonName), QString("name/with/slashes")); - QCOMPARE(cert.subjectInfo(QSslCertificate::LocalityName), QString()); - QCOMPARE(cert.subjectInfo(QSslCertificate::OrganizationalUnitName), QString()); - QCOMPARE(cert.subjectInfo(QSslCertificate::CountryName), QString("NO")); - QCOMPARE(cert.subjectInfo(QSslCertificate::StateOrProvinceName), QString()); + QCOMPARE(cert.subjectInfo(QSslCertificate::Organization), QStringList()); + QCOMPARE(cert.subjectInfo(QSslCertificate::CommonName)[0], QString("name/with/slashes")); + QCOMPARE(cert.subjectInfo(QSslCertificate::LocalityName), QStringList()); + QCOMPARE(cert.subjectInfo(QSslCertificate::OrganizationalUnitName), QStringList()); + QCOMPARE(cert.subjectInfo(QSslCertificate::CountryName)[0], QString("NO")); + QCOMPARE(cert.subjectInfo(QSslCertificate::StateOrProvinceName), QStringList()); - QCOMPARE(cert.subjectInfo("O"), QString()); - QCOMPARE(cert.subjectInfo("CN"), QString("name/with/slashes")); - QCOMPARE(cert.subjectInfo("L"), QString()); - QCOMPARE(cert.subjectInfo("OU"), QString()); - QCOMPARE(cert.subjectInfo("C"), QString("NO")); - QCOMPARE(cert.subjectInfo("ST"), QString()); + QCOMPARE(cert.subjectInfo("O"), QStringList()); + QCOMPARE(cert.subjectInfo("CN")[0], QString("name/with/slashes")); + QCOMPARE(cert.subjectInfo("L"), QStringList()); + QCOMPARE(cert.subjectInfo("OU"), QStringList()); + QCOMPARE(cert.subjectInfo("C")[0], QString("NO")); + QCOMPARE(cert.subjectInfo("ST"), QStringList()); QCOMPARE(cert.version(), QByteArray::number(1)); QCOMPARE(cert.serialNumber(), QByteArray::number(17)); @@ -739,8 +740,8 @@ void tst_QSslCertificate::certInfoQByteArray() // in this test, check the bytearray variants before the enum variants to see if // we fixed a bug we had with lazy initialization of the values. - QCOMPARE(cert.issuerInfo("CN"), QString("Test CA (1024 bit)")); - QCOMPARE(cert.subjectInfo("CN"), QString("name/with/slashes")); + QCOMPARE(cert.issuerInfo("CN")[0], QString("Test CA (1024 bit)")); + QCOMPARE(cert.subjectInfo("CN")[0], QString("name/with/slashes")); } void tst_QSslCertificate::task256066toPem() @@ -789,7 +790,7 @@ void tst_QSslCertificate::nulInCN() const QSslCertificate &cert = certList.at(0); QVERIFY(!cert.isNull()); - QString cn = cert.subjectInfo(QSslCertificate::CommonName); + QString cn = cert.subjectInfo(QSslCertificate::CommonName)[0]; QVERIFY(cn != "www.bank.com"); static const char realCN[] = "www.bank.com\0.badguy.com"; @@ -871,6 +872,17 @@ void tst_QSslCertificate::toText() QVERIFY(txtOld == cert.toText() || txtNew == cert.toText()); } +void tst_QSslCertificate::multipleCommonNames() +{ + QList certList = + QSslCertificate::fromPath(SRCDIR "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); + QVERIFY(commonNames.contains(QString("www.example.com"))); + QVERIFY(commonNames.contains(QString("www2.example.com"))); +} + #endif // QT_NO_OPENSSL QTEST_MAIN(tst_QSslCertificate) diff --git a/tests/auto/qsslsocket/tst_qsslsocket.cpp b/tests/auto/qsslsocket/tst_qsslsocket.cpp index 999cad55ba..5070d4b043 100644 --- a/tests/auto/qsslsocket/tst_qsslsocket.cpp +++ b/tests/auto/qsslsocket/tst_qsslsocket.cpp @@ -1992,9 +1992,9 @@ void tst_QSslSocket::writeBigChunk() qWarning() << socket->error() << socket->errorString(); QFAIL("Error while writing! Check if the OpenSSL BIO size is limited?!"); } - // also check the error string. If another error (than UnknownError) occured, it should be different than before + // also check the error string. If another error (than UnknownError) occurred, it should be different than before QVERIFY(errorBefore == errorAfter); - + // check that everything has been written to OpenSSL QVERIFY(socket->bytesToWrite() == 0); diff --git a/tests/auto/qstatictext/tst_qstatictext.cpp b/tests/auto/qstatictext/tst_qstatictext.cpp index 547fdaf04b..4608019218 100644 --- a/tests/auto/qstatictext/tst_qstatictext.cpp +++ b/tests/auto/qstatictext/tst_qstatictext.cpp @@ -96,6 +96,9 @@ private slots: void drawUnderlinedText(); void unprintableCharacter_qtbug12614(); + + void underlinedColor_qtbug20159(); + void textDocumentColor(); }; void tst_QStaticText::init() @@ -783,5 +786,42 @@ void tst_QStaticText::unprintableCharacter_qtbug12614() QVERIFY(staticText.size().isValid()); // Force layout. Should not crash. } +void tst_QStaticText::underlinedColor_qtbug20159() +{ + QString multiScriptText; + multiScriptText += QChar(0x0410); // Cyrillic 'A' + multiScriptText += QLatin1Char('A'); + + QStaticText staticText(multiScriptText); + + QFont font; + font.setUnderline(true); + + staticText.prepare(QTransform(), font); + + QStaticTextPrivate *d = QStaticTextPrivate::get(&staticText); + QCOMPARE(d->itemCount, 2); + + // The pen should not be marked as dirty when drawing the underline + QVERIFY(!d->items[0].color.isValid()); + QVERIFY(!d->items[1].color.isValid()); +} + +void tst_QStaticText::textDocumentColor() +{ + QStaticText staticText("AB"); + staticText.setTextFormat(Qt::RichText); + staticText.prepare(); + + QStaticTextPrivate *d = QStaticTextPrivate::get(&staticText); + QCOMPARE(d->itemCount, 2); + + // The pen should not be marked as dirty when drawing the underline + QVERIFY(!d->items[0].color.isValid()); + QVERIFY(d->items[1].color.isValid()); + + QCOMPARE(d->items[1].color, QColor(Qt::red)); +} + QTEST_MAIN(tst_QStaticText) #include "tst_qstatictext.moc" diff --git a/tests/auto/qstringbuilder1/stringbuilder.cpp b/tests/auto/qstringbuilder1/stringbuilder.cpp index 2327ef55f9..de7ad656e4 100644 --- a/tests/auto/qstringbuilder1/stringbuilder.cpp +++ b/tests/auto/qstringbuilder1/stringbuilder.cpp @@ -133,6 +133,12 @@ void runScenario() QCOMPARE(r, string); r = string P ba; QCOMPARE(r, string); + + const char *zero = 0; + r = string P zero; + QCOMPARE(r, string); + r = zero P string; + QCOMPARE(r, string); #endif string = QString::fromLatin1(LITERAL); @@ -161,6 +167,12 @@ void runScenario() QCOMPARE(r, r2); r2 = QByteArray("hello\0") P UTF8_LITERAL; QCOMPARE(r, r2); + + const char *zero = 0; + r = ba P zero; + QCOMPARE(r, ba); + r = zero P ba; + QCOMPARE(r, ba); } //operator QString += diff --git a/tests/auto/qtcpserver/tst_qtcpserver.cpp b/tests/auto/qtcpserver/tst_qtcpserver.cpp index beeb6c7655..b566e5cebd 100644 --- a/tests/auto/qtcpserver/tst_qtcpserver.cpp +++ b/tests/auto/qtcpserver/tst_qtcpserver.cpp @@ -281,9 +281,6 @@ void tst_QTcpServer::dualStack_data() void tst_QTcpServer::dualStack() { -#ifdef QT_NO_IPV6 - QSKIP("test requires IPv6 support", SkipAll); -#else QFETCH_GLOBAL(bool, setProxy); if (setProxy) QSKIP("test server proxy doesn't support ipv6", SkipSingle); @@ -302,7 +299,6 @@ void tst_QTcpServer::dualStack() QCOMPARE(v4client.waitForConnected(5000), v4ok); QCOMPARE(v6client.waitForConnected(5000), v6ok); -#endif } //---------------------------------------------------------------------------------- diff --git a/tests/auto/qtextformat/tst_qtextformat.cpp b/tests/auto/qtextformat/tst_qtextformat.cpp index d70df6bf56..b235b112b6 100644 --- a/tests/auto/qtextformat/tst_qtextformat.cpp +++ b/tests/auto/qtextformat/tst_qtextformat.cpp @@ -226,7 +226,7 @@ void tst_QTextFormat::resolveFont() QVERIFY(fmt.font().underline()); QVERIFY(!fmt.hasProperty(QTextFormat::FontUnderline)); - // verify that deleting a non-existant property does not affect the font resolving + // verify that deleting a non-existent property does not affect the font resolving QVERIFY(!fmt.hasProperty(QTextFormat::BackgroundBrush)); fmt.clearProperty(QTextFormat::BackgroundBrush); @@ -235,7 +235,7 @@ void tst_QTextFormat::resolveFont() QVERIFY(!fmt.hasProperty(QTextFormat::FontUnderline)); QVERIFY(fmt.font().underline()); - // verify that deleting an existant but font _unrelated_ property does not affect the font resolving + // verify that deleting an existent but font _unrelated_ property does not affect the font resolving QVERIFY(fmt.hasProperty(QTextFormat::ForegroundBrush)); fmt.clearProperty(QTextFormat::ForegroundBrush); diff --git a/tests/auto/qtipc/qsharedmemory/src/qsystemlock.cpp b/tests/auto/qtipc/qsharedmemory/src/qsystemlock.cpp index f50bcd2e13..b48bd7bebe 100644 --- a/tests/auto/qtipc/qsharedmemory/src/qsystemlock.cpp +++ b/tests/auto/qtipc/qsharedmemory/src/qsystemlock.cpp @@ -124,7 +124,7 @@ systemLock.unlock(); } - If this is called from two seperate processes the resulting log file is + If this is called from two separate processes the resulting log file is guaranteed to contain both lines. When you call lock(), other threads or processes that try to call lock() diff --git a/tests/auto/qudpsocket/tst_qudpsocket.cpp b/tests/auto/qudpsocket/tst_qudpsocket.cpp index 03e224682f..ad7bfbb116 100644 --- a/tests/auto/qudpsocket/tst_qudpsocket.cpp +++ b/tests/auto/qudpsocket/tst_qudpsocket.cpp @@ -380,9 +380,6 @@ void tst_QUdpSocket::ipv6Loop_data() void tst_QUdpSocket::ipv6Loop() { -#if defined(QT_NO_IPV6) - QSKIP("IPv6 is not yet supported", SkipAll); -#endif QFETCH(QByteArray, peterMessage); QFETCH(QByteArray, paulMessage); QFETCH(bool, success); @@ -760,7 +757,7 @@ void tst_QUdpSocket::bindMode() // Depending on the user's privileges, this or will succeed or // fail. Admins are allowed to reuse the address, but nobody else. if (!socket2.bind(socket.localPort(), QUdpSocket::ReuseAddressHint), socket2.errorString().toLatin1().constData()) - qWarning("Failed to bind with QUdpSocket::ReuseAddressHint, user isn't an adminstrator?"); + qWarning("Failed to bind with QUdpSocket::ReuseAddressHint, user isn't an administrator?"); socket.close(); QVERIFY2(socket.bind(0, QUdpSocket::ShareAddress), socket.errorString().toLatin1().constData()); QVERIFY(!socket2.bind(socket.localPort())); diff --git a/tests/auto/qurl/tst_qurl.cpp b/tests/auto/qurl/tst_qurl.cpp index 4aa7185c17..d7f7742d46 100644 --- a/tests/auto/qurl/tst_qurl.cpp +++ b/tests/auto/qurl/tst_qurl.cpp @@ -201,6 +201,8 @@ private slots: void task_240612(); void taskQTBUG_6962(); void taskQTBUG_8701(); + void removeAllEncodedQueryItems_data(); + void removeAllEncodedQueryItems(); }; // Testing get/set functions @@ -4020,5 +4022,28 @@ void tst_QUrl::effectiveTLDs() QCOMPARE(domain.topLevelDomain(), TLD); } +void tst_QUrl::removeAllEncodedQueryItems_data() +{ + QTest::addColumn("url"); + QTest::addColumn("key"); + QTest::addColumn("result"); + + QTest::newRow("test1") << QUrl::fromEncoded("http://qt.nokia.com/foo?aaa=a&bbb=b&ccc=c") << QByteArray("bbb") << QUrl::fromEncoded("http://qt.nokia.com/foo?aaa=a&ccc=c"); + QTest::newRow("test2") << QUrl::fromEncoded("http://qt.nokia.com/foo?aaa=a&bbb=b&ccc=c") << QByteArray("aaa") << QUrl::fromEncoded("http://qt.nokia.com/foo?bbb=b&ccc=c"); +// QTest::newRow("test3") << QUrl::fromEncoded("http://qt.nokia.com/foo?aaa=a&bbb=b&ccc=c") << QByteArray("ccc") << QUrl::fromEncoded("http://qt.nokia.com/foo?aaa=a&bbb=b"); + QTest::newRow("test4") << QUrl::fromEncoded("http://qt.nokia.com/foo?aaa=a&bbb=b&ccc=c") << QByteArray("b%62b") << QUrl::fromEncoded("http://qt.nokia.com/foo?aaa=a&bbb=b&ccc=c"); + QTest::newRow("test5") << QUrl::fromEncoded("http://qt.nokia.com/foo?aaa=a&b%62b=b&ccc=c") << QByteArray("b%62b") << QUrl::fromEncoded("http://qt.nokia.com/foo?aaa=a&ccc=c"); + QTest::newRow("test6") << QUrl::fromEncoded("http://qt.nokia.com/foo?aaa=a&b%62b=b&ccc=c") << QByteArray("bbb") << QUrl::fromEncoded("http://qt.nokia.com/foo?aaa=a&b%62b=b&ccc=c"); +} + +void tst_QUrl::removeAllEncodedQueryItems() +{ + QFETCH(QUrl, url); + QFETCH(QByteArray, key); + QFETCH(QUrl, result); + url.removeAllEncodedQueryItems(key); + QCOMPARE(url, result); +} + QTEST_MAIN(tst_QUrl) #include "tst_qurl.moc" diff --git a/tests/arthur/baselineserver/.gitignore b/tests/baselineserver/.gitignore similarity index 100% rename from tests/arthur/baselineserver/.gitignore rename to tests/baselineserver/.gitignore diff --git a/tests/arthur/baselineserver/bin/runserver b/tests/baselineserver/bin/runserver similarity index 100% rename from tests/arthur/baselineserver/bin/runserver rename to tests/baselineserver/bin/runserver diff --git a/tests/arthur/common/baselineprotocol.cpp b/tests/baselineserver/shared/baselineprotocol.cpp similarity index 100% rename from tests/arthur/common/baselineprotocol.cpp rename to tests/baselineserver/shared/baselineprotocol.cpp diff --git a/tests/arthur/common/baselineprotocol.h b/tests/baselineserver/shared/baselineprotocol.h similarity index 100% rename from tests/arthur/common/baselineprotocol.h rename to tests/baselineserver/shared/baselineprotocol.h diff --git a/tests/arthur/common/baselineprotocol.pri b/tests/baselineserver/shared/baselineprotocol.pri similarity index 100% rename from tests/arthur/common/baselineprotocol.pri rename to tests/baselineserver/shared/baselineprotocol.pri diff --git a/tests/arthur/common/lookup3.cpp b/tests/baselineserver/shared/lookup3.cpp similarity index 100% rename from tests/arthur/common/lookup3.cpp rename to tests/baselineserver/shared/lookup3.cpp diff --git a/tests/arthur/common/qbaselinetest.cpp b/tests/baselineserver/shared/qbaselinetest.cpp similarity index 100% rename from tests/arthur/common/qbaselinetest.cpp rename to tests/baselineserver/shared/qbaselinetest.cpp diff --git a/tests/arthur/common/qbaselinetest.h b/tests/baselineserver/shared/qbaselinetest.h similarity index 100% rename from tests/arthur/common/qbaselinetest.h rename to tests/baselineserver/shared/qbaselinetest.h diff --git a/tests/arthur/common/qbaselinetest.pri b/tests/baselineserver/shared/qbaselinetest.pri similarity index 100% rename from tests/arthur/common/qbaselinetest.pri rename to tests/baselineserver/shared/qbaselinetest.pri diff --git a/tests/arthur/baselineserver/src/baselineserver.cpp b/tests/baselineserver/src/baselineserver.cpp similarity index 100% rename from tests/arthur/baselineserver/src/baselineserver.cpp rename to tests/baselineserver/src/baselineserver.cpp diff --git a/tests/arthur/baselineserver/src/baselineserver.h b/tests/baselineserver/src/baselineserver.h similarity index 100% rename from tests/arthur/baselineserver/src/baselineserver.h rename to tests/baselineserver/src/baselineserver.h diff --git a/tests/arthur/baselineserver/src/baselineserver.pro b/tests/baselineserver/src/baselineserver.pro similarity index 91% rename from tests/arthur/baselineserver/src/baselineserver.pro rename to tests/baselineserver/src/baselineserver.pro index 770662b5fd..b59d59d1ed 100644 --- a/tests/arthur/baselineserver/src/baselineserver.pro +++ b/tests/baselineserver/src/baselineserver.pro @@ -16,7 +16,7 @@ CONFIG -= app_bundle TEMPLATE = app -include(../../common/baselineprotocol.pri) +include(../shared/baselineprotocol.pri) SOURCES += main.cpp \ baselineserver.cpp \ diff --git a/tests/arthur/baselineserver/src/baselineserver.qrc b/tests/baselineserver/src/baselineserver.qrc similarity index 100% rename from tests/arthur/baselineserver/src/baselineserver.qrc rename to tests/baselineserver/src/baselineserver.qrc diff --git a/tests/arthur/baselineserver/src/main.cpp b/tests/baselineserver/src/main.cpp similarity index 100% rename from tests/arthur/baselineserver/src/main.cpp rename to tests/baselineserver/src/main.cpp diff --git a/tests/arthur/baselineserver/src/report.cpp b/tests/baselineserver/src/report.cpp similarity index 100% rename from tests/arthur/baselineserver/src/report.cpp rename to tests/baselineserver/src/report.cpp diff --git a/tests/arthur/baselineserver/src/report.h b/tests/baselineserver/src/report.h similarity index 100% rename from tests/arthur/baselineserver/src/report.h rename to tests/baselineserver/src/report.h diff --git a/tests/arthur/baselineserver/src/templates/view.html b/tests/baselineserver/src/templates/view.html similarity index 100% rename from tests/arthur/baselineserver/src/templates/view.html rename to tests/baselineserver/src/templates/view.html diff --git a/tests/manual/lance/README b/tests/manual/lance/README new file mode 100644 index 0000000000..6e89b29b08 --- /dev/null +++ b/tests/manual/lance/README @@ -0,0 +1,6 @@ +The "lance" tool can be used to edit and run QPainter script (.qps) +files. They are used in the "lancelot" qpainter regression autotest. +A collection of scripts can be found in the directory +tests/auto/lancelot/scripts + +See lance -help for options. diff --git a/tests/arthur/lance/enum.png b/tests/manual/lance/enum.png similarity index 100% rename from tests/arthur/lance/enum.png rename to tests/manual/lance/enum.png diff --git a/tests/arthur/lance/icons.qrc b/tests/manual/lance/icons.qrc similarity index 100% rename from tests/arthur/lance/icons.qrc rename to tests/manual/lance/icons.qrc diff --git a/tests/arthur/lance/interactivewidget.cpp b/tests/manual/lance/interactivewidget.cpp similarity index 100% rename from tests/arthur/lance/interactivewidget.cpp rename to tests/manual/lance/interactivewidget.cpp diff --git a/tests/arthur/lance/interactivewidget.h b/tests/manual/lance/interactivewidget.h similarity index 100% rename from tests/arthur/lance/interactivewidget.h rename to tests/manual/lance/interactivewidget.h diff --git a/tests/manual/lance/lance.pro b/tests/manual/lance/lance.pro new file mode 100644 index 0000000000..a3fa27f77f --- /dev/null +++ b/tests/manual/lance/lance.pro @@ -0,0 +1,26 @@ +LANCELOT_DIR = $$PWD/../../auto/lancelot +CONFIG+=console moc +TEMPLATE = app +INCLUDEPATH += . $$LANCELOT_DIR +QT += core-private gui-private + +# Input +HEADERS += widgets.h \ + interactivewidget.h \ + $$LANCELOT_DIR/paintcommands.h +SOURCES += interactivewidget.cpp \ + main.cpp \ + $$LANCELOT_DIR/paintcommands.cpp +RESOURCES += icons.qrc \ + $$LANCELOT_DIR/images.qrc + +contains(QT_CONFIG, opengl)|contains(QT_CONFIG, opengles1)|contains(QT_CONFIG, opengles2):QT += opengl + +symbian*: { + testData.files = $$QT_BUILD_TREE/tests/auto/lancelot/scripts + testData.path = . + DEPLOYMENT += testData +} + + + diff --git a/tests/arthur/lance/main.cpp b/tests/manual/lance/main.cpp similarity index 100% rename from tests/arthur/lance/main.cpp rename to tests/manual/lance/main.cpp diff --git a/tests/arthur/lance/tools.png b/tests/manual/lance/tools.png similarity index 100% rename from tests/arthur/lance/tools.png rename to tests/manual/lance/tools.png diff --git a/tests/arthur/lance/widgets.h b/tests/manual/lance/widgets.h similarity index 100% rename from tests/arthur/lance/widgets.h rename to tests/manual/lance/widgets.h diff --git a/tools/configure/configure_pch.h b/tools/configure/configure_pch.h index 33da5f69f2..edf7c04dff 100644 --- a/tools/configure/configure_pch.h +++ b/tools/configure/configure_pch.h @@ -47,9 +47,7 @@ # undef _POSIX_ /* Don't polute */ /* Make sure IP v6 is defined first of all, before windows.h */ -# ifndef QT_NO_IPV6 # include -# endif # include #endif diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index f241160e26..cde4ddd833 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -341,7 +341,6 @@ Configure::Configure(int& argc, char** argv) dictionary[ "ACCESSIBILITY" ] = "yes"; dictionary[ "OPENGL" ] = "yes"; dictionary[ "OPENVG" ] = "no"; - dictionary[ "IPV6" ] = "yes"; // Always, dynamically loaded dictionary[ "OPENSSL" ] = "auto"; dictionary[ "DBUS" ] = "auto"; dictionary[ "S60" ] = "yes"; @@ -1555,8 +1554,6 @@ void Configure::applySpecSpecifics() dictionary[ "QT3SUPPORT" ] = "no"; dictionary[ "OPENGL" ] = "no"; dictionary[ "OPENSSL" ] = "yes"; - // On Symbian we now always will have IPv6 with no chance to disable it - dictionary[ "IPV6" ] = "yes"; dictionary[ "STL" ] = "yes"; dictionary[ "EXCEPTIONS" ] = "yes"; dictionary[ "RTTI" ] = "yes"; @@ -2435,7 +2432,6 @@ bool Configure::verifyConfiguration() nis nas tablet - ipv6 X11 : x11sm xinerama xcursor xfixes xrandr xrender fontconfig xkb Embedded: embedded freetype @@ -2710,11 +2706,6 @@ void Configure::generateOutputVars() else if (dictionary[ "DBUS" ] == "linked") qtConfig += "dbus dbus-linked"; - if (dictionary["IPV6"] == "yes") - qtConfig += "ipv6"; - else if (dictionary["IPV6"] == "no") - qtConfig += "no-ipv6"; - if (dictionary[ "CETEST" ] == "yes") qtConfig += "cetest"; @@ -3188,7 +3179,6 @@ void Configure::generateConfigfiles() if (dictionary["OPENSSL"] == "no") qconfigList += "QT_NO_OPENSSL"; if (dictionary["OPENSSL"] == "linked") qconfigList += "QT_LINKED_OPENSSL"; if (dictionary["DBUS"] == "no") qconfigList += "QT_NO_DBUS"; - if (dictionary["IPV6"] == "no") qconfigList += "QT_NO_IPV6"; if (dictionary["WEBKIT"] == "no") qconfigList += "QT_NO_WEBKIT"; if (dictionary["DECLARATIVE"] == "no") qconfigList += "QT_NO_DECLARATIVE"; if (dictionary["DECLARATIVE_DEBUG"] == "no") qconfigList += "QDECLARATIVE_NO_DEBUG_PROTOCOL";