summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/src/containers.qdoc2
-rw-r--r--mkspecs/features/qt_config.prf2
-rw-r--r--qmake/project.cpp13
-rw-r--r--src/3rdparty/webkit/WebCore/WebCore.pro2
-rw-r--r--src/corelib/arch/arch.pri2
-rw-r--r--src/corelib/tools/qtimeline.cpp16
-rw-r--r--src/gui/graphicsview/qgraphicstransform.cpp40
-rw-r--r--src/gui/kernel/qwidget_x11.cpp7
-rw-r--r--src/openvg/qpixmapdata_vg.cpp25
-rw-r--r--src/qbase.pri2
-rw-r--r--src/testlib/qbenchmark.cpp13
-rw-r--r--src/testlib/qbenchmark.h10
-rw-r--r--src/testlib/qbenchmark_p.h1
-rw-r--r--src/testlib/qtestbasicstreamer.h2
-rw-r--r--src/testlib/qtestcase.cpp19
-rw-r--r--src/xmlpatterns/query.pri2
-rw-r--r--src/xmlpatterns/xmlpatterns.pro3
-rw-r--r--tests/auto/qaccessibility_mac/qaccessibility_mac.pro2
-rw-r--r--tests/auto/qgraphicstransform/tst_qgraphicstransform.cpp22
-rw-r--r--tests/auto/qmake/testdata/functions/functions.pro2
-rw-r--r--tests/auto/qtimeline/tst_qtimeline.cpp41
-rwxr-xr-xtests/auto/runQtXmlPatternsTests.sh61
-rw-r--r--tests/auto/selftests/benchlibwalltime/tst_benchlibwalltime.cpp11
-rw-r--r--tests/auto/selftests/expected_benchlibwalltime.txt5
-rw-r--r--tools/assistant/compat/lib/lib.pro2
-rw-r--r--tools/checksdk/main.cpp4
-rw-r--r--tools/designer/src/components/lib/lib.pro2
-rw-r--r--tools/designer/src/lib/lib.pro2
-rw-r--r--tools/designer/src/uitools/uitools.pro2
29 files changed, 208 insertions, 109 deletions
diff --git a/doc/src/containers.qdoc b/doc/src/containers.qdoc
index 11a4b0b..2a34716 100644
--- a/doc/src/containers.qdoc
+++ b/doc/src/containers.qdoc
@@ -682,7 +682,7 @@
\header \o{1,2} \o{2,1} Key lookup \o{2,1} Insertion
\header \o Average \o Worst case \o Average \o Worst case
\row \o QMap<Key, T> \o O(log \e n) \o O(log \e n) \o O(log \e n) \o O(log \e n)
- \row \o QMultiMap<Key, T> \o O((log \e n) \o O(log \e n) \o O(log \e n) \o O(log \e n)
+ \row \o QMultiMap<Key, T> \o O(log \e n) \o O(log \e n) \o O(log \e n) \o O(log \e n)
\row \o QHash<Key, T> \o Amort. O(1) \o O(\e n) \o Amort. O(1) \o O(\e n)
\row \o QSet<Key> \o Amort. O(1) \o O(\e n) \o Amort. O(1) \o O(\e n)
\endtable
diff --git a/mkspecs/features/qt_config.prf b/mkspecs/features/qt_config.prf
index 779c2e5..0a2d985 100644
--- a/mkspecs/features/qt_config.prf
+++ b/mkspecs/features/qt_config.prf
@@ -4,7 +4,7 @@ isEmpty(QMAKE_QT_CONFIG)|!exists($$QMAKE_QT_CONFIG) {
else:exists($$_QMAKE_CACHE_):infile($$_QMAKE_CACHE_, QT_BUILD_TREE):QMAKE_QT_CONFIG = $$fromfile($$_QMAKE_CACHE_, QT_BUILD_TREE)/mkspecs/qconfig.pri
else:exists($$[QT_INSTALL_DATA]/mkspecs/qconfig.pri):QMAKE_QT_CONFIG = $$[QT_INSTALL_DATA]/mkspecs/qconfig.pri
}
-!exists($$QMAKE_QT_CONFIG)|!include($$QMAKE_QT_CONFIG) {
+!exists($$QMAKE_QT_CONFIG)|!include($$QMAKE_QT_CONFIG, "", true) {
debug(1, "Cannot load qconfig.pri!")
} else {
debug(1, "Loaded .qconfig.pri from ($$QMAKE_QT_CONFIG)")
diff --git a/qmake/project.cpp b/qmake/project.cpp
index 6bb8b2c..2e0b1e7 100644
--- a/qmake/project.cpp
+++ b/qmake/project.cpp
@@ -2836,10 +2836,15 @@ QMakeProject::doProjectTest(QString func, QList<QStringList> args_list, QMap<QSt
case T_LOAD: {
QString parseInto;
const bool include_statement = (func_t == T_INCLUDE);
- bool ignore_error = include_statement;
- if(args.count() == 2) {
+ bool ignore_error = false;
+ if(args.count() >= 2) {
if(func_t == T_INCLUDE) {
parseInto = args[1];
+ if (args.count() == 3){
+ QString sarg = args[2];
+ if (sarg.toLower() == "true" || sarg.toInt())
+ ignore_error = true;
+ }
} else {
QString sarg = args[1];
ignore_error = (sarg.toLower() == "true" || sarg.toInt());
@@ -2881,8 +2886,8 @@ QMakeProject::doProjectTest(QString func, QList<QStringList> args_list, QMap<QSt
if(stat == IncludeFeatureAlreadyLoaded) {
warn_msg(WarnParser, "%s:%d: Duplicate of loaded feature %s",
parser.file.toLatin1().constData(), parser.line_no, file.toLatin1().constData());
- } else if(stat == IncludeNoExist && include_statement) {
- warn_msg(WarnParser, "%s:%d: Unable to find file for inclusion %s",
+ } else if(stat == IncludeNoExist && !ignore_error) {
+ warn_msg(WarnAll, "%s:%d: Unable to find file for inclusion %s",
parser.file.toLatin1().constData(), parser.line_no, file.toLatin1().constData());
return false;
} else if(stat >= IncludeFailure) {
diff --git a/src/3rdparty/webkit/WebCore/WebCore.pro b/src/3rdparty/webkit/WebCore/WebCore.pro
index e49ab13..2eb7c08 100644
--- a/src/3rdparty/webkit/WebCore/WebCore.pro
+++ b/src/3rdparty/webkit/WebCore/WebCore.pro
@@ -3159,7 +3159,7 @@ xpathbison.dependency_type = TYPE_C
xpathbison.variable_out = GENERATED_SOURCES
addExtraCompilerWithHeader(xpathbison)
-include($$PWD/../WebKit/qt/Api/headers.pri)
+include($$PWD/../WebKit/qt/Api/headers.pri, "", true)
HEADERS += $$WEBKIT_API_HEADERS
!CONFIG(QTDIR_build) {
target.path = $$[QT_INSTALL_LIBS]
diff --git a/src/corelib/arch/arch.pri b/src/corelib/arch/arch.pri
index 9f0e289..a25027b 100644
--- a/src/corelib/arch/arch.pri
+++ b/src/corelib/arch/arch.pri
@@ -28,4 +28,4 @@ vxworks:HEADERS += arch/qatomic_vxworks.h
QT_ARCH_CPP = $$QT_SOURCE_TREE/src/corelib/arch/$$QT_ARCH
DEPENDPATH += $$QT_ARCH_CPP
-include($$QT_ARCH_CPP/arch.pri)
+include($$QT_ARCH_CPP/arch.pri, "", true)
diff --git a/src/corelib/tools/qtimeline.cpp b/src/corelib/tools/qtimeline.cpp
index e32fc03..6dbad34 100644
--- a/src/corelib/tools/qtimeline.cpp
+++ b/src/corelib/tools/qtimeline.cpp
@@ -69,7 +69,6 @@ public:
int currentLoopCount;
int currentTime;
- int elapsedTime;
int timerId;
QTime timer;
@@ -212,7 +211,7 @@ void QTimeLinePrivate::setCurrentTime(int msecs)
applies an interpolation algorithm to generate these value. You can choose
from a set of predefined timeline algorithms by calling
setCurveShape().
-
+
Note that by default, QTimeLine uses the EaseInOut curve shape,
which provides a value that grows slowly, then grows steadily, and
finally grows slowly. For a custom timeline, you can reimplement
@@ -549,7 +548,7 @@ void QTimeLine::setCurveShape(CurveShape shape)
case CosineCurve:
setEasingCurve(QEasingCurve(QEasingCurve::CosineCurve));
break;
- }
+ }
}
/*!
@@ -559,7 +558,7 @@ void QTimeLine::setCurveShape(CurveShape shape)
Specifies the easing curve that the timeline will use.
If both easing curve and curveShape are set, the last set property will
- override the previous one. (If valueForTime() is reimplemented it will
+ override the previous one. (If valueForTime() is reimplemented it will
override both)
*/
@@ -663,6 +662,7 @@ qreal QTimeLine::valueForTime(int msec) const
second). You can change the update interval by calling
setUpdateInterval().
+ The timeline will start from position 0, or the end if going backward.
If you want to resume a stopped timeline without restarting, you can call
resume() instead.
@@ -675,10 +675,8 @@ void QTimeLine::start()
qWarning("QTimeLine::start: already running");
return;
}
- int curTime = d->currentTime;
- if (curTime == d->duration && d->direction == Forward)
- curTime = 0;
- else if (curTime == 0 && d->direction == Backward)
+ int curTime = 0;
+ if (d->direction == Backward)
curTime = d->duration;
d->timerId = startTimer(d->updateInterval);
d->startTime = curTime;
@@ -694,7 +692,7 @@ void QTimeLine::start()
frame and value at regular intervals.
In contrast to start(), this function does not restart the timeline before
- is resumes.
+ it resumes.
\sa start(), updateInterval(), frameChanged(), valueChanged()
*/
diff --git a/src/gui/graphicsview/qgraphicstransform.cpp b/src/gui/graphicsview/qgraphicstransform.cpp
index 9e73176..c326b01 100644
--- a/src/gui/graphicsview/qgraphicstransform.cpp
+++ b/src/gui/graphicsview/qgraphicstransform.cpp
@@ -80,11 +80,7 @@
#include "qgraphicsitem_p.h"
#include "qgraphicstransform_p.h"
#include <QDebug>
-
-#include <math.h>
-#ifndef M_PI
-#define M_PI 3.14159265358979323846
-#endif
+#include <QtCore/qmath.h>
QT_BEGIN_NAMESPACE
@@ -355,7 +351,6 @@ public:
QGraphicsRotationPrivate()
: angle(0) {}
QPointF origin;
- qreal originY;
qreal angle;
};
@@ -475,13 +470,18 @@ void QGraphicsRotation::applyTo(QTransform *t) const
By default the axis is (0, 0, 1), giving QGraphicsRotation3D the same
default behavior as QGraphicsRotation (i.e., rotation around the Z axis).
+ Note: the final rotation is the combined effect of a rotation in
+ 3D space followed by a projection back to 2D. If several rotations
+ are performed in succession, they will not behave as expected unless
+ they were all around the Z axis.
+
\sa QGraphicsTransform, QGraphicsItem::setRotation(), QTransform::rotate()
*/
class QGraphicsRotation3DPrivate : public QGraphicsRotationPrivate
{
public:
- QGraphicsRotation3DPrivate() {}
+ QGraphicsRotation3DPrivate() : axis(0, 0, 1) {}
QVector3D axis;
};
@@ -522,10 +522,14 @@ QVector3D QGraphicsRotation3D::axis()
void QGraphicsRotation3D::setAxis(const QVector3D &axis)
{
Q_D(QGraphicsRotation3D);
+ if (d->axis == axis)
+ return;
d->axis = axis;
update();
+ emit axisChanged();
}
+const qreal deg2rad = qreal(0.017453292519943295769); // pi/180
static const qreal inv_dist_to_plane = 1. / 1024.;
/*!
@@ -535,13 +539,27 @@ void QGraphicsRotation3D::applyTo(QTransform *t) const
{
Q_D(const QGraphicsRotation3D);
- if (d->angle == 0. ||
+ qreal a = d->angle;
+
+ if (a == 0. ||
(d->axis.z() == 0. && d->axis.y() == 0 && d->axis.x() == 0))
return;
- qreal rad = d->angle * 2. * M_PI / 360.;
- qreal c = ::cos(rad);
- qreal s = ::sin(rad);
+ qreal c, s;
+ if (a == 90. || a == -270.) {
+ s = 1.;
+ c = 0.;
+ } else if (a == 270. || a == -90.) {
+ s = -1.;
+ c = 0.;
+ } else if (a == 180.) {
+ s = 0.;
+ c = -1.;
+ } else {
+ qreal b = deg2rad*a;
+ s = qSin(b);
+ c = qCos(b);
+ }
qreal x = d->axis.x();
qreal y = d->axis.y();
diff --git a/src/gui/kernel/qwidget_x11.cpp b/src/gui/kernel/qwidget_x11.cpp
index 2bb3626..056e26b 100644
--- a/src/gui/kernel/qwidget_x11.cpp
+++ b/src/gui/kernel/qwidget_x11.cpp
@@ -512,6 +512,13 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO
dialog = popup = false; // force these flags off
data.crect.setRect(0, 0, sw, sh);
} else if (topLevel && !q->testAttribute(Qt::WA_Resized)) {
+ QDesktopWidget *desktopWidget = qApp->desktop();
+ if (desktopWidget->isVirtualDesktop()) {
+ QRect r = desktopWidget->screenGeometry();
+ sw = r.width();
+ sh = r.height();
+ }
+
int width = sw / 2;
int height = 4 * sh / 10;
if (extra) {
diff --git a/src/openvg/qpixmapdata_vg.cpp b/src/openvg/qpixmapdata_vg.cpp
index 90fd9a5..6f2024f 100644
--- a/src/openvg/qpixmapdata_vg.cpp
+++ b/src/openvg/qpixmapdata_vg.cpp
@@ -341,4 +341,29 @@ QImage::Format QVGPixmapData::sourceFormat() const
return QImage::Format_ARGB32_Premultiplied;
}
+/*
+ \internal
+
+ Returns the VGImage that is storing the contents of \a pixmap.
+ Returns VG_INVALID_HANDLE if \a pixmap is not owned by the OpenVG
+ graphics system or \a pixmap is invalid.
+
+ This function is typically used to access the backing store
+ for a pixmap when executing raw OpenVG calls. It must only
+ be used when a QPainter is active and the OpenVG paint engine
+ is in use by the QPainter.
+
+ \sa {QtOpenVG Module}
+*/
+Q_OPENVG_EXPORT VGImage qPixmapToVGImage(const QPixmap& pixmap)
+{
+ QPixmapData *pd = pixmap.pixmapData();
+ if (pd->classId() == QPixmapData::OpenVGClass) {
+ QVGPixmapData *vgpd = static_cast<QVGPixmapData *>(pd);
+ if (vgpd->isValid())
+ return vgpd->toVGImage();
+ }
+ return VG_INVALID_HANDLE;
+}
+
QT_END_NAMESPACE
diff --git a/src/qbase.pri b/src/qbase.pri
index 1fb7427..137b933 100644
--- a/src/qbase.pri
+++ b/src/qbase.pri
@@ -13,7 +13,7 @@ mac:!contains(QMAKE_EXT_C, .mm):QMAKE_EXT_C += .mm
#load up the headers info
CONFIG += qt_install_headers
HEADERS_PRI = $$QT_BUILD_TREE/include/$$TARGET/headers.pri
-include($$HEADERS_PRI)|clear(HEADERS_PRI)
+include($$HEADERS_PRI, "", true)|clear(HEADERS_PRI)
#version overriding
win32 {
diff --git a/src/testlib/qbenchmark.cpp b/src/testlib/qbenchmark.cpp
index 35ff376..fa17461 100644
--- a/src/testlib/qbenchmark.cpp
+++ b/src/testlib/qbenchmark.cpp
@@ -116,7 +116,7 @@ int QBenchmarkGlobalData::adjustMedianIterationCount()
QBenchmarkTestMethodData *QBenchmarkTestMethodData::current;
QBenchmarkTestMethodData::QBenchmarkTestMethodData()
-:resultAccepted(false), iterationCount(-1)
+:resultAccepted(false), runOnce(false), iterationCount(-1)
{
}
@@ -157,6 +157,11 @@ void QBenchmarkTestMethodData::setResult(qint64 value)
if (QBenchmarkGlobalData::current->iterationCount != -1)
accepted = true;
+ if (QBenchmarkTestMethodData::current->runOnce) {
+ iterationCount = 1;
+ accepted = true;
+ }
+
// Test the result directly without calling the measurer if the minimum time
// has been specifed on the command line with -minimumvalue.
else if (QBenchmarkGlobalData::current->walltimeMinimum != -1)
@@ -179,10 +184,12 @@ void QBenchmarkTestMethodData::setResult(qint64 value)
drive the benchmarking loop. It is repsonsible for starting and stopping
the timing measurements as well as calling the result reporting functions.
*/
-QTest::QBenchmarkIterationController::QBenchmarkIterationController()
+QTest::QBenchmarkIterationController::QBenchmarkIterationController(RunMode runMode)
{
QTest::beginBenchmarkMeasurement();
i = 0;
+ if (runMode == RunOnce)
+ QBenchmarkTestMethodData::current->runOnce = true;
}
/*! \internal
*/
@@ -195,6 +202,8 @@ QTest::QBenchmarkIterationController::~QBenchmarkIterationController()
*/
bool QTest::QBenchmarkIterationController::isDone()
{
+ if (QBenchmarkTestMethodData::current->runOnce)
+ return i > 0;
return i >= QTest::iterationCount();
}
diff --git a/src/testlib/qbenchmark.h b/src/testlib/qbenchmark.h
index c06bfc0..87d34e7 100644
--- a/src/testlib/qbenchmark.h
+++ b/src/testlib/qbenchmark.h
@@ -64,7 +64,8 @@ namespace QTest
class Q_TESTLIB_EXPORT QBenchmarkIterationController
{
public:
- QBenchmarkIterationController();
+ enum RunMode { RepeatUntilValidMeasurement, RunOnce };
+ QBenchmarkIterationController(RunMode runMode);
~QBenchmarkIterationController();
bool isDone();
void next();
@@ -74,7 +75,12 @@ public:
}
#define QBENCHMARK \
- for (QTest::QBenchmarkIterationController __iteration_controller; __iteration_controller.isDone() == false; __iteration_controller.next())
+ for (QTest::QBenchmarkIterationController __iteration_controller(QTest::QBenchmarkIterationController::RepeatUntilValidMeasurement); \
+ __iteration_controller.isDone() == false; __iteration_controller.next())
+
+#define QBENCHMARK_ONCE \
+ for (QTest::QBenchmarkIterationController __iteration_controller(QTest::QBenchmarkIterationController::RunOnce); \
+ __iteration_controller.isDone() == false; __iteration_controller.next())
QT_END_NAMESPACE
diff --git a/src/testlib/qbenchmark_p.h b/src/testlib/qbenchmark_p.h
index 25f9cdc..185d656 100644
--- a/src/testlib/qbenchmark_p.h
+++ b/src/testlib/qbenchmark_p.h
@@ -171,6 +171,7 @@ public:
QBenchmarkResult result;
bool resultAccepted;
+ bool runOnce;
int iterationCount;
};
diff --git a/src/testlib/qtestbasicstreamer.h b/src/testlib/qtestbasicstreamer.h
index cabbf34..932f5c3 100644
--- a/src/testlib/qtestbasicstreamer.h
+++ b/src/testlib/qtestbasicstreamer.h
@@ -53,7 +53,7 @@ QT_MODULE(Test)
class QTestElement;
class QTestElementAttribute;
class QTestLogger;
-class QTestCharBuffer;
+struct QTestCharBuffer;
class QTestBasicStreamer
{
diff --git a/src/testlib/qtestcase.cpp b/src/testlib/qtestcase.cpp
index 65a6e89..3e162bc 100644
--- a/src/testlib/qtestcase.cpp
+++ b/src/testlib/qtestcase.cpp
@@ -356,6 +356,25 @@ QT_BEGIN_NAMESPACE
{Chapter 5: Writing a Benchmark}{Writing a Benchmark}
*/
+/*!
+ \macro QBENCHMARK_ONCE
+
+ \relates QTest
+
+ This macro is used to measure the performance of code within a test.
+ The code to be benchmarked is contained within a code block following
+ this macro.
+
+ Unlike QBENCHMARK, the contents of the contained code block is only run
+ once. The elapsed time will be reported as "0" if it's to short to
+ be measured by the selected backend. (Use)
+
+ \sa {QTestLib Manual#Creating a Benchmark}{Creating a Benchmark},
+ {Chapter 5: Writing a Benchmark}{Writing a Benchmark}
+*/
+
+
+
/*! \enum QTest::SkipMode
This enum describes the modes for skipping tests during execution
diff --git a/src/xmlpatterns/query.pri b/src/xmlpatterns/query.pri
index e09a618..fab1940 100644
--- a/src/xmlpatterns/query.pri
+++ b/src/xmlpatterns/query.pri
@@ -11,4 +11,4 @@ include($$PWD/parser/parser.pri)
include($$PWD/projection/projection.pri)
include($$PWD/type/type.pri)
include($$PWD/utils/utils.pri)
-include($$PWD/qobjectmodel/qobjectmodel.pri)
+include($$PWD/qobjectmodel/qobjectmodel.pri, "", true)
diff --git a/src/xmlpatterns/xmlpatterns.pro b/src/xmlpatterns/xmlpatterns.pro
index fb6aa1a..bb8e452 100644
--- a/src/xmlpatterns/xmlpatterns.pro
+++ b/src/xmlpatterns/xmlpatterns.pro
@@ -22,10 +22,9 @@ include($$PWD/janitors/janitors.pri)
include($$PWD/parser/parser.pri)
include($$PWD/projection/projection.pri)
include($$PWD/schema/schema.pri)
-include($$PWD/schematron/schematron.pri)
include($$PWD/type/type.pri)
include($$PWD/utils/utils.pri)
-include($$PWD/qobjectmodel/qobjectmodel.pri)
+include($$PWD/qobjectmodel/qobjectmodel.pri, "", true)
wince*: {
# The Microsoft MIPS compiler crashes if /Og is specified
diff --git a/tests/auto/qaccessibility_mac/qaccessibility_mac.pro b/tests/auto/qaccessibility_mac/qaccessibility_mac.pro
index b32a7e5..47f72d1 100644
--- a/tests/auto/qaccessibility_mac/qaccessibility_mac.pro
+++ b/tests/auto/qaccessibility_mac/qaccessibility_mac.pro
@@ -11,7 +11,7 @@ requires(mac)
# builds (where QTDIR points to the build directory).
# autotest + shadow build is not supported :)
exists($$(QTDIR)/tools/designer/src/lib/uilib/uilib.pri) {
- include($$(QTDIR)/tools/designer/src/lib/uilib/uilib.pri)
+ include($$(QTDIR)/tools/designer/src/lib/uilib/uilib.pri, "", true)
INCLUDEPATH += $$(QTDIR)/tools/designer/src/uitools
SOURCES += $$(QTDIR)/tools/designer/src/uitools/quiloader.cpp
HEADERS += $$(QTDIR)/tools/designer/src/uitools/quiloader.h
diff --git a/tests/auto/qgraphicstransform/tst_qgraphicstransform.cpp b/tests/auto/qgraphicstransform/tst_qgraphicstransform.cpp
index 672b1f1..c9481da 100644
--- a/tests/auto/qgraphicstransform/tst_qgraphicstransform.cpp
+++ b/tests/auto/qgraphicstransform/tst_qgraphicstransform.cpp
@@ -137,7 +137,10 @@ void tst_QGraphicsTransform::rotation()
void tst_QGraphicsTransform::rotation3d()
{
QGraphicsRotation3D rotation;
- rotation.setOrigin(QPointF(10, 10));
+ QCOMPARE(rotation.axis().x(), (qreal)0);
+ QCOMPARE(rotation.axis().y(), (qreal)0);
+ QCOMPARE(rotation.axis().z(), (qreal)1);
+ QCOMPARE(rotation.angle(), (qreal)0);
QTransform t;
rotation.applyTo(&t);
@@ -147,6 +150,23 @@ void tst_QGraphicsTransform::rotation3d()
rotation.setAngle(180);
+ QTransform t180;
+ t180.rotate(180.0f);
+
+ QCOMPARE(t, QTransform());
+ QVERIFY(qFuzzyCompare(rotation.transform(), t180));
+
+ rotation.setAxis(QVector3D(0, 0, 0));
+ rotation.setOrigin(QPointF(10, 10));
+
+ t = QTransform();
+ rotation.applyTo(&t);
+
+ QCOMPARE(t, QTransform());
+ QCOMPARE(rotation.transform(), QTransform());
+
+ rotation.setAngle(180);
+
QCOMPARE(t, QTransform());
QCOMPARE(rotation.transform(), QTransform());
diff --git a/tests/auto/qmake/testdata/functions/functions.pro b/tests/auto/qmake/testdata/functions/functions.pro
index 9ed92f96..5e089e4 100644
--- a/tests/auto/qmake/testdata/functions/functions.pro
+++ b/tests/auto/qmake/testdata/functions/functions.pro
@@ -46,7 +46,7 @@ isEmpty( CONFIG ) {
}
#include
-include( infiletest.pro )
+include( infiletest.pro, "", true )
!contains( DEFINES, QT_DLL ) {
message( "FAILED: include function: $$DEFINES" )
}
diff --git a/tests/auto/qtimeline/tst_qtimeline.cpp b/tests/auto/qtimeline/tst_qtimeline.cpp
index e6e75ff..4ce1f4b 100644
--- a/tests/auto/qtimeline/tst_qtimeline.cpp
+++ b/tests/auto/qtimeline/tst_qtimeline.cpp
@@ -81,6 +81,7 @@ private slots:
void outOfRange();
void stateInFinishedSignal();
void resume();
+ void restart();
protected slots:
void finishedSlot();
@@ -177,7 +178,7 @@ void tst_QTimeLine::currentTime()
QCOMPARE(spy.count(), 1);
spy.clear();
QCOMPARE(timeLine.currentTime(), timeLine.duration()/2);
- timeLine.start();
+ timeLine.resume();
// Let it update on its own
QTest::qWait(timeLine.duration()/4);
QCOMPARE(timeLine.state(), QTimeLine::Running);
@@ -699,5 +700,43 @@ void tst_QTimeLine::resume()
}
}
+void tst_QTimeLine::restart()
+{
+ QTimeLine timeLine(100);
+ timeLine.setFrameRange(0,9);
+
+ timeLine.start();
+ QTest::qWait(timeLine.duration()*2);
+ QCOMPARE(timeLine.currentFrame(), timeLine.endFrame());
+ QCOMPARE(timeLine.state(), QTimeLine::NotRunning);
+
+ // A restart with the same duration
+ timeLine.start();
+ QCOMPARE(timeLine.state(), QTimeLine::Running);
+ QCOMPARE(timeLine.currentFrame(), timeLine.startFrame());
+ QCOMPARE(timeLine.currentTime(), 0);
+ QTest::qWait(250);
+ QCOMPARE(timeLine.currentFrame(), timeLine.endFrame());
+ QCOMPARE(timeLine.state(), QTimeLine::NotRunning);
+
+ // Set a smaller duration and restart
+ timeLine.setDuration(50);
+ timeLine.start();
+ QCOMPARE(timeLine.state(), QTimeLine::Running);
+ QCOMPARE(timeLine.currentFrame(), timeLine.startFrame());
+ QCOMPARE(timeLine.currentTime(), 0);
+ QTest::qWait(250);
+ QCOMPARE(timeLine.currentFrame(), timeLine.endFrame());
+ QCOMPARE(timeLine.state(), QTimeLine::NotRunning);
+
+ // Set a longer duration and restart
+ timeLine.setDuration(150);
+ timeLine.start();
+ QCOMPARE(timeLine.state(), QTimeLine::Running);
+ QCOMPARE(timeLine.currentFrame(), timeLine.startFrame());
+ QCOMPARE(timeLine.currentTime(), 0);
+}
+
QTEST_MAIN(tst_QTimeLine)
+
#include "tst_qtimeline.moc"
diff --git a/tests/auto/runQtXmlPatternsTests.sh b/tests/auto/runQtXmlPatternsTests.sh
deleted file mode 100755
index 41d6c83..0000000
--- a/tests/auto/runQtXmlPatternsTests.sh
+++ /dev/null
@@ -1,61 +0,0 @@
-#!/bin/sh
-# Runs all the tests specific to QtXmlPatterns in one go.
-
-# If you add a test, remember to update ./auto.pro too.
-# checkxmlfiles is not part of Patternist, but since it shares test code
-# and use Patternist, we include it as well.
-#
-# Sorted alphabetically, with the difference that xmlpatternsxqts appears
-# before xmlpattersview, xmlpatternsdiagnosticsts, and xmlpatternsxslts, since
-# they have the former as dependency.
-tests=" \
-checkxmlfiles \
-patternistexamplefiletree \
-patternistexamples \
-patternistheaders \
-qabstractmessagehandler \
-qabstracturiresolver \
-qabstractxmlforwarditerator \
-qabstractxmlnodemodel \
-qabstractxmlreceiver \
-qapplicationargumentparser \
-qautoptr \
-qsimplexmlnodemodel \
-qsourcelocation \
-qtokenautomaton \
-qxmlformatter \
-qxmlitem \
-qxmlname \
-qxmlnamepool \
-qxmlnodemodelindex \
-qxmlquery \
-qxmlresultitems \
-qxmlserializer \
-xmlpatterns \
-xmlpatternsxqts \
-xmlpatternsdiagnosticsts \
-xmlpatternsschema \
-xmlpatternsschemats \
-xmlpatternsview \
-xmlpatternsxslts"
-
-os=`uname`
-
-for test in $tests; do
- cd $test
- make distclean
- qmake
- make
-
- if [ $os = "Darwin" ]; then
- ./tst_"$test".app/Contents/MacOS/tst_"$test"
- else
- ./tst_$test
- fi
-
- if [ $? -ne 0 ]; then
- exit $?
- else
- cd ..
- fi
-done
diff --git a/tests/auto/selftests/benchlibwalltime/tst_benchlibwalltime.cpp b/tests/auto/selftests/benchlibwalltime/tst_benchlibwalltime.cpp
index de65599..8474144f 100644
--- a/tests/auto/selftests/benchlibwalltime/tst_benchlibwalltime.cpp
+++ b/tests/auto/selftests/benchlibwalltime/tst_benchlibwalltime.cpp
@@ -50,6 +50,7 @@ class tst_BenchlibWalltime: public QObject
private slots:
void waitForOneThousand();
void waitForFourThousand();
+ void qbenchmark_once();
};
void tst_BenchlibWalltime::waitForOneThousand()
@@ -66,6 +67,16 @@ void tst_BenchlibWalltime::waitForFourThousand()
}
}
+void tst_BenchlibWalltime::qbenchmark_once()
+{
+ int iterations = 0;
+ QBENCHMARK_ONCE {
+ ++iterations;
+ }
+ QCOMPARE(iterations, 1);
+}
+
+
QTEST_MAIN(tst_BenchlibWalltime)
#include "tst_benchlibwalltime.moc"
diff --git a/tests/auto/selftests/expected_benchlibwalltime.txt b/tests/auto/selftests/expected_benchlibwalltime.txt
index 03f2465..ec2d020 100644
--- a/tests/auto/selftests/expected_benchlibwalltime.txt
+++ b/tests/auto/selftests/expected_benchlibwalltime.txt
@@ -7,6 +7,9 @@ PASS : tst_BenchlibWalltime::waitForOneThousand()
RESULT : tst_BenchlibWalltime::waitForFourThousand():
4,000 msec per iteration (total: 4000, iterations: 1)
PASS : tst_BenchlibWalltime::waitForFourThousand()
+RESULT : tst_BenchlibWalltime::qbenchmark_once():
+ 0 msec per iteration (total: 0, iterations: 1)
+PASS : tst_BenchlibWalltime::qbenchmark_once()
PASS : tst_BenchlibWalltime::cleanupTestCase()
-Totals: 4 passed, 0 failed, 0 skipped
+Totals: 5 passed, 0 failed, 0 skipped
********* Finished testing of tst_BenchlibWalltime *********
diff --git a/tools/assistant/compat/lib/lib.pro b/tools/assistant/compat/lib/lib.pro
index d4b5a47..e50d470 100644
--- a/tools/assistant/compat/lib/lib.pro
+++ b/tools/assistant/compat/lib/lib.pro
@@ -32,7 +32,7 @@ contains(CONFIG, static) {
#load up the headers info
CONFIG += qt_install_headers
HEADERS_PRI = $$QT_BUILD_TREE/include/QtAssistant/headers.pri
-include($$HEADERS_PRI)|clear(HEADERS_PRI)
+include($$HEADERS_PRI, "", true)|clear(HEADERS_PRI)
#mac frameworks
mac:!static:contains(QT_CONFIG, qt_framework) {
diff --git a/tools/checksdk/main.cpp b/tools/checksdk/main.cpp
index 6322eb7..b36aa32 100644
--- a/tools/checksdk/main.cpp
+++ b/tools/checksdk/main.cpp
@@ -161,5 +161,5 @@ int main(int argc, char **argv)
}
}
qWarning("Could not find specified SDK: %s" , qPrintable(sdkName));
- return 0;
-} \ No newline at end of file
+ return -1;
+}
diff --git a/tools/designer/src/components/lib/lib.pro b/tools/designer/src/components/lib/lib.pro
index 4515b66..92cf387 100644
--- a/tools/designer/src/components/lib/lib.pro
+++ b/tools/designer/src/components/lib/lib.pro
@@ -24,7 +24,7 @@ QMAKE_TARGET_DESCRIPTION = Graphical user interface designer.
#load up the headers info
CONFIG += qt_install_headers
HEADERS_PRI = $$QT_BUILD_TREE/include/QtDesigner/headers.pri
-include($$HEADERS_PRI)|clear(HEADERS_PRI)
+include($$HEADERS_PRI, "", true)|clear(HEADERS_PRI)
#mac frameworks
mac:!static:contains(QT_CONFIG, qt_framework) {
diff --git a/tools/designer/src/lib/lib.pro b/tools/designer/src/lib/lib.pro
index e0f2f23..495976d 100644
--- a/tools/designer/src/lib/lib.pro
+++ b/tools/designer/src/lib/lib.pro
@@ -34,7 +34,7 @@ QMAKE_TARGET_DESCRIPTION = Graphical user interface designer.
#load up the headers info
CONFIG += qt_install_headers
HEADERS_PRI = $$QT_BUILD_TREE/include/QtDesigner/headers.pri
-include($$HEADERS_PRI)|clear(HEADERS_PRI)
+include($$HEADERS_PRI, "", true)|clear(HEADERS_PRI)
#mac frameworks
mac:CONFIG += explicitlib
diff --git a/tools/designer/src/uitools/uitools.pro b/tools/designer/src/uitools/uitools.pro
index a20abf0..34e4877 100644
--- a/tools/designer/src/uitools/uitools.pro
+++ b/tools/designer/src/uitools/uitools.pro
@@ -22,7 +22,7 @@ include(../lib/uilib/uilib.pri)
HEADERS += quiloader.h
SOURCES += quiloader.cpp
-include($$QT_BUILD_TREE/include/QtUiTools/headers.pri)
+include($$QT_BUILD_TREE/include/QtUiTools/headers.pri, "", true)
quitools_headers.files = $$SYNCQT.HEADER_FILES $$SYNCQT.HEADER_CLASSES
quitools_headers.path = $$[QT_INSTALL_HEADERS]/QtUiTools
INSTALLS += quitools_headers