summaryrefslogtreecommitdiffstats
path: root/Modules
Commit message (Expand)AuthorAgeFilesLines
...
* ENH: add better variables for MSVC versionsBill Hoffman2006-04-072-11/+32
* ENH: Allow to overwrite CPACK_BINARY_DIRAndy Cedilnik2006-04-071-1/+1
* ENH: add search directories for 32 bit devenv from a 64bit cmakeBill Hoffman2006-04-041-2/+5
* BUG: Fixed order of options to cl for 32-bit/64-bit test to work with VS 6 NM...Brad King2006-03-301-4/+5
* ENH: add support for win64 for visual studio 2005 ide and nmake, also fix war...Bill Hoffman2006-03-302-1/+33
* ENH: use correct name for pathBill Hoffman2006-03-291-1/+1
* STYLE: better error message when KDE4 hasn't been foundAlexander Neundorf2006-03-281-2/+3
* ENH: Add support for adding content to bundlesAndy Cedilnik2006-03-281-0/+2
* ENH: add /opt/local/includeBill Hoffman2006-03-271-1/+1
* ENH: add unix pathsBill Hoffman2006-03-272-1/+1
* ENH: add more search paths and add UnixPaths to all unix platformsBill Hoffman2006-03-2715-4/+19
* ENH: Updated implementation to use new FIND_* command power. The correct lib...Brad King2006-03-241-41/+48
* BUG: Fix '/use/lib' to be '/usr/lib'.Brad King2006-03-241-1/+1
* ENH: add support for universal binariesBill Hoffman2006-03-241-0/+23
* ENH: Cleanup bootstrap even moreAndy Cedilnik2006-03-222-4/+4
* ENH: Added support for linking to MS .lib libraries in MinGW.Brad King2006-03-221-1/+2
* ENH: Handle visual studio versionsAndy Cedilnik2006-03-211-9/+57
* BUG: put the path to the kde3 lib dir in KDE3_LIB_DIR, not the completeAlexander Neundorf2006-03-211-1/+3
* BUG: don't include MacroLibrary.cmake, but add a cmake module which implement...Alexander Neundorf2006-03-203-6/+22
* STYLE: fix typosAlexander Neundorf2006-03-181-4/+3
* BUG: /DWIN32 and /D_WINDOWS should be defined for all configurations or if no...Brad King2006-03-161-30/+30
* BUG: When copying the module variables from shared library variables use doub...Brad King2006-03-161-2/+2
* ENH: after searching for kde-config in the special dirs, search again in theAlexander Neundorf2006-03-161-2/+14
* ENH: Enabling soname support on FreeBSD.Brad King2006-03-161-0/+2
* ENH: use c not cxxBill Hoffman2006-03-151-2/+2
* BUG: change the formatting of the pkgconfig module documentation so that itAlexander Neundorf2006-03-151-5/+11
* ENH: go back to finding the framework opengl on the macBill Hoffman2006-03-141-3/+1
* ENH: use standard include path for OpenGLBill Hoffman2006-03-141-1/+3
* ENH: add support for removing language flags from shared library and shared m...Bill Hoffman2006-03-141-0/+2
* ENH: add backwards compatibility fix for more aggressive find_path commandBill Hoffman2006-03-131-0/+7
* ENH: take advantage of new framework stuffBill Hoffman2006-03-111-2/+3
* ENH: new module to find the FindKDE4Internal.cmake installed by kdelibs4Alexander Neundorf2006-03-101-0/+60
* ENH: add correct initial flags for aixBill Hoffman2006-03-091-0/+4
* ENH: remove junkBill Hoffman2006-03-091-1/+1
* ENH: add real-world-tested and used KDE3 support, and obsolete FindKDE.cmake,...Alexander Neundorf2006-03-095-144/+617
* ENH: fix a bug in the find path stuff so that it can find headers deep in fra...Bill Hoffman2006-03-091-20/+0
* ENH: add a cmake module for using pkg-config, tested in kdelibs, ok by Bill H...Alexander Neundorf2006-03-081-0/+40
* ENH: add support for language flags that allow for universal binariesBill Hoffman2006-03-061-4/+4
* ENH: add support for language flags at rule expansion timeBill Hoffman2006-03-064-7/+7
* ENH: add support for manifest stuffBill Hoffman2006-03-061-3/+6
* ENH: try to fix non-clean dashboardsBill Hoffman2006-03-061-0/+6
* ENH: add manifest support for 2005Bill Hoffman2006-03-031-8/+15
* ENH: look for VCExpress firstBill Hoffman2006-03-031-1/+1
* ENH: Add verbose flag to package maker and add CFBundleIdentifier stringAndy Cedilnik2006-03-031-0/+2
* ENH: check in new find stuffBill Hoffman2006-03-027-0/+15
* ENH: fix for bug 2921, move _OVERRIDE variable to a better position to allow ...Bill Hoffman2006-03-024-1/+57
* ENH: Several changes to for NSISAndy Cedilnik2006-03-012-14/+31
* ENH: Install system libraries only if project requires themAndy Cedilnik2006-03-012-30/+29
* ENH: Add resource files for PackageMakerAndy Cedilnik2006-02-281-3/+16
* BUG: Fix typoAndy Cedilnik2006-02-281-1/+1
d' style='width: 0.3%;'/> -rw-r--r--src/corelib/statemachine/qstatemachine.cpp3
-rw-r--r--src/corelib/tools/qchar.cpp38
-rw-r--r--src/corelib/tools/qcontiguouscache.h22
-rw-r--r--src/corelib/tools/qeasingcurve.cpp176
-rw-r--r--src/corelib/tools/qlocale.cpp6
-rw-r--r--src/corelib/tools/qstring.cpp46
-rw-r--r--src/corelib/tools/qstringlist.cpp1
-rw-r--r--src/corelib/tools/qstringlist.h1
-rw-r--r--src/corelib/tools/qstringmatcher.h11
-rw-r--r--src/gui/accessible/qaccessible.h1
-rw-r--r--src/gui/accessible/qaccessible_win.cpp2
-rw-r--r--src/gui/embedded/qscreenproxy_qws.cpp8
-rw-r--r--src/gui/graphicsview/qgraphicsscene.cpp35
-rw-r--r--src/gui/graphicsview/qgraphicsscene.h5
-rw-r--r--src/gui/image/qimage.cpp9
-rw-r--r--src/gui/image/qpixmap.cpp70
-rw-r--r--src/gui/image/qpixmapcache.cpp14
-rw-r--r--src/gui/kernel/qapplication.cpp10
-rw-r--r--src/gui/kernel/qapplication_p.h141
-rw-r--r--src/gui/kernel/qapplication_win.cpp16
-rw-r--r--src/opengl/gl2paintengineex/qglengineshadermanager.cpp22
-rw-r--r--src/opengl/gl2paintengineex/qglengineshadermanager_p.h3
-rw-r--r--src/opengl/gl2paintengineex/qglgradientcache.cpp29
-rw-r--r--src/opengl/gl2paintengineex/qglgradientcache_p.h27
-rw-r--r--src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp39
-rw-r--r--src/opengl/qgl.cpp159
-rw-r--r--src/opengl/qgl.h1
-rw-r--r--src/opengl/qgl_p.h95
-rw-r--r--src/opengl/qglextensions_p.h2
-rw-r--r--src/opengl/qpixmapdata_gl.cpp3
-rw-r--r--src/qt3support/dialogs/q3tabdialog.cpp2
-rw-r--r--src/qt3support/itemviews/q3table.cpp2
-rw-r--r--src/qt3support/widgets/q3scrollview.cpp4
-rw-r--r--src/svg/qsvghandler.cpp25
-rw-r--r--src/svg/qsvgstyle.cpp38
-rw-r--r--src/svg/qsvgstyle_p.h1
-rw-r--r--src/testlib/qtestcase.cpp8
-rw-r--r--src/xmlpatterns/api/qabstractxmlforwarditerator_p.h15
-rw-r--r--src/xmlpatterns/api/qxmlschema.cpp4
-rw-r--r--src/xmlpatterns/api/qxmlschema_p.cpp4
-rw-r--r--src/xmlpatterns/api/qxmlschemavalidator.cpp4
-rw-r--r--src/xmlpatterns/functions/qsequencegeneratingfns.cpp13
-rw-r--r--src/xmlpatterns/type/qprimitives_p.h24
-rw-r--r--src/xmlpatterns/utils/qpatternistlocale_p.h3
-rw-r--r--tests/auto/bic/tst_bic.cpp6
-rw-r--r--tests/auto/compilerwarnings/tst_compilerwarnings.cpp6
-rw-r--r--tests/auto/moc/tst_moc.cpp20
-rw-r--r--tests/auto/qapplication/tst_qapplication.cpp2
-rw-r--r--tests/auto/qbytearray/tst_qbytearray.cpp2
-rw-r--r--tests/auto/qclipboard/tst_qclipboard.cpp2
-rw-r--r--tests/auto/qcopchannel/tst_qcopchannel.cpp2
-rw-r--r--tests/auto/qdir/tst_qdir.cpp17
-rw-r--r--tests/auto/qdirectpainter/tst_qdirectpainter.cpp4
-rw-r--r--tests/auto/qfile/tst_qfile.cpp28
-rw-r--r--tests/auto/qobject/tst_qobject.cpp4
-rw-r--r--tests/auto/qprocess/tst_qprocess.cpp5
-rw-r--r--tests/auto/qsettings/tst_qsettings.cpp6
-rw-r--r--tests/auto/qstatemachine/tst_qstatemachine.cpp23
-rw-r--r--tests/auto/qtextcodec/tst_qtextcodec.cpp4
-rw-r--r--tests/auto/qurl/tst_qurl.cpp100
-rwxr-xr-xtests/auto/test.pl2
-rw-r--r--tools/configure/configureapp.cpp2
-rw-r--r--tools/configure/main.cpp2
-rw-r--r--tools/linguist/shared/profileevaluator.cpp2
-rw-r--r--tools/linguist/shared/profileevaluator.h2
127 files changed, 1211 insertions, 1111 deletions
diff --git a/configure b/configure
index 60222a7..b65e6d5 100755
--- a/configure
+++ b/configure
@@ -3771,7 +3771,7 @@ elif [ "$Edition" = "OpenSource" ]; then
read acceptance
fi
echo
- if [ "$acceptance" = "yes" ]; then
+ if [ "$acceptance" = "yes" ] || [ "$acceptance" = "y" ]; then
break
elif [ "$acceptance" = "no" ]; then
echo "You are not licensed to use this software."
@@ -6065,6 +6065,7 @@ fi
#
canBuildQtXmlPatterns="yes"
canBuildWebKit="$HAVE_STL"
+canBuildQtConcurrent="yes"
# WebKit requires stdint.h
"$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/stdint "Stdint" $L_FLAGS $I_FLAGS $l_FLAGS
@@ -6096,9 +6097,9 @@ case "$XPLATFORM" in
case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
4*|3.4*)
;;
- 3.3*)
- canBuildWebKit="no"
- ;;
+ 3.3*)
+ canBuildWebKit="no"
+ ;;
*)
canBuildWebKit="no"
canBuildQtXmlPatterns="no"
@@ -6106,30 +6107,72 @@ case "$XPLATFORM" in
esac
;;
solaris-cc*)
- # Check the compiler version
- case `${QMAKE_CONF_COMPILER} -V 2>&1 | awk '{print $4}'` in
- *)
- canBuildWebKit="no"
- canBuildQtXmlPatterns="no"
- ;;
- esac
- ;;
+ # Check the compiler version
+ case `${QMAKE_CONF_COMPILER} -V 2>&1 | awk '{print $4}'` in
+ 5.[012345678])
+ canBuildWebKit="no"
+ canBuildQtXmlPatterns="no"
+ canBuildQtConcurrent="no"
+ ;;
+ 5.9)
+ canBuildWebKit="no"
+ ;;
+ esac
+ ;;
hpux-acc*)
canBuildWebKit="no"
canBuildQtXmlPatterns="no"
+ canBuildQtConcurrent="no"
;;
hpuxi-acc*)
canBuildWebKit="no"
;;
aix-xlc*)
- canBuildWebKit="no"
- canBuildQtXmlPatterns="no"
- ;;
+ # Get the xlC version
+ cat > xlcver.c <<EOF
+#include <stdio.h>
+int main()
+{
+ printf("%d.%d\n", __xlC__ >> 8, __xlC__ & 0xFF);
+ return 0;
+}
+EOF
+ xlcver=
+ if ${QMAKE_CONF_COMPILER} -o xlcver xlcver.c >/dev/null 2>/dev/null; then
+ xlcver=`./xlcver 2>/dev/null`
+ rm -f ./xlcver
+ fi
+ if [ "$OPT_VERBOSE" = "yes" ]; then
+ if [ -n "$xlcver" ]; then
+ echo Found IBM xlC version: $xlcver.
+ else
+ echo Could not determine IBM xlC version, assuming oldest supported.
+ fi
+ fi
+
+ case "$xlcver" in
+ [123456].*)
+ canBuildWebKit="no"
+ canBuildQtXmlPatterns="no"
+ canBuildQtConcurrent="no"
+ ;;
+ *)
+ canBuildWebKit="no"
+ ;;
+ esac
+ ;;
irix-cc*)
canBuildWebKit="no"
+ canBuildQtConcurrent="no"
;;
esac
+CFG_CONCURRENT="yes"
+if [ "$canBuildQtConcurrent" = "no" ]; then
+ QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CONCURRENT"
+ CFG_CONCURRENT="no"
+fi
+
if [ "$CFG_XMLPATTERNS" = "yes" -a "$CFG_EXCEPTIONS" = "no" ]; then
echo "QtXmlPatterns was requested, but it can't be built due to exceptions being disabled."
exit 1
@@ -7039,6 +7082,7 @@ echo "Qt 3 compatibility .. $CFG_QT3SUPPORT"
[ "$CFG_DBUS" = "no" ] && echo "QtDBus module ....... no"
[ "$CFG_DBUS" = "yes" ] && echo "QtDBus module ....... yes (run-time)"
[ "$CFG_DBUS" = "linked" ] && echo "QtDBus module ....... yes (linked)"
+echo "QtConcurrent code.... $CFG_CONCURRENT"
echo "QtScriptTools module $CFG_SCRIPTTOOLS"
echo "QtXmlPatterns module $CFG_XMLPATTERNS"
echo "Phonon module ....... $CFG_PHONON"
diff --git a/configure.exe b/configure.exe
index b4b7c50..5c5c199 100644
--- a/configure.exe
+++ b/configure.exe
Binary files differ
diff --git a/dist/changes-4.6.0 b/dist/changes-4.6.0
index bef2923..6c7e450 100644
--- a/dist/changes-4.6.0
+++ b/dist/changes-4.6.0
@@ -72,5 +72,18 @@ information about a particular change.
QGraphicsWidget and QGraphicsProxyWidget).
- QDesktopWidget on X11 no longer emits the resized(int) signal when screens
- are added or removed. This was not done on other platforms. Use the
+ are added or removed. This was not done on other platforms. Use the
screenCountChanged signal instead
+
+- QUrl's parser is more strict when for hostnames in URLs. QUrl now
+ enforces STD 3 rules:
+
+ * each individual hostname section (between dots) must be at most
+ 63 ASCII characters in length;
+
+ * only letters, digits, and the hyphen character are allowed in the
+ ASCII range; letters outside the ASCII range follow the normal
+ IDN rules
+
+ That means QUrl no longer accepts some URLs that were invalid
+ before, but weren't interpreted as such.
diff --git a/doc/src/diagrams/programs/easingcurve/main.cpp b/doc/src/diagrams/programs/easingcurve/main.cpp
index 8a2d53b..f249dbc 100644
--- a/doc/src/diagrams/programs/easingcurve/main.cpp
+++ b/doc/src/diagrams/programs/easingcurve/main.cpp
@@ -85,32 +85,37 @@ void createCurveIcons()
qreal curveScale = iconSize.height()/2;
- painter.drawLine(yAxis - 2, xAxis - curveScale, yAxis + 2, xAxis - curveScale); // hor
+ painter.drawLine(yAxis - 2, xAxis - curveScale, yAxis + 2, xAxis - curveScale); // hor
painter.drawLine(yAxis + curveScale, xAxis + 2, yAxis + curveScale, xAxis - 2); // ver
painter.drawText(yAxis + curveScale - 8, xAxis - curveScale - 4, QLatin1String("(1,1)"));
-
+
painter.drawText(yAxis + 42, xAxis + 10, QLatin1String("progress"));
- painter.drawText(15, xAxis - curveScale - 10, QLatin1String("ease"));
-
- painter.setPen(QPen(Qt::red, 1, Qt::DotLine));
+ painter.drawText(15, xAxis - curveScale - 10, QLatin1String("value"));
+
+ painter.setPen(QPen(Qt::red, 1, Qt::DotLine));
painter.drawLine(yAxis, xAxis - curveScale, yAxis + curveScale, xAxis - curveScale); // hor
painter.drawLine(yAxis + curveScale, xAxis, yAxis + curveScale, xAxis - curveScale); // ver
-
- QPoint currentPos(yAxis, xAxis);
-
+
+ QPoint start(yAxis, xAxis - curveScale * curve.valueForProgress(0));
+
painter.setPen(Qt::black);
QFont font = oldFont;
font.setPixelSize(oldFont.pixelSize() + 15);
painter.setFont(font);
painter.drawText(0, iconSize.height() - 20, iconSize.width(), 20, Qt::AlignHCenter, name);
-
- for (qreal t = 0; t < 1.0; t+=1.0/curveScale) {
+
+ QPainterPath curvePath;
+ curvePath.moveTo(start);
+ for (qreal t = 0; t <= 1.0; t+=1.0/curveScale) {
QPoint to;
to.setX(yAxis + curveScale * t);
to.setY(xAxis - curveScale * curve.valueForProgress(t));
- painter.drawLine(currentPos, to);
- currentPos = to;
+ curvePath.lineTo(to);
}
+ painter.setRenderHint(QPainter::Antialiasing, true);
+ painter.strokePath(curvePath, QColor(32, 32, 32));
+ painter.setRenderHint(QPainter::Antialiasing, false);
+
QString fileName(QString::fromAscii("qeasingcurve-%1.png").arg(name.toLower()));
printf("%s\n", qPrintable(fileName));
pix.save(QString::fromAscii("%1/%2").arg(output).arg(fileName), "PNG");
diff --git a/doc/src/images/qeasingcurve-cosinecurve.png b/doc/src/images/qeasingcurve-cosinecurve.png
index b27e763..8cee978 100644
--- a/doc/src/images/qeasingcurve-cosinecurve.png
+++ b/doc/src/images/qeasingcurve-cosinecurve.png
Binary files differ
diff --git a/doc/src/images/qeasingcurve-inback.png b/doc/src/images/qeasingcurve-inback.png
index 8506c0f..0064cb3 100644
--- a/doc/src/images/qeasingcurve-inback.png
+++ b/doc/src/images/qeasingcurve-inback.png
Binary files differ
diff --git a/doc/src/images/qeasingcurve-inbounce.png b/doc/src/images/qeasingcurve-inbounce.png
index 275b38c..eaa64f8 100644
--- a/doc/src/images/qeasingcurve-inbounce.png
+++ b/doc/src/images/qeasingcurve-inbounce.png
Binary files differ
diff --git a/doc/src/images/qeasingcurve-incirc.png b/doc/src/images/qeasingcurve-incirc.png
index b985e9c..7bd0f09 100644
--- a/doc/src/images/qeasingcurve-incirc.png
+++ b/doc/src/images/qeasingcurve-incirc.png
Binary files differ
diff --git a/doc/src/images/qeasingcurve-incubic.png b/doc/src/images/qeasingcurve-incubic.png
index e417ee1..1ac9eaf 100644
--- a/doc/src/images/qeasingcurve-incubic.png
+++ b/doc/src/images/qeasingcurve-incubic.png
Binary files differ
diff --git a/doc/src/images/qeasingcurve-incurve.png b/doc/src/images/qeasingcurve-incurve.png
index d9a9340..578259e 100644
--- a/doc/src/images/qeasingcurve-incurve.png
+++ b/doc/src/images/qeasingcurve-incurve.png
Binary files differ
diff --git a/doc/src/images/qeasingcurve-inelastic.png b/doc/src/images/qeasingcurve-inelastic.png
index b242fd3..f976b5a 100644
--- a/doc/src/images/qeasingcurve-inelastic.png
+++ b/doc/src/images/qeasingcurve-inelastic.png
Binary files differ
diff --git a/doc/src/images/qeasingcurve-inexpo.png b/doc/src/images/qeasingcurve-inexpo.png
index f06316c..1af3652 100644
--- a/doc/src/images/qeasingcurve-inexpo.png
+++ b/doc/src/images/qeasingcurve-inexpo.png
Binary files differ
diff --git a/doc/src/images/qeasingcurve-inoutback.png b/doc/src/images/qeasingcurve-inoutback.png
index 9fd1446..480bc05 100644
--- a/doc/src/images/qeasingcurve-inoutback.png
+++ b/doc/src/images/qeasingcurve-inoutback.png
Binary files differ
diff --git a/doc/src/images/qeasingcurve-inoutbounce.png b/doc/src/images/qeasingcurve-inoutbounce.png
index fb65f31..de62309 100644
--- a/doc/src/images/qeasingcurve-inoutbounce.png
+++ b/doc/src/images/qeasingcurve-inoutbounce.png
Binary files differ
diff --git a/doc/src/images/qeasingcurve-inoutcirc.png b/doc/src/images/qeasingcurve-inoutcirc.png
index 123cc54..b4be8ac 100644
--- a/doc/src/images/qeasingcurve-inoutcirc.png
+++ b/doc/src/images/qeasingcurve-inoutcirc.png
Binary files differ
diff --git a/doc/src/images/qeasingcurve-inoutcubic.png b/doc/src/images/qeasingcurve-inoutcubic.png
index b07695c..49dfbef 100644
--- a/doc/src/images/qeasingcurve-inoutcubic.png
+++ b/doc/src/images/qeasingcurve-inoutcubic.png
Binary files differ
diff --git a/doc/src/images/qeasingcurve-inoutelastic.png b/doc/src/images/qeasingcurve-inoutelastic.png
index 65851e1..5b0e54a 100644
--- a/doc/src/images/qeasingcurve-inoutelastic.png
+++ b/doc/src/images/qeasingcurve-inoutelastic.png
Binary files differ
diff --git a/doc/src/images/qeasingcurve-inoutexpo.png b/doc/src/images/qeasingcurve-inoutexpo.png
index 7cbfb13..776984a 100644
--- a/doc/src/images/qeasingcurve-inoutexpo.png
+++ b/doc/src/images/qeasingcurve-inoutexpo.png
Binary files differ
diff --git a/doc/src/images/qeasingcurve-inoutquad.png b/doc/src/images/qeasingcurve-inoutquad.png
index c5eed06..2643330 100644
--- a/doc/src/images/qeasingcurve-inoutquad.png
+++ b/doc/src/images/qeasingcurve-inoutquad.png
Binary files differ
diff --git a/doc/src/images/qeasingcurve-inoutquart.png b/doc/src/images/qeasingcurve-inoutquart.png
index 3b66c0d..31fc0c8 100644
--- a/doc/src/images/qeasingcurve-inoutquart.png
+++ b/doc/src/images/qeasingcurve-inoutquart.png
Binary files differ
diff --git a/doc/src/images/qeasingcurve-inoutquint.png b/doc/src/images/qeasingcurve-inoutquint.png
index c74efe9..4d7a745 100644
--- a/doc/src/images/qeasingcurve-inoutquint.png
+++ b/doc/src/images/qeasingcurve-inoutquint.png
Binary files differ
diff --git a/doc/src/images/qeasingcurve-inoutsine.png b/doc/src/images/qeasingcurve-inoutsine.png
index 5964f31..012ff75 100644
--- a/doc/src/images/qeasingcurve-inoutsine.png
+++ b/doc/src/images/qeasingcurve-inoutsine.png
Binary files differ
diff --git a/doc/src/images/qeasingcurve-inquad.png b/doc/src/images/qeasingcurve-inquad.png
index 3373310..e697c20 100644
--- a/doc/src/images/qeasingcurve-inquad.png
+++ b/doc/src/images/qeasingcurve-inquad.png
Binary files differ
diff --git a/doc/src/images/qeasingcurve-inquart.png b/doc/src/images/qeasingcurve-inquart.png
index 28086d8..6d65175 100644
--- a/doc/src/images/qeasingcurve-inquart.png
+++ b/doc/src/images/qeasingcurve-inquart.png
Binary files differ
diff --git a/doc/src/images/qeasingcurve-inquint.png b/doc/src/images/qeasingcurve-inquint.png
index 330aa85..faaaea7 100644
--- a/doc/src/images/qeasingcurve-inquint.png
+++ b/doc/src/images/qeasingcurve-inquint.png
Binary files differ
diff --git a/doc/src/images/qeasingcurve-insine.png b/doc/src/images/qeasingcurve-insine.png
index 63d9238..0944903 100644
--- a/doc/src/images/qeasingcurve-insine.png
+++ b/doc/src/images/qeasingcurve-insine.png
Binary files differ
diff --git a/doc/src/images/qeasingcurve-linear.png b/doc/src/images/qeasingcurve-linear.png
index 2a05885..fb3aaf3 100644
--- a/doc/src/images/qeasingcurve-linear.png
+++ b/doc/src/images/qeasingcurve-linear.png
Binary files differ
diff --git a/doc/src/images/qeasingcurve-outback.png b/doc/src/images/qeasingcurve-outback.png
index 7cb34c6..83b3fa2 100644
--- a/doc/src/images/qeasingcurve-outback.png
+++ b/doc/src/images/qeasingcurve-outback.png
Binary files differ
diff --git a/doc/src/images/qeasingcurve-outbounce.png b/doc/src/images/qeasingcurve-outbounce.png
index 932fc16..27ac979 100644
--- a/doc/src/images/qeasingcurve-outbounce.png
+++ b/doc/src/images/qeasingcurve-outbounce.png
Binary files differ
diff --git a/doc/src/images/qeasingcurve-outcirc.png b/doc/src/images/qeasingcurve-outcirc.png
index a1a6cb6..0019370 100644
--- a/doc/src/images/qeasingcurve-outcirc.png
+++ b/doc/src/images/qeasingcurve-outcirc.png
Binary files differ
diff --git a/doc/src/images/qeasingcurve-outcubic.png b/doc/src/images/qeasingcurve-outcubic.png
index aa1d604..45477c0 100644
--- a/doc/src/images/qeasingcurve-outcubic.png
+++ b/doc/src/images/qeasingcurve-outcubic.png
Binary files differ
diff --git a/doc/src/images/qeasingcurve-outcurve.png b/doc/src/images/qeasingcurve-outcurve.png
index a949ae4..295b471 100644
--- a/doc/src/images/qeasingcurve-outcurve.png
+++ b/doc/src/images/qeasingcurve-outcurve.png
Binary files differ
diff --git a/doc/src/images/qeasingcurve-outelastic.png b/doc/src/images/qeasingcurve-outelastic.png
index 2a9ba39..1d407ed 100644
--- a/doc/src/images/qeasingcurve-outelastic.png
+++ b/doc/src/images/qeasingcurve-outelastic.png
Binary files differ
diff --git a/doc/src/images/qeasingcurve-outexpo.png b/doc/src/images/qeasingcurve-outexpo.png
index e771c2e..5685155 100644
--- a/doc/src/images/qeasingcurve-outexpo.png
+++ b/doc/src/images/qeasingcurve-outexpo.png
Binary files differ
diff --git a/doc/src/images/qeasingcurve-outinback.png b/doc/src/images/qeasingcurve-outinback.png
index 7523727..4700ab0 100644
--- a/doc/src/images/qeasingcurve-outinback.png
+++ b/doc/src/images/qeasingcurve-outinback.png
Binary files differ
diff --git a/doc/src/images/qeasingcurve-outinbounce.png b/doc/src/images/qeasingcurve-outinbounce.png
index ab73d02..12cc1a8 100644
--- a/doc/src/images/qeasingcurve-outinbounce.png
+++ b/doc/src/images/qeasingcurve-outinbounce.png
Binary files differ
diff --git a/doc/src/images/qeasingcurve-outincirc.png b/doc/src/images/qeasingcurve-outincirc.png
index ec4b8d3..c8a5c86 100644
--- a/doc/src/images/qeasingcurve-outincirc.png
+++ b/doc/src/images/qeasingcurve-outincirc.png
Binary files differ
diff --git a/doc/src/images/qeasingcurve-outincubic.png b/doc/src/images/qeasingcurve-outincubic.png
index 8b8ae68..42af870 100644
--- a/doc/src/images/qeasingcurve-outincubic.png
+++ b/doc/src/images/qeasingcurve-outincubic.png
Binary files differ
diff --git a/doc/src/images/qeasingcurve-outinelastic.png b/doc/src/images/qeasingcurve-outinelastic.png
index 89dde2c..308be57 100644
--- a/doc/src/images/qeasingcurve-outinelastic.png
+++ b/doc/src/images/qeasingcurve-outinelastic.png
Binary files differ
diff --git a/doc/src/images/qeasingcurve-outinexpo.png b/doc/src/images/qeasingcurve-outinexpo.png
index 5909901..0692baa 100644
--- a/doc/src/images/qeasingcurve-outinexpo.png
+++ b/doc/src/images/qeasingcurve-outinexpo.png
Binary files differ
diff --git a/doc/src/images/qeasingcurve-outinquad.png b/doc/src/images/qeasingcurve-outinquad.png
index 7ddefee..9e3cd83 100644
--- a/doc/src/images/qeasingcurve-outinquad.png
+++ b/doc/src/images/qeasingcurve-outinquad.png
Binary files differ
diff --git a/doc/src/images/qeasingcurve-outinquart.png b/doc/src/images/qeasingcurve-outinquart.png
index 00ef597..9a3c16f 100644
--- a/doc/src/images/qeasingcurve-outinquart.png
+++ b/doc/src/images/qeasingcurve-outinquart.png
Binary files differ
diff --git a/doc/src/images/qeasingcurve-outinquint.png b/doc/src/images/qeasingcurve-outinquint.png
index 361bfaa4..add9feb 100644
--- a/doc/src/images/qeasingcurve-outinquint.png
+++ b/doc/src/images/qeasingcurve-outinquint.png
Binary files differ
diff --git a/doc/src/images/qeasingcurve-outinsine.png b/doc/src/images/qeasingcurve-outinsine.png
index 1737041..4bc2aaf 100644
--- a/doc/src/images/qeasingcurve-outinsine.png
+++ b/doc/src/images/qeasingcurve-outinsine.png
Binary files differ
diff --git a/doc/src/images/qeasingcurve-outquad.png b/doc/src/images/qeasingcurve-outquad.png
index 6f27cbd..c505ff9 100644
--- a/doc/src/images/qeasingcurve-outquad.png
+++ b/doc/src/images/qeasingcurve-outquad.png
Binary files differ
diff --git a/doc/src/images/qeasingcurve-outquart.png b/doc/src/images/qeasingcurve-outquart.png
index d45a0b8..6eac058 100644
--- a/doc/src/images/qeasingcurve-outquart.png
+++ b/doc/src/images/qeasingcurve-outquart.png
Binary files differ
diff --git a/doc/src/images/qeasingcurve-outquint.png b/doc/src/images/qeasingcurve-outquint.png
index 6e7df0e..77a9ad4 100644
--- a/doc/src/images/qeasingcurve-outquint.png
+++ b/doc/src/images/qeasingcurve-outquint.png
Binary files differ
diff --git a/doc/src/images/qeasingcurve-outsine.png b/doc/src/images/qeasingcurve-outsine.png
index 7546a0d..d135b2f 100644
--- a/doc/src/images/qeasingcurve-outsine.png
+++ b/doc/src/images/qeasingcurve-outsine.png
Binary files differ
diff --git a/doc/src/images/qeasingcurve-sinecurve.png b/doc/src/images/qeasingcurve-sinecurve.png
index ca67d44..6134a01 100644
--- a/doc/src/images/qeasingcurve-sinecurve.png
+++ b/doc/src/images/qeasingcurve-sinecurve.png
Binary files differ
diff --git a/examples/animation/stickman/editor/animationdialog.cpp b/examples/animation/stickman/editor/animationdialog.cpp
deleted file mode 100644
index 853046d..0000000
--- a/examples/animation/stickman/editor/animationdialog.cpp
+++ /dev/null
@@ -1,192 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtCore module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
-**
-** 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.0, 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 are unsure which license is appropriate for your use, please
-** contact the sales department at http://www.qtsoftware.com/contact.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "animationdialog.h"
-#include "stickman.h"
-#include "animation.h"
-#include "node.h"
-
-#include <QHBoxLayout>
-#include <QStackedWidget>
-#include <QSpinBox>
-#include <QPushButton>
-#include <QLabel>
-#include <QLineEdit>
-#include <QMessageBox>
-#include <QFileDialog>
-
-AnimationDialog::AnimationDialog(StickMan *stickman, QWidget *parent)
- : QDialog(parent), m_animation(0), m_stickman(stickman)
-{
- initUi();
-}
-
-AnimationDialog::~AnimationDialog()
-{
- delete m_animation;
-}
-
-void AnimationDialog::initUi()
-{
- setWindowTitle("Animation");
- setEnabled(false);
-
- // Second page
- m_currentFrame = new QSpinBox();
- m_totalFrames = new QSpinBox();
- m_name = new QLineEdit();
-
- connect(m_currentFrame, SIGNAL(valueChanged(int)), this, SLOT(currentFrameChanged(int)));
- connect(m_totalFrames, SIGNAL(valueChanged(int)), this, SLOT(totalFramesChanged(int)));
- connect(m_name, SIGNAL(textChanged(QString)), this, SLOT(setCurrentAnimationName(QString)));
-
- QGridLayout *gridLayout = new QGridLayout(this);
- gridLayout->addWidget(new QLabel("Name:"), 0, 0, 1, 2);
- gridLayout->addWidget(m_name, 0, 2, 1, 2);
- gridLayout->addWidget(new QLabel("Frame:"), 1, 0);
- gridLayout->addWidget(m_currentFrame, 1, 1);
- gridLayout->addWidget(new QLabel("of total # of frames: "), 1, 2);
- gridLayout->addWidget(m_totalFrames, 1, 3);
-}
-
-void AnimationDialog::initFromAnimation()
-{
- m_currentFrame->setRange(0, m_animation->totalFrames()-1);
- m_currentFrame->setValue(m_animation->currentFrame());
-
- m_totalFrames->setRange(1, 1000);
- m_totalFrames->setValue(m_animation->totalFrames());
-
- m_name->setText(m_animation->name());
-}
-
-void AnimationDialog::saveAnimation()
-{
- saveCurrentFrame();
-
- QString fileName = QFileDialog::getSaveFileName(this, "Save animation");
-
- QFile file(fileName);
- if (file.open(QIODevice::WriteOnly))
- m_animation->save(&file);
-}
-
-void AnimationDialog::loadAnimation()
-{
- if (maybeSave() != QMessageBox::Cancel) {
- QString fileName = QFileDialog::getOpenFileName(this, "Open animation");
-
- QFile file(fileName);
- if (file.open(QIODevice::ReadOnly)) {
- if (m_animation == 0)
- newAnimation();
-
- m_animation->load(&file);
- stickManFromCurrentFrame();
- initFromAnimation();
- }
- }
-}
-
-QMessageBox::StandardButton AnimationDialog::maybeSave()
-{
- if (m_animation == 0)
- return QMessageBox::No;
-
- QMessageBox::StandardButton button = QMessageBox::question(this, "Save?", "Do you want to save your changes?",
- QMessageBox::Save | QMessageBox::Discard | QMessageBox::Cancel);
- if (button == QMessageBox::Save)
- saveAnimation();
-
- return button;
-}
-
-void AnimationDialog::newAnimation()
-{
- if (maybeSave() != QMessageBox::Cancel) {
- setEnabled(true);
- delete m_animation;
- m_animation = new Animation();
- initFromAnimation();
- }
-}
-
-// Gets the data from the stickman and stores it in current frame
-void AnimationDialog::saveCurrentFrame()
-{
- int count = m_stickman->nodeCount();
- m_animation->setNodeCount(count);
- for (int i=0; i<count; ++i) {
- QGraphicsItem *node = m_stickman->node(i);
- m_animation->setNodePos(i, node->pos());
- }
-}
-
-// Gets the data from the current frame and sets the stickman
-void AnimationDialog::stickManFromCurrentFrame()
-{
- int count = m_animation->nodeCount();
- for (int i=0;i<count;++i) {
- QGraphicsItem *node = m_stickman->node(i);
- node->setPos(m_animation->nodePos(i));
- }
-}
-
-void AnimationDialog::currentFrameChanged(int currentFrame)
-{
- saveCurrentFrame();
- qDebug("currentFrame: %d", currentFrame);
- m_animation->setCurrentFrame(currentFrame);
- stickManFromCurrentFrame();
- initFromAnimation();
-}
-
-void AnimationDialog::totalFramesChanged(int totalFrames)
-{
- m_animation->setTotalFrames(totalFrames);
- stickManFromCurrentFrame();
- initFromAnimation();
-}
-
-void AnimationDialog::setCurrentAnimationName(const QString &name)
-{
- m_animation->setName(name);
-}
diff --git a/examples/animation/stickman/editor/animationdialog.h b/examples/animation/stickman/editor/animationdialog.h
deleted file mode 100644
index 293f0d4..0000000
--- a/examples/animation/stickman/editor/animationdialog.h
+++ /dev/null
@@ -1,84 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtCore module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
-**
-** 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.0, 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 are unsure which license is appropriate for your use, please
-** contact the sales department at http://www.qtsoftware.com/contact.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef ANIMATIONDIALOG_H
-#define ANIMATIONDIALOG_H
-
-#include <QDialog>
-#include <QMessageBox>
-
-QT_BEGIN_NAMESPACE
-class QSpinBox;
-class QLineEdit;
-QT_END_NAMESPACE
-class StickMan;
-class Animation;
-class AnimationDialog: public QDialog
-{
- Q_OBJECT
-public:
- AnimationDialog(StickMan *stickMan, QWidget *parent = 0);
- ~AnimationDialog();
-
-public slots:
- void currentFrameChanged(int currentFrame);
- void totalFramesChanged(int totalFrames);
- void setCurrentAnimationName(const QString &name);
-
- void newAnimation();
- void saveAnimation();
- void loadAnimation();
-
-private:
- void saveCurrentFrame();
- void stickManFromCurrentFrame();
- void initFromAnimation();
- void initUi();
- QMessageBox::StandardButton maybeSave();
-
- QSpinBox *m_currentFrame;
- QSpinBox *m_totalFrames;
- QLineEdit *m_name;
- Animation *m_animation;
- StickMan *m_stickman;
-};
-
-#endif
diff --git a/examples/animation/stickman/editor/editor.pri b/examples/animation/stickman/editor/editor.pri
deleted file mode 100644
index 7ad9edb..0000000
--- a/examples/animation/stickman/editor/editor.pri
+++ /dev/null
@@ -1,2 +0,0 @@
-SOURCES += $$PWD/animationdialog.cpp $$PWD/mainwindow.cpp
-HEADERS += $$PWD/animationdialog.h $$PWD/mainwindow.h
diff --git a/examples/animation/stickman/editor/mainwindow.cpp b/examples/animation/stickman/editor/mainwindow.cpp
deleted file mode 100644
index e1d08cc..0000000
--- a/examples/animation/stickman/editor/mainwindow.cpp
+++ /dev/null
@@ -1,76 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtCore module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
-**
-** 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.0, 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 are unsure which license is appropriate for your use, please
-** contact the sales department at http://www.qtsoftware.com/contact.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "mainwindow.h"
-#include "animationdialog.h"
-#include "stickman.h"
-
-#include <QMenuBar>
-#include <QApplication>
-
-MainWindow::MainWindow(StickMan *stickMan)
-{
- initActions(stickMan);
-}
-
-MainWindow::~MainWindow()
-{
-}
-
-void MainWindow::initActions(StickMan *stickMan)
-{
- AnimationDialog *dialog = new AnimationDialog(stickMan, this);
- dialog->show();
-
- QMenu *fileMenu = menuBar()->addMenu("&File");
- QAction *loadAction = fileMenu->addAction("&Open");
- QAction *saveAction = fileMenu->addAction("&Save");
- QAction *exitAction = fileMenu->addAction("E&xit");
-
- QMenu *animationMenu = menuBar()->addMenu("&Animation");
- QAction *newAnimationAction = animationMenu->addAction("&New animation");
-
- connect(loadAction, SIGNAL(triggered()), dialog, SLOT(loadAnimation()));
- connect(saveAction, SIGNAL(triggered()), dialog, SLOT(saveAnimation()));
- connect(exitAction, SIGNAL(triggered()), QApplication::instance(), SLOT(quit()));
- connect(newAnimationAction, SIGNAL(triggered()), dialog, SLOT(newAnimation()));
-
-}
diff --git a/examples/animation/stickman/editor/mainwindow.h b/examples/animation/stickman/editor/mainwindow.h
deleted file mode 100644
index ef122d9..0000000
--- a/examples/animation/stickman/editor/mainwindow.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtCore module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
-**
-** 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.0, 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 are unsure which license is appropriate for your use, please
-** contact the sales department at http://www.qtsoftware.com/contact.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef MAINWINDOW_H
-#define MAINWINDOW_H
-
-#include <QMainWindow>
-
-class StickMan;
-class MainWindow: public QMainWindow
-{
-public:
- MainWindow(StickMan *stickMan);
- ~MainWindow();
-
-private:
- void initActions(StickMan *stickMan);
-};
-
-#endif
diff --git a/examples/animation/stickman/graphicsview.cpp b/examples/animation/stickman/graphicsview.cpp
index 760c31b..89f2430 100644
--- a/examples/animation/stickman/graphicsview.cpp
+++ b/examples/animation/stickman/graphicsview.cpp
@@ -40,7 +40,6 @@
****************************************************************************/
#include "graphicsview.h"
-#include "editor/mainwindow.h"
#include "stickman.h"
#include <QtGui/QKeyEvent>
@@ -53,28 +52,6 @@ void GraphicsView::keyPressEvent(QKeyEvent *e)
{
if (e->key() == Qt::Key_Escape)
close();
-
-#if 0
- if (e->key() == Qt::Key_F1) {
- if (m_editor == 0) {
- QGraphicsScene *scene = new QGraphicsScene;
- StickMan *stickMan = new StickMan;
- stickMan->setDrawSticks(true);
- scene->addItem(stickMan);
-
- QGraphicsView *view = new QGraphicsView;
- view->setBackgroundBrush(Qt::black);
- view->setRenderHints(QPainter::Antialiasing);
- view->setScene(scene);
-
- m_editor = new MainWindow(stickMan);
- m_editor->setCentralWidget(view);
- }
-
- m_editor->showMaximized();
- }
-#endif
-
emit keyPressed(Qt::Key(e->key()));
}
diff --git a/examples/animation/stickman/stickman.pro b/examples/animation/stickman/stickman.pro
index 1dbbce9..7f8be33 100644
--- a/examples/animation/stickman/stickman.pro
+++ b/examples/animation/stickman/stickman.pro
@@ -12,8 +12,6 @@ SOURCES += main.cpp \
INCLUDEPATH += $$PWD
-include(editor/editor.pri)
-
# install
target.path = $$[QT_INSTALL_EXAMPLES]/animation/stickman
sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS stickman.pro
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebdatabase.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebdatabase.cpp
index 7e85eaa..0d11381 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebdatabase.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebdatabase.cpp
@@ -34,9 +34,20 @@ using namespace WebCore;
\brief The QWebDatabase class provides access to HTML 5 databases created with JavaScript.
The upcoming HTML 5 standard includes support for SQL databases that web sites can create and
- access on a local computer through JavaScript. QWebDatabase is the C++ interface to these databases.
+ access on a local computer through JavaScript. QWebDatabase is the C++ interface to these
+ databases.
- For more information refer to the \l{http://www.w3.org/html/wg/html5/#sql}{HTML 5 Draft Standard}.
+ To get access to all databases defined by a security origin, use QWebSecurityOrigin::databases().
+ Each database has an internal name(), as well as a user-friendly name, provided by displayName().
+
+ WebKit uses SQLite to create and access the local SQL databases. The location of the database
+ file in the local file system is returned by fileName(). You can access the database directly
+ through the QtSql database module.
+
+ For each database the web site can define an expectedSize(). The current size of the database
+ in bytes is returned by size().
+
+ For more information refer to the \l{http://dev.w3.org/html5/webdatabase/}{HTML 5 Draft Standard}.
\sa QWebSecurityOrigin
*/
@@ -127,7 +138,7 @@ QWebDatabase::QWebDatabase(QWebDatabasePrivate* priv)
\endcode
\note Concurrent access to a database from multiple threads or processes
- is not very efficient because Sqlite is used as WebKit's database backend.
+ is not very efficient because SQLite is used as WebKit's database backend.
*/
QString QWebDatabase::fileName() const
{
@@ -149,8 +160,8 @@ QWebSecurityOrigin QWebDatabase::origin() const
}
/*!
- Removes the database \a db from its security origin. All data stored in this database
- will be destroyed.
+ Removes the database \a db from its security origin. All data stored in the
+ database \a db will be destroyed.
*/
void QWebDatabase::removeDatabase(const QWebDatabase &db)
{
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebsecurityorigin.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebsecurityorigin.cpp
index da9278c..d2eaf10 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebsecurityorigin.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebsecurityorigin.cpp
@@ -36,10 +36,9 @@ using namespace WebCore;
\brief The QWebSecurityOrigin class defines a security boundary for web sites.
QWebSecurityOrigin provides access to the security domains defined by web sites.
- An origin consists of a host name, a scheme, and a port number. Web sites with the same
- security origin can access each other's resources for client-side scripting or databases.
-
- ### diagram
+ An origin consists of a host name, a scheme, and a port number. Web sites
+ with the same security origin can access each other's resources for client-side
+ scripting or databases.
For example the site \c{http://www.example.com/my/page.html} is allowed to share the same
database as \c{http://www.example.com/my/overview.html}, or access each other's
@@ -47,7 +46,13 @@ using namespace WebCore;
\c{http://www.malicious.com/evil.html} from accessing \c{http://www.example.com/}'s resources,
because they are of a different security origin.
- QWebSecurity also provides access to all databases defined within a security origin.
+ Call QWebFrame::securityOrigin() to get the QWebSecurityOrigin for a frame in a
+ web page, and use host(), scheme() and port() to identify the security origin.
+
+ Use databases() to access the databases defined within a security origin. The
+ disk usage of the origin's databases can be limited with setDatabaseQuota().
+ databaseQuota() and databaseUsage() report the current limit as well as the
+ current usage.
For more information refer to the
\l{http://en.wikipedia.org/wiki/Same_origin_policy}{"Same origin policy" Wikipedia Article}.
diff --git a/src/corelib/concurrent/qfuture.h b/src/corelib/concurrent/qfuture.h
index 47015ee..f2db5ac 100644
--- a/src/corelib/concurrent/qfuture.h
+++ b/src/corelib/concurrent/qfuture.h
@@ -210,7 +210,7 @@ public:
bool operator==(const QFuture &other) const { return (d == other.d); }
bool operator!=(const QFuture &other) const { return (d != other.d); }
-#ifndef QT_NO_MEMBER_TEMPLATES
+#if !defined(QT_NO_MEMBER_TEMPLATES) && !defined(Q_CC_XLC)
template <typename T>
QFuture(const QFuture<T> &other)
: d(other.d)
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h
index 0ef48fa..7b16dff 100644
--- a/src/corelib/global/qglobal.h
+++ b/src/corelib/global/qglobal.h
@@ -665,7 +665,8 @@ namespace QT_NAMESPACE {}
# define Q_ALIGNOF(type) __alignof__(type)
# define Q_TYPEOF(expr) __typeof__(expr)
# define Q_DECL_ALIGN(n) __attribute__((__aligned__(n)))
-# define Q_DECL_EXPORT __attribute__((__visibility__("default")))
+// using CC 5.9: Warning: attribute visibility is unsupported and will be skipped..
+//# define Q_DECL_EXPORT __attribute__((__visibility__("default")))
# endif
# if !defined(_BOOL)
# define Q_NO_BOOL_TYPE
@@ -2407,28 +2408,15 @@ QT_LICENSED_MODULE(DBus)
# define QT_NO_QFUTURE
#endif
-/*
- Turn off certain features for compilers that have problems parsing
- the code.
-*/
-#if (defined(Q_CC_HPACC) && defined(QT_ARCH_PARISC)) \
- || defined(Q_CC_MIPS) \
- || defined(Q_CC_XLC)
-// HP aCC A.03.*, MIPSpro, and xlC cannot handle
-// the template function declarations for the QtConcurrent functions
-# define QT_NO_QFUTURE
-# define QT_NO_CONCURRENT
-#endif
-
-// MSVC 6.0, MSVC .NET 2002, and old versions of Sun CC can`t handle the map(), etc templates,
+// MSVC 6.0 and MSVC .NET 2002, can`t handle the map(), etc templates,
// but the QFuture class compiles.
-#if (defined(Q_CC_MSVC) && _MSC_VER <= 1300) || (defined (__SUNPRO_CC) && __SUNPRO_CC <= 0x590)
+#if (defined(Q_CC_MSVC) && _MSC_VER <= 1300)
# define QT_NO_CONCURRENT
#endif
-// Mingw uses a gcc 3 version which has problems with some of the
-// map/filter overloads. So does IRIX and Solaris.
-#if (defined(Q_OS_IRIX) || defined(Q_CC_MINGW) || defined (Q_OS_SOLARIS)) && (__GNUC__ < 4)
+// gcc 3 version has problems with some of the
+// map/filter overloads.
+#if defined(Q_CC_GNU) && (__GNUC__ < 4)
# define QT_NO_CONCURRENT_MAP
# define QT_NO_CONCURRENT_FILTER
#endif
diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp
index 180e9ec..79cd2f0 100644
--- a/src/corelib/io/qurl.cpp
+++ b/src/corelib/io/qurl.cpp
@@ -2336,12 +2336,12 @@ static const NameprepCaseFoldingEntry NameprepCaseFolding[] = {
{ 0x1D7BB, { 0x03C3, 0x0000, 0x0000, 0x0000 } }
};
-static void mapToLowerCase(QString *str)
+static void mapToLowerCase(QString *str, int from)
{
int N = sizeof(NameprepCaseFolding) / sizeof(NameprepCaseFolding[0]);
QChar *d = 0;
- for (int i = 0; i < str->size(); ++i) {
+ for (int i = from; i < str->size(); ++i) {
int uc = str->at(i).unicode();
if (uc < 0x80) {
if (uc <= 'Z' && uc >= 'A') {
@@ -2388,11 +2388,11 @@ static bool isMappedToNothing(const QChar &ch)
}
-static void stripProhibitedOutput(QString *str)
+static void stripProhibitedOutput(QString *str, int from)
{
- ushort *out = (ushort *)str->data();
+ ushort *out = (ushort *)str->data() + from;
const ushort *in = out;
- const ushort *end = out + str->size();
+ const ushort *end = (ushort *)str->data() + str->size();
while (in < end) {
ushort uc = *in;
if (uc < 0x80 ||
@@ -2901,66 +2901,99 @@ static bool isBidirectionalL(const QChar &ch)
return false;
}
+#ifdef QT_BUILD_INTERNAL
+// export for tst_qurl.cpp
+Q_AUTOTEST_EXPORT void qt_nameprep(QString *source, int from);
+Q_AUTOTEST_EXPORT bool qt_check_std3rules(const QChar *uc, int len);
+#else
+// non-test build, keep the symbols for ourselves
+static void qt_nameprep(QString *source, int from);
+static bool qt_check_std3rules(const QChar *uc, int len);
+#endif
-Q_AUTOTEST_EXPORT QString qt_nameprep(const QString &source)
+void qt_nameprep(QString *source, int from)
{
- QString mapped = source;
-
- bool simple = true;
- for (int i = 0; i < mapped.size(); ++i) {
- ushort uc = mapped.at(i).unicode();
+ QChar *src = source->data(); // causes a detach, so we're sure the only one using it
+ QChar *out = src + from;
+ const QChar *e = src + source->size();
+
+ for ( ; out < e; ++out) {
+ register ushort uc = out->unicode();
if (uc > 0x80) {
- simple = false;
break;
} else if (uc >= 'A' && uc <= 'Z') {
- mapped[i] = QChar(uc | 0x20);
+ *out = QChar(uc | 0x20);
}
}
- if (simple)
- return mapped;
-
+ if (out == e)
+ return; // everything was mapped easily (lowercased, actually)
+ int firstNonAscii = out - src;
+
// Characters commonly mapped to nothing are simply removed
// (Table B.1)
- QChar *out = mapped.data();
const QChar *in = out;
- const QChar *e = in + mapped.size();
while (in < e) {
if (!isMappedToNothing(*in))
*out++ = *in;
++in;
}
if (out != in)
- mapped.truncate(out - mapped.constData());
+ source->truncate(out - src);
// Map to lowercase (Table B.2)
- mapToLowerCase(&mapped);
+ mapToLowerCase(source, firstNonAscii);
// Normalize to Unicode 3.2 form KC
- mapped = mapped.normalized(QString::NormalizationForm_KC, QChar::Unicode_3_2);
+ extern void qt_string_normalize(QString *data, QString::NormalizationForm mode,
+ QChar::UnicodeVersion version, int from);
+ qt_string_normalize(source, QString::NormalizationForm_KC, QChar::Unicode_3_2, firstNonAscii);
// Strip prohibited output
- stripProhibitedOutput(&mapped);
+ stripProhibitedOutput(source, firstNonAscii);
// Check for valid bidirectional characters
bool containsLCat = false;
bool containsRandALCat = false;
- for (int j = 0; j < mapped.size() && (!containsLCat || !containsRandALCat); ++j) {
- if (isBidirectionalL(mapped.at(j)))
+ src = source->data();
+ e = src + source->size();
+ for (in = src + from; in < e && (!containsLCat || !containsRandALCat); ++in) {
+ if (isBidirectionalL(*in))
containsLCat = true;
- else if (isBidirectionalRorAL(mapped.at(j)))
+ else if (isBidirectionalRorAL(*in))
containsRandALCat = true;
}
if (containsRandALCat) {
- if (containsLCat || (!isBidirectionalRorAL(mapped.at(0))
- || !isBidirectionalRorAL(mapped.at(mapped.size() - 1))))
- mapped.clear();
+ if (containsLCat || (!isBidirectionalRorAL(src[from])
+ || !isBidirectionalRorAL(e[-1])))
+ source->resize(from); // not allowed, clear the label
}
+}
+
+bool qt_check_std3rules(const QChar *uc, int len)
+{
+ if (len > 63)
+ return false;
- return mapped;
+ for (int i = 0; i < len; ++i) {
+ register ushort c = uc[i].unicode();
+ if (c == '-' && (i == 0 || i == len - 1))
+ return false;
+
+ // verifying the absence of LDH is the same as verifying that
+ // only LDH is present
+ if (c == '-' || (c >= '0' && c <= '9')
+ || (c >= 'A' && c <= 'Z')
+ || (c >= 'a' && c <= 'z'))
+ continue;
+
+ return false;
+ }
+
+ return true;
}
-static inline char encodeDigit(uint digit)
+static inline uint encodeDigit(uint digit)
{
return digit + 22 + 75 * (digit < 26);
}
@@ -2977,7 +3010,7 @@ static inline uint adapt(uint delta, uint numpoints, bool firsttime)
return k + (((base - tmin + 1) * delta) / (delta + skew));
}
-static inline void appendEncode(QByteArray* output, uint& delta, uint& bias, uint& b, uint& h)
+static inline void appendEncode(QString* output, uint& delta, uint& bias, uint& b, uint& h)
{
uint qq;
uint k;
@@ -2991,17 +3024,17 @@ static inline void appendEncode(QByteArray* output, uint& delta, uint& bias, uin
t = (k <= bias) ? tmin : (k >= bias + tmax) ? tmax : k - bias;
if (qq < t) break;
- *output += encodeDigit(t + (qq - t) % (base - t));
+ *output += QChar(encodeDigit(t + (qq - t) % (base - t)));
qq = (qq - t) / (base - t);
}
- *output += encodeDigit(qq);
+ *output += QChar(encodeDigit(qq));
bias = adapt(delta, h + 1, h == b);
delta = 0;
++h;
}
-static void toPunycodeHelper(const QChar *s, int ucLength, QByteArray *output)
+static void toPunycodeHelper(const QChar *s, int ucLength, QString *output)
{
uint n = initial_n;
uint delta = 0;
@@ -3010,7 +3043,7 @@ static void toPunycodeHelper(const QChar *s, int ucLength, QByteArray *output)
int outLen = output->length();
output->resize(outLen + ucLength);
- char *d = output->data() + outLen;
+ QChar *d = output->data() + outLen;
bool skipped = false;
// copy all basic code points verbatim to output.
for (uint j = 0; j < (uint) ucLength; ++j) {
@@ -3035,7 +3068,7 @@ static void toPunycodeHelper(const QChar *s, int ucLength, QByteArray *output)
// if basic code points were copied, add the delimiter character.
if (h > 0)
- *output += 0x2d;
+ *output += QChar(0x2d);
// while there are still unprocessed non-basic code points left in
// the input string...
@@ -3083,7 +3116,7 @@ static void toPunycodeHelper(const QChar *s, int ucLength, QByteArray *output)
}
// prepend ACE prefix
- output->insert(outLen, "xn--");
+ output->insert(outLen, QLatin1String("xn--"));
return;
}
@@ -3144,11 +3177,15 @@ static bool qt_is_idn_enabled(const QString &domain)
int idx = domain.lastIndexOf(QLatin1Char('.'));
if (idx == -1)
return false;
- const QChar *tld = domain.constData() + idx + 1;
+
int len = domain.size() - idx - 1;
+ QString tldString(domain.constData() + idx + 1, len);
+ qt_nameprep(&tldString, 0);
+
+ const QChar *tld = tldString.constData();
if (user_idn_whitelist)
- return user_idn_whitelist->contains(QString(tld, len));
+ return user_idn_whitelist->contains(tldString);
int l = 0;
int r = sizeof(idn_whitelist)/sizeof(const char *) - 1;
@@ -3164,46 +3201,127 @@ static bool qt_is_idn_enabled(const QString &domain)
return equal(tld, len, idn_whitelist[i]);
}
-static QString qt_from_ACE(const QString &domainMC)
+static inline bool isDotDelimiter(ushort uc)
{
- QString domain = domainMC.toLower();
- int idx = domain.indexOf(QLatin1Char('.'));
- if (idx != -1) {
- if (!domain.contains(QLatin1String("xn--"))) {
- bool simple = true;
- for (int i = 0; i < domain.size(); ++i) {
- ushort ch = domain.at(i).unicode();
- if (ch > 'z' || ch < '-' || ch == '/' || (ch > '9' && ch < 'A') || (ch > 'Z' && ch < 'a')) {
+ // IDNA / rfc3490 describes these four delimiters used for
+ // separating labels in unicode international domain
+ // names.
+ return uc == 0x2e || uc == 0x3002 || uc == 0xff0e || uc == 0xff61;
+}
+
+static int nextDotDelimiter(const QString &domain, int from = 0)
+{
+ const QChar *b = domain.unicode();
+ const QChar *ch = b + from;
+ const QChar *e = b + domain.length();
+ while (ch < e) {
+ if (isDotDelimiter(ch->unicode()))
+ break;
+ else
+ ++ch;
+ }
+ return ch - b;
+}
+
+enum AceOperation { ToAceOnly, NormalizeAce };
+static QString qt_ACE_do(const QString &domain, AceOperation op)
+{
+ if (domain.isEmpty())
+ return domain;
+
+ QString result;
+ result.reserve(domain.length());
+
+ const bool isIdnEnabled = op == NormalizeAce ? qt_is_idn_enabled(domain) : false;
+ int lastIdx = 0;
+ QString aceForm; // this variable is here for caching
+
+ while (1) {
+ int idx = nextDotDelimiter(domain, lastIdx);
+ int labelLength = idx - lastIdx;
+ if (labelLength == 0)
+ return QString(); // two delimiters in a row -- empty label not allowed
+
+ // RFC 3490 says, about the ToASCII operation:
+ // 3. If the UseSTD3ASCIIRules flag is set, then perform these checks:
+ //
+ // (a) Verify the absence of non-LDH ASCII code points; that is, the
+ // absence of 0..2C, 2E..2F, 3A..40, 5B..60, and 7B..7F.
+ //
+ // (b) Verify the absence of leading and trailing hyphen-minus; that
+ // is, the absence of U+002D at the beginning and end of the
+ // sequence.
+ // and:
+ // 8. Verify that the number of code points is in the range 1 to 63
+ // inclusive.
+
+ // copy the label to the destination, which also serves as our scratch area, lowercasing it
+ int prevLen = result.size();
+ bool simple = true;
+ result.resize(prevLen + labelLength);
+ {
+ QChar *out = result.data() + prevLen;
+ const QChar *in = domain.constData() + lastIdx;
+ const QChar *e = in + labelLength;
+ for (; in < e; ++in, ++out) {
+ register ushort uc = in->unicode();
+ if (uc > 0x7f)
simple = false;
- break;
- }
+ if (uc >= 'A' && uc <= 'Z')
+ *out = QChar(uc | 0x20);
+ else
+ *out = *in;
}
- if (simple)
- return domain;
}
-
- const bool isIdnEnabled = qt_is_idn_enabled(domain);
- int lastIdx = 0;
- QString result;
- while (1) {
- // Nameprep the host. If the labels in the hostname are Punycode
- // encoded, we decode them immediately, then nameprep them.
- QByteArray label;
- toPunycodeHelper(domain.constData() + lastIdx, idx - lastIdx, &label);
- result += qt_nameprep(isIdnEnabled ? QUrl::fromPunycode(label) : QString::fromLatin1(label));
- lastIdx = idx + 1;
- if (lastIdx < domain.size() + 1)
- result += QLatin1Char('.');
- else
- break;
- idx = domain.indexOf(QLatin1Char('.'), lastIdx);
- if (idx == -1)
- idx = domain.size();
+
+ if (simple && labelLength > 6) {
+ // ACE form domains contain only ASCII characters, but we can't consider them simple
+ // is this an ACE form?
+ // the shortest valid ACE domain is 6 characters long (U+0080 would be 1, but it's not allowed)
+ static const ushort acePrefixUtf16[] = { 'x', 'n', '-', '-' };
+ if (memcmp(result.constData() + prevLen, acePrefixUtf16, sizeof acePrefixUtf16) == 0)
+ simple = false;
}
- return result;
- } else {
- return qt_nameprep(domain);
+
+ if (simple) {
+ // fastest case: this is the common case (non IDN-domains)
+ // so we're done
+ if (!qt_check_std3rules(result.constData() + prevLen, labelLength))
+ return QString();
+ } else {
+ // Punycode encoding and decoding cannot be done in-place
+ // That means we need one or two temporaries
+ qt_nameprep(&result, prevLen);
+ labelLength = result.length() - prevLen;
+ register int toReserve = labelLength + 4 + 6; // "xn--" plus some extra bytes
+ if (toReserve > aceForm.capacity())
+ aceForm.reserve(toReserve);
+ toPunycodeHelper(result.constData() + prevLen, result.size() - prevLen, &aceForm);
+
+ // We use resize()+memcpy() here because we're overwriting the data we've copied
+ if (isIdnEnabled) {
+ QString tmp = QUrl::fromPunycode(aceForm.toLatin1());
+ if (tmp.isEmpty())
+ return QString(); // shouldn't happen, since we've just punycode-encoded it
+ result.resize(prevLen + tmp.size());
+ memcpy(result.data() + prevLen, tmp.constData(), tmp.size() * sizeof(QChar));
+ } else {
+ result.resize(prevLen + aceForm.size());
+ memcpy(result.data() + prevLen, aceForm.constData(), aceForm.size() * sizeof(QChar));
+ }
+
+ if (!qt_check_std3rules(aceForm.constData(), aceForm.size()))
+ return QString();
+ }
+
+
+ lastIdx = idx + 1;
+ if (lastIdx < domain.size() + 1)
+ result += QLatin1Char('.');
+ else
+ break;
}
+ return result;
}
@@ -3246,12 +3364,27 @@ QUrlPrivate::QUrlPrivate(const QUrlPrivate &copy)
QString QUrlPrivate::canonicalHost() const
{
- if (QURL_HASFLAG(stateFlags, HostCanonicalized))
+ if (QURL_HASFLAG(stateFlags, HostCanonicalized) || host.isEmpty())
return host;
QUrlPrivate *that = const_cast<QUrlPrivate *>(this);
QURL_SETFLAG(that->stateFlags, HostCanonicalized);
- that->host = qt_from_ACE(host);
+ if (host.contains(QLatin1Char(':'))) {
+ // This is an IP Literal, use _IPLiteral to validate
+ QByteArray ba = host.toLatin1();
+ if (!ba.startsWith('[')) {
+ // surround the IP Literal with [ ] if it's not already done so
+ ba.reserve(ba.length() + 2);
+ ba.prepend('[');
+ ba.append(']');
+ }
+
+ const char *ptr = ba.constData();
+ if (!_IPLiteral(&ptr))
+ that->host.clear();
+ } else {
+ that->host = qt_ACE_do(host, NormalizeAce);
+ }
return that->host;
}
@@ -3737,7 +3870,10 @@ QByteArray QUrlPrivate::toEncoded(QUrl::FormattingOptions options) const
}
}
- url += QUrl::toAce(host);
+ if (host.startsWith(QLatin1Char('[')))
+ url += host.toLatin1();
+ else
+ url += QUrl::toAce(host);
if (!(options & QUrl::RemovePort) && port != -1) {
url += ':';
url += QString::number(port).toAscii();
@@ -4412,8 +4548,6 @@ void QUrl::setHost(const QString &host)
QURL_UNSETFLAG(d->stateFlags, QUrlPrivate::Validated | QUrlPrivate::Normalized | QUrlPrivate::HostCanonicalized);
d->host = host;
- if (d->host.contains(QLatin1Char(':')))
- d->host = QLatin1Char('[') + d->host + QLatin1Char(']');
}
/*!
@@ -5425,9 +5559,9 @@ QByteArray QUrl::toPercentEncoding(const QString &input, const QByteArray &exclu
*/
QByteArray QUrl::toPunycode(const QString &uc)
{
- QByteArray output;
+ QString output;
toPunycodeHelper(uc.constData(), uc.size(), &output);
- return output;
+ return output.toLatin1();
}
/*!
@@ -5528,7 +5662,7 @@ QString QUrl::fromPunycode(const QByteArray &pc)
*/
QString QUrl::fromAce(const QByteArray &domain)
{
- return qt_from_ACE(QString::fromLatin1(domain));
+ return qt_ACE_do(QString::fromLatin1(domain), NormalizeAce);
}
/*!
@@ -5545,26 +5679,8 @@ QString QUrl::fromAce(const QByteArray &domain)
*/
QByteArray QUrl::toAce(const QString &domain)
{
- // IDNA / rfc3490 describes these four delimiters used for
- // separating labels in unicode international domain
- // names.
- QString nameprepped = qt_nameprep(domain);
- int lastIdx = 0;
- QByteArray result;
- for (int i = 0; i < nameprepped.size(); ++i) {
- ushort uc = nameprepped.at(i).unicode();
- if (uc == 0x2e || uc == 0x3002 || uc == 0xff0e || uc == 0xff61) {
- if (lastIdx)
- result += '.';
- toPunycodeHelper(nameprepped.constData() + lastIdx, i - lastIdx, &result);
- lastIdx = i + 1;
- }
- }
- if (lastIdx)
- result += '.';
- toPunycodeHelper(nameprepped.constData() + lastIdx, nameprepped.size() - lastIdx, &result);
-
- return result;
+ QString result = qt_ACE_do(domain, ToAceOnly);
+ return result.toLatin1();
}
/*!
diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp
index eb1bd0b..6503ab0 100644
--- a/src/corelib/kernel/qobject.cpp
+++ b/src/corelib/kernel/qobject.cpp
@@ -854,7 +854,7 @@ QObject::~QObject()
QObjectPrivate::Connection::~Connection()
{
if (argumentTypes != &DIRECT_CONNECTION_ONLY)
- delete [] argumentTypes;
+ delete [] static_cast<int *>(argumentTypes);
}
diff --git a/src/corelib/statemachine/qstatemachine.cpp b/src/corelib/statemachine/qstatemachine.cpp
index bf3ee31..a00e7e1 100644
--- a/src/corelib/statemachine/qstatemachine.cpp
+++ b/src/corelib/statemachine/qstatemachine.cpp
@@ -2155,6 +2155,8 @@ QSignalEvent::~QSignalEvent()
Constructs a new QWrappedEvent object with the given \a object
and \a event.
+
+ The QWrappedEvent object takes ownership of \a event.
*/
QWrappedEvent::QWrappedEvent(QObject *object, QEvent *event)
: QEvent(QEvent::Wrapped), m_object(object), m_event(event)
@@ -2166,6 +2168,7 @@ QWrappedEvent::QWrappedEvent(QObject *object, QEvent *event)
*/
QWrappedEvent::~QWrappedEvent()
{
+ delete m_event;
}
/*!
diff --git a/src/corelib/tools/qchar.cpp b/src/corelib/tools/qchar.cpp
index 88053d6..458a383 100644
--- a/src/corelib/tools/qchar.cpp
+++ b/src/corelib/tools/qchar.cpp
@@ -1421,16 +1421,15 @@ QDataStream &operator>>(QDataStream &in, QChar &chr)
// ---------------------------------------------------------------------------
-static QString decomposeHelper
- (const QString &str, bool canonical, QChar::UnicodeVersion version)
+static void decomposeHelper(QString *str, bool canonical, QChar::UnicodeVersion version, int from)
{
unsigned short buffer[3];
- QString s = str;
+ QString &s = *str;
- const unsigned short *utf16 = s.utf16();
+ const unsigned short *utf16 = reinterpret_cast<unsigned short *>(s.data());
const unsigned short *uc = utf16 + s.length();
- while (uc != utf16) {
+ while (uc != utf16 + from) {
uint ucs4 = *(--uc);
if (QChar(ucs4).isLowSurrogate() && uc != utf16) {
ushort high = *(uc - 1);
@@ -1450,11 +1449,9 @@ static QString decomposeHelper
s.replace(uc - utf16, ucs4 > 0x10000 ? 2 : 1, (const QChar *)d, length);
// since the insert invalidates the pointers and we do decomposition recursive
int pos = uc - utf16;
- utf16 = s.utf16();
+ utf16 = reinterpret_cast<unsigned short *>(s.data());
uc = utf16 + pos + length;
}
-
- return s;
}
@@ -1489,21 +1486,21 @@ static ushort ligatureHelper(ushort u1, ushort u2)
return 0;
}
-static QString composeHelper(const QString &str)
+static void composeHelper(QString *str, int from)
{
- QString s = str;
+ QString &s = *str;
- if (s.length() < 2)
- return s;
+ if (s.length() - from < 2)
+ return;
// the loop can partly ignore high Unicode as all ligatures are in the BMP
int starter = 0;
int lastCombining = 0;
- int pos = 0;
+ int pos = from;
while (pos < s.length()) {
- uint uc = s.utf16()[pos];
+ uint uc = s.at(pos).unicode();
if (QChar(uc).isHighSurrogate() && pos < s.length()-1) {
- ushort low = s.utf16()[pos+1];
+ ushort low = s.at(pos+1).unicode();
if (QChar(low).isLowSurrogate()) {
uc = QChar::surrogateToUcs4(uc, low);
++pos;
@@ -1512,7 +1509,7 @@ static QString composeHelper(const QString &str)
int combining = QChar::combiningClass(uc);
if (starter == pos - 1 || combining > lastCombining) {
// allowed to form ligature with S
- QChar ligature = ligatureHelper(s.utf16()[starter], uc);
+ QChar ligature = ligatureHelper(s.at(starter).unicode(), uc);
if (ligature.unicode()) {
s[starter] = ligature;
s.remove(pos, 1);
@@ -1524,16 +1521,14 @@ static QString composeHelper(const QString &str)
lastCombining = combining;
++pos;
}
- return s;
}
-static QString canonicalOrderHelper
- (const QString &str, QChar::UnicodeVersion version)
+static void canonicalOrderHelper(QString *str, QChar::UnicodeVersion version, int from)
{
- QString s = str;
+ QString &s = *str;
const int l = s.length()-1;
- int pos = 0;
+ int pos = from;
while (pos < l) {
int p2 = pos+1;
uint u1 = s.at(pos).unicode();
@@ -1593,7 +1588,6 @@ static QString canonicalOrderHelper
++pos;
}
}
- return s;
}
int QT_FASTCALL QUnicodeTables::script(unsigned int uc)
diff --git a/src/corelib/tools/qcontiguouscache.h b/src/corelib/tools/qcontiguouscache.h
index 7d52f1e..0020d22 100644
--- a/src/corelib/tools/qcontiguouscache.h
+++ b/src/corelib/tools/qcontiguouscache.h
@@ -166,8 +166,8 @@ void QContiguousCache<T>::detach_helper()
T *dest = x.d->array + x.d->start;
T *src = d->array + d->start;
- int count = x.d->count;
- while (count--) {
+ int oldcount = x.d->count;
+ while (oldcount--) {
if (QTypeInfo<T>::isComplex) {
new (dest) T(*src);
} else {
@@ -200,8 +200,8 @@ void QContiguousCache<T>::setCapacity(int asize)
x.d->start = x.d->offset % x.d->alloc;
T *dest = x.d->array + (x.d->start + x.d->count-1) % x.d->alloc;
T *src = d->array + (d->start + d->count-1) % d->alloc;
- int count = x.d->count;
- while (count--) {
+ int oldcount = x.d->count;
+ while (oldcount--) {
if (QTypeInfo<T>::isComplex) {
new (dest) T(*src);
} else {
@@ -224,10 +224,10 @@ void QContiguousCache<T>::clear()
{
if (d->ref == 1) {
if (QTypeInfo<T>::isComplex) {
- int count = d->count;
+ int oldcount = d->count;
T * i = d->array + d->start;
T * e = d->array + d->alloc;
- while (count--) {
+ while (oldcount--) {
i->~T();
i++;
if (i == e)
@@ -254,11 +254,11 @@ inline QContiguousCacheData *QContiguousCache<T>::malloc(int aalloc)
}
template <typename T>
-QContiguousCache<T>::QContiguousCache(int capacity)
+QContiguousCache<T>::QContiguousCache(int cap)
{
- p = malloc(capacity);
+ p = malloc(cap);
d->ref = 1;
- d->alloc = capacity;
+ d->alloc = cap;
d->count = d->start = d->offset = 0;
d->sharable = true;
}
@@ -295,10 +295,10 @@ template <typename T>
void QContiguousCache<T>::free(Data *x)
{
if (QTypeInfo<T>::isComplex) {
- int count = d->count;
+ int oldcount = d->count;
T * i = d->array + d->start;
T * e = d->array + d->alloc;
- while (count--) {
+ while (oldcount--) {
i->~T();
i++;
if (i == e)
diff --git a/src/corelib/tools/qeasingcurve.cpp b/src/corelib/tools/qeasingcurve.cpp
index 18a252a..0828c61 100644
--- a/src/corelib/tools/qeasingcurve.cpp
+++ b/src/corelib/tools/qeasingcurve.cpp
@@ -60,8 +60,10 @@
Easing curves describe a function that controls how the speed of the interpolation
between 0 and 1 should be. Easing curves allow transitions from
one value to another to appear more natural than a simple constant speed would allow.
- The QEasingCurve class is usually used in conjunction with the QAnimation class,
- but can be used on its own.
+ The QEasingCurve class is usually used in conjunction with the QVariantAnimation and
+ QPropertyAnimation classes but can be used on its own. It is usually used to accelerate
+ the interpolation from zero velocity (ease in) or decelerate to zero velocity (ease out).
+ Ease in and ease out can also be combined in the same easing curve.
To calculate the speed of the interpolation, the easing curve provides the function
valueForProgress(), where the \a progress argument specifies the progress of the
@@ -80,10 +82,10 @@
\endcode
will print the effective progress of the interpolation between 0 and 1.
- When using a QAnimation, the easing curve will be used to control the
+ When using a QPropertyAnimation, the associated easing curve will be used to control the
progress of the interpolation between startValue and endValue:
\code
- QAnimation animation;
+ QPropertyAnimation animation;
animation.setStartValue(0);
animation.setEndValue(1000);
animation.setDuration(1000);
@@ -98,189 +100,191 @@
\value Linear \inlineimage qeasingcurve-linear.png
\br
- Easing equation function for a simple linear tweening,
- with no easing.
+ Easing curve for a linear (t) function:
+ velocity is constant.
\value InQuad \inlineimage qeasingcurve-inquad.png
\br
- Easing equation function for a quadratic (t^2) easing
- in: accelerating from zero velocity.
+ Easing curve for a quadratic (t^2) function:
+ accelerating from zero velocity.
\value OutQuad \inlineimage qeasingcurve-outquad.png
\br
- Easing equation function for a quadratic (t^2) easing
- out: decelerating to zero velocity.
+ Easing curve for a quadratic (t^2) function:
+ decelerating to zero velocity.
\value InOutQuad \inlineimage qeasingcurve-inoutquad.png
\br
- Easing equation function for a quadratic (t^2) easing
- in/out: acceleration until halfway, then deceleration.
+ Easing curve for a quadratic (t^2) function:
+ acceleration until halfway, then deceleration.
\value OutInQuad \inlineimage qeasingcurve-outinquad.png
\br
- Easing equation function for a quadratic (t^2) easing
- out/in: deceleration until halfway, then acceleration.
+ Easing curve for a quadratic (t^2) function:
+ deceleration until halfway, then acceleration.
\value InCubic \inlineimage qeasingcurve-incubic.png
\br
- Easing equation function for a cubic (t^3) easing
- in: accelerating from zero velocity.
+ Easing curve for a cubic (t^3) function:
+ accelerating from zero velocity.
\value OutCubic \inlineimage qeasingcurve-outcubic.png
\br
- Easing equation function for a cubic (t^3) easing
- out: decelerating from zero velocity.
+ Easing curve for a cubic (t^3) function:
+ decelerating from zero velocity.
\value InOutCubic \inlineimage qeasingcurve-inoutcubic.png
\br
- Easing equation function for a cubic (t^3) easing
- in/out: acceleration until halfway, then deceleration.
+ Easing curve for a cubic (t^3) function:
+ acceleration until halfway, then deceleration.
\value OutInCubic \inlineimage qeasingcurve-outincubic.png
\br
- Easing equation function for a cubic (t^3) easing
- out/in: deceleration until halfway, then acceleration.
+ Easing curve for a cubic (t^3) function:
+ deceleration until halfway, then acceleration.
\value InQuart \inlineimage qeasingcurve-inquart.png
\br
- Easing equation function for a quartic (t^4) easing
- in: accelerating from zero velocity.
+ Easing curve for a quartic (t^4) function:
+ accelerating from zero velocity.
\value OutQuart \inlineimage qeasingcurve-outquart.png
\br
- Easing equation function for a quartic (t^4) easing
- out: decelerating from zero velocity.
+ Easing curve for a cubic (t^4) function:
+ decelerating from zero velocity.
\value InOutQuart \inlineimage qeasingcurve-inoutquart.png
\br
- Easing equation function for a quartic (t^4) easing
- in/out: acceleration until halfway, then deceleration.
+ Easing curve for a cubic (t^4) function:
+ acceleration until halfway, then deceleration.
\value OutInQuart \inlineimage qeasingcurve-outinquart.png
\br
- Easing equation function for a quartic (t^4) easing
- out/in: deceleration until halfway, then acceleration.
+ Easing curve for a cubic (t^4) function:
+ deceleration until halfway, then acceleration.
\value InQuint \inlineimage qeasingcurve-inquint.png
\br
- Easing equation function for a quintic (t^5) easing
+ Easing curve for a quintic (t^5) easing
in: accelerating from zero velocity.
\value OutQuint \inlineimage qeasingcurve-outquint.png
\br
- Easing equation function for a quintic (t^5) easing
- out: decelerating from zero velocity.
+ Easing curve for a cubic (t^5) function:
+ decelerating from zero velocity.
\value InOutQuint \inlineimage qeasingcurve-inoutquint.png
\br
- Easing equation function for a quintic (t^5) easing
- in/out: acceleration until halfway, then deceleration.
+ Easing curve for a cubic (t^5) function:
+ acceleration until halfway, then deceleration.
\value OutInQuint \inlineimage qeasingcurve-outinquint.png
\br
- Easing equation function for a quintic (t^5) easing
- out/in: deceleration until halfway, then acceleration.
+ Easing curve for a cubic (t^5) function:
+ deceleration until halfway, then acceleration.
\value InSine \inlineimage qeasingcurve-insine.png
\br
- Easing equation function for a sinusoidal (sin(t)) easing
- in: accelerating from zero velocity.
+ Easing curve for a sinusoidal (sin(t)) function:
+ accelerating from zero velocity.
\value OutSine \inlineimage qeasingcurve-outsine.png
\br
- Easing equation function for a sinusoidal (sin(t)) easing
- out: decelerating from zero velocity.
+ Easing curve for a sinusoidal (sin(t)) function:
+ decelerating from zero velocity.
\value InOutSine \inlineimage qeasingcurve-inoutsine.png
\br
- Easing equation function for a sinusoidal (sin(t)) easing
- in/out: acceleration until halfway, then deceleration.
+ Easing curve for a sinusoidal (sin(t)) function:
+ acceleration until halfway, then deceleration.
\value OutInSine \inlineimage qeasingcurve-outinsine.png
\br
- Easing equation function for a sinusoidal (sin(t)) easing
- out/in: deceleration until halfway, then acceleration.
+ Easing curve for a sinusoidal (sin(t)) function:
+ deceleration until halfway, then acceleration.
\value InExpo \inlineimage qeasingcurve-inexpo.png
\br
- Easing equation function for an exponential (2^t) easing
- in: accelerating from zero velocity.
+ Easing curve for an exponential (2^t) function:
+ accelerating from zero velocity.
\value OutExpo \inlineimage qeasingcurve-outexpo.png
\br
- Easing equation function for an exponential (2^t) easing
- out: decelerating from zero velocity.
+ Easing curve for an exponential (2^t) function:
+ decelerating from zero velocity.
\value InOutExpo \inlineimage qeasingcurve-inoutexpo.png
\br
- Easing equation function for an exponential (2^t) easing
- in/out: acceleration until halfway, then deceleration.
+ Easing curve for an exponential (2^t) function:
+ acceleration until halfway, then deceleration.
\value OutInExpo \inlineimage qeasingcurve-outinexpo.png
\br
- Easing equation function for an exponential (2^t) easing
- out/in: deceleration until halfway, then acceleration.
+ Easing curve for an exponential (2^t) function:
+ deceleration until halfway, then acceleration.
\value InCirc \inlineimage qeasingcurve-incirc.png
\br
- Easing equation function for a circular (sqrt(1-t^2)) easing
- in: accelerating from zero velocity.
+ Easing curve for a circular (sqrt(1-t^2)) function:
+ accelerating from zero velocity.
\value OutCirc \inlineimage qeasingcurve-outcirc.png
\br
- Easing equation function for a circular (sqrt(1-t^2)) easing
- out: decelerating from zero velocity.
+ Easing curve for a circular (sqrt(1-t^2)) function:
+ decelerating from zero velocity.
\value InOutCirc \inlineimage qeasingcurve-inoutcirc.png
\br
- Easing equation function for a circular (sqrt(1-t^2)) easing
- in/out: acceleration until halfway, then deceleration.
+ Easing curve for a circular (sqrt(1-t^2)) function:
+ acceleration until halfway, then deceleration.
\value OutInCirc \inlineimage qeasingcurve-outincirc.png
\br
- Easing equation function for a circular (sqrt(1-t^2)) easing
- out/in: deceleration until halfway, then acceleration.
+ Easing curve for a circular (sqrt(1-t^2)) function:
+ deceleration until halfway, then acceleration.
\value InElastic \inlineimage qeasingcurve-inelastic.png
\br
- Easing equation function for an elastic
- (exponentially decaying sine wave) easing in:
+ Easing curve for an elastic
+ (exponentially decaying sine wave) function:
accelerating from zero velocity. The peak amplitude
can be set with the \e amplitude parameter, and the
period of decay by the \e period parameter.
\value OutElastic \inlineimage qeasingcurve-outelastic.png
\br
- Easing equation function for an elastic
- (exponentially decaying sine wave) easing out:
+ Easing curve for an elastic
+ (exponentially decaying sine wave) function:
decelerating from zero velocity. The peak amplitude
can be set with the \e amplitude parameter, and the
period of decay by the \e period parameter.
\value InOutElastic \inlineimage qeasingcurve-inoutelastic.png
\br
- Easing equation function for an elastic
- (exponentially decaying sine wave) easing in/out:
+ Easing curve for an elastic
+ (exponentially decaying sine wave) function:
acceleration until halfway, then deceleration.
\value OutInElastic \inlineimage qeasingcurve-outinelastic.png
\br
- Easing equation function for an elastic
- (exponentially decaying sine wave) easing out/in:
+ Easing curve for an elastic
+ (exponentially decaying sine wave) function:
deceleration until halfway, then acceleration.
\value InBack \inlineimage qeasingcurve-inback.png
\br
- Easing equation function for a back (overshooting
- cubic easing: (s+1)*t^3 - s*t^2) easing in:
+ Easing curve for a back (overshooting
+ cubic function: (s+1)*t^3 - s*t^2) easing in:
accelerating from zero velocity.
\value OutBack \inlineimage qeasingcurve-outback.png
\br
- Easing equation function for a back (overshooting
- cubic easing: (s+1)*t^3 - s*t^2) easing out:
- decelerating from zero velocity.
+ Easing curve for a back (overshooting
+ cubic function: (s+1)*t^3 - s*t^2) easing out:
+ decelerating to zero velocity.
\value InOutBack \inlineimage qeasingcurve-inoutback.png
\br
- Easing equation function for a back (overshooting
- cubic easing: (s+1)*t^3 - s*t^2) easing in/out:
+ Easing curve for a back (overshooting
+ cubic function: (s+1)*t^3 - s*t^2) easing in/out:
acceleration until halfway, then deceleration.
\value OutInBack \inlineimage qeasingcurve-outinback.png
\br
- Easing equation function for a back (overshooting
+ Easing curve for a back (overshooting
cubic easing: (s+1)*t^3 - s*t^2) easing out/in:
deceleration until halfway, then acceleration.
\value InBounce \inlineimage qeasingcurve-inbounce.png
\br
- Easing equation function for a bounce (exponentially
- decaying parabolic bounce) easing in: accelerating
+ Easing curve for a bounce (exponentially
+ decaying parabolic bounce) function: accelerating
from zero velocity.
\value OutBounce \inlineimage qeasingcurve-outbounce.png
\br
- Easing equation function for a bounce (exponentially
- decaying parabolic bounce) easing out: decelerating
+ Easing curve for a bounce (exponentially
+ decaying parabolic bounce) function: decelerating
from zero velocity.
\value InOutBounce \inlineimage qeasingcurve-inoutbounce.png
\br
- Easing equation function for a bounce (exponentially
- decaying parabolic bounce) easing in/out:
+ Easing curve for a bounce (exponentially
+ decaying parabolic bounce) function easing in/out:
acceleration until halfway, then deceleration.
\value OutInBounce \inlineimage qeasingcurve-outinbounce.png
\br
- Easing equation function for a bounce (exponentially
- decaying parabolic bounce) easing out/in:
+ Easing curve for a bounce (exponentially
+ decaying parabolic bounce) function easing out/in:
deceleration until halfway, then acceleration.
\omitvalue InCurve
\omitvalue OutCurve
\omitvalue SineCurve
\omitvalue CosineCurve
- \value Custom This is returned if the user have specified a custom curve type with setCustomType(). Note that you cannot call setType() with this value, but type() can return it.
+ \value Custom This is returned if the user specified a custom curve type with
+ setCustomType(). Note that you cannot call setType() with this value,
+ but type() can return it.
\omitvalue NCurveTypes
*/
diff --git a/src/corelib/tools/qlocale.cpp b/src/corelib/tools/qlocale.cpp
index 296d5a0..85e49c7 100644
--- a/src/corelib/tools/qlocale.cpp
+++ b/src/corelib/tools/qlocale.cpp
@@ -5299,7 +5299,11 @@ struct p5s_deleter
{
~p5s_deleter()
{
- Bfree(p5s);
+ while (p5s) {
+ Bigint *next = p5s->next;
+ Bfree(p5s);
+ p5s = next;
+ }
}
};
diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp
index b97ba45..99fbaa9 100644
--- a/src/corelib/tools/qstring.cpp
+++ b/src/corelib/tools/qstring.cpp
@@ -6028,6 +6028,7 @@ QString QString::repeated(int times) const
return result;
}
+void qt_string_normalize(QString *data, QString::NormalizationForm mode, QChar::UnicodeVersion version, int from);
/*!
\overload
\fn QString QString::normalized(NormalizationForm mode, QChar::UnicodeVersion version) const
@@ -6037,42 +6038,48 @@ QString QString::repeated(int times) const
*/
QString QString::normalized(QString::NormalizationForm mode, QChar::UnicodeVersion version) const
{
+ QString copy = *this;
+ qt_string_normalize(&copy, mode, version, 0);
+ return copy;
+}
+
+void qt_string_normalize(QString *data, QString::NormalizationForm mode, QChar::UnicodeVersion version, int from)
+{
bool simple = true;
- for (int i = 0; i < d->size; ++i) {
- if (d->data[i] >= 0x80) {
+ const QChar *p = data->constData();
+ int len = data->length();
+ for (int i = from; i < len; ++i) {
+ if (p[i].unicode() >= 0x80) {
simple = false;
break;
}
}
if (simple)
- return *this;
+ return;
- QString s = *this;
+ QString &s = *data;
if (version != CURRENT_VERSION) {
for (int i = 0; i < NumNormalizationCorrections; ++i) {
const NormalizationCorrection &n = uc_normalization_corrections[i];
if (n.version > version) {
+ int pos = from;
if (n.ucs4 > 0xffff) {
ushort ucs4High = QChar::highSurrogate(n.ucs4);
ushort ucs4Low = QChar::lowSurrogate(n.ucs4);
ushort oldHigh = QChar::highSurrogate(n.old_mapping);
ushort oldLow = QChar::lowSurrogate(n.old_mapping);
- int pos = 0;
- while (pos < s.d->size - 1) {
- if (s.d->data[pos] == ucs4High && s.d->data[pos + 1] == ucs4Low) {
- s.detach();
- s.d->data[pos] = oldHigh;
- s.d->data[pos + 1] = oldLow;
+ while (pos < s.length() - 1) {
+ if (s.at(pos).unicode() == ucs4High && s.at(pos + 1).unicode() == ucs4Low) {
+ s[pos] = oldHigh;
+ s[pos + 1] = oldLow;
++pos;
}
++pos;
}
} else {
- int pos = 0;
- while (pos < s.d->size) {
- if (s.d->data[pos] == n.ucs4) {
- s.detach();
- s.d->data[pos] = n.old_mapping;
+ while (pos < s.length()) {
+ if (s.at(pos).unicode() == n.ucs4) {
+ s[pos] = n.old_mapping;
}
++pos;
}
@@ -6080,15 +6087,14 @@ QString QString::normalized(QString::NormalizationForm mode, QChar::UnicodeVersi
}
}
}
- s = decomposeHelper(s, mode < QString::NormalizationForm_KD, version);
+ decomposeHelper(data, mode < QString::NormalizationForm_KD, version, from);
- s = canonicalOrderHelper(s, version);
+ canonicalOrderHelper(data, version, from);
if (mode == QString::NormalizationForm_D || mode == QString::NormalizationForm_KD)
- return s;
-
- return composeHelper(s);
+ return;
+ composeHelper(data, from);
}
diff --git a/src/corelib/tools/qstringlist.cpp b/src/corelib/tools/qstringlist.cpp
index 5a2b37a..5c550af 100644
--- a/src/corelib/tools/qstringlist.cpp
+++ b/src/corelib/tools/qstringlist.cpp
@@ -41,6 +41,7 @@
#include <qstringlist.h>
#include <qset.h>
+#include <qstringmatcher.h>
QT_BEGIN_NAMESPACE
diff --git a/src/corelib/tools/qstringlist.h b/src/corelib/tools/qstringlist.h
index 665c0d0..f36567a 100644
--- a/src/corelib/tools/qstringlist.h
+++ b/src/corelib/tools/qstringlist.h
@@ -47,7 +47,6 @@
#include <QtCore/qlist.h>
#include <QtCore/qregexp.h>
#include <QtCore/qstring.h>
-#include <QtCore/qstringmatcher.h>
#ifdef QT_INCLUDE_COMPAT
#include <Qt3Support/q3valuelist.h>
#endif
diff --git a/src/corelib/tools/qstringmatcher.h b/src/corelib/tools/qstringmatcher.h
index 2b8edc9..61b7a95 100644
--- a/src/corelib/tools/qstringmatcher.h
+++ b/src/corelib/tools/qstringmatcher.h
@@ -81,13 +81,14 @@ private:
// explicitely allow anonymous unions for RVCT to prevent compiler warnings
#pragma anon_unions
#endif
+ struct Data {
+ uchar q_skiptable[256];
+ const QChar *uc;
+ int len;
+ };
union {
uint q_data[256];
- struct {
- uchar q_skiptable[256];
- const QChar *uc;
- int len;
- } p;
+ Data p;
};
};
diff --git a/src/gui/accessible/qaccessible.h b/src/gui/accessible/qaccessible.h
index 19080de..8dc8159 100644
--- a/src/gui/accessible/qaccessible.h
+++ b/src/gui/accessible/qaccessible.h
@@ -210,6 +210,7 @@ public:
PageTabList = 0x0000003C,
Clock = 0x0000003D,
Splitter = 0x0000003E,
+ // Additional Qt roles where enum value does not map directly to MSAA:
LayeredPane = 0x0000003F,
UserRole = 0x0000ffff
};
diff --git a/src/gui/accessible/qaccessible_win.cpp b/src/gui/accessible/qaccessible_win.cpp
index bfacb94..85f1a8d 100644
--- a/src/gui/accessible/qaccessible_win.cpp
+++ b/src/gui/accessible/qaccessible_win.cpp
@@ -1051,6 +1051,8 @@ HRESULT STDMETHODCALLTYPE QWindowsAccessible::get_accRole(VARIANT varID, VARIANT
Role role = accessible->role(varID.lVal);
if (role != NoRole) {
+ if (role == LayeredPane)
+ role = QAccessible::Pane;
(*pvarRole).vt = VT_I4;
(*pvarRole).lVal = role;
} else {
diff --git a/src/gui/embedded/qscreenproxy_qws.cpp b/src/gui/embedded/qscreenproxy_qws.cpp
index ade16ca..3d7451b 100644
--- a/src/gui/embedded/qscreenproxy_qws.cpp
+++ b/src/gui/embedded/qscreenproxy_qws.cpp
@@ -537,7 +537,7 @@ int QProxyScreen::transformOrientation() const
}
/*!
-\reimp
+\internal
*/
int QProxyScreen::memoryNeeded(const QString &str)
{
@@ -548,7 +548,7 @@ int QProxyScreen::memoryNeeded(const QString &str)
}
/*!
-\reimp
+\internal
*/
int QProxyScreen::sharedRamSize(void *ptr)
{
@@ -559,7 +559,7 @@ int QProxyScreen::sharedRamSize(void *ptr)
}
/*!
-\reimp
+\internal
*/
void QProxyScreen::haltUpdates()
{
@@ -568,7 +568,7 @@ void QProxyScreen::haltUpdates()
}
/*!
-\reimp
+\internal
*/
void QProxyScreen::resumeUpdates()
{
diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp
index 38e5938..b017022 100644
--- a/src/gui/graphicsview/qgraphicsscene.cpp
+++ b/src/gui/graphicsview/qgraphicsscene.cpp
@@ -1926,21 +1926,42 @@ QPainterPath QGraphicsScene::selectionArea() const
}
/*!
+ \since 4.6
+
Sets the selection area to \a path. All items within this area are
immediately selected, and all items outside are unselected. You can get
the list of all selected items by calling selectedItems().
+ \a deviceTransform is the transformation that applies to the view, and needs to
+ be provided if the scene contains items that ignore transformations.
+
For an item to be selected, it must be marked as \e selectable
(QGraphicsItem::ItemIsSelectable).
\sa clearSelection(), selectionArea()
*/
+void QGraphicsScene::setSelectionArea(const QPainterPath &path, const QTransform &deviceTransform)
+{
+ setSelectionArea(path, Qt::IntersectsItemShape, deviceTransform);
+}
+
+/*!
+ \obsolete
+ \overload
+
+ Sets the selection area to \a path.
+
+ This function is deprecated and leads to incorrect results if the scene
+ contains items that ignore transformations. Use the overload that takes
+ a QTransform instead.
+*/
void QGraphicsScene::setSelectionArea(const QPainterPath &path)
{
- setSelectionArea(path, Qt::IntersectsItemShape);
+ setSelectionArea(path, Qt::IntersectsItemShape, QTransform());
}
/*!
+ \obsolete
\overload
\since 4.3
@@ -2673,15 +2694,17 @@ void QGraphicsScene::clearFocus()
/*!
\property QGraphicsScene::stickyFocus
- \brief whether or not clicking the scene will clear focus
+ \brief whether clicking into the scene background will clear focus
\since 4.6
- If this property is false (the default), then clicking on the scene
- background or on an item that does not accept focus, will clear
- focus. Otherwise, focus will remain unchanged.
+ In a QGraphicsScene with stickyFocus set to true, focus will remain
+ unchanged when the user clicks into the scene background or on an item
+ that does not accept focus. Otherwise, focus will be cleared.
+
+ By default, this property is false.
- The focus change happens in response to a mouse press. You can reimplement
+ Focus changes in response to a mouse press. You can reimplement
mousePressEvent() in a subclass of QGraphicsScene to toggle this property
based on where the user has clicked.
diff --git a/src/gui/graphicsview/qgraphicsscene.h b/src/gui/graphicsview/qgraphicsscene.h