diff options
author | Martin Jones <martin.jones@nokia.com> | 2009-09-08 00:14:12 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2009-09-08 00:14:12 (GMT) |
commit | f6c08f5e68c90338a8402c0912cd6be72e84b1e6 (patch) | |
tree | d928f975e686b752cd1fc47eca812f376d9d0a03 | |
parent | 276a44c0867a76a90b425baa8dcbda733d25b3fb (diff) | |
parent | 0cbbc9cb9e87a3a39ee1597f4cea1c2b77d8f8da (diff) | |
download | Qt-f6c08f5e68c90338a8402c0912cd6be72e84b1e6.zip Qt-f6c08f5e68c90338a8402c0912cd6be72e84b1e6.tar.gz Qt-f6c08f5e68c90338a8402c0912cd6be72e84b1e6.tar.bz2 |
Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into kinetic-declarativeui
372 files changed, 4245 insertions, 4807 deletions
diff --git a/bin/createpackage.bat b/bin/createpackage.bat index b5ede18..87d094f 100644 --- a/bin/createpackage.bat +++ b/bin/createpackage.bat @@ -1,3 +1,44 @@ +::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +:: +:: Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +:: Contact: Nokia Corporation (qt-info@nokia.com) +:: +:: This file is part of the test suite of the Qt Toolkit. +:: +:: $QT_BEGIN_LICENSE:LGPL$ +:: No Commercial Usage +:: This file contains pre-release code and may not be distributed. +:: You may use this file in accordance with the terms and conditions +:: contained in the Technology Preview License Agreement accompanying +:: this package. +:: +:: GNU Lesser General Public License Usage +:: Alternatively, this file may be used under the terms of the GNU Lesser +:: General Public License version 2.1 as published by the Free Software +:: Foundation and appearing in the file LICENSE.LGPL included in the +:: packaging of this file. Please review the following information to +:: ensure the GNU Lesser General Public License version 2.1 requirements +:: will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +:: +:: In addition, as a special exception, Nokia gives you certain +:: additional rights. These rights are described in the Nokia Qt LGPL +:: Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this +:: package. +:: +:: If you have questions regarding the use of this file, please contact +:: Nokia at qt-info@nokia.com. +:: +:: +:: +:: +:: +:: +:: +:: +:: $QT_END_LICENSE$ +:: +::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: + @echo off set scriptpath=%~dp0 -perl %scriptpath%createpackage.pl %*
\ No newline at end of file +perl %scriptpath%createpackage.pl %* diff --git a/bin/createpackage.pl b/bin/createpackage.pl index a180864..1a83abb 100644 --- a/bin/createpackage.pl +++ b/bin/createpackage.pl @@ -1,11 +1,49 @@ -#!\usr\bin\perl +#!/usr/bin/perl +############################################################################# +## +## Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +## Contact: Nokia Corporation (qt-info@nokia.com) +## +## This file is part of the S60 port of the Qt Toolkit. +## +## $QT_BEGIN_LICENSE:LGPL$ +## No Commercial Usage +## This file contains pre-release code and may not be distributed. +## You may use this file in accordance with the terms and conditions +## contained in the Technology Preview License Agreement accompanying +## this package. +## +## GNU Lesser General Public License Usage +## Alternatively, this file may be used under the terms of the GNU Lesser +## General Public License version 2.1 as published by the Free Software +## Foundation and appearing in the file LICENSE.LGPL included in the +## packaging of this file. Please review the following information to +## ensure the GNU Lesser General Public License version 2.1 requirements +## will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +## +## In addition, as a special exception, Nokia gives you certain +## additional rights. These rights are described in the Nokia Qt LGPL +## Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this +## package. +## +## If you have questions regarding the use of this file, please contact +## Nokia at qt-info@nokia.com. +## +## +## +## +## +## +## +## +## $QT_END_LICENSE$ +## +############################################################################# + ############################################################################################ # # Convenience script for creating signed packages you can install on your phone. # -# Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -# Contact: Qt Software Information (qt-info@nokia.com) -# ############################################################################################ use strict; @@ -14,42 +52,70 @@ use strict; use Getopt::Long; # Use file name parsing module use File::Basename; +# Use File::Spec services mainly rel2abs +use File::Spec; +# use CWD abs_bath, which is exported only on request +use Cwd 'abs_path'; + sub Usage() { - print "\n"; - print "==========================================================================================\n"; - print "Convenience script for creating signed packages you can install on your phone.\n"; - print "\n"; - print "Usage: createpackage.pl [-i] templatepkg target-platform [certificate key [passphrase]]\n"; - print "\n"; - print "Where parameters are as follows:\n"; - print " [-i|install] = Install the package right away using PC suite\n"; - print " [-p|preprocess] = Only preprocess the template .pkg file.\n"; - print " templatepkg = Name of .pkg file template\n"; - print " target = Either debug or release\n"; - print " platform = One of the supported platform\n"; - print " winscw | gcce | armv5 | armv6 | armv7\n"; - print " certificate = The certificate file used for signing\n"; - print " key = The certificate's private key file\n"; - print " passphrase = The certificate's private key file's passphrase\n"; - print "\n"; - print "For example:\n"; - print " createpackage.pl fluidlauncher_template.pkg release-armv5\n"; - print "\n"; - print "If no certificate and key files are provided, either a RnD certificate or\n"; - print "a self-signed certificate from Qt installation root directory is used.\n"; - print "\n"; - print "==========================================================================================\n"; + print <<ENDUSAGESTRING; + +============================================================================================== +Convenience script for creating signed packages you can install on your phone. + +Usage: createpackage.pl [options] templatepkg target-platform [certificate key [passphrase]] + +Where supported optiobns are as follows: + [-i|install] = Install the package right away using PC suite + [-p|preprocess] = Only preprocess the template .pkg file. + [-c|certfile=<file>] = The file containing certificate information for signing. + The file can have several certificates, each specified in + separate line. The certificate, key and passphrase in line + must be ';' separated. Lines starting with '#' are treated + as a comments. Also empty lines are ignored. The paths in + <file> can be absolute or relative to <file>. +Where parameters are as follows: + templatepkg = Name of .pkg file template + target = Either debug or release + platform = One of the supported platform + winscw | gcce | armv5 | armv6 | armv7 + certificate = The certificate file used for signing + key = The certificate's private key file + passphrase = The certificate's private key file's passphrase + +Example: + createpackage.pl fluidlauncher_template.pkg release-armv5 + +Example with certfile: + createpackage.pl -c=mycerts.txt fluidlauncher_template.pkg release-armv5 + + Content of 'mycerts.txt' must be something like this: + # This is comment line, also the empty lines are ignored + rd.cer;rd-key.pem + .\\cert\\mycert.cer;.\\cert\\mykey.key;yourpassword + X:\\QtS60\\selfsigned.cer;X:\\QtS60\\selfsigned.key + +If no certificate and key files are provided, either a RnD certificate or +a self-signed certificate from Qt installation root directory is used. +============================================================================================== + +ENDUSAGESTRING + exit(); } # Read given options my $install = ""; my $preprocessonly = ""; -unless (GetOptions('i|install' => \$install, 'p|preprocess' => \$preprocessonly)){ +my $certfile = ""; + +unless (GetOptions('i|install' => \$install, 'p|preprocess' => \$preprocessonly, 'c|certfile=s' => \$certfile)){ Usage(); } +my $certfilepath = abs_path(dirname($certfile)); + # Read params to variables my $templatepkg = $ARGV[0]; my $targetplatform = lc $ARGV[1]; @@ -117,6 +183,32 @@ if (length($certificate)) { } } +# Read the certificates from file to two dimensional array +my @certificates; +if (length($certfile)) { + open CERTFILE, "<$certfile" or die $!; + while(<CERTFILE>){ + s/#.*//; # ignore comments by erasing them + next if /^(\s)*$/; # skip blank lines + chomp; # remove trailing newline characters + my @certinfo = split(';', $_); # split row to certinfo + + # Trim spaces + for(@certinfo) { + s/^\s+//; + s/\s+$//; + } + + # Do some validation + unless(scalar(@certinfo) >= 2 && scalar(@certinfo) <= 3 && length($certinfo[0]) && length($certinfo[1]) ) { + print "\nError: $certfile line '$_' does not contain valid information!\n"; + Usage(); + } + + push @certificates, [@certinfo]; # push data to two dimensional array + } +} + # Remove any existing .sis packages unlink $unsigned_sis_name; unlink $signed_sis_name; @@ -142,15 +234,27 @@ if ($preprocessonly) { exit; } -# Create and sign SIS +# Create SIS. system ("makesis $pkgoutput $unsigned_sis_name"); + +# Sign SIS with certificate info given as an argument. system ("signsis $unsigned_sis_name $signed_sis_name $certificate $key $passphrase"); # Check if creating signed SIS Succeeded stat($signed_sis_name); if( -e _ ) { - print ("\nSuccessfully created $signed_sis_name using certificate $certtext!\n"); + print ("\nSuccessfully created $signed_sis_name using certificate: $certtext!\n"); + # Sign with additional certificates & keys + for my $row ( @certificates ) { + # Get certificate absolute file names, relative paths are relative to certfilepath + my $abscert = File::Spec->rel2abs( $row->[0], $certfilepath); + my $abskey = File::Spec->rel2abs( $row->[1], $certfilepath); + + system ("signsis $signed_sis_name $signed_sis_name $abscert $abskey $row->[2]"); + print ("\tAdditionally signed the SIS with certificate: $row->[0]!\n"); + } + # remove temporary pkg and unsigned sis unlink $pkgoutput; unlink $unsigned_sis_name; diff --git a/bin/patch_capabilities.pl b/bin/patch_capabilities.pl index cf8353e..8140207 100644 --- a/bin/patch_capabilities.pl +++ b/bin/patch_capabilities.pl @@ -1,10 +1,49 @@ +#!/usr/bin/perl +############################################################################# +## +## Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +## Contact: Nokia Corporation (qt-info@nokia.com) +## +## This file is part of the S60 port of the Qt Toolkit. +## +## $QT_BEGIN_LICENSE:LGPL$ +## No Commercial Usage +## This file contains pre-release code and may not be distributed. +## You may use this file in accordance with the terms and conditions +## contained in the Technology Preview License Agreement accompanying +## this package. +## +## GNU Lesser General Public License Usage +## Alternatively, this file may be used under the terms of the GNU Lesser +## General Public License version 2.1 as published by the Free Software +## Foundation and appearing in the file LICENSE.LGPL included in the +## packaging of this file. Please review the following information to +## ensure the GNU Lesser General Public License version 2.1 requirements +## will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +## +## In addition, as a special exception, Nokia gives you certain +## additional rights. These rights are described in the Nokia Qt LGPL +## Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this +## package. +## +## If you have questions regarding the use of this file, please contact +## Nokia at qt-info@nokia.com. +## +## +## +## +## +## +## +## +## $QT_END_LICENSE$ +## +############################################################################# + ####################################################################### # # A script for setting binary capabilities based on .pkg file contents. # -# Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies). -# Contact: Nokia Corporation (qt-info@nokia.com) -# ####################################################################### sub Usage() { @@ -3889,7 +3889,7 @@ elif [ "$Edition" = "OpenSource" ]; then while true; do echo "You are licensed to use this software under the terms of" echo "the Lesser GNU General Public License (LGPL) versions 2.1." - if [ -e "$relpath/LICENSE.GPL3" ]; then + if [ -f "$relpath/LICENSE.GPL3" ]; then echo "You are also licensed to use this software under the terms of" echo "the GNU General Public License (GPL) versions 3." affix="either" @@ -3901,7 +3901,7 @@ elif [ "$Edition" = "OpenSource" ]; then echo "You have already accepted the terms of the $LicenseType license." acceptance=yes else - if [ -e "$relpath/LICENSE.GPL3" ]; then + if [ -f "$relpath/LICENSE.GPL3" ]; then echo "Type '3' to view the GNU General Public License version 3." fi echo "Type 'L' to view the Lesser GNU General Public License version 2.1." diff --git a/demos/boxes/glbuffers.cpp b/demos/boxes/glbuffers.cpp index a3d26f6..3b16d17 100644 --- a/demos/boxes/glbuffers.cpp +++ b/demos/boxes/glbuffers.cpp @@ -372,7 +372,7 @@ void GLRenderTargetCube::getViewMatrix(QMatrix4x4& mat, int face) {-1.0f, -1.0f, +1.0f}, }; - memset(mat.data(), 0, sizeof(float) * 16); + mat.fill(0.0f); for (int i = 0; i < 3; ++i) mat(i, perm[face][i]) = signs[face][i]; mat(3, 3) = 1.0f; diff --git a/demos/boxes/scene.cpp b/demos/boxes/scene.cpp index 2a7ca0e..0975fc5 100644 --- a/demos/boxes/scene.cpp +++ b/demos/boxes/scene.cpp @@ -649,6 +649,24 @@ void Scene::initGL() m_renderOptions->emitParameterChanged(); } +static void loadMatrix(const QMatrix4x4& m) +{ + GLfloat mat[16]; + const qreal *data = m.constData(); + for (int index = 0; index < 16; ++index) + mat[index] = data[index]; + glLoadMatrixf(mat); +} + +static void multMatrix(const QMatrix4x4& m) +{ + GLfloat mat[16]; + const qreal *data = m.constData(); + for (int index = 0; index < 16; ++index) + mat[index] = data[index]; + glMultMatrixf(mat); +} + // If one of the boxes should not be rendered, set excludeBox to its index. // If the main box should not be rendered, set excludeBox to -1. void Scene::renderBoxes(const QMatrix4x4 &view, int excludeBox) @@ -673,7 +691,7 @@ void Scene::renderBoxes(const QMatrix4x4 &view, int excludeBox) viewRotation(3, 0) = viewRotation(3, 1) = viewRotation(3, 2) = 0.0f; viewRotation(0, 3) = viewRotation(1, 3) = viewRotation(2, 3) = 0.0f; viewRotation(3, 3) = 1.0f; - glLoadMatrixf(viewRotation.data()); + loadMatrix(viewRotation); glScalef(20.0f, 20.0f, 20.0f); // Don't render the environment if the environment texture can't be set for the correct sampler. @@ -688,7 +706,7 @@ void Scene::renderBoxes(const QMatrix4x4 &view, int excludeBox) m_environment->unbind(); } - glLoadMatrixf(view.data()); + loadMatrix(view); glEnable(GL_CULL_FACE); glEnable(GL_LIGHTING); @@ -700,9 +718,7 @@ void Scene::renderBoxes(const QMatrix4x4 &view, int excludeBox) glPushMatrix(); QMatrix4x4 m; m.rotate(m_trackBalls[1].rotation()); - m = m.transposed(); - - glMultMatrixf(m.data()); + multMatrix(m); glRotatef(360.0f * i / m_programs.size(), 0.0f, 0.0f, 1.0f); glTranslatef(2.0f, 0.0f, 0.0f); @@ -735,8 +751,7 @@ void Scene::renderBoxes(const QMatrix4x4 &view, int excludeBox) if (-1 != excludeBox) { QMatrix4x4 m; m.rotate(m_trackBalls[0].rotation()); - m = m.transposed(); - glMultMatrixf(m.data()); + multMatrix(m); if (glActiveTexture) { if (m_dynamicCubemap) @@ -842,7 +857,7 @@ void Scene::renderCubemaps() glMatrixMode(GL_PROJECTION); glPushMatrix(); - glLoadMatrixf(mat.data()); + loadMatrix(mat); glMatrixMode(GL_MODELVIEW); glPushMatrix(); @@ -862,7 +877,7 @@ void Scene::renderCubemaps() GLRenderTargetCube::getViewMatrix(mat, face); QVector4D v = QVector4D(-center.x(), -center.y(), -center.z(), 1.0); - mat.setColumn(3, v * mat); + mat.setColumn(3, mat * v); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); renderBoxes(mat, i); diff --git a/demos/boxes/trackball.cpp b/demos/boxes/trackball.cpp index 9898441..60de6af 100644 --- a/demos/boxes/trackball.cpp +++ b/demos/boxes/trackball.cpp @@ -92,9 +92,9 @@ void TrackBall::move(const QPointF& p, const QQuaternion &transformation) { QLineF delta(m_lastPos, p); m_angularVelocity = 180*delta.length() / (PI*msecs); - m_axis = QVector3D(delta.dy(), -delta.dx(), 0.0f).normalized(); + m_axis = QVector3D(-delta.dy(), delta.dx(), 0.0f).normalized(); m_axis = transformation.rotateVector(m_axis); - m_rotation *= QQuaternion::fromAxisAndAngle(m_axis, delta.length()); + m_rotation = QQuaternion::fromAxisAndAngle(m_axis, 180 / PI * delta.length()) * m_rotation; } break; case Sphere: @@ -113,13 +113,13 @@ void TrackBall::move(const QPointF& p, const QQuaternion &transformation) else currentPos3D.normalize(); - m_axis = QVector3D::crossProduct(currentPos3D, lastPos3D); - float angle = asin(sqrt(QVector3D::dotProduct(m_axis, m_axis))); + m_axis = QVector3D::crossProduct(lastPos3D, currentPos3D); + float angle = 180 / PI * asin(sqrt(QVector3D::dotProduct(m_axis, m_axis))); - m_angularVelocity = 180*angle / (PI*msecs); + m_angularVelocity = angle / msecs; m_axis.normalize(); m_axis = transformation.rotateVector(m_axis); - m_rotation *= QQuaternion::fromAxisAndAngle(m_axis, angle); + m_rotation = QQuaternion::fromAxisAndAngle(m_axis, angle) * m_rotation; } break; } @@ -155,6 +155,6 @@ QQuaternion TrackBall::rotation() const QTime currentTime = QTime::currentTime(); float angle = m_angularVelocity * m_lastTime.msecsTo(currentTime); - return m_rotation * QQuaternion::fromAxisAndAngle(m_axis, angle); + return QQuaternion::fromAxisAndAngle(m_axis, angle) * m_rotation; } diff --git a/demos/embedded/fluidlauncher/pictureflow.cpp b/demos/embedded/fluidlauncher/pictureflow.cpp index 9eeaa26..293ef99 100644 --- a/demos/embedded/fluidlauncher/pictureflow.cpp +++ b/demos/embedded/fluidlauncher/pictureflow.cpp @@ -3,10 +3,6 @@ ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtGui module of the Qt Toolkit. -** -** This is a version of the Pictureflow animated image show widget modified by Nokia. -** ** This file is part of the ActiveQt framework of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ diff --git a/demos/embedded/fluidlauncher/pictureflow.h b/demos/embedded/fluidlauncher/pictureflow.h index 7ae2a88..8fc145c 100644 --- a/demos/embedded/fluidlauncher/pictureflow.h +++ b/demos/embedded/fluidlauncher/pictureflow.h @@ -3,7 +3,7 @@ ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This is a version of the Pictureflow animated image show widget modified by Nokia. +** This file is part of the ActiveQt framework of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/demos/qtdemo/colors.cpp b/demos/qtdemo/colors.cpp index e63417c..455ba0c 100644 --- a/demos/qtdemo/colors.cpp +++ b/demos/qtdemo/colors.cpp @@ -274,6 +274,8 @@ void Colors::parseArgs(int argc, char *argv[]) + "[-low] [-ticker-letters<int>] [-ticker-speed<float>] [-no-ticker-morph] " + "[-ticker-morph-speed<float>] [-ticker-text<string>]"); exit(0); + } else if (s == "-verbose") { + // this option was already handled above } else{ QMessageBox::warning(0, "QtDemo", QString("Unrecognized argument:\n") + s); exit(0); diff --git a/demos/qtdemo/menumanager.cpp b/demos/qtdemo/menumanager.cpp index 12796dc..88eaeb3 100644 --- a/demos/qtdemo/menumanager.cpp +++ b/demos/qtdemo/menumanager.cpp @@ -324,9 +324,10 @@ void MenuManager::launchExample(const QString &name) #ifdef Q_OS_WIN //make sure it finds the dlls on windows - QString curpath = QString::fromLocal8Bit(qgetenv("PATH").constData()); - QString newpath = QString("PATH=%1;%2").arg(QLibraryInfo::location(QLibraryInfo::BinariesPath), curpath); - process->setEnvironment(QStringList(newpath)); + QProcessEnvironment env = QProcessEnvironment::systemEnvironment(); + env.insert(QLatin1String("PATH"), QLibraryInfo::location(QLibraryInfo::BinariesPath) + + QLatin1Char(';') + env.value(QLatin1String("Path"))); + process->setProcessEnvironment(env); #endif if (info[name]["changedirectory"] != "false"){ diff --git a/demos/qtdemo/xml/examples.xml b/demos/qtdemo/xml/examples.xml index 77006c2..b545e1d 100644 --- a/demos/qtdemo/xml/examples.xml +++ b/demos/qtdemo/xml/examples.xml @@ -25,7 +25,7 @@ <example filename="appchooser" name="Appchooser" /> <example filename="easing" name="Easing Curves" /> <example filename="moveblocks" name="Moving Blocks" /> - <example filename="states" name="UI States" /> + <example filename="states" name="States" /> <example filename="stickman" name="Stickman" /> </category> <category dirname="qtconcurrent" name="Concurrent Programming"> diff --git a/doc/src/diagrams/contentspropagation/customwidget.py b/doc/src/diagrams/contentspropagation/customwidget.py index 89e0b1b..68d64e5 100755 --- a/doc/src/diagrams/contentspropagation/customwidget.py +++ b/doc/src/diagrams/contentspropagation/customwidget.py @@ -1,4 +1,44 @@ #!/usr/bin/env python +############################################################################# +## +## Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +## Contact: Nokia Corporation (qt-info@nokia.com) +## +## This file is part of the test suite of the Qt Toolkit. +## +## $QT_BEGIN_LICENSE:LGPL$ +## No Commercial Usage +## This file contains pre-release code and may not be distributed. +## You may use this file in accordance with the terms and conditions +## contained in the Technology Preview License Agreement accompanying +## this package. +## +## GNU Lesser General Public License Usage +## Alternatively, this file may be used under the terms of the GNU Lesser +## General Public License version 2.1 as published by the Free Software +## Foundation and appearing in the file LICENSE.LGPL included in the +## packaging of this file. Please review the following information to +## ensure the GNU Lesser General Public License version 2.1 requirements +## will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +## +## In addition, as a special exception, Nokia gives you certain +## additional rights. These rights are described in the Nokia Qt LGPL +## Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this +## package. +## +## If you have questions regarding the use of this file, please contact +## Nokia at qt-info@nokia.com. +## +## +## +## +## +## +## +## +## $QT_END_LICENSE$ +## +############################################################################# import os, sys from PyQt4.QtCore import * diff --git a/doc/src/diagrams/contentspropagation/standardwidgets.py b/doc/src/diagrams/contentspropagation/standardwidgets.py index 975287d..fb5796e 100755 --- a/doc/src/diagrams/contentspropagation/standardwidgets.py +++ b/doc/src/diagrams/contentspropagation/standardwidgets.py @@ -1,4 +1,44 @@ #!/usr/bin/env python +############################################################################# +## +## Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +## Contact: Nokia Corporation (qt-info@nokia.com) +## +## This file is part of the test suite of the Qt Toolkit. +## +## $QT_BEGIN_LICENSE:LGPL$ +## No Commercial Usage +## This file contains pre-release code and may not be distributed. +## You may use this file in accordance with the terms and conditions +## contained in the Technology Preview License Agreement accompanying +## this package. +## +## GNU Lesser General Public License Usage +## Alternatively, this file may be used under the terms of the GNU Lesser +## General Public License version 2.1 as published by the Free Software +## Foundation and appearing in the file LICENSE.LGPL included in the +## packaging of this file. Please review the following information to +## ensure the GNU Lesser General Public License version 2.1 requirements +## will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +## +## In addition, as a special exception, Nokia gives you certain +## additional rights. These rights are described in the Nokia Qt LGPL +## Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this +## package. +## +## If you have questions regarding the use of this file, please contact +## Nokia at qt-info@nokia.com. +## +## +## +## +## +## +## +## +## $QT_END_LICENSE$ +## +############################################################################# import os, sys from PyQt4.QtCore import * diff --git a/doc/src/diagrams/programs/mdiarea.py b/doc/src/diagrams/programs/mdiarea.py index c78659f..c336382 100644 --- a/doc/src/diagrams/programs/mdiarea.py +++ b/doc/src/diagrams/programs/mdiarea.py @@ -1,4 +1,44 @@ #!/usr/bin/env python +############################################################################# +## +## Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +## Contact: Nokia Corporation (qt-info@nokia.com) +## +## This file is part of the test suite of the Qt Toolkit. +## +## $QT_BEGIN_LICENSE:LGPL$ +## No Commercial Usage +## This file contains pre-release code and may not be distributed. +## You may use this file in accordance with the terms and conditions +## contained in the Technology Preview License Agreement accompanying +## this package. +## +## GNU Lesser General Public License Usage +## Alternatively, this file may be used under the terms of the GNU Lesser +## General Public License version 2.1 as published by the Free Software +## Foundation and appearing in the file LICENSE.LGPL included in the +## packaging of this file. Please review the following information to +## ensure the GNU Lesser General Public License version 2.1 requirements +## will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +## +## In addition, as a special exception, Nokia gives you certain +## additional rights. These rights are described in the Nokia Qt LGPL +## Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this +## package. +## +## If you have questions regarding the use of this file, please contact +## Nokia at qt-info@nokia.com. +## +## +## +## +## +## +## +## +## $QT_END_LICENSE$ +## +############################################################################# import sys from PyQt4.QtCore import SIGNAL diff --git a/doc/src/diagrams/programs/qpen-dashpattern.py b/doc/src/diagrams/programs/qpen-dashpattern.py index 095d51f..24a793e 100644 --- a/doc/src/diagrams/programs/qpen-dashpattern.py +++ b/doc/src/diagrams/programs/qpen-dashpattern.py @@ -1,4 +1,44 @@ #!/usr/bin/env python +############################################################################# +## +## Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +## Contact: Nokia Corporation (qt-info@nokia.com) +## +## This file is part of the test suite of the Qt Toolkit. +## +## $QT_BEGIN_LICENSE:LGPL$ +## No Commercial Usage +## This file contains pre-release code and may not be distributed. +## You may use this file in accordance with the terms and conditions +## contained in the Technology Preview License Agreement accompanying +## this package. +## +## GNU Lesser General Public License Usage +## Alternatively, this file may be used under the terms of the GNU Lesser +## General Public License version 2.1 as published by the Free Software +## Foundation and appearing in the file LICENSE.LGPL included in the +## packaging of this file. Please review the following information to +## ensure the GNU Lesser General Public License version 2.1 requirements +## will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +## +## In addition, as a special exception, Nokia gives you certain +## additional rights. These rights are described in the Nokia Qt LGPL +## Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this +## package. +## +## If you have questions regarding the use of this file, please contact +## Nokia at qt-info@nokia.com. +## +## +## +## +## +## +## +## +## $QT_END_LICENSE$ +## +############################################################################# import sys from PyQt4.QtCore import * diff --git a/doc/src/examples/animatedtiles.qdoc b/doc/src/examples/animatedtiles.qdoc new file mode 100644 index 0000000..87f1f95 --- /dev/null +++ b/doc/src/examples/animatedtiles.qdoc @@ -0,0 +1,50 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \example animation/animatedtiles + \title Animated Tiles Example + + The Animated Tiles example animates items in a graphics scene. + + \image animatedtiles-example.png +*/ + diff --git a/doc/src/examples/appchooser.qdoc b/doc/src/examples/appchooser.qdoc new file mode 100644 index 0000000..540291e --- /dev/null +++ b/doc/src/examples/appchooser.qdoc @@ -0,0 +1,52 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \example animation/appchooser + \title Application Chooser Example + + The Application Chooser example shows how to use the Qt state + machine and the animation framework to select between + applications. + + \image appchooser-example.png + +*/ diff --git a/doc/src/examples/easing.qdoc b/doc/src/examples/easing.qdoc new file mode 100644 index 0000000..20cccd2 --- /dev/null +++ b/doc/src/examples/easing.qdoc @@ -0,0 +1,51 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \example animation/easing + \title Easing Curves Example + + The Easing Curves example shows how to use easing curves to + control the speed of an animation. + + \image easing-example.png + +*/ diff --git a/doc/src/examples/rogue.qdoc b/doc/src/examples/rogue.qdoc index 8f97696..1327df6 100644 --- a/doc/src/examples/rogue.qdoc +++ b/doc/src/examples/rogue.qdoc @@ -52,8 +52,8 @@ \c{@} in the screenshot? That's you, the rogue. The \c{#} characters are walls, and the dots represent floor. In a real game, other ASCII characters would represent all kinds of objects - and creatures. For instance, ancient dragons (\c{D}'s) or food - rations (\c{%}'s). But let's not get carried away. In this game, + and creatures, for instance, ancient dragons (\c{D}s) or food + rations (\c{%}s). But let's not get carried away. In this game, the rogue is simply running around in an empty room. The rogue is moved with the keypad (2, 4, 8, 6). That aside, we @@ -61,12 +61,12 @@ types \c {q}. The player is then asked if he/she really wants to quit. - Most games have commands that need more than one key press and - that may require a different sequence of keys based on questions - asked the user. In this game, only the \c quit command falls under - this category, but for the sake of argument, let's imagine a - fully-fledged game with a rich set of commands. If we were to - implement these by catching key events in + Most games have commands that need more than one key press (we + think of consecutive presses, i.e., not of several keys being + pressed at the same time). In this game, only the \c quit command + falls under this category, but for the sake of argument, let's + imagine a fully-fledged game with a rich set of commands. If we + were to implement these by catching key events in \l{QWidget::}{keyPressEvent()}, we would have to keep a lot of class member variables to track the sequence of keys already typed (or find some other way of deducing the current state of a diff --git a/doc/src/examples/states.qdoc b/doc/src/examples/states.qdoc new file mode 100644 index 0000000..c17abd0 --- /dev/null +++ b/doc/src/examples/states.qdoc @@ -0,0 +1,50 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \example animation/states + \title States Example + + The States example shows how to use the Qt state machine to play + animations. + + \image states-example.png +*/ diff --git a/doc/src/examples/videographicsitem.qdoc b/doc/src/examples/videographicsitem.qdoc index ed420c0..796704c 100644 --- a/doc/src/examples/videographicsitem.qdoc +++ b/doc/src/examples/videographicsitem.qdoc @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the documentation of the Qt Toolkit. ** diff --git a/doc/src/examples/videowidget.qdoc b/doc/src/examples/videowidget.qdoc index ea0b495..d853fa8 100644 --- a/doc/src/examples/videowidget.qdoc +++ b/doc/src/examples/videowidget.qdoc @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the documentation of the Qt Toolkit. ** diff --git a/doc/src/frameworks-technologies/plugins-howto.qdoc b/doc/src/frameworks-technologies/plugins-howto.qdoc index 78e5c20..43bc695 100644 --- a/doc/src/frameworks-technologies/plugins-howto.qdoc +++ b/doc/src/frameworks-technologies/plugins-howto.qdoc @@ -226,6 +226,20 @@ located to your applications root folder (i.e., do not include the \c plugins directory). + \note In Symbian all binaries must be located in the directory \\sys\\bin, + so each Qt plugin has a stub with the same basename as the plugin dll + and suffix ".qtplugin" to make Qt extension plugins work similarly to + other platforms. + When trying to locate the plugin, Qt actually looks for the stub + instead of the plugin binary. While plugin stub files have the + suffix ".qtplugin", they can still be loaded also by specifying a filename + with the normal library suffix ".dll" for QPluginLoader, so normally application + developer doesn't need to care about the different suffix of the stub. + Because of the way applications can be installed + on ROM or various other drives in Symbian, Qt looks for the stub from + the same directory on all available drives if it is not located in the given + directory when loading a plugin. + For more information about deployment, see the \l {Deploying Qt Applications} and \l {Deploying Plugins} documentation. diff --git a/doc/src/getting-started/examples.qdoc b/doc/src/getting-started/examples.qdoc index b2a9997..0639bf0 100644 --- a/doc/src/getting-started/examples.qdoc +++ b/doc/src/getting-started/examples.qdoc @@ -1045,7 +1045,11 @@ \image animation-examples.png Animation \list + \o \l{animation/animatedtiles}{Animated Tiles} + \o \l{animation/appchooser}{Application Chooser} + \o \l{animation/easing}{Easing Curves} \o \l{animation/moveblocks}{Move Blocks}\raisedaster + \o \l{animation/states}{States} \o \l{animation/stickman}{Stick man}\raisedaster \endlist */ diff --git a/doc/src/images/animatedtiles-example.png b/doc/src/images/animatedtiles-example.png Binary files differnew file mode 100644 index 0000000..082ac57 --- /dev/null +++ b/doc/src/images/animatedtiles-example.png diff --git a/doc/src/images/appchooser-example.png b/doc/src/images/appchooser-example.png Binary files differnew file mode 100644 index 0000000..885476e --- /dev/null +++ b/doc/src/images/appchooser-example.png diff --git a/doc/src/images/easing-example.png b/doc/src/images/easing-example.png Binary files differnew file mode 100644 index 0000000..de48667 --- /dev/null +++ b/doc/src/images/easing-example.png diff --git a/doc/src/images/states-example.png b/doc/src/images/states-example.png Binary files differnew file mode 100644 index 0000000..f87b99b --- /dev/null +++ b/doc/src/images/states-example.png diff --git a/doc/src/platforms/platform-notes-rtos.qdoc b/doc/src/platforms/platform-notes-rtos.qdoc index 4fef2f5..8d79a8c 100644 --- a/doc/src/platforms/platform-notes-rtos.qdoc +++ b/doc/src/platforms/platform-notes-rtos.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + /*! \page platform-notes-vxworks.html \title Platform Notes - VxWorks diff --git a/doc/src/platforms/supported-platforms.qdoc b/doc/src/platforms/supported-platforms.qdoc index e65d569..5791908 100644 --- a/doc/src/platforms/supported-platforms.qdoc +++ b/doc/src/platforms/supported-platforms.qdoc @@ -89,6 +89,8 @@ \o gcc (\l{http:\\www.codesourcery.com}{Codesourcery version)} \row \o Windows CE 5.0 (ARMv4i, x86, MIPS) \o MSVC 2005 WinCE 5.0 Standard (x86, pocket, smart, mipsii) + \row \o Symbian (S60 3.1, 3.2 and 5.0) + \o RVCT, GCCE, WINSCW \endtable \section1 Tier 2 Platforms diff --git a/doc/src/snippets/code/doc_src_qtmultimedia.qdoc b/doc/src/snippets/code/doc_src_qtmultimedia.qdoc index 87a03a4..97b3232 100644 --- a/doc/src/snippets/code/doc_src_qtmultimedia.qdoc +++ b/doc/src/snippets/code/doc_src_qtmultimedia.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QT += multimedia //! [0] diff --git a/doc/src/snippets/code/doc_src_s60-introduction.qdoc b/doc/src/snippets/code/doc_src_s60-introduction.qdoc index 09ea359..8702b78 100644 --- a/doc/src/snippets/code/doc_src_s60-introduction.qdoc +++ b/doc/src/snippets/code/doc_src_s60-introduction.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] qmake //! [0] @@ -25,4 +66,4 @@ //! [5] set QT_SIS_OPTIONS=-i make sis -//! [5]
\ No newline at end of file +//! [5] diff --git a/doc/src/snippets/code/src_corelib_io_qprocess.cpp b/doc/src/snippets/code/src_corelib_io_qprocess.cpp index e15b376..5ebb747 100644 --- a/doc/src/snippets/code/src_corelib_io_qprocess.cpp +++ b/doc/src/snippets/code/src_corelib_io_qprocess.cpp @@ -73,7 +73,7 @@ command1 | command2 QProcess process1; QProcess process2; -process1.setStandardOutputProcess(process2); +process1.setStandardOutputProcess(&process2); process1.start("command1"); process2.start("command2"); diff --git a/doc/src/snippets/code/src_corelib_kernel_qobject.cpp b/doc/src/snippets/code/src_corelib_kernel_qobject.cpp index 2c18036..c200c30 100644 --- a/doc/src/snippets/code/src_corelib_kernel_qobject.cpp +++ b/doc/src/snippets/code/src_corelib_kernel_qobject.cpp @@ -404,9 +404,25 @@ public: //! [38] -//! [39] -Q_FLAGS(Options Alignment) -//! [39] +//! [39a] +class QLibrary : public QObject +{ + ... + Q_FLAGS(LoadHint LoadHints) + ... +//! [39a] + +//! [39b] + ... +public: + enum LoadHint { + ResolveAllSymbolsHint = 0x01, + ExportExternalSymbolsHint = 0x02, + LoadArchiveMemberHint = 0x04 + }; + Q_DECLARE_FLAGS(LoadHints, LoadHint) + ... +//! [39b] //! [40] diff --git a/doc/src/snippets/code/src_corelib_statemachine_qstatemachine.cpp b/doc/src/snippets/code/src_corelib_statemachine_qstatemachine.cpp new file mode 100644 index 0000000..128799f --- /dev/null +++ b/doc/src/snippets/code/src_corelib_statemachine_qstatemachine.cpp @@ -0,0 +1,15 @@ +//! [simple state machine] +QPushButton button; + +QStateMachine machine; +QState *s1 = new QState(); +s1->assignProperty(&button, "text", "Click me"); + +QFinalState *s2 = new QFinalState(); +s1->addTransition(&button, SIGNAL(clicked()), s2); + +machine.addState(s1); +machine.addState(s2); +machine.setInitialState(s1); +machine.start(); +//! [simple state machine] diff --git a/examples/effects/customshader/blureffect.cpp b/examples/effects/customshader/blureffect.cpp index 6fe8e86..f9e046e 100644 --- a/examples/effects/customshader/blureffect.cpp +++ b/examples/effects/customshader/blureffect.cpp @@ -56,10 +56,10 @@ void BlurEffect::adjustForItem() setBlurRadius(radius); } -QRectF BlurEffect::boundingRectFor(const QRectF &rect) const +QRectF BlurEffect::boundingRect() const { const_cast<BlurEffect *>(this)->adjustForItem(); - return QGraphicsBlurEffect::boundingRectFor(rect); + return QGraphicsBlurEffect::boundingRect(); } void BlurEffect::draw(QPainter *painter, QGraphicsEffectSource *source) diff --git a/examples/effects/customshader/blureffect.h b/examples/effects/customshader/blureffect.h index 0cafd80..7c12ccf 100644 --- a/examples/effects/customshader/blureffect.h +++ b/examples/effects/customshader/blureffect.h @@ -52,9 +52,9 @@ public: void setBaseLine(qreal y) { m_baseLine = y; } - QRectF boundingRectFor(const QRectF &) const; + QRectF boundingRect() const; - void draw(QPainter *painter, QGraphicsEffectSource*); + void draw(QPainter *painter, QGraphicsEffectSource *source); private: void adjustForItem(); diff --git a/examples/effects/customshader/customshadereffect.h b/examples/effects/customshader/customshadereffect.h index 9ba5f15..6892d96 100644 --- a/examples/effects/customshader/customshadereffect.h +++ b/examples/effects/customshader/customshadereffect.h @@ -43,7 +43,7 @@ #define CUSTOMSHADEREFFECT_H #include <QGraphicsEffect> -#include <QGraphicsShaderEffect> +#include <QtOpenGL/private/qgraphicsshadereffect_p.h> #include <QGraphicsItem> class CustomShaderEffect: public QGraphicsShaderEffect diff --git a/examples/graphicsview/flowlayout/flowlayout.cpp b/examples/graphicsview/flowlayout/flowlayout.cpp index d4fc49d..32a2830 100644 --- a/examples/graphicsview/flowlayout/flowlayout.cpp +++ b/examples/graphicsview/flowlayout/flowlayout.cpp @@ -98,12 +98,10 @@ void FlowLayout::setGeometry(const QRectF &geom) qreal FlowLayout::doLayout(const QRectF &geom, bool applyNewGeometry) const { - QPointF tl = geom.topLeft(); - qreal maxw = geom.width(); - qreal left, top, right, bottom; getContentsMargins(&left, &top, &right, &bottom); - maxw = maxw - left - right; + const qreal maxw = geom.width() - left - right; + qreal x = 0; qreal y = 0; qreal maxRowHeight = 0; @@ -139,9 +137,11 @@ QSizeF FlowLayout::minSize(const QSizeF &constraint) const QSizeF size(0, 0); qreal left, top, right, bottom; getContentsMargins(&left, &top, &right, &bottom); - if (constraint.width() > 0) { // height for width - qreal height = doLayout(QRectF(QPointF(0,0), constraint), false); + if (constraint.width() >= 0) { // height for width + const qreal height = doLayout(QRectF(QPointF(0,0), constraint), false); size = QSizeF(constraint.width(), height); + } else if (constraint.height() >= 0) { // width for height? + // not supported } else { QGraphicsLayoutItem *item; foreach (item, m_items) @@ -153,8 +153,8 @@ QSizeF FlowLayout::minSize(const QSizeF &constraint) const QSizeF FlowLayout::prefSize() const { - qreal left, top, right, bottom; - getContentsMargins(&left, &top, &right, &bottom); + qreal left, right; + getContentsMargins(&left, 0, &right, 0); QGraphicsLayoutItem *item; qreal maxh = 0; @@ -196,15 +196,19 @@ QSizeF FlowLayout::maxSize() const QSizeF FlowLayout::sizeHint(Qt::SizeHint which, const QSizeF &constraint) const { + QSizeF sh = constraint; switch (which) { case Qt::PreferredSize: - return prefSize(); + sh = prefSize(); + break; case Qt::MinimumSize: - return minSize(constraint); + sh = minSize(constraint); + break; case Qt::MaximumSize: - return maxSize(); + sh = maxSize(); + break; default: break; } - return constraint; + return sh; } diff --git a/examples/graphicsview/flowlayout/main.cpp b/examples/graphicsview/flowlayout/main.cpp index 206f604..e672ae6 100644 --- a/examples/graphicsview/flowlayout/main.cpp +++ b/examples/graphicsview/flowlayout/main.cpp @@ -50,6 +50,7 @@ int main(int argc, char **argv) QGraphicsView *view = new QGraphicsView(&scene); Window *w = new Window; scene.addItem(w); + view->resize(400, 300); view->show(); return app.exec(); } diff --git a/examples/graphicsview/flowlayout/window.cpp b/examples/graphicsview/flowlayout/window.cpp index 2d98026..017659a 100644 --- a/examples/graphicsview/flowlayout/window.cpp +++ b/examples/graphicsview/flowlayout/window.cpp @@ -49,7 +49,7 @@ Window::Window() { FlowLayout *lay = new FlowLayout; QLatin1String wiseWords("I am not bothered by the fact that I am unknown." - "I am bothered when I do not know others. (Confucius)"); + " I am bothered when I do not know others. (Confucius)"); QString sentence(wiseWords); QStringList words = sentence.split(QLatin1Char(' '), QString::SkipEmptyParts); for (int i = 0; i < words.count(); ++i) { diff --git a/src/3rdparty/webkit/JavaScriptCore/bytecode/Instruction.h b/src/3rdparty/webkit/JavaScriptCore/bytecode/Instruction.h index eeeac6f..594c4dd 100644 --- a/src/3rdparty/webkit/JavaScriptCore/bytecode/Instruction.h +++ b/src/3rdparty/webkit/JavaScriptCore/bytecode/Instruction.h @@ -32,6 +32,7 @@ #include "MacroAssembler.h" #include "Opcode.h" #include "Structure.h" +#include "StructureChain.h" #include <wtf/VectorTraits.h> #define POLYMORPHIC_LIST_CACHE_SIZE 8 diff --git a/src/3rdparty/webkit/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp b/src/3rdparty/webkit/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp index ce5518f..711beb4 100644 --- a/src/3rdparty/webkit/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp @@ -521,7 +521,7 @@ PassRefPtr<LabelScope> BytecodeGenerator::newLabelScope(LabelScope::Type type, c m_labelScopes.removeLast(); // Allocate new label scope. - LabelScope scope(type, name, scopeDepth(), newLabel(), type == LabelScope::Loop ? newLabel() : PassRefPtr<Label>()); // Only loops have continue targets. + LabelScope scope(type, name, scopeDepth(), newLabel(), type == LabelScope::Loop ? newLabel() : PassRefPtr<Label>(0)); // Only loops have continue targets. m_labelScopes.append(scope); return &m_labelScopes.last(); } diff --git a/src/3rdparty/webkit/JavaScriptCore/interpreter/RegisterFile.cpp b/src/3rdparty/webkit/JavaScriptCore/interpreter/RegisterFile.cpp index 06ddefc..29a13ca 100644 --- a/src/3rdparty/webkit/JavaScriptCore/interpreter/RegisterFile.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/interpreter/RegisterFile.cpp @@ -34,7 +34,7 @@ namespace JSC { RegisterFile::~RegisterFile() { #if HAVE(MMAP) - munmap(m_buffer, ((m_max - m_start) + m_maxGlobals) * sizeof(Register)); + munmap(reinterpret_cast<char*>(m_buffer), ((m_max - m_start) + m_maxGlobals) * sizeof(Register)); #elif HAVE(VIRTUALALLOC) VirtualFree(m_buffer, 0, MEM_RELEASE); #else diff --git a/src/3rdparty/webkit/JavaScriptCore/interpreter/RegisterFile.h b/src/3rdparty/webkit/JavaScriptCore/interpreter/RegisterFile.h index 5a34d11..14e189e 100644 --- a/src/3rdparty/webkit/JavaScriptCore/interpreter/RegisterFile.h +++ b/src/3rdparty/webkit/JavaScriptCore/interpreter/RegisterFile.h @@ -105,7 +105,7 @@ namespace JSC { ReturnValueRegister = -4, ArgumentCount = -3, Callee = -2, - OptionalCalleeArguments = -1, + OptionalCalleeArguments = -1 }; enum { ProgramCodeThisRegister = -CallFrameHeaderSize - 1 }; @@ -174,7 +174,7 @@ namespace JSC { size_t bufferLength = (capacity + maxGlobals) * sizeof(Register); #if HAVE(MMAP) - m_buffer = static_cast<Register*>(mmap(0, bufferLength, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANON, VM_TAG_FOR_REGISTERFILE_MEMORY, 0)); + m_buffer = reinterpret_cast<Register*>(mmap(0, bufferLength, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANON, VM_TAG_FOR_REGISTERFILE_MEMORY, 0)); if (m_buffer == MAP_FAILED) { #if PLATFORM(WINCE) fprintf(stderr, "Could not allocate register file: %d\n", GetLastError()); diff --git a/src/3rdparty/webkit/JavaScriptCore/jit/JITOpcodes.cpp b/src/3rdparty/webkit/JavaScriptCore/jit/JITOpcodes.cpp index 4a33e67..da541c5 100644 --- a/src/3rdparty/webkit/JavaScriptCore/jit/JITOpcodes.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/jit/JITOpcodes.cpp @@ -285,6 +285,11 @@ void JIT::emit_op_tear_off_arguments(Instruction*) void JIT::emit_op_ret(Instruction* currentInstruction) { +#ifdef QT_BUILD_SCRIPT_LIB + JITStubCall stubCall(this, JITStubs::cti_op_debug_return); + stubCall.addArgument(Imm32(currentInstruction[1].u.operand)); + stubCall.call(); +#endif // We could JIT generate the deref, only calling out to C when the refcount hits zero. if (m_codeBlock->needsFullScopeChain()) JITStubCall(this, JITStubs::cti_op_ret_scopeChain).call(); @@ -686,6 +691,7 @@ void JIT::emit_op_catch(Instruction* currentInstruction) emitPutVirtualRegister(currentInstruction[1].u.operand); #ifdef QT_BUILD_SCRIPT_LIB JITStubCall stubCall(this, JITStubs::cti_op_debug_catch); + stubCall.addArgument(Imm32(currentInstruction[1].u.operand)); stubCall.call(); #endif } diff --git a/src/3rdparty/webkit/JavaScriptCore/jit/JITStubs.cpp b/src/3rdparty/webkit/JavaScriptCore/jit/JITStubs.cpp index f0d3b84..0a5eb07 100644 --- a/src/3rdparty/webkit/JavaScriptCore/jit/JITStubs.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/jit/JITStubs.cpp @@ -73,6 +73,19 @@ namespace JSC { #define SYMBOL_STRING(name) #name #endif +#if PLATFORM(DARWIN) + // Mach-O platform +#define HIDE_SYMBOL(name) ".private_extern _" #name +#elif PLATFORM(AIX) + // IBM's own file format +#define HIDE_SYMBOL(name) ".lglobl " #name +#elif PLATFORM(LINUX) || PLATFORM(FREEBSD) || PLATFORM(OPENBSD) || PLATFORM(SOLARIS) || (PLATFORM(HPUX) && PLATFORM(IA64)) || PLATFORM(SYMBIAN) || PLATFORM(NETBSD) + // ELF platform +#define HIDE_SYMBOL(name) ".hidden " #name +#else +#define HIDE_SYMBOL(name) +#endif + #if COMPILER(GCC) && PLATFORM(X86) // These ASSERTs remind you that, if you change the layout of JITStackFrame, you @@ -83,6 +96,7 @@ COMPILE_ASSERT(offsetof(struct JITStackFrame, savedEBX) == 0x1c, JITStackFrame_s asm volatile ( ".globl " SYMBOL_STRING(ctiTrampoline) "\n" +HIDE_SYMBOL(ctiTrampoline) "\n" SYMBOL_STRING(ctiTrampoline) ":" "\n" "pushl %ebp" "\n" "movl %esp, %ebp" "\n" @@ -103,6 +117,7 @@ SYMBOL_STRING(ctiTrampoline) ":" "\n" asm volatile ( ".globl " SYMBOL_STRING(ctiVMThrowTrampoline) "\n" +HIDE_SYMBOL(ctiVMThrowTrampoline) "\n" SYMBOL_STRING(ctiVMThrowTrampoline) ":" "\n" #if !USE(JIT_STUB_ARGUMENT_VA_LIST) "movl %esp, %ecx" "\n" @@ -118,6 +133,7 @@ SYMBOL_STRING(ctiVMThrowTrampoline) ":" "\n" asm volatile ( ".globl " SYMBOL_STRING(ctiOpThrowNotCaught) "\n" +HIDE_SYMBOL(ctiOpThrowNotCaught) "\n" SYMBOL_STRING(ctiOpThrowNotCaught) ":" "\n" "addl $0x1c, %esp" "\n" "popl %ebx" "\n" @@ -141,6 +157,7 @@ COMPILE_ASSERT(offsetof(struct JITStackFrame, savedRBX) == 0x48, JITStackFrame_s asm volatile ( ".globl " SYMBOL_STRING(ctiTrampoline) "\n" +HIDE_SYMBOL(ctiTrampoline) "\n" SYMBOL_STRING(ctiTrampoline) ":" "\n" "pushq %rbp" "\n" "movq %rsp, %rbp" "\n" @@ -167,6 +184,7 @@ SYMBOL_STRING(ctiTrampoline) ":" "\n" asm volatile ( ".globl " SYMBOL_STRING(ctiVMThrowTrampoline) "\n" +HIDE_SYMBOL(ctiVMThrowTrampoline) "\n" SYMBOL_STRING(ctiVMThrowTrampoline) ":" "\n" "movq %rsp, %rdi" "\n" "call " SYMBOL_STRING(cti_vm_throw) "\n" @@ -182,6 +200,7 @@ SYMBOL_STRING(ctiVMThrowTrampoline) ":" "\n" asm volatile ( ".globl " SYMBOL_STRING(ctiOpThrowNotCaught) "\n" +HIDE_SYMBOL(ctiOpThrowNotCaught) "\n" SYMBOL_STRING(ctiOpThrowNotCaught) ":" "\n" "addq $0x48, %rsp" "\n" "popq %rbx" "\n" @@ -203,6 +222,7 @@ asm volatile ( ".text" "\n" ".align 2" "\n" ".globl " SYMBOL_STRING(ctiTrampoline) "\n" +HIDE_SYMBOL(ctiTrampoline) "\n" ".thumb" "\n" ".thumb_func " SYMBOL_STRING(ctiTrampoline) "\n" SYMBOL_STRING(ctiTrampoline) ":" "\n" @@ -229,6 +249,7 @@ asm volatile ( ".text" "\n" ".align 2" "\n" ".globl " SYMBOL_STRING(ctiVMThrowTrampoline) "\n" +HIDE_SYMBOL(ctiVMThrowTrampoline) "\n" ".thumb" "\n" ".thumb_func " SYMBOL_STRING(ctiVMThrowTrampoline) "\n" SYMBOL_STRING(ctiVMThrowTrampoline) ":" "\n" @@ -246,6 +267,7 @@ asm volatile ( ".text" "\n" ".align 2" "\n" ".globl " SYMBOL_STRING(ctiOpThrowNotCaught) "\n" +HIDE_SYMBOL(ctiOpThrowNotCaught) "\n" ".thumb" "\n" ".thumb_func " SYMBOL_STRING(ctiOpThrowNotCaught) "\n" SYMBOL_STRING(ctiOpThrowNotCaught) ":" "\n" @@ -591,6 +613,7 @@ namespace JITStubs { ".text" "\n" \ ".align 2" "\n" \ ".globl " SYMBOL_STRING(cti_##op) "\n" \ + HIDE_SYMBOL(cti_##op) "\n" \ ".thumb" "\n" \ ".thumb_func " SYMBOL_STRING(cti_##op) "\n" \ SYMBOL_STRING(cti_##op) ":" "\n" \ @@ -2724,9 +2747,23 @@ DEFINE_STUB_FUNCTION(void, op_debug_catch) STUB_INIT_STACK_FRAME(stackFrame); CallFrame* callFrame = stackFrame.callFrame; if (JSC::Debugger* debugger = callFrame->lexicalGlobalObject()->debugger() ) { - debugger->exceptionCatch(DebuggerCallFrame(callFrame), callFrame->codeBlock()->ownerNode()->sourceID()); + JSValue exceptionValue = callFrame->r(stackFrame.args[0].int32()).jsValue(); + DebuggerCallFrame debuggerCallFrame(callFrame, exceptionValue); + debugger->exceptionCatch(debuggerCallFrame, callFrame->codeBlock()->ownerNode()->sourceID()); } } + +DEFINE_STUB_FUNCTION(void, op_debug_return) +{ + STUB_INIT_STACK_FRAME(stackFrame); + CallFrame* callFrame = stackFrame.callFrame; + if (JSC::Debugger* debugger = callFrame->lexicalGlobalObject()->debugger() ) { + JSValue returnValue = callFrame->r(stackFrame.args[0].int32()).jsValue(); + intptr_t sourceID = callFrame->codeBlock()->ownerNode()->sourceID(); + debugger->functionExit(returnValue, sourceID); + } +} + #endif DEFINE_STUB_FUNCTION(EncodedJSValue, vm_throw) diff --git a/src/3rdparty/webkit/JavaScriptCore/jit/JITStubs.h b/src/3rdparty/webkit/JavaScriptCore/jit/JITStubs.h index 60bf64a..325c3fd 100644 --- a/src/3rdparty/webkit/JavaScriptCore/jit/JITStubs.h +++ b/src/3rdparty/webkit/JavaScriptCore/jit/JITStubs.h @@ -223,6 +223,7 @@ namespace JITStubs { extern "C" { void JIT_STUB cti_op_debug(STUB_ARGS_DECLARATION); #ifdef QT_BUILD_SCRIPT_LIB void JIT_STUB cti_op_debug_catch(STUB_ARGS_DECLARATION); + void JIT_STUB cti_op_debug_return(STUB_ARGS_DECLARATION); #endif void JIT_STUB cti_op_end(STUB_ARGS_DECLARATION); void JIT_STUB cti_op_jmp_scopes(STUB_ARGS_DECLARATION); diff --git a/src/3rdparty/webkit/JavaScriptCore/parser/NodeConstructors.h b/src/3rdparty/webkit/JavaScriptCore/parser/NodeConstructors.h index c256190..a4374d3 100644 --- a/src/3rdparty/webkit/JavaScriptCore/parser/NodeConstructors.h +++ b/src/3rdparty/webkit/JavaScriptCore/parser/NodeConstructors.h @@ -27,23 +27,6 @@ namespace JSC { - inline void* ParserArenaDeletable::operator new(size_t size, JSGlobalData* globalData) - { - ParserArenaDeletable* deletable = static_cast<ParserArenaDeletable*>(fastMalloc(size)); - globalData->parser->arena().deleteWithArena(deletable); - return deletable; - } - - inline void* ParserArenaDeletable::operator new(size_t size) - { - return fastMalloc(size); - } - - inline void ParserArenaDeletable::operator delete(void* p) - { - fastFree(p); - } - inline ParserArenaRefCounted::ParserArenaRefCounted(JSGlobalData* globalData) { globalData->parser->arena().derefWithArena(adoptRef(this)); diff --git a/src/3rdparty/webkit/JavaScriptCore/parser/ParserArena.cpp b/src/3rdparty/webkit/JavaScriptCore/parser/ParserArena.cpp index 2617506..78c5196 100644 --- a/src/3rdparty/webkit/JavaScriptCore/parser/ParserArena.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/parser/ParserArena.cpp @@ -24,6 +24,7 @@ */ #include "config.h" +#include "Parser.h" #include "ParserArena.h" #include "Nodes.h" @@ -57,4 +58,21 @@ void ParserArena::reset() m_refCountedObjects.shrink(0); } +void* ParserArenaDeletable::operator new(size_t size, JSGlobalData* globalData) +{ + ParserArenaDeletable* deletable = static_cast<ParserArenaDeletable*>(fastMalloc(size)); + globalData->parser->arena().deleteWithArena(deletable); + return deletable; +} + +void* ParserArenaDeletable::operator new(size_t size) +{ + return fastMalloc(size); +} + +void ParserArenaDeletable::operator delete(void* p) +{ + fastFree(p); +} + } diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/Collector.cpp b/src/3rdparty/webkit/JavaScriptCore/runtime/Collector.cpp index dddd83d..1268d3d 100644 --- a/src/3rdparty/webkit/JavaScriptCore/runtime/Collector.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/runtime/Collector.cpp @@ -506,6 +506,49 @@ static void* getStackBase(void* previousFrame) } } #endif +#if PLATFORM(HPUX) +struct hpux_get_stack_base_data +{ + pthread_t thread; + _pthread_stack_info info; +}; + +static void *hpux_get_stack_base_internal(void *d) +{ + hpux_get_stack_base_data *data = static_cast<hpux_get_stack_base_data *>(d); + + // _pthread_stack_info_np requires the target thread to be suspended + // in order to get information about it + pthread_suspend(data->thread); + + // _pthread_stack_info_np returns an errno code in case of failure + // or zero on success + if (_pthread_stack_info_np(data->thread, &data->info)) { + // failed + return 0; + } + + pthread_continue(data->thread); + return data; +} + +static void *hpux_get_stack_base() +{ + hpux_get_stack_base_data data; + data.thread = pthread_self(); + + // We cannot get the stack information for the current thread + // So we start a new thread to get that information and return it to us + pthread_t other; + pthread_create(&other, 0, hpux_get_stack_base_internal, &data); + + void *result; + pthread_join(other, &result); + if (result) + return data.info.stk_stack_base; + return 0; +} +#endif static inline void* currentThreadStackBase() { @@ -532,10 +575,24 @@ static inline void* currentThreadStackBase() : "=r" (pTib) ); return static_cast<void*>(pTib->StackBase); +#elif PLATFORM(HPUX) + return hpux_get_stack_base(); #elif PLATFORM(SOLARIS) stack_t s; thr_stksegment(&s); return s.ss_sp; +#elif PLATFORM(AIX) + pthread_t thread = pthread_self(); + struct __pthrdsinfo threadinfo; + char regbuf[256]; + int regbufsize = sizeof regbuf; + + if (pthread_getthrds_np(&thread, PTHRDSINFO_QUERY_ALL, + &threadinfo, sizeof threadinfo, + ®buf, ®bufsize) == 0) + return threadinfo.__pi_stackaddr; + + return 0; #elif PLATFORM(OPENBSD) pthread_t thread = pthread_self(); stack_t stack; diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/JSGlobalObject.h b/src/3rdparty/webkit/JavaScriptCore/runtime/JSGlobalObject.h index dc11fee..98e9b68 100644 --- a/src/3rdparty/webkit/JavaScriptCore/runtime/JSGlobalObject.h +++ b/src/3rdparty/webkit/JavaScriptCore/runtime/JSGlobalObject.h @@ -27,6 +27,7 @@ #include "NativeFunctionWrapper.h" #include "NumberPrototype.h" #include "StringPrototype.h" +#include "StructureChain.h" #include <wtf/HashSet.h> #include <wtf/OwnPtr.h> diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/PropertyNameArray.h b/src/3rdparty/webkit/JavaScriptCore/runtime/PropertyNameArray.h index b4382f4..67ee9c8 100644 --- a/src/3rdparty/webkit/JavaScriptCore/runtime/PropertyNameArray.h +++ b/src/3rdparty/webkit/JavaScriptCore/runtime/PropertyNameArray.h @@ -24,6 +24,7 @@ #include "CallFrame.h" #include "Identifier.h" #include "Structure.h" +#include "StructureChain.h" #include <wtf/HashSet.h> #include <wtf/Vector.h> diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/Protect.h b/src/3rdparty/webkit/JavaScriptCore/runtime/Protect.h index 224164d..6e7984c 100644 --- a/src/3rdparty/webkit/JavaScriptCore/runtime/Protect.h +++ b/src/3rdparty/webkit/JavaScriptCore/runtime/Protect.h @@ -98,7 +98,7 @@ namespace JSC { JSValue get() const { return m_value; } operator JSValue() const { return m_value; } - JSValue operator->() const { return m_value; } + //JSValue operator->() const { return m_value; } operator bool() const { return m_value; } bool operator!() const { return !m_value; } diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/Structure.cpp b/src/3rdparty/webkit/JavaScriptCore/runtime/Structure.cpp index 9f6b0c3..38c086e 100644 --- a/src/3rdparty/webkit/JavaScriptCore/runtime/Structure.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/runtime/Structure.cpp @@ -160,7 +160,7 @@ Structure::~Structure() m_previous->m_transitions.singleTransition = 0; } else { ASSERT(m_previous->m_transitions.table->contains(make_pair(m_nameInPrevious.get(), make_pair(m_attributesInPrevious, m_specificValueInPrevious)))); - m_previous->m_transitions.table->remove(make_pair(m_nameInPrevious.get(), make_pair(m_attributesInPrevious, m_specificValueInPrevious))); + m_previous->m_transitions.table->remove(make_pair<RefPtr<UString::Rep>, std::pair<unsigned,JSCell*> >(m_nameInPrevious.get(), make_pair(m_attributesInPrevious, m_specificValueInPrevious))); } } @@ -394,7 +394,7 @@ PassRefPtr<Structure> Structure::addPropertyTransitionToExistingStructure(Struct return existingTransition; } } else { - if (Structure* existingTransition = structure->m_transitions.table->get(make_pair(propertyName.ustring().rep(), make_pair(attributes, specificValue)))) { + if (Structure* existingTransition = structure->m_transitions.table->get(make_pair<RefPtr<UString::Rep>, std::pair<unsigned, JSCell*> >(propertyName.ustring().rep(), make_pair(attributes, specificValue)))) { ASSERT(existingTransition->m_offset != noOffset); offset = existingTransition->m_offset; return existingTransition; @@ -459,9 +459,9 @@ PassRefPtr<Structure> Structure::addPropertyTransition(Structure* structure, con structure->m_usingSingleTransitionSlot = false; StructureTransitionTable* transitionTable = new StructureTransitionTable; structure->m_transitions.table = transitionTable; - transitionTable->add(make_pair(existingTransition->m_nameInPrevious.get(), make_pair(existingTransition->m_attributesInPrevious, existingTransition->m_specificValueInPrevious)), existingTransition); + transitionTable->add(make_pair<RefPtr<UString::Rep>, std::pair<unsigned, JSCell*> >(existingTransition->m_nameInPrevious.get(), make_pair(existingTransition->m_attributesInPrevious, existingTransition->m_specificValueInPrevious)), existingTransition); } - structure->m_transitions.table->add(make_pair(propertyName.ustring().rep(), make_pair(attributes, specificValue)), transition.get()); + structure->m_transitions.table->add(make_pair<RefPtr<UString::Rep>, std::pair<unsigned, JSCell*> >(propertyName.ustring().rep(), make_pair(attributes, specificValue)), transition.get()); return transition.release(); } diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/Structure.h b/src/3rdparty/webkit/JavaScriptCore/runtime/Structure.h index 0de03a3..dcd4e50 100644 --- a/src/3rdparty/webkit/JavaScriptCore/runtime/Structure.h +++ b/src/3rdparty/webkit/JavaScriptCore/runtime/Structure.h @@ -30,7 +30,6 @@ #include "JSType.h" #include "JSValue.h" #include "PropertyMapHashTable.h" -#include "StructureChain.h" #include "StructureTransitionTable.h" #include "TypeInfo.h" #include "UString.h" @@ -47,6 +46,7 @@ namespace JSC { class PropertyNameArray; class PropertyNameArrayData; + class StructureChain; class Structure : public RefCounted<Structure> { public: diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/StructureChain.cpp b/src/3rdparty/webkit/JavaScriptCore/runtime/StructureChain.cpp index 85049b1..acebc86 100644 --- a/src/3rdparty/webkit/JavaScriptCore/runtime/StructureChain.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/runtime/StructureChain.cpp @@ -25,6 +25,7 @@ #include "config.h" #include "StructureChain.h" +#include "Structure.h" #include "JSObject.h" #include "Structure.h" @@ -46,6 +47,11 @@ StructureChain::StructureChain(Structure* head) m_vector[i] = 0; } +PassRefPtr<StructureChain> StructureChain::create(Structure* head) +{ + return adoptRef(new StructureChain(head)); +} + bool StructureChain::isCacheable() const { uint32_t i = 0; diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/StructureChain.h b/src/3rdparty/webkit/JavaScriptCore/runtime/StructureChain.h index c48749d..5990e17 100644 --- a/src/3rdparty/webkit/JavaScriptCore/runtime/StructureChain.h +++ b/src/3rdparty/webkit/JavaScriptCore/runtime/StructureChain.h @@ -37,7 +37,7 @@ namespace JSC { class StructureChain : public RefCounted<StructureChain> { public: - static PassRefPtr<StructureChain> create(Structure* head) { return adoptRef(new StructureChain(head)); } + static PassRefPtr<StructureChain> create(Structure* head); RefPtr<Structure>* head() { return m_vector.get(); } bool isCacheable() const; diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/HashMap.h b/src/3rdparty/webkit/JavaScriptCore/wtf/HashMap.h index 3de5ee6..8ff9170 100644 --- a/src/3rdparty/webkit/JavaScriptCore/wtf/HashMap.h +++ b/src/3rdparty/webkit/JavaScriptCore/wtf/HashMap.h @@ -178,7 +178,10 @@ namespace WTF { HashMap<T, U, V, W, X>::inlineAdd(const KeyType& key, const MappedType& mapped) { typedef HashMapTranslator<ValueType, ValueTraits, HashFunctions> TranslatorType; - return m_impl.template add<KeyType, MappedType, TranslatorType>(key, mapped); + pair<typename HashTableType::iterator, bool> p = m_impl.template add<KeyType, MappedType, TranslatorType>(key, mapped); + typename HashMap<T, U, V, W, X>::iterator temp = p.first; + return make_pair<typename HashMap<T, U, V, W, X>::iterator, bool>(temp, p.second); +// return m_impl.template add<KeyType, MappedType, TranslatorType>(key, mapped); } template<typename T, typename U, typename V, typename W, typename X> diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/HashSet.h b/src/3rdparty/webkit/JavaScriptCore/wtf/HashSet.h index 990670d..ec809e5 100644 --- a/src/3rdparty/webkit/JavaScriptCore/wtf/HashSet.h +++ b/src/3rdparty/webkit/JavaScriptCore/wtf/HashSet.h @@ -204,7 +204,12 @@ namespace WTF { template<typename T, typename U, typename V> pair<typename HashSet<T, U, V>::iterator, bool> HashSet<T, U, V>::add(const ValueType& value) { - return m_impl.add(value); + pair<typename HashTable<T, T, IdentityExtractor<T>, U, V, V>::iterator, bool> p = m_impl.add(value); + typename HashSet<T, U, V>::iterator temp = p.first; + pair<typename HashSet<T, U, V>::iterator, bool> p2 = make_pair<typename HashSet<T, U, V>::iterator, bool>(temp, p.second); + // p2.first = p.first; + // p2.second = p.second; + return p2; } template<typename Value, typename HashFunctions, typename Traits> @@ -213,7 +218,8 @@ namespace WTF { HashSet<Value, HashFunctions, Traits>::add(const T& value) { typedef HashSetTranslatorAdapter<ValueType, ValueTraits, T, HashTranslator> Adapter; - return m_impl.template addPassingHashCode<T, T, Adapter>(value, value); + pair<typename HashTableType::iterator, bool> p = m_impl.template addPassingHashCode<T, T, Adapter>(value, value); + return make_pair<iterator, bool>(p.first, p.second); } template<typename T, typename U, typename V> diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/MainThread.h b/src/3rdparty/webkit/JavaScriptCore/wtf/MainThread.h index 01ce804..b8305b5 100644 --- a/src/3rdparty/webkit/JavaScriptCore/wtf/MainThread.h +++ b/src/3rdparty/webkit/JavaScriptCore/wtf/MainThread.h @@ -34,7 +34,9 @@ namespace WTF { class Mutex; -typedef void MainThreadFunction(void*); +extern "C" { + typedef void MainThreadFunction(void*); +} void callOnMainThread(MainThreadFunction*, void* context); diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/MessageQueue.h b/src/3rdparty/webkit/JavaScriptCore/wtf/MessageQueue.h index 12291cc..070b76c 100644 --- a/src/3rdparty/webkit/JavaScriptCore/wtf/MessageQueue.h +++ b/src/3rdparty/webkit/JavaScriptCore/wtf/MessageQueue.h @@ -41,7 +41,7 @@ namespace WTF { enum MessageQueueWaitResult { MessageQueueTerminated, // Queue was destroyed while waiting for message. MessageQueueTimeout, // Timeout was specified and it expired. - MessageQueueMessageReceived, // A message was successfully received and returned. + MessageQueueMessageReceived // A message was successfully received and returned. }; template<typename DataType> diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h b/src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h index e531a63..fa37d55 100644 --- a/src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h +++ b/src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h @@ -106,6 +106,9 @@ /* regardless of operating environment */ #if defined(hpux) || defined(__hpux) #define WTF_PLATFORM_HPUX 1 +#ifndef MAP_ANON +#define MAP_ANON MAP_ANONYMOUS +#endif #endif #if defined (__SYMBIAN32__) @@ -301,6 +304,30 @@ #define WTF_PLATFORM_BIG_ENDIAN 1 #endif +/* PLATFORM(HPPA) */ +/* a.k.a. PA-RISC */ +#if defined(__hppa) || defined(__hppa__) +#define WTF_PLATFORM_HPPA 1 +#define WTF_PLATFORM_BIG_ENDIAN 1 +#endif + +/* PLATFORM(IA64) */ +/* a.k.a. Itanium Processor Family, IPF */ +#if defined(__ia64) || defined(__ia64__) || defined(_M_IA64) +#define WTF_PLATFORM_IA64 1 + +/* Itanium can be both big- and little-endian + we need to determine at compile time which one it is. + - HP's aCC compiler only compiles big-endian (so HP-UXi is always big-endian) + - GCC defines __BIG_ENDIAN__ for us (default on HP-UX) + - Linux is usually little-endian + - I've never seen AIX or Windows on IA-64, but they should be little-endian too +*/ +#if defined(__BIG_ENDIAN__) || defined(__HP_aCC) +# define WTF_PLATFORM_BIG_ENDIAN 1 +#endif +#endif + /* PLATFORM(WINCE) && PLATFORM(QT) We can not determine the endianess at compile time. For Qt for Windows CE the endianess is specified in the @@ -474,7 +501,7 @@ #endif #if !PLATFORM(WIN_OS) && !PLATFORM(SOLARIS) && !PLATFORM(QNX) \ - && !PLATFORM(SYMBIAN) && !COMPILER(RVCT) + && !PLATFORM(SYMBIAN) && !COMPILER(RVCT) && !PLATFORM(AIX) && !PLATFORM(HPUX) #define HAVE_TM_GMTOFF 1 #define HAVE_TM_ZONE 1 #define HAVE_TIMEGM 1 diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/RefPtrHashMap.h b/src/3rdparty/webkit/JavaScriptCore/wtf/RefPtrHashMap.h index 1cbebb4..b3ccd3a 100644 --- a/src/3rdparty/webkit/JavaScriptCore/wtf/RefPtrHashMap.h +++ b/src/3rdparty/webkit/JavaScriptCore/wtf/RefPtrHashMap.h @@ -42,7 +42,7 @@ namespace WTF { }; template<typename T, typename MappedArg, typename HashArg, typename KeyTraitsArg, typename MappedTraitsArg> - class HashMap<RefPtr<T>, MappedArg, HashArg, KeyTraitsArg, MappedTraitsArg> { + class RefPtrHashMap { private: typedef KeyTraitsArg KeyTraits; typedef MappedTraitsArg MappedTraits; @@ -67,7 +67,7 @@ namespace WTF { typedef HashTableIteratorAdapter<HashTableType, ValueType> iterator; typedef HashTableConstIteratorAdapter<HashTableType, ValueType> const_iterator; - void swap(HashMap&); + void swap(RefPtrHashMap&); int size() const; int capacity() const; @@ -115,109 +115,123 @@ namespace WTF { HashTableType m_impl; }; + template<typename T, typename MappedArg, typename HashArg, typename KeyTraitsArg, typename MappedTraitsArg> + class HashMap<RefPtr<T>, MappedArg, HashArg, KeyTraitsArg, MappedTraitsArg> : + public RefPtrHashMap<T, MappedArg, HashArg, KeyTraitsArg, MappedTraitsArg> + { + }; template<typename T, typename U, typename V, typename W, typename X> - inline void HashMap<RefPtr<T>, U, V, W, X>::swap(HashMap& other) + inline void RefPtrHashMap<T, U, V, W, X>::swap(RefPtrHashMap& other) { m_impl.swap(other.m_impl); } template<typename T, typename U, typename V, typename W, typename X> - inline int HashMap<RefPtr<T>, U, V, W, X>::size() const + inline int RefPtrHashMap<T, U, V, W, X>::size() const { return m_impl.size(); } template<typename T, typename U, typename V, typename W, typename X> - inline int HashMap<RefPtr<T>, U, V, W, X>::capacity() const + inline int RefPtrHashMap<T, U, V, W, X>::capacity() const { return m_impl.capacity(); } template<typename T, typename U, typename V, typename W, typename X> - inline bool HashMap<RefPtr<T>, U, V, W, X>::isEmpty() const + inline bool RefPtrHashMap<T, U, V, W, X>::isEmpty() const { return m_impl.isEmpty(); } template<typename T, typename U, typename V, typename W, typename X> - inline typename HashMap<RefPtr<T>, U, V, W, X>::iterator HashMap<RefPtr<T>, U, V, W, X>::begin() + inline typename RefPtrHashMap<T, U, V, W, X>::iterator RefPtrHashMap<T, U, V, W, X>::begin() { return m_impl.begin(); } template<typename T, typename U, typename V, typename W, typename X> - inline typename HashMap<RefPtr<T>, U, V, W, X>::iterator HashMap<RefPtr<T>, U, V, W, X>::end() + inline typename RefPtrHashMap<T, U, V, W, X>::iterator RefPtrHashMap<T, U, V, W, X>::end() { return m_impl.end(); } template<typename T, typename U, typename V, typename W, typename X> - inline typename HashMap<RefPtr<T>, U, V, W, X>::const_iterator HashMap<RefPtr<T>, U, V, W, X>::begin() const + inline typename RefPtrHashMap<T, U, V, W, X>::const_iterator RefPtrHashMap<T, U, V, W, X>::begin() const { return m_impl.begin(); } template<typename T, typename U, typename V, typename W, typename X> - inline typename HashMap<RefPtr<T>, U, V, W, X>::const_iterator HashMap<RefPtr<T>, U, V, W, X>::end() const + inline typename RefPtrHashMap<T, U, V, W, X>::const_iterator RefPtrHashMap<T, U, V, W, X>::end() const { return m_impl.end(); } template<typename T, typename U, typename V, typename W, typename X> - inline typename HashMap<RefPtr<T>, U, V, W, X>::iterator HashMap<RefPtr<T>, U, V, W, X>::find(const KeyType& key) + inline typename RefPtrHashMap<T, U, V, W, X>::iterator RefPtrHashMap<T, U, V, W, X>::find(const KeyType& key) { return m_impl.find(key); } template<typename T, typename U, typename V, typename W, typename X> - inline typename HashMap<RefPtr<T>, U, V, W, X>::iterator HashMap<RefPtr<T>, U, V, W, X>::find(RawKeyType key) + inline typename RefPtrHashMap<T, U, V, W, X>::iterator RefPtrHashMap<T, U, V, W, X>::find(RawKeyType key) { return m_impl.template find<RawKeyType, RawKeyTranslator>(key); } template<typename T, typename U, typename V, typename W, typename X> - inline typename HashMap<RefPtr<T>, U, V, W, X>::const_iterator HashMap<RefPtr<T>, U, V, W, X>::find(const KeyType& key) const + inline typename RefPtrHashMap<T, U, V, W, X>::const_iterator RefPtrHashMap<T, U, V, W, X>::find(const KeyType& key) const { return m_impl.find(key); } template<typename T, typename U, typename V, typename W, typename X> - inline typename HashMap<RefPtr<T>, U, V, W, X>::const_iterator HashMap<RefPtr<T>, U, V, W, X>::find(RawKeyType key) const + inline typename RefPtrHashMap<T, U, V, W, X>::const_iterator RefPtrHashMap<T, U, V, W, X>::find(RawKeyType key) const { return m_impl.template find<RawKeyType, RawKeyTranslator>(key); } template<typename T, typename U, typename V, typename W, typename X> - inline bool HashMap<RefPtr<T>, U, V, W, X>::contains(const KeyType& key) const + inline bool RefPtrHashMap<T, U, V, W, X>::contains(const KeyType& key) const { return m_impl.contains(key); } template<typename T, typename U, typename V, typename W, typename X> - inline bool HashMap<RefPtr<T>, U, V, W, X>::contains(RawKeyType key) const + inline bool RefPtrHashMap<T, U, V, W, X>::contains(RawKeyType key) const { return m_impl.template contains<RawKeyType, RawKeyTranslator>(key); } template<typename T, typename U, typename V, typename W, typename X> - inline pair<typename HashMap<RefPtr<T>, U, V, W, X>::iterator, bool> - HashMap<RefPtr<T>, U, V, W, X>::inlineAdd(const KeyType& key, const MappedType& mapped) + inline pair<typename RefPtrHashMap<T, U, V, W, X>::iterator, bool> + RefPtrHashMap<T, U, V, W, X>::inlineAdd(const KeyType& key, const MappedType& mapped) { typedef HashMapTranslator<ValueType, ValueTraits, HashFunctions> TranslatorType; - return m_impl.template add<KeyType, MappedType, TranslatorType>(key, mapped); + pair<typename HashTableType::iterator, bool> p = m_impl.template add<KeyType, MappedType, TranslatorType>(key, mapped); +// typename RefPtrHashMap<T, U, V, W, X>::iterator temp = p.first; + return make_pair<typename RefPtrHashMap<T, U, V, W, X>::iterator, bool>( + typename RefPtrHashMap<T, U, V, W, X>::iterator(p.first), p.second); + +// return m_impl.template add<KeyType, MappedType, TranslatorType>(key, mapped); } template<typename T, typename U, typename V, typename W, typename X> - inline pair<typename HashMap<RefPtr<T>, U, V, W, X>::iterator, bool> - HashMap<RefPtr<T>, U, V, W, X>::inlineAdd(RawKeyType key, const MappedType& mapped) + inline pair<typename RefPtrHashMap<T, U, V, W, X>::iterator, bool> + RefPtrHashMap<T, U, V, W, X>::inlineAdd(RawKeyType key, const MappedType& mapped) { - return m_impl.template add<RawKeyType, MappedType, RawKeyTranslator>(key, mapped); + pair<typename HashTableType::iterator, bool> p = m_impl.template add<RawKeyType, MappedType, RawKeyTranslator>(key, mapped); + return make_pair<typename RefPtrHashMap<T, U, V, W, X>::iterator, bool>( + typename RefPtrHashMap<T, U, V, W, X>::iterator(p.first), p.second); + + // return m_impl.template add<RawKeyType, MappedType, RawKeyTranslator>(key, mapped); } template<typename T, typename U, typename V, typename W, typename X> - pair<typename HashMap<RefPtr<T>, U, V, W, X>::iterator, bool> - HashMap<RefPtr<T>, U, V, W, X>::set(const KeyType& key, const MappedType& mapped) + pair<typename RefPtrHashMap<T, U, V, W, X>::iterator, bool> + RefPtrHashMap<T, U, V, W, X>::set(const KeyType& key, const MappedType& mapped) { pair<iterator, bool> result = inlineAdd(key, mapped); if (!result.second) { @@ -228,8 +242,8 @@ namespace WTF { } template<typename T, typename U, typename V, typename W, typename X> - pair<typename HashMap<RefPtr<T>, U, V, W, X>::iterator, bool> - HashMap<RefPtr<T>, U, V, W, X>::set(RawKeyType key, const MappedType& mapped) + pair<typename RefPtrHashMap<T, U, V, W, X>::iterator, bool> + RefPtrHashMap<T, U, V, W, X>::set(RawKeyType key, const MappedType& mapped) { pair<iterator, bool> result = inlineAdd(key, mapped); if (!result.second) { @@ -240,22 +254,22 @@ namespace WTF { } template<typename T, typename U, typename V, typename W, typename X> - pair<typename HashMap<RefPtr<T>, U, V, W, X>::iterator, bool> - HashMap<RefPtr<T>, U, V, W, X>::add(const KeyType& key, const MappedType& mapped) + pair<typename RefPtrHashMap<T, U, V, W, X>::iterator, bool> + RefPtrHashMap<T, U, V, W, X>::add(const KeyType& key, const MappedType& mapped) { return inlineAdd(key, mapped); } template<typename T, typename U, typename V, typename W, typename X> - pair<typename HashMap<RefPtr<T>, U, V, W, X>::iterator, bool> - HashMap<RefPtr<T>, U, V, W, X>::add(RawKeyType key, const MappedType& mapped) + pair<typename RefPtrHashMap<T, U, V, W, X>::iterator, bool> + RefPtrHashMap<T, U, V, W, X>::add(RawKeyType key, const MappedType& mapped) { return inlineAdd(key, mapped); } template<typename T, typename U, typename V, typename W, typename MappedTraits> - typename HashMap<RefPtr<T>, U, V, W, MappedTraits>::MappedType - HashMap<RefPtr<T>, U, V, W, MappedTraits>::get(const KeyType& key) const + typename RefPtrHashMap<T, U, V, W, MappedTraits>::MappedType + RefPtrHashMap<T, U, V, W, MappedTraits>::get(const KeyType& key) const { ValueType* entry = const_cast<HashTableType&>(m_impl).lookup(key); if (!entry) @@ -264,8 +278,8 @@ namespace WTF { } template<typename T, typename U, typename V, typename W, typename MappedTraits> - typename HashMap<RefPtr<T>, U, V, W, MappedTraits>::MappedType - inline HashMap<RefPtr<T>, U, V, W, MappedTraits>::inlineGet(RawKeyType key) const + typename RefPtrHashMap<T, U, V, W, MappedTraits>::MappedType + inline RefPtrHashMap<T, U, V, W, MappedTraits>::inlineGet(RawKeyType key) const { ValueType* entry = const_cast<HashTableType&>(m_impl).template lookup<RawKeyType, RawKeyTranslator>(key); if (!entry) @@ -274,14 +288,14 @@ namespace WTF { } template<typename T, typename U, typename V, typename W, typename MappedTraits> - typename HashMap<RefPtr<T>, U, V, W, MappedTraits>::MappedType - HashMap<RefPtr<T>, U, V, W, MappedTraits>::get(RawKeyType key) const + typename RefPtrHashMap<T, U, V, W, MappedTraits>::MappedType + RefPtrHashMap<T, U, V, W, MappedTraits>::get(RawKeyType key) const { return inlineGet(key); } template<typename T, typename U, typename V, typename W, typename X> - inline void HashMap<RefPtr<T>, U, V, W, X>::remove(iterator it) + inline void RefPtrHashMap<T, U, V, W, X>::remove(iterator it) { if (it.m_impl == m_impl.end()) return; @@ -290,45 +304,45 @@ namespace WTF { } template<typename T, typename U, typename V, typename W, typename X> - inline void HashMap<RefPtr<T>, U, V, W, X>::remove(const KeyType& key) + inline void RefPtrHashMap<T, U, V, W, X>::remove(const KeyType& key) { remove(find(key)); } template<typename T, typename U, typename V, typename W, typename X> - inline void HashMap<RefPtr<T>, U, V, W, X>::remove(RawKeyType key) + inline void RefPtrHashMap<T, U, V, W, X>::remove(RawKeyType key) { remove(find(key)); } template<typename T, typename U, typename V, typename W, typename X> - inline void HashMap<RefPtr<T>, U, V, W, X>::clear() + inline void RefPtrHashMap<T, U, V, W, X>::clear() { m_impl.clear(); } template<typename T, typename U, typename V, typename W, typename MappedTraits> - typename HashMap<RefPtr<T>, U, V, W, MappedTraits>::MappedType - HashMap<RefPtr<T>, U, V, W, MappedTraits>::take(const KeyType& key) + typename RefPtrHashMap<T, U, V, W, MappedTraits>::MappedType + RefPtrHashMap<T, U, V, W, MappedTraits>::take(const KeyType& key) { // This can probably be made more efficient to avoid ref/deref churn. iterator it = find(key); if (it == end()) return MappedTraits::emptyValue(); - typename HashMap<RefPtr<T>, U, V, W, MappedTraits>::MappedType result = it->second; + typename RefPtrHashMap<T, U, V, W, MappedTraits>::MappedType result = it->second; remove(it); return result; } template<typename T, typename U, typename V, typename W, typename MappedTraits> - typename HashMap<RefPtr<T>, U, V, W, MappedTraits>::MappedType - HashMap<RefPtr<T>, U, V, W, MappedTraits>::take(RawKeyType key) + typename RefPtrHashMap<T, U, V, W, MappedTraits>::MappedType + RefPtrHashMap<T, U, V, W, MappedTraits>::take(RawKeyType key) { // This can probably be made more efficient to avoid ref/deref churn. iterator it = find(key); if (it == end()) return MappedTraits::emptyValue(); - typename HashMap<RefPtr<T>, U, V, W, MappedTraits>::MappedType result = it->second; + typename RefPtrHashMap<T, U, V, W, MappedTraits>::MappedType result = it->second; remove(it); return result; } diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/TypeTraits.h b/src/3rdparty/webkit/JavaScriptCore/wtf/TypeTraits.h index 6ce6a3e..56659a8 100644 --- a/src/3rdparty/webkit/JavaScriptCore/wtf/TypeTraits.h +++ b/src/3rdparty/webkit/JavaScriptCore/wtf/TypeTraits.h @@ -70,30 +70,30 @@ namespace WTF { template <> struct IsPod<long double> { static const bool value = true; }; template <typename P> struct IsPod<P*> { static const bool value = true; }; - template<typename T> class IsConvertibleToInteger { - // Avoid "possible loss of data" warning when using Microsoft's C++ compiler - // by not converting int's to doubles. - template<bool performCheck, typename U> class IsConvertibleToDouble; - template<typename U> class IsConvertibleToDouble<false, U> { - public: - static const bool value = false; - }; + // Avoid "possible loss of data" warning when using Microsoft's C++ compiler + // by not converting int's to doubles. + template<bool performCheck, typename U> class CheckedIsConvertibleToDouble; + template<typename U> class CheckedIsConvertibleToDouble<false, U> { + public: + static const bool value = false; + }; - template<typename U> class IsConvertibleToDouble<true, U> { - typedef char YesType; - struct NoType { - char padding[8]; - }; - - static YesType floatCheck(long double); - static NoType floatCheck(...); - static T& t; - public: - static const bool value = sizeof(floatCheck(t)) == sizeof(YesType); + template<typename U> class CheckedIsConvertibleToDouble<true, U> { + typedef char YesType; + struct NoType { + char padding[8]; }; + static YesType floatCheck(long double); + static NoType floatCheck(...); + static U& t; + public: + static const bool value = sizeof(floatCheck(t)) == sizeof(YesType); + }; + + template<typename T> class IsConvertibleToInteger { public: - static const bool value = IsInteger<T>::value || IsConvertibleToDouble<!IsInteger<T>::value, T>::value; + static const bool value = IsInteger<T>::value || CheckedIsConvertibleToDouble<!IsInteger<T>::value, T>::value; }; template <typename T, typename U> struct IsSameType { diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/Vector.h b/src/3rdparty/webkit/JavaScriptCore/wtf/Vector.h index e3cb718..7decc4a 100644 --- a/src/3rdparty/webkit/JavaScriptCore/wtf/Vector.h +++ b/src/3rdparty/webkit/JavaScriptCore/wtf/Vector.h @@ -67,10 +67,11 @@ namespace WTF { template <size_t size, size_t> struct AlignedBuffer { AlignedBufferChar oversizebuffer[size + 64]; - AlignedBufferChar *buffer; - inline AlignedBuffer() : buffer(oversizebuffer) + AlignedBufferChar *buffer() { - buffer += 64 - (reinterpret_cast<size_t>(buffer) & 0x3f); + AlignedBufferChar *ptr = oversizebuffer; + ptr += 64 - (reinterpret_cast<size_t>(ptr) & 0x3f); + return ptr; } }; #endif @@ -128,7 +129,7 @@ namespace WTF { template<typename T> struct VectorMover<false, T> { - static void move(const T* src, const T* srcEnd, T* dst) + static void move(T* src, const T* srcEnd, T* dst) { while (src != srcEnd) { new (dst) T(*src); @@ -137,7 +138,7 @@ namespace WTF { ++src; } } - static void moveOverlapping(const T* src, const T* srcEnd, T* dst) + static void moveOverlapping(T* src, const T* srcEnd, T* dst) { if (src > dst) move(src, srcEnd, dst); @@ -156,11 +157,11 @@ namespace WTF { template<typename T> struct VectorMover<true, T> { - static void move(const T* src, const T* srcEnd, T* dst) + static void move(T* src, const T* srcEnd, T* dst) { memcpy(dst, src, reinterpret_cast<const char*>(srcEnd) - reinterpret_cast<const char*>(src)); } - static void moveOverlapping(const T* src, const T* srcEnd, T* dst) + static void moveOverlapping(T* src, const T* srcEnd, T* dst) { memmove(dst, src, reinterpret_cast<const char*>(srcEnd) - reinterpret_cast<const char*>(src)); } @@ -253,12 +254,12 @@ namespace WTF { VectorInitializer<VectorTraits<T>::needsInitialization, VectorTraits<T>::canInitializeWithMemset, T>::initialize(begin, end); } - static void move(const T* src, const T* srcEnd, T* dst) + static void move(T* src, const T* srcEnd, T* dst) { VectorMover<VectorTraits<T>::canMoveWithMemcpy, T>::move(src, srcEnd, dst); } - static void moveOverlapping(const T* src, const T* srcEnd, T* dst) + static void moveOverlapping(T* src, const T* srcEnd, T* dst) { VectorMover<VectorTraits<T>::canMoveWithMemcpy, T>::moveOverlapping(src, srcEnd, dst); } @@ -440,7 +441,11 @@ namespace WTF { using Base::m_capacity; static const size_t m_inlineBufferSize = inlineCapacity * sizeof(T); + #ifdef WTF_ALIGNED T* inlineBuffer() { return reinterpret_cast<T*>(m_inlineBuffer.buffer); } + #else + T* inlineBuffer() { return reinterpret_cast<T*>(m_inlineBuffer.buffer()); } + #endif AlignedBuffer<m_inlineBufferSize, WTF_ALIGN_OF(T)> m_inlineBuffer; }; diff --git a/src/3rdparty/webkit/WebCore/bridge/npapi.h b/src/3rdparty/webkit/WebCore/bridge/npapi.h index 07fed86..2ff657e 100644 --- a/src/3rdparty/webkit/WebCore/bridge/npapi.h +++ b/src/3rdparty/webkit/WebCore/bridge/npapi.h @@ -350,9 +350,10 @@ typedef enum { NPPVpluginWantsAllNetworkStreams = 18, /* Checks to see if the plug-in would like the browser to load the "src" attribute. */ - NPPVpluginCancelSrcStream = 20, + NPPVpluginCancelSrcStream = 20 #ifdef XP_MACOSX + , /* Used for negotiating drawing models */ NPPVpluginDrawingModel = 1000, /* Used for negotiating event models */ diff --git a/src/3rdparty/webkit/WebCore/dom/ExceptionCode.h b/src/3rdparty/webkit/WebCore/dom/ExceptionCode.h index 58b18e2..08bffa6 100644 --- a/src/3rdparty/webkit/WebCore/dom/ExceptionCode.h +++ b/src/3rdparty/webkit/WebCore/dom/ExceptionCode.h @@ -57,7 +57,7 @@ namespace WebCore { NETWORK_ERR = 19, ABORT_ERR = 20, URL_MISMATCH_ERR = 21, - QUOTA_EXCEEDED_ERR = 22, + QUOTA_EXCEEDED_ERR = 22 }; enum ExceptionType { diff --git a/src/3rdparty/webkit/WebCore/dom/ScriptExecutionContext.h b/src/3rdparty/webkit/WebCore/dom/ScriptExecutionContext.h index 3f8febc..f95f0045 100644 --- a/src/3rdparty/webkit/WebCore/dom/ScriptExecutionContext.h +++ b/src/3rdparty/webkit/WebCore/dom/ScriptExecutionContext.h @@ -45,7 +45,7 @@ namespace WebCore { enum MessageDestination { InspectorControllerDestination, - ConsoleDestination, + ConsoleDestination }; class ScriptExecutionContext { diff --git a/src/3rdparty/webkit/WebCore/editing/CompositeEditCommand.cpp b/src/3rdparty/webkit/WebCore/editing/CompositeEditCommand.cpp index 9737e92..dcb3326 100644 --- a/src/3rdparty/webkit/WebCore/editing/CompositeEditCommand.cpp +++ b/src/3rdparty/webkit/WebCore/editing/CompositeEditCommand.cpp @@ -795,7 +795,7 @@ void CompositeEditCommand::moveParagraphs(const VisiblePosition& startOfParagrap // FIXME: This is an inefficient way to preserve style on nodes in the paragraph to move. It // shouldn't matter though, since moved paragraphs will usually be quite small. - RefPtr<DocumentFragment> fragment = startOfParagraphToMove != endOfParagraphToMove ? createFragmentFromMarkup(document(), createMarkup(range.get(), 0, DoNotAnnotateForInterchange, true), "") : 0; + RefPtr<DocumentFragment> fragment = startOfParagraphToMove != endOfParagraphToMove ? createFragmentFromMarkup(document(), createMarkup(range.get(), 0, DoNotAnnotateForInterchange, true), "") : PassRefPtr<DocumentFragment>(0); // A non-empty paragraph's style is moved when we copy and move it. We don't move // anything if we're given an empty paragraph, but an empty paragraph can have style diff --git a/src/3rdparty/webkit/WebCore/editing/EditorInsertAction.h b/src/3rdparty/webkit/WebCore/editing/EditorInsertAction.h index 5b732dc..b8b137d 100644 --- a/src/3rdparty/webkit/WebCore/editing/EditorInsertAction.h +++ b/src/3rdparty/webkit/WebCore/editing/EditorInsertAction.h @@ -32,7 +32,7 @@ namespace WebCore { enum EditorInsertAction { EditorInsertActionTyped, EditorInsertActionPasted, - EditorInsertActionDropped, + EditorInsertActionDropped }; } // namespace diff --git a/src/3rdparty/webkit/WebCore/editing/markup.cpp b/src/3rdparty/webkit/WebCore/editing/markup.cpp index 6b6d326..1c737a0 100644 --- a/src/3rdparty/webkit/WebCore/editing/markup.cpp +++ b/src/3rdparty/webkit/WebCore/editing/markup.cpp @@ -970,7 +970,7 @@ String createMarkup(const Range* range, Vector<Node*>* nodes, EAnnotateForInterc Node* body = enclosingNodeWithTag(Position(commonAncestor, 0), bodyTag); // FIXME: Do this for all fully selected blocks, not just the body. Node* fullySelectedRoot = body && *VisibleSelection::selectionFromContentsOfNode(body).toNormalizedRange() == *updatedRange ? body : 0; - RefPtr<CSSMutableStyleDeclaration> fullySelectedRootStyle = fullySelectedRoot ? styleFromMatchedRulesAndInlineDecl(fullySelectedRoot) : 0; + RefPtr<CSSMutableStyleDeclaration> fullySelectedRootStyle = fullySelectedRoot ? styleFromMatchedRulesAndInlineDecl(fullySelectedRoot) : PassRefPtr<CSSMutableStyleDeclaration>(0); if (annotate && fullySelectedRoot) { if (shouldIncludeWrapperForFullySelectedRoot(fullySelectedRoot, fullySelectedRootStyle.get())) specialCommonAncestor = fullySelectedRoot; diff --git a/src/3rdparty/webkit/WebCore/generated/CSSPropertyNames.h b/src/3rdparty/webkit/WebCore/generated/CSSPropertyNames.h index cc3627d..fdd854c 100644 --- a/src/3rdparty/webkit/WebCore/generated/CSSPropertyNames.h +++ b/src/3rdparty/webkit/WebCore/generated/CSSPropertyNames.h @@ -275,7 +275,7 @@ enum CSSPropertyID { CSSPropertyGlyphOrientationVertical = 1268, CSSPropertyKerning = 1269, CSSPropertyTextAnchor = 1270, - CSSPropertyWritingMode = 1271, + CSSPropertyWritingMode = 1271 }; const int firstCSSProperty = 1001; diff --git a/src/3rdparty/webkit/WebCore/html/HTMLParser.cpp b/src/3rdparty/webkit/WebCore/html/HTMLParser.cpp index 722f4e2..928a1bf 100644 --- a/src/3rdparty/webkit/WebCore/html/HTMLParser.cpp +++ b/src/3rdparty/webkit/WebCore/html/HTMLParser.cpp @@ -137,7 +137,7 @@ HTMLParser::HTMLParser(HTMLDocument* doc, bool reportErrors) , m_reportErrors(reportErrors) , m_handlingResidualStyleAcrossBlocks(false) , m_inStrayTableContent(0) - , m_parserQuirks(m_document->page() ? m_document->page()->chrome()->client()->createHTMLParserQuirks() : 0) + , m_parserQuirks(m_document->page() ? m_document->page()->chrome()->client()->createHTMLParserQuirks() : PassOwnPtr<HTMLParserQuirks>(0)) { } @@ -155,7 +155,7 @@ HTMLParser::HTMLParser(DocumentFragment* frag) , m_reportErrors(false) , m_handlingResidualStyleAcrossBlocks(false) , m_inStrayTableContent(0) - , m_parserQuirks(m_document->page() ? m_document->page()->chrome()->client()->createHTMLParserQuirks() : 0) + , m_parserQuirks(m_document->page() ? m_document->page()->chrome()->client()->createHTMLParserQuirks() : PassOwnPtr<HTMLParserQuirks>(0)) { if (frag) frag->ref(); diff --git a/src/3rdparty/webkit/WebCore/loader/DocumentLoader.cpp b/src/3rdparty/webkit/WebCore/loader/DocumentLoader.cpp index 87cb725..812d17b 100644 --- a/src/3rdparty/webkit/WebCore/loader/DocumentLoader.cpp +++ b/src/3rdparty/webkit/WebCore/loader/DocumentLoader.cpp @@ -519,7 +519,7 @@ ArchiveResource* DocumentLoader::archiveResourceForURL(const KURL& url) const PassRefPtr<Archive> DocumentLoader::popArchiveForSubframe(const String& frameName) { - return m_archiveResourceCollection ? m_archiveResourceCollection->popSubframeArchive(frameName) : 0; + return m_archiveResourceCollection ? m_archiveResourceCollection->popSubframeArchive(frameName) : PassRefPtr<Archive>(0); } void DocumentLoader::clearArchiveResources() diff --git a/src/3rdparty/webkit/WebCore/loader/FrameLoader.h b/src/3rdparty/webkit/WebCore/loader/FrameLoader.h index 58bf2c0..c41e491 100644 --- a/src/3rdparty/webkit/WebCore/loader/FrameLoader.h +++ b/src/3rdparty/webkit/WebCore/loader/FrameLoader.h @@ -355,7 +355,7 @@ namespace WebCore { enum LocalLoadPolicy { AllowLocalLoadsForAll, // No restriction on local loads. AllowLocalLoadsForLocalAndSubstituteData, - AllowLocalLoadsForLocalOnly, + AllowLocalLoadsForLocalOnly }; static void setLocalLoadPolicy(LocalLoadPolicy); static bool restrictAccessToLocal(); diff --git a/src/3rdparty/webkit/WebCore/loader/FrameLoaderTypes.h b/src/3rdparty/webkit/WebCore/loader/FrameLoaderTypes.h index c264b47..b3823ba 100644 --- a/src/3rdparty/webkit/WebCore/loader/FrameLoaderTypes.h +++ b/src/3rdparty/webkit/WebCore/loader/FrameLoaderTypes.h @@ -42,7 +42,7 @@ namespace WebCore { enum PolicyAction { PolicyUse, PolicyDownload, - PolicyIgnore, + PolicyIgnore }; enum FrameLoadType { diff --git a/src/3rdparty/webkit/WebCore/loader/appcache/ApplicationCacheGroup.cpp b/src/3rdparty/webkit/WebCore/loader/appcache/ApplicationCacheGroup.cpp index dc73353..fd6a8b4 100644 --- a/src/3rdparty/webkit/WebCore/loader/appcache/ApplicationCacheGroup.cpp +++ b/src/3rdparty/webkit/WebCore/loader/appcache/ApplicationCacheGroup.cpp @@ -772,7 +772,7 @@ void ApplicationCacheGroup::checkIfLoadIsComplete() ASSERT(cacheStorage().isMaximumSizeReached() && m_calledReachedMaxAppCacheSize); } - RefPtr<ApplicationCache> oldNewestCache = (m_newestCache == m_cacheBeingUpdated) ? 0 : m_newestCache; + RefPtr<ApplicationCache> oldNewestCache = (m_newestCache == m_cacheBeingUpdated) ? RefPtr<ApplicationCache>(0) : m_newestCache; setNewestCache(m_cacheBeingUpdated.release()); if (cacheStorage().storeNewestCache(this)) { diff --git a/src/3rdparty/webkit/WebCore/loader/archive/ArchiveFactory.cpp b/src/3rdparty/webkit/WebCore/loader/archive/ArchiveFactory.cpp index 1322dbb..753c3c3 100644 --- a/src/3rdparty/webkit/WebCore/loader/archive/ArchiveFactory.cpp +++ b/src/3rdparty/webkit/WebCore/loader/archive/ArchiveFactory.cpp @@ -75,7 +75,7 @@ bool ArchiveFactory::isArchiveMimeType(const String& mimeType) PassRefPtr<Archive> ArchiveFactory::create(SharedBuffer* data, const String& mimeType) { RawDataCreationFunction* function = archiveMIMETypes().get(mimeType); - return function ? function(data) : 0; + return function ? function(data) : PassRefPtr<Archive>(0); } void ArchiveFactory::registerKnownArchiveMIMETypes() diff --git a/src/3rdparty/webkit/WebCore/loader/archive/ArchiveResource.cpp b/src/3rdparty/webkit/WebCore/loader/archive/ArchiveResource.cpp index 691f66a..b6317da 100644 --- a/src/3rdparty/webkit/WebCore/loader/archive/ArchiveResource.cpp +++ b/src/3rdparty/webkit/WebCore/loader/archive/ArchiveResource.cpp @@ -35,17 +35,17 @@ namespace WebCore { PassRefPtr<ArchiveResource> ArchiveResource::create(PassRefPtr<SharedBuffer> data, const KURL& url, const ResourceResponse& response) { - return data ? adoptRef(new ArchiveResource(data, url, response)) : 0; + return data ? adoptRef(new ArchiveResource(data, url, response)) : PassRefPtr<ArchiveResource>(0); } PassRefPtr<ArchiveResource> ArchiveResource::create(PassRefPtr<SharedBuffer> data, const KURL& url, const String& mimeType, const String& textEncoding, const String& frameName) { - return data ? adoptRef(new ArchiveResource(data, url, mimeType, textEncoding, frameName)) : 0; + return data ? adoptRef(new ArchiveResource(data, url, mimeType, textEncoding, frameName)) : PassRefPtr<ArchiveResource>(0); } PassRefPtr<ArchiveResource> ArchiveResource::create(PassRefPtr<SharedBuffer> data, const KURL& url, const String& mimeType, const String& textEncoding, const String& frameName, const ResourceResponse& resourceResponse) { - return data ? adoptRef(new ArchiveResource(data, url, mimeType, textEncoding, frameName, resourceResponse)) : 0; + return data ? adoptRef(new ArchiveResource(data, url, mimeType, textEncoding, frameName, resourceResponse)) : PassRefPtr<ArchiveResource>(0); } ArchiveResource::ArchiveResource(PassRefPtr<SharedBuffer> data, const KURL& url, const ResourceResponse& response) diff --git a/src/3rdparty/webkit/WebCore/loader/icon/IconDatabase.cpp b/src/3rdparty/webkit/WebCore/loader/icon/IconDatabase.cpp index b78291d..7201661 100644 --- a/src/3rdparty/webkit/WebCore/loader/icon/IconDatabase.cpp +++ b/src/3rdparty/webkit/WebCore/loader/icon/IconDatabase.cpp @@ -511,7 +511,7 @@ void IconDatabase::setIconDataForIconURL(PassRefPtr<SharedBuffer> dataOriginal, if (!isOpen() || iconURLOriginal.isEmpty()) return; - RefPtr<SharedBuffer> data = dataOriginal ? dataOriginal->copy() : 0; + RefPtr<SharedBuffer> data = dataOriginal ? dataOriginal->copy() : PassRefPtr<SharedBuffer>(0); String iconURL = iconURLOriginal.copy(); Vector<String> pageURLs; diff --git a/src/3rdparty/webkit/WebCore/page/DOMWindow.cpp b/src/3rdparty/webkit/WebCore/page/DOMWindow.cpp index e8f9004..c54aab2 100644 --- a/src/3rdparty/webkit/WebCore/page/DOMWindow.cpp +++ b/src/3rdparty/webkit/WebCore/page/DOMWindow.cpp @@ -582,7 +582,7 @@ Storage* DOMWindow::localStorage() const return 0; StorageNamespace* localStorage = page->group().localStorage(); - RefPtr<StorageArea> storageArea = localStorage ? localStorage->storageArea(document->securityOrigin()) : 0; + RefPtr<StorageArea> storageArea = localStorage ? localStorage->storageArea(document->securityOrigin()) : PassRefPtr<StorageArea>(0); if (storageArea) { page->inspectorController()->didUseDOMStorage(storageArea.get(), true, m_frame); m_localStorage = Storage::create(m_frame, storageArea.release()); diff --git a/src/3rdparty/webkit/WebCore/page/animation/AnimationBase.cpp b/src/3rdparty/webkit/WebCore/page/animation/AnimationBase.cpp index dad763c..8769a59 100644 --- a/src/3rdparty/webkit/WebCore/page/animation/AnimationBase.cpp +++ b/src/3rdparty/webkit/WebCore/page/animation/AnimationBase.cpp @@ -144,7 +144,7 @@ static inline TransformOperations blendFunc(const AnimationBase* anim, const Tra for (unsigned i = 0; i < size; i++) { RefPtr<TransformOperation> fromOp = (i < fromSize) ? from.operations()[i].get() : 0; RefPtr<TransformOperation> toOp = (i < toSize) ? to.operations()[i].get() : 0; - RefPtr<TransformOperation> blendedOp = toOp ? toOp->blend(fromOp.get(), progress) : (fromOp ? fromOp->blend(0, progress, true) : 0); + RefPtr<TransformOperation> blendedOp = toOp ? toOp->blend(fromOp.get(), progress) : (fromOp ? fromOp->blend(0, progress, true) : PassRefPtr<TransformOperation>(0)); if (blendedOp) result.operations().append(blendedOp); else { diff --git a/src/3rdparty/webkit/WebCore/platform/PlatformKeyboardEvent.h b/src/3rdparty/webkit/WebCore/platform/PlatformKeyboardEvent.h index 4a6bc9e..d9701b7 100644 --- a/src/3rdparty/webkit/WebCore/platform/PlatformKeyboardEvent.h +++ b/src/3rdparty/webkit/WebCore/platform/PlatformKeyboardEvent.h @@ -81,7 +81,7 @@ namespace WebCore { AltKey = 1 << 0, CtrlKey = 1 << 1, MetaKey = 1 << 2, - ShiftKey = 1 << 3, + ShiftKey = 1 << 3 }; Type type() const { return m_type; } diff --git a/src/3rdparty/webkit/WebCore/platform/ScrollTypes.h b/src/3rdparty/webkit/WebCore/platform/ScrollTypes.h index eba9055..b0df470 100644 --- a/src/3rdparty/webkit/WebCore/platform/ScrollTypes.h +++ b/src/3rdparty/webkit/WebCore/platform/ScrollTypes.h @@ -53,7 +53,7 @@ namespace WebCore { enum ScrollbarControlStateMask { ActiveScrollbarState = 1, EnabledScrollbarState = 1 << 1, - PressedScrollbarState = 1 << 2, + PressedScrollbarState = 1 << 2 }; enum ScrollbarPart { @@ -67,7 +67,7 @@ namespace WebCore { ForwardButtonEndPart = 1 << 6, ScrollbarBGPart = 1 << 7, TrackBGPart = 1 << 8, - AllParts = 0xffffffff, + AllParts = 0xffffffff }; enum ScrollbarButtonsPlacement { diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/BitmapImage.h b/src/3rdparty/webkit/WebCore/platform/graphics/BitmapImage.h index 8b770a1..a3a0493 100644 --- a/src/3rdparty/webkit/WebCore/platform/graphics/BitmapImage.h +++ b/src/3rdparty/webkit/WebCore/platform/graphics/BitmapImage.h @@ -150,7 +150,7 @@ protected: enum RepetitionCountStatus { Unknown, // We haven't checked the source's repetition count. Uncertain, // We have a repetition count, but it might be wrong (some GIFs have a count after the image data, and will report "loop once" until all data has been decoded). - Certain, // The repetition count is known to be correct. + Certain // The repetition count is known to be correct. }; BitmapImage(NativeImagePtr, ImageObserver* = 0); diff --git a/src/3rdparty/webkit/WebCore/platform/image-decoders/ImageDecoder.h b/src/3rdparty/webkit/WebCore/platform/image-decoders/ImageDecoder.h index 9c2a9d7..494e2bb 100644 --- a/src/3rdparty/webkit/WebCore/platform/image-decoders/ImageDecoder.h +++ b/src/3rdparty/webkit/WebCore/platform/image-decoders/ImageDecoder.h @@ -52,7 +52,7 @@ namespace WebCore { DisposeNotSpecified, // Leave frame in framebuffer DisposeKeep, // Leave frame in framebuffer DisposeOverwriteBgcolor, // Clear frame to transparent - DisposeOverwritePrevious, // Clear frame to previous framebuffer contents + DisposeOverwritePrevious // Clear frame to previous framebuffer contents }; #if PLATFORM(SKIA) typedef uint32_t PixelData; diff --git a/src/3rdparty/webkit/WebCore/platform/network/ProtectionSpace.h b/src/3rdparty/webkit/WebCore/platform/network/ProtectionSpace.h index 9a73cff..b7d4574 100644 --- a/src/3rdparty/webkit/WebCore/platform/network/ProtectionSpace.h +++ b/src/3rdparty/webkit/WebCore/platform/network/ProtectionSpace.h @@ -46,7 +46,7 @@ enum ProtectionSpaceAuthenticationScheme { ProtectionSpaceAuthenticationSchemeHTTPDigest = 3, ProtectionSpaceAuthenticationSchemeHTMLForm = 4, ProtectionSpaceAuthenticationSchemeNTLM = 5, - ProtectionSpaceAuthenticationSchemeNegotiate = 6, + ProtectionSpaceAuthenticationSchemeNegotiate = 6 }; class ProtectionSpace { diff --git a/src/3rdparty/webkit/WebCore/platform/network/ResourceHandleClient.h b/src/3rdparty/webkit/WebCore/platform/network/ResourceHandleClient.h index c99be54..b8a8cbb 100644 --- a/src/3rdparty/webkit/WebCore/platform/network/ResourceHandleClient.h +++ b/src/3rdparty/webkit/WebCore/platform/network/ResourceHandleClient.h @@ -56,7 +56,7 @@ namespace WebCore { enum CacheStoragePolicy { StorageAllowed, StorageAllowedInMemoryOnly, - StorageNotAllowed, + StorageNotAllowed }; class ResourceHandleClient { diff --git a/src/3rdparty/webkit/WebCore/platform/network/ResourceRequestBase.h b/src/3rdparty/webkit/WebCore/platform/network/ResourceRequestBase.h index 2d87d6e..740ebed 100644 --- a/src/3rdparty/webkit/WebCore/platform/network/ResourceRequestBase.h +++ b/src/3rdparty/webkit/WebCore/platform/network/ResourceRequestBase.h @@ -41,7 +41,7 @@ namespace WebCore { UseProtocolCachePolicy, // normal load ReloadIgnoringCacheData, // reload ReturnCacheDataElseLoad, // back/forward or encoding change - allow stale data - ReturnCacheDataDontLoad, // results of a post - allow stale data and only use cache + ReturnCacheDataDontLoad // results of a post - allow stale data and only use cache }; const int unspecifiedTimeoutInterval = INT_MAX; diff --git a/src/3rdparty/webkit/WebCore/platform/text/StringImpl.h b/src/3rdparty/webkit/WebCore/platform/text/StringImpl.h index 38439ed..4325925 100644 --- a/src/3rdparty/webkit/WebCore/platform/text/StringImpl.h +++ b/src/3rdparty/webkit/WebCore/platform/text/StringImpl.h @@ -199,7 +199,7 @@ private: enum StringImplFlags { HasTerminatingNullCharacter, - InTable, + InTable }; unsigned m_length; diff --git a/src/3rdparty/webkit/WebCore/platform/text/TextCodec.h b/src/3rdparty/webkit/WebCore/platform/text/TextCodec.h index 3c74165..36d7c6e 100644 --- a/src/3rdparty/webkit/WebCore/platform/text/TextCodec.h +++ b/src/3rdparty/webkit/WebCore/platform/text/TextCodec.h @@ -51,7 +51,7 @@ namespace WebCore { // Encodes the character as en entity as above, but escaped // non-alphanumeric characters. This is used in URLs. // For example, U+6DE would be "%26%231758%3B". - URLEncodedEntitiesForUnencodables, + URLEncodedEntitiesForUnencodables }; typedef char UnencodableReplacementArray[32]; diff --git a/src/3rdparty/webkit/WebCore/plugins/PluginQuirkSet.h b/src/3rdparty/webkit/WebCore/plugins/PluginQuirkSet.h index b652c6e..8183050 100644 --- a/src/3rdparty/webkit/WebCore/plugins/PluginQuirkSet.h +++ b/src/3rdparty/webkit/WebCore/plugins/PluginQuirkSet.h @@ -45,7 +45,7 @@ namespace WebCore { PluginQuirkDontClipToZeroRectWhenScrolling = 1 << 9, PluginQuirkDontSetNullWindowHandleOnDestroy = 1 << 10, PluginQuirkDontAllowMultipleInstances = 1 << 11, - PluginQuirkRequiresGtkToolKit = 1 << 12, + PluginQuirkRequiresGtkToolKit = 1 << 12 }; class PluginQuirkSet { diff --git a/src/3rdparty/webkit/WebCore/plugins/npapi.cpp b/src/3rdparty/webkit/WebCore/plugins/npapi.cpp index 4135b64..d275a39 100644 --- a/src/3rdparty/webkit/WebCore/plugins/npapi.cpp +++ b/src/3rdparty/webkit/WebCore/plugins/npapi.cpp @@ -171,7 +171,9 @@ void NPN_PopPopupsEnabledState(NPP instance) pluginViewForInstance(instance)->popPopupsEnabledState(); } +extern "C" { void NPN_PluginThreadAsyncCall(NPP instance, void (*func) (void *), void *userData) { PluginMainThreadScheduler::scheduler().scheduleCall(instance, func, userData); } +} diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderLayer.cpp b/src/3rdparty/webkit/WebCore/rendering/RenderLayer.cpp index 4b6d291..d92746b 100644 --- a/src/3rdparty/webkit/WebCore/rendering/RenderLayer.cpp +++ b/src/3rdparty/webkit/WebCore/rendering/RenderLayer.cpp @@ -3211,7 +3211,7 @@ void RenderLayer::styleChanged(StyleDifference diff, const RenderStyle*) void RenderLayer::updateScrollCornerStyle() { RenderObject* actualRenderer = renderer()->node() ? renderer()->node()->shadowAncestorNode()->renderer() : renderer(); - RefPtr<RenderStyle> corner = renderer()->hasOverflowClip() ? actualRenderer->getUncachedPseudoStyle(SCROLLBAR_CORNER, actualRenderer->style()) : 0; + RefPtr<RenderStyle> corner = renderer()->hasOverflowClip() ? actualRenderer->getUncachedPseudoStyle(SCROLLBAR_CORNER, actualRenderer->style()) : PassRefPtr<RenderStyle>(0); if (corner) { if (!m_scrollCorner) { m_scrollCorner = new (renderer()->renderArena()) RenderScrollbarPart(renderer()->document()); @@ -3227,7 +3227,7 @@ void RenderLayer::updateScrollCornerStyle() void RenderLayer::updateResizerStyle() { RenderObject* actualRenderer = renderer()->node() ? renderer()->node()->shadowAncestorNode()->renderer() : renderer(); - RefPtr<RenderStyle> resizer = renderer()->hasOverflowClip() ? actualRenderer->getUncachedPseudoStyle(RESIZER, actualRenderer->style()) : 0; + RefPtr<RenderStyle> resizer = renderer()->hasOverflowClip() ? actualRenderer->getUncachedPseudoStyle(RESIZER, actualRenderer->style()) : PassRefPtr<RenderStyle>(0); if (resizer) { if (!m_resizer) { m_resizer = new (renderer()->renderArena()) RenderScrollbarPart(renderer()->document()); diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderLayer.h b/src/3rdparty/webkit/WebCore/rendering/RenderLayer.h index 1772c66..541002f 100644 --- a/src/3rdparty/webkit/WebCore/rendering/RenderLayer.h +++ b/src/3rdparty/webkit/WebCore/rendering/RenderLayer.h @@ -298,7 +298,7 @@ public: enum UpdateLayerPositionsFlag { DoFullRepaint = 1, CheckForRepaint = 1 << 1, - UpdateCompositingLayers = 1 << 2, + UpdateCompositingLayers = 1 << 2 }; typedef unsigned UpdateLayerPositionsFlags; void updateLayerPositions(UpdateLayerPositionsFlags = DoFullRepaint | UpdateCompositingLayers); diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderScrollbar.cpp b/src/3rdparty/webkit/WebCore/rendering/RenderScrollbar.cpp index db24a06..32cea92 100644 --- a/src/3rdparty/webkit/WebCore/rendering/RenderScrollbar.cpp +++ b/src/3rdparty/webkit/WebCore/rendering/RenderScrollbar.cpp @@ -183,7 +183,7 @@ void RenderScrollbar::updateScrollbarPart(ScrollbarPart partType, bool destroy) if (partType == NoPart) return; - RefPtr<RenderStyle> partStyle = !destroy ? getScrollbarPseudoStyle(partType, pseudoForScrollbarPart(partType)) : 0; + RefPtr<RenderStyle> partStyle = !destroy ? getScrollbarPseudoStyle(partType, pseudoForScrollbarPart(partType)) : PassRefPtr<RenderStyle>(0); bool needRenderer = !destroy && partStyle && partStyle->display() != NONE && partStyle->visibility() == VISIBLE; diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderTextFragment.cpp b/src/3rdparty/webkit/WebCore/rendering/RenderTextFragment.cpp index 7da9e5a..1d8fca6 100644 --- a/src/3rdparty/webkit/WebCore/rendering/RenderTextFragment.cpp +++ b/src/3rdparty/webkit/WebCore/rendering/RenderTextFragment.cpp @@ -28,7 +28,7 @@ namespace WebCore { RenderTextFragment::RenderTextFragment(Node* node, StringImpl* str, int startOffset, int length) - : RenderText(node, str ? str->substring(startOffset, length) : 0) + : RenderText(node, str ? str->substring(startOffset, length) : PassRefPtr<StringImpl>(0)) , m_start(startOffset) , m_end(length) , m_firstLetter(0) diff --git a/src/3rdparty/webkit/WebCore/svg/SVGElement.cpp b/src/3rdparty/webkit/WebCore/svg/SVGElement.cpp index 3a7d3d4..a04b095 100644 --- a/src/3rdparty/webkit/WebCore/svg/SVGElement.cpp +++ b/src/3rdparty/webkit/WebCore/svg/SVGElement.cpp @@ -214,7 +214,7 @@ void SVGElement::sendSVGLoadEventIfPossible(bool sendParentLoadEvents) event->setTarget(currentTarget); currentTarget->dispatchGenericEvent(event.release()); } - currentTarget = (parent && parent->isSVGElement()) ? static_pointer_cast<SVGElement>(parent) : 0; + currentTarget = (parent && parent->isSVGElement()) ? static_pointer_cast<SVGElement>(parent) : RefPtr<SVGElement>(0); } } diff --git a/src/3rdparty/webkit/WebCore/workers/Worker.cpp b/src/3rdparty/webkit/WebCore/workers/Worker.cpp index 866687f..22c7d71 100644 --- a/src/3rdparty/webkit/WebCore/workers/Worker.cpp +++ b/src/3rdparty/webkit/WebCore/workers/Worker.cpp @@ -74,7 +74,7 @@ void Worker::postMessage(const String& message, ExceptionCode& ec) void Worker::postMessage(const String& message, MessagePort* messagePort, ExceptionCode& ec) { // Disentangle the port in preparation for sending it to the remote context. - OwnPtr<MessagePortChannel> channel = messagePort ? messagePort->disentangle(ec) : 0; + OwnPtr<MessagePortChannel> channel = messagePort ? messagePort->disentangle(ec) : PassOwnPtr<MessagePortChannel>(0); if (ec) return; m_contextProxy->postMessageToWorkerContext(message, channel.release()); diff --git a/src/corelib/arch/i386/qatomic_i386.s b/src/corelib/arch/i386/qatomic_i386.s index 63facc1..08158f9 100644 --- a/src/corelib/arch/i386/qatomic_i386.s +++ b/src/corelib/arch/i386/qatomic_i386.s @@ -1,43 +1,3 @@ -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! -!! Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -!! Contact: Nokia Corporation (qt-info@nokia.com) -!! -!! This file is part of the QtGui module of the Qt Toolkit. -!! -!! $QT_BEGIN_LICENSE:LGPL$ -!! No Commercial Usage -!! This file contains pre-release code and may not be distributed. -!! You may use this file in accordance with the terms and conditions -!! contained in the Technology Preview License Agreement accompanying -!! this package. -!! -!! GNU Lesser General Public License Usage -!! Alternatively, this file may be used under the terms of the GNU Lesser -!! General Public License version 2.1 as published by the Free Software -!! Foundation and appearing in the file LICENSE.LGPL included in the -!! packaging of this file. Please review the following information to -!! ensure the GNU Lesser General Public License version 2.1 requirements -!! will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -!! -!! In addition, as a special exception, Nokia gives you certain -!! additional rights. These rights are described in the Nokia Qt LGPL -!! Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -!! package. -!! -!! If you have questions regarding the use of this file, please contact -!! Nokia at qt-info@nokia.com. -!! -!! -!! -!! -!! -!! -!! -!! -!! $QT_END_LICENSE$ -!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .text .align 4,0x90 diff --git a/src/corelib/arch/qatomic_windows.h b/src/corelib/arch/qatomic_windows.h index 6082d0b..07b0b25 100644 --- a/src/corelib/arch/qatomic_windows.h +++ b/src/corelib/arch/qatomic_windows.h @@ -102,9 +102,14 @@ #define QT_INTERLOCKED_CONCAT(prefix, suffix) \ QT_INTERLOCKED_CONCAT_I(prefix, suffix) -// MSVC intrinsics prefix function names with an underscore +// MSVC intrinsics prefix function names with an underscore. Also, if platform +// SDK headers have been included, the Interlocked names may be defined as +// macros. +// To avoid double underscores, we paste the prefix with Interlocked first and +// then the remainder of the function name. #define QT_INTERLOCKED_FUNCTION(name) \ - QT_INTERLOCKED_CONCAT(QT_INTERLOCKED_PREFIX, name) + QT_INTERLOCKED_CONCAT( \ + QT_INTERLOCKED_CONCAT(QT_INTERLOCKED_PREFIX, Interlocked), name) #ifdef QT_INTERLOCKED_NO_VOLATILE # define QT_INTERLOCKED_VOLATILE @@ -127,16 +132,16 @@ extern "C" { - long QT_INTERLOCKED_PROTOTYPE QT_INTERLOCKED_FUNCTION( InterlockedIncrement )(long QT_INTERLOCKED_VOLATILE *); - long QT_INTERLOCKED_PROTOTYPE QT_INTERLOCKED_FUNCTION( InterlockedDecrement )(long QT_INTERLOCKED_VOLATILE *); - long QT_INTERLOCKED_PROTOTYPE QT_INTERLOCKED_FUNCTION( InterlockedCompareExchange )(long QT_INTERLOCKED_VOLATILE *, long, long); - long QT_INTERLOCKED_PROTOTYPE QT_INTERLOCKED_FUNCTION( InterlockedExchange )(long QT_INTERLOCKED_VOLATILE *, long); - long QT_INTERLOCKED_PROTOTYPE QT_INTERLOCKED_FUNCTION( InterlockedExchangeAdd )(long QT_INTERLOCKED_VOLATILE *, long); + long QT_INTERLOCKED_PROTOTYPE QT_INTERLOCKED_FUNCTION( Increment )(long QT_INTERLOCKED_VOLATILE *); + long QT_INTERLOCKED_PROTOTYPE QT_INTERLOCKED_FUNCTION( Decrement )(long QT_INTERLOCKED_VOLATILE *); + long QT_INTERLOCKED_PROTOTYPE QT_INTERLOCKED_FUNCTION( CompareExchange )(long QT_INTERLOCKED_VOLATILE *, long, long); + long QT_INTERLOCKED_PROTOTYPE QT_INTERLOCKED_FUNCTION( Exchange )(long QT_INTERLOCKED_VOLATILE *, long); + long QT_INTERLOCKED_PROTOTYPE QT_INTERLOCKED_FUNCTION( ExchangeAdd )(long QT_INTERLOCKED_VOLATILE *, long); # if !defined(Q_OS_WINCE) && !defined(__i386__) && !defined(_M_IX86) - void * QT_INTERLOCKED_FUNCTION( InterlockedCompareExchangePointer )(void * QT_INTERLOCKED_VOLATILE *, void *, void *); - void * QT_INTERLOCKED_FUNCTION( InterlockedExchangePointer )(void * QT_INTERLOCKED_VOLATILE *, void *); - __int64 QT_INTERLOCKED_FUNCTION( InterlockedExchangeAdd64 )(__int64 QT_INTERLOCKED_VOLATILE *, __int64); + void * QT_INTERLOCKED_FUNCTION( CompareExchangePointer )(void * QT_INTERLOCKED_VOLATILE *, void *, void *); + void * QT_INTERLOCKED_FUNCTION( ExchangePointer )(void * QT_INTERLOCKED_VOLATILE *, void *); + __int64 QT_INTERLOCKED_FUNCTION( ExchangeAdd64 )(__int64 QT_INTERLOCKED_VOLATILE *, __int64); # endif } @@ -156,7 +161,7 @@ extern "C" { # pragma intrinsic (_InterlockedCompareExchange) # pragma intrinsic (_InterlockedExchangeAdd) -# ifndef _M_IX86 +# if !defined(Q_OS_WINCE) && !defined(_M_IX86) # pragma intrinsic (_InterlockedCompareExchangePointer) # pragma intrinsic (_InterlockedExchangePointer) # pragma intrinsic (_InterlockedExchangeAdd64) @@ -168,26 +173,26 @@ extern "C" { // Interlocked* replacement macros #define QT_INTERLOCKED_INCREMENT(value) \ - QT_INTERLOCKED_FUNCTION(InterlockedIncrement)( \ + QT_INTERLOCKED_FUNCTION( Increment )( \ QT_INTERLOCKED_REMOVE_VOLATILE( value ) ) #define QT_INTERLOCKED_DECREMENT(value) \ - QT_INTERLOCKED_FUNCTION(InterlockedDecrement)( \ + QT_INTERLOCKED_FUNCTION( Decrement )( \ QT_INTERLOCKED_REMOVE_VOLATILE( value ) ) #define QT_INTERLOCKED_COMPARE_EXCHANGE(value, newValue, expectedValue) \ - QT_INTERLOCKED_FUNCTION(InterlockedCompareExchange)( \ + QT_INTERLOCKED_FUNCTION( CompareExchange )( \ QT_INTERLOCKED_REMOVE_VOLATILE( value ), \ newValue, \ expectedValue ) #define QT_INTERLOCKED_EXCHANGE(value, newValue) \ - QT_INTERLOCKED_FUNCTION(InterlockedExchange)( \ + QT_INTERLOCKED_FUNCTION( Exchange )( \ QT_INTERLOCKED_REMOVE_VOLATILE( value ), \ newValue ) #define QT_INTERLOCKED_EXCHANGE_ADD(value, valueToAdd) \ - QT_INTERLOCKED_FUNCTION(InterlockedExchangeAdd)( \ + QT_INTERLOCKED_FUNCTION( ExchangeAdd )( \ QT_INTERLOCKED_REMOVE_VOLATILE( value ), \ valueToAdd ) @@ -195,36 +200,36 @@ extern "C" { # define QT_INTERLOCKED_COMPARE_EXCHANGE_POINTER(value, newValue, expectedValue) \ reinterpret_cast<void *>( \ - QT_INTERLOCKED_FUNCTION(InterlockedCompareExchange)( \ + QT_INTERLOCKED_FUNCTION( CompareExchange )( \ QT_INTERLOCKED_REMOVE_VOLATILE( value ## _integral ), \ (long)( newValue ), \ (long)( expectedValue ) )) # define QT_INTERLOCKED_EXCHANGE_POINTER(value, newValue) \ - QT_INTERLOCKED_FUNCTION(InterlockedExchange)( \ + QT_INTERLOCKED_FUNCTION( Exchange )( \ QT_INTERLOCKED_REMOVE_VOLATILE( value ## _integral ), \ (quintptr)( newValue ) ) # define QT_INTERLOCKED_EXCHANGE_ADD_POINTER(value, valueToAdd) \ - QT_INTERLOCKED_FUNCTION(InterlockedExchangeAdd)( \ + QT_INTERLOCKED_FUNCTION( ExchangeAdd )( \ QT_INTERLOCKED_REMOVE_VOLATILE( value ## _integral ), \ valueToAdd ) #else // !defined(Q_OS_WINCE) && !defined(__i386__) && !defined(_M_IX86) # define QT_INTERLOCKED_COMPARE_EXCHANGE_POINTER(value, newValue, expectedValue) \ - QT_INTERLOCKED_FUNCTION(InterlockedCompareExchangePointer)( \ + QT_INTERLOCKED_FUNCTION( CompareExchangePointer )( \ reinterpret_cast<void * QT_INTERLOCKED_VOLATILE *>( QT_INTERLOCKED_REMOVE_VOLATILE( value ) ), \ newValue, \ expectedValue ) # define QT_INTERLOCKED_EXCHANGE_POINTER(value, newValue) \ - QT_INTERLOCKED_FUNCTION(InterlockedExchangePointer)( \ + QT_INTERLOCKED_FUNCTION( ExchangePointer )( \ reinterpret_cast<void * QT_INTERLOCKED_VOLATILE *>( QT_INTERLOCKED_REMOVE_VOLATILE( value ) ), \ newValue ) # define QT_INTERLOCKED_EXCHANGE_ADD_POINTER(value, valueToAdd) \ - QT_INTERLOCKED_FUNCTION(InterlockedExchangeAdd64)( \ + QT_INTERLOCKED_FUNCTION( ExchangeAdd64 )( \ QT_INTERLOCKED_REMOVE_VOLATILE( value ## _integral ), \ valueToAdd ) diff --git a/src/corelib/arch/x86_64/qatomic_sun.s b/src/corelib/arch/x86_64/qatomic_sun.s index 4517fe4..37969e6 100644 --- a/src/corelib/arch/x86_64/qatomic_sun.s +++ b/src/corelib/arch/x86_64/qatomic_sun.s @@ -1,43 +1,3 @@ -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! -!! Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -!! Contact: Nokia Corporation (qt-info@nokia.com) -!! -!! This file is part of the QtGui module of the Qt Toolkit. -!! -!! $QT_BEGIN_LICENSE:LGPL$ -!! No Commercial Usage -!! This file contains pre-release code and may not be distributed. -!! You may use this file in accordance with the terms and conditions -!! contained in the Technology Preview License Agreement accompanying -!! this package. -!! -!! GNU Lesser General Public License Usage -!! Alternatively, this file may be used under the terms of the GNU Lesser -!! General Public License version 2.1 as published by the Free Software -!! Foundation and appearing in the file LICENSE.LGPL included in the -!! packaging of this file. Please review the following information to -!! ensure the GNU Lesser General Public License version 2.1 requirements -!! will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -!! -!! In addition, as a special exception, Nokia gives you certain -!! additional rights. These rights are described in the Nokia Qt LGPL -!! Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -!! package. -!! -!! If you have questions regarding the use of this file, please contact -!! Nokia at qt-info@nokia.com. -!! -!! -!! -!! -!! -!! -!! -!! -!! $QT_END_LICENSE$ -!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .code64 .globl q_atomic_increment diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index 68246f2..57be50a 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -1372,7 +1372,7 @@ inline void qt_noop() {} #ifdef QT_BOOTSTRAPPED # define QT_NO_EXCEPTIONS #endif -#if defined(Q_CC_GNU) && !defined (__EXCEPTIONS) +#if !defined(QT_NO_EXCEPTIONS) && defined(Q_CC_GNU) && !defined (__EXCEPTIONS) && !defined(Q_MOC_RUN) # define QT_NO_EXCEPTIONS #endif diff --git a/src/corelib/io/qfsfileengine_unix.cpp b/src/corelib/io/qfsfileengine_unix.cpp index 022211c..50b4af7 100644 --- a/src/corelib/io/qfsfileengine_unix.cpp +++ b/src/corelib/io/qfsfileengine_unix.cpp @@ -731,6 +731,8 @@ QAbstractFileEngine::FileFlags QFSFileEngine::fileFlags(FileFlags type) const } QAbstractFileEngine::FileFlags ret = 0; + if (type & FlagsMask) + ret |= LocalDiskFlag; bool exists = d->doStat(); if (!exists && !d->isSymlink()) return ret; @@ -796,7 +798,6 @@ QAbstractFileEngine::FileFlags QFSFileEngine::fileFlags(FileFlags type) const } } if (type & FlagsMask) { - ret |= LocalDiskFlag; if (exists) ret |= ExistsFlag; #if defined(Q_OS_SYMBIAN) diff --git a/src/corelib/kernel/qeventdispatcher_win.cpp b/src/corelib/kernel/qeventdispatcher_win.cpp index b7934db..c6ac6d4 100644 --- a/src/corelib/kernel/qeventdispatcher_win.cpp +++ b/src/corelib/kernel/qeventdispatcher_win.cpp @@ -331,7 +331,7 @@ public: WinTimerVec timerVec; WinTimerDict timerDict; void registerTimer(WinTimerInfo *t); - void unregisterTimer(WinTimerInfo *t); + void unregisterTimer(WinTimerInfo *t, bool closingDown = false); void sendTimerEvent(int timerId); // socket notifiers @@ -557,10 +557,10 @@ void QEventDispatcherWin32Private::registerTimer(WinTimerInfo *t) qErrnoWarning("QEventDispatcherWin32::registerTimer: Failed to create a timer"); } -void QEventDispatcherWin32Private::unregisterTimer(WinTimerInfo *t) +void QEventDispatcherWin32Private::unregisterTimer(WinTimerInfo *t, bool closingDown) { // mark timer as unused - if (!QObjectPrivate::get(t->obj)->inThreadChangeEvent) + if (!QObjectPrivate::get(t->obj)->inThreadChangeEvent && !closingDown) QAbstractEventDispatcherPrivate::releaseTimerId(t->timerId); if (t->interval == 0) { @@ -1019,8 +1019,10 @@ void QEventDispatcherWin32::closingDown() unregisterSocketNotifier((*(d->sn_except.begin()))->obj); // clean up any timers - while (!d->timerDict.isEmpty()) - unregisterTimer((*(d->timerDict.begin()))->timerId); + for (int i = 0; i < d->timerVec.count(); ++i) + d->unregisterTimer(d->timerVec.at(i), true); + d->timerVec.clear(); + d->timerDict.clear(); } bool QEventDispatcherWin32::event(QEvent *e) diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp index c0c97b8..e93c6ee 100644 --- a/src/corelib/kernel/qobject.cpp +++ b/src/corelib/kernel/qobject.cpp @@ -3965,11 +3965,19 @@ QDebug operator<<(QDebug dbg, const QObject *o) { \relates QObject This macro registers one or several \l{QFlags}{flags types} to the - meta-object system. + meta-object system. It is typically used in a class definition to declare + that values of a given enum can be used as flags and combined using the + bitwise OR operator. - Example: + For example, in QLibrary, the \l{QLibrary::LoadHints}{LoadHints} flag is + declared in the following way: + + \snippet doc/src/snippets/code/src_corelib_kernel_qobject.cpp 39a + + The declaration of the flags themselves is performed in the public section + of the QLibrary class itself, using the \l Q_DECLARE_FLAGS() macro: - \snippet doc/src/snippets/code/src_corelib_kernel_qobject.cpp 39 + \snippet doc/src/snippets/code/src_corelib_kernel_qobject.cpp 39b \note This macro takes care of registering individual flag values with the meta-object system, so it is unnecessary to use Q_ENUMS() diff --git a/src/corelib/statemachine/qstatemachine.cpp b/src/corelib/statemachine/qstatemachine.cpp index f562fb3..a5cdd45 100644 --- a/src/corelib/statemachine/qstatemachine.cpp +++ b/src/corelib/statemachine/qstatemachine.cpp @@ -78,13 +78,13 @@ QT_BEGIN_NAMESPACE /*! - \class QStateMachine - \reentrant + \class QStateMachine + \reentrant - \brief The QStateMachine class provides a hierarchical finite state machine. + \brief The QStateMachine class provides a hierarchical finite state machine. - \since 4.6 - \ingroup statemachine + \since 4.6 + \ingroup statemachine QStateMachine is based on the concepts and notation of \l{Statecharts: A visual formalism for complex @@ -128,21 +128,7 @@ QT_BEGIN_NAMESPACE The following snippet shows a state machine that will finish when a button is clicked: - \code - QPushButton button; - - QStateMachine machine; - QState *s1 = new QState(); - s1->assignProperty(&button, "text", "Click me"); - - QFinalState *s2 = new QFinalState(); - s1->addTransition(&button, SIGNAL(clicked()), s2); - - machine.addState(s1); - machine.addState(s2); - machine.setInitialState(s1); - machine.start(); - \endcode + \snippet doc/src/snippets/code/src_corelib_statemachine_qstatemachine.cpp simple state machine This code example uses QState, which inherits QAbstractState. The QState class provides a state that you can use to set properties @@ -160,17 +146,7 @@ QT_BEGIN_NAMESPACE no error state applies to the erroneous state, the machine will stop executing and an error message will be printed to the console. - \omit This stuff will be moved elsewhere -This is - typically used in conjunction with \l{Signals and Slots}{signals}; the - signals determine the flow of the state graph, whereas the states' property - assignments and method invocations are the actions. - - The postEvent() function posts an event to the state machine. This is useful - when you are using custom events to trigger transitions. - \endomit - - \sa QAbstractState, QAbstractTransition, QState, {The State Machine Framework} + \sa QAbstractState, QAbstractTransition, QState, {The State Machine Framework} */ /*! @@ -1748,6 +1724,10 @@ bool QStateMachine::isRunning() const transition to the initial state. When a final top-level state (QFinalState) is entered, the machine will emit the finished() signal. + \note A state machine will not run without a running event loop, such as + the main application event loop started with QCoreApplication::exec() or + QApplication::exec(). + \sa started(), finished(), stop(), initialState() */ void QStateMachine::start() diff --git a/src/gui/dialogs/qfiledialog_embedded.ui b/src/gui/dialogs/qfiledialog_embedded.ui index 1bd189e..f134f64 100644 --- a/src/gui/dialogs/qfiledialog_embedded.ui +++ b/src/gui/dialogs/qfiledialog_embedded.ui @@ -2,6 +2,7 @@ <comment>********************************************************************* ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the QtGui module of the Qt Toolkit. ** diff --git a/src/gui/effects/qgraphicseffect.cpp b/src/gui/effects/qgraphicseffect.cpp index 6629a6d..dd64ced 100644 --- a/src/gui/effects/qgraphicseffect.cpp +++ b/src/gui/effects/qgraphicseffect.cpp @@ -67,7 +67,6 @@ \o QGraphicsOpacityEffect - renders the item with an opacity \o QGraphicsPixelizeEffect - pixelizes the item with any pixel size \o QGraphicsGrayscaleEffect - renders the item in shades of gray - \o QGraphicsShaderEffect - renders the item with a pixel shader fragment \endlist \img graphicseffect-effects.png diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp index 1d55534..8bd3648 100644 --- a/src/gui/graphicsview/qgraphicsitem.cpp +++ b/src/gui/graphicsview/qgraphicsitem.cpp @@ -303,13 +303,17 @@ drop shadow effects and for decoration objects that follow the parent item's geometry without drawing on top of it. - \value ItemUsesExtendedStyleOption The item makes use of either the - exposedRect or matrix member of the QStyleOptionGraphicsItem. Implementers - of QGraphicsItem subclasses should set that flag if this data is required. - By default, the exposedRect is initialized to the item's boundingRect and - the matrix is untransformed. Enable this flag for more fine-grained values. - Use QStyleOptionGraphicsItem::levelOfDetailFromTransform() for a more - fine-grained value. + \value ItemUsesExtendedStyleOption The item makes use of either + \l{QStyleOptionGraphicsItem::}{exposedRect} or + \l{QStyleOptionGraphicsItem::}{matrix} in QStyleOptionGraphicsItem. By default, + the \l{QStyleOptionGraphicsItem::}{exposedRect} is initialized to the item's + boundingRect() and the \l{QStyleOptionGraphicsItem::}{matrix} is untransformed. + You can enable this flag for the style options to be set up with more + fine-grained values. + Note that QStyleOptionGraphicsItem::levelOfDetail is unaffected by this flag + and always initialized to 1. Use + QStyleOptionGraphicsItem::levelOfDetailFromTransform() if you need a higher + value. \value ItemHasNoContents The item does not paint anything (i.e., calling paint() on the item has no effect). You should set this flag on items that @@ -926,7 +930,7 @@ void QGraphicsItemPrivate::setParentItemHelper(QGraphicsItem *newParent) } QGraphicsItem *lastSubFocusItem = subFocusItem; - if (subFocusItem) { + if (subFocusItem && !inDestructor) { // Update the child focus chain; when reparenting an item that has a // focus child, ensure that that focus child clears its focus child // chain from our parents before it's reparented. @@ -4779,7 +4783,7 @@ void QGraphicsItemPrivate::updateCachedClipPathFromSetPosHelper(const QPointF &n { Q_ASSERT(inSetPosHelper); - if (!(ancestorFlags & QGraphicsItemPrivate::AncestorClipsChildren)) + if (inDestructor || !(ancestorFlags & QGraphicsItemPrivate::AncestorClipsChildren)) return; // Not clipped by any ancestor. // Find closest clip ancestor and transform. @@ -4796,10 +4800,14 @@ void QGraphicsItemPrivate::updateCachedClipPathFromSetPosHelper(const QPointF &n if (clipParent && clipParent->d_ptr->inDestructor) return; - // thisToParentTransform is now the same as q->itemTransform(clipParent), except - // that the new position (which is not yet set on the item) is taken into account. - Q_ASSERT(clipParent); - Q_ASSERT(clipParent->d_ptr->flags & QGraphicsItem::ItemClipsChildrenToShape); + // Ensure no parents are currently being deleted. This can only + // happen if the item is moved by a dying ancestor. + QGraphicsItem *p = clipParent; + while (p) { + if (p->d_ptr->inDestructor) + return; + p = p->d_ptr->parent; + } // From here everything is calculated in clip parent's coordinates. const QRectF parentBoundingRect(clipParent->boundingRect()); @@ -6861,6 +6869,8 @@ void QGraphicsItem::removeFromIndex() */ void QGraphicsItem::prepareGeometryChange() { + if (d_ptr->inDestructor) + return; if (d_ptr->scene) { d_ptr->scene->d_func()->dirtyGrowingItemsBoundingRect = true; d_ptr->geometryChanged = 1; diff --git a/src/gui/graphicsview/qgraphicswidget.cpp b/src/gui/graphicsview/qgraphicswidget.cpp index afabf49..d0f3b99 100644 --- a/src/gui/graphicsview/qgraphicswidget.cpp +++ b/src/gui/graphicsview/qgraphicswidget.cpp @@ -687,11 +687,13 @@ QSizeF QGraphicsWidget::sizeHint(Qt::SizeHint which, const QSizeF &constraint) c Q_D(const QGraphicsWidget); QSizeF sh; if (d->layout) { - sh = d->layout->effectiveSizeHint(which, constraint); + QSizeF marginSize(0,0); if (d->margins) { - sh += QSizeF(d->margins[d->Left] + d->margins[d->Right], + marginSize = QSizeF(d->margins[d->Left] + d->margins[d->Right], d->margins[d->Top] + d->margins[d->Bottom]); } + sh = d->layout->effectiveSizeHint(which, constraint - marginSize); + sh += marginSize; } else { switch (which) { case Qt::MinimumSize: diff --git a/src/gui/graphicsview/qgraphicswidget_p.cpp b/src/gui/graphicsview/qgraphicswidget_p.cpp index 787bbb1..bf826a9 100644 --- a/src/gui/graphicsview/qgraphicswidget_p.cpp +++ b/src/gui/graphicsview/qgraphicswidget_p.cpp @@ -393,49 +393,162 @@ void QGraphicsWidgetPrivate::windowFrameMousePressEvent(QGraphicsSceneMouseEvent event->setAccepted(windowData->grabbedSection != Qt::NoSection); } +/*! + Used to calculate the + Precondition: + \a widget should support either hfw or wfh + + If \a heightForWidth is set to false, this function will query the width for height + instead. \a width will then be interpreted as height, \a minh and \a maxh will be interpreted + as minimum width and maximum width. + */ +static qreal minimumHeightForWidth(qreal width, qreal minh, qreal maxh, + const QGraphicsWidget *widget, + bool heightForWidth = true) +{ + qreal minimumHeightForWidth = -1; + const QSizePolicy sp = widget->layout() ? widget->layout()->sizePolicy() : widget->sizePolicy(); + const bool hasHFW = sp.hasHeightForWidth(); + if (hasHFW == heightForWidth) { + minimumHeightForWidth = hasHFW + ? widget->effectiveSizeHint(Qt::MinimumSize, QSizeF(width, -1)).height() + : widget->effectiveSizeHint(Qt::MinimumSize, QSizeF(-1, width)).width(); //"width" is here height! + } else { + // widthForHeight + const qreal constraint = width; + while (maxh - minh > 0.1) { + qreal middle = minh + (maxh - minh)/2; + // ### really bad, if we are a widget with a layout it will call + // layout->effectiveSizeHint(Qt::MiniumumSize), which again will call + // sizeHint three times because of how the cache works + qreal hfw = hasHFW + ? widget->effectiveSizeHint(Qt::MinimumSize, QSizeF(middle, -1)).height() + : widget->effectiveSizeHint(Qt::MinimumSize, QSizeF(-1, middle)).width(); + if (hfw > constraint) { + minh = middle; + } else if (hfw <= constraint) { + maxh = middle; + } + } + minimumHeightForWidth = maxh; + } + return minimumHeightForWidth; +} + +static qreal minimumWidthForHeight(qreal height, qreal minw, qreal maxw, + const QGraphicsWidget *widget) +{ + return minimumHeightForWidth(height, minw, maxw, widget, false); +} + +static QSizeF closestAcceptableSize(const QSizeF &proposed, + const QGraphicsWidget *widget) +{ + const QSizeF current = widget->size(); + + qreal minw = proposed.width(); + qreal maxw = current.width(); + qreal minh = proposed.height(); + qreal maxh = current.height(); + + qreal middlew = maxw; + qreal middleh = maxh; + qreal min_hfw; + min_hfw = minimumHeightForWidth(maxw, minh, maxh, widget); + + do { + if (maxw - minw < 0.1) { + // we still havent found anything, cut off binary search + minw = maxw; + minh = maxh; + } + middlew = minw + (maxw - minw)/2.0; + middleh = minh + (maxh - minh)/2.0; + + min_hfw = minimumHeightForWidth(middlew, minh, maxh, widget); + + if (min_hfw > middleh) { + minw = middlew; + minh = middleh; + } else if (min_hfw <= middleh) { + maxw = middlew; + maxh = middleh; + } + } while (maxw != minw); + + min_hfw = minimumHeightForWidth(middlew, minh, maxh, widget); + + QSizeF result; + if (min_hfw < maxh) { + result = QSizeF(middlew, min_hfw); + } else { + // Needed because of the cut-off we do above. + result = QSizeF(minimumWidthForHeight(maxh, proposed.width(), current.width(), widget), maxh); + } + return result; +} + static void _q_boundGeometryToSizeConstraints(const QRectF &startGeometry, QRectF *rect, Qt::WindowFrameSection section, - const QSizeF &min, const QSizeF &max) + const QSizeF &min, const QSizeF &max, + const QGraphicsWidget *widget) { - int height; - int width; + const QRectF proposedRect = *rect; + qreal width = qBound(min.width(), proposedRect.width(), max.width()); + qreal height = qBound(min.height(), proposedRect.height(), max.height()); + + QSizePolicy sp = widget->sizePolicy(); + if (const QGraphicsLayout *l = widget->layout()) { + sp = l->sizePolicy(); + } + const bool hasHFW = sp.hasHeightForWidth(); // || sp.hasWidthForHeight(); + + const bool widthChanged = proposedRect.width() < widget->size().width(); + const bool heightChanged = proposedRect.height() < widget->size().height(); + + if (hasHFW) { + if (widthChanged || heightChanged) { + const qreal minh = min.height(); + const qreal maxh = max.height(); + const qreal proposedHFW = minimumHeightForWidth(width, minh, maxh, widget); + if (proposedHFW > proposedRect.height()) { + QSizeF effectiveSize = closestAcceptableSize(QSizeF(width, height), widget); + width = effectiveSize.width(); + height = effectiveSize.height(); + } + } + } + switch (section) { case Qt::LeftSection: - width = qRound(qBound(min.width(), rect->width(), max.width())); - rect->setRect(startGeometry.right() - width, startGeometry.top(), - width, startGeometry.height()); + rect->setRect(startGeometry.right() - qRound(width), startGeometry.top(), + qRound(width), startGeometry.height()); break; case Qt::TopLeftSection: - width = qRound(qBound(min.width(), rect->width(), max.width())); - height = qRound(qBound(min.height(), rect->height(), max.height())); - rect->setRect(startGeometry.right() - width, startGeometry.bottom() - height, - width, height); + rect->setRect(startGeometry.right() - qRound(width), startGeometry.bottom() - qRound(height), + qRound(width), qRound(height)); break; case Qt::TopSection: - height = qRound(qBound(min.height(), rect->height(), max.height())); - rect->setRect(startGeometry.left(), startGeometry.bottom() - height, - startGeometry.width(), height); + rect->setRect(startGeometry.left(), startGeometry.bottom() - qRound(height), + startGeometry.width(), qRound(height)); break; case Qt::TopRightSection: - height = qRound(qBound(min.height(), rect->height(), max.height())); - rect->setTop(rect->bottom() - height); - rect->setWidth(qBound(min.width(), rect->width(), max.width())); + rect->setTop(rect->bottom() - qRound(height)); + rect->setWidth(qRound(width)); break; case Qt::RightSection: - rect->setWidth(qBound(min.width(), rect->width(), max.width())); + rect->setWidth(qRound(width)); break; case Qt::BottomRightSection: - rect->setWidth(qBound(min.width(), rect->width(), max.width())); - rect->setHeight(qBound(min.height(), rect->height(), max.height())); + rect->setWidth(qRound(width)); + rect->setHeight(qRound(height)); break; case Qt::BottomSection: - rect->setHeight(qBound(min.height(), rect->height(), max.height())); + rect->setHeight(qRound(height)); break; case Qt::BottomLeftSection: - height = qRound(qBound(min.height(), rect->height(), max.height())); - width = qRound(qBound(min.width(), rect->width(), max.width())); - rect->setRect(startGeometry.right() - width, startGeometry.top(), - width, height); + rect->setRect(startGeometry.right() - qRound(width), startGeometry.top(), + qRound(width), qRound(height)); break; default: break; @@ -506,7 +619,8 @@ void QGraphicsWidgetPrivate::windowFrameMouseMoveEvent(QGraphicsSceneMouseEvent _q_boundGeometryToSizeConstraints(windowData->startGeometry, &newGeometry, windowData->grabbedSection, q->effectiveSizeHint(Qt::MinimumSize), - q->effectiveSizeHint(Qt::MaximumSize)); + q->effectiveSizeHint(Qt::MaximumSize), + q); q->setGeometry(newGeometry); } } diff --git a/src/gui/itemviews/qabstractitemview.cpp b/src/gui/itemviews/qabstractitemview.cpp index ea98cb2..52529ff 100644 --- a/src/gui/itemviews/qabstractitemview.cpp +++ b/src/gui/itemviews/qabstractitemview.cpp @@ -1537,8 +1537,7 @@ void QAbstractItemView::mousePressEvent(QMouseEvent *event) QPoint offset = d->offset(); if ((command & QItemSelectionModel::Current) == 0) d->pressedPosition = pos + offset; - - if (d->pressedPosition == QPoint(-1, -1)) + else if (!indexAt(d->pressedPosition).isValid()) d->pressedPosition = visualRect(currentIndex()).center() + offset; if (edit(index, NoEditTriggers, event)) @@ -2089,8 +2088,8 @@ void QAbstractItemView::keyPressEvent(QKeyEvent *event) // note that we don't check if the new current index is enabled because moveCursor() makes sure it is if (command & QItemSelectionModel::Current) { d->selectionModel->setCurrentIndex(newCurrent, QItemSelectionModel::NoUpdate); - if (d->pressedPosition == QPoint(-1, -1)) - d->pressedPosition = visualRect(oldCurrent).center(); + if (!indexAt(d->pressedPosition).isValid()) + d->pressedPosition = visualRect(oldCurrent).center() + d->offset(); QRect rect(d->pressedPosition - d->offset(), visualRect(newCurrent).center()); setSelection(rect, command); } else { diff --git a/src/gui/itemviews/qlistview.cpp b/src/gui/itemviews/qlistview.cpp index fc801ad..5b5cfa1 100644 --- a/src/gui/itemviews/qlistview.cpp +++ b/src/gui/itemviews/qlistview.cpp @@ -1804,12 +1804,12 @@ QItemSelection QListViewPrivate::selection(const QRect &rect) const void QCommonListViewBase::appendHiddenRow(int row) { - dd->hiddenRows.append(dd->model->index(row, 0)); + dd->hiddenRows.append(dd->model->index(row, 0, qq->rootIndex())); } void QCommonListViewBase::removeHiddenRow(int row) { - dd->hiddenRows.remove(dd->hiddenRows.indexOf(dd->model->index(row, 0))); + dd->hiddenRows.remove(dd->hiddenRows.indexOf(dd->model->index(row, 0, qq->rootIndex()))); } void QCommonListViewBase::updateHorizontalScrollBar(const QSize &step) diff --git a/src/gui/kernel/qapplication_win.cpp b/src/gui/kernel/qapplication_win.cpp index 84edf1f..729b791 100644 --- a/src/gui/kernel/qapplication_win.cpp +++ b/src/gui/kernel/qapplication_win.cpp @@ -2035,7 +2035,6 @@ LRESULT CALLBACK QtWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam #endif // Ignore the activate message send by WindowsXP to a minimized window #ifdef Q_WS_WINCE_WM - { if (widget->windowState() & Qt::WindowFullScreen) qt_wince_hide_taskbar(widget->winId()); #endif diff --git a/src/gui/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp index a61b6fa..0b282bc 100644 --- a/src/gui/kernel/qevent.cpp +++ b/src/gui/kernel/qevent.cpp @@ -3648,13 +3648,13 @@ QMenubarUpdatedEvent::QMenubarUpdatedEvent(QMenuBar * const menuBar) \i As mentioned above, enabling touch events means multiple widgets can be receiving touch events simultaneously. Combined with the default QWidget::event() handling for QTouchEvents, this gives you great flexibility in designing multi-touch user interfaces. Be aware of the - implications. For example, is is possible that the user is moving a QSlider with one finger and + implications. For example, it is possible that the user is moving a QSlider with one finger and pressing a QPushButton with another. The signals emitted by these widgets will be interleaved. \i Recursion into the event loop using one of the exec() methods (e.g., QDialog::exec() or QMenu::exec()) in a QTouchEvent event handler is not supported. Since there are multiple event - recipients, unexpected recursion may cause problems, including but not limited to lost events + recipients, recursion may cause problems, including but not limited to lost events and unexpected infinite recursion. \i QTouchEvents are not affected by a \l{QWidget::grabMouse()}{mouse grab} or an diff --git a/src/gui/kernel/qgesture.cpp b/src/gui/kernel/qgesture.cpp index 7831893..32502db 100644 --- a/src/gui/kernel/qgesture.cpp +++ b/src/gui/kernel/qgesture.cpp @@ -131,9 +131,9 @@ private: about the gesture is contained in the signal sender object. */ -/*! \fn void QGesture::cancelled() +/*! \fn void QGesture::canceled() - The signal is emitted when the gesture is cancelled, for example the + The signal is emitted when the gesture is canceled, for example the reset() function is called while the gesture was in the process of emitting a triggered() signal. Extended information about the gesture is contained in the sender object. @@ -230,7 +230,7 @@ Qt::GestureState QGesture::state() const \a state, and it should be called after all the internal properties have been initialized. - \sa started(), triggered(), finished(), cancelled() + \sa started(), triggered(), finished(), canceled() */ void QGesture::updateState(Qt::GestureState state) { @@ -258,7 +258,7 @@ void QGesture::updateState(Qt::GestureState state) else if (state == Qt::GestureFinished) emit finished(); else if (state == Qt::NoGesture) - emit cancelled(); + emit canceled(); if (state == Qt::GestureFinished) { // gesture is finished, so we reset the internal state. @@ -301,7 +301,7 @@ QGraphicsItem* QGesture::graphicsItem() const Resets the internal state of the gesture. This function might be called by the filterEvent() implementation in a derived class, or by the user to cancel a gesture. The base class implementation calls - updateState(Qt::NoGesture) which emits the cancelled() + updateState(Qt::NoGesture) which emits the canceled() signal if the state() of the gesture indicated it was active. */ void QGesture::reset() diff --git a/src/gui/kernel/qgesture.h b/src/gui/kernel/qgesture.h index ee6f8b3..23c64b2 100644 --- a/src/gui/kernel/qgesture.h +++ b/src/gui/kernel/qgesture.h @@ -90,7 +90,7 @@ Q_SIGNALS: void started(); void triggered(); void finished(); - void cancelled(); + void canceled(); private: friend class QWidget; diff --git a/src/gui/kernel/qsizepolicy.h b/src/gui/kernel/qsizepolicy.h index 4261dda..eb13788 100644 --- a/src/gui/kernel/qsizepolicy.h +++ b/src/gui/kernel/qsizepolicy.h @@ -64,6 +64,7 @@ private: VMask = HMask << HSize, CTShift = 9, CTSize = 5, + WFHShift = CTShift + CTSize, CTMask = ((0x1 << CTSize) - 1) << CTShift, UnusedShift = CTShift + CTSize, UnusedSize = 2 @@ -199,6 +200,17 @@ private: QSizePolicy(int i) : data(i) { } quint32 data; +/* use bit flags instead, keep it here for improved readability for now + quint32 horzPolicy : 4; + quint32 vertPolicy : 4; + quint32 hfw : 1; + quint32 ctype : 5; + quint32 wfh : 1; + quint32 padding : 1; // we cannot use the highest bit + quint32 horStretch : 8; + quint32 verStretch : 8; +*/ + }; Q_DECLARE_OPERATORS_FOR_FLAGS(QSizePolicy::ControlTypes) diff --git a/src/gui/kernel/qx11embed_x11.cpp b/src/gui/kernel/qx11embed_x11.cpp index 8e2eb1e..3140af9 100644 --- a/src/gui/kernel/qx11embed_x11.cpp +++ b/src/gui/kernel/qx11embed_x11.cpp @@ -123,8 +123,8 @@ QT_BEGIN_NAMESPACE emitted. There are XEmbed widgets available for KDE and GTK+. The GTK+ - equivalent of QX11EmbedWidget is GtkPlug. The KDE widget is called - QXEmbed. + equivalent of QX11EmbedWidget is GtkPlug. The corresponding KDE 3 + widget is called QXEmbed. \sa QX11EmbedContainer, {XEmbed Specification} */ @@ -177,8 +177,8 @@ QT_BEGIN_NAMESPACE features such as window activation and focus handling are then lost. - The GTK+ equivalent of QX11EmbedContainer is GtkSocket. The KDE - widget is called QXEmbed. + The GTK+ equivalent of QX11EmbedContainer is GtkSocket. The + corresponding KDE 3 widget is called QXEmbed. \sa QX11EmbedWidget, {XEmbed Specification} */ diff --git a/src/gui/math3d/qgenericmatrix.cpp b/src/gui/math3d/qgenericmatrix.cpp index 290c9c2..b5d8824 100644 --- a/src/gui/math3d/qgenericmatrix.cpp +++ b/src/gui/math3d/qgenericmatrix.cpp @@ -50,19 +50,14 @@ QT_BEGIN_NAMESPACE \ingroup painting \ingroup painting-3D - The QGenericMatrix template has four parameters: + The QGenericMatrix template has three parameters: \table \row \i N \i Number of columns. \row \i M \i Number of rows. \row \i T \i Element type that is visible to users of the class. - \row \i InnerT \i Element type that is used inside the class. \endtable - Normally T and InnerT are the same type; e.g. float or double. - But they can be different if the user wants to store elements - internally in a fixed-point format for the underlying hardware. - \sa QMatrix4x4 */ @@ -73,7 +68,7 @@ QT_BEGIN_NAMESPACE */ /*! - \fn QGenericMatrix::QGenericMatrix(const QGenericMatrix<N, M, T, InnerT>& other) + \fn QGenericMatrix::QGenericMatrix(const QGenericMatrix<N, M, T>& other) Constructs a copy of \a other. */ @@ -89,13 +84,14 @@ QT_BEGIN_NAMESPACE */ /*! - \fn T QGenericMatrix::operator()(int row, int column) const + \fn const T& QGenericMatrix::operator()(int row, int column) const - Returns the element at position (\a row, \a column) in this matrix. + Returns a constant reference to the element at position + (\a row, \a column) in this matrix. */ /*! - \fn InnerT& QGenericMatrix::operator()(int row, int column) + \fn T& QGenericMatrix::operator()(int row, int column) Returns a reference to the element at position (\a row, \a column) in this matrix so that the element can be assigned to. @@ -130,57 +126,57 @@ QT_BEGIN_NAMESPACE */ /*! - \fn QGenericMatrix<N, M, T, InnerT>& QGenericMatrix::operator+=(const QGenericMatrix<N, M, T, InnerT>& other) + \fn QGenericMatrix<N, M, T>& QGenericMatrix::operator+=(const QGenericMatrix<N, M, T>& other) Adds the contents of \a other to this matrix. */ /*! - \fn QGenericMatrix<N, M, T, InnerT>& QGenericMatrix::operator-=(const QGenericMatrix<N, M, T, InnerT>& other) + \fn QGenericMatrix<N, M, T>& QGenericMatrix::operator-=(const QGenericMatrix<N, M, T>& other) Subtracts the contents of \a other from this matrix. */ /*! - \fn QGenericMatrix<N, M, T, InnerT>& QGenericMatrix::operator*=(T factor) + \fn QGenericMatrix<N, M, T>& QGenericMatrix::operator*=(T factor) Multiplies all elements of this matrix by \a factor. */ /*! - \fn QGenericMatrix<N, M, T, InnerT>& QGenericMatrix::operator/=(T divisor) + \fn QGenericMatrix<N, M, T>& QGenericMatrix::operator/=(T divisor) Divides all elements of this matrix by \a divisor. */ /*! - \fn bool QGenericMatrix::operator==(const QGenericMatrix<N, M, T, InnerT>& other) const + \fn bool QGenericMatrix::operator==(const QGenericMatrix<N, M, T>& other) const Returns true if this matrix is identical to \a other; false otherwise. */ /*! - \fn bool QGenericMatrix::operator!=(const QGenericMatrix<N, M, T, InnerT>& other) const + \fn bool QGenericMatrix::operator!=(const QGenericMatrix<N, M, T>& other) const Returns true if this matrix is not identical to \a other; false otherwise. */ /*! - \fn QGenericMatrix<N, M, T, InnerT> operator+(const QGenericMatrix<N, M, T, InnerT>& m1, const QGenericMatrix<N, M, T, InnerT>& m2) + \fn QGenericMatrix<N, M, T> operator+(const QGenericMatrix<N, M, T>& m1, const QGenericMatrix<N, M, T>& m2) \relates QGenericMatrix Returns the sum of \a m1 and \a m2. */ /*! - \fn QGenericMatrix<N, M, T, InnerT> operator-(const QGenericMatrix<N, M, T, InnerT>& m1, const QGenericMatrix<N, M, T, InnerT>& m2) + \fn QGenericMatrix<N, M, T> operator-(const QGenericMatrix<N, M, T>& m1, const QGenericMatrix<N, M, T>& m2) \relates QGenericMatrix Returns the difference of \a m1 and \a m2. */ /*! - \fn QGenericMatrix<M1, M2, T, InnerT> operator*(const QGenericMatrix<N, M2, T, InnerT>& m1, const QGenericMatrix<M1, N, T, InnerT>& m2) + \fn QGenericMatrix<M1, M2, T> operator*(const QGenericMatrix<N, M2, T>& m1, const QGenericMatrix<M1, N, T>& m2) \relates QGenericMatrix Returns the product of the NxM2 matrix \a m1 and the M1xN matrix \a m2 @@ -188,7 +184,7 @@ QT_BEGIN_NAMESPACE */ /*! - \fn QGenericMatrix<N, M, T, InnerT> operator-(const QGenericMatrix<N, M, T, InnerT>& matrix) + \fn QGenericMatrix<N, M, T> operator-(const QGenericMatrix<N, M, T>& matrix) \overload \relates QGenericMatrix @@ -196,21 +192,21 @@ QT_BEGIN_NAMESPACE */ /*! - \fn QGenericMatrix<N, M, T, InnerT> operator*(T factor, const QGenericMatrix<N, M, T, InnerT>& matrix) + \fn QGenericMatrix<N, M, T> operator*(T factor, const QGenericMatrix<N, M, T>& matrix) \relates QGenericMatrix Returns the result of multiplying all elements of \a matrix by \a factor. */ /*! - \fn QGenericMatrix<N, M, T, InnerT> operator*(const QGenericMatrix<N, M, T, InnerT>& matrix, T factor) + \fn QGenericMatrix<N, M, T> operator*(const QGenericMatrix<N, M, T>& matrix, T factor) \relates QGenericMatrix Returns the result of multiplying all elements of \a matrix by \a factor. */ /*! - \fn QGenericMatrix<N, M, T, InnerT> operator/(const QGenericMatrix<N, M, T, InnerT>& matrix, T divisor) + \fn QGenericMatrix<N, M, T> operator/(const QGenericMatrix<N, M, T>& matrix, T divisor) \relates QGenericMatrix Returns the result of dividing all elements of \a matrix by \a divisor. @@ -224,28 +220,25 @@ QT_BEGIN_NAMESPACE */ /*! - \fn InnerT *QGenericMatrix::data() + \fn T *QGenericMatrix::data() - Returns a pointer to the raw data of this matrix. This is intended - for use with raw GL functions. + Returns a pointer to the raw data of this matrix. \sa constData() */ /*! - \fn const InnerT *QGenericMatrix::data() const + \fn const T *QGenericMatrix::data() const Returns a constant pointer to the raw data of this matrix. - This is intended for use with raw GL functions. \sa constData() */ /*! - \fn const InnerT *QGenericMatrix::constData() const + \fn const T *QGenericMatrix::constData() const Returns a constant pointer to the raw data of this matrix. - This is intended for use with raw GL functions. \sa data() */ diff --git a/src/gui/math3d/qgenericmatrix.h b/src/gui/math3d/qgenericmatrix.h index fe7ba5f..39c4ed8 100644 --- a/src/gui/math3d/qgenericmatrix.h +++ b/src/gui/math3d/qgenericmatrix.h @@ -51,103 +51,103 @@ QT_BEGIN_NAMESPACE QT_MODULE(Gui) -template <int N, int M, typename T, typename InnerT = T> +template <int N, int M, typename T> class QGenericMatrix { public: QGenericMatrix(); - QGenericMatrix(const QGenericMatrix<N, M, T, InnerT>& other); + QGenericMatrix(const QGenericMatrix<N, M, T>& other); explicit QGenericMatrix(const T *values); - T operator()(int row, int column) const; - InnerT& operator()(int row, int column); + const T& operator()(int row, int column) const; + T& operator()(int row, int column); bool isIdentity() const; void setIdentity(); void fill(T value); - QGenericMatrix<M, N, T, InnerT> transposed() const; + QGenericMatrix<M, N, T> transposed() const; - QGenericMatrix<N, M, T, InnerT>& operator+=(const QGenericMatrix<N, M, T, InnerT>& other); - QGenericMatrix<N, M, T, InnerT>& operator-=(const QGenericMatrix<N, M, T, InnerT>& other); - QGenericMatrix<N, M, T, InnerT>& operator*=(T factor); - QGenericMatrix<N, M, T, InnerT>& operator/=(T divisor); - bool operator==(const QGenericMatrix<N, M, T, InnerT>& other) const; - bool operator!=(const QGenericMatrix<N, M, T, InnerT>& other) const; + QGenericMatrix<N, M, T>& operator+=(const QGenericMatrix<N, M, T>& other); + QGenericMatrix<N, M, T>& operator-=(const QGenericMatrix<N, M, T>& other); + QGenericMatrix<N, M, T>& operator*=(T factor); + QGenericMatrix<N, M, T>& operator/=(T divisor); + bool operator==(const QGenericMatrix<N, M, T>& other) const; + bool operator!=(const QGenericMatrix<N, M, T>& other) const; void toValueArray(T *values); - InnerT *data() { return m[0]; } - const InnerT *data() const { return m[0]; } - const InnerT *constData() const { return m[0]; } + T *data() { return m[0]; } + const T *data() const { return m[0]; } + const T *constData() const { return m[0]; } #if !defined(Q_NO_TEMPLATE_FRIENDS) - template<int NN, int MM, typename TT, typename ITT> - friend QGenericMatrix<NN, MM, TT, ITT> operator+(const QGenericMatrix<NN, MM, TT, ITT>& m1, const QGenericMatrix<NN, MM, TT, ITT>& m2); - template<int NN, int MM, typename TT, typename ITT> - friend QGenericMatrix<NN, MM, TT, ITT> operator-(const QGenericMatrix<NN, MM, TT, ITT>& m1, const QGenericMatrix<NN, MM, TT, ITT>& m2); - template<int NN, int M1, int M2, typename TT, typename ITT> - friend QGenericMatrix<M1, M2, TT, ITT> operator*(const QGenericMatrix<NN, M2, TT, ITT>& m1, const QGenericMatrix<M1, NN, TT, ITT>& m2); - template<int NN, int MM, typename TT, typename ITT> - friend QGenericMatrix<NN, MM, TT, ITT> operator-(const QGenericMatrix<NN, MM, TT, ITT>& matrix); - template<int NN, int MM, typename TT, typename ITT> - friend QGenericMatrix<NN, MM, TT, ITT> operator*(TT factor, const QGenericMatrix<NN, MM, TT, ITT>& matrix); - template<int NN, int MM, typename TT, typename ITT> - friend QGenericMatrix<NN, MM, TT, ITT> operator*(const QGenericMatrix<NN, MM, TT, ITT>& matrix, TT factor); - template<int NN, int MM, typename TT, typename ITT> - friend QGenericMatrix<NN, MM, TT, ITT> operator/(const QGenericMatrix<NN, MM, TT, ITT>& matrix, TT divisor); + template<int NN, int MM, typename TT> + friend QGenericMatrix<NN, MM, TT> operator+(const QGenericMatrix<NN, MM, TT>& m1, const QGenericMatrix<NN, MM, TT>& m2); + template<int NN, int MM, typename TT> + friend QGenericMatrix<NN, MM, TT> operator-(const QGenericMatrix<NN, MM, TT>& m1, const QGenericMatrix<NN, MM, TT>& m2); + template<int NN, int M1, int M2, typename TT> + friend QGenericMatrix<M1, M2, TT> operator*(const QGenericMatrix<NN, M2, TT>& m1, const QGenericMatrix<M1, NN, TT>& m2); + template<int NN, int MM, typename TT> + friend QGenericMatrix<NN, MM, TT> operator-(const QGenericMatrix<NN, MM, TT>& matrix); + template<int NN, int MM, typename TT> + friend QGenericMatrix<NN, MM, TT> operator*(TT factor, const QGenericMatrix<NN, MM, TT>& matrix); + template<int NN, int MM, typename TT> + friend QGenericMatrix<NN, MM, TT> operator*(const QGenericMatrix<NN, MM, TT>& matrix, TT factor); + template<int NN, int MM, typename TT> + friend QGenericMatrix<NN, MM, TT> operator/(const QGenericMatrix<NN, MM, TT>& matrix, TT divisor); private: #endif - InnerT m[N][M]; // Column-major order to match OpenGL. + T m[N][M]; // Column-major order to match OpenGL. QGenericMatrix(int) {} // Construct without initializing identity matrix. #if !defined(Q_NO_TEMPLATE_FRIENDS) - template <int NN, int MM, typename TT, typename ITT> + template <int NN, int MM, typename TT> friend class QGenericMatrix; #endif }; -template <int N, int M, typename T, typename InnerT> -Q_INLINE_TEMPLATE QGenericMatrix<N, M, T, InnerT>::QGenericMatrix() +template <int N, int M, typename T> +Q_INLINE_TEMPLATE QGenericMatrix<N, M, T>::QGenericMatrix() { setIdentity(); } -template <int N, int M, typename T, typename InnerT> -Q_INLINE_TEMPLATE QGenericMatrix<N, M, T, InnerT>::QGenericMatrix(const QGenericMatrix<N, M, T, InnerT>& other) +template <int N, int M, typename T> +Q_INLINE_TEMPLATE QGenericMatrix<N, M, T>::QGenericMatrix(const QGenericMatrix<N, M, T>& other) { for (int col = 0; col < N; ++col) for (int row = 0; row < M; ++row) m[col][row] = other.m[col][row]; } -template <int N, int M, typename T, typename InnerT> -Q_OUTOFLINE_TEMPLATE QGenericMatrix<N, M, T, InnerT>::QGenericMatrix(const T *values) +template <int N, int M, typename T> +Q_OUTOFLINE_TEMPLATE QGenericMatrix<N, M, T>::QGenericMatrix(const T *values) { for (int col = 0; col < N; ++col) for (int row = 0; row < M; ++row) m[col][row] = values[row * N + col]; } -template <int N, int M, typename T, typename InnerT> -Q_INLINE_TEMPLATE T QGenericMatrix<N, M, T, InnerT>::operator()(int row, int column) const +template <int N, int M, typename T> +Q_INLINE_TEMPLATE const T& QGenericMatrix<N, M, T>::operator()(int row, int column) const { Q_ASSERT(row >= 0 && row < M && column >= 0 && column < N); - return T(m[column][row]); + return m[column][row]; } -template <int N, int M, typename T, typename InnerT> -Q_INLINE_TEMPLATE InnerT& QGenericMatrix<N, M, T, InnerT>::operator()(int row, int column) +template <int N, int M, typename T> +Q_INLINE_TEMPLATE T& QGenericMatrix<N, M, T>::operator()(int row, int column) { Q_ASSERT(row >= 0 && row < M && column >= 0 && column < N); return m[column][row]; } -template <int N, int M, typename T, typename InnerT> -Q_OUTOFLINE_TEMPLATE bool QGenericMatrix<N, M, T, InnerT>::isIdentity() const +template <int N, int M, typename T> +Q_OUTOFLINE_TEMPLATE bool QGenericMatrix<N, M, T>::isIdentity() const { for (int col = 0; col < N; ++col) { for (int row = 0; row < M; ++row) { @@ -163,8 +163,8 @@ Q_OUTOFLINE_TEMPLATE bool QGenericMatrix<N, M, T, InnerT>::isIdentity() const return true; } -template <int N, int M, typename T, typename InnerT> -Q_OUTOFLINE_TEMPLATE void QGenericMatrix<N, M, T, InnerT>::setIdentity() +template <int N, int M, typename T> +Q_OUTOFLINE_TEMPLATE void QGenericMatrix<N, M, T>::setIdentity() { for (int col = 0; col < N; ++col) { for (int row = 0; row < M; ++row) { @@ -176,51 +176,50 @@ Q_OUTOFLINE_TEMPLATE void QGenericMatrix<N, M, T, InnerT>::setIdentity() } } -template <int N, int M, typename T, typename InnerT> -Q_OUTOFLINE_TEMPLATE void QGenericMatrix<N, M, T, InnerT>::fill(T value) +template <int N, int M, typename T> +Q_OUTOFLINE_TEMPLATE void QGenericMatrix<N, M, T>::fill(T value) { for (int col = 0; col < N; ++col) for (int row = 0; row < M; ++row) m[col][row] = value; } -template <int N, int M, typename T, typename InnerT> -Q_OUTOFLINE_TEMPLATE QGenericMatrix<M, N, T, InnerT> QGenericMatrix<N, M, T, InnerT>::transposed() const +template <int N, int M, typename T> +Q_OUTOFLINE_TEMPLATE QGenericMatrix<M, N, T> QGenericMatrix<N, M, T>::transposed() const { - QGenericMatrix<M, N, T, InnerT> result(1); + QGenericMatrix<M, N, T> result(1); for (int row = 0; row < M; ++row) for (int col = 0; col < N; ++col) result.m[row][col] = m[col][row]; return result; } -template <int N, int M, typename T, typename InnerT> -Q_OUTOFLINE_TEMPLATE QGenericMatrix<N, M, T, InnerT>& QGenericMatrix<N, M, T, InnerT>::operator+=(const QGenericMatrix<N, M, T, InnerT>& other) +template <int N, int M, typename T> +Q_OUTOFLINE_TEMPLATE QGenericMatrix<N, M, T>& QGenericMatrix<N, M, T>::operator+=(const QGenericMatrix<N, M, T>& other) { for (int index = 0; index < N * M; ++index) m[0][index] += other.m[0][index]; return *this; } -template <int N, int M, typename T, typename InnerT> -Q_OUTOFLINE_TEMPLATE QGenericMatrix<N, M, T, InnerT>& QGenericMatrix<N, M, T, InnerT>::operator-=(const QGenericMatrix<N, M, T, InnerT>& other) +template <int N, int M, typename T> +Q_OUTOFLINE_TEMPLATE QGenericMatrix<N, M, T>& QGenericMatrix<N, M, T>::operator-=(const QGenericMatrix<N, M, T>& other) { for (int index = 0; index < N * M; ++index) m[0][index] -= other.m[0][index]; return *this; } -template <int N, int M, typename T, typename InnerT> -Q_OUTOFLINE_TEMPLATE QGenericMatrix<N, M, T, InnerT>& QGenericMatrix<N, M, T, InnerT>::operator*=(T factor) +template <int N, int M, typename T> +Q_OUTOFLINE_TEMPLATE QGenericMatrix<N, M, T>& QGenericMatrix<N, M, T>::operator*=(T factor) { - InnerT f(factor); for (int index = 0; index < N * M; ++index) - m[0][index] *= f; + m[0][index] *= factor; return *this; } -template <int N, int M, typename T, typename InnerT> -Q_OUTOFLINE_TEMPLATE bool QGenericMatrix<N, M, T, InnerT>::operator==(const QGenericMatrix<N, M, T, InnerT>& other) const +template <int N, int M, typename T> +Q_OUTOFLINE_TEMPLATE bool QGenericMatrix<N, M, T>::operator==(const QGenericMatrix<N, M, T>& other) const { for (int index = 0; index < N * M; ++index) { if (m[0][index] != other.m[0][index]) @@ -229,8 +228,8 @@ Q_OUTOFLINE_TEMPLATE bool QGenericMatrix<N, M, T, InnerT>::operator==(const QGen return true; } -template <int N, int M, typename T, typename InnerT> -Q_OUTOFLINE_TEMPLATE bool QGenericMatrix<N, M, T, InnerT>::operator!=(const QGenericMatrix<N, M, T, InnerT>& other) const +template <int N, int M, typename T> +Q_OUTOFLINE_TEMPLATE bool QGenericMatrix<N, M, T>::operator!=(const QGenericMatrix<N, M, T>& other) const { for (int index = 0; index < N * M; ++index) { if (m[0][index] != other.m[0][index]) @@ -239,40 +238,39 @@ Q_OUTOFLINE_TEMPLATE bool QGenericMatrix<N, M, T, InnerT>::operator!=(const QGen return false; } -template <int N, int M, typename T, typename InnerT> -Q_OUTOFLINE_TEMPLATE QGenericMatrix<N, M, T, InnerT>& QGenericMatrix<N, M, T, InnerT>::operator/=(T divisor) +template <int N, int M, typename T> +Q_OUTOFLINE_TEMPLATE QGenericMatrix<N, M, T>& QGenericMatrix<N, M, T>::operator/=(T divisor) { - InnerT d(divisor); for (int index = 0; index < N * M; ++index) - m[0][index] /= d; + m[0][index] /= divisor; return *this; } -template <int N, int M, typename T, typename InnerT> -Q_OUTOFLINE_TEMPLATE QGenericMatrix<N, M, T, InnerT> operator+(const QGenericMatrix<N, M, T, InnerT>& m1, const QGenericMatrix<N, M, T, InnerT>& m2) +template <int N, int M, typename T> +Q_OUTOFLINE_TEMPLATE QGenericMatrix<N, M, T> operator+(const QGenericMatrix<N, M, T>& m1, const QGenericMatrix<N, M, T>& m2) { - QGenericMatrix<N, M, T, InnerT> result(1); + QGenericMatrix<N, M, T> result(1); for (int index = 0; index < N * M; ++index) result.m[0][index] = m1.m[0][index] + m2.m[0][index]; return result; } -template <int N, int M, typename T, typename InnerT> -Q_OUTOFLINE_TEMPLATE QGenericMatrix<N, M, T, InnerT> operator-(const QGenericMatrix<N, M, T, InnerT>& m1, const QGenericMatrix<N, M, T, InnerT>& m2) +template <int N, int M, typename T> +Q_OUTOFLINE_TEMPLATE QGenericMatrix<N, M, T> operator-(const QGenericMatrix<N, M, T>& m1, const QGenericMatrix<N, M, T>& m2) { - QGenericMatrix<N, M, T, InnerT> result(1); + QGenericMatrix<N, M, T> result(1); for (int index = 0; index < N * M; ++index) result.m[0][index] = m1.m[0][index] - m2.m[0][index]; return result; } -template <int N, int M1, int M2, typename T, typename InnerT> -Q_OUTOFLINE_TEMPLATE QGenericMatrix<M1, M2, T, InnerT> operator*(const QGenericMatrix<N, M2, T, InnerT>& m1, const QGenericMatrix<M1, N, T, InnerT>& m2) +template <int N, int M1, int M2, typename T> +Q_OUTOFLINE_TEMPLATE QGenericMatrix<M1, M2, T> operator*(const QGenericMatrix<N, M2, T>& m1, const QGenericMatrix<M1, N, T>& m2) { - QGenericMatrix<M1, M2, T, InnerT> result(1); + QGenericMatrix<M1, M2, T> result(1); for (int row = 0; row < M2; ++row) { for (int col = 0; col < M1; ++col) { - InnerT sum(0.0f); + T sum(0.0f); for (int j = 0; j < N; ++j) sum += m1.m[j][row] * m2.m[col][j]; result.m[col][row] = sum; @@ -281,47 +279,44 @@ Q_OUTOFLINE_TEMPLATE QGenericMatrix<M1, M2, T, InnerT> operator*(const QGenericM return result; } -template <int N, int M, typename T, typename InnerT> -Q_OUTOFLINE_TEMPLATE QGenericMatrix<N, M, T, InnerT> operator-(const QGenericMatrix<N, M, T, InnerT>& matrix) +template <int N, int M, typename T> +Q_OUTOFLINE_TEMPLATE QGenericMatrix<N, M, T> operator-(const QGenericMatrix<N, M, T>& matrix) { - QGenericMatrix<N, M, T, InnerT> result(1); + QGenericMatrix<N, M, T> result(1); for (int index = 0; index < N * M; ++index) result.m[0][index] = -matrix.m[0][index]; return result; } -template <int N, int M, typename T, typename InnerT> -Q_OUTOFLINE_TEMPLATE QGenericMatrix<N, M, T, InnerT> operator*(T factor, const QGenericMatrix<N, M, T, InnerT>& matrix) +template <int N, int M, typename T> +Q_OUTOFLINE_TEMPLATE QGenericMatrix<N, M, T> operator*(T factor, const QGenericMatrix<N, M, T>& matrix) { - InnerT f(factor); - QGenericMatrix<N, M, T, InnerT> result(1); + QGenericMatrix<N, M, T> result(1); for (int index = 0; index < N * M; ++index) - result.m[0][index] = matrix.m[0][index] * f; + result.m[0][index] = matrix.m[0][index] * factor; return result; } -template <int N, int M, typename T, typename InnerT> -Q_OUTOFLINE_TEMPLATE QGenericMatrix<N, M, T, InnerT> operator*(const QGenericMatrix<N, M, T, InnerT>& matrix, T factor) +template <int N, int M, typename T> +Q_OUTOFLINE_TEMPLATE QGenericMatrix<N, M, T> operator*(const QGenericMatrix<N, M, T>& matrix, T factor) { - InnerT f(factor); - QGenericMatrix<N, M, T, InnerT> result(1); + QGenericMatrix<N, M, T> result(1); for (int index = 0; index < N * M; ++index) - result.m[0][index] = matrix.m[0][index] * f; + result.m[0][index] = matrix.m[0][index] * factor; return result; } -template <int N, int M, typename T, typename InnerT> -Q_OUTOFLINE_TEMPLATE QGenericMatrix<N, M, T, InnerT> operator/(const QGenericMatrix<N, M, T, InnerT>& matrix, T divisor) +template <int N, int M, typename T> +Q_OUTOFLINE_TEMPLATE QGenericMatrix<N, M, T> operator/(const QGenericMatrix<N, M, T>& matrix, T divisor) { - InnerT d(divisor); - QGenericMatrix<N, M, T, InnerT> result(1); + QGenericMatrix<N, M, T> result(1); for (int index = 0; index < N * M; ++index) - result.m[0][index] = matrix.m[0][index] / d; + result.m[0][index] = matrix.m[0][index] / divisor; return result; } -template <int N, int M, typename T, typename InnerT> -Q_OUTOFLINE_TEMPLATE void QGenericMatrix<N, M, T, InnerT>::toValueArray(T *values) +template <int N, int M, typename T> +Q_OUTOFLINE_TEMPLATE void QGenericMatrix<N, M, T>::toValueArray(T *values) { for (int col = 0; col < N; ++col) for (int row = 0; row < M; ++row) @@ -329,22 +324,22 @@ Q_OUTOFLINE_TEMPLATE void QGenericMatrix<N, M, T, InnerT>::toValueArray(T *value } // Define aliases for the useful variants of QGenericMatrix. -typedef QGenericMatrix<2, 2, qreal, float> QMatrix2x2; -typedef QGenericMatrix<2, 3, qreal, float> QMatrix2x3; -typedef QGenericMatrix<2, 4, qreal, float> QMatrix2x4; -typedef QGenericMatrix<3, 2, qreal, float> QMatrix3x2; -typedef QGenericMatrix<3, 3, qreal, float> QMatrix3x3; -typedef QGenericMatrix<3, 4, qreal, float> QMatrix3x4; -typedef QGenericMatrix<4, 2, qreal, float> QMatrix4x2; -typedef QGenericMatrix<4, 3, qreal, float> QMatrix4x3; +typedef QGenericMatrix<2, 2, qreal> QMatrix2x2; +typedef QGenericMatrix<2, 3, qreal> QMatrix2x3; +typedef QGenericMatrix<2, 4, qreal> QMatrix2x4; +typedef QGenericMatrix<3, 2, qreal> QMatrix3x2; +typedef QGenericMatrix<3, 3, qreal> QMatrix3x3; +typedef QGenericMatrix<3, 4, qreal> QMatrix3x4; +typedef QGenericMatrix<4, 2, qreal> QMatrix4x2; +typedef QGenericMatrix<4, 3, qreal> QMatrix4x3; #ifndef QT_NO_DEBUG_STREAM -template <int N, int M, typename T, typename InnerT> -QDebug operator<<(QDebug dbg, const QGenericMatrix<N, M, T, InnerT> &m) +template <int N, int M, typename T> +QDebug operator<<(QDebug dbg, const QGenericMatrix<N, M, T> &m) { dbg.nospace() << "QGenericMatrix<" << N << ", " << M - << ", " << QTypeInfo<T>::name() << ", " << QTypeInfo<InnerT>::name() + << ", " << QTypeInfo<T>::name() << ">(" << endl << qSetFieldWidth(10); for (int row = 0; row < M; ++row) { for (int col = 0; col < N; ++col) diff --git a/src/gui/math3d/qmatrix4x4.cpp b/src/gui/math3d/qmatrix4x4.cpp index eb5858c..2164aca 100644 --- a/src/gui/math3d/qmatrix4x4.cpp +++ b/src/gui/math3d/qmatrix4x4.cpp @@ -103,7 +103,7 @@ QMatrix4x4::QMatrix4x4(const qreal *values) #if !defined(QT_NO_MEMBER_TEMPLATES) || defined(Q_QDOC) /*! - \fn QMatrix4x4::QMatrix4x4(const QGenericMatrix<N, M, qreal, float>& matrix) + \fn QMatrix4x4::QMatrix4x4(const QGenericMatrix<N, M, qreal>& matrix) Constructs a 4x4 matrix from the left-most 4 columns and top-most 4 rows of \a matrix. If \a matrix has less than 4 columns or rows, @@ -114,7 +114,7 @@ QMatrix4x4::QMatrix4x4(const qreal *values) */ /*! - \fn QGenericMatrix<N, M, qreal, float> QMatrix4x4::toGenericMatrix() const + \fn QGenericMatrix<N, M, qreal> QMatrix4x4::toGenericMatrix() const Constructs a NxM generic matrix from the left-most N columns and top-most M rows of this 4x4 matrix. If N or M is greater than 4, @@ -127,7 +127,7 @@ QMatrix4x4::QMatrix4x4(const qreal *values) #endif /*! - \fn QMatrix4x4 qGenericMatrixToMatrix4x4(const QGenericMatrix<N, M, qreal, float>& matrix) + \fn QMatrix4x4 qGenericMatrixToMatrix4x4(const QGenericMatrix<N, M, qreal>& matrix) \relates QMatrix4x4 Returns a 4x4 matrix constructed from the left-most 4 columns and @@ -139,7 +139,7 @@ QMatrix4x4::QMatrix4x4(const qreal *values) */ /*! - \fn QGenericMatrix<N, M, qreal, float> qGenericMatrixFromMatrix4x4(const QMatrix4x4& matrix) + \fn QGenericMatrix<N, M, qreal> qGenericMatrixFromMatrix4x4(const QMatrix4x4& matrix) \relates QMatrix4x4 Returns a NxM generic matrix constructed from the left-most N columns @@ -153,7 +153,7 @@ QMatrix4x4::QMatrix4x4(const qreal *values) /*! \internal */ -QMatrix4x4::QMatrix4x4(const float *values, int cols, int rows) +QMatrix4x4::QMatrix4x4(const qreal *values, int cols, int rows) { for (int col = 0; col < 4; ++col) { for (int row = 0; row < 4; ++row) { @@ -233,15 +233,16 @@ QMatrix4x4::QMatrix4x4(const QTransform& transform) } /*! - \fn qreal QMatrix4x4::operator()(int row, int column) const + \fn const qreal& QMatrix4x4::operator()(int row, int column) const - Returns the element at position (\a row, \a column) in this matrix. + Returns a constant reference to the element at position + (\a row, \a column) in this matrix. \sa column(), row() */ /*! - \fn float& QMatrix4x4::operator()(int row, int column) + \fn qreal& QMatrix4x4::operator()(int row, int column) Returns a reference to the element at position (\a row, \a column) in this matrix so that the element can be assigned to. @@ -312,8 +313,8 @@ QMatrix4x4::QMatrix4x4(const QTransform& transform) // | A B C | // M = | D E F | det(M) = A * (EI - HF) - B * (DI - GF) + C * (DH - GE) // | G H I | -static inline float matrixDet3 - (const float m[4][4], int col0, int col1, int col2, +static inline qreal matrixDet3 + (const qreal m[4][4], int col0, int col1, int col2, int row0, int row1, int row2) { return m[col0][row0] * @@ -328,9 +329,9 @@ static inline float matrixDet3 } // Calculate the determinant of a 4x4 matrix. -static inline float matrixDet4(const float m[4][4]) +static inline qreal matrixDet4(const qreal m[4][4]) { - float det; + qreal det; det = m[0][0] * matrixDet3(m, 1, 2, 3, 1, 2, 3); det -= m[1][0] * matrixDet3(m, 0, 2, 3, 1, 2, 3); det += m[2][0] * matrixDet3(m, 0, 1, 3, 1, 2, 3); @@ -382,7 +383,7 @@ QMatrix4x4 QMatrix4x4::inverted(bool *invertible) const QMatrix4x4 inv(1); // The "1" says to not load the identity. - float det = matrixDet4(m); + qreal det = matrixDet4(m); if (det == 0.0f) { if (invertible) *invertible = false; @@ -436,12 +437,12 @@ QMatrix3x3 QMatrix4x4::normalMatrix() const return inv; } - float det = matrixDet3(m, 0, 1, 2, 0, 1, 2); + qreal det = matrixDet3(m, 0, 1, 2, 0, 1, 2); if (det == 0.0f) return inv; det = 1.0f / det; - float *invm = inv.data(); + qreal *invm = inv.data(); // Invert and transpose in a single step. invm[0 + 0 * 3] = (m[1][1] * m[2][2] - m[2][1] * m[1][2]) * det; @@ -697,9 +698,9 @@ QMatrix4x4 operator/(const QMatrix4x4& matrix, qreal divisor) */ QMatrix4x4& QMatrix4x4::scale(const QVector3D& vector) { - float vx = vector.xp; - float vy = vector.yp; - float vz = vector.zp; + qreal vx = vector.x(); + qreal vy = vector.y(); + qreal vz = vector.z(); if (flagBits == Identity) { m[0][0] = vx; m[1][1] = vy; @@ -743,28 +744,26 @@ QMatrix4x4& QMatrix4x4::scale(const QVector3D& vector) */ QMatrix4x4& QMatrix4x4::scale(qreal x, qreal y) { - float vx(x); - float vy(y); if (flagBits == Identity) { - m[0][0] = vx; - m[1][1] = vy; + m[0][0] = x; + m[1][1] = y; flagBits = Scale; } else if (flagBits == Scale || flagBits == (Scale | Translation)) { - m[0][0] *= vx; - m[1][1] *= vy; + m[0][0] *= x; + m[1][1] *= y; } else if (flagBits == Translation) { - m[0][0] = vx; - m[1][1] = vy; + m[0][0] = x; + m[1][1] = y; flagBits |= Scale; } else { - m[0][0] *= vx; - m[0][1] *= vx; - m[0][2] *= vx; - m[0][3] *= vx; - m[1][0] *= vy; - m[1][1] *= vy; - m[1][2] *= vy; - m[1][3] *= vy; + m[0][0] *= x; + m[0][1] *= x; + m[0][2] *= x; + m[0][3] *= x; + m[1][0] *= y; + m[1][1] *= y; + m[1][2] *= y; + m[1][3] *= y; flagBits = General; } return *this; @@ -780,36 +779,33 @@ QMatrix4x4& QMatrix4x4::scale(qreal x, qreal y) */ QMatrix4x4& QMatrix4x4::scale(qreal x, qreal y, qreal z) { - float vx(x); - float vy(y); - float vz(z); if (flagBits == Identity) { - m[0][0] = vx; - m[1][1] = vy; - m[2][2] = vz; + m[0][0] = x; + m[1][1] = y; + m[2][2] = z; flagBits = Scale; } else if (flagBits == Scale || flagBits == (Scale | Translation)) { - m[0][0] *= vx; - m[1][1] *= vy; - m[2][2] *= vz; + m[0][0] *= x; + m[1][1] *= y; + m[2][2] *= z; } else if (flagBits == Translation) { - m[0][0] = vx; - m[1][1] = vy; - m[2][2] = vz; + m[0][0] = x; + m[1][1] = y; + m[2][2] = z; flagBits |= Scale; } else { - m[0][0] *= vx; - m[0][1] *= vx; - m[0][2] *= vx; - m[0][3] *= vx; - m[1][0] *= vy; - m[1][1] *= vy; - m[1][2] *= vy; - m[1][3] *= vy; - m[2][0] *= vz; - m[2][1] *= vz; - m[2][2] *= vz; - m[2][3] *= vz; + m[0][0] *= x; + m[0][1] *= x; + m[0][2] *= x; + m[0][3] *= x; + m[1][0] *= y; + m[1][1] *= y; + m[1][2] *= y; + m[1][3] *= y; + m[2][0] *= z; + m[2][1] *= z; + m[2][2] *= z; + m[2][3] *= z; flagBits = General; } return *this; @@ -866,9 +862,9 @@ QMatrix4x4& QMatrix4x4::scale(qreal factor) */ QMatrix4x4& QMatrix4x4::translate(const QVector3D& vector) { - float vx = vector.xp; - float vy = vector.yp; - float vz = vector.zp; + qreal vx = vector.x(); + qreal vy = vector.y(); + qreal vz = vector.z(); if (flagBits == Identity) { m[3][0] = vx; m[3][1] = vy; @@ -912,28 +908,26 @@ QMatrix4x4& QMatrix4x4::translate(const QVector3D& vector) */ QMatrix4x4& QMatrix4x4::translate(qreal x, qreal y) { - float vx(x); - float vy(y); if (flagBits == Identity) { - m[3][0] = vx; - m[3][1] = vy; + m[3][0] = x; + m[3][1] = y; flagBits = Translation; } else if (flagBits == Translation) { - m[3][0] += vx; - m[3][1] += vy; + m[3][0] += x; + m[3][1] += y; } else if (flagBits == Scale) { - m[3][0] = m[0][0] * vx; - m[3][1] = m[1][1] * vy; + m[3][0] = m[0][0] * x; + m[3][1] = m[1][1] * y; m[3][2] = 0.; flagBits |= Translation; } else if (flagBits == (Scale | Translation)) { - m[3][0] += m[0][0] * vx; - m[3][1] += m[1][1] * vy; + m[3][0] += m[0][0] * x; + m[3][1] += m[1][1] * y; } else { - m[3][0] += m[0][0] * vx + m[1][0] * vy; - m[3][1] += m[0][1] * vx + m[1][1] * vy; - m[3][2] += m[0][2] * vx + m[1][2] * vy; - m[3][3] += m[0][3] * vx + m[1][3] * vy; + m[3][0] += m[0][0] * x + m[1][0] * y; + m[3][1] += m[0][1] * x + m[1][1] * y; + m[3][2] += m[0][2] * x + m[1][2] * y; + m[3][3] += m[0][3] * x + m[1][3] * y; if (flagBits == Rotation) flagBits |= Translation; else if (flagBits != (Rotation | Translation)) @@ -952,32 +946,29 @@ QMatrix4x4& QMatrix4x4::translate(qreal x, qreal y) */ QMatrix4x4& QMatrix4x4::translate(qreal x, qreal y, qreal z) { - float vx(x); - float vy(y); - float vz(z); if (flagBits == Identity) { - m[3][0] = vx; - m[3][1] = vy; - m[3][2] = vz; + m[3][0] = x; + m[3][1] = y; + m[3][2] = z; flagBits = Translation; } else if (flagBits == Translation) { - m[3][0] += vx; - m[3][1] += vy; - m[3][2] += vz; + m[3][0] += x; + m[3][1] += y; + m[3][2] += z; } else if (flagBits == Scale) { - m[3][0] = m[0][0] * vx; - m[3][1] = m[1][1] * vy; - m[3][2] = m[2][2] * vz; + m[3][0] = m[0][0] * x; + m[3][1] = m[1][1] * y; + m[3][2] = m[2][2] * z; flagBits |= Translation; } else if (flagBits == (Scale | Translation)) { - m[3][0] += m[0][0] * vx; - m[3][1] += m[1][1] * vy; - m[3][2] += m[2][2] * vz; + m[3][0] += m[0][0] * x; + m[3][1] += m[1][1] * y; + m[3][2] += m[2][2] * z; } else { - m[3][0] += m[0][0] * vx + m[1][0] * vy + m[2][0] * vz; - m[3][1] += m[0][1] * vx + m[1][1] * vy + m[2][1] * vz; - m[3][2] += m[0][2] * vx + m[1][2] * vy + m[2][2] * vz; - m[3][3] += m[0][3] * vx + m[1][3] * vy + m[2][3] * vz; + m[3][0] += m[0][0] * x + m[1][0] * y + m[2][0] * z; + m[3][1] += m[0][1] * x + m[1][1] * y + m[2][1] * z; + m[3][2] += m[0][2] * x + m[1][2] * y + m[2][2] * z; + m[3][3] += m[0][3] * x + m[1][3] * y + m[2][3] * z; if (flagBits == Rotation) flagBits |= Translation; else if (flagBits != (Rotation | Translation)) @@ -1126,15 +1117,15 @@ QMatrix4x4& QMatrix4x4::rotate(const QQuaternion& quaternion) // Algorithm from: // http://www.j3d.org/matrix_faq/matrfaq_latest.html#Q54 QMatrix4x4 m(1); - float xx = quaternion.xp * quaternion.xp; - float xy = quaternion.xp * quaternion.yp; - float xz = quaternion.xp * quaternion.zp; - float xw = quaternion.xp * quaternion.wp; - float yy = quaternion.yp * quaternion.yp; - float yz = quaternion.yp * quaternion.zp; - float yw = quaternion.yp * quaternion.wp; - float zz = quaternion.zp * quaternion.zp; - float zw = quaternion.zp * quaternion.wp; + qreal xx = quaternion.x() * quaternion.x(); + qreal xy = quaternion.x() * quaternion.y(); + qreal xz = quaternion.x() * quaternion.z(); + qreal xw = quaternion.x() * quaternion.scalar(); + qreal yy = quaternion.y() * quaternion.y(); + qreal yz = quaternion.y() * quaternion.z(); + qreal yw = quaternion.y() * quaternion.scalar(); + qreal zz = quaternion.z() * quaternion.z(); + qreal zw = quaternion.z() * quaternion.scalar(); m.m[0][0] = 1.0f - 2 * (yy + zz); m.m[1][0] = 2 * (xy - zw); m.m[2][0] = 2 * (xz + yw); @@ -1222,11 +1213,11 @@ QMatrix4x4& QMatrix4x4::ortho(qreal left, qreal right, qreal bottom, qreal top, translate(QVector3D (-(left + right) / width, -(top + bottom) / invheight, - 0.0f, 1)); + 0.0f)); scale(QVector3D (2.0f / width, 2.0f / invheight, - -1.0f, 1)); + -1.0f)); return *this; } #endif @@ -1356,17 +1347,17 @@ QMatrix4x4& QMatrix4x4::lookAt(const QVector3D& eye, const QVector3D& center, co QMatrix4x4 m(1); - m.m[0][0] = side.xp; - m.m[1][0] = side.yp; - m.m[2][0] = side.zp; + m.m[0][0] = side.x(); + m.m[1][0] = side.y(); + m.m[2][0] = side.z(); m.m[3][0] = 0.0f; - m.m[0][1] = upVector.xp; - m.m[1][1] = upVector.yp; - m.m[2][1] = upVector.zp; + m.m[0][1] = upVector.x(); + m.m[1][1] = upVector.y(); + m.m[2][1] = upVector.z(); m.m[3][1] = 0.0f; - m.m[0][2] = -forward.xp; - m.m[1][2] = -forward.yp; - m.m[2][2] = -forward.zp; + m.m[0][2] = -forward.x(); + m.m[1][2] = -forward.y(); + m.m[2][2] = -forward.z(); m.m[3][2] = 0.0f; m.m[0][3] = 0.0f; m.m[1][3] = 0.0f; @@ -1434,9 +1425,9 @@ void QMatrix4x4::toValueArray(qreal *values) const */ QMatrix QMatrix4x4::toAffine() const { - return QMatrix(qreal(m[0][0]), qreal(m[0][1]), - qreal(m[1][0]), qreal(m[1][1]), - qreal(m[3][0]), qreal(m[3][1])); + return QMatrix(m[0][0], m[0][1], + m[1][0], m[1][1], + m[3][0], m[3][1]); } static const qreal inv_dist_to_plane = 1. / 1024.; @@ -1462,15 +1453,12 @@ QTransform QMatrix4x4::toTransform(qreal distanceToPlane) const { if (distanceToPlane == 1024.0f) { // Optimize the common case with constants. - return QTransform(qreal(m[0][0]), qreal(m[0][1]), - qreal(m[0][3]) - qreal(m[0][2]) * - inv_dist_to_plane, - qreal(m[1][0]), qreal(m[1][1]), - qreal(m[1][3]) - qreal(m[1][2]) * - inv_dist_to_plane, - qreal(m[3][0]), qreal(m[3][1]), - qreal(m[3][3]) - qreal(m[3][2]) * - inv_dist_to_plane); + return QTransform(m[0][0], m[0][1], + m[0][3] - m[0][2] * inv_dist_to_plane, + m[1][0], m[1][1], + m[1][3] - m[1][2] * inv_dist_to_plane, + m[3][0], m[3][1], + m[3][3] - m[3][2] * inv_dist_to_plane); } else if (distanceToPlane != 0.0f) { // The following projection matrix is pre-multiplied with "matrix": // | 1 0 0 0 | @@ -1480,17 +1468,14 @@ QTransform QMatrix4x4::toTransform(qreal distanceToPlane) const // where d = -1 / distanceToPlane. After projection, row 3 and // column 3 are dropped to form the final QTransform. qreal d = 1.0f / distanceToPlane; - return QTransform(qreal(m[0][0]), qreal(m[0][1]), - qreal(m[0][3]) - qreal(m[0][2]) * d, - qreal(m[1][0]), qreal(m[1][1]), - qreal(m[1][3]) - qreal(m[1][2]) * d, - qreal(m[3][0]), qreal(m[3][1]), - qreal(m[3][3]) - qreal(m[3][2]) * d); + return QTransform(m[0][0], m[0][1], m[0][3] - m[0][2] * d, + m[1][0], m[1][1], m[1][3] - m[1][2] * d, + m[3][0], m[3][1], m[3][3] - m[3][2] * d); } else { // Orthographic projection: drop row 3 and column 3. - return QTransform(qreal(m[0][0]), qreal(m[0][1]), qreal(m[0][3]), - qreal(m[1][0]), qreal(m[1][1]), qreal(m[1][3]), - qreal(m[3][0]), qreal(m[3][1]), qreal(m[3][3])); + return QTransform(m[0][0], m[0][1], m[0][3], + m[1][0], m[1][1], m[1][3], + m[3][0], m[3][1], m[3][3]); } } @@ -1618,28 +1603,25 @@ QRectF QMatrix4x4::mapRect(const QRectF& rect) const } /*! - \fn float *QMatrix4x4::data() + \fn qreal *QMatrix4x4::data() - Returns a pointer to the raw data of this matrix. This is intended - for use with raw GL functions. + Returns a pointer to the raw data of this matrix. \sa constData(), inferSpecialType() */ /*! - \fn const float *QMatrix4x4::data() const + \fn const qreal *QMatrix4x4::data() const Returns a constant pointer to the raw data of this matrix. - This is intended for use with raw GL functions. \sa constData() */ /*! - \fn const float *QMatrix4x4::constData() const + \fn const qreal *QMatrix4x4::constData() const Returns a constant pointer to the raw data of this matrix. - This is intended for use with raw GL functions. \sa data() */ @@ -1695,7 +1677,7 @@ void QMatrix4x4::extractAxisRotation(qreal &angle, QVector3D &axis) const { // Orientation is dependent on the upper 3x3 matrix; subtract the // homogeneous scaling element from the trace of the 4x4 matrix - float tr = m[0][0] + m[1][1] + m[2][2]; + qreal tr = m[0][0] + m[1][1] + m[2][2]; qreal cosa = qreal(0.5f * (tr - 1.0f)); angle = acos(cosa) * 180.0f / M_PI; @@ -1708,38 +1690,38 @@ void QMatrix4x4::extractAxisRotation(qreal &angle, QVector3D &axis) const } if (angle < 180.0f) { - axis.xp = m[1][2] - m[2][1]; - axis.yp = m[2][0] - m[0][2]; - axis.zp = m[0][1] - m[1][0]; + axis.setX(m[1][2] - m[2][1]); + axis.setY(m[2][0] - m[0][2]); + axis.setZ(m[0][1] - m[1][0]); axis.normalize(); return; } // rads == PI - float tmp; + qreal tmp; // r00 is maximum if ((m[0][0] >= m[2][2]) && (m[0][0] >= m[1][1])) { - axis.xp = 0.5f * qSqrt(m[0][0] - m[1][1] - m[2][2] + 1.0f); + axis.setX(0.5f * qSqrt(m[0][0] - m[1][1] - m[2][2] + 1.0f)); tmp = 0.5f / axis.x(); - axis.yp = m[1][0] * tmp; - axis.zp = m[2][0] * tmp; + axis.setY(m[1][0] * tmp); + axis.setZ(m[2][0] * tmp); } // r11 is maximum if ((m[1][1] >= m[2][2]) && (m[1][1] >= m[0][0])) { - axis.yp = 0.5f * qSqrt(m[1][1] - m[0][0] - m[2][2] + 1.0f); + axis.setY(0.5f * qSqrt(m[1][1] - m[0][0] - m[2][2] + 1.0f)); tmp = 0.5f / axis.y(); - axis.xp = tmp * m[1][0]; - axis.zp = tmp * m[2][1]; + axis.setX(tmp * m[1][0]); + axis.setZ(tmp * m[2][1]); } // r22 is maximum if ((m[2][2] >= m[1][1]) && (m[2][2] >= m[0][0])) { - axis.zp = 0.5f * qSqrt(m[2][2] - m[0][0] - m[1][1] + 1.0f); + axis.setZ(0.5f * qSqrt(m[2][2] - m[0][0] - m[1][1] + 1.0f)); tmp = 0.5f / axis.z(); - axis.xp = m[2][0]*tmp; - axis.yp = m[2][1]*tmp; + axis.setX(m[2][0]*tmp); + axis.setY(m[2][1]*tmp); } } @@ -1756,7 +1738,7 @@ QVector3D QMatrix4x4::extractTranslation() const return QVector3D (m[0][0] * m[3][0] + m[0][1] * m[3][1] + m[0][2] * m[3][2], m[1][0] * m[3][0] + m[1][1] * m[3][1] + m[1][2] * m[3][2], - m[2][0] * m[3][0] + m[2][1] * m[3][1] + m[2][2] * m[3][2], 1); + m[2][0] * m[3][0] + m[2][1] * m[3][1] + m[2][2] * m[3][2]); } #endif @@ -1894,7 +1876,7 @@ QDataStream &operator>>(QDataStream &stream, QMatrix4x4 &matrix) for (int row = 0; row < 4; ++row) { for (int col = 0; col < 4; ++col) { stream >> x; - matrix(row, col) = float(x); + matrix(row, col) = qreal(x); } } matrix.inferSpecialType(); diff --git a/src/gui/math3d/qmatrix4x4.h b/src/gui/math3d/qmatrix4x4.h index 4207bdf..8811027 100644 --- a/src/gui/math3d/qmatrix4x4.h +++ b/src/gui/math3d/qmatrix4x4.h @@ -71,14 +71,14 @@ public: qreal m41, qreal m42, qreal m43, qreal m44); #if !defined(QT_NO_MEMBER_TEMPLATES) || defined(Q_QDOC) template <int N, int M> - explicit QMatrix4x4(const QGenericMatrix<N, M, qreal, float>& matrix); + explicit QMatrix4x4(const QGenericMatrix<N, M, qreal>& matrix); #endif - QMatrix4x4(const float *values, int cols, int rows); + QMatrix4x4(const qreal *values, int cols, int rows); QMatrix4x4(const QTransform& transform); QMatrix4x4(const QMatrix& matrix); - inline qreal operator()(int row, int column) const; - inline float& operator()(int row, int column); + inline const qreal& operator()(int row, int column) const; + inline qreal& operator()(int row, int column); inline QVector4D column(int index) const; inline void setColumn(int index, const QVector4D& value); @@ -174,12 +174,12 @@ public: #if !defined(QT_NO_MEMBER_TEMPLATES) || defined(Q_QDOC) template <int N, int M> - QGenericMatrix<N, M, qreal, float> toGenericMatrix() const; + QGenericMatrix<N, M, qreal> toGenericMatrix() const; #endif - inline float *data(); - inline const float *data() const { return m[0]; } - inline const float *constData() const { return m[0]; } + inline qreal *data(); + inline const qreal *data() const { return m[0]; } + inline const qreal *constData() const { return m[0]; } void inferSpecialType(); @@ -190,7 +190,7 @@ public: #endif private: - float m[4][4]; // Column-major order to match OpenGL. + qreal m[4][4]; // Column-major order to match OpenGL. int flagBits; // Flag bits from the enum below. enum { @@ -224,9 +224,9 @@ inline QMatrix4x4::QMatrix4x4 template <int N, int M> Q_INLINE_TEMPLATE QMatrix4x4::QMatrix4x4 - (const QGenericMatrix<N, M, qreal, float>& matrix) + (const QGenericMatrix<N, M, qreal>& matrix) { - const float *values = matrix.constData(); + const qreal *values = matrix.constData(); for (int col = 0; col < 4; ++col) { for (int row = 0; row < 4; ++row) { if (col < N && row < M) @@ -241,10 +241,10 @@ Q_INLINE_TEMPLATE QMatrix4x4::QMatrix4x4 } template <int N, int M> -QGenericMatrix<N, M, qreal, float> QMatrix4x4::toGenericMatrix() const +QGenericMatrix<N, M, qreal> QMatrix4x4::toGenericMatrix() const { - QGenericMatrix<N, M, qreal, float> result; - float *values = result.data(); + QGenericMatrix<N, M, qreal> result; + qreal *values = result.data(); for (int col = 0; col < N; ++col) { for (int row = 0; row < M; ++row) { if (col < 4 && row < 4) @@ -260,13 +260,13 @@ QGenericMatrix<N, M, qreal, float> QMatrix4x4::toGenericMatrix() const #endif -inline qreal QMatrix4x4::operator()(int row, int column) const +inline const qreal& QMatrix4x4::operator()(int row, int column) const { Q_ASSERT(row >= 0 && row < 4 && column >= 0 && column < 4); - return qreal(m[column][row]); + return m[column][row]; } -inline float& QMatrix4x4::operator()(int row, int column) +inline qreal& QMatrix4x4::operator()(int row, int column) { Q_ASSERT(row >= 0 && row < 4 && column >= 0 && column < 4); flagBits = General; @@ -276,32 +276,32 @@ inline float& QMatrix4x4::operator()(int row, int column) inline QVector4D QMatrix4x4::column(int index) const { Q_ASSERT(index >= 0 && index < 4); - return QVector4D(m[index][0], m[index][1], m[index][2], m[index][3], 1); + return QVector4D(m[index][0], m[index][1], m[index][2], m[index][3]); } inline void QMatrix4x4::setColumn(int index, const QVector4D& value) { Q_ASSERT(index >= 0 && index < 4); - m[index][0] = value.xp; - m[index][1] = value.yp; - m[index][2] = value.zp; - m[index][3] = value.wp; + m[index][0] = value.x(); + m[index][1] = value.y(); + m[index][2] = value.z(); + m[index][3] = value.w(); flagBits = General; } inline QVector4D QMatrix4x4::row(int index) const { Q_ASSERT(index >= 0 && index < 4); - return QVector4D(m[0][index], m[1][index], m[2][index], m[3][index], 1); + return QVector4D(m[0][index], m[1][index], m[2][index], m[3][index]); } inline void QMatrix4x4::setRow(int index, const QVector4D& value) { Q_ASSERT(index >= 0 && index < 4); - m[0][index] = value.xp; - m[1][index] = value.yp; - m[2][index] = value.zp; - m[3][index] = value.wp; + m[0][index] = value.x(); + m[1][index] = value.y(); + m[2][index] = value.z(); + m[3][index] = value.w(); flagBits = General; } @@ -608,68 +608,68 @@ inline QMatrix4x4 operator*(const QMatrix4x4& m1, const QMatrix4x4& m2) inline QVector3D operator*(const QVector3D& vector, const QMatrix4x4& matrix) { - float x, y, z, w; - x = vector.xp * matrix.m[0][0] + - vector.yp * matrix.m[0][1] + - vector.zp * matrix.m[0][2] + + qreal x, y, z, w; + x = vector.x() * matrix.m[0][0] + + vector.y() * matrix.m[0][1] + + vector.z() * matrix.m[0][2] + matrix.m[0][3]; - y = vector.xp * matrix.m[1][0] + - vector.yp * matrix.m[1][1] + - vector.zp * matrix.m[1][2] + + y = vector.x() * matrix.m[1][0] + + vector.y() * matrix.m[1][1] + + vector.z() * matrix.m[1][2] + matrix.m[1][3]; - z = vector.xp * matrix.m[2][0] + - vector.yp * matrix.m[2][1] + - vector.zp * matrix.m[2][2] + + z = vector.x() * matrix.m[2][0] + + vector.y() * matrix.m[2][1] + + vector.z() * matrix.m[2][2] + matrix.m[2][3]; - w = vector.xp * matrix.m[3][0] + - vector.yp * matrix.m[3][1] + - vector.zp * matrix.m[3][2] + + w = vector.x() * matrix.m[3][0] + + vector.y() * matrix.m[3][1] + + vector.z() * matrix.m[3][2] + matrix.m[3][3]; if (w == 1.0f) - return QVector3D(x, y, z, 1); + return QVector3D(x, y, z); else - return QVector3D(x / w, y / w, z / w, 1); + return QVector3D(x / w, y / w, z / w); } inline QVector3D operator*(const QMatrix4x4& matrix, const QVector3D& vector) { - float x, y, z, w; + qreal x, y, z, w; if (matrix.flagBits == QMatrix4x4::Identity) { return vector; } else if (matrix.flagBits == QMatrix4x4::Translation) { - return QVector3D(vector.xp + matrix.m[3][0], - vector.yp + matrix.m[3][1], - vector.zp + matrix.m[3][2], 1); + return QVector3D(vector.x() + matrix.m[3][0], + vector.y() + matrix.m[3][1], + vector.z() + matrix.m[3][2]); } else if (matrix.flagBits == (QMatrix4x4::Translation | QMatrix4x4::Scale)) { - return QVector3D(vector.xp * matrix.m[0][0] + matrix.m[3][0], - vector.yp * matrix.m[1][1] + matrix.m[3][1], - vector.zp * matrix.m[2][2] + matrix.m[3][2], 1); + return QVector3D(vector.x() * matrix.m[0][0] + matrix.m[3][0], + vector.y() * matrix.m[1][1] + matrix.m[3][1], + vector.z() * matrix.m[2][2] + matrix.m[3][2]); } else if (matrix.flagBits == QMatrix4x4::Scale) { - return QVector3D(vector.xp * matrix.m[0][0], - vector.yp * matrix.m[1][1], - vector.zp * matrix.m[2][2], 1); + return QVector3D(vector.x() * matrix.m[0][0], + vector.y() * matrix.m[1][1], + vector.z() * matrix.m[2][2]); } else { - x = vector.xp * matrix.m[0][0] + - vector.yp * matrix.m[1][0] + - vector.zp * matrix.m[2][0] + + x = vector.x() * matrix.m[0][0] + + vector.y() * matrix.m[1][0] + + vector.z() * matrix.m[2][0] + matrix.m[3][0]; - y = vector.xp * matrix.m[0][1] + - vector.yp * matrix.m[1][1] + - vector.zp * matrix.m[2][1] + + y = vector.x() * matrix.m[0][1] + + vector.y() * matrix.m[1][1] + + vector.z() * matrix.m[2][1] + matrix.m[3][1]; - z = vector.xp * matrix.m[0][2] + - vector.yp * matrix.m[1][2] + - vector.zp * matrix.m[2][2] + + z = vector.x() * matrix.m[0][2] + + vector.y() * matrix.m[1][2] + + vector.z() * matrix.m[2][2] + matrix.m[3][2]; - w = vector.xp * matrix.m[0][3] + - vector.yp * matrix.m[1][3] + - vector.zp * matrix.m[2][3] + + w = vector.x() * matrix.m[0][3] + + vector.y() * matrix.m[1][3] + + vector.z() * matrix.m[2][3] + matrix.m[3][3]; if (w == 1.0f) - return QVector3D(x, y, z, 1); + return QVector3D(x, y, z); else - return QVector3D(x / w, y / w, z / w, 1); + return QVector3D(x / w, y / w, z / w); } } @@ -679,54 +679,54 @@ inline QVector3D operator*(const QMatrix4x4& matrix, const QVector3D& vector) inline QVector4D operator*(const QVector4D& vector, const QMatrix4x4& matrix) { - float x, y, z, w; - x = vector.xp * matrix.m[0][0] + - vector.yp * matrix.m[0][1] + - vector.zp * matrix.m[0][2] + - vector.wp * matrix.m[0][3]; - y = vector.xp * matrix.m[1][0] + - vector.yp * matrix.m[1][1] + - vector.zp * matrix.m[1][2] + - vector.wp * matrix.m[1][3]; - z = vector.xp * matrix.m[2][0] + - vector.yp * matrix.m[2][1] + - vector.zp * matrix.m[2][2] + - vector.wp * matrix.m[2][3]; - w = vector.xp * matrix.m[3][0] + - vector.yp * matrix.m[3][1] + - vector.zp * matrix.m[3][2] + - vector.wp * matrix.m[3][3]; - return QVector4D(x, y, z, w, 1); + qreal x, y, z, w; + x = vector.x() * matrix.m[0][0] + + vector.y() * matrix.m[0][1] + + vector.z() * matrix.m[0][2] + + vector.w() * matrix.m[0][3]; + y = vector.x() * matrix.m[1][0] + + vector.y() * matrix.m[1][1] + + vector.z() * matrix.m[1][2] + + vector.w() * matrix.m[1][3]; + z = vector.x() * matrix.m[2][0] + + vector.y() * matrix.m[2][1] + + vector.z() * matrix.m[2][2] + + vector.w() * matrix.m[2][3]; + w = vector.x() * matrix.m[3][0] + + vector.y() * matrix.m[3][1] + + vector.z() * matrix.m[3][2] + + vector.w() * matrix.m[3][3]; + return QVector4D(x, y, z, w); } inline QVector4D operator*(const QMatrix4x4& matrix, const QVector4D& vector) { - float x, y, z, w; - x = vector.xp * matrix.m[0][0] + - vector.yp * matrix.m[1][0] + - vector.zp * matrix.m[2][0] + - vector.wp * matrix.m[3][0]; - y = vector.xp * matrix.m[0][1] + - vector.yp * matrix.m[1][1] + - vector.zp * matrix.m[2][1] + - vector.wp * matrix.m[3][1]; - z = vector.xp * matrix.m[0][2] + - vector.yp * matrix.m[1][2] + - vector.zp * matrix.m[2][2] + - vector.wp * matrix.m[3][2]; - w = vector.xp * matrix.m[0][3] + - vector.yp * matrix.m[1][3] + - vector.zp * matrix.m[2][3] + - vector.wp * matrix.m[3][3]; - return QVector4D(x, y, z, w, 1); + qreal x, y, z, w; + x = vector.x() * matrix.m[0][0] + + vector.y() * matrix.m[1][0] + + vector.z() * matrix.m[2][0] + + vector.w() * matrix.m[3][0]; + y = vector.x() * matrix.m[0][1] + + vector.y() * matrix.m[1][1] + + vector.z() * matrix.m[2][1] + + vector.w() * matrix.m[3][1]; + z = vector.x() * matrix.m[0][2] + + vector.y() * matrix.m[1][2] + + vector.z() * matrix.m[2][2] + + vector.w() * matrix.m[3][2]; + w = vector.x() * matrix.m[0][3] + + vector.y() * matrix.m[1][3] + + vector.z() * matrix.m[2][3] + + vector.w() * matrix.m[3][3]; + return QVector4D(x, y, z, w); } #endif inline QPoint operator*(const QPoint& point, const QMatrix4x4& matrix) { - float xin, yin; - float x, y, w; + qreal xin, yin; + qreal x, y, w; xin = point.x(); yin = point.y(); x = xin * matrix.m[0][0] + @@ -746,8 +746,8 @@ inline QPoint operator*(const QPoint& point, const QMatrix4x4& matrix) inline QPointF operator*(const QPointF& point, const QMatrix4x4& matrix) { - float xin, yin; - float x, y, w; + qreal xin, yin; + qreal x, y, w; xin = point.x(); yin = point.y(); x = xin * matrix.m[0][0] + @@ -768,8 +768,8 @@ inline QPointF operator*(const QPointF& point, const QMatrix4x4& matrix) inline QPoint operator*(const QMatrix4x4& matrix, const QPoint& point) { - float xin, yin; - float x, y, w; + qreal xin, yin; + qreal x, y, w; xin = point.x(); yin = point.y(); if (matrix.flagBits == QMatrix4x4::Identity) { @@ -803,8 +803,8 @@ inline QPoint operator*(const QMatrix4x4& matrix, const QPoint& point) inline QPointF operator*(const QMatrix4x4& matrix, const QPointF& point) { - float xin, yin; - float x, y, w; + qreal xin, yin; + qreal x, y, w; xin = point.x(); yin = point.y(); if (matrix.flagBits == QMatrix4x4::Identity) { @@ -951,7 +951,7 @@ inline QVector4D QMatrix4x4::map(const QVector4D& point) const #endif -inline float *QMatrix4x4::data() +inline qreal *QMatrix4x4::data() { // We have to assume that the caller will modify the matrix elements, // so we flip it over to "General" mode. @@ -969,17 +969,17 @@ Q_GUI_EXPORT QDataStream &operator>>(QDataStream &, QMatrix4x4 &); #endif template <int N, int M> -QMatrix4x4 qGenericMatrixToMatrix4x4(const QGenericMatrix<N, M, qreal, float>& matrix) +QMatrix4x4 qGenericMatrixToMatrix4x4(const QGenericMatrix<N, M, qreal>& matrix) { return QMatrix4x4(matrix.constData(), N, M); } template <int N, int M> -QGenericMatrix<N, M, qreal, float> qGenericMatrixFromMatrix4x4(const QMatrix4x4& matrix) +QGenericMatrix<N, M, qreal> qGenericMatrixFromMatrix4x4(const QMatrix4x4& matrix) { - QGenericMatrix<N, M, qreal, float> result; - const float *m = matrix.constData(); - float *values = result.data(); + QGenericMatrix<N, M, qreal> result; + const qreal *m = matrix.constData(); + qreal *values = result.data(); for (int col = 0; col < N; ++col) { for (int row = 0; row < M; ++row) { if (col < 4 && row < 4) diff --git a/src/gui/math3d/qquaternion.cpp b/src/gui/math3d/qquaternion.cpp index ece4482..7206e9a 100644 --- a/src/gui/math3d/qquaternion.cpp +++ b/src/gui/math3d/qquaternion.cpp @@ -353,7 +353,7 @@ QQuaternion QQuaternion::fromAxisAndAngle(const QVector3D& axis, qreal angle) qreal s = qSin(a); qreal c = qCos(a); QVector3D ax = axis.normalized(); - return QQuaternion(c, ax.xp * s, ax.yp * s, ax.zp * s, 1).normalized(); + return QQuaternion(c, ax.x() * s, ax.y() * s, ax.z() * s).normalized(); } #endif @@ -365,19 +365,16 @@ QQuaternion QQuaternion::fromAxisAndAngle(const QVector3D& axis, qreal angle) QQuaternion QQuaternion::fromAxisAndAngle (qreal x, qreal y, qreal z, qreal angle) { - float xp = x; - float yp = y; - float zp = z; - qreal length = qSqrt(xp * xp + yp * yp + zp * zp); - if (!qIsNull(length)) { - xp /= length; - yp /= length; - zp /= length; + qreal length = qSqrt(x * x + y * y + z * z); + if (!qFuzzyIsNull(length - 1.0f) && !qFuzzyIsNull(length)) { + x /= length; + y /= length; + z /= length; } qreal a = (angle / 2.0f) * M_PI / 180.0f; qreal s = qSin(a); qreal c = qCos(a); - return QQuaternion(c, xp * s, yp * s, zp * s, 1).normalized(); + return QQuaternion(c, x * s, y * s, z * s).normalized(); } /*! diff --git a/src/gui/math3d/qquaternion.h b/src/gui/math3d/qquaternion.h index 12576d2..f243c42 100644 --- a/src/gui/math3d/qquaternion.h +++ b/src/gui/math3d/qquaternion.h @@ -133,11 +133,7 @@ public: (const QQuaternion& q1, const QQuaternion& q2, qreal t); private: - float wp, xp, yp, zp; - - friend class QMatrix4x4; - - QQuaternion(float scalar, float xpos, float ypos, float zpos, int dummy); + qreal wp, xp, yp, zp; }; inline QQuaternion::QQuaternion() : wp(1.0f), xp(0.0f), yp(0.0f), zp(0.0f) {} @@ -145,8 +141,6 @@ inline QQuaternion::QQuaternion() : wp(1.0f), xp(0.0f), yp(0.0f), zp(0.0f) {} inline QQuaternion::QQuaternion(qreal scalar, qreal xpos, qreal ypos, qreal zpos) : wp(scalar), xp(xpos), yp(ypos), zp(zpos) {} -inline QQuaternion::QQuaternion(float scalar, float xpos, float ypos, float zpos, int) : wp(scalar), xp(xpos), yp(ypos), zp(zpos) {} - inline bool QQuaternion::isNull() const { return qIsNull(xp) && qIsNull(yp) && qIsNull(zp) && qIsNull(wp); @@ -169,7 +163,7 @@ inline void QQuaternion::setScalar(qreal scalar) { wp = scalar; } inline QQuaternion QQuaternion::conjugate() const { - return QQuaternion(wp, -xp, -yp, -zp, 1); + return QQuaternion(wp, -xp, -yp, -zp); } inline QQuaternion &QQuaternion::operator+=(const QQuaternion &quaternion) @@ -201,18 +195,18 @@ inline QQuaternion &QQuaternion::operator*=(qreal factor) inline const QQuaternion operator*(const QQuaternion &q1, const QQuaternion& q2) { - float ww = (q1.zp + q1.xp) * (q2.xp + q2.yp); - float yy = (q1.wp - q1.yp) * (q2.wp + q2.zp); - float zz = (q1.wp + q1.yp) * (q2.wp - q2.zp); - float xx = ww + yy + zz; - float qq = 0.5 * (xx + (q1.zp - q1.xp) * (q2.xp - q2.yp)); - - float w = qq - ww + (q1.zp - q1.yp) * (q2.yp - q2.zp); - float x = qq - xx + (q1.xp + q1.wp) * (q2.xp + q2.wp); - float y = qq - yy + (q1.wp - q1.xp) * (q2.yp + q2.zp); - float z = qq - zz + (q1.zp + q1.yp) * (q2.wp - q2.xp); - - return QQuaternion(w, x, y, z, 1); + qreal ww = (q1.zp + q1.xp) * (q2.xp + q2.yp); + qreal yy = (q1.wp - q1.yp) * (q2.wp + q2.zp); + qreal zz = (q1.wp + q1.yp) * (q2.wp - q2.zp); + qreal xx = ww + yy + zz; + qreal qq = 0.5 * (xx + (q1.zp - q1.xp) * (q2.xp - q2.yp)); + + qreal w = qq - ww + (q1.zp - q1.yp) * (q2.yp - q2.zp); + qreal x = qq - xx + (q1.xp + q1.wp) * (q2.xp + q2.wp); + qreal y = qq - yy + (q1.wp - q1.xp) * (q2.yp + q2.zp); + qreal z = qq - zz + (q1.zp + q1.yp) * (q2.wp - q2.xp); + + return QQuaternion(w, x, y, z); } inline QQuaternion &QQuaternion::operator*=(const QQuaternion &quaternion) @@ -242,32 +236,32 @@ inline bool operator!=(const QQuaternion &q1, const QQuaternion &q2) inline const QQuaternion operator+(const QQuaternion &q1, const QQuaternion &q2) { - return QQuaternion(q1.wp + q2.wp, q1.xp + q2.xp, q1.yp + q2.yp, q1.zp + q2.zp, 1); + return QQuaternion(q1.wp + q2.wp, q1.xp + q2.xp, q1.yp + q2.yp, q1.zp + q2.zp); } inline const QQuaternion operator-(const QQuaternion &q1, const QQuaternion &q2) { - return QQuaternion(q1.wp - q2.wp, q1.xp - q2.xp, q1.yp - q2.yp, q1.zp - q2.zp, 1); + return QQuaternion(q1.wp - q2.wp, q1.xp - q2.xp, q1.yp - q2.yp, q1.zp - q2.zp); } inline const QQuaternion operator*(qreal factor, const QQuaternion &quaternion) { - return QQuaternion(quaternion.wp * factor, quaternion.xp * factor, quaternion.yp * factor, quaternion.zp * factor, 1); + return QQuaternion(quaternion.wp * factor, quaternion.xp * factor, quaternion.yp * factor, quaternion.zp * factor); } inline const QQuaternion operator*(const QQuaternion &quaternion, qreal factor) { - return QQuaternion(quaternion.wp * factor, quaternion.xp * factor, quaternion.yp * factor, quaternion.zp * factor, 1); + return QQuaternion(quaternion.wp * factor, quaternion.xp * factor, quaternion.yp * factor, quaternion.zp * factor); } inline const QQuaternion operator-(const QQuaternion &quaternion) { - return QQuaternion(-quaternion.wp, -quaternion.xp, -quaternion.yp, -quaternion.zp, 1); + return QQuaternion(-quaternion.wp, -quaternion.xp, -quaternion.yp, -quaternion.zp); } inline const QQuaternion operator/(const QQuaternion &quaternion, qreal divisor) { - return QQuaternion(quaternion.wp / divisor, quaternion.xp / divisor, quaternion.yp / divisor, quaternion.zp / divisor, 1); + return QQuaternion(quaternion.wp / divisor, quaternion.xp / divisor, quaternion.yp / divisor, quaternion.zp / divisor); } inline bool qFuzzyCompare(const QQuaternion& q1, const QQuaternion& q2) @@ -281,18 +275,18 @@ inline bool qFuzzyCompare(const QQuaternion& q1, const QQuaternion& q2) #ifndef QT_NO_VECTOR3D inline QQuaternion::QQuaternion(qreal scalar, const QVector3D& vector) - : wp(scalar), xp(vector.xp), yp(vector.yp), zp(vector.zp) {} + : wp(scalar), xp(vector.x()), yp(vector.y()), zp(vector.z()) {} inline void QQuaternion::setVector(const QVector3D& vector) { - xp = vector.xp; - yp = vector.yp; - zp = vector.zp; + xp = vector.x(); + yp = vector.y(); + zp = vector.z(); } inline QVector3D QQuaternion::vector() const { - return QVector3D(xp, yp, zp, 1); + return QVector3D(xp, yp, zp); } #endif @@ -307,11 +301,11 @@ inline void QQuaternion::setVector(qreal x, qreal y, qreal z) #ifndef QT_NO_VECTOR4D inline QQuaternion::QQuaternion(const QVector4D& vector) - : wp(vector.wp), xp(vector.xp), yp(vector.yp), zp(vector.zp) {} + : wp(vector.w()), xp(vector.x()), yp(vector.y()), zp(vector.z()) {} inline QVector4D QQuaternion::toVector4D() const { - return QVector4D(xp, yp, zp, wp, 1); + return QVector4D(xp, yp, zp, wp); } #endif diff --git a/src/gui/math3d/qvector3d.h b/src/gui/math3d/qvector3d.h index 767517e..1e95865 100644 --- a/src/gui/math3d/qvector3d.h +++ b/src/gui/math3d/qvector3d.h @@ -54,7 +54,6 @@ QT_MODULE(Gui) class QMatrix4x4; class QVector2D; class QVector4D; -class QQuaternion; #ifndef QT_NO_VECTOR3D @@ -136,8 +135,6 @@ private: friend class QVector2D; friend class QVector4D; - friend class QQuaternion; - friend class QMatrix4x4; #ifndef QT_NO_MATRIX4X4 friend QVector3D operator*(const QVector3D& vector, const QMatrix4x4& matrix); friend QVector3D operator*(const QMatrix4x4& matrix, const QVector3D& vector); diff --git a/src/gui/math3d/qvector4d.h b/src/gui/math3d/qvector4d.h index 4bd6639..520319a 100644 --- a/src/gui/math3d/qvector4d.h +++ b/src/gui/math3d/qvector4d.h @@ -54,7 +54,6 @@ QT_MODULE(Gui) class QMatrix4x4; class QVector2D; class QVector3D; -class QQuaternion; #ifndef QT_NO_VECTOR4D @@ -133,8 +132,6 @@ private: friend class QVector2D; friend class QVector3D; - friend class QQuaternion; - friend class QMatrix4x4; #ifndef QT_NO_MATRIX4X4 friend QVector4D operator*(const QVector4D& vector, const QMatrix4x4& matrix); friend QVector4D operator*(const QMatrix4x4& matrix, const QVector4D& vector); diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp index ab192c5..e9b1bd3 100644 --- a/src/gui/painting/qdrawhelper.cpp +++ b/src/gui/painting/qdrawhelper.cpp @@ -4953,15 +4953,18 @@ Q_STATIC_TEMPLATE_FUNCTION void blendTiled(int count, const QSpan *spans, void * if (modeSource && coverage == 255) { // Copy the first texture block - length = image_width; + length = qMin(image_width,length); + int tx = x; while (length) { int l = qMin(image_width - sx, length); if (buffer_size < l) l = buffer_size; - DST *dest = ((DST*)data->rasterBuffer->scanLine(spans->y)) + x; + DST *dest = ((DST*)data->rasterBuffer->scanLine(spans->y)) + tx; const SRC *src = (SRC*)data->texture.scanLine(sy) + sx; + qt_memconvert<DST, SRC>(dest, src, l); length -= l; + tx += l; sx = 0; } @@ -4971,8 +4974,8 @@ Q_STATIC_TEMPLATE_FUNCTION void blendTiled(int count, const QSpan *spans, void * // We are dealing with one block of data // - More likely to fit in the cache // - can use memcpy - int copy_image_width = image_width; - length = spans->len - image_width; + int copy_image_width = qMin(image_width, int(spans->len)); + length = spans->len - copy_image_width; DST *src = ((DST*)data->rasterBuffer->scanLine(spans->y)) + x; DST *dest = src + copy_image_width; while (copy_image_width < length) { diff --git a/src/gui/painting/qpaintbuffer.cpp b/src/gui/painting/qpaintbuffer.cpp index 04ddd7d..4d8b8c9 100644 --- a/src/gui/painting/qpaintbuffer.cpp +++ b/src/gui/painting/qpaintbuffer.cpp @@ -239,7 +239,7 @@ bool QPaintBuffer::isEmpty() const -void QPaintBuffer::draw(QPainter *painter) const +void QPaintBuffer::draw(QPainter *painter, int frame) const { #ifdef QPAINTBUFFER_DEBUG_DRAW qDebug() << "QPaintBuffer::draw() --------------------------------"; @@ -270,10 +270,10 @@ void QPaintBuffer::draw(QPainter *painter) const ? (QPaintEngineEx *) painter->paintEngine() : 0; if (xengine) { QPaintEngineExReplayer player; - player.draw(*this, painter); + player.draw(*this, painter, frame); } else { QPainterReplayer player; - player.draw(*this, painter); + player.draw(*this, painter, frame); } #ifdef QPAINTBUFFER_DEBUG_DRAW @@ -1035,17 +1035,31 @@ void QPainterReplayer::setupTransform(QPainter *_painter) painter->setTransform(m_world_matrix); } -void QPainterReplayer::draw(const QPaintBuffer &buffer, QPainter *_painter) +void QPainterReplayer::draw(const QPaintBuffer &buffer, QPainter *_painter, int frame) { d = buffer.d_ptr; setupTransform(_painter); - for (int cmdIndex=0; cmdIndex<d->commands.size(); ++cmdIndex) { + int frameStart = (frame == 0) ? 0 : d->frames.at(frame-1); + int frameEnd = (frame == d->frames.size()) ? d->commands.size() : d->frames.at(frame); + + for (int cmdIndex=frameStart; cmdIndex<frameEnd; ++cmdIndex) { const QPaintBufferCommand &cmd = d->commands.at(cmdIndex); process(cmd); } } +void QPaintBuffer::beginNewFrame() +{ + if (!d_ptr->commands.isEmpty()) + d_ptr->frames << d_ptr->commands.size(); +} + +int QPaintBuffer::numFrames() const +{ + return d_ptr->frames.size() + 1; +} + void QPainterReplayer::process(const QPaintBufferCommand &cmd) { switch (cmd.id) { @@ -1721,24 +1735,99 @@ QDataStream &operator>>(QDataStream &stream, QPaintBufferCommand &command) return stream; } +struct QPaintBufferCacheEntry +{ + QVariant::Type type; + quint64 cacheKey; +}; +Q_DECLARE_METATYPE(QPaintBufferCacheEntry); + +QDataStream &operator<<(QDataStream &stream, const QPaintBufferCacheEntry &entry) +{ + return stream << entry.type << entry.cacheKey; +} + +QDataStream &operator>>(QDataStream &stream, QPaintBufferCacheEntry &entry) +{ + return stream >> entry.type >> entry.cacheKey; +} + +static int qRegisterPaintBufferMetaTypes() +{ + qRegisterMetaType<QPaintBufferCacheEntry>(); + qRegisterMetaTypeStreamOperators<QPaintBufferCacheEntry>("QPaintBufferCacheEntry"); + + return 0; // something +} + +Q_CONSTRUCTOR_FUNCTION(qRegisterPaintBufferMetaTypes) + QDataStream &operator<<(QDataStream &stream, const QPaintBuffer &buffer) { + QHash<qint64, QPixmap> pixmaps; + QHash<qint64, QImage> images; + + QVector<QVariant> variants = buffer.d_ptr->variants; + for (int i = 0; i < variants.size(); ++i) { + const QVariant &v = variants.at(i); + if (v.type() == QVariant::Image) { + const QImage image(v.value<QImage>()); + images[image.cacheKey()] = image; + + QPaintBufferCacheEntry entry; + entry.type = QVariant::Image; + entry.cacheKey = image.cacheKey(); + variants[i] = QVariant::fromValue(entry); + } else if (v.type() == QVariant::Pixmap) { + const QPixmap pixmap(v.value<QPixmap>()); + pixmaps[pixmap.cacheKey()] = pixmap; + + QPaintBufferCacheEntry entry; + entry.type = QVariant::Pixmap; + entry.cacheKey = pixmap.cacheKey(); + variants[i] = QVariant::fromValue(entry); + } + } + + stream << pixmaps; + stream << images; + stream << buffer.d_ptr->ints; stream << buffer.d_ptr->floats; - stream << buffer.d_ptr->variants; + stream << variants; stream << buffer.d_ptr->commands; stream << buffer.d_ptr->boundingRect; + stream << buffer.d_ptr->frames; return stream; } QDataStream &operator>>(QDataStream &stream, QPaintBuffer &buffer) { + QHash<qint64, QPixmap> pixmaps; + QHash<qint64, QImage> images; + + stream >> pixmaps; + stream >> images; + stream >> buffer.d_ptr->ints; stream >> buffer.d_ptr->floats; stream >> buffer.d_ptr->variants; stream >> buffer.d_ptr->commands; stream >> buffer.d_ptr->boundingRect; + stream >> buffer.d_ptr->frames; + + QVector<QVariant> &variants = buffer.d_ptr->variants; + for (int i = 0; i < variants.size(); ++i) { + const QVariant &v = variants.at(i); + if (v.canConvert<QPaintBufferCacheEntry>()) { + QPaintBufferCacheEntry entry = v.value<QPaintBufferCacheEntry>(); + if (entry.type == QVariant::Image) + variants[i] = QVariant(images.value(entry.cacheKey)); + else + variants[i] = QVariant(pixmaps.value(entry.cacheKey)); + } + } return stream; } diff --git a/src/gui/painting/qpaintbuffer_p.h b/src/gui/painting/qpaintbuffer_p.h index b360279..2cb1d7c 100644 --- a/src/gui/painting/qpaintbuffer_p.h +++ b/src/gui/painting/qpaintbuffer_p.h @@ -71,7 +71,10 @@ public: bool isEmpty() const; - void draw(QPainter *painter) const; + void beginNewFrame(); + int numFrames() const; + + void draw(QPainter *painter, int frame = 0) const; void setBoundingRect(const QRectF &rect); QRectF boundingRect() const; @@ -270,6 +273,7 @@ public: QVector<QVariant> variants; QVector<QPaintBufferCommand> commands; + QList<int> frames; QPaintBufferEngine *engine; QRectF boundingRect; @@ -306,7 +310,7 @@ public: void setupTransform(QPainter *painter); void process(const QPaintBufferCommand &cmd); - void draw(const QPaintBuffer &buffer, QPainter *painter); + void draw(const QPaintBuffer &buffer, QPainter *painter, int frame); protected: QPaintBufferPrivate *d; diff --git a/src/gui/painting/qpaintengine_mac.cpp b/src/gui/painting/qpaintengine_mac.cpp index 934b385..249bcfa 100644 --- a/src/gui/painting/qpaintengine_mac.cpp +++ b/src/gui/painting/qpaintengine_mac.cpp @@ -116,11 +116,15 @@ QMacCGContext::QMacCGContext(QPainter *p) if (devType == QInternal::Widget) { QRegion clip = p->paintEngine()->systemClip(); + QTransform native = p->deviceTransform(); + QTransform logical = p->combinedTransform(); if (p->hasClipping()) { + QRegion r = p->clipRegion(); + r.translate(native.dx() - logical.dx(), native.dy() - logical.dy()); if (clip.isEmpty()) - clip = p->clipRegion(); + clip = r; else - clip &= p->clipRegion(); + clip &= r; } qt_mac_clip_cg(context, clip, 0); diff --git a/src/gui/painting/qpaintengine_raster_p.h b/src/gui/painting/qpaintengine_raster_p.h index c31a087..b13fb62 100644 --- a/src/gui/painting/qpaintengine_raster_p.h +++ b/src/gui/painting/qpaintengine_raster_p.h @@ -373,7 +373,11 @@ public: }; -class Q_GUI_EXPORT QClipData { +class +#ifdef Q_WS_QWS +Q_GUI_EXPORT +#endif +QClipData { public: QClipData(int height); ~QClipData(); @@ -480,7 +484,11 @@ private: /******************************************************************************* * QRasterBuffer */ -class Q_GUI_EXPORT QRasterBuffer +class +#ifdef Q_WS_QWS +Q_GUI_EXPORT +#endif +QRasterBuffer { public: QRasterBuffer() : m_width(0), m_height(0), m_buffer(0) { init(); } diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp index a6bea76..263e53e 100644 --- a/src/gui/painting/qpainter.cpp +++ b/src/gui/painting/qpainter.cpp @@ -7545,10 +7545,9 @@ void qt_format_text(const QFont &fnt, const QRectF &_r, if (!painter) tf |= Qt::TextDontPrint; - int maxUnderlines = 0; + uint maxUnderlines = 0; int numUnderlines = 0; - int underlinePositionStack[32]; - int *underlinePositions = underlinePositionStack; + QVarLengthArray<int, 32> underlinePositions(1); QFontMetricsF fm(fnt); QString text = str; @@ -7557,54 +7556,46 @@ start_lengthVariant: bool hasMoreLengthVariants = false; // compatible behaviour to the old implementation. Replace // tabs by spaces - QChar *chr = text.data() + offset; - QChar *end = text.data() + text.length(); bool has_tab = false; - while (chr != end) { - if (*chr == QLatin1Char('\r') || (singleline && *chr == QLatin1Char('\n'))) { - *chr = QLatin1Char(' '); - } else if (*chr == QLatin1Char('\n')) { - *chr = QChar::LineSeparator; - } else if (*chr == QLatin1Char('&')) { + int old_offset = offset; + for (; offset < text.length(); offset++) { + QChar chr = text.at(offset); + if (chr == QLatin1Char('\r') || (singleline && chr == QLatin1Char('\n'))) { + text[offset] = QLatin1Char(' '); + } else if (chr == QLatin1Char('\n')) { + text[offset] = QChar::LineSeparator; + } else if (chr == QLatin1Char('&')) { ++maxUnderlines; - } else if (*chr == QLatin1Char('\t')) { + } else if (chr == QLatin1Char('\t')) { + if (!expandtabs) { + text[offset] = QLatin1Char(' '); + } else if (!tabarraylen && !tabstops) { + tabstops = qRound(fm.width(QLatin1Char('x'))*8); + } has_tab = true; - } else if (*chr == QChar(ushort(0x9c))) { + } else if (chr == QChar(ushort(0x9c))) { // string with multiple length variants - end = chr; hasMoreLengthVariants = true; break; } - ++chr; - } - if (has_tab) { - if (!expandtabs) { - chr = text.data() + offset; - while (chr != end) { - if (*chr == QLatin1Char('\t')) - *chr = QLatin1Char(' '); - ++chr; - } - } else if (!tabarraylen && !tabstops) { - tabstops = qRound(fm.width(QLatin1Char('x'))*8); - } } - QChar *cout = end; - if (hidemnmemonic || showmnemonic) { - if (maxUnderlines > 32) - underlinePositions = new int[maxUnderlines]; - cout = text.data() + offset; + int length = offset - old_offset; + if ((hidemnmemonic || showmnemonic) && maxUnderlines > 0) { + underlinePositions.resize(maxUnderlines + 1); + + QChar *cout = text.data() + old_offset; QChar *cin = cout; - int l = end - cout; + int l = length; while (l) { if (*cin == QLatin1Char('&')) { ++cin; + --length; --l; if (!l) break; if (*cin != QLatin1Char('&') && !hidemnmemonic) - underlinePositions[numUnderlines++] = cout - text.unicode(); + underlinePositions[numUnderlines++] = cout - text.data() - old_offset; } *cout = *cin; ++cout; @@ -7621,7 +7612,7 @@ start_lengthVariant: qreal height = 0; qreal width = 0; - QString finalText = text.mid(offset, cout - (text.data() + offset)); + QString finalText = text.mid(old_offset, length); QStackTextEngine engine(finalText, fnt); if (option) { engine.option = *option; @@ -7640,7 +7631,7 @@ start_lengthVariant: engine.forceJustification = true; QTextLayout textLayout(&engine); textLayout.setCacheEnabled(true); - textLayout.engine()->underlinePositions = underlinePositions; + textLayout.engine()->underlinePositions = underlinePositions.data(); if (finalText.isEmpty()) { height = fm.height(); @@ -7709,7 +7700,7 @@ start_lengthVariant: QRectF bounds = QRectF(r.x() + xoff, r.y() + yoff, width, height); if (hasMoreLengthVariants && !(tf & Qt::TextLongestVariant) && !r.contains(bounds)) { - offset = end - text.data() + 1; + offset++; goto start_lengthVariant; } if (brect) @@ -7738,9 +7729,6 @@ start_lengthVariant: painter->restore(); } } - - if (underlinePositions != underlinePositionStack) - delete [] underlinePositions; } /*! diff --git a/src/gui/painting/qprinter.cpp b/src/gui/painting/qprinter.cpp index 882e6bc..882f994 100644 --- a/src/gui/painting/qprinter.cpp +++ b/src/gui/painting/qprinter.cpp @@ -1286,6 +1286,23 @@ int QPrinter::numCopies() const /*! + Returns the number of copies that will be printed. The default + value is 1. + + This function always returns the actual value specified in the print + dialog or using setNumCopies(). + + \sa setNumCopies(), numCopies(); +*/ +int QPrinter::actualNumCopies() const +{ + Q_D(const QPrinter); + return qt_printerRealNumCopies(d->paintEngine); +} + + + +/*! Sets the number of copies to be printed to \a numCopies. The printer driver reads this setting and prints the specified diff --git a/src/gui/painting/qprinter.h b/src/gui/painting/qprinter.h index 46419f4..16f2182 100644 --- a/src/gui/painting/qprinter.h +++ b/src/gui/painting/qprinter.h @@ -197,6 +197,8 @@ public: void setNumCopies(int); int numCopies() const; + int actualNumCopies() const; + void setPaperSource(PaperSource); PaperSource paperSource() const; diff --git a/src/gui/painting/qrasterizer_p.h b/src/gui/painting/qrasterizer_p.h index 4cfdbbf..059d772 100644 --- a/src/gui/painting/qrasterizer_p.h +++ b/src/gui/painting/qrasterizer_p.h @@ -65,7 +65,11 @@ struct QSpanData; class QRasterBuffer; class QRasterizerPrivate; -class Q_GUI_EXPORT QRasterizer +class +#ifdef Q_WS_QWS +Q_GUI_EXPORT +#endif +QRasterizer { public: QRasterizer(); diff --git a/src/gui/styles/qcommonstyle.cpp b/src/gui/styles/qcommonstyle.cpp index 41f9ec0..817401e 100644 --- a/src/gui/styles/qcommonstyle.cpp +++ b/src/gui/styles/qcommonstyle.cpp @@ -1882,7 +1882,6 @@ void QCommonStyle::drawControl(ControlElement element, const QStyleOption *opt, break; case CE_TabBarTabLabel: if (const QStyleOptionTab *tab = qstyleoption_cast<const QStyleOptionTab *>(opt)) { - // ### consider merging this with SE_TabBarTabText QStyleOptionTabV3 tabV2(*tab); QRect tr = tabV2.rect; bool verticalTabs = tabV2.shape == QTabBar::RoundedEast @@ -5127,6 +5126,9 @@ int QCommonStyle::styleHint(StyleHint sh, const QStyleOption *opt, const QWidget ret = Qt::LinksAccessibleByMouse; break; case SH_DialogButtonBox_ButtonsHaveIcons: +#ifdef Q_WS_X11 + return true; +#endif ret = 0; break; case SH_SpellCheckUnderlineStyle: @@ -5223,6 +5225,19 @@ QPixmap QCommonStyle::standardPixmap(StandardPixmap sp, const QStyleOption *opti if (QApplication::desktopSettingsAware() && !QIcon::themeName().isEmpty()) { switch (sp) { + case SP_DialogYesButton: + case SP_DialogOkButton: + pixmap = QIcon::fromTheme(QLatin1String("dialog-ok")).pixmap(16); + break; + case SP_DialogApplyButton: + pixmap = QIcon::fromTheme(QLatin1String("dialog-ok-apply")).pixmap(16); + break; + case SP_DialogDiscardButton: + pixmap = QIcon::fromTheme(QLatin1String("edit-delete")).pixmap(16); + break; + case SP_DialogCloseButton: + pixmap = QIcon::fromTheme(QLatin1String("dialog-close")).pixmap(16); + break; case SP_DirHomeIcon: pixmap = QIcon::fromTheme(QLatin1String("user-home")).pixmap(16); break; @@ -5337,13 +5352,15 @@ QPixmap QCommonStyle::standardPixmap(StandardPixmap sp, const QStyleOption *opti case SP_DialogHelpButton: pixmap = QIcon::fromTheme(QLatin1String("help-contents")).pixmap(24); break; + case SP_DialogNoButton: case SP_DialogCancelButton: - pixmap = QIcon::fromTheme(QLatin1String("process-stop")).pixmap(24); + pixmap = QIcon::fromTheme(QLatin1String("dialog-cancel"), + QIcon::fromTheme(QLatin1String("process-stop"))).pixmap(24); break; case SP_DialogSaveButton: pixmap = QIcon::fromTheme(QLatin1String("document-save")).pixmap(24); break; - case SP_FileLinkIcon: + case SP_FileLinkIcon: pixmap = QIcon::fromTheme(QLatin1String("emblem-symbolic-link")).pixmap(16); if (!pixmap.isNull()) { QPixmap fileIcon = QIcon::fromTheme(QLatin1String("text-x-generic")).pixmap(16); @@ -5531,6 +5548,25 @@ QIcon QCommonStyle::standardIconImplementation(StandardPixmap standardIcon, cons case SP_DirOpenIcon: icon = QIcon::fromTheme(QLatin1String("folder-open")); break; + case SP_DialogSaveButton: + icon = QIcon::fromTheme(QLatin1String("document-save")); + break; + case SP_DialogApplyButton: + icon = QIcon::fromTheme(QLatin1String("dialog-ok-apply")); + break; + case SP_DialogYesButton: + case SP_DialogOkButton: + icon = QIcon::fromTheme(QLatin1String("dialog-ok")); + break; + case SP_DialogDiscardButton: + icon = QIcon::fromTheme(QLatin1String("edit-delete")); + break; + case SP_DialogResetButton: + icon = QIcon::fromTheme(QLatin1String("edit-clear")); + break; + case SP_DialogHelpButton: + icon = QIcon::fromTheme(QLatin1String("help-contents")); + break; case SP_FileIcon: icon = QIcon::fromTheme(QLatin1String("text-x-generic")); break; @@ -5576,21 +5612,13 @@ QIcon QCommonStyle::standardIconImplementation(StandardPixmap standardIcon, cons case SP_ArrowLeft: icon = QIcon::fromTheme(QLatin1String("go-previous")); break; - case SP_DialogHelpButton: - icon = QIcon::fromTheme(QLatin1String("help-contents")); - break; case SP_DialogCancelButton: - icon = QIcon::fromTheme(QLatin1String("process-stop")); + icon = QIcon::fromTheme(QLatin1String("dialog-cancel"), + QIcon::fromTheme(QLatin1String("process-stop"))); break; case SP_DialogCloseButton: icon = QIcon::fromTheme(QLatin1String("window-close")); break; - case SP_DialogApplyButton: - icon = QIcon::fromTheme(QLatin1String("dialog-ok-apply")); - break; - case SP_DialogOkButton: - icon = QIcon::fromTheme(QLatin1String("dialog-ok")); - break; case SP_FileDialogDetailedView: icon = QIcon::fromTheme(QLatin1String("view-list-details")); break; @@ -5630,9 +5658,6 @@ QIcon QCommonStyle::standardIconImplementation(StandardPixmap standardIcon, cons case SP_MediaVolumeMuted: icon = QIcon::fromTheme(QLatin1String("audio-volume-muted")); break; - case SP_DialogResetButton: - icon = QIcon::fromTheme(QLatin1String("edit-clear")); - break; case SP_ArrowForward: if (rtl) return standardIconImplementation(SP_ArrowLeft, option, widget); diff --git a/src/gui/styles/qmacstyle_mac.mm b/src/gui/styles/qmacstyle_mac.mm index ef1818d..e7ef51a 100644 --- a/src/gui/styles/qmacstyle_mac.mm +++ b/src/gui/styles/qmacstyle_mac.mm @@ -1951,6 +1951,7 @@ void QMacStyle::polish(QWidget* w) w->setWindowOpacity(QSysInfo::MacintoshVersion >= QSysInfo::MV_10_5 ? 0.985 : 0.94); if (!w->testAttribute(Qt::WA_SetPalette)) { QPixmap px(64, 64); + px.fill(Qt::white); HIThemeMenuDrawInfo mtinfo; mtinfo.version = qt_mac_hitheme_version; mtinfo.menuType = kThemeMenuTypePopUp; diff --git a/src/gui/styles/qmotifstyle.cpp b/src/gui/styles/qmotifstyle.cpp index 3550408..904a8f56 100644 --- a/src/gui/styles/qmotifstyle.cpp +++ b/src/gui/styles/qmotifstyle.cpp @@ -2683,6 +2683,9 @@ QMotifStyle::styleHint(StyleHint hint, const QStyleOption *opt, const QWidget *w case SH_LineEdit_PasswordCharacter: ret = '*'; break; + case SH_DialogButtonBox_ButtonsHaveIcons: + ret = 0; + break; default: ret = QCommonStyle::styleHint(hint, opt, widget, returnData); break; diff --git a/src/gui/styles/qplastiquestyle.cpp b/src/gui/styles/qplastiquestyle.cpp index 8250013..bdd72b7 100644 --- a/src/gui/styles/qplastiquestyle.cpp +++ b/src/gui/styles/qplastiquestyle.cpp @@ -5435,6 +5435,11 @@ int QPlastiqueStyle::styleHint(StyleHint hint, const QStyleOption *option, const case SH_Menu_SubMenuPopupDelay: ret = 96; // from Plastik break; +#ifdef Q_WS_X11 + case SH_DialogButtonBox_ButtonsHaveIcons: + ret = true; + break; +#endif #ifndef Q_OS_WIN case SH_Menu_AllowActiveAndDisabled: ret = false; diff --git a/src/gui/styles/qstylesheetstyle.cpp b/src/gui/styles/qstylesheetstyle.cpp index cead2ac..3d8dec6 100644 --- a/src/gui/styles/qstylesheetstyle.cpp +++ b/src/gui/styles/qstylesheetstyle.cpp @@ -3948,7 +3948,7 @@ void QStyleSheetStyle::drawControl(ControlElement ce, const QStyleOption *opt, Q QFont oldFont = p->font(); if (subRule.hasFont) p->setFont(subRule.font); - if (subRule.hasBox()) { + if (subRule.hasBox() || !subRule.hasNativeBorder()) { tabCopy.rect = ce == CE_TabBarTabShape ? subRule.borderRect(r) : subRule.contentsRect(r); QWindowsStyle::drawControl(ce, &tabCopy, p, w); @@ -5702,6 +5702,15 @@ QRect QStyleSheetStyle::subElementRect(SubElement se, const QStyleOption *opt, c } break; } + case SE_TabBarTabText: + case SE_TabBarTabLeftButton: + case SE_TabBarTabRightButton: { + QRenderRule subRule = renderRule(w, opt, PseudoElement_TabBarTab); + if (subRule.hasBox() || !subRule.hasNativeBorder()) { + return ParentStyle::subElementRect(se, opt, w); + } + break; + } #endif // QT_NO_TABBAR case SE_DockWidgetCloseButton: diff --git a/src/gui/styles/qwindowsstyle.cpp b/src/gui/styles/qwindowsstyle.cpp index 31f96c3..2a88578 100644 --- a/src/gui/styles/qwindowsstyle.cpp +++ b/src/gui/styles/qwindowsstyle.cpp @@ -1206,6 +1206,9 @@ int QWindowsStyle::styleHint(StyleHint hint, const QStyleOption *opt, const QWid case SH_ItemView_ArrowKeysNavigateIntoChildren: ret = true; break; + case SH_DialogButtonBox_ButtonsHaveIcons: + ret = 0; + break; default: ret = QCommonStyle::styleHint(hint, opt, widget, returnData); break; diff --git a/src/gui/text/qcssparser.cpp b/src/gui/text/qcssparser.cpp index f252444..a38f276 100644 --- a/src/gui/text/qcssparser.cpp +++ b/src/gui/text/qcssparser.cpp @@ -1171,7 +1171,7 @@ static void parseShorthandFontProperty(const QVector<Value> &values, QFont *font { font->setStyle(QFont::StyleNormal); font->setWeight(QFont::Normal); - *fontSizeAdjustment = 0; + *fontSizeAdjustment = -255; int i = 0; while (i < values.count()) { diff --git a/src/gui/text/qtextdocument.cpp b/src/gui/text/qtextdocument.cpp index 1bdaceb..e565d0a 100644 --- a/src/gui/text/qtextdocument.cpp +++ b/src/gui/text/qtextdocument.cpp @@ -2521,13 +2521,15 @@ void QTextHtmlExporter::emitBlock(const QTextBlock &block) default: html += QLatin1String("<ul"); // ### should not happen } + html += QLatin1String(" style=\"margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px;"); + if (format.hasProperty(QTextFormat::ListIndent)) { - html += QLatin1String(" style=\"-qt-list-indent: "); + html += QLatin1String(" -qt-list-indent: "); html += QString::number(format.indent()); - html += QLatin1String(";\""); + html += QLatin1Char(';'); } - html += QLatin1Char('>'); + html += QLatin1String("\">"); } html += QLatin1String("<li"); diff --git a/src/gui/text/qtextengine.cpp b/src/gui/text/qtextengine.cpp index 2b84c6c..ba9145e 100644 --- a/src/gui/text/qtextengine.cpp +++ b/src/gui/text/qtextengine.cpp @@ -2245,6 +2245,28 @@ void QTextEngine::indexAdditionalFormats() } } +/* These two helper functions are used to determine whether we need to insert a ZWJ character + between the text that gets truncated and the ellipsis. This is important to get + correctly shaped results for arabic text. +*/ +static bool nextCharJoins(const QString &string, int pos) +{ + while (pos < string.length() && string.at(pos).category() == QChar::Mark_NonSpacing) + ++pos; + if (pos == string.length()) + return false; + return string.at(pos).joining() != QChar::OtherJoining; +} + +static bool prevCharJoins(const QString &string, int pos) +{ + while (pos > 0 && string.at(pos - 1).category() == QChar::Mark_NonSpacing) + --pos; + if (pos == 0) + return false; + return (string.at(pos - 1).joining() == QChar::Dual || string.at(pos - 1).joining() == QChar::Center); +} + QString QTextEngine::elidedText(Qt::TextElideMode mode, const QFixed &width, int flags) const { // qDebug() << "elidedText; available width" << width.toReal() << "text width:" << this->width(0, layoutData->string.length()).toReal(); @@ -2345,6 +2367,9 @@ QString QTextEngine::elidedText(Qt::TextElideMode mode, const QFixed &width, int } while (nextBreak < layoutData->string.length() && currentWidth < availableWidth); + if (nextCharJoins(layoutData->string, pos)) + ellipsisText.prepend(QChar(0x200d) /* ZWJ */); + return layoutData->string.left(pos) + ellipsisText; } else if (mode == Qt::ElideLeft) { QFixed currentWidth; @@ -2362,6 +2387,9 @@ QString QTextEngine::elidedText(Qt::TextElideMode mode, const QFixed &width, int } while (nextBreak > 0 && currentWidth < availableWidth); + if (prevCharJoins(layoutData->string, pos)) + ellipsisText.append(QChar(0x200d) /* ZWJ */); + return ellipsisText + layoutData->string.mid(pos); } else if (mode == Qt::ElideMiddle) { QFixed leftWidth; @@ -2391,6 +2419,11 @@ QString QTextEngine::elidedText(Qt::TextElideMode mode, const QFixed &width, int && nextRightBreak > 0 && leftWidth + rightWidth < availableWidth); + if (nextCharJoins(layoutData->string, leftPos)) + ellipsisText.prepend(QChar(0x200d) /* ZWJ */); + if (prevCharJoins(layoutData->string, rightPos)) + ellipsisText.append(QChar(0x200d) /* ZWJ */); + return layoutData->string.left(leftPos) + ellipsisText + layoutData->string.mid(rightPos); } diff --git a/src/gui/widgets/qdatetimeedit_p.h b/src/gui/widgets/qdatetimeedit_p.h index 7e1c24d..689b508 100644 --- a/src/gui/widgets/qdatetimeedit_p.h +++ b/src/gui/widgets/qdatetimeedit_p.h @@ -89,7 +89,7 @@ public: QDateTime validateAndInterpret(QString &input, int &, QValidator::State &state, bool fixup = false) const; void clearSection(int index); - virtual QString displayText() const { return edit->displayText(); } // this is from QDateTimeParser + virtual QString displayText() const { return edit->text(); } // this is from QDateTimeParser int absoluteIndex(QDateTimeEdit::Section s, int index) const; int absoluteIndex(const SectionNode &s) const; diff --git a/src/gui/widgets/qmenu_symbian.cpp b/src/gui/widgets/qmenu_symbian.cpp index 7ae799c..c5953af 100644 --- a/src/gui/widgets/qmenu_symbian.cpp +++ b/src/gui/widgets/qmenu_symbian.cpp @@ -3,6 +3,7 @@ ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) ** +** This file is part of the S60 port of the Qt toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** No Commercial Usage diff --git a/src/network/access/qnetworkaccessmanager.cpp b/src/network/access/qnetworkaccessmanager.cpp index bc01e82..2b2504f 100644 --- a/src/network/access/qnetworkaccessmanager.cpp +++ b/src/network/access/qnetworkaccessmanager.cpp @@ -306,6 +306,7 @@ static QByteArray proxyAuthenticationKey(const QNetworkProxy &proxy, const QStri case QNetworkProxy::FtpCachingProxy: key.setScheme(QLatin1String("proxy-ftp")); + break; case QNetworkProxy::DefaultProxy: case QNetworkProxy::NoProxy: diff --git a/src/network/kernel/qhostinfo_p.h b/src/network/kernel/qhostinfo_p.h index 000de07..ee741aa 100644 --- a/src/network/kernel/qhostinfo_p.h +++ b/src/network/kernel/qhostinfo_p.h @@ -47,7 +47,7 @@ // ------------- // // This file is not part of the Qt API. It exists for the convenience -// of the QLibrary class. This header file may change from +// of the QHostInfo class. This header file may change from // version to version without notice, or even be removed. // // We mean it. @@ -180,7 +180,8 @@ class QHostInfoPrivate public: inline QHostInfoPrivate() : err(QHostInfo::NoError), - errorStr(QLatin1String(QT_TRANSLATE_NOOP("QHostInfo", "Unknown error"))) + errorStr(QLatin1String(QT_TRANSLATE_NOOP("QHostInfo", "Unknown error"))), + lookupId(0) { } diff --git a/src/network/socket/qabstractsocket.cpp b/src/network/socket/qabstractsocket.cpp index b85a9d2..98740ba 100644 --- a/src/network/socket/qabstractsocket.cpp +++ b/src/network/socket/qabstractsocket.cpp @@ -453,6 +453,9 @@ QAbstractSocketPrivate::QAbstractSocketPrivate() peerPort(0), socketEngine(0), cachedSocketDescriptor(-1), +#ifdef Q_OS_LINUX + addToBytesAvailable(0), +#endif readBufferMaxSize(0), readBuffer(QABSTRACTSOCKET_BUFFERSIZE), writeBuffer(QABSTRACTSOCKET_BUFFERSIZE), @@ -461,6 +464,7 @@ QAbstractSocketPrivate::QAbstractSocketPrivate() connectTimer(0), connectTimeElapsed(0), hostLookupId(-1), + socketType(QAbstractSocket::UnknownSocketType), state(QAbstractSocket::UnconnectedState), socketError(QAbstractSocket::UnknownSocketError) { diff --git a/src/network/socket/qabstractsocket_p.h b/src/network/socket/qabstractsocket_p.h index 3e292f9..49605c5 100644 --- a/src/network/socket/qabstractsocket_p.h +++ b/src/network/socket/qabstractsocket_p.h @@ -47,7 +47,7 @@ // ------------- // // This file is not part of the Qt API. It exists for the convenience -// of the QLibrary class. This header file may change from +// of the QAbstractSocket class. This header file may change from // version to version without notice, or even be removed. // // We mean it. diff --git a/src/network/socket/qlocalsocket_p.h b/src/network/socket/qlocalsocket_p.h index a774cbf..a7248f6 100644 --- a/src/network/socket/qlocalsocket_p.h +++ b/src/network/socket/qlocalsocket_p.h @@ -139,7 +139,7 @@ public: void _q_emitReadyRead(); DWORD bytesAvailable(); void startAsyncRead(); - void completeAsyncRead(); + bool completeAsyncRead(); void checkReadyRead(); HANDLE handle; OVERLAPPED overlapped; diff --git a/src/network/socket/qlocalsocket_win.cpp b/src/network/socket/qlocalsocket_win.cpp index f70a0aa..96dfa6e 100644 --- a/src/network/socket/qlocalsocket_win.cpp +++ b/src/network/socket/qlocalsocket_win.cpp @@ -199,9 +199,13 @@ qint64 QLocalSocket::readData(char *data, qint64 maxSize) } } - if (!d->readSequenceStarted) - d->startAsyncRead(); - d->checkReadyRead(); + if (d->pipeClosed) { + QTimer::singleShot(0, this, SLOT(_q_pipeClosed())); + } else { + if (!d->readSequenceStarted) + d->startAsyncRead(); + d->checkReadyRead(); + } return readSoFar; } @@ -251,9 +255,22 @@ void QLocalSocketPrivate::startAsyncRead() readSequenceStarted = true; if (ReadFile(handle, ptr, bytesToRead, NULL, &overlapped)) { completeAsyncRead(); - } else if (GetLastError() != ERROR_IO_PENDING) { - setErrorString(QLatin1String("QLocalSocketPrivate::startAsyncRead")); - return; + } else { + switch (GetLastError()) { + case ERROR_IO_PENDING: + // This is not an error. We're getting notified, when data arrives. + return; + case ERROR_PIPE_NOT_CONNECTED: + { + // It may happen, that the other side closes the connection directly + // after writing data. Then we must set the appropriate socket state. + pipeClosed = true; + return; + } + default: + setErrorString(QLatin1String("QLocalSocketPrivate::startAsyncRead")); + return; + } } } while (!readSequenceStarted); } @@ -261,20 +278,23 @@ void QLocalSocketPrivate::startAsyncRead() /*! \internal Sets the correct size of the read buffer after a read operation. + Returns false, if an error occured or the connection dropped. */ -void QLocalSocketPrivate::completeAsyncRead() +bool QLocalSocketPrivate::completeAsyncRead() { ResetEvent(overlapped.hEvent); readSequenceStarted = false; DWORD bytesRead; if (!GetOverlappedResult(handle, &overlapped, &bytesRead, TRUE)) { - setErrorString(QLatin1String("QLocalSocketPrivate::completeAsyncRead")); - return; + if (GetLastError() != ERROR_PIPE_NOT_CONNECTED) + setErrorString(QLatin1String("QLocalSocketPrivate::completeAsyncRead")); + return false; } actualReadBufferSize += bytesRead; readBuffer.truncate(actualReadBufferSize); + return true; } qint64 QLocalSocket::writeData(const char *data, qint64 maxSize) @@ -425,7 +445,10 @@ void QLocalSocketPrivate::_q_canWrite() void QLocalSocketPrivate::_q_notified() { Q_Q(QLocalSocket); - completeAsyncRead(); + if (!completeAsyncRead()) { + pipeClosed = true; + return; + } startAsyncRead(); pendingReadyRead = false; emit q->readyRead(); diff --git a/src/opengl/opengl.pro b/src/opengl/opengl.pro index 458aa7e..560d31f 100644 --- a/src/opengl/opengl.pro +++ b/src/opengl/opengl.pro @@ -38,7 +38,7 @@ SOURCES += qgl.cpp \ !contains(QT_CONFIG, opengles1):!contains(QT_CONFIG, opengles1cl) { HEADERS += qglshaderprogram.h \ qglpixmapfilter_p.h \ - qgraphicsshadereffect.h \ + qgraphicsshadereffect_p.h \ qgraphicssystem_gl_p.h \ qwindowsurface_gl_p.h \ qpixmapdata_gl_p.h \ diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp index dde4eba..9e0c5f8 100644 --- a/src/opengl/qgl.cpp +++ b/src/opengl/qgl.cpp @@ -207,9 +207,10 @@ QGLSignalProxy *QGLSignalProxy::instance() \i \link setSampleBuffers() Multisample buffers.\endlink \endlist - You can also specify preferred bit depths for the depth buffer, - alpha buffer, accumulation buffer and the stencil buffer with the - functions: setDepthBufferSize(), setAlphaBufferSize(), + You can also specify preferred bit depths for the color buffer, + depth buffer, alpha buffer, accumulation buffer and the stencil + buffer with the functions: setRedBufferSize(), setGreenBufferSize(), + setBlueBufferSize(), setDepthBufferSize(), setAlphaBufferSize(), setAccumBufferSize() and setStencilBufferSize(). Note that even if you specify that you prefer a 32 bit depth @@ -293,19 +294,20 @@ static inline GLint qgluProject(GLdouble objx, GLdouble objy, GLdouble objz, } /*! - Constructs a QGLFormat object with the factory default settings: + Constructs a QGLFormat object with the following default settings: \list \i \link setDoubleBuffer() Double buffer:\endlink Enabled. \i \link setDepth() Depth buffer:\endlink Enabled. \i \link setRgba() RGBA:\endlink Enabled (i.e., color index disabled). \i \link setAlpha() Alpha channel:\endlink Disabled. \i \link setAccum() Accumulator buffer:\endlink Disabled. - \i \link setStencil() Stencil buffer:\endlink Disabled. + \i \link setStencil() Stencil buffer:\endlink Enabled. \i \link setStereo() Stereo:\endlink Disabled. \i \link setDirectRendering() Direct rendering:\endlink Enabled. \i \link setOverlay() Overlay:\endlink Disabled. \i \link setPlane() Plane:\endlink 0 (i.e., normal plane). - \i \link setSampleBuffers() Multisample buffers:\endlink Disabled. + \i \link setSampleBuffers() Multisample buffers:\endlink Enabled on + OpenGL/ES 2.0, disabled on other platforms. \endlist */ @@ -316,26 +318,26 @@ QGLFormat::QGLFormat() /*! - Creates a QGLFormat object that is a copy of the current \link - defaultFormat() application default format\endlink. + Creates a QGLFormat object that is a copy of the current + defaultFormat(). - If \a options is not 0, this copy is modified by these format - options. The \a options parameter should be \c FormatOption values - OR'ed together. + If \a options is not 0, the default format is modified by the + specified format options. The \a options parameter should be + QGL::FormatOption values OR'ed together. This constructor makes it easy to specify a certain desired format in classes derived from QGLWidget, for example: \snippet doc/src/snippets/code/src_opengl_qgl.cpp 3 - Note that there are \c FormatOption values to turn format settings - both on and off, e.g. \c DepthBuffer and \c NoDepthBuffer, - \c DirectRendering and \c IndirectRendering, etc. + Note that there are QGL::FormatOption values to turn format settings + both on and off, e.g. QGL::DepthBuffer and QGL::NoDepthBuffer, + QGL::DirectRendering and QGL::IndirectRendering, etc. The \a plane parameter defaults to 0 and is the plane which this format should be associated with. Not all OpenGL implementations supports overlay/underlay rendering planes. - \sa defaultFormat(), setOption() + \sa defaultFormat(), setOption(), setPlane() */ QGLFormat::QGLFormat(QGL::FormatOptions options, int plane) @@ -349,13 +351,26 @@ QGLFormat::QGLFormat(QGL::FormatOptions options, int plane) } /*! + \internal +*/ +void QGLFormat::detach() +{ + if (d->ref != 1) { + QGLFormatPrivate *newd = new QGLFormatPrivate(d); + if (!d->ref.deref()) + delete d; + d = newd; + } +} + +/*! Constructs a copy of \a other. */ QGLFormat::QGLFormat(const QGLFormat &other) { - d = new QGLFormatPrivate; - *d = *other.d; + d = other.d; + d->ref.ref(); } /*! @@ -364,7 +379,12 @@ QGLFormat::QGLFormat(const QGLFormat &other) QGLFormat &QGLFormat::operator=(const QGLFormat &other) { - *d = *other.d; + if (d != other.d) { + other.d->ref.ref(); + if (!d->ref.deref()) + delete d; + d = other.d; + } return *this; } @@ -373,7 +393,8 @@ QGLFormat &QGLFormat::operator=(const QGLFormat &other) */ QGLFormat::~QGLFormat() { - delete d; + if (!d->ref.deref()) + delete d; } /*! @@ -649,6 +670,7 @@ int QGLFormat::samples() const */ void QGLFormat::setSamples(int numSamples) { + detach(); if (numSamples < 0) { qWarning("QGLFormat::setSamples: Cannot have negative number of samples per pixel %d", numSamples); return; @@ -676,6 +698,7 @@ void QGLFormat::setSamples(int numSamples) */ void QGLFormat::setSwapInterval(int interval) { + detach(); d->swapInterval = interval; } @@ -721,7 +744,7 @@ void QGLFormat::setOverlay(bool enable) is 0, which means the normal plane. The default for overlay formats is 1, which is the first overlay plane. - \sa setPlane() + \sa setPlane(), defaultOverlayFormat() */ int QGLFormat::plane() const { @@ -743,6 +766,7 @@ int QGLFormat::plane() const */ void QGLFormat::setPlane(int plane) { + detach(); d->pln = plane; } @@ -754,6 +778,7 @@ void QGLFormat::setPlane(int plane) void QGLFormat::setOption(QGL::FormatOptions opt) { + detach(); if (opt & 0xffff) d->opts |= opt; else @@ -783,6 +808,7 @@ bool QGLFormat::testOption(QGL::FormatOptions opt) const */ void QGLFormat::setDepthBufferSize(int size) { + detach(); if (size < 0) { qWarning("QGLFormat::setDepthBufferSize: Cannot set negative depth buffer size %d", size); return; @@ -809,6 +835,7 @@ int QGLFormat::depthBufferSize() const */ void QGLFormat::setRedBufferSize(int size) { + detach(); if (size < 0) { qWarning("QGLFormat::setRedBufferSize: Cannot set negative red buffer size %d", size); return; @@ -837,6 +864,7 @@ int QGLFormat::redBufferSize() const */ void QGLFormat::setGreenBufferSize(int size) { + detach(); if (size < 0) { qWarning("QGLFormat::setGreenBufferSize: Cannot set negative green buffer size %d", size); return; @@ -865,6 +893,7 @@ int QGLFormat::greenBufferSize() const */ void QGLFormat::setBlueBufferSize(int size) { + detach(); if (size < 0) { qWarning("QGLFormat::setBlueBufferSize: Cannot set negative blue buffer size %d", size); return; @@ -892,6 +921,7 @@ int QGLFormat::blueBufferSize() const */ void QGLFormat::setAlphaBufferSize(int size) { + detach(); if (size < 0) { qWarning("QGLFormat::setAlphaBufferSize: Cannot set negative alpha buffer size %d", size); return; @@ -918,6 +948,7 @@ int QGLFormat::alphaBufferSize() const */ void QGLFormat::setAccumBufferSize(int size) { + detach(); if (size < 0) { qWarning("QGLFormat::setAccumBufferSize: Cannot set negative accumulate buffer size %d", size); return; @@ -942,6 +973,7 @@ int QGLFormat::accumBufferSize() const */ void QGLFormat::setStencilBufferSize(int size) { + detach(); if (size < 0) { qWarning("QGLFormat::setStencilBufferSize: Cannot set negative stencil buffer size %d", size); return; @@ -1195,7 +1227,7 @@ void QGLFormat::setDefaultFormat(const QGLFormat &f) /*! Returns the default QGLFormat for overlay contexts. - The factory default overlay format is: + The default overlay format is: \list \i \link setDoubleBuffer() Double buffer:\endlink Disabled. \i \link setDepth() Depth buffer:\endlink Disabled. @@ -1206,6 +1238,7 @@ void QGLFormat::setDefaultFormat(const QGLFormat &f) \i \link setStereo() Stereo:\endlink Disabled. \i \link setDirectRendering() Direct rendering:\endlink Enabled. \i \link setOverlay() Overlay:\endlink Disabled. + \i \link setSampleBuffers() Multisample buffers:\endlink Disabled. \i \link setPlane() Plane:\endlink 1 (i.e., first overlay plane). \endlist @@ -1256,7 +1289,12 @@ bool operator==(const QGLFormat& a, const QGLFormat& b) { return (int) a.d->opts == (int) b.d->opts && a.d->pln == b.d->pln && a.d->alphaSize == b.d->alphaSize && a.d->accumSize == b.d->accumSize && a.d->stencilSize == b.d->stencilSize - && a.d->depthSize == b.d->depthSize; + && a.d->depthSize == b.d->depthSize + && a.d->redSize == b.d->redSize + && a.d->greenSize == b.d->greenSize + && a.d->blueSize == b.d->blueSize + && a.d->numSamples == b.d->numSamples + && a.d->swapInterval == b.d->swapInterval; } diff --git a/src/opengl/qgl.h b/src/opengl/qgl.h index 1d9f623..daac760 100644 --- a/src/opengl/qgl.h +++ b/src/opengl/qgl.h @@ -255,6 +255,8 @@ public: private: QGLFormatPrivate *d; + void detach(); + friend Q_OPENGL_EXPORT bool operator==(const QGLFormat&, const QGLFormat&); friend Q_OPENGL_EXPORT bool operator!=(const QGLFormat&, const QGLFormat&); }; @@ -277,7 +279,6 @@ public: bool isSharing() const; void reset(); - // ### Qt 5: make format() return a const ref instead QGLFormat format() const; QGLFormat requestedFormat() const; void setFormat(const QGLFormat& format); @@ -403,15 +404,11 @@ private: #endif friend class QGLFramebufferObject; friend class QGLFramebufferObjectPrivate; -#ifdef Q_WS_WIN - friend bool qt_resolve_GLSL_functions(QGLContext *ctx); - friend bool qt_createGLSLProgram(QGLContext *ctx, GLuint &program, const char *shader_src, GLuint &shader); -#endif private: Q_DISABLE_COPY(QGLContext) }; -Q_DECLARE_OPERATORS_FOR_FLAGS(QGLContext::BindOptions); +Q_DECLARE_OPERATORS_FOR_FLAGS(QGLContext::BindOptions) class Q_OPENGL_EXPORT QGLWidget : public QWidget { @@ -447,7 +444,6 @@ public: bool doubleBuffer() const; void swapBuffers(); - // ### Qt 5: make format() return a const ref instead QGLFormat format() const; void setFormat(const QGLFormat& format); diff --git a/src/opengl/qgl_p.h b/src/opengl/qgl_p.h index 72ec35e..d4b7597 100644 --- a/src/opengl/qgl_p.h +++ b/src/opengl/qgl_p.h @@ -59,6 +59,7 @@ #include "QtCore/qthread.h" #include "QtCore/qthreadstorage.h" #include "QtCore/qhash.h" +#include "QtCore/qatomic.h" #include "private/qwidget_p.h" #include "qcache.h" @@ -127,7 +128,9 @@ QT_END_INCLUDE_NAMESPACE class QGLFormatPrivate { public: - QGLFormatPrivate() { + QGLFormatPrivate() + : ref(1) + { opts = QGL::DoubleBuffer | QGL::DepthBuffer | QGL::Rgba | QGL::DirectRendering | QGL::StencilBuffer; #if defined(QT_OPENGL_ES_2) opts |= QGL::SampleBuffers; @@ -137,6 +140,22 @@ public: numSamples = -1; swapInterval = -1; } + QGLFormatPrivate(const QGLFormatPrivate *other) + : ref(1), + opts(other->opts), + pln(other->pln), + depthSize(other->depthSize), + accumSize(other->accumSize), + stencilSize(other->stencilSize), + redSize(other->redSize), + greenSize(other->greenSize), + blueSize(other->blueSize), + alphaSize(other->alphaSize), + numSamples(other->numSamples), + swapInterval(other->swapInterval) + { + } + QAtomicInt ref; QGL::FormatOptions opts; int pln; int depthSize; diff --git a/src/opengl/qglframebufferobject.cpp b/src/opengl/qglframebufferobject.cpp index a03e627..c53ed3a 100644 --- a/src/opengl/qglframebufferobject.cpp +++ b/src/opengl/qglframebufferobject.cpp @@ -63,7 +63,7 @@ QT_BEGIN_NAMESPACE extern QImage qt_gl_read_framebuffer(const QSize&, bool, bool); -#define QGL_FUNC_CONTEXT QGLContext *ctx = d_ptr->ctx; +#define QGL_FUNC_CONTEXT QGLContextGroup *ctx = d_ptr->ctx; #define QT_CHECK_GLERROR() \ { \ @@ -97,7 +97,7 @@ public: \i \link setSamples() Number of samples per pixels.\endlink \i \link setAttachment() Depth and/or stencil attachments.\endlink \i \link setTextureTarget() Texture target.\endlink - \i \link setInternalFormat() Internal format.\endlink + \i \link setInternalTextureFormat() Internal texture format.\endlink \endlist Note that the desired attachments or number of samples per pixels might not @@ -115,7 +115,7 @@ public: By default the format specifies a non-multisample framebuffer object with no attachments, texture target \c GL_TEXTURE_2D, and internal format \c GL_RGBA8. - \sa samples(), attachment(), target(), internalFormat() + \sa samples(), attachment(), target(), internalTextureFormat() */ #ifndef QT_OPENGL_ES @@ -234,23 +234,24 @@ GLenum QGLFramebufferObjectFormat::textureTarget() const } /*! - Sets the internal format of a framebuffer object's texture or multisample - framebuffer object's color buffer to \a internalFormat. + Sets the internal format of a framebuffer object's texture or + multisample framebuffer object's color buffer to + \a internalTextureFormat. - \sa internalFormat() + \sa internalTextureFormat() */ -void QGLFramebufferObjectFormat::setInternalFormat(GLenum internalFormat) +void QGLFramebufferObjectFormat::setInternalTextureFormat(GLenum internalTextureFormat) { - d->internal_format = internalFormat; + d->internal_format = internalTextureFormat; } /*! Returns the internal format of a framebuffer object's texture or multisample framebuffer object's color buffer. - \sa setInternalFormat() + \sa setInternalTextureFormat() */ -GLenum QGLFramebufferObjectFormat::internalFormat() const +GLenum QGLFramebufferObjectFormat::internalTextureFormat() const { return d->internal_format; } @@ -263,16 +264,16 @@ void QGLFramebufferObjectFormat::setTextureTarget(QMacCompatGLenum target) } /*! \internal */ -void QGLFramebufferObjectFormat::setInternalFormat(QMacCompatGLenum internalFormat) +void QGLFramebufferObjectFormat::setInternalTextureFormat(QMacCompatGLenum internalTextureFormat) { - d->internal_format = internalFormat; + d->internal_format = internalTextureFormat; } #endif class QGLFramebufferObjectPrivate { public: - QGLFramebufferObjectPrivate() : depth_stencil_buffer(0), valid(false), bound(false), ctx(0), previous_fbo(0), engine(0) {} + QGLFramebufferObjectPrivate() : depth_stencil_buffer(0), valid(false), ctx(0), previous_fbo(0), engine(0) {} ~QGLFramebufferObjectPrivate() {} void init(const QSize& sz, QGLFramebufferObject::Attachment attachment, @@ -286,9 +287,8 @@ public: QSize size; QGLFramebufferObjectFormat format; uint valid : 1; - uint bound : 1; QGLFramebufferObject::Attachment fbo_attachment; - QGLContext *ctx; // for Windows extension ptrs + QGLContextGroup *ctx; // for Windows extension ptrs GLuint previous_fbo; mutable QPaintEngine *engine; }; @@ -340,9 +340,10 @@ bool QGLFramebufferObjectPrivate::checkFramebufferStatus() const void QGLFramebufferObjectPrivate::init(const QSize &sz, QGLFramebufferObject::Attachment attachment, GLenum texture_target, GLenum internal_format, GLint samples) { - ctx = const_cast<QGLContext *>(QGLContext::currentContext()); + QGLContext *currentContext = const_cast<QGLContext *>(QGLContext::currentContext()); + ctx = QGLContextPrivate::contextGroup(currentContext); bool ext_detected = (QGLExtensions::glExtensions & QGLExtensions::FramebufferObject); - if (!ext_detected || (ext_detected && !qt_resolve_framebufferobject_extensions(ctx))) + if (!ext_detected || (ext_detected && !qt_resolve_framebufferobject_extensions(currentContext))) return; size = sz; @@ -466,7 +467,7 @@ void QGLFramebufferObjectPrivate::init(const QSize &sz, QGLFramebufferObject::At fbo_attachment = QGLFramebufferObject::NoAttachment; } - glBindFramebuffer(GL_FRAMEBUFFER_EXT, ctx->d_ptr->current_fbo); + glBindFramebuffer(GL_FRAMEBUFFER_EXT, currentContext->d_ptr->current_fbo); if (!valid) { if (color_buffer) glDeleteRenderbuffers(1, &color_buffer); @@ -479,7 +480,7 @@ void QGLFramebufferObjectPrivate::init(const QSize &sz, QGLFramebufferObject::At format.setTextureTarget(target); format.setSamples(int(samples)); format.setAttachment(fbo_attachment); - format.setInternalFormat(internal_format); + format.setInternalTextureFormat(internal_format); } /*! @@ -636,7 +637,7 @@ QGLFramebufferObject::QGLFramebufferObject(const QSize &size, const QGLFramebuff : d_ptr(new QGLFramebufferObjectPrivate) { Q_D(QGLFramebufferObject); - d->init(size, format.attachment(), format.textureTarget(), format.internalFormat(), format.samples()); + d->init(size, format.attachment(), format.textureTarget(), format.internalTextureFormat(), format.samples()); } /*! \overload @@ -649,7 +650,7 @@ QGLFramebufferObject::QGLFramebufferObject(int width, int height, const QGLFrame : d_ptr(new QGLFramebufferObjectPrivate) { Q_D(QGLFramebufferObject); - d->init(QSize(width, height), format.attachment(), format.textureTarget(), format.internalFormat(), format.samples()); + d->init(QSize(width, height), format.attachment(), format.textureTarget(), format.internalTextureFormat(), format.samples()); } #ifdef Q_MAC_COMPAT_GL_FUNCTIONS @@ -736,16 +737,19 @@ QGLFramebufferObject::~QGLFramebufferObject() delete d->engine; - if (isValid() - && (d->ctx == QGLContext::currentContext() - || qgl_share_reg()->checkSharing(d->ctx, QGLContext::currentContext()))) - { + if (isValid()) { + const QGLContext *oldContext = QGLContext::currentContext(); + bool switchContext = !oldContext || QGLContextPrivate::contextGroup(oldContext) != ctx; + if (switchContext) + const_cast<QGLContext *>(ctx->context())->makeCurrent(); glDeleteTextures(1, &d->texture); if (d->color_buffer) glDeleteRenderbuffers(1, &d->color_buffer); if (d->depth_stencil_buffer) glDeleteRenderbuffers(1, &d->depth_stencil_buffer); glDeleteFramebuffers(1, &d->fbo); + if (oldContext && switchContext) + const_cast<QGLContext *>(oldContext)->makeCurrent(); } } @@ -791,7 +795,7 @@ bool QGLFramebufferObject::bind() Q_D(QGLFramebufferObject); QGL_FUNC_CONTEXT; glBindFramebuffer(GL_FRAMEBUFFER_EXT, d->fbo); - d->bound = d->valid = d->checkFramebufferStatus(); + d->valid = d->checkFramebufferStatus(); const QGLContext *context = QGLContext::currentContext(); if (d->valid && context) { // Save the previous setting to automatically restore in release(). @@ -822,7 +826,6 @@ bool QGLFramebufferObject::release() return false; Q_D(QGLFramebufferObject); QGL_FUNC_CONTEXT; - d->bound = false; const QGLContext *context = QGLContext::currentContext(); if (context) { @@ -898,7 +901,7 @@ QImage QGLFramebufferObject::toImage() const bool wasBound = isBound(); if (!wasBound) const_cast<QGLFramebufferObject *>(this)->bind(); - QImage image = qt_gl_read_framebuffer(d->size, d->ctx->format().alpha(), true); + QImage image = qt_gl_read_framebuffer(d->size, format().textureTarget() != GL_RGB, true); if (!wasBound) const_cast<QGLFramebufferObject *>(this)->release(); @@ -970,16 +973,14 @@ bool QGLFramebufferObject::hasOpenGLFramebufferObjects() */ void QGLFramebufferObject::drawTexture(const QRectF &target, GLuint textureId, GLenum textureTarget) { - Q_D(QGLFramebufferObject); - d->ctx->drawTexture(target, textureId, textureTarget); + const_cast<QGLContext *>(QGLContext::currentContext())->drawTexture(target, textureId, textureTarget); } #ifdef Q_MAC_COMPAT_GL_FUNCTIONS /*! \internal */ void QGLFramebufferObject::drawTexture(const QRectF &target, QMacCompatGLuint textureId, QMacCompatGLenum textureTarget) { - Q_D(QGLFramebufferObject); - d->ctx->drawTexture(target, textureId, textureTarget); + const_cast<QGLContext *>(QGLContext::currentContext())->drawTexture(target, textureId, textureTarget); } #endif @@ -995,16 +996,14 @@ void QGLFramebufferObject::drawTexture(const QRectF &target, QMacCompatGLuint te */ void QGLFramebufferObject::drawTexture(const QPointF &point, GLuint textureId, GLenum textureTarget) { - Q_D(QGLFramebufferObject); - d->ctx->drawTexture(point, textureId, textureTarget); + const_cast<QGLContext *>(QGLContext::currentContext())->drawTexture(point, textureId, textureTarget); } #ifdef Q_MAC_COMPAT_GL_FUNCTIONS /*! \internal */ void QGLFramebufferObject::drawTexture(const QPointF &point, QMacCompatGLuint textureId, QMacCompatGLenum textureTarget) { - Q_D(QGLFramebufferObject); - d->ctx->drawTexture(point, textureId, textureTarget); + const_cast<QGLContext *>(QGLContext::currentContext())->drawTexture(point, textureId, textureTarget); } #endif @@ -1101,7 +1100,7 @@ QGLFramebufferObject::Attachment QGLFramebufferObject::attachment() const bool QGLFramebufferObject::isBound() const { Q_D(const QGLFramebufferObject); - return d->bound; + return QGLContext::currentContext()->d_ptr->current_fbo == d->fbo; } /*! diff --git a/src/opengl/qglframebufferobject.h b/src/opengl/qglframebufferobject.h index ad14e50..ec1ae7d 100644 --- a/src/opengl/qglframebufferobject.h +++ b/src/opengl/qglframebufferobject.h @@ -151,12 +151,12 @@ public: void setTextureTarget(GLenum target); GLenum textureTarget() const; - void setInternalFormat(GLenum internalFormat); - GLenum internalFormat() const; + void setInternalTextureFormat(GLenum internalTextureFormat); + GLenum internalTextureFormat() const; #ifdef Q_MAC_COMPAT_GL_FUNCTIONS void setTextureTarget(QMacCompatGLenum target); - void setInternalFormat(QMacCompatGLenum internalFormat); + void setInternalTextureFormat(QMacCompatGLenum internalTextureFormat); #endif private: diff --git a/src/opengl/qglpixmapfilter.cpp b/src/opengl/qglpixmapfilter.cpp index 56e5baa..68db9c0 100644 --- a/src/opengl/qglpixmapfilter.cpp +++ b/src/opengl/qglpixmapfilter.cpp @@ -324,7 +324,7 @@ bool QGLPixmapBlurFilter::processGL(QPainter *painter, const QPointF &pos, const filter->setSource(generateBlurShader(radius(), quality() == Qt::SmoothTransformation)); QGLFramebufferObjectFormat format; - format.setInternalFormat(GLenum(src.hasAlphaChannel() ? GL_RGBA : GL_RGB)); + format.setInternalTextureFormat(GLenum(src.hasAlphaChannel() ? GL_RGBA : GL_RGB)); QGLFramebufferObject *fbo = qgl_fbo_pool()->acquire(src.size(), format); if (!fbo) diff --git a/src/opengl/qglshaderprogram.cpp b/src/opengl/qglshaderprogram.cpp index 56b55d0..bcc6c61 100644 --- a/src/opengl/qglshaderprogram.cpp +++ b/src/opengl/qglshaderprogram.cpp @@ -2288,6 +2288,58 @@ void QGLShaderProgram::setUniformValue(const char *name, const QSizeF& size) setUniformValue(uniformLocation(name), size); } +// We have to repack matrices from qreal to GLfloat. +#define setUniformMatrix(func,location,value,cols,rows) \ + if (location == -1) \ + return; \ + if (sizeof(qreal) == sizeof(GLfloat)) { \ + func(location, 1, GL_FALSE, \ + reinterpret_cast<const GLfloat *>(value.constData())); \ + } else { \ + GLfloat mat[cols * rows]; \ + const qreal *data = value.constData(); \ + for (int i = 0; i < cols * rows; ++i) \ + mat[i] = data[i]; \ + func(location, 1, GL_FALSE, mat); \ + } +#if !defined(QT_OPENGL_ES_2) +#define setUniformGenericMatrix(func,colfunc,location,value,cols,rows) \ + if (location == -1) \ + return; \ + if (sizeof(qreal) == sizeof(GLfloat)) { \ + const GLfloat *data = reinterpret_cast<const GLfloat *> \ + (value.constData()); \ + if (func) \ + func(location, 1, GL_FALSE, data); \ + else \ + colfunc(location, cols, data); \ + } else { \ + GLfloat mat[cols * rows]; \ + const qreal *data = value.constData(); \ + for (int i = 0; i < cols * rows; ++i) \ + mat[i] = data[i]; \ + if (func) \ + func(location, 1, GL_FALSE, mat); \ + else \ + colfunc(location, cols, mat); \ + } +#else +#define setUniformGenericMatrix(func,colfunc,location,value,cols,rows) \ + if (location == -1) \ + return; \ + if (sizeof(qreal) == sizeof(GLfloat)) { \ + const GLfloat *data = reinterpret_cast<const GLfloat *> \ + (value.constData()); \ + colfunc(location, cols, data); \ + } else { \ + GLfloat mat[cols * rows]; \ + const qreal *data = value.constData(); \ + for (int i = 0; i < cols * rows; ++i) \ + mat[i] = data[i]; \ + colfunc(location, cols, mat); \ + } +#endif + /*! Sets the uniform variable at \a location in the current context to a 2x2 matrix \a value. @@ -2296,8 +2348,7 @@ void QGLShaderProgram::setUniformValue(const char *name, const QSizeF& size) */ void QGLShaderProgram::setUniformValue(int location, const QMatrix2x2& value) { - if (location != -1) - glUniformMatrix2fv(location, 1, GL_FALSE, value.data()); + setUniformMatrix(glUniformMatrix2fv, location, value, 2, 2); } /*! @@ -2321,20 +2372,8 @@ void QGLShaderProgram::setUniformValue(const char *name, const QMatrix2x2& value */ void QGLShaderProgram::setUniformValue(int location, const QMatrix2x3& value) { -#if !defined(QT_OPENGL_ES_2) - if (location != -1) { - if (glUniformMatrix2x3fv) { - // OpenGL 2.1+: pass the matrix directly. - glUniformMatrix2x3fv(location, 1, GL_FALSE, value.data()); - } else { - // OpenGL 2.0: pass the matrix columns as a vector. - glUniform3fv(location, 2, value.data()); - } - } -#else - if (location != -1) - glUniform3fv(location, 2, value.data()); -#endif + setUniformGenericMatrix + (glUniformMatrix2x3fv, glUniform3fv, location, value, 2, 3); } /*! @@ -2358,20 +2397,8 @@ void QGLShaderProgram::setUniformValue(const char *name, const QMatrix2x3& value */ void QGLShaderProgram::setUniformValue(int location, const QMatrix2x4& value) { -#if !defined(QT_OPENGL_ES_2) - if (location != -1) { - if (glUniformMatrix2x4fv) { - // OpenGL 2.1+: pass the matrix directly. - glUniformMatrix2x4fv(location, 1, GL_FALSE, value.data()); - } else { - // OpenGL 2.0: pass the matrix columns as a vector. - glUniform4fv(location, 2, value.data()); - } - } -#else - if (location != -1) - glUniform4fv(location, 2, value.data()); -#endif + setUniformGenericMatrix + (glUniformMatrix2x4fv, glUniform4fv, location, value, 2, 4); } /*! @@ -2395,20 +2422,8 @@ void QGLShaderProgram::setUniformValue(const char *name, const QMatrix2x4& value */ void QGLShaderProgram::setUniformValue(int location, const QMatrix3x2& value) { -#if !defined(QT_OPENGL_ES_2) - if (location != -1) { - if (glUniformMatrix3x2fv) { - // OpenGL 2.1+: pass the matrix directly. - glUniformMatrix3x2fv(location, 1, GL_FALSE, value.data()); - } else { - // OpenGL 2.0: pass the matrix columns as a vector. - glUniform2fv(location, 3, value.data()); - } - } -#else - if (location != -1) - glUniform2fv(location, 3, value.data()); -#endif + setUniformGenericMatrix + (glUniformMatrix3x2fv, glUniform2fv, location, value, 3, 2); } /*! @@ -2432,8 +2447,7 @@ void QGLShaderProgram::setUniformValue(const char *name, const QMatrix3x2& value */ void QGLShaderProgram::setUniformValue(int location, const QMatrix3x3& value) { - if (location != -1) - glUniformMatrix3fv(location, 1, GL_FALSE, value.data()); + setUniformMatrix(glUniformMatrix3fv, location, value, 3, 3); } /*! @@ -2457,20 +2471,8 @@ void QGLShaderProgram::setUniformValue(const char *name, const QMatrix3x3& value */ void QGLShaderProgram::setUniformValue(int location, const QMatrix3x4& value) { -#if !defined(QT_OPENGL_ES_2) - if (location != -1) { - if (glUniformMatrix3x4fv) { - // OpenGL 2.1+: pass the matrix directly. - glUniformMatrix3x4fv(location, 1, GL_FALSE, value.data()); - } else { - // OpenGL 2.0: pass the matrix columns as a vector. - glUniform4fv(location, 3, value.data()); - } - } -#else - if (location != -1) - glUniform4fv(location, 3, value.data()); -#endif + setUniformGenericMatrix + (glUniformMatrix3x4fv, glUniform4fv, location, value, 3, 4); } /*! @@ -2494,20 +2496,8 @@ void QGLShaderProgram::setUniformValue(const char *name, const QMatrix3x4& value */ void QGLShaderProgram::setUniformValue(int location, const QMatrix4x2& value) { -#if !defined(QT_OPENGL_ES_2) - if (location != -1) { - if (glUniformMatrix4x2fv) { - // OpenGL 2.1+: pass the matrix directly. - glUniformMatrix4x2fv(location, 1, GL_FALSE, value.data()); - } else { - // OpenGL 2.0: pass the matrix columns as a vector. - glUniform2fv(location, 4, value.data()); - } - } -#else - if (location != -1) - glUniform2fv(location, 4, value.data()); -#endif + setUniformGenericMatrix + (glUniformMatrix4x2fv, glUniform2fv, location, value, 4, 2); } /*! @@ -2531,20 +2521,8 @@ void QGLShaderProgram::setUniformValue(const char *name, const QMatrix4x2& value */ void QGLShaderProgram::setUniformValue(int location, const QMatrix4x3& value) { -#if !defined(QT_OPENGL_ES_2) - if (location != -1) { - if (glUniformMatrix4x3fv) { - // OpenGL 2.1+: pass the matrix directly. - glUniformMatrix4x3fv(location, 1, GL_FALSE, value.data()); - } else { - // OpenGL 2.0: pass the matrix columns as a vector. - glUniform3fv(location, 4, value.data()); - } - } -#else - if (location != -1) - glUniform3fv(location, 4, value.data()); -#endif + setUniformGenericMatrix + (glUniformMatrix4x3fv, glUniform3fv, location, value, 4, 3); } /*! @@ -2568,8 +2546,7 @@ void QGLShaderProgram::setUniformValue(const char *name, const QMatrix4x3& value */ void QGLShaderProgram::setUniformValue(int location, const QMatrix4x4& value) { - if (location != -1) - glUniformMatrix4fv(location, 1, GL_FALSE, value.data()); + setUniformMatrix(glUniformMatrix4fv, location, value, 4, 4); } /*! @@ -2815,18 +2792,20 @@ void QGLShaderProgram::setUniformValueArray(const char *name, const QVector4D *v setUniformValueArray(uniformLocation(name), values, count); } -// We may have to repack matrix arrays if the matrix types -// contain additional flag bits. Especially QMatrix4x4. +// We have to repack matrix arrays from qreal to GLfloat. #define setUniformMatrixArray(func,location,values,count,type,cols,rows) \ if (location == -1 || count <= 0) \ return; \ - if (count == 1 || sizeof(type) == cols * rows * sizeof(GLfloat)) { \ - func(location, count, GL_FALSE, values->constData()); \ + if (sizeof(type) == sizeof(GLfloat) * cols * rows) { \ + func(location, count, GL_FALSE, \ + reinterpret_cast<const GLfloat *>(values[0].constData())); \ } else { \ QVarLengthArray<GLfloat> temp(cols * rows * count); \ for (int index = 0; index < count; ++index) { \ - qMemCopy(temp.data() + cols * rows * index, \ - values[index].constData(), cols * rows * sizeof(GLfloat)); \ + for (int index2 = 0; index2 < (cols * rows); ++index2) { \ + temp.data()[cols * rows * index + index2] = \ + values[index].constData()[index2]; \ + } \ } \ func(location, count, GL_FALSE, temp.constData()); \ } @@ -2834,16 +2813,20 @@ void QGLShaderProgram::setUniformValueArray(const char *name, const QVector4D *v #define setUniformGenericMatrixArray(func,colfunc,location,values,count,type,cols,rows) \ if (location == -1 || count <= 0) \ return; \ - if (count == 1 || sizeof(type) == cols * rows * sizeof(GLfloat)) { \ + if (sizeof(type) == sizeof(GLfloat) * cols * rows) { \ + const GLfloat *data = reinterpret_cast<const GLfloat *> \ + (values[0].constData()); \ if (func) \ - func(location, count, GL_FALSE, values->constData()); \ + func(location, count, GL_FALSE, data); \ else \ - colfunc(location, cols * count, values->constData()); \ + colfunc(location, count * cols, data); \ } else { \ QVarLengthArray<GLfloat> temp(cols * rows * count); \ for (int index = 0; index < count; ++index) { \ - qMemCopy(temp.data() + cols * rows * index, \ - values[index].constData(), cols * rows * sizeof(GLfloat)); \ + for (int index2 = 0; index2 < (cols * rows); ++index2) { \ + temp.data()[cols * rows * index + index2] = \ + values[index].constData()[index2]; \ + } \ } \ if (func) \ func(location, count, GL_FALSE, temp.constData()); \ @@ -2854,13 +2837,17 @@ void QGLShaderProgram::setUniformValueArray(const char *name, const QVector4D *v #define setUniformGenericMatrixArray(func,colfunc,location,values,count,type,cols,rows) \ if (location == -1 || count <= 0) \ return; \ - if (count == 1 || sizeof(type) == cols * rows * sizeof(GLfloat)) { \ - colfunc(location, cols * count, values->constData()); \ + if (sizeof(type) == sizeof(GLfloat) * cols * rows) { \ + const GLfloat *data = reinterpret_cast<const GLfloat *> \ + (values[0].constData()); \ + colfunc(location, count * cols, data); \ } else { \ QVarLengthArray<GLfloat> temp(cols * rows * count); \ for (int index = 0; index < count; ++index) { \ - qMemCopy(temp.data() + cols * rows * index, \ - values[index].constData(), cols * rows * sizeof(GLfloat)); \ + for (int index2 = 0; index2 < (cols * rows); ++index2) { \ + temp.data()[cols * rows * index + index2] = \ + values[index].constData()[index2]; \ + } \ } \ colfunc(location, count * cols, temp.constData()); \ } diff --git a/src/opengl/qgraphicsshadereffect.cpp b/src/opengl/qgraphicsshadereffect.cpp index f1558d1..f733109 100644 --- a/src/opengl/qgraphicsshadereffect.cpp +++ b/src/opengl/qgraphicsshadereffect.cpp @@ -39,7 +39,7 @@ ** ****************************************************************************/ -#include "qgraphicsshadereffect.h" +#include "qgraphicsshadereffect_p.h" #if !defined(QT_OPENGL_ES_1) && !defined(QT_OPENGL_ES_1_CL) #include "qglshaderprogram.h" #include "gl2paintengineex/qglcustomshaderstage_p.h" @@ -51,7 +51,7 @@ QT_BEGIN_NAMESPACE -/*! +/*# \class QGraphicsShaderEffect \brief The QGraphicsShaderEffect class is the base class for creating custom GLSL shader effects in a QGraphicsScene. @@ -175,7 +175,7 @@ public: #endif }; -/*! +/*# Constructs a shader effect and attaches it to \a parent. */ QGraphicsShaderEffect::QGraphicsShaderEffect(QObject *parent) @@ -183,7 +183,7 @@ QGraphicsShaderEffect::QGraphicsShaderEffect(QObject *parent) { } -/*! +/*# Destroys this shader effect. */ QGraphicsShaderEffect::~QGraphicsShaderEffect() @@ -194,7 +194,7 @@ QGraphicsShaderEffect::~QGraphicsShaderEffect() #endif } -/*! +/*# Returns the source code for the pixel shader fragment for this shader effect. The default is a shader that copies its incoming pixmap directly to the output with no effect @@ -208,7 +208,7 @@ QByteArray QGraphicsShaderEffect::pixelShaderFragment() const return d->pixelShaderFragment; } -/*! +/*# Sets the source code for the pixel shader fragment for this shader effect to \a code. @@ -238,7 +238,7 @@ void QGraphicsShaderEffect::setPixelShaderFragment(const QByteArray& code) } } -/*! +/*# \reimp */ void QGraphicsShaderEffect::draw(QPainter *painter, QGraphicsEffectSource *source) @@ -277,7 +277,7 @@ void QGraphicsShaderEffect::draw(QPainter *painter, QGraphicsEffectSource *sourc #endif } -/*! +/*# Sets the custom uniform variables on this shader effect to be dirty. The setUniforms() function will be called the next time the shader program corresponding to this effect is used. @@ -296,7 +296,7 @@ void QGraphicsShaderEffect::setUniformsDirty() #endif } -/*! +/*# Sets custom uniform variables on the current GL context when \a program is about to be used by the paint engine. diff --git a/src/opengl/qgraphicsshadereffect.h b/src/opengl/qgraphicsshadereffect_p.h index a186074..a313846 100644 --- a/src/opengl/qgraphicsshadereffect.h +++ b/src/opengl/qgraphicsshadereffect_p.h @@ -39,8 +39,19 @@ ** ****************************************************************************/ -#ifndef QGRAPHICSSHADEREFFECT_H -#define QGRAPHICSSHADEREFFECT_H +#ifndef QGRAPHICSSHADEREFFECT_P_H +#define QGRAPHICSSHADEREFFECT_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// #include <QtGui/qgraphicseffect.h> @@ -80,4 +91,4 @@ QT_END_NAMESPACE QT_END_HEADER -#endif // QGRAPHICSSHADEREFFECT_H +#endif // QGRAPHICSSHADEREFFECT_P_H diff --git a/src/opengl/qpixmapdata_gl.cpp b/src/opengl/qpixmapdata_gl.cpp index b6f5012..d63d2ad 100644 --- a/src/opengl/qpixmapdata_gl.cpp +++ b/src/opengl/qpixmapdata_gl.cpp @@ -84,7 +84,7 @@ QGLFramebufferObject *QGLFramebufferObjectPool::acquire(const QSize &requestSize if (format.samples() == requestFormat.samples() && format.attachment() == requestFormat.attachment() && format.textureTarget() == requestFormat.textureTarget() - && format.internalFormat() == requestFormat.internalFormat()) + && format.internalTextureFormat() == requestFormat.internalTextureFormat()) { // choose the fbo with a matching format and the closest size if (!candidate || areaDiff(requestSize, candidate) > areaDiff(requestSize, fbo)) @@ -467,7 +467,7 @@ QPaintEngine* QGLPixmapData::paintEngine() const QGLFramebufferObjectFormat format; format.setAttachment(QGLFramebufferObject::CombinedDepthStencil); format.setSamples(4); - format.setInternalFormat(GLenum(m_hasAlpha ? GL_RGBA : GL_RGB)); + format.setInternalTextureFormat(GLenum(m_hasAlpha ? GL_RGBA : GL_RGB)); m_renderFbo = qgl_fbo_pool()->acquire(size(), format); diff --git a/src/opengl/qwindowsurface_gl.cpp b/src/opengl/qwindowsurface_gl.cpp index f974938..a85b9ae 100644 --- a/src/opengl/qwindowsurface_gl.cpp +++ b/src/opengl/qwindowsurface_gl.cpp @@ -569,7 +569,7 @@ void QGLWindowSurface::updateGeometry() QGLFramebufferObjectFormat format; format.setAttachment(QGLFramebufferObject::CombinedDepthStencil); - format.setInternalFormat(GLenum(GL_RGBA)); + format.setInternalTextureFormat(GLenum(GL_RGBA)); format.setTextureTarget(target); if (QGLExtensions::glExtensions & QGLExtensions::FramebufferBlit) diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp index 6535d65..2630348 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp +++ b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp @@ -925,12 +925,12 @@ void QDirectFBPaintEnginePrivate::setRenderHints(QPainter::RenderHints hints) void QDirectFBPaintEnginePrivate::prepareForBlit(bool alpha) { - quint32 blittingFlags = alpha ? DSBLIT_BLEND_ALPHACHANNEL : DSBLIT_NOFX; + DFBSurfaceBlittingFlags blittingFlags = alpha ? DSBLIT_BLEND_ALPHACHANNEL : DSBLIT_NOFX; if (opacity != 255) { blittingFlags |= DSBLIT_BLEND_COLORALPHA; } surface->SetColor(surface, 0xff, 0xff, 0xff, opacity); - surface->SetBlittingFlags(surface, DFBSurfaceBlittingFlags(blittingFlags)); + surface->SetBlittingFlags(surface, blittingFlags); } static inline uint ALPHA_MUL(uint x, uint a) diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp index 211e8a5..84a74c9 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp +++ b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp @@ -79,6 +79,7 @@ public: IDirectFBScreen *dfbScreen; #ifdef QT_NO_DIRECTFB_WM IDirectFBSurface *primarySurface; + QColor backgroundColor; #endif #ifndef QT_NO_DIRECTFB_LAYER IDirectFBDisplayLayer *dfbLayer; @@ -94,7 +95,6 @@ public: #if defined QT_DIRECTFB_IMAGEPROVIDER && defined QT_DIRECTFB_IMAGEPROVIDER_KEEPALIVE IDirectFBImageProvider *imageProvider; #endif - QColor backgroundColor; IDirectFBSurface *cursorSurface; qint64 cursorImageKey; @@ -1277,10 +1277,9 @@ bool QDirectFBScreen::connect(const QString &displaySpec) if (displayArgs.contains(QLatin1String("debug"), Qt::CaseInsensitive)) printDirectFBInfo(d_ptr->dfb, surface); #endif -#ifndef QT_NO_DIRECTFB_WM +#ifdef QT_DIRECTFB_WM surface->Release(surface); -#endif - +#else QRegExp backgroundColorRegExp(QLatin1String("bgcolor=?(.+)")); backgroundColorRegExp.setCaseSensitivity(Qt::CaseInsensitive); if (displayArgs.indexOf(backgroundColorRegExp) != -1) { @@ -1288,6 +1287,11 @@ bool QDirectFBScreen::connect(const QString &displaySpec) } if (!d_ptr->backgroundColor.isValid()) d_ptr->backgroundColor = Qt::green; + d_ptr->primarySurface->Clear(d_ptr->primarySurface, d_ptr->backgroundColor.red(), + d_ptr->backgroundColor.green(), d_ptr->backgroundColor.blue(), + d_ptr->backgroundColor.alpha()); + d_ptr->primarySurface->Flip(d_ptr->primarySurface, 0, d_ptr->flipFlags); +#endif return true; } @@ -1568,11 +1572,6 @@ void QDirectFBScreen::solidFill(const QColor &color, const QRegion ®ion) #endif } -void QDirectFBScreen::erase(const QRegion ®ion) -{ - solidFill(d_ptr->backgroundColor, region); -} - QImage::Format QDirectFBScreen::alphaPixmapFormat() const { return d_ptr->alphaPixmapFormat; diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.h b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.h index 0ce7a53..46d06ef 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.h +++ b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.h @@ -215,7 +215,6 @@ public: void flipSurface(IDirectFBSurface *surface, DFBSurfaceFlipFlags flipFlags, const QRegion ®ion, const QPoint &offset); void releaseDFBSurface(IDirectFBSurface *surface); - void erase(const QRegion ®ion); using QScreen::depth; static int depth(DFBSurfacePixelFormat format); diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp index 61cfec51..b1ffe69 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp +++ b/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp @@ -43,6 +43,7 @@ #include "qdirectfbscreen.h" #include "qdirectfbpaintengine.h" +#include <private/qwidget_p.h> #include <qwidget.h> #include <qwindowsystem_qws.h> #include <qpaintdevice.h> @@ -247,10 +248,6 @@ void QDirectFBWindowSurface::setGeometry(const QRect &rect) updateFormat(); QWSWindowSurface::setGeometry(rect); -#ifdef QT_NO_DIRECTFB_WM - if (oldRect.isEmpty()) - screen->exposeRegion(screen->region(), 0); -#endif } QByteArray QDirectFBWindowSurface::permanentState() const @@ -319,48 +316,48 @@ inline bool isWidgetOpaque(const QWidget *w) return false; } - -void QDirectFBWindowSurface::flush(QWidget *, const QRegion ®ion, +void QDirectFBWindowSurface::flush(QWidget *widget, const QRegion ®ion, const QPoint &offset) { - // hw: make sure opacity information is updated before compositing - if (QWidget *win = window()) { + QWidget *win = window(); + if (!win) + return; - const bool opaque = isWidgetOpaque(win); - if (opaque != isOpaque()) { - SurfaceFlags flags = surfaceFlags(); - if (opaque) { - flags |= Opaque; - } else { - flags &= ~Opaque; - } - setSurfaceFlags(flags); + QWExtra *extra = qt_widget_private(widget)->extraData(); + if (extra && extra->proxyWidget) + return; + + // hw: make sure opacity information is updated before compositing + const bool opaque = isWidgetOpaque(win); + if (opaque != isOpaque()) { + SurfaceFlags flags = surfaceFlags(); + if (opaque) { + flags |= Opaque; + } else { + flags &= ~Opaque; } + setSurfaceFlags(flags); + } #ifndef QT_NO_DIRECTFB_WM - const quint8 winOpacity = quint8(win->windowOpacity() * 255); - quint8 opacity; + const quint8 winOpacity = quint8(win->windowOpacity() * 255); + quint8 opacity; - if (dfbWindow) { - dfbWindow->GetOpacity(dfbWindow, &opacity); - if (winOpacity != opacity) - dfbWindow->SetOpacity(dfbWindow, winOpacity); - } -#endif + if (dfbWindow) { + dfbWindow->GetOpacity(dfbWindow, &opacity); + if (winOpacity != opacity) + dfbWindow->SetOpacity(dfbWindow, winOpacity); } +#endif const QRect windowGeometry = QDirectFBWindowSurface::geometry(); #ifdef QT_NO_DIRECTFB_WM if (mode == Offscreen) { - QRegion r = region; - r.translate(offset + windowGeometry.topLeft()); - screen->exposeRegion(r, 0); - } else { - screen->flipSurface(dfbSurface, flipFlags, region, offset); - } -#else - screen->flipSurface(dfbSurface, flipFlags, region, offset); + screen->exposeRegion(region.translated(offset + geometry().topLeft()), 0); + + } else #endif + screen->flipSurface(dfbSurface, flipFlags, region, offset); #ifdef QT_DIRECTFB_TIMING enum { Secs = 3 }; diff --git a/src/plugins/graphicssystems/trace/qgraphicssystem_trace.cpp b/src/plugins/graphicssystems/trace/qgraphicssystem_trace.cpp index 36a8df1..bbb6536 100644 --- a/src/plugins/graphicssystems/trace/qgraphicssystem_trace.cpp +++ b/src/plugins/graphicssystems/trace/qgraphicssystem_trace.cpp @@ -57,30 +57,35 @@ public: ~QTraceWindowSurface(); QPaintDevice *paintDevice(); + void beginPaint(const QRegion &rgn); void endPaint(const QRegion &rgn); + bool scroll(const QRegion &area, int dx, int dy); + private: QPaintBuffer *buffer; + QList<QRegion> updates; - QFile *outputFile; - QDataStream *out; - - int frameId; + qulonglong winId; }; QTraceWindowSurface::QTraceWindowSurface(QWidget *widget) : QRasterWindowSurface(widget) , buffer(0) - , outputFile(0) - , out(0) - , frameId(0) + , winId(0) { } QTraceWindowSurface::~QTraceWindowSurface() { - delete out; - delete outputFile; + if (buffer) { + QFile outputFile(QString(QLatin1String("qtgraphics-%0.trace")).arg(winId)); + if (outputFile.open(QIODevice::WriteOnly)) { + QDataStream out(&outputFile); + out << *buffer << updates; + } + delete buffer; + } } QPaintDevice *QTraceWindowSurface::paintDevice() @@ -92,28 +97,33 @@ QPaintDevice *QTraceWindowSurface::paintDevice() return buffer; } -void QTraceWindowSurface::endPaint(const QRegion &rgn) +void QTraceWindowSurface::beginPaint(const QRegion &rgn) { - if (!out) { - outputFile = new QFile(QString(QLatin1String("qtgraphics-%0.trace")).arg((qulonglong)window()->winId())); - if (outputFile->open(QIODevice::WriteOnly)) - out = new QDataStream(outputFile); - } + // ensure paint buffer is created + paintDevice(); + buffer->beginNewFrame(); + + QRasterWindowSurface::beginPaint(rgn); +} +void QTraceWindowSurface::endPaint(const QRegion &rgn) +{ QPainter p(QRasterWindowSurface::paintDevice()); - buffer->draw(&p); + buffer->draw(&p, buffer->numFrames()-1); p.end(); - if (out) { - *out << frameId++; - *out << (qulonglong)window()->winId(); - *out << geometry(); - *out << rgn; - *out << *buffer; - } + winId = (qulonglong)window()->winId(); + + updates << rgn; - delete buffer; - buffer = 0; + QRasterWindowSurface::endPaint(rgn); +} + +bool QTraceWindowSurface::scroll(const QRegion &, int, int) +{ + // TODO: scrolling should also be streamed and replayed + // to test scrolling performance + return false; } QTraceGraphicsSystem::QTraceGraphicsSystem() diff --git a/src/s60main/qts60main_mcrt0.cpp b/src/s60main/qts60main_mcrt0.cpp index 4a30380..1040652 100644 --- a/src/s60main/qts60main_mcrt0.cpp +++ b/src/s60main/qts60main_mcrt0.cpp @@ -49,6 +49,7 @@ #include <e32std.h> #include <e32base.h> +#include <exception> #include "estlib.h" // Needed for QT_TRYCATCH_LEAVING. diff --git a/src/script/api/qscriptengineagent.cpp b/src/script/api/qscriptengineagent.cpp index 333a415..13bc6a6 100644 --- a/src/script/api/qscriptengineagent.cpp +++ b/src/script/api/qscriptengineagent.cpp @@ -146,11 +146,7 @@ void QScriptEngineAgentPrivate::returnEvent(const JSC::DebuggerCallFrame& frame, { Q_UNUSED(frame); Q_UNUSED(lineno); -#if ENABLE(JIT) - functionExit(JSC::JSValue(), sourceID); -#else Q_UNUSED(sourceID); -#endif } void QScriptEngineAgentPrivate::exceptionThrow(const JSC::DebuggerCallFrame& frame, intptr_t sourceID, bool hasHandler) diff --git a/src/script/bridge/qscriptqobject.cpp b/src/script/bridge/qscriptqobject.cpp index bd5d161..ecfb060 100644 --- a/src/script/bridge/qscriptqobject.cpp +++ b/src/script/bridge/qscriptqobject.cpp @@ -610,7 +610,7 @@ static JSC::JSValue callQtMethod(JSC::ExecState *exec, QMetaMethod::MethodType c if (i < (int)scriptArgs.size()) actual = engine->scriptValueFromJSCValue(scriptArgs.at(i)); else - actual = QScriptValue::QScriptValue(QScriptValue::UndefinedValue); + actual = QScriptValue(QScriptValue::UndefinedValue); QScriptMetaType argType = mtd.argumentType(i); int tid = -1; QVariant v; diff --git a/src/sql/drivers/db2/qsql_db2.cpp b/src/sql/drivers/db2/qsql_db2.cpp index 6187e6b..7bbe122 100644 --- a/src/sql/drivers/db2/qsql_db2.cpp +++ b/src/sql/drivers/db2/qsql_db2.cpp @@ -908,8 +908,9 @@ bool QDB2Result::fetchFirst() SQL_FETCH_FIRST, 0); if (r != SQL_SUCCESS && r != SQL_SUCCESS_WITH_INFO) { - setLastError(qMakeError(QCoreApplication::translate("QDB2Result", "Unable to fetch first"), - QSqlError::StatementError, d)); + if(r!= SQL_NO_DATA) + setLastError(qMakeError(QCoreApplication::translate("QDB2Result", "Unable to fetch first"), + QSqlError::StatementError, d)); return false; } setAt(0); diff --git a/src/src.pro b/src/src.pro index 63f50ba..40f744b 100644 --- a/src/src.pro +++ b/src/src.pro @@ -124,7 +124,8 @@ src_declarative.target = sub-declarative src_declarative.depends = src_xml src_gui src_script src_network src_svg src_plugins.depends = src_gui src_sql src_svg contains(QT_CONFIG, webkit) { - src_webkit.depends = src_gui src_sql src_network src_xml + src_webkit.depends = src_gui src_sql src_network src_xml + contains(QT_CONFIG, phonon):src_webkit.depends += src_phonon #exists($$QT_SOURCE_TREE/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pro): src_webkit.depends += src_javascriptcore } contains(QT_CONFIG, qt3support): src_plugins.depends += src_qt3support diff --git a/src/svg/qsvghandler.cpp b/src/svg/qsvghandler.cpp index e2c3d92..35b8595 100644 --- a/src/svg/qsvghandler.cpp +++ b/src/svg/qsvghandler.cpp @@ -810,24 +810,27 @@ static bool resolveColor(const QStringRef &colorStr, QColor &color, QSvgHandler case 'r': { - // starts with "rgb(" - if (colorStrTr == QLatin1String("rgb(")) { + // starts with "rgb(", ends with ")" and consists of at least 7 characters "rgb(,,)" + if (colorStrTr.length() >= 7 && colorStrTr.at(colorStrTr.length() - 1) == QLatin1Char(')') + && QStringRef(colorStrTr.string(), colorStrTr.position(), 4) == QLatin1String("rgb(")) { const QChar *s = colorStrTr.constData() + 4; QVector<qreal> compo = parseNumbersList(s); //1 means that it failed after reaching non-parsable //character which is going to be "%" if (compo.size() == 1) { - const QChar *s = colorStrTr.constData() + 4; + s = colorStrTr.constData() + 4; compo = parsePercentageList(s); - compo[0] *= (qreal)2.55; - compo[1] *= (qreal)2.55; - compo[2] *= (qreal)2.55; + for (int i = 0; i < compo.size(); ++i) + compo[i] *= (qreal)2.55; } - color = QColor(int(compo[0]), - int(compo[1]), - int(compo[2])); - return true; + if (compo.size() == 3) { + color = QColor(int(compo[0]), + int(compo[1]), + int(compo[2])); + return true; + } + return false; } } break; diff --git a/src/testlib/qtestmouse.h b/src/testlib/qtestmouse.h index 9d23c8b..1ab7401 100644 --- a/src/testlib/qtestmouse.h +++ b/src/testlib/qtestmouse.h @@ -113,8 +113,12 @@ namespace QTest QTEST_ASSERT(false); } QSpontaneKeyEvent::setSpontaneous(&me); - if (!qApp->notify(widget, &me)) - QTest::qWarn("Mouse event not accepted by receiving widget"); + if (!qApp->notify(widget, &me)) { + static const char *mouseActionNames[] = + { "MousePress", "MouseRelease", "MouseClick", "MouseDClick", "MouseMove" }; + QString warning = QString::fromLatin1("Mouse event \"%1\" not accepted by receiving widget"); + QTest::qWarn(warning.arg(QString::fromLatin1(mouseActionNames[static_cast<int>(action)])).toAscii().data()); + } } diff --git a/src/tools/uic/cpp/cppwriteinitialization.cpp b/src/tools/uic/cpp/cppwriteinitialization.cpp index 8dcc4aa..197414b 100644 --- a/src/tools/uic/cpp/cppwriteinitialization.cpp +++ b/src/tools/uic/cpp/cppwriteinitialization.cpp @@ -474,6 +474,7 @@ WriteInitialization::WriteInitialization(Uic *uic, bool activateScripts) : m_dindent(m_indent + m_option.indent), m_stdsetdef(true), m_layoutMarginType(TopLevelMargin), + m_mainFormUsedInRetranslateUi(false), m_delayedOut(&m_delayedInitialization, QIODevice::WriteOnly), m_refreshOut(&m_refreshInitialization, QIODevice::WriteOnly), m_actionOut(&m_delayedActionInitialization, QIODevice::WriteOnly), @@ -569,11 +570,11 @@ void WriteInitialization::acceptUI(DomUI *node) m_output << m_option.indent << "} // setupUi\n\n"; - if (m_delayedActionInitialization.isEmpty()) { + if (!m_mainFormUsedInRetranslateUi) { m_refreshInitialization += m_indent; m_refreshInitialization += QLatin1String("Q_UNUSED("); m_refreshInitialization += varName ; - m_refreshInitialization +=QLatin1String(");\n"); + m_refreshInitialization += QLatin1String(");\n"); } m_output << m_option.indent << "void " << "retranslateUi(" << widgetClassName << " *" << varName << ")\n" @@ -1531,6 +1532,12 @@ void WriteInitialization::writeProperties(const QString &varName, o << ");\n"; if (defineC) closeIfndef(o, QLatin1String(defineC)); + + if (varName == m_mainFormVarName && &o == &m_refreshOut) { + // this is the only place (currently) where we output mainForm name to the retranslateUi(). + // Other places output merely instances of a certain class (which cannot be main form, e.g. QListWidget). + m_mainFormUsedInRetranslateUi = true; + } } } if (leftMargin != -1 || topMargin != -1 || rightMargin != -1 || bottomMargin != -1) { diff --git a/src/tools/uic/cpp/cppwriteinitialization.h b/src/tools/uic/cpp/cppwriteinitialization.h index 19e4fc7..b0564d0 100644 --- a/src/tools/uic/cpp/cppwriteinitialization.h +++ b/src/tools/uic/cpp/cppwriteinitialization.h @@ -350,6 +350,7 @@ private: QString m_generatedClass; QString m_mainFormVarName; + bool m_mainFormUsedInRetranslateUi; QString m_delayedInitialization; QTextStream m_delayedOut; diff --git a/tests/auto/linguist/lupdate/testdata/good/lacksqobject/expectedoutput.txt b/tests/auto/linguist/lupdate/testdata/good/lacksqobject/expectedoutput.txt index 1a6cfeb..72ec3c5 100644 --- a/tests/auto/linguist/lupdate/testdata/good/lacksqobject/expectedoutput.txt +++ b/tests/auto/linguist/lupdate/testdata/good/lacksqobject/expectedoutput.txt @@ -1,8 +1,8 @@ -.*/lupdate/testdata/good/lacksqobject/main.cpp:17: Class 'B' lacks Q_OBJECT macro +.*/lupdate/testdata/good/lacksqobject/main.cpp:58: Class 'B' lacks Q_OBJECT macro -.*/lupdate/testdata/good/lacksqobject/main.cpp:24: Class 'C' lacks Q_OBJECT macro +.*/lupdate/testdata/good/lacksqobject/main.cpp:65: Class 'C' lacks Q_OBJECT macro -.*/lupdate/testdata/good/lacksqobject/main.cpp:37: Class 'nsB::B' lacks Q_OBJECT macro +.*/lupdate/testdata/good/lacksqobject/main.cpp:78: Class 'nsB::B' lacks Q_OBJECT macro -.*/lupdate/testdata/good/lacksqobject/main.cpp:43: Class 'nsB::C' lacks Q_OBJECT macro +.*/lupdate/testdata/good/lacksqobject/main.cpp:84: Class 'nsB::C' lacks Q_OBJECT macro diff --git a/tests/auto/linguist/lupdate/testdata/good/merge_ordering/foo.cpp b/tests/auto/linguist/lupdate/testdata/good/merge_ordering/foo.cpp index e1fca6e..0f7f9fb 100644 --- a/tests/auto/linguist/lupdate/testdata/good/merge_ordering/foo.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/merge_ordering/foo.cpp @@ -1,3 +1,4 @@ + /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). diff --git a/tests/auto/linguist/lupdate/testdata/good/mergecpp_noobsolete/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/mergecpp_noobsolete/project.ts.result index de2c45a..b328e90 100644 --- a/tests/auto/linguist/lupdate/testdata/good/mergecpp_noobsolete/project.ts.result +++ b/tests/auto/linguist/lupdate/testdata/good/mergecpp_noobsolete/project.ts.result @@ -4,22 +4,22 @@ <context> <name>FindDialog</name> <message> - <location filename="finddialog.cpp" line="19"/> + <location filename="finddialog.cpp" line="85"/> <source>Enter the text you want to find.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="finddialog.cpp" line="29"/> + <location filename="finddialog.cpp" line="135"/> <source>Search reached end of the document</source> <translation type="unfinished"></translation> </message> <message> - <location filename="finddialog.cpp" line="31"/> + <location filename="finddialog.cpp" line="137"/> <source>Search reached start of the document</source> <translation type="unfinished"></translation> </message> <message> - <location filename="finddialog.cpp" line="33"/> + <location filename="finddialog.cpp" line="139"/> <source>Text not found</source> <translation type="unfinished"></translation> </message> diff --git a/tests/auto/linguist/lupdate/testdata/good/mergecpp_obsolete/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/mergecpp_obsolete/project.ts.result index 4012182..cfd11b1 100644 --- a/tests/auto/linguist/lupdate/testdata/good/mergecpp_obsolete/project.ts.result +++ b/tests/auto/linguist/lupdate/testdata/good/mergecpp_obsolete/project.ts.result @@ -8,22 +8,22 @@ <translation type="obsolete">Skriv inn teksten du soker etter</translation> </message> <message> - <location filename="finddialog.cpp" line="18"/> + <location filename="finddialog.cpp" line="88"/> <source>Enter the text you want to find.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="finddialog.cpp" line="28"/> + <location filename="finddialog.cpp" line="138"/> <source>Search reached end of the document</source> <translation type="unfinished"></translation> </message> <message> - <location filename="finddialog.cpp" line="30"/> + <location filename="finddialog.cpp" line="140"/> <source>Search reached start of the document</source> <translation type="unfinished"></translation> </message> <message> - <location filename="finddialog.cpp" line="32"/> + <location filename="finddialog.cpp" line="142"/> <source>Text not found</source> <translation type="unfinished"></translation> </message> diff --git a/tests/auto/linguist/lupdate/testdata/good/mergeui/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/mergeui/project.ts.result index 4c5f74d..1a2244b 100644 --- a/tests/auto/linguist/lupdate/testdata/good/mergeui/project.ts.result +++ b/tests/auto/linguist/lupdate/testdata/good/mergeui/project.ts.result @@ -4,18 +4,18 @@ <context> <name>FindDialog</name> <message> - <location filename="project.ui" line="15"/> + <location filename="project.ui" line="57"/> <source>Qt Assistant - Find Text</source> <oldsource>Qt Assistant - Find text</oldsource> <translation type="unfinished">Qt Assistant - Finn tekst</translation> </message> <message> - <location filename="project.ui" line="18"/> + <location filename="project.ui" line="60"/> <source>300px</source> <translation>300px</translation> </message> <message> - <location filename="project.ui" line="21"/> + <location filename="project.ui" line="63"/> <source>401 pixels</source> <translation type="unfinished"></translation> </message> diff --git a/tests/auto/linguist/lupdate/testdata/good/mergeui/project.ui b/tests/auto/linguist/lupdate/testdata/good/mergeui/project.ui index a7532f9..1d8a716 100644 --- a/tests/auto/linguist/lupdate/testdata/good/mergeui/project.ui +++ b/tests/auto/linguist/lupdate/testdata/good/mergeui/project.ui @@ -1,14 +1,20 @@ <ui version="4.0" > <author></author> + <comment> +********************************************************************* +** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) +** ** This file is part of the test suite of the Qt Toolkit. +** ** $QT_BEGIN_LICENSE:LGPL$ ** No Commercial Usage ** This file contains pre-release code and may not be distributed. ** You may use this file in accordance with the terms and conditions ** contained in the Technology Preview License Agreement accompanying ** this package. +** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software @@ -33,6 +39,9 @@ ** ** ** $QT_END_LICENSE$ +** +********************************************************************* +</comment> <exportmacro></exportmacro> <class>FindDialog</class> <widget class="QWidget" name="FindDialog" > diff --git a/tests/auto/linguist/lupdate/testdata/good/multiple_locations/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/multiple_locations/project.ts.result index ec1f02f..a7ae155 100644 --- a/tests/auto/linguist/lupdate/testdata/good/multiple_locations/project.ts.result +++ b/tests/auto/linguist/lupdate/testdata/good/multiple_locations/project.ts.result @@ -4,9 +4,9 @@ <context> <name>context</name> <message> - <location filename="finddialog.cpp" line="43"/> - <location filename="finddialog.cpp" line="48"/> - <location filename="main.cpp" line="47"/> + <location filename="finddialog.cpp" line="42"/> + <location filename="finddialog.cpp" line="47"/> + <location filename="main.cpp" line="46"/> <source>just a message</source> <extracomment>This is one comment ---------- diff --git a/tests/auto/linguist/lupdate/testdata/good/namespaces/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/namespaces/project.ts.result index bb5b739..c1a34bd 100644 --- a/tests/auto/linguist/lupdate/testdata/good/namespaces/project.ts.result +++ b/tests/auto/linguist/lupdate/testdata/good/namespaces/project.ts.result @@ -30,7 +30,7 @@ <context> <name>Outer::Middle1::Different</name> <message> - <location filename="main.cpp" line="106/> + <location filename="main.cpp" line="106"/> <source>different namespaced class def</source> <translation type="unfinished"></translation> </message> diff --git a/tests/auto/linguist/lupdate/testdata/good/parsecpp/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/parsecpp/project.ts.result index 9e4e319..d63c7c3 100644 --- a/tests/auto/linguist/lupdate/testdata/good/parsecpp/project.ts.result +++ b/tests/auto/linguist/lupdate/testdata/good/parsecpp/project.ts.result @@ -4,14 +4,14 @@ <context> <name></name> <message id="this_a_id"> - <location filename="main.cpp" line="185"/> + <location filename="main.cpp" line="226"/> <source>This is supposed to be quoted " newline backslashed \ stuff.</source> <extracomment>again an extra comment, this time for id-based NOOP</extracomment> <translation type="unfinished"></translation> </message> <message id="this_another_id" numerus="yes"> - <location filename="main.cpp" line="189"/> + <location filename="main.cpp" line="230"/> <source>This needs to be here. Really.</source> <translation type="unfinished"> <numerusform></numerusform> @@ -259,7 +259,7 @@ backslashed \ stuff.</source> <context> <name>TestingTake17</name> <message id="this_is_an_id"> - <location filename="main.cpp" line="170"/> + <location filename="main.cpp" line="211"/> <source>something cool</source> <extracomment>random comment</extracomment> <translation type="unfinished"></translation> @@ -267,12 +267,12 @@ backslashed \ stuff.</source> <extra-loc-layout_id>fooish_bar</extra-loc-layout_id> </message> <message> - <location filename="main.cpp" line="172"/> + <location filename="main.cpp" line="213"/> <source>less cool</source> <translation type="unfinished"></translation> </message> <message id="another_id"> - <location filename="main.cpp" line="175"/> + <location filename="main.cpp" line="216"/> <source>even more cool</source> <translation type="unfinished"></translation> </message> diff --git a/tests/auto/linguist/lupdate/testdata/good/parsecpp2/expectedoutput.txt b/tests/auto/linguist/lupdate/testdata/good/parsecpp2/expectedoutput.txt index e3f7926..8d057d8 100644 --- a/tests/auto/linguist/lupdate/testdata/good/parsecpp2/expectedoutput.txt +++ b/tests/auto/linguist/lupdate/testdata/good/parsecpp2/expectedoutput.txt @@ -1,7 +1,7 @@ -.*/lupdate/testdata/good/parsecpp2/main.cpp:10: Excess closing brace .* +.*/lupdate/testdata/good/parsecpp2/main.cpp:51: Excess closing brace .* -.*/lupdate/testdata/good/parsecpp2/main.cpp:14: Excess closing brace .* +.*/lupdate/testdata/good/parsecpp2/main.cpp:55: Excess closing brace .* -.*/lupdate/testdata/good/parsecpp2/main.cpp:20: Excess closing brace .* +.*/lupdate/testdata/good/parsecpp2/main.cpp:61: Excess closing brace .* -.*/lupdate/testdata/good/parsecpp2/main.cpp:24: Excess closing brace .* +.*/lupdate/testdata/good/parsecpp2/main.cpp:65: Excess closing brace .* diff --git a/tests/auto/linguist/lupdate/testdata/good/parseui/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/parseui/project.ts.result index 7f665f4..93adae4 100644 --- a/tests/auto/linguist/lupdate/testdata/good/parseui/project.ts.result +++ b/tests/auto/linguist/lupdate/testdata/good/parseui/project.ts.result @@ -4,12 +4,12 @@ <context> <name>FindDialog</name> <message> - <location filename="project.ui" line="15"/> + <location filename="project.ui" line="48"/> <source>Qt Assistant - Finn text</source> <translation type="unfinished"></translation> </message> <message utf8="true"> - <location filename="project.ui" line="18"/> + <location filename="project.ui" line="51"/> <source>Finn tekst - Der Bjørn möchte auch mal.</source> <translation type="unfinished"></translation> </message> diff --git a/tests/auto/linguist/lupdate/testdata/good/parseui/project.ui b/tests/auto/linguist/lupdate/testdata/good/parseui/project.ui index 1fb4041..780bd40 100644 --- a/tests/auto/linguist/lupdate/testdata/good/parseui/project.ui +++ b/tests/auto/linguist/lupdate/testdata/good/parseui/project.ui @@ -1,14 +1,19 @@ <ui version="4.0" > <author></author> +<comment>********************************************************************* +** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) +** ** This file is part of the test suite of the Qt Toolkit. +** ** $QT_BEGIN_LICENSE:LGPL$ ** No Commercial Usage ** This file contains pre-release code and may not be distributed. ** You may use this file in accordance with the terms and conditions ** contained in the Technology Preview License Agreement accompanying ** this package. +** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software @@ -33,6 +38,8 @@ ** ** ** $QT_END_LICENSE$ +** +*********************************************************************</comment> <exportmacro></exportmacro> <class>FindDialog</class> <widget class="QWidget" name="FindDialog" > diff --git a/tests/auto/linguist/lupdate/testdata/good/prefix/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/prefix/project.ts.result index c15b986..e356921 100644 --- a/tests/auto/linguist/lupdate/testdata/good/prefix/project.ts.result +++ b/tests/auto/linguist/lupdate/testdata/good/prefix/project.ts.result @@ -4,18 +4,18 @@ <context> <name>Foo</name> <message> - <location filename="main.cpp" line="46"/> + <location filename="main.cpp" line="45"/> <source>XXX</source> <comment>YYY</comment> <translation type="unfinished"></translation> </message> <message> - <location filename="main.cpp" line="51"/> + <location filename="main.cpp" line="50"/> <source>CTOR</source> <translation type="unfinished"></translation> </message> <message> - <location filename="main.cpp" line="56"/> + <location filename="main.cpp" line="55"/> <source>BAR</source> <translation type="unfinished"></translation> </message> diff --git a/tests/auto/linguist/lupdate/testdata/recursivescan/bar.ts.result b/tests/auto/linguist/lupdate/testdata/recursivescan/bar.ts.result index b86edae..5c3c21c 100644 --- a/tests/auto/linguist/lupdate/testdata/recursivescan/bar.ts.result +++ b/tests/auto/linguist/lupdate/testdata/recursivescan/bar.ts.result @@ -4,22 +4,22 @@ <context> <name>FindDialog</name> <message> - <location filename="sub/finddialog.cpp" line="85"/> + <location filename="sub/finddialog.cpp" line="57"/> <source>Enter the text you want to find.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="sub/finddialog.cpp" line="135"/> + <location filename="sub/finddialog.cpp" line="66"/> <source>Search reached end of the document</source> <translation type="unfinished"></translation> </message> <message> - <location filename="sub/finddialog.cpp" line="137"/> + <location filename="sub/finddialog.cpp" line="68"/> <source>Search reached start of the document</source> <translation type="unfinished"></translation> </message> <message> - <location filename="sub/finddialog.cpp" line="139"/> + <location filename="sub/finddialog.cpp" line="70"/> <source>Text not found</source> <translation type="unfinished"></translation> </message> diff --git a/tests/auto/linguist/lupdate/testdata/recursivescan/foo.ts.result b/tests/auto/linguist/lupdate/testdata/recursivescan/foo.ts.result index 835b3e0..95a34fa 100644 --- a/tests/auto/linguist/lupdate/testdata/recursivescan/foo.ts.result +++ b/tests/auto/linguist/lupdate/testdata/recursivescan/foo.ts.result @@ -4,32 +4,32 @@ <context> <name>FindDialog</name> <message> - <location filename="project.ui" line="55"/> + <location filename="project.ui" line="57"/> <source>Qt Assistant - Finn text</source> <translation type="unfinished"></translation> </message> <message> - <location filename="project.ui" line="58"/> + <location filename="project.ui" line="60"/> <source>Finn tekst</source> <translation type="unfinished"></translation> </message> <message> - <location filename="sub/finddialog.cpp" line="85"/> + <location filename="sub/finddialog.cpp" line="57"/> <source>Enter the text you want to find.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="sub/finddialog.cpp" line="135"/> + <location filename="sub/finddialog.cpp" line="66"/> <source>Search reached end of the document</source> <translation type="unfinished"></translation> </message> <message> - <location filename="sub/finddialog.cpp" line="137"/> + <location filename="sub/finddialog.cpp" line="68"/> <source>Search reached start of the document</source> <translation type="unfinished"></translation> </message> <message> - <location filename="sub/finddialog.cpp" line="139"/> + <location filename="sub/finddialog.cpp" line="70"/> <source>Text not found</source> <translation type="unfinished"></translation> </message> diff --git a/tests/auto/linguist/lupdate/testdata/recursivescan/project.ui b/tests/auto/linguist/lupdate/testdata/recursivescan/project.ui index 3aa38c8..d25001f 100644 --- a/tests/auto/linguist/lupdate/testdata/recursivescan/project.ui +++ b/tests/auto/linguist/lupdate/testdata/recursivescan/project.ui @@ -1,8 +1,13 @@ <ui version="4.0" > <author></author> +<comment> +********************************************************************* +** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) +** ** This file is part of the test suite of the Qt Toolkit. +** ** $QT_BEGIN_LICENSE:LGPL$ ** No Commercial Usage ** This file contains pre-release code and may not be distributed. @@ -34,6 +39,9 @@ ** ** ** $QT_END_LICENSE$ +** +********************************************************************* +</comment> <exportmacro></exportmacro> <class>FindDialog</class> <widget class="QWidget" name="FindDialog" > diff --git a/tests/auto/linguist/lupdate/testdata/recursivescan/sub/finddialog.cpp b/tests/auto/linguist/lupdate/testdata/recursivescan/sub/finddialog.cpp index 925a776..462fcbb 100644 --- a/tests/auto/linguist/lupdate/testdata/recursivescan/sub/finddialog.cpp +++ b/tests/auto/linguist/lupdate/testdata/recursivescan/sub/finddialog.cpp @@ -1,6 +1,10 @@ +/**************************************************************************** +** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) +** ** This file is part of the test suite of the Qt Toolkit. +** ** $QT_BEGIN_LICENSE:LGPL$ ** No Commercial Usage ** This file contains pre-release code and may not be distributed. @@ -32,6 +36,9 @@ ** ** ** $QT_END_LICENSE$ +** +****************************************************************************/ + #include "finddialog.h" #include "mainwindow.h" #include "tabbedbrowser.h" diff --git a/tests/auto/network-settings.h b/tests/auto/network-settings.h index 84f1241..144f7b3 100644 --- a/tests/auto/network-settings.h +++ b/tests/auto/network-settings.h @@ -1,4 +1,6 @@ /**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the test suite of the Qt Toolkit. @@ -36,6 +38,7 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ + #include <QString> #ifdef QT_NETWORK_LIB #include <QtNetwork/QHostInfo> @@ -140,8 +143,8 @@ public: } return QHostAddress(serverIp.data()); } -#endif - return QHostInfo::fromName(serverName()).addresses().first(); +#endif // Q_OS_SYMBIAN + return QHostInfo::fromName(serverName()).addresses().first(); } #endif @@ -158,12 +161,11 @@ public: } return imapExpectedReply.data(); } -#else - QByteArray expected( "* OK [CAPABILITY IMAP4 IMAP4rev1 LITERAL+ ID STARTTLS LOGINDISABLED] " ); +#endif + QByteArray expected( "* OK [CAPABILITY IMAP4 IMAP4rev1 LITERAL+ ID STARTTLS LOGINDISABLED] " ); expected = expected.append(QtNetworkSettings::serverName().toAscii()); expected = expected.append(" Cyrus IMAP4 v2.3.11-Mandriva-RPM-2.3.11-6mdv2008.1 server ready\r\n"); return expected; -#endif } static QByteArray expectedReplySSL() diff --git a/tests/auto/qabstractitemview/tst_qabstractitemview.cpp b/tests/auto/qabstractitemview/tst_qabstractitemview.cpp index a43b727..eae830f 100644 --- a/tests/auto/qabstractitemview/tst_qabstractitemview.cpp +++ b/tests/auto/qabstractitemview/tst_qabstractitemview.cpp @@ -217,6 +217,8 @@ private slots: void task250754_fontChange(); void task200665_itemEntered(); void task257481_emptyEditor(); + void shiftArrowSelectionAfterScrolling(); + void shiftSelectionAfterRubberbandSelection(); }; class MyAbstractItemDelegate : public QAbstractItemDelegate @@ -1261,6 +1263,115 @@ void tst_QAbstractItemView::task257481_emptyEditor() QVERIFY(!lineEditors.first()->size().isEmpty()); } +void tst_QAbstractItemView::shiftArrowSelectionAfterScrolling() +{ + QStandardItemModel model; + for (int i=0; i<10; ++i) { + QStandardItem *item = new QStandardItem(QString("%1").arg(i)); + model.setItem(i, 0, item); + } + + QListView view; + view.setFixedSize(150, 250); + view.setFlow(QListView::LeftToRight); + view.setGridSize(QSize(100, 100)); + view.setSelectionMode(QListView::ExtendedSelection); + view.setViewMode(QListView::IconMode); + view.setModel(&model); + view.show(); + QTest::qWait(30); + + QModelIndex index0 = model.index(0, 0); + QModelIndex index1 = model.index(1, 0); + QModelIndex index9 = model.index(9, 0); + + view.selectionModel()->setCurrentIndex(index0, QItemSelectionModel::NoUpdate); + QCOMPARE(view.currentIndex(), index0); + + view.scrollTo(index9); + QTest::keyClick(&view, Qt::Key_Down, Qt::ShiftModifier); + + QCOMPARE(view.currentIndex(), index1); + QModelIndexList selected = view.selectionModel()->selectedIndexes(); + QCOMPARE(selected.count(), 2); + QVERIFY(selected.contains(index0)); + QVERIFY(selected.contains(index1)); +} + +void tst_QAbstractItemView::shiftSelectionAfterRubberbandSelection() +{ + QStandardItemModel model; + for (int i=0; i<3; ++i) { + QStandardItem *item = new QStandardItem(QString("%1").arg(i)); + model.setItem(i, 0, item); + } + + QListView view; + view.setFixedSize(150, 450); + view.setFlow(QListView::LeftToRight); + view.setGridSize(QSize(100, 100)); + view.setSelectionMode(QListView::ExtendedSelection); + view.setViewMode(QListView::IconMode); + view.setModel(&model); + view.show(); + QTest::qWait(30); + + QModelIndex index0 = model.index(0, 0); + QModelIndex index1 = model.index(1, 0); + QModelIndex index2 = model.index(2, 0); + + view.setCurrentIndex(index0); + QCOMPARE(view.currentIndex(), index0); + + // Determine the points where the rubberband selection starts and ends + QPoint pressPos = view.visualRect(index1).bottomRight() + QPoint(1, 1); + QPoint releasePos = view.visualRect(index1).center(); + QVERIFY(!view.indexAt(pressPos).isValid()); + QCOMPARE(view.indexAt(releasePos), index1); + + // Select item 1 using a rubberband selection + // The mouse move event has to be created manually because the QTest framework does not + // contain a function for mouse moves with buttons pressed + QTest::mousePress(view.viewport(), Qt::LeftButton, Qt::NoModifier, pressPos); + QMouseEvent moveEvent(QEvent::MouseMove, releasePos, Qt::NoButton, Qt::LeftButton, Qt::NoModifier); + bool moveEventReceived = qApp->notify(view.viewport(), &moveEvent); + QVERIFY(moveEventReceived); + QTest::mouseRelease(view.viewport(), Qt::LeftButton, Qt::NoModifier, releasePos); + QCOMPARE(view.currentIndex(), index1); + + // Shift-click item 2 + QPoint item2Pos = view.visualRect(index2).center(); + QTest::mouseClick(view.viewport(), Qt::LeftButton, Qt::ShiftModifier, item2Pos); + QCOMPARE(view.currentIndex(), index2); + + // Verify that the selection worked OK + QModelIndexList selected = view.selectionModel()->selectedIndexes(); + QCOMPARE(selected.count(), 2); + QVERIFY(selected.contains(index1)); + QVERIFY(selected.contains(index2)); + + // Select item 0 to revert the selection + view.setCurrentIndex(index0); + QCOMPARE(view.currentIndex(), index0); + + // Repeat the same steps as above, but with a Shift-Arrow selection + QTest::mousePress(view.viewport(), Qt::LeftButton, Qt::NoModifier, pressPos); + QMouseEvent moveEvent2(QEvent::MouseMove, releasePos, Qt::NoButton, Qt::LeftButton, Qt::NoModifier); + moveEventReceived = qApp->notify(view.viewport(), &moveEvent2); + QVERIFY(moveEventReceived); + QTest::mouseRelease(view.viewport(), Qt::LeftButton, Qt::NoModifier, releasePos); + QCOMPARE(view.currentIndex(), index1); + + // Press Shift-Down + QTest::keyClick(&view, Qt::Key_Down, Qt::ShiftModifier); + QCOMPARE(view.currentIndex(), index2); + + // Verify that the selection worked OK + selected = view.selectionModel()->selectedIndexes(); + QCOMPARE(selected.count(), 2); + QVERIFY(selected.contains(index1)); + QVERIFY(selected.contains(index2)); +} QTEST_MAIN(tst_QAbstractItemView) #include "tst_qabstractitemview.moc" diff --git a/tests/auto/qcombobox/tst_qcombobox.cpp b/tests/auto/qcombobox/tst_qcombobox.cpp index be33862..0773184 100644 --- a/tests/auto/qcombobox/tst_qcombobox.cpp +++ b/tests/auto/qcombobox/tst_qcombobox.cpp @@ -879,12 +879,12 @@ void tst_QComboBox::hide() { testWidget->addItem("foo"); testWidget->showPopup(); - QTest::qWait(500); //allow combobox effect to complete - QVERIFY(testWidget->view()); - QVERIFY(testWidget->view()->isVisible()); + QTest::qWait(200); //allow combobox effect to complete + QTRY_VERIFY(testWidget->view()); + QTRY_VERIFY(testWidget->view()->isVisible()); testWidget->hidePopup(); - QTest::qWait(500); //allow combobox effect to complete - QVERIFY(!testWidget->view()->isVisible()); + QTest::qWait(200); //allow combobox effect to complete + QTRY_VERIFY(!testWidget->view()->isVisible()); testWidget->hide(); QVERIFY(!testWidget->isVisible()); } diff --git a/tests/auto/qfiledialog/qfiledialog.pro b/tests/auto/qfiledialog/qfiledialog.pro index bea7716..058acc5 100644 --- a/tests/auto/qfiledialog/qfiledialog.pro +++ b/tests/auto/qfiledialog/qfiledialog.pro @@ -16,3 +16,12 @@ wince*|symbian: { symbian:TARGET.EPOCHEAPSIZE="0x100 0x1000000" symbian:HEADERS += ../../../include/qtgui/private/qfileinfogatherer_p.h + +wince*: { + DEFINES += SRCDIR=\\\"./\\\" +} symbian: { + TARGET.UID3 = 0xE0340003 + DEFINES += SYMBIAN_SRCDIR_UID=$$lower($$replace(TARGET.UID3,"0x","")) +} else { + DEFINES += SRCDIR=\\\"$$PWD/\\\" +} diff --git a/tests/auto/qfiledialog/tst_qfiledialog.cpp b/tests/auto/qfiledialog/tst_qfiledialog.cpp index 161efe0..67be797 100644 --- a/tests/auto/qfiledialog/tst_qfiledialog.cpp +++ b/tests/auto/qfiledialog/tst_qfiledialog.cpp @@ -297,7 +297,8 @@ void tst_QFiledialog::filesSelectedSignal() QNonNativeFileDialog fd; fd.setViewMode(QFileDialog::List); fd.setOptions(QFileDialog::DontUseNativeDialog); - fd.setDirectory(QDir::homePath()); + QDir testDir(SRCDIR"/../../.."); + fd.setDirectory(testDir); QFETCH(QFileDialog::FileMode, fileMode); fd.setFileMode(fileMode); QSignalSpy spyFilesSelected(&fd, SIGNAL(filesSelected(const QStringList &))); diff --git a/tests/auto/qfontmetrics/tst_qfontmetrics.cpp b/tests/auto/qfontmetrics/tst_qfontmetrics.cpp index 3a2d90f..5d4c520 100644 --- a/tests/auto/qfontmetrics/tst_qfontmetrics.cpp +++ b/tests/auto/qfontmetrics/tst_qfontmetrics.cpp @@ -180,7 +180,7 @@ void tst_QFontMetrics::elidedText() QFETCH(QString, text); QFontMetrics fm(font); int w = fm.width(text); - QString newtext = fm.elidedText(text,Qt::ElideRight,w, 0); + QString newtext = fm.elidedText(text,Qt::ElideRight,w+1, 0); QCOMPARE(text,newtext); // should not elide newtext = fm.elidedText(text,Qt::ElideRight,w-1, 0); QVERIFY(text != newtext); // should elide @@ -212,10 +212,10 @@ void tst_QFontMetrics::elidedMultiLength() QFontMetrics fm = QFontMetrics(QFont()); int width_long = fm.width(text1_long); QCOMPARE(fm.elidedText(text1,Qt::ElideRight, 8000), text1_long); - QCOMPARE(fm.elidedText(text1,Qt::ElideRight, width_long), text1_long); + QCOMPARE(fm.elidedText(text1,Qt::ElideRight, width_long + 1), text1_long); QCOMPARE(fm.elidedText(text1,Qt::ElideRight, width_long - 1), text1_short); int width_short = fm.width(text1_short); - QCOMPARE(fm.elidedText(text1,Qt::ElideRight, width_short), text1_short); + QCOMPARE(fm.elidedText(text1,Qt::ElideRight, width_short + 1), text1_short); QCOMPARE(fm.elidedText(text1,Qt::ElideRight, width_short - 1), text1_small); // Not even wide enough for "small" - should use ellipsis diff --git a/tests/auto/qgl/tst_qgl.cpp b/tests/auto/qgl/tst_qgl.cpp index 77e32ef..650c1ca 100644 --- a/tests/auto/qgl/tst_qgl.cpp +++ b/tests/auto/qgl/tst_qgl.cpp @@ -79,6 +79,7 @@ private slots: void glWidgetReparent(); void stackedFBOs(); void colormap(); + void fboFormat(); }; tst_QGL::tst_QGL() @@ -230,9 +231,15 @@ void tst_QGL::getSetCheck() // bool QGLFormat::sampleBuffers() // void QGLFormat::setSampleBuffers(bool) +#if !defined(QT_OPENGL_ES_2) QCOMPARE(false, obj1.sampleBuffers()); QVERIFY(!obj1.testOption(QGL::SampleBuffers)); QVERIFY(obj1.testOption(QGL::NoSampleBuffers)); +#else + QCOMPARE(true, obj1.sampleBuffers()); + QVERIFY(obj1.testOption(QGL::SampleBuffers)); + QVERIFY(!obj1.testOption(QGL::NoSampleBuffers)); +#endif obj1.setSampleBuffers(false); QCOMPARE(false, obj1.sampleBuffers()); QVERIFY(obj1.testOption(QGL::NoSampleBuffers)); @@ -402,6 +409,154 @@ void tst_QGL::getSetCheck() obj1.setPlane(TEST_INT_MAX); QCOMPARE(TEST_INT_MAX, obj1.plane()); + // operator== and operator!= for QGLFormat + QGLFormat format1; + QGLFormat format2; + + QVERIFY(format1 == format2); + QVERIFY(!(format1 != format2)); + format1.setDoubleBuffer(false); + QVERIFY(!(format1 == format2)); + QVERIFY(format1 != format2); + format2.setDoubleBuffer(false); + QVERIFY(format1 == format2); + QVERIFY(!(format1 != format2)); + + format1.setDepthBufferSize(8); + QVERIFY(!(format1 == format2)); + QVERIFY(format1 != format2); + format2.setDepthBufferSize(8); + QVERIFY(format1 == format2); + QVERIFY(!(format1 != format2)); + + format1.setAccumBufferSize(8); + QVERIFY(!(format1 == format2)); + QVERIFY(format1 != format2); + format2.setAccumBufferSize(8); + QVERIFY(format1 == format2); + QVERIFY(!(format1 != format2)); + + format1.setRedBufferSize(8); + QVERIFY(!(format1 == format2)); + QVERIFY(format1 != format2); + format2.setRedBufferSize(8); + QVERIFY(format1 == format2); + QVERIFY(!(format1 != format2)); + + format1.setGreenBufferSize(8); + QVERIFY(!(format1 == format2)); + QVERIFY(format1 != format2); + format2.setGreenBufferSize(8); + QVERIFY(format1 == format2); + QVERIFY(!(format1 != format2)); + + format1.setBlueBufferSize(8); + QVERIFY(!(format1 == format2)); + QVERIFY(format1 != format2); + format2.setBlueBufferSize(8); + QVERIFY(format1 == format2); + QVERIFY(!(format1 != format2)); + + format1.setAlphaBufferSize(8); + QVERIFY(!(format1 == format2)); + QVERIFY(format1 != format2); + format2.setAlphaBufferSize(8); + QVERIFY(format1 == format2); + QVERIFY(!(format1 != format2)); + + format1.setStencilBufferSize(8); + QVERIFY(!(format1 == format2)); + QVERIFY(format1 != format2); + format2.setStencilBufferSize(8); + QVERIFY(format1 == format2); + QVERIFY(!(format1 != format2)); + + format1.setSamples(8); + QVERIFY(!(format1 == format2)); + QVERIFY(format1 != format2); + format2.setSamples(8); + QVERIFY(format1 == format2); + QVERIFY(!(format1 != format2)); + + format1.setSwapInterval(8); + QVERIFY(!(format1 == format2)); + QVERIFY(format1 != format2); + format2.setSwapInterval(8); + QVERIFY(format1 == format2); + QVERIFY(!(format1 != format2)); + + format1.setPlane(8); + QVERIFY(!(format1 == format2)); + QVERIFY(format1 != format2); + format2.setPlane(8); + QVERIFY(format1 == format2); + QVERIFY(!(format1 != format2)); + + // Copy constructor and assignment for QGLFormat. + QGLFormat format3(format1); + QGLFormat format4; + QVERIFY(format1 == format3); + QVERIFY(format1 != format4); + format4 = format1; + QVERIFY(format1 == format4); + + // Check that modifying a copy doesn't affect the original. + format3.setRedBufferSize(16); + format4.setPlane(16); + QCOMPARE(format1.redBufferSize(), 8); + QCOMPARE(format1.plane(), 8); + + // Check the QGLFormat constructor that takes an option list. + QGLFormat format5 + (QGL::DepthBuffer | QGL::StereoBuffers | QGL::ColorIndex, 3); + QVERIFY(format5.depth()); + QVERIFY(format5.stereo()); + QVERIFY(format5.doubleBuffer()); // From defaultFormat() + QVERIFY(!format5.hasOverlay()); // From defaultFormat() + QVERIFY(!format5.rgba()); + QCOMPARE(format5.plane(), 3); + + // The default format should be the same as QGLFormat(). + QVERIFY(QGLFormat::defaultFormat() == QGLFormat()); + + // Modify the default format and check that it was changed. + QGLFormat::setDefaultFormat(format1); + QVERIFY(QGLFormat::defaultFormat() == format1); + + // Restore the default format. + QGLFormat::setDefaultFormat(QGLFormat()); + QVERIFY(QGLFormat::defaultFormat() == QGLFormat()); + + // Check the default overlay format's expected values. + QGLFormat overlay(QGLFormat::defaultOverlayFormat()); + QCOMPARE(overlay.depthBufferSize(), -1); + QCOMPARE(overlay.accumBufferSize(), -1); + QCOMPARE(overlay.redBufferSize(), -1); + QCOMPARE(overlay.greenBufferSize(), -1); + QCOMPARE(overlay.blueBufferSize(), -1); + QCOMPARE(overlay.alphaBufferSize(), -1); + QCOMPARE(overlay.samples(), -1); + QCOMPARE(overlay.swapInterval(), -1); + QCOMPARE(overlay.plane(), 1); + QVERIFY(!overlay.sampleBuffers()); + QVERIFY(!overlay.doubleBuffer()); + QVERIFY(!overlay.depth()); + QVERIFY(!overlay.rgba()); + QVERIFY(!overlay.alpha()); + QVERIFY(!overlay.accum()); + QVERIFY(!overlay.stencil()); + QVERIFY(!overlay.stereo()); + QVERIFY(overlay.directRendering()); // Only option that should be on. + QVERIFY(!overlay.hasOverlay()); // Overlay doesn't need an overlay! + + // Modify the default overlay format and check that it was changed. + QGLFormat::setDefaultOverlayFormat(format1); + QVERIFY(QGLFormat::defaultOverlayFormat() == format1); + + // Restore the default overlay format. + QGLFormat::setDefaultOverlayFormat(overlay); + QVERIFY(QGLFormat::defaultOverlayFormat() == overlay); + MyGLContext obj2(obj1); // bool QGLContext::windowCreated() // void QGLContext::setWindowCreated(bool) @@ -1224,5 +1379,60 @@ void tst_QGL::colormap() QCOMPARE(cmap4.size(), 256); } +#ifndef QT_OPENGL_ES +#define DEFAULT_FORMAT GL_RGBA8 +#else +#define DEFAULT_FORMAT GL_RGBA +#endif + +#ifndef GL_TEXTURE_3D +#define GL_TEXTURE_3D 0x806F +#endif + +#ifndef GL_RGB16 +#define GL_RGB16 0x8054 +#endif + +void tst_QGL::fboFormat() +{ + // Check the initial conditions. + QGLFramebufferObjectFormat format1; + QCOMPARE(format1.samples(), 0); + QVERIFY(format1.attachment() == QGLFramebufferObject::NoAttachment); + QCOMPARE(int(format1.textureTarget()), int(GL_TEXTURE_2D)); + QCOMPARE(int(format1.internalTextureFormat()), int(DEFAULT_FORMAT)); + + // Modify the values and re-check. + format1.setSamples(8); + format1.setAttachment(QGLFramebufferObject::CombinedDepthStencil); + format1.setTextureTarget(GL_TEXTURE_3D); + format1.setInternalTextureFormat(GL_RGB16); + QCOMPARE(format1.samples(), 8); + QVERIFY(format1.attachment() == QGLFramebufferObject::CombinedDepthStencil); + QCOMPARE(int(format1.textureTarget()), int(GL_TEXTURE_3D)); + QCOMPARE(int(format1.internalTextureFormat()), int(GL_RGB16)); + + // Make copies and check that they are the same. + QGLFramebufferObjectFormat format2(format1); + QGLFramebufferObjectFormat format3; + QCOMPARE(format2.samples(), 8); + QVERIFY(format2.attachment() == QGLFramebufferObject::CombinedDepthStencil); + QCOMPARE(int(format2.textureTarget()), int(GL_TEXTURE_3D)); + QCOMPARE(int(format2.internalTextureFormat()), int(GL_RGB16)); + format3 = format1; + QCOMPARE(format3.samples(), 8); + QVERIFY(format3.attachment() == QGLFramebufferObject::CombinedDepthStencil); + QCOMPARE(int(format3.textureTarget()), int(GL_TEXTURE_3D)); + QCOMPARE(int(format3.internalTextureFormat()), int(GL_RGB16)); + + // Modify the copies and check that the original is unchanged. + format2.setSamples(9); + format3.setTextureTarget(GL_TEXTURE_2D); + QCOMPARE(format1.samples(), 8); + QVERIFY(format1.attachment() == QGLFramebufferObject::CombinedDepthStencil); + QCOMPARE(int(format1.textureTarget()), int(GL_TEXTURE_3D)); + QCOMPARE(int(format1.internalTextureFormat()), int(GL_RGB16)); +} + QTEST_MAIN(tst_QGL) #include "tst_qgl.moc" diff --git a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp index e6364c8..0d3c7d3 100644 --- a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp +++ b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp @@ -289,6 +289,7 @@ private slots: void activate(); void setActivePanelOnInactiveScene(); void activationOnShowHide(); + void moveWhileDeleting(); // task specific tests below me void task141694_textItemEnsureVisible(); @@ -1236,6 +1237,7 @@ void tst_QGraphicsItem::selected() QVERIFY(!item->isSelected()); // Click inside and check that it's selected + QTest::mouseMove(view.viewport()); QTest::mouseClick(view.viewport(), Qt::LeftButton, 0, view.mapFromScene(item->scenePos())); QCOMPARE(item->values.size(), 11); QCOMPARE(item->values.last(), true); @@ -1243,7 +1245,6 @@ void tst_QGraphicsItem::selected() // Click outside and check that it's not selected QTest::mouseClick(view.viewport(), Qt::LeftButton, 0, view.mapFromScene(item->scenePos() + QPointF(item->boundingRect().width(), item->boundingRect().height()))); - QCOMPARE(item->values.size(), 12); QCOMPARE(item->values.last(), false); QVERIFY(!item->isSelected()); @@ -8032,5 +8033,64 @@ void tst_QGraphicsItem::activationOnShowHide() QVERIFY(otherItem->isActive()); } +class MoveWhileDying : public QGraphicsRectItem +{ +public: + MoveWhileDying(QGraphicsItem *parent = 0) + : QGraphicsRectItem(parent) + { } + ~MoveWhileDying() + { + foreach (QGraphicsItem *c, childItems()) { + foreach (QGraphicsItem *cc, c->childItems()) { + cc->moveBy(10, 10); + } + c->moveBy(10, 10); + } + if (QGraphicsItem *p = parentItem()) { p->moveBy(10, 10); } + } +}; + +void tst_QGraphicsItem::moveWhileDeleting() +{ + QGraphicsScene scene; + QGraphicsRectItem *rect = new QGraphicsRectItem; + MoveWhileDying *silly = new MoveWhileDying(rect); + QGraphicsRectItem *child = new QGraphicsRectItem(silly); + scene.addItem(rect); + delete rect; // don't crash! + + rect = new QGraphicsRectItem; + silly = new MoveWhileDying(rect); + child = new QGraphicsRectItem(silly); + + QGraphicsView view(&scene); + view.show(); +#ifdef Q_WS_X11 + qt_x11_wait_for_window_manager(&view); +#endif + QTest::qWait(125); + + delete rect; + + rect = new QGraphicsRectItem; + rect->setFlag(QGraphicsItem::ItemClipsChildrenToShape); + silly = new MoveWhileDying(rect); + child = new QGraphicsRectItem(silly); + + QTest::qWait(125); + + delete rect; + + rect = new MoveWhileDying; + rect->setFlag(QGraphicsItem::ItemClipsChildrenToShape); + child = new QGraphicsRectItem(rect); + silly = new MoveWhileDying(child); + + QTest::qWait(125); + + delete rect; +} + QTEST_MAIN(tst_QGraphicsItem) #include "tst_qgraphicsitem.moc" diff --git a/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp b/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp index 03054f9..d1193bd 100644 --- a/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp +++ b/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp @@ -157,6 +157,7 @@ private slots: void shortcutsDeletion(); void painterStateProtectionOnWindowFrame(); void ensureClipping(); + void respectHFW(); // Task fixes void task236127_bspTreeIndexFails(); @@ -2543,6 +2544,84 @@ void tst_QGraphicsWidget::ensureClipping() QVERIFY(scene.drawnItems.contains(childitem)); } +class HFWWidget : public QGraphicsWidget +{ +public: + HFWWidget() : QGraphicsWidget(0, Qt::Window) + { + QSizePolicy sp; + sp.setHeightForWidth(true); + setSizePolicy(sp); + } + + void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) + { + Q_UNUSED(option); + Q_UNUSED(widget); + qreal w = rect().width(); + QRectF box(0, 0, w, 2400/w); + painter->drawRoundRect(box); + painter->drawLine(box.topLeft(), box.bottomRight()); + painter->drawLine(box.bottomLeft(), box.topRight()); + } + +protected: + QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint = QSizeF()) const + { + qreal w = constraint.width(); + switch (which) { + case Qt::MinimumSize: + if (w >= 0 && constraint.height() < 0) { + // keep the same area of 60x40 = 2400 + return QSizeF(w, 2400.0/w); + } else { + return QSizeF(10, 10); + } + break; + case Qt::PreferredSize: + return QSizeF(48.989794, 48.989794); + default: + break; + } + return QGraphicsWidget::sizeHint(which, constraint); + } +}; + +void tst_QGraphicsWidget::respectHFW() +{ + QGraphicsScene scene; + HFWWidget *window = new HFWWidget; + scene.addItem(window); + QGraphicsView *view = new QGraphicsView(&scene); + view->resize(400, 400); + view->setSceneRect(-100, -100, 300,300); + + view->show(); + window->setGeometry(0, 0, 70, 70); + + { // here we go - simulate a interactive resize of the window + QTest::qWait(200); + QTest::mouseMove(view, view->mapFromScene(71, 71)); // bottom right corner + QTest::qWait(200); + + QTest::mousePress(view->viewport(), Qt::LeftButton, 0, view->mapFromScene(71, 71), 200); + view->grabMouse(); + // move both mouse cursor and set correct event in order to emulate resize + QTest::mouseMove(view->viewport(), view->mapFromScene(60, 30), 200); + QMouseEvent e = QMouseEvent(QEvent::MouseMove, + view->mapFromScene(60, 20), + Qt::NoButton, + Qt::LeftButton, + Qt::NoModifier); + QApplication::sendEvent(view->viewport(), &e); + view->releaseMouse(); + } + QTest::qWait(200); + const QSizeF winSize = window->size(); + qreal minHFW = window->effectiveSizeHint(Qt::MinimumSize, QSizeF(winSize.width(), -1)).height(); + QVERIFY(qAbs(minHFW - winSize.height()) < 1); +} + QTEST_MAIN(tst_QGraphicsWidget) #include "tst_qgraphicswidget.moc" diff --git a/tests/auto/qitemdelegate/tst_qitemdelegate.cpp b/tests/auto/qitemdelegate/tst_qitemdelegate.cpp index dc013b9..1ef77c0 100644 --- a/tests/auto/qitemdelegate/tst_qitemdelegate.cpp +++ b/tests/auto/qitemdelegate/tst_qitemdelegate.cpp @@ -1155,7 +1155,7 @@ void tst_QItemDelegate::task257859_finalizeEdit() view.edit(index); QTest::qWait(30); - QList<QWidget*> lineEditors = qFindChildren<QWidget *>(view.viewport()); + QList<QLineEdit *> lineEditors = qFindChildren<QLineEdit *>(view.viewport()); QCOMPARE(lineEditors.count(), 1); QPointer<QWidget> editor = lineEditors.at(0); diff --git a/tests/auto/qlistview/tst_qlistview.cpp b/tests/auto/qlistview/tst_qlistview.cpp index 2281fb7..2be1a03 100644 --- a/tests/auto/qlistview/tst_qlistview.cpp +++ b/tests/auto/qlistview/tst_qlistview.cpp @@ -424,6 +424,18 @@ void tst_QListView::hideRows() view.setRowHidden(0, false); QVERIFY(!view.isRowHidden(0)); + QStandardItemModel sim(0); + QStandardItem *root = new QStandardItem("Root row"); + for (int i=0;i<5;i++) + root->appendRow(new QStandardItem(QString("Row %1").arg(i))); + sim.appendRow(root); + view.setModel(&sim); + view.setRootIndex(root->index()); + QVERIFY(!view.isRowHidden(0)); + view.setRowHidden(0, true); + QVERIFY(view.isRowHidden(0)); + view.setRowHidden(0, false); + QVERIFY(!view.isRowHidden(0)); } @@ -1602,13 +1614,6 @@ void tst_QListView::task254449_draggingItemToNegativeCoordinates() list.setModel(&model); list.setViewMode(QListView::IconMode); list.show(); - QTest::qWait(200); //makes sure the layout is done - - const QPoint topLeft(-6, 0); - - - list.setPositionForIndex(topLeft, index); - class MyItemDelegate : public QStyledItemDelegate { public: @@ -1622,15 +1627,18 @@ void tst_QListView::task254449_draggingItemToNegativeCoordinates() mutable int numPaints; } delegate; - list.setItemDelegate(&delegate); + QTest::qWait(200); //makes sure the layout is done + + const QPoint topLeft(-6, 0); + list.setPositionForIndex(topLeft, index); + //we'll make sure the item is repainted delegate.numPaints = 0; - list.viewport()->repaint(); - - QCOMPARE(list.visualRect(index).topLeft(), topLeft); - QCOMPARE(delegate.numPaints, 1); + QApplication::processEvents(); + QCOMPARE(list.visualRect(index).topLeft(), topLeft); + QCOMPARE(delegate.numPaints, 1); } diff --git a/tests/auto/qlocalsocket/tst_qlocalsocket.cpp b/tests/auto/qlocalsocket/tst_qlocalsocket.cpp index a8cef92..fdfbd8a 100644 --- a/tests/auto/qlocalsocket/tst_qlocalsocket.cpp +++ b/tests/auto/qlocalsocket/tst_qlocalsocket.cpp @@ -107,8 +107,11 @@ private slots: void recycleServer(); + void writeToClientAndDisconnect(); + void debug(); + #ifdef Q_OS_SYMBIAN private: void unlink(QString serverName); @@ -870,6 +873,33 @@ void tst_QLocalSocket::recycleServer() QVERIFY(server.nextPendingConnection() != 0); } +void tst_QLocalSocket::writeToClientAndDisconnect() +{ +#ifdef Q_OS_SYMBIAN + unlink("writeAndDisconnectServer"); +#endif + + QLocalServer server; + QLocalSocket client; + + QVERIFY(server.listen("writeAndDisconnectServer")); + client.connectToServer("writeAndDisconnectServer"); + QVERIFY(client.waitForConnected(200)); + QVERIFY(server.waitForNewConnection(200)); + QLocalSocket* clientSocket = server.nextPendingConnection(); + QVERIFY(clientSocket); + + char buffer[100]; + memset(buffer, 0, sizeof(buffer)); + QCOMPARE(clientSocket->write(buffer, sizeof(buffer)), (qint64)sizeof(buffer)); + clientSocket->flush(); + clientSocket->disconnectFromServer(); + qApp->processEvents(); // give the socket the chance to receive data + QCOMPARE(client.read(buffer, sizeof(buffer)), (qint64)sizeof(buffer)); + qApp->processEvents(); // give the socket the chance to close itself + QCOMPARE(client.state(), QLocalSocket::UnconnectedState); +} + void tst_QLocalSocket::debug() { // Make sure this compiles diff --git a/tests/auto/qmatrixnxn/tst_qmatrixnxn.cpp b/tests/auto/qmatrixnxn/tst_qmatrixnxn.cpp index fd5ef3e..6a7e625 100644 --- a/tests/auto/qmatrixnxn/tst_qmatrixnxn.cpp +++ b/tests/auto/qmatrixnxn/tst_qmatrixnxn.cpp @@ -328,7 +328,7 @@ void tst_QMatrixNxN::setMatrix(QMatrix4x3& m, const qreal *values) // the internal data() array. void tst_QMatrixNxN::setMatrixDirect(QMatrix2x2& m, const qreal *values) { - float *data = m.data(); + qreal *data = m.data(); for (int row = 0; row < 2; ++row) { for (int col = 0; col < 2; ++col) { data[row + col * 2] = values[row * 2 + col]; @@ -337,7 +337,7 @@ void tst_QMatrixNxN::setMatrixDirect(QMatrix2x2& m, const qreal *values) } void tst_QMatrixNxN::setMatrixDirect(QMatrix3x3& m, const qreal *values) { - float *data = m.data(); + qreal *data = m.data(); for (int row = 0; row < 3; ++row) { for (int col = 0; col < 3; ++col) { data[row + col * 3] = values[row * 3 + col]; @@ -346,7 +346,7 @@ void tst_QMatrixNxN::setMatrixDirect(QMatrix3x3& m, const qreal *values) } void tst_QMatrixNxN::setMatrixDirect(QMatrix4x4& m, const qreal *values) { - float *data = m.data(); + qreal *data = m.data(); for (int row = 0; row < 4; ++row) { for (int col = 0; col < 4; ++col) { data[row + col * 4] = values[row * 4 + col]; @@ -355,7 +355,7 @@ void tst_QMatrixNxN::setMatrixDirect(QMatrix4x4& m, const qreal *values) } void tst_QMatrixNxN::setMatrixDirect(QMatrix4x3& m, const qreal *values) { - float *data = m.data(); + qreal *data = m.data(); for (int row = 0; row < 3; ++row) { for (int col = 0; col < 4; ++col) { data[row + col * 3] = values[row * 4 + col]; @@ -363,55 +363,42 @@ void tst_QMatrixNxN::setMatrixDirect(QMatrix4x3& m, const qreal *values) } } -// qFuzzyCompare isn't always "fuzzy" enough to handle conversion -// between float, double, and qreal. So create "fuzzier" compares. -static bool fuzzyCompare(float x, float y, qreal epsilon = 0.001) +// QVector2/3/4D use float internally, which can sometimes lead +// to precision issues when converting to and from qreal during +// operations involving QMatrix4x4. This fuzzy compare is slightly +// "fuzzier" than the default qFuzzyCompare for qreal to compensate. +static bool fuzzyCompare(qreal x, qreal y) { - float diff = x - y; - if (diff < 0.0f) - diff = -diff; - return (diff < epsilon); + return qFuzzyIsNull((float)(x - y)); } -static bool fuzzyCompare(const QVector3D &v1, const QVector3D &v2, qreal epsilon = 0.001) +static bool fuzzyCompare(const QVector3D &v1, const QVector3D &v2) { - if (!fuzzyCompare(v1.x(), v2.x(), epsilon)) + if (!fuzzyCompare(v1.x(), v2.x())) return false; - if (!fuzzyCompare(v1.y(), v2.y(), epsilon)) + if (!fuzzyCompare(v1.y(), v2.y())) return false; - if (!fuzzyCompare(v1.z(), v2.z(), epsilon)) + if (!fuzzyCompare(v1.z(), v2.z())) return false; return true; } -static bool matrixFuzzyCompare(const QMatrix4x4 &m1, const QMatrix4x4 &m2) -{ - bool ret = true; - for (int i = 0; i < 4; i++) { - for (int j = 0; j < 4; j++) { - ret = ret && fuzzyCompare(m1(i, j), m2(i, j)); - } - } - - return ret; -} - // Determine if a matrix is the same as a specified array of values. // The values are assumed to be specified in row-major order. bool tst_QMatrixNxN::isSame(const QMatrix2x2& m, const qreal *values) { - const float *mv = m.constData(); + const qreal *mv = m.constData(); for (int row = 0; row < 2; ++row) { for (int col = 0; col < 2; ++col) { // Check the values using the operator() function. - if (!fuzzyCompare((float)(m(row, col)), (float)(values[row * 2 + col]))) { + if (!fuzzyCompare(m(row, col), values[row * 2 + col])) { qDebug() << "floating-point failure at" << row << col << "actual =" << m(row, col) << "expected =" << values[row * 2 + col]; return false; } // Check the values using direct access, which verifies that the values // are stored internally in column-major order. - if (!fuzzyCompare((float)(mv[col * 2 + row]), (float)(values[row * 2 + col]))) { + if (!fuzzyCompare(mv[col * 2 + row], values[row * 2 + col])) { qDebug() << "column floating-point failure at" << row << col << "actual =" << mv[col * 2 + row] << "expected =" << values[row * 2 + col]; return false; } @@ -421,18 +408,18 @@ bool tst_QMatrixNxN::isSame(const QMatrix2x2& m, const qreal *values) } bool tst_QMatrixNxN::isSame(const QMatrix3x3& m, const qreal *values) { - const float *mv = m.constData(); + const qreal *mv = m.constData(); for (int row = 0; row < 3; ++row) { for (int col = 0; col < 3; ++col) { // Check the values using the operator() access function. - if (!fuzzyCompare((float)(m(row, col)), (float)(values[row * 3 + col]))) { + if (!fuzzyCompare(m(row, col), values[row * 3 + col])) { qDebug() << "floating-point failure at" << row << col << "actual =" << m(row, col) << "expected =" << values[row * 3 + col]; return false; } // Check the values using direct access, which verifies that the values // are stored internally in column-major order. - if (!fuzzyCompare((float)(mv[col * 3 + row]), (float)(values[row * 3 + col]))) { + if (!fuzzyCompare(mv[col * 3 + row], values[row * 3 + col])) { qDebug() << "column floating-point failure at" << row << col << "actual =" << mv[col * 3 + row] << "expected =" << values[row * 3 + col]; return false; } @@ -442,18 +429,18 @@ bool tst_QMatrixNxN::isSame(const QMatrix3x3& m, const qreal *values) } bool tst_QMatrixNxN::isSame(const QMatrix4x4& m, const qreal *values) { - const float *mv = m.constData(); + const qreal *mv = m.constData(); for (int row = 0; row < 4; ++row) { for (int col = 0; col < 4; ++col) { // Check the values using the operator() access function. - if (!fuzzyCompare((float)(m(row, col)), (float)(values[row * 4 + col]))) { + if (!fuzzyCompare(m(row, col), values[row * 4 + col])) { qDebug() << "floating-point failure at" << row << col << "actual =" << m(row, col) << "expected =" << values[row * 4 + col]; return false; } // Check the values using direct access, which verifies that the values // are stored internally in column-major order. - if (!fuzzyCompare((float)(mv[col * 4 + row]), (float)(values[row * 4 + col]))) { + if (!fuzzyCompare(mv[col * 4 + row], values[row * 4 + col])) { qDebug() << "column floating-point failure at" << row << col << "actual =" << mv[col * 4 + row] << "expected =" << values[row * 4 + col]; return false; } @@ -463,18 +450,18 @@ bool tst_QMatrixNxN::isSame(const QMatrix4x4& m, const qreal *values) } bool tst_QMatrixNxN::isSame(const QMatrix4x3& m, const qreal *values) { - const float *mv = m.constData(); + const qreal *mv = m.constData(); for (int row = 0; row < 3; ++row) { for (int col = 0; col < 4; ++col) { // Check the values using the operator() access function. - if (!fuzzyCompare((float)(m(row, col)), (float)(values[row * 4 + col]))) { + if (!fuzzyCompare(m(row, col), values[row * 4 + col])) { qDebug() << "floating-point failure at" << row << col << "actual =" << m(row, col) << "expected =" << values[row * 4 + col]; return false; } // Check the values using direct access, which verifies that the values // are stored internally in column-major order. - if (!fuzzyCompare((float)(mv[col * 3 + row]), (float)(values[row * 4 + col]))) { + if (!fuzzyCompare(mv[col * 3 + row], values[row * 4 + col])) { qDebug() << "column floating-point failure at" << row << col << "actual =" << mv[col * 3 + row] << "expected =" << values[row * 4 + col]; return false; } @@ -533,7 +520,7 @@ void tst_QMatrixNxN::create2x2() qreal vals[4]; m6.toValueArray(vals); for (int index = 0; index < 4; ++index) - QCOMPARE((float)(vals[index]), (float)(uniqueValues2[index])); + QCOMPARE(vals[index], uniqueValues2[index]); } // Test the creation of QMatrix3x3 objects in various ways: @@ -568,7 +555,7 @@ void tst_QMatrixNxN::create3x3() qreal vals[9]; m6.toValueArray(vals); for (int index = 0; index < 9; ++index) - QCOMPARE((float)(vals[index]), (float)(uniqueValues3[index])); + QCOMPARE(vals[index], uniqueValues3[index]); } // Test the creation of QMatrix4x4 objects in various ways: @@ -603,7 +590,7 @@ void tst_QMatrixNxN::create4x4() qreal vals[16]; m6.toValueArray(vals); for (int index = 0; index < 16; ++index) - QCOMPARE((float)(vals[index]), (float)(uniqueValues4[index])); + QCOMPARE(vals[index], uniqueValues4[index]); QMatrix4x4 m8 (uniqueValues4[0], uniqueValues4[1], uniqueValues4[2], uniqueValues4[3], @@ -645,7 +632,7 @@ void tst_QMatrixNxN::create4x3() qreal vals[12]; m6.toValueArray(vals); for (int index = 0; index < 12; ++index) - QCOMPARE((float)(vals[index]), (float)(uniqueValues4x3[index])); + QCOMPARE(vals[index], uniqueValues4x3[index]); } // Test isIdentity() for 2x2 matrices. @@ -1303,7 +1290,7 @@ void tst_QMatrixNxN::multiply4x3() QMatrix4x3 m1((const qreal *)m1Values); QMatrix3x4 m2((const qreal *)m2Values); - QGenericMatrix<3, 3, qreal, float> m4; + QGenericMatrix<3, 3, qreal> m4; m4 = m1 * m2; qreal values[9]; m4.toValueArray(values); @@ -1882,7 +1869,7 @@ void tst_QMatrixNxN::inverted4x4() Matrix4 m1alt; memcpy(m1alt.v, (const qreal *)m1Values, sizeof(m1alt.v)); - QCOMPARE((float)(m1.determinant()), (float)(m4Determinant(m1alt))); + QCOMPARE(m1.determinant(), m4Determinant(m1alt)); QMatrix4x4 m2; bool inv; @@ -1917,7 +1904,7 @@ void tst_QMatrixNxN::inverted4x4() void tst_QMatrixNxN::orthonormalInverse4x4() { QMatrix4x4 m1; - QVERIFY(matrixFuzzyCompare(m1.inverted(), m1)); + QVERIFY(qFuzzyCompare(m1.inverted(), m1)); QMatrix4x4 m2; m2.rotate(45.0, 1.0, 0.0, 0.0); @@ -1930,14 +1917,14 @@ void tst_QMatrixNxN::orthonormalInverse4x4() QMatrix4x4 m3 = m2; m3.inferSpecialType(); bool invertible; - QVERIFY(matrixFuzzyCompare(m2.inverted(&invertible), m3.inverted())); + QVERIFY(qFuzzyCompare(m2.inverted(&invertible), m3.inverted())); QVERIFY(invertible); QMatrix4x4 m4; m4.rotate(45.0, 0.0, 1.0, 0.0); QMatrix4x4 m5 = m4; m5.inferSpecialType(); - QVERIFY(matrixFuzzyCompare(m4.inverted(), m5.inverted())); + QVERIFY(qFuzzyCompare(m4.inverted(), m5.inverted())); QMatrix4x4 m6; m1.rotate(88, 0.0, 0.0, 1.0); @@ -1945,7 +1932,7 @@ void tst_QMatrixNxN::orthonormalInverse4x4() m1.rotate(25, 1.0, 0.0, 0.0); QMatrix4x4 m7 = m6; m7.inferSpecialType(); - QVERIFY(matrixFuzzyCompare(m6.inverted(), m7.inverted())); + QVERIFY(qFuzzyCompare(m6.inverted(), m7.inverted())); } // Test the generation and use of 4x4 scale matrices. @@ -2345,7 +2332,7 @@ void tst_QMatrixNxN::rotate4x4() QMatrix4x4 m3(uniqueValues4); QMatrix4x4 m4(m3); m4.rotate(angle, x, y, z); - QVERIFY(matrixFuzzyCompare(m4, m3 * m1)); + QVERIFY(qFuzzyCompare(m4, m3 * m1)); // Null vectors don't make sense for quaternion rotations. if (x != 0 || y != 0 || z != 0) { @@ -2417,8 +2404,8 @@ void tst_QMatrixNxN::rotate4x4() QPointF p3(2.0f, 3.0f); QPointF p4 = m1 * p3; - QVERIFY(fuzzyCompare((float)(p4.x()), p1x)); - QVERIFY(fuzzyCompare((float)(p4.y()), p1y)); + QVERIFY(fuzzyCompare(p4.x(), p1x)); + QVERIFY(fuzzyCompare(p4.y(), p1y)); if (x != 0 || y != 0 || z != 0) { QQuaternion q = QQuaternion::fromAxisAndAngle(QVector3D(x, y, z), angle); @@ -2911,14 +2898,12 @@ void tst_QMatrixNxN::extractAxisRotation() m.extractAxisRotation(extractedAngle, extractedAxis); - qreal epsilon = 0.001; - if (angle > 180) { - QVERIFY(fuzzyCompare(360.0f - angle, extractedAngle, epsilon)); - QVERIFY(fuzzyCompare(extractedAxis, -origAxis, epsilon)); + QVERIFY(fuzzyCompare(360.0f - angle, extractedAngle)); + QVERIFY(fuzzyCompare(extractedAxis, -origAxis)); } else { - QVERIFY(fuzzyCompare(angle, extractedAngle, epsilon)); - QVERIFY(fuzzyCompare(extractedAxis, origAxis, epsilon)); + QVERIFY(fuzzyCompare(angle, extractedAngle)); + QVERIFY(fuzzyCompare(extractedAxis, origAxis)); } } @@ -2959,11 +2944,9 @@ void tst_QMatrixNxN::extractTranslation() QVector3D vec = rotation.extractTranslation(); - qreal epsilon = 0.001; - - QVERIFY(fuzzyCompare(vec.x(), x, epsilon)); - QVERIFY(fuzzyCompare(vec.y(), y, epsilon)); - QVERIFY(fuzzyCompare(vec.z(), z, epsilon)); + QVERIFY(fuzzyCompare(vec.x(), x)); + QVERIFY(fuzzyCompare(vec.y(), y)); + QVERIFY(fuzzyCompare(vec.z(), z)); QMatrix4x4 lookAt; QVector3D eye(1.5f, -2.5f, 2.5f); @@ -2973,9 +2956,9 @@ void tst_QMatrixNxN::extractTranslation() QVector3D extEye = lookAt.extractTranslation(); - QVERIFY(fuzzyCompare(eye.x(), -extEye.x(), epsilon)); - QVERIFY(fuzzyCompare(eye.y(), -extEye.y(), epsilon)); - QVERIFY(fuzzyCompare(eye.z(), -extEye.z(), epsilon)); + QVERIFY(fuzzyCompare(eye.x(), -extEye.x())); + QVERIFY(fuzzyCompare(eye.y(), -extEye.y())); + QVERIFY(fuzzyCompare(eye.z(), -extEye.z())); } // Copy of "flagBits" in qmatrix4x4.h. @@ -2990,7 +2973,7 @@ enum { // Structure that allows direct access to "flagBits" for testing. struct Matrix4x4 { - float m[4][4]; + qreal m[4][4]; int flagBits; }; @@ -3134,8 +3117,8 @@ void tst_QMatrixNxN::convertQMatrix() QMatrix4x4 m6(m5); QPointF p6 = m6 * QPointF(100.0, 150.0); - QVERIFY(fuzzyCompare(p5.x(), p6.x(), 0.005)); - QVERIFY(fuzzyCompare(p5.y(), p6.y(), 0.005)); + QVERIFY(fuzzyCompare(p5.x(), p6.x())); + QVERIFY(fuzzyCompare(p5.y(), p6.y())); QMatrix m7 = m6.toAffine(); QVERIFY(fuzzyCompare(m5.m11(), m7.m11())); @@ -3181,8 +3164,8 @@ void tst_QMatrixNxN::convertQTransform() QMatrix4x4 m6(m5); QPointF p6 = m6 * QPointF(100.0, 150.0); - QVERIFY(fuzzyCompare(p5.x(), p6.x(), 0.005)); - QVERIFY(fuzzyCompare(p5.y(), p6.y(), 0.005)); + QVERIFY(fuzzyCompare(p5.x(), p6.x())); + QVERIFY(fuzzyCompare(p5.y(), p6.y())); QTransform m7 = m6.toTransform(); QVERIFY(fuzzyCompare(m5.m11(), m7.m11())); diff --git a/tests/auto/qmdisubwindow/tst_qmdisubwindow.cpp b/tests/auto/qmdisubwindow/tst_qmdisubwindow.cpp index 8c4415c..78ba46b 100644 --- a/tests/auto/qmdisubwindow/tst_qmdisubwindow.cpp +++ b/tests/auto/qmdisubwindow/tst_qmdisubwindow.cpp @@ -1835,7 +1835,10 @@ void tst_QMdiSubWindow::setFont() newFont.setBold(true); subWindow->setFont(newFont); qApp->processEvents(); - QCOMPARE(subWindow->font(), newFont); + const QFont &swFont = subWindow->font(); + QCOMPARE(swFont.family(), newFont.family()); + QCOMPARE(swFont.pointSize(), newFont.pointSize()); + QCOMPARE(swFont.weight(), newFont.weight()); QImage newTitleBar = QPixmap::grabWidget(subWindow, titleBarRect).toImage(); QVERIFY(newTitleBar != originalTitleBar); diff --git a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp index a223d1c..7c70819 100644 --- a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp +++ b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp @@ -2653,6 +2653,7 @@ void tst_QNetworkReply::ioPutToFileFromSocket() connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop())); QTestEventLoop::instance().enterLoop(10); + QCOMPARE(reply->error(), QNetworkReply::NoError); QVERIFY(!QTestEventLoop::instance().timeout()); QCOMPARE(reply->url(), url); @@ -2699,6 +2700,7 @@ void tst_QNetworkReply::ioPutToFileFromLocalSocket() connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop())); QTestEventLoop::instance().enterLoop(10); + QCOMPARE(reply->error(), QNetworkReply::NoError); QVERIFY(!QTestEventLoop::instance().timeout()); QCOMPARE(reply->url(), url); @@ -2971,6 +2973,7 @@ void tst_QNetworkReply::ioPostToHttpFromSocket() this, SLOT(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*))); disconnect(&manager, SIGNAL(authenticationRequired(QNetworkReply*,QAuthenticator*)), this, SLOT(authenticationRequired(QNetworkReply*,QAuthenticator*))); + QCOMPARE(reply->error(), QNetworkReply::NoError); QVERIFY(!QTestEventLoop::instance().timeout()); QCOMPARE(reply->url(), url); @@ -3295,6 +3298,7 @@ void tst_QNetworkReply::uploadPerformance() QTimer::singleShot(5000, &generator, SLOT(stop())); QTestEventLoop::instance().enterLoop(10); + QCOMPARE(reply->error(), QNetworkReply::NoError); QVERIFY(!QTestEventLoop::instance().timeout()); } @@ -3320,6 +3324,7 @@ void tst_QNetworkReply::httpUploadPerformance() generator.start(); time.start(); QTestEventLoop::instance().enterLoop(40); + QCOMPARE(reply->error(), QNetworkReply::NoError); QVERIFY(!QTestEventLoop::instance().timeout()); qint64 elapsed = time.elapsed(); @@ -3387,6 +3392,7 @@ void tst_QNetworkReply::httpDownloadPerformance() QTime time; time.start(); QTestEventLoop::instance().enterLoop(40); + QCOMPARE(reply->error(), QNetworkReply::NoError); QVERIFY(!QTestEventLoop::instance().timeout()); qint64 elapsed = time.elapsed(); @@ -3456,6 +3462,7 @@ void tst_QNetworkReply::downloadProgress() spy.clear(); QTestEventLoop::instance().enterLoop(2); + QCOMPARE(reply->error(), QNetworkReply::NoError); QVERIFY(!QTestEventLoop::instance().timeout()); QVERIFY(spy.count() > 0); QVERIFY(!reply->isRunning()); diff --git a/tests/auto/qprinter/tst_qprinter.cpp b/tests/auto/qprinter/tst_qprinter.cpp index 89be43f..aa64f13 100644 --- a/tests/auto/qprinter/tst_qprinter.cpp +++ b/tests/auto/qprinter/tst_qprinter.cpp @@ -105,6 +105,8 @@ private slots: void testCustomPageSizes(); void printDialogCompleter(); + void testActualNumCopies(); + private: }; @@ -959,5 +961,12 @@ void tst_QPrinter::printDialogCompleter() #endif } +void tst_QPrinter::testActualNumCopies() +{ + QPrinter p; + p.setNumCopies(15); + QCOMPARE(p.actualNumCopies(), 15); +} + QTEST_MAIN(tst_QPrinter) #include "tst_qprinter.moc" diff --git a/tests/auto/qquaternion/tst_qquaternion.cpp b/tests/auto/qquaternion/tst_qquaternion.cpp index 24427c3..e3c4cd6 100644 --- a/tests/auto/qquaternion/tst_qquaternion.cpp +++ b/tests/auto/qquaternion/tst_qquaternion.cpp @@ -98,14 +98,11 @@ private slots: void metaTypes(); }; -// qFuzzyCompare isn't always "fuzzy" enough to handle conversion -// between float, double, and qreal. So create "fuzzier" compares. -static bool fuzzyCompare(float x, float y) -{ - float diff = x - y; - if (diff < 0.0f) - diff = -diff; - return (diff < 0.001); +// QVector3D uses float internally, which can lead to some precision +// issues when using it with the qreal-based QQuaternion. +static bool fuzzyCompare(qreal x, qreal y) +{ + return qFuzzyIsNull(float(x - y)); } // Test the creation of QQuaternion objects in various ways: @@ -250,8 +247,8 @@ void tst_QQuaternion::length() QFETCH(qreal, len); QQuaternion v(w, x, y, z); - QCOMPARE((float)(v.length()), (float)len); - QCOMPARE((float)(v.lengthSquared()), (float)(x * x + y * y + z * z + w * w)); + QCOMPARE(v.length(), len); + QCOMPARE(v.lengthSquared(), x * x + y * y + z * z + w * w); } // Test the unit vector conversion for quaternions. @@ -273,11 +270,11 @@ void tst_QQuaternion::normalized() if (v.isNull()) QVERIFY(u.isNull()); else - QCOMPARE((float)(u.length()), (float)1.0f); - QCOMPARE((float)(u.x() * len), (float)(v.x())); - QCOMPARE((float)(u.y() * len), (float)(v.y())); - QCOMPARE((float)(u.z() * len), (float)(v.z())); - QCOMPARE((float)(u.scalar() * len), (float)(v.scalar())); + QCOMPARE(u.length(), qreal(1.0f)); + QCOMPARE(u.x() * len, v.x()); + QCOMPARE(u.y() * len, v.y()); + QCOMPARE(u.z() * len, v.z()); + QCOMPARE(u.scalar() * len, v.scalar()); } // Test the unit vector conversion for quaternions. @@ -299,7 +296,7 @@ void tst_QQuaternion::normalize() if (isNull) QVERIFY(v.isNull()); else - QCOMPARE((float)(v.length()), (float)1.0f); + QCOMPARE(v.length(), qreal(1.0f)); } // Test the comparison operators for quaternions. diff --git a/tests/auto/qscriptengineagent/tst_qscriptengineagent.cpp b/tests/auto/qscriptengineagent/tst_qscriptengineagent.cpp index 8fe6839..75f7a12 100644 --- a/tests/auto/qscriptengineagent/tst_qscriptengineagent.cpp +++ b/tests/auto/qscriptengineagent/tst_qscriptengineagent.cpp @@ -177,6 +177,21 @@ struct ScriptEngineEvent value(exception), hasExceptionHandler(hasHandler) { } + static QString typeToQString(Type t) + { + switch (t) { + case ScriptEngineEvent::ScriptLoad: return "ScriptLoad"; + case ScriptEngineEvent::ScriptUnload: return "ScriptUnload"; + case ScriptEngineEvent::ContextPush: return "ContextPush"; + case ScriptEngineEvent::ContextPop: return "ContextPop"; + case ScriptEngineEvent::FunctionEntry: return "FunctionEntry"; + case ScriptEngineEvent::FunctionExit: return "FunctionExit"; + case ScriptEngineEvent::PositionChange: return "PositionChange"; + case ScriptEngineEvent::ExceptionThrow: return "ExceptionThrow"; + case ScriptEngineEvent::ExceptionCatch: return "ExceptionCatch"; + case ScriptEngineEvent::DebuggerInvocationRequest: return "DebuggerInvocationRequest"; + } + } }; class ScriptEngineSpy : public QScriptEngineAgent, public QList<ScriptEngineEvent> @@ -574,11 +589,7 @@ void tst_QScriptEngineAgent::functionEntryAndExit_functionCall() // anonymous function exit QCOMPARE(spy->at(2).type, ScriptEngineEvent::FunctionExit); QCOMPARE(spy->at(2).scriptId, spy->at(0).scriptId); - if (qt_script_isJITEnabled()) - QEXPECT_FAIL("", "function return value is not reported when JIT is enabled", Continue); QVERIFY(spy->at(2).value.isNumber()); - if (qt_script_isJITEnabled()) - QEXPECT_FAIL("", "function return value is not reported when JIT is enabled", Continue); QCOMPARE(spy->at(2).value.toNumber(), qsreal(123)); // evaluate() exit @@ -655,11 +666,7 @@ void tst_QScriptEngineAgent::functionEntryAndExit_functionDefinition() // foo() exit QCOMPARE(spy->at(4).type, ScriptEngineEvent::FunctionExit); QCOMPARE(spy->at(4).scriptId, spy->at(0).scriptId); - if (qt_script_isJITEnabled()) - QEXPECT_FAIL("", "function return value is not reported when JIT is enabled", Continue); QVERIFY(spy->at(4).value.isNumber()); - if (qt_script_isJITEnabled()) - QEXPECT_FAIL("", "function return value is not reported when JIT is enabled", Continue); QCOMPARE(spy->at(4).value.toNumber(), qsreal(456)); // evaluate() exit @@ -1044,11 +1051,7 @@ void tst_QScriptEngineAgent::functionEntryAndExit_call() // exit QCOMPARE(spy->at(1).type, ScriptEngineEvent::FunctionExit); QCOMPARE(spy->at(1).scriptId, spy->at(0).scriptId); - if (qt_script_isJITEnabled()) - QEXPECT_FAIL("", "function return value is not reported when JIT is enabled", Continue); QVERIFY(spy->at(1).value.isNumber()); - if (qt_script_isJITEnabled()) - QEXPECT_FAIL("", "function return value is not reported when JIT is enabled", Continue); QCOMPARE(spy->at(1).value.toNumber(), qsreal(123)); } delete spy; @@ -1604,8 +1607,6 @@ void tst_QScriptEngineAgent::exceptionThrowAndCatch() QCOMPARE(spy->at(1).type, ScriptEngineEvent::ExceptionCatch); QCOMPARE(spy->at(1).scriptId, spy->at(0).scriptId); - if (qt_script_isJITEnabled()) - QEXPECT_FAIL("", "Exception value is not passed in exceptionCatch event when JIT is enabled", Continue); QVERIFY(spy->at(1).value.strictlyEquals(spy->at(0).value)); } } @@ -1749,8 +1750,6 @@ void tst_QScriptEngineAgent::eventOrder_throwAndCatch() QVERIFY(spy->at(7).hasExceptionHandler); // catch QCOMPARE(spy->at(8).type, ScriptEngineEvent::ExceptionCatch); - if (qt_script_isJITEnabled()) - QEXPECT_FAIL("", "Exception value is not passed in exceptionCatch event when JIT is enabled", Continue); QVERIFY(spy->at(8).value.isError()); // void(e) QCOMPARE(spy->at(9).type, ScriptEngineEvent::PositionChange); @@ -1801,16 +1800,12 @@ void tst_QScriptEngineAgent::eventOrder_functions() // bar() exit QCOMPARE(spy->at(15).type, ScriptEngineEvent::FunctionExit); QCOMPARE(spy->at(15).scriptId, spy->at(3).scriptId); - if (qt_script_isJITEnabled()) - QEXPECT_FAIL("", "function return value is not reported when JIT is enabled", Continue); QVERIFY(spy->at(15).value.isNumber()); // restore context QCOMPARE(spy->at(16).type, ScriptEngineEvent::ContextPop); // foo() exit QCOMPARE(spy->at(17).type, ScriptEngineEvent::FunctionExit); QCOMPARE(spy->at(17).scriptId, spy->at(0).scriptId); - if (qt_script_isJITEnabled()) - QEXPECT_FAIL("", "function return value is not reported when JIT is enabled", Continue); QVERIFY(spy->at(17).value.isNumber()); // restore context QCOMPARE(spy->at(18).type, ScriptEngineEvent::ContextPop); @@ -1834,7 +1829,7 @@ void tst_QScriptEngineAgent::eventOrder_functions() eng.evaluate("foo('ciao')"); - //QCOMPARE(spy->count(), 45); + QCOMPARE(spy->count(), 45); // load QCOMPARE(spy->at(25).type, ScriptEngineEvent::ScriptLoad); @@ -1875,33 +1870,21 @@ void tst_QScriptEngineAgent::eventOrder_functions() // bar() exit QCOMPARE(spy->at(39).type, ScriptEngineEvent::FunctionExit); QCOMPARE(spy->at(39).scriptId, spy->at(21).scriptId); - if (qt_script_isJITEnabled()) - QEXPECT_FAIL("", "function return value is not reported when JIT is enabled", Continue); QVERIFY(spy->at(39).value.isError()); // restore context QCOMPARE(spy->at(40).type, ScriptEngineEvent::ContextPop); // foo() exit QCOMPARE(spy->at(41).type, ScriptEngineEvent::FunctionExit); - if (qt_script_isJITEnabled()) - QEXPECT_FAIL("", "script ID for function exit is not correct when JIT is enabled", Continue); QCOMPARE(spy->at(41).scriptId, spy->at(0).scriptId); QVERIFY(spy->at(41).value.isError()); // restore context QCOMPARE(spy->at(42).type, ScriptEngineEvent::ContextPop); // evaluate() exit QCOMPARE(spy->at(43).type, ScriptEngineEvent::FunctionExit); - if (qt_script_isJITEnabled()) - QEXPECT_FAIL("", "script ID for function exit is not correct when JIT is enabled", Continue); QCOMPARE(spy->at(43).scriptId, spy->at(26).scriptId); - if (qt_script_isJITEnabled()) - QEXPECT_FAIL("", "function return value is not reported when JIT is enabled", Continue); QVERIFY(spy->at(43).value.isError()); // unload - if (qt_script_isJITEnabled()) - QEXPECT_FAIL("", "wrong event type when JIT is enabled", Continue); QCOMPARE(spy->at(44).type, ScriptEngineEvent::ScriptUnload); - if (qt_script_isJITEnabled()) - QEXPECT_FAIL("", "wrong script ID when JIT is enabled", Continue); QCOMPARE(spy->at(44).scriptId, spy->at(25).scriptId); } delete spy; @@ -1958,8 +1941,6 @@ void tst_QScriptEngineAgent::eventOrder_signalsHandling() emit testSignal(123); - if (qt_script_isJITEnabled()) - QEXPECT_FAIL("", "too many events reported when JIT is enabled", Abort); QCOMPARE(spy->count(), 14); // new context QCOMPARE(spy->at(4).type, ScriptEngineEvent::ContextPush); diff --git a/tests/auto/qsqlquery/tst_qsqlquery.cpp b/tests/auto/qsqlquery/tst_qsqlquery.cpp index deebb1b..36b17ed 100644 --- a/tests/auto/qsqlquery/tst_qsqlquery.cpp +++ b/tests/auto/qsqlquery/tst_qsqlquery.cpp @@ -381,6 +381,9 @@ void tst_QSqlQuery::char1SelectUnicode() QSqlDatabase db = QSqlDatabase::database( dbName ); CHECK_DATABASE( db ); + if(db.driverName().startsWith("QDB2")) + QSKIP("Needs someone with more Unicode knowledge than I have to fix", SkipSingle); + if ( db.driver()->hasFeature( QSqlDriver::Unicode ) ) { QString uniStr( QChar( 0xfb50 ) ); QSqlQuery q( db ); @@ -1613,6 +1616,8 @@ void tst_QSqlQuery::prepare_bind_exec() CHECK_DATABASE( db ); if(db.driverName().startsWith("QIBASE") && (db.databaseName() == "silence.nokia.troll.no:c:\\ibase\\testdb_ascii" || db.databaseName() == "/opt/interbase/qttest.gdb")) QSKIP("Can't transliterate extended unicode to ascii", SkipSingle); + if(db.driverName().startsWith("QDB2")) + QSKIP("Needs someone with more Unicode knowledge than I have to fix", SkipSingle); { // new scope for SQLITE diff --git a/tests/auto/qstylesheetstyle/tst_qstylesheetstyle.cpp b/tests/auto/qstylesheetstyle/tst_qstylesheetstyle.cpp index 55b6e96..499d4e0 100644 --- a/tests/auto/qstylesheetstyle/tst_qstylesheetstyle.cpp +++ b/tests/auto/qstylesheetstyle/tst_qstylesheetstyle.cpp @@ -828,7 +828,8 @@ void tst_QStyleSheetStyle::hoverColors() widgets << new QLabel("<b>TESTING</b>"); foreach (QWidget *widget, widgets) { - QDialog frame; + //without Qt::X11BypassWindowManagerHint the window manager may move the window after we moved the cursor + QDialog frame(0, Qt::X11BypassWindowManagerHint); QLayout* layout = new QGridLayout; QLineEdit* dummy = new QLineEdit; diff --git a/tests/auto/qtextdocument/tst_qtextdocument.cpp b/tests/auto/qtextdocument/tst_qtextdocument.cpp index 1835373..0c1d334 100644 --- a/tests/auto/qtextdocument/tst_qtextdocument.cpp +++ b/tests/auto/qtextdocument/tst_qtextdocument.cpp @@ -100,6 +100,9 @@ private slots: void task240325(); + void stylesheetFont_data(); + void stylesheetFont(); + void toHtml_data(); void toHtml(); void toHtml2(); @@ -571,6 +574,63 @@ void tst_QTextDocument::task240325() } } +void tst_QTextDocument::stylesheetFont_data() +{ + QTest::addColumn<QString>("stylesheet"); + QTest::addColumn<QFont>("font"); + + { + QFont font; + font.setBold(true); + font.setPixelSize(64); + + QTest::newRow("Regular font specification") + << "font-size: 64px; font-weight: bold;" + << font; + } + + + { + QFont font; + font.setBold(true); + font.setPixelSize(64); + + QTest::newRow("Shorthand font specification") + << "font: normal bold 64px Arial;" + << font; + } + +} + +void tst_QTextDocument::stylesheetFont() +{ + QFETCH(QString, stylesheet); + QFETCH(QFont, font); + + QString html = QString::fromLatin1("<html>" + "<body>" + "<div style=\"%1\" >" + "Foobar" + "</div>" + "</body>" + "</html>").arg(stylesheet); + + qDebug() << html; + doc->setHtml(html); + QCOMPARE(doc->blockCount(), 1); + + // First and only block + QTextBlock block = doc->firstBlock(); + + QString text = block.text(); + QCOMPARE(text, QString::fromLatin1("Foobar")); + + QFont actualFont = block.charFormat().font(); + + QCOMPARE(actualFont.bold(), font.bold()); + QCOMPARE(actualFont.pixelSize(), font.pixelSize()); +} + void tst_QTextDocument::noundo_moreIsModified() { doc->setUndoRedoEnabled(false); @@ -1128,7 +1188,7 @@ void tst_QTextDocument::toHtml_data() QTest::newRow("lists") << QTextDocumentFragment(&doc) << QString("EMPTYBLOCK") + - QString("<ul style=\"-qt-list-indent: 1;\"><li DEFAULTBLOCKSTYLE>Blubb</li>\n<li DEFAULTBLOCKSTYLE>Blah</li></ul>"); + QString("<ul style=\"margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;\"><li DEFAULTBLOCKSTYLE>Blubb</li>\n<li DEFAULTBLOCKSTYLE>Blah</li></ul>"); } { @@ -1151,7 +1211,7 @@ void tst_QTextDocument::toHtml_data() QTest::newRow("charfmt-for-list-item") << QTextDocumentFragment(&doc) << QString("EMPTYBLOCK") + - QString("<ul style=\"-qt-list-indent: 1;\"><li DEFAULTBLOCKSTYLE>Blubb</li>\n<li style=\" color:#0000ff;\" DEFAULTBLOCKSTYLE><span style=\" color:#ff0000;\">Blah</span></li></ul>"); + QString("<ul style=\"margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;\"><li DEFAULTBLOCKSTYLE>Blubb</li>\n<li style=\" color:#0000ff;\" DEFAULTBLOCKSTYLE><span style=\" color:#ff0000;\">Blah</span></li></ul>"); } { @@ -1181,7 +1241,7 @@ void tst_QTextDocument::toHtml_data() QTest::newRow("list-indent") << QTextDocumentFragment(&doc) << QString("EMPTYBLOCK") + - QString("<ul style=\"-qt-list-indent: 4;\"><li DEFAULTBLOCKSTYLE>Blah</li></ul>"); + QString("<ul style=\"margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 4;\"><li DEFAULTBLOCKSTYLE>Blah</li></ul>"); } { @@ -1445,6 +1505,20 @@ void tst_QTextDocument::toHtml_data() "\n<p OPENDEFAULTBLOCKSTYLE page-break-before:always; page-break-after:always;\">Bar</p>" "\n<table border=\"1\" style=\" page-break-after:always;\" cellspacing=\"2\">\n<tr>\n<td></td></tr></table>"); } + + { + CREATE_DOC_AND_CURSOR(); + + QTextListFormat listFmt; + listFmt.setStyle(QTextListFormat::ListDisc); + + cursor.insertList(listFmt); + cursor.insertText("Blah"); + + QTest::newRow("list-ul-margin") << QTextDocumentFragment(&doc) + << QString("EMPTYBLOCK") + + QString("<ul style=\"margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;\"><li DEFAULTBLOCKSTYLE>Blah</li></ul>"); + } } void tst_QTextDocument::toHtml() diff --git a/tests/auto/qtimer/tst_qtimer.cpp b/tests/auto/qtimer/tst_qtimer.cpp index 57502c7..36fce76 100644 --- a/tests/auto/qtimer/tst_qtimer.cpp +++ b/tests/auto/qtimer/tst_qtimer.cpp @@ -87,6 +87,7 @@ private slots: void restartedTimerFiresTooSoon(); void timerFiresOnlyOncePerProcessEvents_data(); void timerFiresOnlyOncePerProcessEvents(); + void timerIdPersistsAfterThreadExit(); }; class TimerHelper : public QObject @@ -562,5 +563,44 @@ void tst_QTimer::timerFiresOnlyOncePerProcessEvents() QCOMPARE(longSlot.count, 1); } +class TimerIdPersistsAfterThreadExitThread : public QThread +{ +public: + QTimer *timer; + int timerId, returnValue; + + TimerIdPersistsAfterThreadExitThread() + : QThread(), timer(0), timerId(-1), returnValue(-1) + { } + ~TimerIdPersistsAfterThreadExitThread() + { + delete timer; + } + + void run() + { + QEventLoop eventLoop; + timer = new QTimer; + connect(timer, SIGNAL(timeout()), &eventLoop, SLOT(quit())); + timer->start(100); + timerId = timer->timerId(); + returnValue = eventLoop.exec(); + } +}; + +void tst_QTimer::timerIdPersistsAfterThreadExit() +{ + TimerIdPersistsAfterThreadExitThread thread; + thread.start(); + QVERIFY(thread.wait(30000)); + QCOMPARE(thread.returnValue, 0); + + // even though the thread has exited, and the event dispatcher destroyed, the timer is still + // "active", meaning the timer id should NOT be reused (i.e. the event dispatcher should not + // have unregistered it) + int timerId = thread.startTimer(100); + QVERIFY((timerId & 0xffffff) != (thread.timerId & 0xffffff)); +} + QTEST_MAIN(tst_QTimer) #include "tst_qtimer.moc" diff --git a/tests/auto/qtreeview/tst_qtreeview.cpp b/tests/auto/qtreeview/tst_qtreeview.cpp index 6709807..fae4b26 100644 --- a/tests/auto/qtreeview/tst_qtreeview.cpp +++ b/tests/auto/qtreeview/tst_qtreeview.cpp @@ -2042,7 +2042,7 @@ void tst_QTreeView::scrollTo() view.show(); view.setVerticalScrollMode(QAbstractItemView::ScrollPerItem); //some styles change that in Polish - + view.resize(300, 200); //view.verticalScrollBar()->setValue(0); @@ -2055,7 +2055,7 @@ void tst_QTreeView::scrollTo() QCOMPARE(view.verticalScrollBar()->value(), 5); view.scrollTo(model.index(60, 60, QModelIndex())); - + CHECK_VISIBLE(60,60); view.scrollTo(model.index(60, 30, QModelIndex())); CHECK_VISIBLE(60,30); @@ -3059,12 +3059,12 @@ void tst_QTreeView::task216717_updateChildren() tree.refreshed = false; QTreeWidgetItem *parent = new QTreeWidgetItem(QStringList() << "parent"); tree.addTopLevelItem(parent); - QTest::qWait(100); - QVERIFY(tree.refreshed); + QTest::qWait(10); + QTRY_VERIFY(tree.refreshed); tree.refreshed = false; parent->addChild(new QTreeWidgetItem(QStringList() << "child")); - QTest::qWait(100); - QVERIFY(tree.refreshed); + QTest::qWait(10); + QTRY_VERIFY(tree.refreshed); } @@ -3259,7 +3259,7 @@ void tst_QTreeView::task202039_closePersistentEditor() view.closePersistentEditor(current); QVERIFY(view.indexWidget(current) == 0); - //here was the bug: closing the persistent editor would not reset the state + //here was the bug: closing the persistent editor would not reset the state //and it was impossible to go into editinon again QTest::mousePress(view.viewport(), Qt::LeftButton, 0, view.visualRect(current).center()); QTest::mouseDClick(view.viewport(), Qt::LeftButton, 0, view.visualRect(current).center()); @@ -3313,7 +3313,7 @@ void tst_QTreeView::task244304_clickOnDecoration() QTest::mouseClick(view.viewport(), Qt::LeftButton, 0, rect.topLeft()+QPoint(-rect.left()/2,rect.height()/2)); QVERIFY(!view.currentIndex().isValid()); QVERIFY(view.isExpanded(item0.index())); - + rect = view.visualRect(item1.index()); //the item has no decoration, it should get selected QTest::mouseClick(view.viewport(), Qt::LeftButton, 0, rect.topLeft()+QPoint(-rect.left()/2,rect.height()/2)); diff --git a/tests/auto/qvectornd/tst_qvectornd.cpp b/tests/auto/qvectornd/tst_qvectornd.cpp index 243b172..75c2eb5 100644 --- a/tests/auto/qvectornd/tst_qvectornd.cpp +++ b/tests/auto/qvectornd/tst_qvectornd.cpp @@ -144,14 +144,13 @@ private slots: void metaTypes(); }; -// qFuzzyCompare isn't always "fuzzy" enough to handle conversion -// between float, double, and qreal. So create "fuzzier" compares. -static bool fuzzyCompare(float x, float y) +// QVector2/3/4D use float internally, which can sometimes lead +// to precision issues when converting to and from qreal. +// This fuzzy compare is slightly "fuzzier" than the default +// qFuzzyCompare for qreal to compensate. +static bool fuzzyCompare(qreal x, qreal y) { - float diff = x - y; - if (diff < 0.0f) - diff = -diff; - return (diff < 0.001); + return qFuzzyIsNull((float)(x - y)); } // Test the creation of QVector2D objects in various ways: @@ -577,8 +576,8 @@ void tst_QVector::length2() QFETCH(qreal, len); QVector2D v(x, y); - QCOMPARE((float)(v.length()), (float)len); - QCOMPARE((float)(v.lengthSquared()), (float)(x * x + y * y)); + QCOMPARE(v.length(), len); + QCOMPARE(v.lengthSquared(), x * x + y * y); } // Test vector length computation for 3D vectors. @@ -606,8 +605,8 @@ void tst_QVector::length3() QFETCH(qreal, len); QVector3D v(x, y, z); - QCOMPARE((float)(v.length()), (float)len); - QCOMPARE((float)(v.lengthSquared()), (float)(x * x + y * y + z * z)); + QCOMPARE(v.length(), len); + QCOMPARE(v.lengthSquared(), x * x + y * y + z * z); } // Test vector length computation for 4D vectors. @@ -639,8 +638,8 @@ void tst_QVector::length4() QFETCH(qreal, len); QVector4D v(x, y, z, w); - QCOMPARE((float)(v.length()), (float)len); - QCOMPARE((float)(v.lengthSquared()), (float)(x * x + y * y + z * z + w * w)); + QCOMPARE(v.length(), len); + QCOMPARE(v.lengthSquared(), x * x + y * y + z * z + w * w); } // Test the unit vector conversion for 2D vectors. @@ -660,9 +659,9 @@ void tst_QVector::normalized2() if (v.isNull()) QVERIFY(u.isNull()); else - QCOMPARE((float)(u.length()), (float)1.0f); - QCOMPARE((float)(u.x() * len), (float)(v.x())); - QCOMPARE((float)(u.y() * len), (float)(v.y())); + QVERIFY(fuzzyCompare(u.length(), qreal(1.0f))); + QVERIFY(fuzzyCompare(u.x() * len, v.x())); + QVERIFY(fuzzyCompare(u.y() * len, v.y())); } // Test the unit vector conversion for 3D vectors. @@ -683,10 +682,10 @@ void tst_QVector::normalized3() if (v.isNull()) QVERIFY(u.isNull()); else - QCOMPARE((float)(u.length()), (float)1.0f); - QCOMPARE((float)(u.x() * len), (float)(v.x())); - QCOMPARE((float)(u.y() * len), (float)(v.y())); - QCOMPARE((float)(u.z() * len), (float)(v.z())); + QVERIFY(fuzzyCompare(u.length(), qreal(1.0f))); + QVERIFY(fuzzyCompare(u.x() * len, v.x())); + QVERIFY(fuzzyCompare(u.y() * len, v.y())); + QVERIFY(fuzzyCompare(u.z() * len, v.z())); } // Test the unit vector conversion for 4D vectors. @@ -708,11 +707,11 @@ void tst_QVector::normalized4() if (v.isNull()) QVERIFY(u.isNull()); else - QCOMPARE((float)(u.length()), (float)1.0f); - QCOMPARE((float)(u.x() * len), (float)(v.x())); - QCOMPARE((float)(u.y() * len), (float)(v.y())); - QCOMPARE((float)(u.z() * len), (float)(v.z())); - QCOMPARE((float)(u.w() * len), (float)(v.w())); + QVERIFY(fuzzyCompare(u.length(), qreal(1.0f))); + QVERIFY(fuzzyCompare(u.x() * len, v.x())); + QVERIFY(fuzzyCompare(u.y() * len, v.y())); + QVERIFY(fuzzyCompare(u.z() * len, v.z())); + QVERIFY(fuzzyCompare(u.w() * len, v.w())); } // Test the unit vector conversion for 2D vectors. @@ -732,7 +731,7 @@ void tst_QVector::normalize2() if (isNull) QVERIFY(v.isNull()); else - QCOMPARE((float)(v.length()), (float)1.0f); + QVERIFY(fuzzyCompare(v.length(), qreal(1.0f))); } // Test the unit vector conversion for 3D vectors. @@ -753,7 +752,7 @@ void tst_QVector::normalize3() if (isNull) QVERIFY(v.isNull()); else - QCOMPARE((float)(v.length()), (float)1.0f); + QVERIFY(fuzzyCompare(v.length(), qreal(1.0f))); } // Test the unit vector conversion for 4D vectors. @@ -775,7 +774,7 @@ void tst_QVector::normalize4() if (isNull) QVERIFY(v.isNull()); else - QCOMPARE((float)(v.length()), (float)1.0f); + QVERIFY(fuzzyCompare(v.length(), qreal(1.0f))); } // Test the comparison operators for 2D vectors. diff --git a/tests/auto/qwidget/tst_qwidget.cpp b/tests/auto/qwidget/tst_qwidget.cpp index f638efd..b3df69d 100644 --- a/tests/auto/qwidget/tst_qwidget.cpp +++ b/tests/auto/qwidget/tst_qwidget.cpp @@ -5347,6 +5347,8 @@ void tst_QWidget::moveChild() QFETCH(QPoint, offset); ColorWidget parent; + // prevent custom styles + parent.setStyle(new QWindowsStyle); ColorWidget child(&parent, Qt::blue); #ifndef Q_OS_WINCE @@ -5397,6 +5399,8 @@ void tst_QWidget::moveChild() void tst_QWidget::showAndMoveChild() { QWidget parent(0, Qt::FramelessWindowHint); + // prevent custom styles + parent.setStyle(new QWindowsStyle); parent.resize(300, 300); parent.setPalette(Qt::red); parent.show(); @@ -6467,6 +6471,8 @@ void tst_QWidget::render() { QWidget window; window.resize(100, 100); + // prevent custom styles + window.setStyle(new QWindowsStyle); window.show(); #ifdef Q_WS_X11 qt_x11_wait_for_window_manager(&window); @@ -6484,6 +6490,8 @@ void tst_QWidget::render() widget.resize(200, 200); widget.setAutoFillBackground(true); widget.setPalette(Qt::red); + // prevent custom styles + widget.setStyle(new QWindowsStyle); widget.show(); #ifdef Q_WS_X11 qt_x11_wait_for_window_manager(&widget); @@ -6739,6 +6747,8 @@ void tst_QWidget::renderInvisible() void tst_QWidget::renderWithPainter() { QWidget widget; + // prevent custom styles + widget.setStyle(new QWindowsStyle); widget.show(); widget.resize(70, 50); widget.setAutoFillBackground(true); diff --git a/tests/auto/uic/baseline/Dialog_with_Buttons_Bottom.ui.h b/tests/auto/uic/baseline/Dialog_with_Buttons_Bottom.ui.h index 4b3ca7e..ecbfd30 100644 --- a/tests/auto/uic/baseline/Dialog_with_Buttons_Bottom.ui.h +++ b/tests/auto/uic/baseline/Dialog_with_Buttons_Bottom.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'Dialog_with_Buttons_Bottom.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:13 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -87,7 +46,6 @@ public: void retranslateUi(QDialog *Dialog) { Dialog->setWindowTitle(QApplication::translate("Dialog", "Dialog", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(Dialog); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/Dialog_with_Buttons_Right.ui.h b/tests/auto/uic/baseline/Dialog_with_Buttons_Right.ui.h index 9f390f6..aa42d5c 100644 --- a/tests/auto/uic/baseline/Dialog_with_Buttons_Right.ui.h +++ b/tests/auto/uic/baseline/Dialog_with_Buttons_Right.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'Dialog_with_Buttons_Right.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:13 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -87,7 +46,6 @@ public: void retranslateUi(QDialog *Dialog) { Dialog->setWindowTitle(QApplication::translate("Dialog", "Dialog", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(Dialog); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/Dialog_without_Buttons.ui.h b/tests/auto/uic/baseline/Dialog_without_Buttons.ui.h index 0ab89f8..7d876e1 100644 --- a/tests/auto/uic/baseline/Dialog_without_Buttons.ui.h +++ b/tests/auto/uic/baseline/Dialog_without_Buttons.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'Dialog_without_Buttons.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:13 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -78,7 +37,6 @@ public: void retranslateUi(QDialog *Dialog) { Dialog->setWindowTitle(QApplication::translate("Dialog", "Dialog", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(Dialog); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/Main_Window.ui.h b/tests/auto/uic/baseline/Main_Window.ui.h index 85f1dd2..b54e4a6 100644 --- a/tests/auto/uic/baseline/Main_Window.ui.h +++ b/tests/auto/uic/baseline/Main_Window.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'Main_Window.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:13 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -93,7 +52,6 @@ public: void retranslateUi(QMainWindow *MainWindow) { MainWindow->setWindowTitle(QApplication::translate("MainWindow", "MainWindow", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(MainWindow); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/Widget.ui.h b/tests/auto/uic/baseline/Widget.ui.h index c23cf7d..362d283 100644 --- a/tests/auto/uic/baseline/Widget.ui.h +++ b/tests/auto/uic/baseline/Widget.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'Widget.ui' ** -** Created: Tue Aug 18 19:03:32 2009 +** Created: Fri Sep 4 10:17:15 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -109,7 +68,6 @@ public: "Last line.", 0, QApplication::UnicodeUTF8)); groupBox->setTitle(QApplication::translate("Form", "A Group Box", 0, QApplication::UnicodeUTF8)); pushButton->setText(QApplication::translate("Form", "PushButton", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(Form); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/addlinkdialog.ui.h b/tests/auto/uic/baseline/addlinkdialog.ui.h index 39b92da..230bc5d 100644 --- a/tests/auto/uic/baseline/addlinkdialog.ui.h +++ b/tests/auto/uic/baseline/addlinkdialog.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'addlinkdialog.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:12 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -145,7 +104,6 @@ public: AddLinkDialog->setWindowTitle(QApplication::translate("AddLinkDialog", "Insert Link", 0, QApplication::UnicodeUTF8)); label->setText(QApplication::translate("AddLinkDialog", "Title:", 0, QApplication::UnicodeUTF8)); label_2->setText(QApplication::translate("AddLinkDialog", "URL:", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(AddLinkDialog); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/addtorrentform.ui.h b/tests/auto/uic/baseline/addtorrentform.ui.h index f477d8d..c075e8a 100644 --- a/tests/auto/uic/baseline/addtorrentform.ui.h +++ b/tests/auto/uic/baseline/addtorrentform.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'addtorrentform.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:12 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -269,7 +228,6 @@ public: sizeLabel->setText(QApplication::translate("AddTorrentFile", "0", 0, QApplication::UnicodeUTF8)); okButton->setText(QApplication::translate("AddTorrentFile", "&OK", 0, QApplication::UnicodeUTF8)); cancelButton->setText(QApplication::translate("AddTorrentFile", "&Cancel", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(AddTorrentFile); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/authenticationdialog.ui.h b/tests/auto/uic/baseline/authenticationdialog.ui.h index 0b2d06c..9f35586 100644 --- a/tests/auto/uic/baseline/authenticationdialog.ui.h +++ b/tests/auto/uic/baseline/authenticationdialog.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'authenticationdialog.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:12 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -154,7 +113,6 @@ public: label_3->setText(QApplication::translate("Dialog", "Password:", 0, QApplication::UnicodeUTF8)); label_4->setText(QApplication::translate("Dialog", "Site:", 0, QApplication::UnicodeUTF8)); siteDescription->setText(QApplication::translate("Dialog", "%1 at %2", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(Dialog); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/backside.ui.h b/tests/auto/uic/baseline/backside.ui.h index af035b9..0fd710a 100644 --- a/tests/auto/uic/baseline/backside.ui.h +++ b/tests/auto/uic/baseline/backside.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'backside.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:12 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -224,7 +183,6 @@ public: ___qtreewidgetitem11->setText(0, QApplication::translate("BackSide", "QGraphicsLayoutItem", 0, QApplication::UnicodeUTF8)); treeWidget->setSortingEnabled(__sortingEnabled); - Q_UNUSED(BackSide); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/batchtranslation.ui.h b/tests/auto/uic/baseline/batchtranslation.ui.h index 26315c4..6b0051f 100644 --- a/tests/auto/uic/baseline/batchtranslation.ui.h +++ b/tests/auto/uic/baseline/batchtranslation.ui.h @@ -44,7 +44,7 @@ /******************************************************************************** ** Form generated from reading UI file 'batchtranslation.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:12 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -240,7 +240,6 @@ public: label->setText(QApplication::translate("databaseTranslationDialog", "The batch translator will search through the selected phrasebooks in the order given above.", 0, QApplication::UnicodeUTF8)); runButton->setText(QApplication::translate("databaseTranslationDialog", "&Run", 0, QApplication::UnicodeUTF8)); cancelButton->setText(QApplication::translate("databaseTranslationDialog", "&Cancel", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(databaseTranslationDialog); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/bookmarkdialog.ui.h b/tests/auto/uic/baseline/bookmarkdialog.ui.h index 0a381ab..098614c 100644 --- a/tests/auto/uic/baseline/bookmarkdialog.ui.h +++ b/tests/auto/uic/baseline/bookmarkdialog.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'bookmarkdialog.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:12 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -199,7 +158,6 @@ public: QTreeWidgetItem *___qtreewidgetitem = bookmarkWidget->headerItem(); ___qtreewidgetitem->setText(0, QApplication::translate("BookmarkDialog", "1", 0, QApplication::UnicodeUTF8)); newFolderButton->setText(QApplication::translate("BookmarkDialog", "New Folder", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(BookmarkDialog); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/bookwindow.ui.h b/tests/auto/uic/baseline/bookwindow.ui.h index a809330..e6c9280 100644 --- a/tests/auto/uic/baseline/bookwindow.ui.h +++ b/tests/auto/uic/baseline/bookwindow.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'bookwindow.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:12 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -210,7 +169,6 @@ public: label_4->setText(QApplication::translate("BookWindow", "<b>Year:</b>", 0, QApplication::UnicodeUTF8)); yearEdit->setPrefix(QString()); label->setText(QApplication::translate("BookWindow", "<b>Rating:</b>", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(BookWindow); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/browserwidget.ui.h b/tests/auto/uic/baseline/browserwidget.ui.h index 5c2a9d0..556d672 100644 --- a/tests/auto/uic/baseline/browserwidget.ui.h +++ b/tests/auto/uic/baseline/browserwidget.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'browserwidget.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:12 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -210,7 +169,6 @@ public: groupBox->setTitle(QApplication::translate("Browser", "SQL Query", 0, QApplication::UnicodeUTF8)); clearButton->setText(QApplication::translate("Browser", "&Clear", 0, QApplication::UnicodeUTF8)); submitButton->setText(QApplication::translate("Browser", "&Submit", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(Browser); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/calculator.ui.h b/tests/auto/uic/baseline/calculator.ui.h index f6c2070..b2cf236 100644 --- a/tests/auto/uic/baseline/calculator.ui.h +++ b/tests/auto/uic/baseline/calculator.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'calculator.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:12 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -229,7 +188,6 @@ public: powerButton->setText(QApplication::translate("Calculator", "x^2", 0, QApplication::UnicodeUTF8)); reciprocalButton->setText(QApplication::translate("Calculator", "1/x", 0, QApplication::UnicodeUTF8)); equalButton->setText(QApplication::translate("Calculator", "=", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(Calculator); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/calculatorform.ui.h b/tests/auto/uic/baseline/calculatorform.ui.h index 364018e..f2cf253 100644 --- a/tests/auto/uic/baseline/calculatorform.ui.h +++ b/tests/auto/uic/baseline/calculatorform.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'calculatorform.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:12 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -222,7 +181,6 @@ public: label_3_2->setText(QApplication::translate("CalculatorForm", "=", 0, QApplication::UnicodeUTF8)); label_2_2_2->setText(QApplication::translate("CalculatorForm", "Output", 0, QApplication::UnicodeUTF8)); outputWidget->setText(QApplication::translate("CalculatorForm", "0", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(CalculatorForm); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/certificateinfo.ui.h b/tests/auto/uic/baseline/certificateinfo.ui.h index c163aed..53d54c4 100644 --- a/tests/auto/uic/baseline/certificateinfo.ui.h +++ b/tests/auto/uic/baseline/certificateinfo.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'certificateinfo.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:12 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -138,7 +97,6 @@ public: CertificateInfo->setWindowTitle(QApplication::translate("CertificateInfo", "Display Certificate Information", 0, QApplication::UnicodeUTF8)); groupBox->setTitle(QApplication::translate("CertificateInfo", "Certification Path", 0, QApplication::UnicodeUTF8)); groupBox_2->setTitle(QApplication::translate("CertificateInfo", "Certificate Information", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(CertificateInfo); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/chatdialog.ui.h b/tests/auto/uic/baseline/chatdialog.ui.h index ed144fb..4152d36 100644 --- a/tests/auto/uic/baseline/chatdialog.ui.h +++ b/tests/auto/uic/baseline/chatdialog.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'chatdialog.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:12 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -144,7 +103,6 @@ public: { ChatDialog->setWindowTitle(QApplication::translate("ChatDialog", "Chat", 0, QApplication::UnicodeUTF8)); label->setText(QApplication::translate("ChatDialog", "Message:", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(ChatDialog); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/chatmainwindow.ui.h b/tests/auto/uic/baseline/chatmainwindow.ui.h index c179220..932f1dd 100644 --- a/tests/auto/uic/baseline/chatmainwindow.ui.h +++ b/tests/auto/uic/baseline/chatmainwindow.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'chatmainwindow.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:12 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! diff --git a/tests/auto/uic/baseline/chatsetnickname.ui.h b/tests/auto/uic/baseline/chatsetnickname.ui.h index 6d3650d..9a52aa5 100644 --- a/tests/auto/uic/baseline/chatsetnickname.ui.h +++ b/tests/auto/uic/baseline/chatsetnickname.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'chatsetnickname.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:12 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -161,7 +120,6 @@ public: label->setText(QApplication::translate("NicknameDialog", "New nickname:", 0, QApplication::UnicodeUTF8)); okButton->setText(QApplication::translate("NicknameDialog", "OK", 0, QApplication::UnicodeUTF8)); cancelButton->setText(QApplication::translate("NicknameDialog", "Cancel", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(NicknameDialog); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/config.ui.h b/tests/auto/uic/baseline/config.ui.h index 17383f7..87a115b 100644 --- a/tests/auto/uic/baseline/config.ui.h +++ b/tests/auto/uic/baseline/config.ui.h @@ -44,7 +44,7 @@ /******************************************************************************** ** Form generated from reading UI file 'config.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:12 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -760,7 +760,6 @@ public: PushButton3->setText(QApplication::translate("Config", "Set all to 1.0", 0, QApplication::UnicodeUTF8)); buttonOk->setText(QApplication::translate("Config", "&OK", 0, QApplication::UnicodeUTF8)); buttonCancel->setText(QApplication::translate("Config", "&Cancel", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(Config); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/connectdialog.ui.h b/tests/auto/uic/baseline/connectdialog.ui.h index 018be03..ceafddc 100644 --- a/tests/auto/uic/baseline/connectdialog.ui.h +++ b/tests/auto/uic/baseline/connectdialog.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'connectdialog.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:12 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -177,7 +136,6 @@ public: slotGroupBox->setTitle(QApplication::translate("ConnectDialog", "GroupBox", 0, QApplication::UnicodeUTF8)); editSlotsButton->setText(QApplication::translate("ConnectDialog", "Edit...", 0, QApplication::UnicodeUTF8)); showAllCheckBox->setText(QApplication::translate("ConnectDialog", "Show signals and slots inherited from QWidget", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(ConnectDialog); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/controller.ui.h b/tests/auto/uic/baseline/controller.ui.h index 7887e82..583a353 100644 --- a/tests/auto/uic/baseline/controller.ui.h +++ b/tests/auto/uic/baseline/controller.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'controller.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:13 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -126,7 +85,6 @@ public: accelerate->setText(QApplication::translate("Controller", "Accelerate", 0, QApplication::UnicodeUTF8)); right->setText(QApplication::translate("Controller", "Right", 0, QApplication::UnicodeUTF8)); left->setText(QApplication::translate("Controller", "Left", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(Controller); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/cookies.ui.h b/tests/auto/uic/baseline/cookies.ui.h index cdc77f0..83946bb 100644 --- a/tests/auto/uic/baseline/cookies.ui.h +++ b/tests/auto/uic/baseline/cookies.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'cookies.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:13 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -138,7 +97,6 @@ public: CookiesDialog->setWindowTitle(QApplication::translate("CookiesDialog", "Cookies", 0, QApplication::UnicodeUTF8)); removeButton->setText(QApplication::translate("CookiesDialog", "&Remove", 0, QApplication::UnicodeUTF8)); removeAllButton->setText(QApplication::translate("CookiesDialog", "Remove &All Cookies", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(CookiesDialog); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/cookiesexceptions.ui.h b/tests/auto/uic/baseline/cookiesexceptions.ui.h index 89e391c..2f4a7fb 100644 --- a/tests/auto/uic/baseline/cookiesexceptions.ui.h +++ b/tests/auto/uic/baseline/cookiesexceptions.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'cookiesexceptions.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:13 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -211,7 +170,6 @@ public: ExceptionsGroupBox->setTitle(QApplication::translate("CookiesExceptionsDialog", "Exceptions", 0, QApplication::UnicodeUTF8)); removeButton->setText(QApplication::translate("CookiesExceptionsDialog", "&Remove", 0, QApplication::UnicodeUTF8)); removeAllButton->setText(QApplication::translate("CookiesExceptionsDialog", "Remove &All", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(CookiesExceptionsDialog); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/default.ui.h b/tests/auto/uic/baseline/default.ui.h index 99470ce..4c6b489 100644 --- a/tests/auto/uic/baseline/default.ui.h +++ b/tests/auto/uic/baseline/default.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'default.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:13 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! diff --git a/tests/auto/uic/baseline/dialog.ui.h b/tests/auto/uic/baseline/dialog.ui.h index df10573..cd92679 100644 --- a/tests/auto/uic/baseline/dialog.ui.h +++ b/tests/auto/uic/baseline/dialog.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'dialog.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:13 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -107,7 +66,6 @@ public: loadFromFileButton->setText(QApplication::translate("Dialog", "Load Image From File...", 0, QApplication::UnicodeUTF8)); label->setText(QApplication::translate("Dialog", "Launch two of these dialogs. In the first, press the top button and load an image from a file. In the second, press the bottom button and display the loaded image from shared memory.", 0, QApplication::UnicodeUTF8)); loadFromSharedMemoryButton->setText(QApplication::translate("Dialog", "Display Image From Shared Memory", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(Dialog); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/downloaditem.ui.h b/tests/auto/uic/baseline/downloaditem.ui.h index fbe7c33..d856e20 100644 --- a/tests/auto/uic/baseline/downloaditem.ui.h +++ b/tests/auto/uic/baseline/downloaditem.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'downloaditem.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:13 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -176,7 +135,6 @@ public: tryAgainButton->setText(QApplication::translate("DownloadItem", "Try Again", 0, QApplication::UnicodeUTF8)); stopButton->setText(QApplication::translate("DownloadItem", "Stop", 0, QApplication::UnicodeUTF8)); openButton->setText(QApplication::translate("DownloadItem", "Open", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(DownloadItem); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/downloads.ui.h b/tests/auto/uic/baseline/downloads.ui.h index d96de72..dd960d2 100644 --- a/tests/auto/uic/baseline/downloads.ui.h +++ b/tests/auto/uic/baseline/downloads.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'downloads.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:13 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -126,7 +85,6 @@ public: DownloadDialog->setWindowTitle(QApplication::translate("DownloadDialog", "Downloads", 0, QApplication::UnicodeUTF8)); cleanupButton->setText(QApplication::translate("DownloadDialog", "Clean up", 0, QApplication::UnicodeUTF8)); itemCount->setText(QApplication::translate("DownloadDialog", "0 Items", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(DownloadDialog); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/embeddeddialog.ui.h b/tests/auto/uic/baseline/embeddeddialog.ui.h index 71f908d..a6cfbb1 100644 --- a/tests/auto/uic/baseline/embeddeddialog.ui.h +++ b/tests/auto/uic/baseline/embeddeddialog.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'embeddeddialog.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:13 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -150,7 +109,6 @@ public: label_2->setText(QApplication::translate("embeddedDialog", "Select Font:", 0, QApplication::UnicodeUTF8)); label_3->setText(QApplication::translate("embeddedDialog", "Style:", 0, QApplication::UnicodeUTF8)); label_4->setText(QApplication::translate("embeddedDialog", "Layout spacing:", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(embeddedDialog); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/filespage.ui.h b/tests/auto/uic/baseline/filespage.ui.h index fad4ea3..12d8554 100644 --- a/tests/auto/uic/baseline/filespage.ui.h +++ b/tests/auto/uic/baseline/filespage.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'filespage.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:13 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -129,7 +88,6 @@ public: fileLabel->setText(QApplication::translate("FilesPage", "Files:", 0, QApplication::UnicodeUTF8)); removeButton->setText(QApplication::translate("FilesPage", "Remove", 0, QApplication::UnicodeUTF8)); removeAllButton->setText(QApplication::translate("FilesPage", "Remove All", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(FilesPage); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/filternamedialog.ui.h b/tests/auto/uic/baseline/filternamedialog.ui.h index d3794f0..163a6d2 100644 --- a/tests/auto/uic/baseline/filternamedialog.ui.h +++ b/tests/auto/uic/baseline/filternamedialog.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'filternamedialog.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:13 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -123,7 +82,6 @@ public: { FilterNameDialogClass->setWindowTitle(QApplication::translate("FilterNameDialogClass", "FilterNameDialog", 0, QApplication::UnicodeUTF8)); label->setText(QApplication::translate("FilterNameDialogClass", "Filter Name:", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(FilterNameDialogClass); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/filterpage.ui.h b/tests/auto/uic/baseline/filterpage.ui.h index 10b64de..f3a2268 100644 --- a/tests/auto/uic/baseline/filterpage.ui.h +++ b/tests/auto/uic/baseline/filterpage.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'filterpage.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:13 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -155,7 +114,6 @@ public: ___qtreewidgetitem->setText(0, QApplication::translate("FilterPage", "1", 0, QApplication::UnicodeUTF8)); addButton->setText(QApplication::translate("FilterPage", "Add", 0, QApplication::UnicodeUTF8)); removeButton->setText(QApplication::translate("FilterPage", "Remove", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(FilterPage); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/finddialog.ui.h b/tests/auto/uic/baseline/finddialog.ui.h index 2c82b2f..56f810b 100644 --- a/tests/auto/uic/baseline/finddialog.ui.h +++ b/tests/auto/uic/baseline/finddialog.ui.h @@ -44,7 +44,7 @@ /******************************************************************************** ** Form generated from reading UI file 'finddialog.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:13 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -242,7 +242,6 @@ public: cancel->setWhatsThis(QApplication::translate("FindDialog", "Click here to close this window.", 0, QApplication::UnicodeUTF8)); #endif // QT_NO_WHATSTHIS cancel->setText(QApplication::translate("FindDialog", "Cancel", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(FindDialog); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/form.ui.h b/tests/auto/uic/baseline/form.ui.h index 61c8b43..da2cecb 100644 --- a/tests/auto/uic/baseline/form.ui.h +++ b/tests/auto/uic/baseline/form.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'form.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:13 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -171,7 +130,6 @@ public: WorldTimeForm->setWindowTitle(QApplication::translate("WorldTimeForm", "World Time Clock", 0, QApplication::UnicodeUTF8)); label->setText(QApplication::translate("WorldTimeForm", "Current time:", 0, QApplication::UnicodeUTF8)); label_2->setText(QApplication::translate("WorldTimeForm", "Set time zone:", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(WorldTimeForm); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/formwindowsettings.ui.h b/tests/auto/uic/baseline/formwindowsettings.ui.h index 8836e6f..a35bd21 100644 --- a/tests/auto/uic/baseline/formwindowsettings.ui.h +++ b/tests/auto/uic/baseline/formwindowsettings.ui.h @@ -44,7 +44,7 @@ /******************************************************************************** ** Form generated from reading UI file 'formwindowsettings.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:13 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -299,7 +299,6 @@ public: includeHintsGroupBox->setTitle(QApplication::translate("FormWindowSettings", "&Include Hints", 0, QApplication::UnicodeUTF8)); pixmapFunctionGroupBox->setTitle(QApplication::translate("FormWindowSettings", "&Pixmap Function", 0, QApplication::UnicodeUTF8)); gridPanel->setTitle(QApplication::translate("FormWindowSettings", "Grid", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(FormWindowSettings); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/generalpage.ui.h b/tests/auto/uic/baseline/generalpage.ui.h index e758f94..ecad723 100644 --- a/tests/auto/uic/baseline/generalpage.ui.h +++ b/tests/auto/uic/baseline/generalpage.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'generalpage.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:13 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -121,7 +80,6 @@ public: GeneralPage->setWindowTitle(QApplication::translate("GeneralPage", "Form", 0, QApplication::UnicodeUTF8)); label->setText(QApplication::translate("GeneralPage", "Namespace:", 0, QApplication::UnicodeUTF8)); label_2->setText(QApplication::translate("GeneralPage", "Virtual Folder:", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(GeneralPage); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/gridpanel.ui.h b/tests/auto/uic/baseline/gridpanel.ui.h index 4cdf966..e60e22d 100644 --- a/tests/auto/uic/baseline/gridpanel.ui.h +++ b/tests/auto/uic/baseline/gridpanel.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'gridpanel.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:13 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -185,7 +144,6 @@ public: m_resetButton->setText(QApplication::translate("qdesigner_internal::GridPanel", "Reset", 0, QApplication::UnicodeUTF8)); label_2->setText(QApplication::translate("qdesigner_internal::GridPanel", "Grid &Y", 0, QApplication::UnicodeUTF8)); m_snapYCheckBox->setText(QApplication::translate("qdesigner_internal::GridPanel", "Snap", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(qdesigner_internal__GridPanel); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/helpdialog.ui.h b/tests/auto/uic/baseline/helpdialog.ui.h index c53c08c..2b2cb45 100644 --- a/tests/auto/uic/baseline/helpdialog.ui.h +++ b/tests/auto/uic/baseline/helpdialog.ui.h @@ -44,7 +44,7 @@ /******************************************************************************** ** Form generated from reading UI file 'helpdialog.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:13 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -383,7 +383,6 @@ public: searchButton->setText(QApplication::translate("HelpDialog", "&Search", 0, QApplication::UnicodeUTF8)); tabWidget->setTabText(tabWidget->indexOf(searchPage), QApplication::translate("HelpDialog", "&Search", 0, QApplication::UnicodeUTF8)); labelPrepare->setText(QApplication::translate("HelpDialog", "Preparing...", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(HelpDialog); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/history.ui.h b/tests/auto/uic/baseline/history.ui.h index c84dde8..8787279 100644 --- a/tests/auto/uic/baseline/history.ui.h +++ b/tests/auto/uic/baseline/history.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'history.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:13 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -138,7 +97,6 @@ public: HistoryDialog->setWindowTitle(QApplication::translate("HistoryDialog", "History", 0, QApplication::UnicodeUTF8)); removeButton->setText(QApplication::translate("HistoryDialog", "&Remove", 0, QApplication::UnicodeUTF8)); removeAllButton->setText(QApplication::translate("HistoryDialog", "Remove &All", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(HistoryDialog); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/identifierpage.ui.h b/tests/auto/uic/baseline/identifierpage.ui.h index 198d8e5..d7e9cee 100644 --- a/tests/auto/uic/baseline/identifierpage.ui.h +++ b/tests/auto/uic/baseline/identifierpage.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'identifierpage.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:13 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -138,7 +97,6 @@ public: identifierCheckBox->setText(QApplication::translate("IdentifierPage", "Create identifiers", 0, QApplication::UnicodeUTF8)); globalButton->setText(QApplication::translate("IdentifierPage", "Global prefix:", 0, QApplication::UnicodeUTF8)); fileNameButton->setText(QApplication::translate("IdentifierPage", "Inherit prefix from file names", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(IdentifierPage); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/imagedialog.ui.h b/tests/auto/uic/baseline/imagedialog.ui.h index f01430c..8011a22 100644 --- a/tests/auto/uic/baseline/imagedialog.ui.h +++ b/tests/auto/uic/baseline/imagedialog.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'imagedialog.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:13 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -249,7 +208,6 @@ public: colorDepthLabel->setText(QApplication::translate("ImageDialog", "Color depth:", 0, QApplication::UnicodeUTF8)); okButton->setText(QApplication::translate("ImageDialog", "OK", 0, QApplication::UnicodeUTF8)); cancelButton->setText(QApplication::translate("ImageDialog", "Cancel", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(dialog); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/inputpage.ui.h b/tests/auto/uic/baseline/inputpage.ui.h index 163f47a..0ca3cce 100644 --- a/tests/auto/uic/baseline/inputpage.ui.h +++ b/tests/auto/uic/baseline/inputpage.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'inputpage.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:13 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -129,7 +88,6 @@ public: InputPage->setWindowTitle(QApplication::translate("InputPage", "Form", 0, QApplication::UnicodeUTF8)); label->setText(QApplication::translate("InputPage", "File name:", 0, QApplication::UnicodeUTF8)); browseButton->setText(QApplication::translate("InputPage", "...", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(InputPage); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/installdialog.ui.h b/tests/auto/uic/baseline/installdialog.ui.h index 3731686..9228e08 100644 --- a/tests/auto/uic/baseline/installdialog.ui.h +++ b/tests/auto/uic/baseline/installdialog.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'installdialog.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:13 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -172,7 +131,6 @@ public: closeButton->setText(QApplication::translate("InstallDialog", "Close", 0, QApplication::UnicodeUTF8)); label_4->setText(QApplication::translate("InstallDialog", "Installation Path:", 0, QApplication::UnicodeUTF8)); browseButton->setText(QApplication::translate("InstallDialog", "...", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(InstallDialog); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/languagesdialog.ui.h b/tests/auto/uic/baseline/languagesdialog.ui.h index 9ea8b79..5062775 100644 --- a/tests/auto/uic/baseline/languagesdialog.ui.h +++ b/tests/auto/uic/baseline/languagesdialog.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'languagesdialog.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:13 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -184,7 +143,6 @@ public: #endif // QT_NO_TOOLTIP openFileButton->setText(QApplication::translate("LanguagesDialog", "...", 0, QApplication::UnicodeUTF8)); okButton->setText(QApplication::translate("LanguagesDialog", "OK", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(LanguagesDialog); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/listwidgeteditor.ui.h b/tests/auto/uic/baseline/listwidgeteditor.ui.h index de4ee75..6600d41 100644 --- a/tests/auto/uic/baseline/listwidgeteditor.ui.h +++ b/tests/auto/uic/baseline/listwidgeteditor.ui.h @@ -44,7 +44,7 @@ /******************************************************************************** ** Form generated from reading UI file 'listwidgeteditor.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:13 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -211,7 +211,6 @@ public: #endif // QT_NO_TOOLTIP moveItemDownButton->setText(QApplication::translate("qdesigner_internal::ListWidgetEditor", "D", 0, QApplication::UnicodeUTF8)); label->setText(QApplication::translate("qdesigner_internal::ListWidgetEditor", "Icon", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(qdesigner_internal__ListWidgetEditor); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/mainwindow.ui.h b/tests/auto/uic/baseline/mainwindow.ui.h index b450b90..ae0a45d 100644 --- a/tests/auto/uic/baseline/mainwindow.ui.h +++ b/tests/auto/uic/baseline/mainwindow.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'mainwindow.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:13 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! diff --git a/tests/auto/uic/baseline/mainwindowbase.ui.h b/tests/auto/uic/baseline/mainwindowbase.ui.h index 39dc5ef..82e5dc4 100644 --- a/tests/auto/uic/baseline/mainwindowbase.ui.h +++ b/tests/auto/uic/baseline/mainwindowbase.ui.h @@ -44,7 +44,7 @@ /******************************************************************************** ** Form generated from reading UI file 'mainwindowbase.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:14 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! diff --git a/tests/auto/uic/baseline/mydialog.ui.h b/tests/auto/uic/baseline/mydialog.ui.h index b07f8f3..6114cc3 100644 --- a/tests/auto/uic/baseline/mydialog.ui.h +++ b/tests/auto/uic/baseline/mydialog.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'mydialog.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:14 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -106,7 +65,6 @@ public: aLabel->setText(QApplication::translate("MyDialog", "Join the life in the fastlane; - PCH enable your project today! -", 0, QApplication::UnicodeUTF8)); aButton->setText(QApplication::translate("MyDialog", "&Quit", 0, QApplication::UnicodeUTF8)); aButton->setShortcut(QApplication::translate("MyDialog", "Alt+Q", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(MyDialog); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/myform.ui.h b/tests/auto/uic/baseline/myform.ui.h index d8e3496..99e1cda 100644 --- a/tests/auto/uic/baseline/myform.ui.h +++ b/tests/auto/uic/baseline/myform.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'myform.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:14 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -176,7 +135,6 @@ public: radioButton_4->setText(QApplication::translate("Form", "PD&F", 0, QApplication::UnicodeUTF8)); checkBox_3->setText(QApplication::translate("Form", "Include &metadata", 0, QApplication::UnicodeUTF8)); checkBox_4->setText(QApplication::translate("Form", "Create inde&x", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(Form); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/newactiondialog.ui.h b/tests/auto/uic/baseline/newactiondialog.ui.h index 5bc0caa..cb95793 100644 --- a/tests/auto/uic/baseline/newactiondialog.ui.h +++ b/tests/auto/uic/baseline/newactiondialog.ui.h @@ -44,7 +44,7 @@ /******************************************************************************** ** Form generated from reading UI file 'newactiondialog.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:14 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -180,7 +180,6 @@ public: label->setText(QApplication::translate("qdesigner_internal::NewActionDialog", "&Text:", 0, QApplication::UnicodeUTF8)); label_3->setText(QApplication::translate("qdesigner_internal::NewActionDialog", "Object &name:", 0, QApplication::UnicodeUTF8)); label_2->setText(QApplication::translate("qdesigner_internal::NewActionDialog", "&Icon:", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(qdesigner_internal__NewActionDialog); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/newdynamicpropertydialog.ui.h b/tests/auto/uic/baseline/newdynamicpropertydialog.ui.h index 37b9feb..9aafed4 100644 --- a/tests/auto/uic/baseline/newdynamicpropertydialog.ui.h +++ b/tests/auto/uic/baseline/newdynamicpropertydialog.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'newdynamicpropertydialog.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:14 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -156,7 +115,6 @@ public: qdesigner_internal__NewDynamicPropertyDialog->setWindowTitle(QApplication::translate("qdesigner_internal::NewDynamicPropertyDialog", "Create Dynamic Property", 0, QApplication::UnicodeUTF8)); label->setText(QApplication::translate("qdesigner_internal::NewDynamicPropertyDialog", "Property Name", 0, QApplication::UnicodeUTF8)); label_2->setText(QApplication::translate("qdesigner_internal::NewDynamicPropertyDialog", "Property Type", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(qdesigner_internal__NewDynamicPropertyDialog); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/newform.ui.h b/tests/auto/uic/baseline/newform.ui.h index c46634a..07ebebc 100644 --- a/tests/auto/uic/baseline/newform.ui.h +++ b/tests/auto/uic/baseline/newform.ui.h @@ -44,7 +44,7 @@ /******************************************************************************** ** Form generated from reading UI file 'newform.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:14 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -153,7 +153,6 @@ public: ___qtreewidgetitem->setText(0, QApplication::translate("NewForm", "0", 0, QApplication::UnicodeUTF8)); lblPreview->setText(QApplication::translate("NewForm", "Choose a template for a preview", 0, QApplication::UnicodeUTF8)); chkShowOnStartup->setText(QApplication::translate("NewForm", "Show this Dialog on Startup", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(NewForm); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/orderdialog.ui.h b/tests/auto/uic/baseline/orderdialog.ui.h index 36c884a..4608d37 100644 --- a/tests/auto/uic/baseline/orderdialog.ui.h +++ b/tests/auto/uic/baseline/orderdialog.ui.h @@ -44,7 +44,7 @@ /******************************************************************************** ** Form generated from reading UI file 'orderdialog.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:14 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -155,7 +155,6 @@ public: #ifndef QT_NO_TOOLTIP downButton->setToolTip(QApplication::translate("qdesigner_internal::OrderDialog", "Move page down", 0, QApplication::UnicodeUTF8)); #endif // QT_NO_TOOLTIP - Q_UNUSED(qdesigner_internal__OrderDialog); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/outputpage.ui.h b/tests/auto/uic/baseline/outputpage.ui.h index 6884679..b10101f 100644 --- a/tests/auto/uic/baseline/outputpage.ui.h +++ b/tests/auto/uic/baseline/outputpage.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'outputpage.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:14 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -135,7 +94,6 @@ public: OutputPage->setWindowTitle(QApplication::translate("OutputPage", "Form", 0, QApplication::UnicodeUTF8)); label->setText(QApplication::translate("OutputPage", "Project file name:", 0, QApplication::UnicodeUTF8)); label_2->setText(QApplication::translate("OutputPage", "Collection file name:", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(OutputPage); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/pagefold.ui.h b/tests/auto/uic/baseline/pagefold.ui.h index 053b061..3efad22 100644 --- a/tests/auto/uic/baseline/pagefold.ui.h +++ b/tests/auto/uic/baseline/pagefold.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'pagefold.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:14 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! diff --git a/tests/auto/uic/baseline/paletteeditor.ui.h b/tests/auto/uic/baseline/paletteeditor.ui.h index 7e4d970..4bd2384 100644 --- a/tests/auto/uic/baseline/paletteeditor.ui.h +++ b/tests/auto/uic/baseline/paletteeditor.ui.h @@ -44,7 +44,7 @@ /******************************************************************************** ** Form generated from reading UI file 'paletteeditor.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:14 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -223,7 +223,6 @@ public: disabledRadio->setText(QApplication::translate("qdesigner_internal::PaletteEditor", "Disabled", 0, QApplication::UnicodeUTF8)); inactiveRadio->setText(QApplication::translate("qdesigner_internal::PaletteEditor", "Inactive", 0, QApplication::UnicodeUTF8)); activeRadio->setText(QApplication::translate("qdesigner_internal::PaletteEditor", "Active", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(qdesigner_internal__PaletteEditor); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/paletteeditoradvancedbase.ui.h b/tests/auto/uic/baseline/paletteeditoradvancedbase.ui.h index d9733d2..557e95c 100644 --- a/tests/auto/uic/baseline/paletteeditoradvancedbase.ui.h +++ b/tests/auto/uic/baseline/paletteeditoradvancedbase.ui.h @@ -44,7 +44,7 @@ /******************************************************************************** ** Form generated from reading UI file 'paletteeditoradvancedbase.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:14 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -428,7 +428,6 @@ public: #ifndef QT_NO_WHATSTHIS buttonCancel->setProperty("whatsThis", QVariant(QApplication::translate("PaletteEditorAdvancedBase", "Close dialog and discard all changes.", 0, QApplication::UnicodeUTF8))); #endif // QT_NO_WHATSTHIS - Q_UNUSED(PaletteEditorAdvancedBase); } // retranslateUi diff --git a/tests/auto/uic/baseline/passworddialog.ui.h b/tests/auto/uic/baseline/passworddialog.ui.h index 67e522c..1cf2efc 100644 --- a/tests/auto/uic/baseline/passworddialog.ui.h +++ b/tests/auto/uic/baseline/passworddialog.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'passworddialog.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:14 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -148,7 +107,6 @@ public: introLabel->setText(QApplication::translate("PasswordDialog", "INTRO TEXT DUMMY", 0, QApplication::UnicodeUTF8)); label->setText(QApplication::translate("PasswordDialog", "Username:", 0, QApplication::UnicodeUTF8)); lblPassword->setText(QApplication::translate("PasswordDialog", "Password:", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(PasswordDialog); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/pathpage.ui.h b/tests/auto/uic/baseline/pathpage.ui.h index ca1f1a0..cc7a990 100644 --- a/tests/auto/uic/baseline/pathpage.ui.h +++ b/tests/auto/uic/baseline/pathpage.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'pathpage.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:14 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -154,7 +113,6 @@ public: label->setText(QApplication::translate("PathPage", "Documentation source file paths:", 0, QApplication::UnicodeUTF8)); addButton->setText(QApplication::translate("PathPage", "Add", 0, QApplication::UnicodeUTF8)); removeButton->setText(QApplication::translate("PathPage", "Remove", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(PathPage); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/phrasebookbox.ui.h b/tests/auto/uic/baseline/phrasebookbox.ui.h index 5ca3425..75438cf 100644 --- a/tests/auto/uic/baseline/phrasebookbox.ui.h +++ b/tests/auto/uic/baseline/phrasebookbox.ui.h @@ -44,7 +44,7 @@ /******************************************************************************** ** Form generated from reading UI file 'phrasebookbox.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:14 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -232,7 +232,6 @@ public: closeBut->setWhatsThis(QApplication::translate("PhraseBookBox", "Click here to close this window.", 0, QApplication::UnicodeUTF8)); #endif // QT_NO_WHATSTHIS closeBut->setText(QApplication::translate("PhraseBookBox", "Close", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(PhraseBookBox); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/plugindialog.ui.h b/tests/auto/uic/baseline/plugindialog.ui.h index c140fbc..8c69d7c 100644 --- a/tests/auto/uic/baseline/plugindialog.ui.h +++ b/tests/auto/uic/baseline/plugindialog.ui.h @@ -44,7 +44,7 @@ /******************************************************************************** ** Form generated from reading UI file 'plugindialog.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:14 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -132,7 +132,6 @@ public: QTreeWidgetItem *___qtreewidgetitem = treeWidget->headerItem(); ___qtreewidgetitem->setText(0, QApplication::translate("PluginDialog", "1", 0, QApplication::UnicodeUTF8)); message->setText(QApplication::translate("PluginDialog", "TextLabel", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(PluginDialog); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/preferencesdialog.ui.h b/tests/auto/uic/baseline/preferencesdialog.ui.h index 5a231c7..33b7e68 100644 --- a/tests/auto/uic/baseline/preferencesdialog.ui.h +++ b/tests/auto/uic/baseline/preferencesdialog.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'preferencesdialog.ui' ** -** Created: Tue Aug 18 19:03:32 2009 +** Created: Fri Sep 4 10:17:14 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -200,7 +159,6 @@ public: m_templatePathGroupBox->setTitle(QApplication::translate("PreferencesDialog", "Additional Template Paths", 0, QApplication::UnicodeUTF8)); m_addTemplatePathButton->setText(QApplication::translate("PreferencesDialog", "...", 0, QApplication::UnicodeUTF8)); m_removeTemplatePathButton->setText(QApplication::translate("PreferencesDialog", "...", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(PreferencesDialog); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/previewconfigurationwidget.ui.h b/tests/auto/uic/baseline/previewconfigurationwidget.ui.h index db1c749..951792d 100644 --- a/tests/auto/uic/baseline/previewconfigurationwidget.ui.h +++ b/tests/auto/uic/baseline/previewconfigurationwidget.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'previewconfigurationwidget.ui' ** -** Created: Tue Aug 18 19:03:32 2009 +** Created: Fri Sep 4 10:17:14 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -161,7 +120,6 @@ public: m_appStyleSheetClearButton->setText(QApplication::translate("PreviewConfigurationWidget", "...", 0, QApplication::UnicodeUTF8)); m_skinLabel->setText(QApplication::translate("PreviewConfigurationWidget", "Device skin", 0, QApplication::UnicodeUTF8)); m_skinRemoveButton->setText(QApplication::translate("PreviewConfigurationWidget", "...", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(PreviewConfigurationWidget); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/previewdialogbase.ui.h b/tests/auto/uic/baseline/previewdialogbase.ui.h index 76ea5b5..4fe4501 100644 --- a/tests/auto/uic/baseline/previewdialogbase.ui.h +++ b/tests/auto/uic/baseline/previewdialogbase.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'previewdialogbase.ui' ** -** Created: Tue Aug 18 19:03:32 2009 +** Created: Fri Sep 4 10:17:14 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -219,7 +178,6 @@ public: label_2->setText(QApplication::translate("PreviewDialogBase", "&Orientation:", 0, QApplication::UnicodeUTF8)); QTreeWidgetItem *___qtreewidgetitem = pageList->headerItem(); ___qtreewidgetitem->setText(0, QApplication::translate("PreviewDialogBase", "1", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(PreviewDialogBase); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/previewwidget.ui.h b/tests/auto/uic/baseline/previewwidget.ui.h index c49bd4a..1357435 100644 --- a/tests/auto/uic/baseline/previewwidget.ui.h +++ b/tests/auto/uic/baseline/previewwidget.ui.h @@ -44,7 +44,7 @@ /******************************************************************************** ** Form generated from reading UI file 'previewwidget.ui' ** -** Created: Tue Aug 18 19:03:32 2009 +** Created: Fri Sep 4 10:17:14 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -265,7 +265,6 @@ public: RadioButton1->setText(QApplication::translate("qdesigner_internal::PreviewWidget", "RadioButton1", 0, QApplication::UnicodeUTF8)); RadioButton2->setText(QApplication::translate("qdesigner_internal::PreviewWidget", "RadioButton2", 0, QApplication::UnicodeUTF8)); RadioButton3->setText(QApplication::translate("qdesigner_internal::PreviewWidget", "RadioButton3", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(qdesigner_internal__PreviewWidget); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/previewwidgetbase.ui.h b/tests/auto/uic/baseline/previewwidgetbase.ui.h index 4acf569..66e72bd 100644 --- a/tests/auto/uic/baseline/previewwidgetbase.ui.h +++ b/tests/auto/uic/baseline/previewwidgetbase.ui.h @@ -44,7 +44,7 @@ /******************************************************************************** ** Form generated from reading UI file 'previewwidgetbase.ui' ** -** Created: Tue Aug 18 19:03:32 2009 +** Created: Fri Sep 4 10:17:14 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -303,7 +303,6 @@ public: "<p>\n" "<a href=\"http://www.kde.org\">http://www.kde.org</a>\n" "</p>", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(PreviewWidgetBase); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/proxy.ui.h b/tests/auto/uic/baseline/proxy.ui.h index 804ce8d..19822a8 100644 --- a/tests/auto/uic/baseline/proxy.ui.h +++ b/tests/auto/uic/baseline/proxy.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'proxy.ui' ** -** Created: Tue Aug 18 19:03:32 2009 +** Created: Fri Sep 4 10:17:14 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -137,7 +96,6 @@ public: introLabel->setText(QApplication::translate("ProxyDialog", "Connect to proxy", 0, QApplication::UnicodeUTF8)); usernameLabel->setText(QApplication::translate("ProxyDialog", "Username:", 0, QApplication::UnicodeUTF8)); passwordLabel->setText(QApplication::translate("ProxyDialog", "Password:", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(ProxyDialog); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/qfiledialog.ui.h b/tests/auto/uic/baseline/qfiledialog.ui.h index e04a3c3..91b000a 100644 --- a/tests/auto/uic/baseline/qfiledialog.ui.h +++ b/tests/auto/uic/baseline/qfiledialog.ui.h @@ -44,7 +44,7 @@ /******************************************************************************** ** Form generated from reading UI file 'qfiledialog.ui' ** -** Created: Tue Aug 18 19:03:32 2009 +** Created: Fri Sep 4 10:17:14 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! diff --git a/tests/auto/uic/baseline/qpagesetupwidget.ui.h b/tests/auto/uic/baseline/qpagesetupwidget.ui.h index ee33dc5..6d0a3b4 100644 --- a/tests/auto/uic/baseline/qpagesetupwidget.ui.h +++ b/tests/auto/uic/baseline/qpagesetupwidget.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'qpagesetupwidget.ui' ** -** Created: Tue Aug 18 19:03:32 2009 +** Created: Fri Sep 4 10:17:14 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -347,7 +306,6 @@ public: #ifndef QT_NO_ACCESSIBILITY bottomMargin->setAccessibleName(QApplication::translate("QPageSetupWidget", "bottom margin", 0, QApplication::UnicodeUTF8)); #endif // QT_NO_ACCESSIBILITY - Q_UNUSED(QPageSetupWidget); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/qprintpropertieswidget.ui.h b/tests/auto/uic/baseline/qprintpropertieswidget.ui.h index 1f1fa59..512fcec 100644 --- a/tests/auto/uic/baseline/qprintpropertieswidget.ui.h +++ b/tests/auto/uic/baseline/qprintpropertieswidget.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'qprintpropertieswidget.ui' ** -** Created: Tue Aug 18 19:03:32 2009 +** Created: Fri Sep 4 10:17:14 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -126,7 +85,6 @@ public: QPrintPropertiesWidget->setWindowTitle(QApplication::translate("QPrintPropertiesWidget", "Form", 0, QApplication::UnicodeUTF8)); tabs->setTabText(tabs->indexOf(tabPage), QApplication::translate("QPrintPropertiesWidget", "Page", 0, QApplication::UnicodeUTF8)); tabs->setTabText(tabs->indexOf(cupsPropertiesPage), QApplication::translate("QPrintPropertiesWidget", "Advanced", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(QPrintPropertiesWidget); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/qprintsettingsoutput.ui.h b/tests/auto/uic/baseline/qprintsettingsoutput.ui.h index 327a1f7..13ee6ee 100644 --- a/tests/auto/uic/baseline/qprintsettingsoutput.ui.h +++ b/tests/auto/uic/baseline/qprintsettingsoutput.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'qprintsettingsoutput.ui' ** -** Created: Tue Aug 18 19:03:32 2009 +** Created: Fri Sep 4 10:17:14 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -340,7 +299,6 @@ public: duplexLong->setText(QApplication::translate("QPrintSettingsOutput", "Long side", 0, QApplication::UnicodeUTF8)); duplexShort->setText(QApplication::translate("QPrintSettingsOutput", "Short side", 0, QApplication::UnicodeUTF8)); tabs->setTabText(tabs->indexOf(optionsTab), QApplication::translate("QPrintSettingsOutput", "Options", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(QPrintSettingsOutput); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/qprintwidget.ui.h b/tests/auto/uic/baseline/qprintwidget.ui.h index 70ef60d..4437935 100644 --- a/tests/auto/uic/baseline/qprintwidget.ui.h +++ b/tests/auto/uic/baseline/qprintwidget.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'qprintwidget.ui' ** -** Created: Tue Aug 18 19:03:32 2009 +** Created: Fri Sep 4 10:17:14 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -194,7 +153,6 @@ public: label_3->setText(QApplication::translate("QPrintWidget", "Type:", 0, QApplication::UnicodeUTF8)); lOutput->setText(QApplication::translate("QPrintWidget", "Output &file:", 0, QApplication::UnicodeUTF8)); fileBrowser->setText(QApplication::translate("QPrintWidget", "...", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(QPrintWidget); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/qsqlconnectiondialog.ui.h b/tests/auto/uic/baseline/qsqlconnectiondialog.ui.h index d52ef70..ed428fd 100644 --- a/tests/auto/uic/baseline/qsqlconnectiondialog.ui.h +++ b/tests/auto/uic/baseline/qsqlconnectiondialog.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'qsqlconnectiondialog.ui' ** -** Created: Tue Aug 18 19:03:32 2009 +** Created: Fri Sep 4 10:17:14 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -261,7 +220,6 @@ public: dbCheckBox->setText(QApplication::translate("QSqlConnectionDialogUi", "Us&e predefined in-memory database", 0, QApplication::UnicodeUTF8)); okButton->setText(QApplication::translate("QSqlConnectionDialogUi", "&OK", 0, QApplication::UnicodeUTF8)); cancelButton->setText(QApplication::translate("QSqlConnectionDialogUi", "&Cancel", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(QSqlConnectionDialogUi); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/qtgradientdialog.ui.h b/tests/auto/uic/baseline/qtgradientdialog.ui.h index f37606a..df41f89 100644 --- a/tests/auto/uic/baseline/qtgradientdialog.ui.h +++ b/tests/auto/uic/baseline/qtgradientdialog.ui.h @@ -44,7 +44,7 @@ /******************************************************************************** ** Form generated from reading UI file 'qtgradientdialog.ui' ** -** Created: Tue Aug 18 19:03:32 2009 +** Created: Fri Sep 4 10:17:14 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -107,7 +107,6 @@ public: void retranslateUi(QDialog *QtGradientDialog) { QtGradientDialog->setWindowTitle(QApplication::translate("QtGradientDialog", "Edit Gradient", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(QtGradientDialog); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/qtgradienteditor.ui.h b/tests/auto/uic/baseline/qtgradienteditor.ui.h index 35de439..d0c13bf 100644 --- a/tests/auto/uic/baseline/qtgradienteditor.ui.h +++ b/tests/auto/uic/baseline/qtgradienteditor.ui.h @@ -1,4 +1,5 @@ -/**************************************************************************** +/* +********************************************************************* ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) @@ -37,12 +38,13 @@ ** ** $QT_END_LICENSE$ ** -****************************************************************************/ +********************************************************************* +*/ /******************************************************************************** ** Form generated from reading UI file 'qtgradienteditor.ui' ** -** Created: Tue Aug 18 19:03:32 2009 +** Created: Fri Sep 4 10:17:14 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -711,7 +713,6 @@ public: reflectButton->setToolTip(QApplication::translate("QtGradientEditor", "Reflect Spread", 0, QApplication::UnicodeUTF8)); #endif // QT_NO_TOOLTIP reflectButton->setText(QApplication::translate("QtGradientEditor", "...", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(QtGradientEditor); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/qtgradientview.ui.h b/tests/auto/uic/baseline/qtgradientview.ui.h index 7f0993f..6787c8d 100644 --- a/tests/auto/uic/baseline/qtgradientview.ui.h +++ b/tests/auto/uic/baseline/qtgradientview.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'qtgradientview.ui' ** -** Created: Tue Aug 18 19:03:32 2009 +** Created: Fri Sep 4 10:17:14 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -155,7 +114,6 @@ public: editButton->setText(QApplication::translate("QtGradientView", "Edit...", 0, QApplication::UnicodeUTF8)); renameButton->setText(QApplication::translate("QtGradientView", "Rename", 0, QApplication::UnicodeUTF8)); removeButton->setText(QApplication::translate("QtGradientView", "Remove", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(QtGradientView); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/qtgradientviewdialog.ui.h b/tests/auto/uic/baseline/qtgradientviewdialog.ui.h index e67fffe..23adf0e 100644 --- a/tests/auto/uic/baseline/qtgradientviewdialog.ui.h +++ b/tests/auto/uic/baseline/qtgradientviewdialog.ui.h @@ -44,7 +44,7 @@ /******************************************************************************** ** Form generated from reading UI file 'qtgradientviewdialog.ui' ** -** Created: Tue Aug 18 19:03:32 2009 +** Created: Fri Sep 4 10:17:14 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -107,7 +107,6 @@ public: void retranslateUi(QDialog *QtGradientViewDialog) { QtGradientViewDialog->setWindowTitle(QApplication::translate("QtGradientViewDialog", "Select Gradient", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(QtGradientViewDialog); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/qtresourceeditordialog.ui.h b/tests/auto/uic/baseline/qtresourceeditordialog.ui.h index ce123fb..d434af7 100644 --- a/tests/auto/uic/baseline/qtresourceeditordialog.ui.h +++ b/tests/auto/uic/baseline/qtresourceeditordialog.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'qtresourceeditordialog.ui' ** -** Created: Tue Aug 18 19:03:32 2009 +** Created: Fri Sep 4 10:17:14 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -204,7 +163,6 @@ public: removeResourceButton->setToolTip(QApplication::translate("QtResourceEditorDialog", "Remove Resource or File", 0, QApplication::UnicodeUTF8)); #endif // QT_NO_TOOLTIP removeResourceButton->setText(QApplication::translate("QtResourceEditorDialog", "R", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(QtResourceEditorDialog); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/qttoolbardialog.ui.h b/tests/auto/uic/baseline/qttoolbardialog.ui.h index 9f3e671..35a40c3 100644 --- a/tests/auto/uic/baseline/qttoolbardialog.ui.h +++ b/tests/auto/uic/baseline/qttoolbardialog.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'qttoolbardialog.ui' ** -** Created: Tue Aug 18 19:03:32 2009 +** Created: Fri Sep 4 10:17:14 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -256,7 +215,6 @@ public: #endif // QT_NO_TOOLTIP downButton->setText(QApplication::translate("QtToolBarDialog", "Down", 0, QApplication::UnicodeUTF8)); label_3->setText(QApplication::translate("QtToolBarDialog", "Current Toolbar Actions", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(QtToolBarDialog); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/querywidget.ui.h b/tests/auto/uic/baseline/querywidget.ui.h index 67a58b3..c628457 100644 --- a/tests/auto/uic/baseline/querywidget.ui.h +++ b/tests/auto/uic/baseline/querywidget.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'querywidget.ui' ** -** Created: Tue Aug 18 19:03:32 2009 +** Created: Fri Sep 4 10:17:14 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -202,7 +161,6 @@ public: inputGroupBox->setTitle(QApplication::translate("QueryWidget", "Input Document", 0, QApplication::UnicodeUTF8)); queryGroupBox->setTitle(QApplication::translate("QueryWidget", "Select your query:", 0, QApplication::UnicodeUTF8)); outputGroupBox->setTitle(QApplication::translate("QueryWidget", "Output Document", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(QueryWidget); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/remotecontrol.ui.h b/tests/auto/uic/baseline/remotecontrol.ui.h index 53d31c7..b970fca 100644 --- a/tests/auto/uic/baseline/remotecontrol.ui.h +++ b/tests/auto/uic/baseline/remotecontrol.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'remotecontrol.ui' ** -** Created: Tue Aug 18 19:03:32 2009 +** Created: Fri Sep 4 10:17:14 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! diff --git a/tests/auto/uic/baseline/saveformastemplate.ui.h b/tests/auto/uic/baseline/saveformastemplate.ui.h index d098c78..08d5983 100644 --- a/tests/auto/uic/baseline/saveformastemplate.ui.h +++ b/tests/auto/uic/baseline/saveformastemplate.ui.h @@ -44,7 +44,7 @@ /******************************************************************************** ** Form generated from reading UI file 'saveformastemplate.ui' ** -** Created: Tue Aug 18 19:03:32 2009 +** Created: Fri Sep 4 10:17:14 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -152,7 +152,6 @@ public: label->setText(QApplication::translate("SaveFormAsTemplate", "&Name:", 0, QApplication::UnicodeUTF8)); templateNameEdit->setText(QString()); label_2->setText(QApplication::translate("SaveFormAsTemplate", "&Category:", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(SaveFormAsTemplate); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/settings.ui.h b/tests/auto/uic/baseline/settings.ui.h index 1f49d9a..e09b7df 100644 --- a/tests/auto/uic/baseline/settings.ui.h +++ b/tests/auto/uic/baseline/settings.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'settings.ui' ** -** Created: Tue Aug 18 19:03:32 2009 +** Created: Fri Sep 4 10:17:14 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -234,7 +193,6 @@ public: label_3->setText(QApplication::translate("Dialog", "-10 Sec", 0, QApplication::UnicodeUTF8)); label_5->setText(QApplication::translate("Dialog", "0", 0, QApplication::UnicodeUTF8)); label_4->setText(QApplication::translate("Dialog", "10 Sec", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(Dialog); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/signalslotdialog.ui.h b/tests/auto/uic/baseline/signalslotdialog.ui.h index 75cbd62..7bbe74c 100644 --- a/tests/auto/uic/baseline/signalslotdialog.ui.h +++ b/tests/auto/uic/baseline/signalslotdialog.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'signalslotdialog.ui' ** -** Created: Tue Aug 18 19:03:32 2009 +** Created: Fri Sep 4 10:17:14 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -197,7 +156,6 @@ public: removeSignalButton->setToolTip(QApplication::translate("SignalSlotDialogClass", "Delete", 0, QApplication::UnicodeUTF8)); #endif // QT_NO_TOOLTIP removeSignalButton->setText(QApplication::translate("SignalSlotDialogClass", "...", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(SignalSlotDialogClass); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/sslclient.ui.h b/tests/auto/uic/baseline/sslclient.ui.h index 68585fe..ef32462 100644 --- a/tests/auto/uic/baseline/sslclient.ui.h +++ b/tests/auto/uic/baseline/sslclient.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'sslclient.ui' ** -** Created: Tue Aug 18 19:03:32 2009 +** Created: Fri Sep 4 10:17:14 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -212,7 +171,6 @@ public: "<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"></p></body></html>", 0, QApplication::UnicodeUTF8)); sessionInputLabel->setText(QApplication::translate("Form", "Input:", 0, QApplication::UnicodeUTF8)); sendButton->setText(QApplication::translate("Form", "&Send", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(Form); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/sslerrors.ui.h b/tests/auto/uic/baseline/sslerrors.ui.h index 82486b7..ef83595 100644 --- a/tests/auto/uic/baseline/sslerrors.ui.h +++ b/tests/auto/uic/baseline/sslerrors.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'sslerrors.ui' ** -** Created: Tue Aug 18 19:03:32 2009 +** Created: Fri Sep 4 10:17:14 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -139,7 +98,6 @@ public: certificateChainButton->setText(QApplication::translate("SslErrors", "View Certificate Chain", 0, QApplication::UnicodeUTF8)); pushButton->setText(QApplication::translate("SslErrors", "Ignore", 0, QApplication::UnicodeUTF8)); pushButton_2->setText(QApplication::translate("SslErrors", "Cancel", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(SslErrors); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/statistics.ui.h b/tests/auto/uic/baseline/statistics.ui.h index 9e0336b..baab39b 100644 --- a/tests/auto/uic/baseline/statistics.ui.h +++ b/tests/auto/uic/baseline/statistics.ui.h @@ -44,7 +44,7 @@ /******************************************************************************** ** Form generated from reading UI file 'statistics.ui' ** -** Created: Tue Aug 18 19:03:32 2009 +** Created: Fri Sep 4 10:17:14 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -209,7 +209,6 @@ public: textLabel6->setText(QApplication::translate("Statistics", "Characters (with spaces):", 0, QApplication::UnicodeUTF8)); trCharsSpc->setText(QApplication::translate("Statistics", "0", 0, QApplication::UnicodeUTF8)); untrCharsSpc->setText(QApplication::translate("Statistics", "0", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(Statistics); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/stringlisteditor.ui.h b/tests/auto/uic/baseline/stringlisteditor.ui.h index cbe3cd5..9d86eba 100644 --- a/tests/auto/uic/baseline/stringlisteditor.ui.h +++ b/tests/auto/uic/baseline/stringlisteditor.ui.h @@ -44,7 +44,7 @@ /******************************************************************************** ** Form generated from reading UI file 'stringlisteditor.ui' ** -** Created: Tue Aug 18 19:03:32 2009 +** Created: Fri Sep 4 10:17:14 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -250,7 +250,6 @@ public: downButton->setToolTip(QApplication::translate("qdesigner_internal::Dialog", "Move String Down", 0, QApplication::UnicodeUTF8)); #endif // QT_NO_TOOLTIP downButton->setText(QApplication::translate("qdesigner_internal::Dialog", "Down", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(qdesigner_internal__Dialog); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/stylesheeteditor.ui.h b/tests/auto/uic/baseline/stylesheeteditor.ui.h index 2e6a3b2..ea635a1 100644 --- a/tests/auto/uic/baseline/stylesheeteditor.ui.h +++ b/tests/auto/uic/baseline/stylesheeteditor.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'stylesheeteditor.ui' ** -** Created: Tue Aug 18 19:03:32 2009 +** Created: Fri Sep 4 10:17:14 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -182,7 +141,6 @@ public: label_7->setText(QApplication::translate("StyleSheetEditor", "Style:", 0, QApplication::UnicodeUTF8)); applyButton->setText(QApplication::translate("StyleSheetEditor", "&Apply", 0, QApplication::UnicodeUTF8)); label_8->setText(QApplication::translate("StyleSheetEditor", "Style Sheet:", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(StyleSheetEditor); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/tabbedbrowser.ui.h b/tests/auto/uic/baseline/tabbedbrowser.ui.h index d188a2e..0062569 100644 --- a/tests/auto/uic/baseline/tabbedbrowser.ui.h +++ b/tests/auto/uic/baseline/tabbedbrowser.ui.h @@ -44,7 +44,7 @@ /******************************************************************************** ** Form generated from reading UI file 'tabbedbrowser.ui' ** -** Created: Tue Aug 18 19:03:32 2009 +** Created: Fri Sep 4 10:17:15 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -205,7 +205,6 @@ public: checkCase->setText(QApplication::translate("TabbedBrowser", "Case Sensitive", 0, QApplication::UnicodeUTF8)); checkWholeWords->setText(QApplication::translate("TabbedBrowser", "Whole words", 0, QApplication::UnicodeUTF8)); labelWrapped->setText(QApplication::translate("TabbedBrowser", "<img src=\":/trolltech/assistant/images/wrap.png\"> Search wrapped", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(TabbedBrowser); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/tablewidgeteditor.ui.h b/tests/auto/uic/baseline/tablewidgeteditor.ui.h index 6d79a34..5e7c8a0 100644 --- a/tests/auto/uic/baseline/tablewidgeteditor.ui.h +++ b/tests/auto/uic/baseline/tablewidgeteditor.ui.h @@ -44,7 +44,7 @@ /******************************************************************************** ** Form generated from reading UI file 'tablewidgeteditor.ui' ** -** Created: Tue Aug 18 19:03:32 2009 +** Created: Fri Sep 4 10:17:15 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -375,7 +375,6 @@ public: #endif // QT_NO_TOOLTIP moveRowDownButton->setText(QApplication::translate("qdesigner_internal::TableWidgetEditor", "D", 0, QApplication::UnicodeUTF8)); label_2->setText(QApplication::translate("qdesigner_internal::TableWidgetEditor", "Icon", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(qdesigner_internal__TableWidgetEditor); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/tetrixwindow.ui.h b/tests/auto/uic/baseline/tetrixwindow.ui.h index 6f3d939..cd2f2cf 100644 --- a/tests/auto/uic/baseline/tetrixwindow.ui.h +++ b/tests/auto/uic/baseline/tetrixwindow.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'tetrixwindow.ui' ** -** Created: Tue Aug 18 19:03:32 2009 +** Created: Fri Sep 4 10:17:15 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -201,7 +160,6 @@ public: scoreLabel->setText(QApplication::translate("TetrixWindow", "SCORE", 0, QApplication::UnicodeUTF8)); nextPieceLabel->setText(QString()); quitButton->setText(QApplication::translate("TetrixWindow", "&Quit", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(TetrixWindow); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/textfinder.ui.h b/tests/auto/uic/baseline/textfinder.ui.h index ffffc02..2b21412 100644 --- a/tests/auto/uic/baseline/textfinder.ui.h +++ b/tests/auto/uic/baseline/textfinder.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'textfinder.ui' ** -** Created: Tue Aug 18 19:03:32 2009 +** Created: Fri Sep 4 10:17:15 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -141,7 +100,6 @@ public: Form->setWindowTitle(QApplication::translate("Form", "Find Text", 0, QApplication::UnicodeUTF8)); searchLabel->setText(QApplication::translate("Form", "&Keyword:", 0, QApplication::UnicodeUTF8)); findButton->setText(QApplication::translate("Form", "&Find", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(Form); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/topicchooser.ui.h b/tests/auto/uic/baseline/topicchooser.ui.h index a0cc2f7..04ceede 100644 --- a/tests/auto/uic/baseline/topicchooser.ui.h +++ b/tests/auto/uic/baseline/topicchooser.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'topicchooser.ui' ** -** Created: Tue Aug 18 19:03:32 2009 +** Created: Fri Sep 4 10:17:15 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -147,7 +106,6 @@ public: label->setText(QApplication::translate("TopicChooser", "&Topics", 0, QApplication::UnicodeUTF8)); buttonDisplay->setText(QApplication::translate("TopicChooser", "&Display", 0, QApplication::UnicodeUTF8)); buttonCancel->setText(QApplication::translate("TopicChooser", "&Close", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(TopicChooser); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/translatedialog.ui.h b/tests/auto/uic/baseline/translatedialog.ui.h index b4c1fb8..d8f340e 100644 --- a/tests/auto/uic/baseline/translatedialog.ui.h +++ b/tests/auto/uic/baseline/translatedialog.ui.h @@ -44,7 +44,7 @@ /******************************************************************************** ** Form generated from reading UI file 'translatedialog.ui' ** -** Created: Tue Aug 18 19:03:32 2009 +** Created: Fri Sep 4 10:17:15 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -248,7 +248,6 @@ public: cancel->setWhatsThis(QApplication::translate("TranslateDialog", "Click here to close this window.", 0, QApplication::UnicodeUTF8)); #endif // QT_NO_WHATSTHIS cancel->setText(QApplication::translate("TranslateDialog", "Cancel", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(TranslateDialog); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/translationsettings.ui.h b/tests/auto/uic/baseline/translationsettings.ui.h index 55e2431..2105b09 100644 --- a/tests/auto/uic/baseline/translationsettings.ui.h +++ b/tests/auto/uic/baseline/translationsettings.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'translationsettings.ui' ** -** Created: Tue Aug 18 19:03:32 2009 +** Created: Fri Sep 4 10:17:15 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -148,7 +107,6 @@ public: groupBox->setTitle(QApplication::translate("TranslationSettings", "Target language", 0, QApplication::UnicodeUTF8)); label->setText(QApplication::translate("TranslationSettings", "Language", 0, QApplication::UnicodeUTF8)); lblCountry->setText(QApplication::translate("TranslationSettings", "Country/Region", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(TranslationSettings); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/treewidgeteditor.ui.h b/tests/auto/uic/baseline/treewidgeteditor.ui.h index bb2f94e..635fef6 100644 --- a/tests/auto/uic/baseline/treewidgeteditor.ui.h +++ b/tests/auto/uic/baseline/treewidgeteditor.ui.h @@ -44,7 +44,7 @@ /******************************************************************************** ** Form generated from reading UI file 'treewidgeteditor.ui' ** -** Created: Tue Aug 18 19:03:32 2009 +** Created: Fri Sep 4 10:17:15 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -349,7 +349,6 @@ public: #endif // QT_NO_TOOLTIP moveColumnDownButton->setText(QApplication::translate("qdesigner_internal::TreeWidgetEditor", "D", 0, QApplication::UnicodeUTF8)); label->setText(QApplication::translate("qdesigner_internal::TreeWidgetEditor", "Icon", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(qdesigner_internal__TreeWidgetEditor); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/trpreviewtool.ui.h b/tests/auto/uic/baseline/trpreviewtool.ui.h index c3dd6db..0c7d58f 100644 --- a/tests/auto/uic/baseline/trpreviewtool.ui.h +++ b/tests/auto/uic/baseline/trpreviewtool.ui.h @@ -44,7 +44,7 @@ /******************************************************************************** ** Form generated from reading UI file 'trpreviewtool.ui' ** -** Created: Tue Aug 18 19:03:32 2009 +** Created: Fri Sep 4 10:17:15 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! diff --git a/tests/auto/uic/baseline/validators.ui.h b/tests/auto/uic/baseline/validators.ui.h index d9a69eb..27b5482 100644 --- a/tests/auto/uic/baseline/validators.ui.h +++ b/tests/auto/uic/baseline/validators.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'validators.ui' ** -** Created: Tue Aug 18 19:03:32 2009 +** Created: Fri Sep 4 10:17:15 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -436,7 +395,6 @@ public: doubleLedWidget->setText(QString()); label_8->setText(QApplication::translate("ValidatorsForm", "editingFinished()", 0, QApplication::UnicodeUTF8)); pushButton->setText(QApplication::translate("ValidatorsForm", "Quit", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(ValidatorsForm); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/wateringconfigdialog.ui.h b/tests/auto/uic/baseline/wateringconfigdialog.ui.h index 2877737..9e586f0 100644 --- a/tests/auto/uic/baseline/wateringconfigdialog.ui.h +++ b/tests/auto/uic/baseline/wateringconfigdialog.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'wateringconfigdialog.ui' ** -** Created: Tue Aug 18 19:03:32 2009 +** Created: Fri Sep 4 10:17:15 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -317,7 +276,6 @@ public: label_6->setText(QApplication::translate("WateringConfigDialog", "Filter:", 0, QApplication::UnicodeUTF8)); filterCheckBox->setText(QString()); helpLabel->setText(QApplication::translate("WateringConfigDialog", "<a href=\"test\">Show Details</a>", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(WateringConfigDialog); } // retranslateUi }; diff --git a/tests/auto/uiloader/baseline/css_tab_border.ui b/tests/auto/uiloader/baseline/css_tab_border.ui new file mode 100644 index 0000000..cefb9d8 --- /dev/null +++ b/tests/auto/uiloader/baseline/css_tab_border.ui @@ -0,0 +1,104 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>Form</class> + <widget class="QWidget" name="Form"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>379</width> + <height>277</height> + </rect> + </property> + <property name="windowTitle"> + <string>Form</string> + </property> + <property name="styleSheet"> + <string notr="true">#tabWidget QTabBar::tab { + background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, + stop: 0 #E1E1E1, stop: 0.4 #DDDDDD, + stop: 0.5 #D8D8D8, stop: 1.0 #D3D3D3); + border: 2px solid #C4C4C3; + border-bottom-color: #C2C7CB; /* same as the pane color */ + border-top-left-radius: 4px; + border-top-right-radius: 4px; + padding: 2px; + } + +#tabWidget_2 QTabBar::tab { + border: 3px solid red; + } + +#tabWidget_3 QTabBar::tab { + margin: 5px; + } + + +</string> + </property> + <layout class="QVBoxLayout" name="verticalLayout"> + <item> + <widget class="QTabWidget" name="tabWidget"> + <property name="currentIndex"> + <number>1</number> + </property> + <property name="tabsClosable"> + <bool>true</bool> + </property> + <widget class="QWidget" name="tab"> + <attribute name="title"> + <string>Tab 1</string> + </attribute> + </widget> + <widget class="QWidget" name="tab_2"> + <attribute name="title"> + <string>Tab 2</string> + </attribute> + </widget> + </widget> + </item> + <item> + <widget class="QTabWidget" name="tabWidget_2"> + <property name="currentIndex"> + <number>1</number> + </property> + <property name="tabsClosable"> + <bool>false</bool> + </property> + <widget class="QWidget" name="tab_3"> + <attribute name="title"> + <string>Tab 1</string> + </attribute> + </widget> + <widget class="QWidget" name="tab_4"> + <attribute name="title"> + <string>Tab 2</string> + </attribute> + </widget> + </widget> + </item> + <item> + <widget class="QTabWidget" name="tabWidget_3"> + <property name="currentIndex"> + <number>1</number> + </property> + <property name="tabsClosable"> + <bool>true</bool> + </property> + <widget class="QWidget" name="tab_5"> + <attribute name="title"> + <string>Tab 1</string> + </attribute> + </widget> + <widget class="QWidget" name="tab_6"> + <attribute name="title"> + <string>Tab 2</string> + </attribute> + </widget> + </widget> + </item> + </layout> + </widget> + <resources/> + <connections/> +</ui> diff --git a/tests/auto/xmlpatternsschemats/TESTSUITE/updateSuite.sh b/tests/auto/xmlpatternsschemats/TESTSUITE/updateSuite.sh index 28c22a8..7015f76 100755 --- a/tests/auto/xmlpatternsschemats/TESTSUITE/updateSuite.sh +++ b/tests/auto/xmlpatternsschemats/TESTSUITE/updateSuite.sh @@ -1,4 +1,44 @@ #!/bin/bash +############################################################################# +## +## Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +## Contact: Nokia Corporation (qt-info@nokia.com) +## +## This file is part of the test suite of the Qt Toolkit. +## +## $QT_BEGIN_LICENSE:LGPL$ +## No Commercial Usage +## This file contains pre-release code and may not be distributed. +## You may use this file in accordance with the terms and conditions +## contained in the Technology Preview License Agreement accompanying +## this package. +## +## GNU Lesser General Public License Usage +## Alternatively, this file may be used under the terms of the GNU Lesser +## General Public License version 2.1 as published by the Free Software +## Foundation and appearing in the file LICENSE.LGPL included in the +## packaging of this file. Please review the following information to +## ensure the GNU Lesser General Public License version 2.1 requirements +## will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +## +## In addition, as a special exception, Nokia gives you certain +## additional rights. These rights are described in the Nokia Qt LGPL +## Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this +## package. +## +## If you have questions regarding the use of this file, please contact +## Nokia at qt-info@nokia.com. +## +## +## +## +## +## +## +## +## $QT_END_LICENSE$ +## +############################################################################# # This script updates the suite from W3C's server. # diff --git a/tests/benchmarks/benchmarks.pro b/tests/benchmarks/benchmarks.pro index a4a8a27..124f909 100644 --- a/tests/benchmarks/benchmarks.pro +++ b/tests/benchmarks/benchmarks.pro @@ -3,6 +3,7 @@ SUBDIRS = containers-associative \ containers-sequential \ qanimation \ qbytearray \ + qfile_vs_qnetworkaccessmanager \ qpainter \ qtestlib-simple events \ qiodevice \ diff --git a/tests/benchmarks/qfile/main.cpp b/tests/benchmarks/qfile/main.cpp index 82e6562..376412c 100644 --- a/tests/benchmarks/qfile/main.cpp +++ b/tests/benchmarks/qfile/main.cpp @@ -3,11 +3,6 @@ ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) ** -****************************************************************************/ - -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** ** This file is part of the test suite of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ @@ -43,6 +38,7 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ + #include <QDebug> #include <QTemporaryFile> #include <QFSFileEngine> diff --git a/tests/benchmarks/qfile_vs_qnetworkaccessmanager/main.cpp b/tests/benchmarks/qfile_vs_qnetworkaccessmanager/main.cpp new file mode 100644 index 0000000..6a95c81 --- /dev/null +++ b/tests/benchmarks/qfile_vs_qnetworkaccessmanager/main.cpp @@ -0,0 +1,158 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +#include <QDebug> +#include <qtest.h> +#include <QtTest/QtTest> +#include <QtNetwork/qnetworkreply.h> +#include <QtNetwork/qnetworkrequest.h> +#include <QtNetwork/qnetworkaccessmanager.h> +#include <QtCore/QTemporaryFile> +#include <QtCore/QFile> +#include "../../auto/network-settings.h" + +class qfile_vs_qnetworkaccessmanager : public QObject +{ + Q_OBJECT + // do not use on symbian.. 100 MB is too large.. + // but.. this is a manual test anyway, so :) +protected: + void qnamFileRead_iteration(QNetworkAccessManager &manager, QNetworkRequest &request); + void qfileFileRead_iteration(); + static const int iterations = 10; + +private slots: + void qnamFileRead(); + void qfileFileRead(); + + void initTestCase(); + void cleanupTestCase(); + +public: + qint64 size; + QTemporaryFile testFile; + + qfile_vs_qnetworkaccessmanager() : QObject(), size(0) {}; +}; + +void qfile_vs_qnetworkaccessmanager::initTestCase() +{ + testFile.open(); + QByteArray qba(1*1024*1024, 'x'); // 1 MB + for (int i = 0; i < 100; i++) { + testFile.write(qba); + testFile.flush(); + size += qba.size(); + } // 100 MB + testFile.reset(); +} + +void qfile_vs_qnetworkaccessmanager::cleanupTestCase() +{ + +} + +void qfile_vs_qnetworkaccessmanager::qnamFileRead_iteration(QNetworkAccessManager &manager, QNetworkRequest &request) +{ + QNetworkReply* reply = manager.get(request); + connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()), Qt::QueuedConnection); + QTestEventLoop::instance().enterLoop(10); + QVERIFY(!QTestEventLoop::instance().timeout()); + QByteArray qba = reply->readAll(); + delete reply; +} + +void qfile_vs_qnetworkaccessmanager::qnamFileRead() +{ + QNetworkAccessManager manager; + QTime t; + QNetworkRequest request(QUrl(testFile.fileName())); + + // do 3 dry runs for cache warmup + qnamFileRead_iteration(manager, request); + qnamFileRead_iteration(manager, request); + qnamFileRead_iteration(manager, request); + + t.start(); + // 10 real runs + QBENCHMARK_ONCE { + for (int i = 0; i < iterations; i++) { + qnamFileRead_iteration(manager, request); + } + } + + qint64 elapsed = t.elapsed(); + qDebug() << endl << "Finished!"; + qDebug() << "Bytes:" << size; + qDebug() << "Speed:" << (qreal(size*iterations) / 1024.0) / (qreal(elapsed) / 1000.0) << "KB/sec"; +} + +void qfile_vs_qnetworkaccessmanager::qfileFileRead_iteration() +{ + testFile.reset(); + QByteArray qba = testFile.readAll(); +} + +void qfile_vs_qnetworkaccessmanager::qfileFileRead() +{ + QTime t; + + // do 3 dry runs for cache warmup + qfileFileRead_iteration(); + qfileFileRead_iteration(); + qfileFileRead_iteration(); + + t.start(); + // 10 real runs + QBENCHMARK_ONCE { + for (int i = 0; i < iterations; i++) { + qfileFileRead_iteration(); + } + } + + qint64 elapsed = t.elapsed(); + qDebug() << endl << "Finished!"; + qDebug() << "Bytes:" << size; + qDebug() << "Speed:" << (qreal(size*iterations) / 1024.0) / (qreal(elapsed) / 1000.0) << "KB/sec"; +} + +QTEST_MAIN(qfile_vs_qnetworkaccessmanager) + +#include "main.moc" diff --git a/tests/benchmarks/qfile_vs_qnetworkaccessmanager/qfile_vs_qnetworkaccessmanager.pro b/tests/benchmarks/qfile_vs_qnetworkaccessmanager/qfile_vs_qnetworkaccessmanager.pro new file mode 100644 index 0000000..99d1935 --- /dev/null +++ b/tests/benchmarks/qfile_vs_qnetworkaccessmanager/qfile_vs_qnetworkaccessmanager.pro @@ -0,0 +1,13 @@ +load(qttest_p4) +TEMPLATE = app +TARGET = qfile_vs_qnetworkaccessmanager +DEPENDPATH += . +INCLUDEPATH += . + +QT -= gui +QT += network + +CONFIG += release + +# Input +SOURCES += main.cpp diff --git a/tests/benchmarks/qmatrix4x4/tst_qmatrix4x4.cpp b/tests/benchmarks/qmatrix4x4/tst_qmatrix4x4.cpp index b4c8202..c72bc27 100644 --- a/tests/benchmarks/qmatrix4x4/tst_qmatrix4x4.cpp +++ b/tests/benchmarks/qmatrix4x4/tst_qmatrix4x4.cpp @@ -171,9 +171,9 @@ void tst_QMatrix4x4::multiplyDirect() QMatrix4x4 m3; - const float *m1data = m1.constData(); - const float *m2data = m2.constData(); - float *m3data = m3.data(); + const qreal *m1data = m1.constData(); + const qreal *m2data = m2.constData(); + qreal *m3data = m3.data(); QBENCHMARK { for (int row = 0; row < 4; ++row) { @@ -266,9 +266,9 @@ void tst_QMatrix4x4::mapVectorDirect() { QFETCH(QMatrix4x4, m1); - const float *m1data = m1.constData(); - float v[4] = {10.5f, -2.0f, 3.0f, 1.0f}; - float result[4]; + const qreal *m1data = m1.constData(); + qreal v[4] = {10.5f, -2.0f, 3.0f, 1.0f}; + qreal result[4]; QBENCHMARK { for (int row = 0; row < 4; ++row) { diff --git a/tests/manual/gestures/pinch/main.cpp b/tests/manual/gestures/pinch/main.cpp index 0e5b928..26f32ec 100644 --- a/tests/manual/gestures/pinch/main.cpp +++ b/tests/manual/gestures/pinch/main.cpp @@ -9,8 +9,8 @@ ** No Commercial Usage ** This file contains pre-release code and may not be distributed. ** You may use this file in accordance with the terms and conditions -** contained in the either Technology Preview License Agreement or the -** Beta Release License Agreement. +** contained in the Technology Preview License Agreement accompanying +** this package. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser @@ -21,20 +21,20 @@ ** 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.0, included in the file LGPL_EXCEPTION.txt in this +** 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. +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** ** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://qt.nokia.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tests/manual/gestures/pinch/pinchwidget.cpp b/tests/manual/gestures/pinch/pinchwidget.cpp index cc16443..1a2fe47 100644 --- a/tests/manual/gestures/pinch/pinchwidget.cpp +++ b/tests/manual/gestures/pinch/pinchwidget.cpp @@ -9,8 +9,8 @@ ** No Commercial Usage ** This file contains pre-release code and may not be distributed. ** You may use this file in accordance with the terms and conditions -** contained in the either Technology Preview License Agreement or the -** Beta Release License Agreement. +** contained in the Technology Preview License Agreement accompanying +** this package. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser @@ -21,20 +21,20 @@ ** 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.0, included in the file LGPL_EXCEPTION.txt in this +** 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. +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** ** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://qt.nokia.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tests/manual/gestures/pinch/pinchwidget.h b/tests/manual/gestures/pinch/pinchwidget.h index a76e287..c99a6d5 100644 --- a/tests/manual/gestures/pinch/pinchwidget.h +++ b/tests/manual/gestures/pinch/pinchwidget.h @@ -9,8 +9,8 @@ ** No Commercial Usage ** This file contains pre-release code and may not be distributed. ** You may use this file in accordance with the terms and conditions -** contained in the either Technology Preview License Agreement or the -** Beta Release License Agreement. +** contained in the Technology Preview License Agreement accompanying +** this package. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser @@ -21,20 +21,20 @@ ** 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.0, included in the file LGPL_EXCEPTION.txt in this +** 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. +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** ** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://qt.nokia.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tests/manual/gestures/twopanwidgets/main.cpp b/tests/manual/gestures/twopanwidgets/main.cpp index 7750d1d..3e73f93 100644 --- a/tests/manual/gestures/twopanwidgets/main.cpp +++ b/tests/manual/gestures/twopanwidgets/main.cpp @@ -9,8 +9,8 @@ ** No Commercial Usage ** This file contains pre-release code and may not be distributed. ** You may use this file in accordance with the terms and conditions -** contained in the either Technology Preview License Agreement or the -** Beta Release License Agreement. +** contained in the Technology Preview License Agreement accompanying +** this package. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser @@ -21,20 +21,20 @@ ** 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.0, included in the file LGPL_EXCEPTION.txt in this +** 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. +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** ** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://qt.nokia.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tests/manual/qtabletevent/device_information/tabletwidget.cpp b/tests/manual/qtabletevent/device_information/tabletwidget.cpp index 15a3d80..684f2a5 100644 --- a/tests/manual/qtabletevent/device_information/tabletwidget.cpp +++ b/tests/manual/qtabletevent/device_information/tabletwidget.cpp @@ -47,6 +47,7 @@ TabletWidget::TabletWidget() { QPalette newPalette = palette(); newPalette.setColor(QPalette::Window, Qt::white); + newPalette.setColor(QPalette::WindowText, Qt::black); setPalette(newPalette); qApp->installEventFilter(this); resetAttributes(); diff --git a/tools/activeqt/testcon/scripts/pythonscript.py b/tools/activeqt/testcon/scripts/pythonscript.py index 79bca87..d9cc67c 100644 --- a/tools/activeqt/testcon/scripts/pythonscript.py +++ b/tools/activeqt/testcon/scripts/pythonscript.py @@ -1,3 +1,45 @@ +#!/usr/bin/env python +############################################################################# +## +## Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +## Contact: Nokia Corporation (qt-info@nokia.com) +## +## This file is part of the test suite of the Qt Toolkit. +## +## $QT_BEGIN_LICENSE:LGPL$ +## No Commercial Usage +## This file contains pre-release code and may not be distributed. +## You may use this file in accordance with the terms and conditions +## contained in the Technology Preview License Agreement accompanying +## this package. +## +## GNU Lesser General Public License Usage +## Alternatively, this file may be used under the terms of the GNU Lesser +## General Public License version 2.1 as published by the Free Software +## Foundation and appearing in the file LICENSE.LGPL included in the +## packaging of this file. Please review the following information to +## ensure the GNU Lesser General Public License version 2.1 requirements +## will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +## +## In addition, as a special exception, Nokia gives you certain +## additional rights. These rights are described in the Nokia Qt LGPL +## Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this +## package. +## +## If you have questions regarding the use of this file, please contact +## Nokia at qt-info@nokia.com. +## +## +## +## +## +## +## +## +## $QT_END_LICENSE$ +## +############################################################################# + def QAxWidget2_Click(): QAxWidget2.lineWidth = QAxWidget2.lineWidth + 1; MainWindow.logMacro(0, "Hello from Python: QAxWidget2_Click", 0, ""); diff --git a/tools/linguist/lrelease/lrelease.1 b/tools/linguist/lrelease/lrelease.1 index 8f1a3ff..5390afe 100644 --- a/tools/linguist/lrelease/lrelease.1 +++ b/tools/linguist/lrelease/lrelease.1 @@ -2,9 +2,9 @@ .\" .\" Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). .\" Contact: Nokia Corporation (qt-info@nokia.com) -.\" +.\" .\" This file is part of the QtGui module of the Qt Toolkit. -.\" +.\" .\" $QT_BEGIN_LICENSE:LGPL$ .\" No Commercial Usage .\" This file contains pre-release code and may not be distributed. diff --git a/tools/porting/src/ast.cpp b/tools/porting/src/ast.cpp index 118d52c..4a36e35 100644 --- a/tools/porting/src/ast.cpp +++ b/tools/porting/src/ast.cpp @@ -1,8 +1,8 @@ /**************************************************************************** ** +** Copyright (C) 2001-2004 Roberto Raggi ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) -** Copyright (C) 2001-2004 Roberto Raggi ** ** This file is part of the qt3to4 porting application of the Qt Toolkit. ** diff --git a/tools/porting/src/ast.h b/tools/porting/src/ast.h index e71d2e0..85d7070 100644 --- a/tools/porting/src/ast.h +++ b/tools/porting/src/ast.h @@ -1,8 +1,8 @@ /**************************************************************************** ** +** Copyright (C) 2001-2004 Roberto Raggi ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) -** Copyright (C) 2001-2004 Roberto Raggi ** ** This file is part of the qt3to4 porting application of the Qt Toolkit. ** diff --git a/tools/porting/src/codemodel.cpp b/tools/porting/src/codemodel.cpp index b9b82aa..be0682b 100644 --- a/tools/porting/src/codemodel.cpp +++ b/tools/porting/src/codemodel.cpp @@ -1,8 +1,8 @@ /**************************************************************************** ** +** Copyright (C) 2001-2004 Roberto Raggi ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) -** Copyright (C) 2001-2004 Roberto Raggi ** ** This file is part of the qt3to4 porting application of the Qt Toolkit. ** diff --git a/tools/porting/src/codemodel.h b/tools/porting/src/codemodel.h index 62cb314..4807972 100644 --- a/tools/porting/src/codemodel.h +++ b/tools/porting/src/codemodel.h @@ -1,8 +1,8 @@ /**************************************************************************** ** +** Copyright (C) 2001-2004 Roberto Raggi ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) -** Copyright (C) 2001-2004 Roberto Raggi ** ** This file is part of the qt3to4 porting application of the Qt Toolkit. ** diff --git a/tools/porting/src/cpplexer.cpp b/tools/porting/src/cpplexer.cpp index 4be00f6..79dcd9a 100644 --- a/tools/porting/src/cpplexer.cpp +++ b/tools/porting/src/cpplexer.cpp @@ -1,8 +1,8 @@ /**************************************************************************** ** +** Copyright (C) 2001-2004 Roberto Raggi ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) -** Copyright (C) 2001-2004 Roberto Raggi ** ** This file is part of the qt3to4 porting application of the Qt Toolkit. ** diff --git a/tools/porting/src/cpplexer.h b/tools/porting/src/cpplexer.h index ed01b69..5c756c4 100644 --- a/tools/porting/src/cpplexer.h +++ b/tools/porting/src/cpplexer.h @@ -1,8 +1,8 @@ /**************************************************************************** ** +** Copyright (C) 2001-2004 Roberto Raggi ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) -** Copyright (C) 2001-2004 Roberto Raggi ** ** This file is part of the qt3to4 porting application of the Qt Toolkit. ** diff --git a/tools/porting/src/errors.cpp b/tools/porting/src/errors.cpp index b8a3d8c..abd58e3 100644 --- a/tools/porting/src/errors.cpp +++ b/tools/porting/src/errors.cpp @@ -1,8 +1,8 @@ /**************************************************************************** ** +** Copyright (C) 2001-2004 Roberto Raggi ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) -** Copyright (C) 2001-2004 Roberto Raggi ** ** This file is part of the qt3to4 porting application of the Qt Toolkit. ** diff --git a/tools/porting/src/errors.h b/tools/porting/src/errors.h index 46eeab7..e34e04d 100644 --- a/tools/porting/src/errors.h +++ b/tools/porting/src/errors.h @@ -1,8 +1,8 @@ /**************************************************************************** ** +** Copyright (C) 2001-2004 Roberto Raggi ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) -** Copyright (C) 2001-2004 Roberto Raggi ** ** This file is part of the qt3to4 porting application of the Qt Toolkit. ** diff --git a/tools/porting/src/parser.cpp b/tools/porting/src/parser.cpp index 50325f8..83f0c4b 100644 --- a/tools/porting/src/parser.cpp +++ b/tools/porting/src/parser.cpp @@ -1,8 +1,8 @@ /**************************************************************************** ** +** Copyright (C) 2001-2004 Roberto Raggi ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) -** Copyright (C) 2001-2004 Roberto Raggi ** ** This file is part of the qt3to4 porting application of the Qt Toolkit. ** diff --git a/tools/porting/src/parser.h b/tools/porting/src/parser.h index 1397886..330c9f5 100644 --- a/tools/porting/src/parser.h +++ b/tools/porting/src/parser.h @@ -1,8 +1,8 @@ /**************************************************************************** ** +** Copyright (C) 2001-2004 Roberto Raggi ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) -** Copyright (C) 2001-2004 Roberto Raggi ** ** This file is part of the qt3to4 porting application of the Qt Toolkit. ** diff --git a/tools/porting/src/rpp.cpp b/tools/porting/src/rpp.cpp index 787ce2a..b6ec429 100644 --- a/tools/porting/src/rpp.cpp +++ b/tools/porting/src/rpp.cpp @@ -1,8 +1,8 @@ /**************************************************************************** ** +** Copyright (C) 2001-2004 Roberto Raggi ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) -** Copyright (C) 2001-2004 Roberto Raggi ** ** This file is part of the qt3to4 porting application of the Qt Toolkit. ** diff --git a/tools/porting/src/rpp.h b/tools/porting/src/rpp.h index 2c10b51..863e2fc 100644 --- a/tools/porting/src/rpp.h +++ b/tools/porting/src/rpp.h @@ -1,8 +1,8 @@ /**************************************************************************** ** +** Copyright (C) 2001-2004 Roberto Raggi ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) -** Copyright (C) 2001-2004 Roberto Raggi ** ** This file is part of the qt3to4 porting application of the Qt Toolkit. ** diff --git a/tools/porting/src/rpplexer.cpp b/tools/porting/src/rpplexer.cpp index e92ec9b..bbea068 100644 --- a/tools/porting/src/rpplexer.cpp +++ b/tools/porting/src/rpplexer.cpp @@ -1,8 +1,8 @@ /**************************************************************************** ** +** Copyright (C) 2001-2004 Roberto Raggi ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) -** Copyright (C) 2001-2004 Roberto Raggi ** ** This file is part of the qt3to4 porting application of the Qt Toolkit. ** diff --git a/tools/porting/src/rpplexer.h b/tools/porting/src/rpplexer.h index 273df0c..e661fa0 100644 --- a/tools/porting/src/rpplexer.h +++ b/tools/porting/src/rpplexer.h @@ -1,8 +1,8 @@ /**************************************************************************** ** +** Copyright (C) 2001-2004 Roberto Raggi ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) -** Copyright (C) 2001-2004 Roberto Raggi ** ** This file is part of the qt3to4 porting application of the Qt Toolkit. ** diff --git a/tools/porting/src/rpptreeevaluator.cpp b/tools/porting/src/rpptreeevaluator.cpp index 9d6e3db..d696f75 100644 --- a/tools/porting/src/rpptreeevaluator.cpp +++ b/tools/porting/src/rpptreeevaluator.cpp @@ -1,8 +1,8 @@ /**************************************************************************** ** +** Copyright (C) 2001-2004 Roberto Raggi ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) -** Copyright (C) 2001-2004 Roberto Raggi ** ** This file is part of the qt3to4 porting application of the Qt Toolkit. ** diff --git a/tools/porting/src/semantic.cpp b/tools/porting/src/semantic.cpp index 296e614..efe2bc4 100644 --- a/tools/porting/src/semantic.cpp +++ b/tools/porting/src/semantic.cpp @@ -1,8 +1,8 @@ /**************************************************************************** ** +** Copyright (C) 2001-2004 Roberto Raggi ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) -** Copyright (C) 2001-2004 Roberto Raggi ** ** This file is part of the qt3to4 porting application of the Qt Toolkit. ** diff --git a/tools/porting/src/semantic.h b/tools/porting/src/semantic.h index 8e16f2e..548faf6 100644 --- a/tools/porting/src/semantic.h +++ b/tools/porting/src/semantic.h @@ -1,8 +1,8 @@ /**************************************************************************** ** +** Copyright (C) 2001-2004 Roberto Raggi ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) -** Copyright (C) 2001-2004 Roberto Raggi ** ** This file is part of the qt3to4 porting application of the Qt Toolkit. ** diff --git a/tools/porting/src/smallobject.cpp b/tools/porting/src/smallobject.cpp index eac82ef..c3b221f 100644 --- a/tools/porting/src/smallobject.cpp +++ b/tools/porting/src/smallobject.cpp @@ -1,8 +1,8 @@ /**************************************************************************** ** +** Copyright (C) 2001-2004 Roberto Raggi ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) -** Copyright (C) 2001-2004 Roberto Raggi ** ** This file is part of the qt3to4 porting application of the Qt Toolkit. ** diff --git a/tools/porting/src/smallobject.h b/tools/porting/src/smallobject.h index adc4ae7..8b9f91f 100644 --- a/tools/porting/src/smallobject.h +++ b/tools/porting/src/smallobject.h @@ -1,8 +1,8 @@ /**************************************************************************** ** +** Copyright (C) 2001-2004 Roberto Raggi ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) -** Copyright (C) 2001-2004 Roberto Raggi ** ** This file is part of the qt3to4 porting application of the Qt Toolkit. ** diff --git a/tools/porting/src/tokenizer.cpp b/tools/porting/src/tokenizer.cpp index 4cdf584..e971602 100644 --- a/tools/porting/src/tokenizer.cpp +++ b/tools/porting/src/tokenizer.cpp @@ -1,8 +1,8 @@ /**************************************************************************** ** +** Copyright (C) 2001-2004 Roberto Raggi ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) -** Copyright (C) 2001-2004 Roberto Raggi ** ** This file is part of the qt3to4 porting application of the Qt Toolkit. ** diff --git a/tools/porting/src/tokenizer.h b/tools/porting/src/tokenizer.h index d98315a..1762c78 100644 --- a/tools/porting/src/tokenizer.h +++ b/tools/porting/src/tokenizer.h @@ -1,8 +1,8 @@ /**************************************************************************** ** +** Copyright (C) 2001-2004 Roberto Raggi ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) -** Copyright (C) 2001-2004 Roberto Raggi ** ** This file is part of the qt3to4 porting application of the Qt Toolkit. ** diff --git a/tools/porting/src/tokens.h b/tools/porting/src/tokens.h index 960f1ce..02eab54 100644 --- a/tools/porting/src/tokens.h +++ b/tools/porting/src/tokens.h @@ -1,8 +1,8 @@ /**************************************************************************** ** +** Copyright (C) 2001-2004 Roberto Raggi ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) -** Copyright (C) 2001-2004 Roberto Raggi ** ** This file is part of the qt3to4 porting application of the Qt Toolkit. ** diff --git a/tools/porting/src/tokenstreamadapter.h b/tools/porting/src/tokenstreamadapter.h index 110f814b..948db5a 100644 --- a/tools/porting/src/tokenstreamadapter.h +++ b/tools/porting/src/tokenstreamadapter.h @@ -1,8 +1,8 @@ /**************************************************************************** ** +** Copyright (C) 2001-2004 Roberto Raggi ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) -** Copyright (C) 2001-2004 Roberto Raggi ** ** This file is part of the qt3to4 porting application of the Qt Toolkit. ** diff --git a/tools/porting/src/treewalker.cpp b/tools/porting/src/treewalker.cpp index 1593674..2d3d53c 100644 --- a/tools/porting/src/treewalker.cpp +++ b/tools/porting/src/treewalker.cpp @@ -1,8 +1,8 @@ /**************************************************************************** ** +** Copyright (C) 2001-2004 Roberto Raggi ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) -** Copyright (C) 2001-2004 Roberto Raggi ** ** This file is part of the qt3to4 porting application of the Qt Toolkit. ** diff --git a/tools/porting/src/treewalker.h b/tools/porting/src/treewalker.h index 3f75d7c..168d7b4 100644 --- a/tools/porting/src/treewalker.h +++ b/tools/porting/src/treewalker.h @@ -1,8 +1,8 @@ /**************************************************************************** ** +** Copyright (C) 2001-2004 Roberto Raggi ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) -** Copyright (C) 2001-2004 Roberto Raggi ** ** This file is part of the qt3to4 porting application of the Qt Toolkit. ** diff --git a/tools/qttracereplay/main.cpp b/tools/qttracereplay/main.cpp index 970531b..34508e2 100644 --- a/tools/qttracereplay/main.cpp +++ b/tools/qttracereplay/main.cpp @@ -45,12 +45,6 @@ #include <private/qpaintengineex_p.h> #include <private/qpaintbuffer_p.h> -struct Frame -{ - QRegion updateRegion; - QPaintBuffer *buffer; -}; - class ReplayWidget : public QWidget { Q_OBJECT @@ -63,7 +57,9 @@ public slots: void updateRect(); private: - QList<Frame> frames; + QList<QRegion> updates; + QPaintBuffer buffer; + int currentFrame; int currentIteration; QTime timer; @@ -74,7 +70,7 @@ private: void ReplayWidget::updateRect() { - update(frames.at(currentFrame).updateRegion); + update(updates.at(currentFrame)); } void ReplayWidget::paintEvent(QPaintEvent *) @@ -83,10 +79,10 @@ void ReplayWidget::paintEvent(QPaintEvent *) // p.setClipRegion(frames.at(currentFrame).updateRegion); - frames.at(currentFrame).buffer->draw(&p); + buffer.draw(&p, currentFrame); ++currentFrame; - if (currentFrame >= frames.size()) { + if (currentFrame >= buffer.numFrames()) { currentFrame = 0; ++currentIteration; @@ -116,15 +112,13 @@ void ReplayWidget::paintEvent(QPaintEvent *) stddev = qSqrt(stddev / iterationTimes.size()); qSort(iterationTimes.begin(), iterationTimes.end()); - qreal median = iterationTimes.at(iterationTimes.size() / 2); - if ((iterationTimes.size() % 1) == 1) - median = (median + iterationTimes.at(iterationTimes.size() / 2 - 1)) * 0.5; + uint median = iterationTimes.at(iterationTimes.size() / 2); stddev = 100 * stddev / mean; if (iterationTimes.size() >= 10 || stddev < 4) { - printf("%s, iterations: %d, frames: %d, min(ms): %d, median(ms): %f, stddev: %f %%, max(fps): %f\n", qPrintable(filename), - iterationTimes.size(), frames.size(), min, median, stddev, 1000. * frames.size() / min); + printf("%s, iterations: %d, frames: %d, min(ms): %d, median(ms): %d, stddev: %f %%, max(fps): %f\n", qPrintable(filename), + iterationTimes.size(), updates.size(), min, median, stddev, 1000. * updates.size() / min); deleteLater(); return; } @@ -146,34 +140,12 @@ ReplayWidget::ReplayWidget(const QString &filename_) QRect bounds; if (file.open(QIODevice::ReadOnly)) { QDataStream in(&file); - - while (true) { - int frameId; - in >> frameId; - - if (in.status() != QDataStream::Ok) - break; - - qulonglong windowId; - QRegion rgn; - - in >> windowId; - - Frame frame; - frame.buffer = new QPaintBuffer; - - in >> bounds; - - in >> frame.updateRegion; - in >> *frame.buffer; - - frames << frame; - } + in >> buffer >> updates; } - qDebug() << "Read" << frames.size() << "frames"; + qDebug() << "Read paint buffer with" << buffer.numFrames() << "frames"; - resize(bounds.size()); + resize(buffer.boundingRect().size().toSize()); setAutoFillBackground(false); setAttribute(Qt::WA_NoSystemBackground); diff --git a/tools/xmlpatternsvalidator/main.h b/tools/xmlpatternsvalidator/main.h index a884f11..9c7a2d6 100644 --- a/tools/xmlpatternsvalidator/main.h +++ b/tools/xmlpatternsvalidator/main.h @@ -1,10 +1,11 @@ /**************************************************************************** - ** - ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). - ** Contact: Nokia Corporation (qt-info@nokia.com) - ** - ** This file is part of the Patternist project on Qt Labs. * ** - ** $QT_BEGIN_LICENSE:LGPL$ +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the Patternist project on Qt Labs. +** +** $QT_BEGIN_LICENSE:LGPL$ ** No Commercial Usage ** This file contains pre-release code and may not be distributed. ** You may use this file in accordance with the terms and conditions @@ -35,11 +36,8 @@ ** ** ** $QT_END_LICENSE$ - ** - ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - ** - ****************************************************************************/ +** +****************************************************************************/ // // W A R N I N G diff --git a/util/local_database/cldr2qlocalexml.py b/util/local_database/cldr2qlocalexml.py index e4446c4..1c3debb 100755 --- a/util/local_database/cldr2qlocalexml.py +++ b/util/local_database/cldr2qlocalexml.py @@ -1,4 +1,44 @@ -#! /usr/bin/python +#!/usr/bin/env python +############################################################################# +## +## Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +## Contact: Nokia Corporation (qt-info@nokia.com) +## +## This file is part of the test suite of the Qt Toolkit. +## +## $QT_BEGIN_LICENSE:LGPL$ +## No Commercial Usage +## This file contains pre-release code and may not be distributed. +## You may use this file in accordance with the terms and conditions +## contained in the Technology Preview License Agreement accompanying +## this package. +## +## GNU Lesser General Public License Usage +## Alternatively, this file may be used under the terms of the GNU Lesser +## General Public License version 2.1 as published by the Free Software +## Foundation and appearing in the file LICENSE.LGPL included in the +## packaging of this file. Please review the following information to +## ensure the GNU Lesser General Public License version 2.1 requirements +## will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +## +## In addition, as a special exception, Nokia gives you certain +## additional rights. These rights are described in the Nokia Qt LGPL +## Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this +## package. +## +## If you have questions regarding the use of this file, please contact +## Nokia at qt-info@nokia.com. +## +## +## +## +## +## +## +## +## $QT_END_LICENSE$ +## +############################################################################# import os import sys diff --git a/util/local_database/enumdata.py b/util/local_database/enumdata.py index b0ab848..5c65ff3 100644 --- a/util/local_database/enumdata.py +++ b/util/local_database/enumdata.py @@ -1,3 +1,45 @@ +#!/usr/bin/env python +############################################################################# +## +## Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +## Contact: Nokia Corporation (qt-info@nokia.com) +## +## This file is part of the test suite of the Qt Toolkit. +## +## $QT_BEGIN_LICENSE:LGPL$ +## No Commercial Usage +## This file contains pre-release code and may not be distributed. +## You may use this file in accordance with the terms and conditions +## contained in the Technology Preview License Agreement accompanying +## this package. +## +## GNU Lesser General Public License Usage +## Alternatively, this file may be used under the terms of the GNU Lesser +## General Public License version 2.1 as published by the Free Software +## Foundation and appearing in the file LICENSE.LGPL included in the +## packaging of this file. Please review the following information to +## ensure the GNU Lesser General Public License version 2.1 requirements +## will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +## +## In addition, as a special exception, Nokia gives you certain +## additional rights. These rights are described in the Nokia Qt LGPL +## Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this +## package. +## +## If you have questions regarding the use of this file, please contact +## Nokia at qt-info@nokia.com. +## +## +## +## +## +## +## +## +## $QT_END_LICENSE$ +## +############################################################################# + # langugae_list and country_list reflect the current values of enums in qlocale.h # If new xml language files are available in CLDR, these languages and countries # need to be *appended* to this list. diff --git a/util/local_database/qlocalexml2cpp.py b/util/local_database/qlocalexml2cpp.py index d625cfd..ce4ed43 100755 --- a/util/local_database/qlocalexml2cpp.py +++ b/util/local_database/qlocalexml2cpp.py @@ -1,4 +1,44 @@ -#! /usr/bin/python +#!/usr/bin/env python +############################################################################# +## +## Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +## Contact: Nokia Corporation (qt-info@nokia.com) +## +## This file is part of the test suite of the Qt Toolkit. +## +## $QT_BEGIN_LICENSE:LGPL$ +## No Commercial Usage +## This file contains pre-release code and may not be distributed. +## You may use this file in accordance with the terms and conditions +## contained in the Technology Preview License Agreement accompanying +## this package. +## +## GNU Lesser General Public License Usage +## Alternatively, this file may be used under the terms of the GNU Lesser +## General Public License version 2.1 as published by the Free Software +## Foundation and appearing in the file LICENSE.LGPL included in the +## packaging of this file. Please review the following information to +## ensure the GNU Lesser General Public License version 2.1 requirements +## will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +## +## In addition, as a special exception, Nokia gives you certain +## additional rights. These rights are described in the Nokia Qt LGPL +## Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this +## package. +## +## If you have questions regarding the use of this file, please contact +## Nokia at qt-info@nokia.com. +## +## +## +## +## +## +## +## +## $QT_END_LICENSE$ +## +############################################################################# import sys import xml.dom.minidom diff --git a/util/local_database/xpathlite.py b/util/local_database/xpathlite.py index 6e4dd71..9cfd335 100644 --- a/util/local_database/xpathlite.py +++ b/util/local_database/xpathlite.py @@ -1,3 +1,45 @@ +#!/usr/bin/env python +############################################################################# +## +## Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +## Contact: Nokia Corporation (qt-info@nokia.com) +## +## This file is part of the test suite of the Qt Toolkit. +## +## $QT_BEGIN_LICENSE:LGPL$ +## No Commercial Usage +## This file contains pre-release code and may not be distributed. +## You may use this file in accordance with the terms and conditions +## contained in the Technology Preview License Agreement accompanying +## this package. +## +## GNU Lesser General Public License Usage +## Alternatively, this file may be used under the terms of the GNU Lesser +## General Public License version 2.1 as published by the Free Software +## Foundation and appearing in the file LICENSE.LGPL included in the +## packaging of this file. Please review the following information to +## ensure the GNU Lesser General Public License version 2.1 requirements +## will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +## +## In addition, as a special exception, Nokia gives you certain +## additional rights. These rights are described in the Nokia Qt LGPL +## Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this +## package. +## +## If you have questions regarding the use of this file, please contact +## Nokia at qt-info@nokia.com. +## +## +## +## +## +## +## +## +## $QT_END_LICENSE$ +## +############################################################################# + import sys import os import xml.dom.minidom diff --git a/util/qlalr/examples/glsl/glsl-lex.l b/util/qlalr/examples/glsl/glsl-lex.l index 1e07c3b..8e3334a 100644 --- a/util/qlalr/examples/glsl/glsl-lex.l +++ b/util/qlalr/examples/glsl/glsl-lex.l @@ -1,5 +1,46 @@ %{ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QLALR tool of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include <cassert> #define YY_DECL int GLSLParser::nextToken() %} diff --git a/util/qlalr/examples/qparser/calc.l b/util/qlalr/examples/qparser/calc.l index 95181d5..eed04ab 100644 --- a/util/qlalr/examples/qparser/calc.l +++ b/util/qlalr/examples/qparser/calc.l @@ -2,6 +2,47 @@ %option noyywrap %{ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QLALR tool of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include "calc_parser.h" #include <cstdlib> diff --git a/util/scripts/make_qfeatures_dot_h b/util/scripts/make_qfeatures_dot_h index 7894510..a5699da 100755 --- a/util/scripts/make_qfeatures_dot_h +++ b/util/scripts/make_qfeatures_dot_h @@ -1,4 +1,45 @@ #!/usr/bin/perl +############################################################################# +## +## Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +## Contact: Nokia Corporation (qt-info@nokia.com) +## +## This file is part of the test suite of the Qt Toolkit. +## +## $QT_BEGIN_LICENSE:LGPL$ +## No Commercial Usage +## This file contains pre-release code and may not be distributed. +## You may use this file in accordance with the terms and conditions +## contained in the Technology Preview License Agreement accompanying +## this package. +## +## GNU Lesser General Public License Usage +## Alternatively, this file may be used under the terms of the GNU Lesser +## General Public License version 2.1 as published by the Free Software +## Foundation and appearing in the file LICENSE.LGPL included in the +## packaging of this file. Please review the following information to +## ensure the GNU Lesser General Public License version 2.1 requirements +## will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +## +## In addition, as a special exception, Nokia gives you certain +## additional rights. These rights are described in the Nokia Qt LGPL +## Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this +## package. +## +## If you have questions regarding the use of this file, please contact +## Nokia at qt-info@nokia.com. +## +## +## +## +## +## +## +## +## $QT_END_LICENSE$ +## +############################################################################# + # # Usage: make_qfeatures_dot_h # |