aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-09-17 01:01:43 +0200
committerUlf Hermann <ulf.hermann@qt.io>2019-09-17 19:17:51 +0200
commitdbf40f74de81e2780e3b14e35704750a2e44d978 (patch)
treeecff6f867863e7990b8cac764b20726846bd6a9b
parentbe478ea886b8b4867cd8832f4f848bcce96c4512 (diff)
parentcd9c5c2bf9da4dc68c6af380949e9f0d40b3b01d (diff)
Merge "Merge remote-tracking branch 'origin/5.13' into 5.14"
-rw-r--r--dist/changes-5.12.589
-rw-r--r--src/qml/jit/qv4assemblercommon_p.h2
-rw-r--r--src/qml/jit/qv4baselineassembler.cpp7
-rw-r--r--src/qml/jit/qv4baselineassembler_p.h1
-rw-r--r--src/qml/jit/qv4baselinejit.cpp16
-rw-r--r--src/qml/jsruntime/qv4vme_moth.cpp6
-rw-r--r--src/quick/items/qquicktextnodeengine.cpp4
m---------tests/auto/qml/ecmascripttests/test2620
-rw-r--r--tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp6
-rw-r--r--tests/auto/quick/qquicklayouts/data/tst_gridlayout.qml95
-rw-r--r--tests/auto/quick/qquickmousearea/BLACKLIST4
-rw-r--r--tests/auto/quick/qquicktext/data/transparentBackground.qml16
-rw-r--r--tests/auto/quick/qquicktext/tst_qquicktext.cpp22
-rw-r--r--tests/auto/quick/qquicktextinput/BLACKLIST3
-rw-r--r--tests/manual/scenegraph_lancelot/scenegrabber/main.cpp9
-rw-r--r--tests/manual/scenegraph_lancelot/scenegraph/scenegraph.pro4
-rw-r--r--tests/manual/scenegraph_lancelot/scenegraph/tst_scenegraph.cpp20
17 files changed, 231 insertions, 73 deletions
diff --git a/dist/changes-5.12.5 b/dist/changes-5.12.5
new file mode 100644
index 0000000000..be0621c138
--- /dev/null
+++ b/dist/changes-5.12.5
@@ -0,0 +1,89 @@
+Qt 5.12.5 is a bug-fix release. It maintains both forward and backward
+compatibility (source and binary) with Qt 5.12.0 through 5.12.4.
+
+For more details, refer to the online documentation included in this
+distribution. The documentation is also available online:
+
+https://doc.qt.io/qt-5/index.html
+
+The Qt version 5.12 series is binary compatible with the 5.11.x series.
+Applications compiled for 5.11 will continue to run with 5.12.
+
+Some of the changes listed in this file include issue tracking numbers
+corresponding to tasks in the Qt Bug Tracker:
+
+https://bugreports.qt.io/
+
+Each of these identifiers can be entered in the bug tracker to obtain more
+information about a particular change.
+
+****************************************************************************
+* Important Behavior Changes *
+****************************************************************************
+
+ - [QTBUG-76871] TapHandler.point now holds the release position while the
+ tapped() signal is emitted.
+
+****************************************************************************
+* QtQml *
+****************************************************************************
+
+ - [QTBUG-76018] Readonly QML properties can now be templates such as
+ list<...>.
+ - [QTBUG-76085] QQmlApplication engine now automatically loads translation
+ files from resource directories.
+ - [QTBUG-75939] Instances of QJSValue can now safely be passed between
+ threads and destroyed in a different thread.
+ - [QTBUG-75642] Fixed an invalid memory read caused by the JIT compiler.
+ - [QTBUG-71387] Fixed a use-after-free condition caused by calling
+ qmlClearTypeRegistrations().
+ - [QTBUG-76656] Made sure JavaScript "this" points to the right object when
+ calling scope and context properties through lookups.
+ - [QTBUG-76796] Fixed bindings to typeof(<name>) to get re-evaluated when
+ <name> gets defined.
+ - [QTBUG-55407] Avoid invalid memory access when calling setData() on a
+ QQmlComponent constructed without an engine.
+ - [QTBUG-76441] Fixed importing "qrc:/" (with exactly one slash).
+ - [QTBUG-71329] Implemented the missing bits of JavaScript promise chains.
+ - [QTBUG-75983] Fixed null pointer dereference in QQmlXmlHttpRequest.
+ - [QTBUG-77012] Fixed static build issue: multiple definitions of
+ qtPositionAttributeName().
+ - [QTBUG-77102] The component versioning is not enforced when loading
+ singletons.
+
+****************************************************************************
+* QtQuick *
+****************************************************************************
+
+ - Item Views:
+ * [QTBUG-76487] We now properly populate delegates with the populate
+ transition when the view is resized after componentComplete.
+ * [QTBUG-31677] A ListView footer is now positioned correctly after the
+ last item is removed.
+ * [QTBUG-76433][QTBUG-44308] Fixed a crash while doing fast flicking in
+ transitions that use Animators.
+ * [QTBUG-76254] Fixed a crash in QQmlDelegateModel.
+
+ - Input:
+ * [QTBUG-75399] Fixed a crash when using the KeyNavigation attached property.
+ * [QTBUG-76875] DragHandler now respects acceptedButtons.
+ * [QTBUG-71218] If a Controls 2 Button has a DragHandler, the button is
+ now released when the drag begins.
+
+ - Scene graph:
+ * [QTBUG-76603] qmlscene now sets the default surface format earlier
+ and correctly.
+ * [QTBUG-68566] Fixed rendering freeze when using software rendering
+ of WebEngine in QQuickWidget.
+ * [QTBUG-66810] Software rendering: repaint everything when moving
+ between HiDpi and lower-resolution screens.
+
+ - Text:
+ * [QTBUG-77217] Fixed a bug where aligning an image to "top" or "bottom"
+ could cause a crash under certain circumstances.
+ * [QTBUG-76528] Fixed missing glyphs and in some cases crashes when
+ displaying many characters from the same font on a system with a
+ low maximum texture size.
+ * [QTBUG-76528] Fixed a bug when displaying many characters from the same
+ font on a system with a low maximum texture size.
+ * [QTBUG-74761] Added support for text color when using color fonts.
diff --git a/src/qml/jit/qv4assemblercommon_p.h b/src/qml/jit/qv4assemblercommon_p.h
index b9f71b7bd9..b18d082be6 100644
--- a/src/qml/jit/qv4assemblercommon_p.h
+++ b/src/qml/jit/qv4assemblercommon_p.h
@@ -624,9 +624,9 @@ public:
// and jump out of the exception handler.
loadPtr(exceptionHandlerAddress(), ScratchRegister);
Jump exitFunction = branchPtr(Equal, ScratchRegister, TrustedImmPtr(0));
+ loadUndefined();
jump(ScratchRegister);
exitFunction.link(this);
- loadUndefined();
if (functionExit.isSet())
jump(functionExit);
diff --git a/src/qml/jit/qv4baselineassembler.cpp b/src/qml/jit/qv4baselineassembler.cpp
index 5e34087ff5..59de86a85d 100644
--- a/src/qml/jit/qv4baselineassembler.cpp
+++ b/src/qml/jit/qv4baselineassembler.cpp
@@ -1474,6 +1474,12 @@ void BaselineAssembler::saveAccumulatorInFrame()
offsetof(CallData, accumulator)));
}
+void BaselineAssembler::loadAccumulatorFromFrame()
+{
+ pasm()->loadAccumulator(PlatformAssembler::Address(PlatformAssembler::JSStackFrameRegister,
+ offsetof(CallData, accumulator)));
+}
+
static ReturnedValue TheJitIs__Tail_Calling__ToTheRuntimeSoTheJitFrameIsMissing(CppStackFrame *frame, ExecutionEngine *engine)
{
return Runtime::TailCall::call(frame, engine);
@@ -1600,7 +1606,6 @@ void BaselineAssembler::deadTemporalZoneCheck(int offsetForSavedIP, int variable
{
auto valueIsAliveJump = pasm()->jumpNotEmpty();
storeInstructionPointer(offsetForSavedIP);
- saveAccumulatorInFrame();
prepareCallWithArgCount(2);
passInt32AsArg(variableName, 1);
passEngineAsArg(0);
diff --git a/src/qml/jit/qv4baselineassembler_p.h b/src/qml/jit/qv4baselineassembler_p.h
index 5e5d9d0672..33fd288ac3 100644
--- a/src/qml/jit/qv4baselineassembler_p.h
+++ b/src/qml/jit/qv4baselineassembler_p.h
@@ -155,6 +155,7 @@ public:
void passPointerAsArg(void *ptr, int arg);
void callRuntime(const char *functionName, const void *funcPtr, CallResultDestination dest);
void saveAccumulatorInFrame();
+ void loadAccumulatorFromFrame();
void jsTailCall(int func, int thisObject, int argc, int argv);
// exception/context stuff
diff --git a/src/qml/jit/qv4baselinejit.cpp b/src/qml/jit/qv4baselinejit.cpp
index 906cc30e67..fcaa87290e 100644
--- a/src/qml/jit/qv4baselinejit.cpp
+++ b/src/qml/jit/qv4baselinejit.cpp
@@ -74,6 +74,7 @@ void BaselineJIT::generate()
#define STORE_IP() as->storeInstructionPointer(nextInstructionOffset())
#define STORE_ACC() as->saveAccumulatorInFrame()
+#define LOAD_ACC() as->loadAccumulatorFromFrame()
#define BASELINEJIT_GENERATE_RUNTIME_CALL(function, destination) { \
as->GENERATE_RUNTIME_CALL(function, destination); \
if (Runtime::function::throws) \
@@ -228,6 +229,7 @@ void BaselineJIT::generate_StoreNameSloppy(int name)
as->passInt32AsArg(name, 1);
as->passEngineAsArg(0);
BASELINEJIT_GENERATE_RUNTIME_CALL(StoreNameSloppy, CallResultDestination::Ignore);
+ LOAD_ACC();
}
void BaselineJIT::generate_StoreNameStrict(int name)
@@ -239,6 +241,7 @@ void BaselineJIT::generate_StoreNameStrict(int name)
as->passInt32AsArg(name, 1);
as->passEngineAsArg(0);
BASELINEJIT_GENERATE_RUNTIME_CALL(StoreNameStrict, CallResultDestination::Ignore);
+ LOAD_ACC();
}
void BaselineJIT::generate_LoadElement(int base)
@@ -262,6 +265,7 @@ void BaselineJIT::generate_StoreElement(int base, int index)
as->passJSSlotAsArg(base, 1);
as->passEngineAsArg(0);
BASELINEJIT_GENERATE_RUNTIME_CALL(StoreElement, CallResultDestination::Ignore);
+ LOAD_ACC();
}
void BaselineJIT::generate_LoadProperty(int name)
@@ -297,6 +301,7 @@ void BaselineJIT::generate_StoreProperty(int name, int base)
as->passJSSlotAsArg(base, 1);
as->passEngineAsArg(0);
BASELINEJIT_GENERATE_RUNTIME_CALL(StoreProperty, CallResultDestination::Ignore);
+ LOAD_ACC();
}
void BaselineJIT::generate_SetLookup(int index, int base)
@@ -317,7 +322,6 @@ void BaselineJIT::generate_SetLookup(int index, int base)
void BaselineJIT::generate_LoadSuperProperty(int property)
{
STORE_IP();
- STORE_ACC();
as->prepareCallWithArgCount(2);
as->passJSSlotAsArg(property, 1);
as->passEngineAsArg(0);
@@ -333,6 +337,7 @@ void BaselineJIT::generate_StoreSuperProperty(int property)
as->passJSSlotAsArg(property, 1);
as->passEngineAsArg(0);
BASELINEJIT_GENERATE_RUNTIME_CALL(StoreSuperProperty, CallResultDestination::Ignore);
+ LOAD_ACC();
}
void BaselineJIT::generate_Yield()
@@ -562,6 +567,7 @@ void BaselineJIT::generate_PushBlockContext(int index)
as->passInt32AsArg(index, 1);
as->passEngineAsArg(0);
BASELINEJIT_GENERATE_RUNTIME_CALL(PushBlockContext, CallResultDestination::Ignore);
+ as->loadAccumulatorFromFrame();
}
void BaselineJIT::generate_CloneBlockContext()
@@ -570,6 +576,7 @@ void BaselineJIT::generate_CloneBlockContext()
as->prepareCallWithArgCount(1);
as->passEngineAsArg(0);
BASELINEJIT_GENERATE_RUNTIME_CALL(CloneBlockContext, CallResultDestination::Ignore);
+ as->loadAccumulatorFromFrame();
}
void BaselineJIT::generate_PushScriptContext(int index)
@@ -579,6 +586,7 @@ void BaselineJIT::generate_PushScriptContext(int index)
as->passInt32AsArg(index, 1);
as->passEngineAsArg(0);
BASELINEJIT_GENERATE_RUNTIME_CALL(PushScriptContext, CallResultDestination::Ignore);
+ as->loadAccumulatorFromFrame();
}
void BaselineJIT::generate_PopScriptContext()
@@ -587,6 +595,7 @@ void BaselineJIT::generate_PopScriptContext()
as->prepareCallWithArgCount(1);
as->passEngineAsArg(0);
BASELINEJIT_GENERATE_RUNTIME_CALL(PopScriptContext, CallResultDestination::Ignore);
+ as->loadAccumulatorFromFrame();
}
void BaselineJIT::generate_PopContext() { as->popContext(); }
@@ -682,11 +691,13 @@ void BaselineJIT::generate_TypeofValue()
void BaselineJIT::generate_DeclareVar(int varName, int isDeletable)
{
+ STORE_ACC();
as->prepareCallWithArgCount(3);
as->passInt32AsArg(varName, 2);
as->passInt32AsArg(isDeletable, 1);
as->passEngineAsArg(0);
BASELINEJIT_GENERATE_RUNTIME_CALL(DeclareVar, CallResultDestination::Ignore);
+ LOAD_ACC();
}
void BaselineJIT::generate_DefineArray(int argc, int args)
@@ -744,11 +755,13 @@ void BaselineJIT::generate_CreateRestParameter(int argIndex)
void BaselineJIT::generate_ConvertThisToObject()
{
+ STORE_ACC();
as->prepareCallWithArgCount(2);
as->passJSSlotAsArg(CallData::This, 1);
as->passEngineAsArg(0);
BASELINEJIT_GENERATE_RUNTIME_CALL(ConvertThisToObject, CallResultDestination::InAccumulator);
as->storeReg(CallData::This);
+ LOAD_ACC();
}
void BaselineJIT::generate_LoadSuperConstructor()
@@ -893,6 +906,7 @@ void BaselineJIT::generate_ThrowOnNullOrUndefined()
as->passAccumulatorAsArg(1);
as->passEngineAsArg(0);
BASELINEJIT_GENERATE_RUNTIME_CALL(ThrowOnNullOrUndefined, CallResultDestination::Ignore);
+ LOAD_ACC();
}
void BaselineJIT::generate_GetTemplateObject(int index)
diff --git a/src/qml/jsruntime/qv4vme_moth.cpp b/src/qml/jsruntime/qv4vme_moth.cpp
index 4d099d2e0f..27d518f5c6 100644
--- a/src/qml/jsruntime/qv4vme_moth.cpp
+++ b/src/qml/jsruntime/qv4vme_moth.cpp
@@ -647,7 +647,6 @@ QV4::ReturnedValue VME::interpret(CppStackFrame *frame, ExecutionEngine *engine,
MOTH_BEGIN_INSTR(LoadSuperProperty)
STORE_IP();
- STORE_ACC();
acc = Runtime::LoadSuperProperty::call(engine, STACK_VALUE(property));
CHECK_EXCEPTION;
MOTH_END_INSTR(LoadSuperProperty)
@@ -794,12 +793,14 @@ QV4::ReturnedValue VME::interpret(CppStackFrame *frame, ExecutionEngine *engine,
MOTH_BEGIN_INSTR(Construct)
STORE_IP();
+ STORE_ACC();
acc = Runtime::Construct::call(engine, STACK_VALUE(func), ACC, stack + argv, argc);
CHECK_EXCEPTION;
MOTH_END_INSTR(Construct)
MOTH_BEGIN_INSTR(ConstructWithSpread)
STORE_IP();
+ STORE_ACC();
acc = Runtime::ConstructWithSpread::call(engine, STACK_VALUE(func), ACC, stack + argv, argc);
CHECK_EXCEPTION;
MOTH_END_INSTR(ConstructWithSpread)
@@ -827,7 +828,6 @@ QV4::ReturnedValue VME::interpret(CppStackFrame *frame, ExecutionEngine *engine,
MOTH_BEGIN_INSTR(DeadTemporalZoneCheck)
if (ACC.isEmpty()) {
STORE_IP();
- STORE_ACC();
Runtime::ThrowReferenceError::call(engine, name);
goto handleUnwind;
}
@@ -970,6 +970,7 @@ QV4::ReturnedValue VME::interpret(CppStackFrame *frame, ExecutionEngine *engine,
MOTH_END_INSTR(CreateRestParameter)
MOTH_BEGIN_INSTR(ConvertThisToObject)
+ STORE_ACC();
stack[CallData::This] = Runtime::ConvertThisToObject::call(engine, stack[CallData::This]);
CHECK_EXCEPTION;
MOTH_END_INSTR(ConvertThisToObject)
@@ -980,6 +981,7 @@ QV4::ReturnedValue VME::interpret(CppStackFrame *frame, ExecutionEngine *engine,
MOTH_END_INSTR(LoadSuperConstructor)
MOTH_BEGIN_INSTR(ToObject)
+ STORE_ACC();
acc = ACC.toObject(engine)->asReturnedValue();
CHECK_EXCEPTION;
MOTH_END_INSTR(ToObject)
diff --git a/src/quick/items/qquicktextnodeengine.cpp b/src/quick/items/qquicktextnodeengine.cpp
index c4a8370f34..7af90f0f8e 100644
--- a/src/quick/items/qquicktextnodeengine.cpp
+++ b/src/quick/items/qquicktextnodeengine.cpp
@@ -781,8 +781,8 @@ void QQuickTextNodeEngine::addToSceneGraph(QQuickTextNode *parentNode,
for (int i = 0; i < m_backgrounds.size(); ++i) {
const QRectF &rect = m_backgrounds.at(i).first;
const QColor &color = m_backgrounds.at(i).second;
-
- parentNode->addRectangleNode(rect, color);
+ if (color.alpha() != 0)
+ parentNode->addRectangleNode(rect, color);
}
// Add all text with unselected color first
diff --git a/tests/auto/qml/ecmascripttests/test262 b/tests/auto/qml/ecmascripttests/test262
-Subproject 6b0c42c63c2492bd0a7a96d3179d122b5f71793
+Subproject 3c69133cc419840c1be34638039cd8c48a7ef58
diff --git a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
index 269d90c891..fa78e60bba 100644
--- a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
+++ b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
@@ -2050,7 +2050,7 @@ void tst_qqmlecmascript::functionErrors()
QObject *resource = qobject_cast<ScarceResourceObject*>(QQmlProperty::read(object, "a").value<QObject*>());
warning = url + QLatin1String(":16: TypeError: Property 'scarceResource' of object ScarceResourceObject(0x%1) is not a function");
- warning = warning.arg(QString::number((quintptr)resource, 16));
+ warning = warning.arg(QString::number(quintptr(resource), 16));
QTest::ignoreMessage(QtWarningMsg, warning.toLatin1().constData()); // we expect a meaningful warning to be printed.
QMetaObject::invokeMethod(object, "retrieveScarceResource");
delete object;
@@ -4575,7 +4575,7 @@ void tst_qqmlecmascript::scarceResources_other()
eo = qobject_cast<ScarceResourceObject*>(QQmlProperty::read(object, "a").value<QObject*>());
QVERIFY(eo->scarceResourceIsDetached()); // should be no other copies of it at this stage.
expectedWarning = varComponentTwelve.url().toString() + QLatin1String(":16: TypeError: Property 'scarceResource' of object ScarceResourceObject(0x%1) is not a function");
- expectedWarning = expectedWarning.arg(QString::number((quintptr)eo, 16));
+ expectedWarning = expectedWarning.arg(QString::number(quintptr(eo), 16));
QTest::ignoreMessage(QtWarningMsg, qPrintable(expectedWarning)); // we expect a meaningful warning to be printed.
QMetaObject::invokeMethod(object, "retrieveScarceResource");
QVERIFY(!object->property("scarceResourceCopy").isValid()); // due to exception, assignment will NOT have occurred.
@@ -4649,7 +4649,7 @@ void tst_qqmlecmascript::scarceResources_other()
eo = qobject_cast<ScarceResourceObject*>(QQmlProperty::read(object, "a").value<QObject*>());
QVERIFY(eo->scarceResourceIsDetached()); // should be no other copies of it at this stage.
expectedWarning = variantComponentTwelve.url().toString() + QLatin1String(":16: TypeError: Property 'scarceResource' of object ScarceResourceObject(0x%1) is not a function");
- expectedWarning = expectedWarning.arg(QString::number((quintptr)eo, 16));
+ expectedWarning = expectedWarning.arg(QString::number(quintptr(eo), 16));
QTest::ignoreMessage(QtWarningMsg, qPrintable(expectedWarning)); // we expect a meaningful warning to be printed.
QMetaObject::invokeMethod(object, "retrieveScarceResource");
QVERIFY(!object->property("scarceResourceCopy").isValid()); // due to exception, assignment will NOT have occurred.
diff --git a/tests/auto/quick/qquicklayouts/data/tst_gridlayout.qml b/tests/auto/quick/qquicklayouts/data/tst_gridlayout.qml
index 6a1c0632ad..49838c4fd5 100644
--- a/tests/auto/quick/qquicklayouts/data/tst_gridlayout.qml
+++ b/tests/auto/quick/qquicklayouts/data/tst_gridlayout.qml
@@ -60,8 +60,8 @@ Item {
id: testCase
name: "Tests_GridLayout"
when: windowShown
- width: 200
- height: 200
+ width: parent.width
+ height: parent.height
Component {
id: layout_flow_Component
@@ -84,7 +84,7 @@ Item {
function test_flow()
{
- var layout = layout_flow_Component.createObject(container);
+ var layout = createTemporaryObject(layout_flow_Component, container);
tryCompare(layout.children[0], "itemRect", [ 0, 0, 10, 10])
tryCompare(layout.children[1], "itemRect", [10, 0, 10, 10])
tryCompare(layout.children[2], "itemRect", [20, 0, 10, 10])
@@ -102,8 +102,6 @@ Item {
tryCompare(layout.children[4], "itemRect", [10, 0, 10, 10])
tryCompare(layout.children[5], "itemRect", [10, 10, 10, 10])
-
- layout.destroy()
}
Component {
@@ -178,7 +176,7 @@ Item {
}
function test_flowLeftToRight() {
- var layout = layout_flowLeftToRight_Component.createObject(container);
+ var layout = createTemporaryObject(layout_flowLeftToRight_Component, container);
compare(layout.implicitWidth, 80);
compare(layout.children[0].x, 0);
compare(layout.children[0].y, 0);
@@ -208,8 +206,6 @@ Item {
compare(layout.children[11].y, 60);
compare(layout.children[12].x, 40);
compare(layout.children[12].y, 80);
-
- layout.destroy();
}
@@ -259,7 +255,7 @@ Item {
function test_flowLeftToRightDefaultPositions() {
ignoreWarning("QGridLayoutEngine::addItem: Cell (1, 0) already taken");
- var layout = layout_flowLeftToRightDefaultPositions_Component.createObject(container);
+ var layout = createTemporaryObject(layout_flowLeftToRightDefaultPositions_Component, container);
compare(layout.implicitWidth, 40);
compare(layout.children[0].x, 0);
compare(layout.children[0].y, 0);
@@ -267,7 +263,6 @@ Item {
compare(layout.children[1].y, 20);
compare(layout.children[2].x, 20);
compare(layout.children[2].y, 20);
- layout.destroy();
}
@@ -342,7 +337,7 @@ Item {
}
function test_flowTopToBottom() {
- var layout = layout_flowTopToBottom_Component.createObject(container);
+ var layout = createTemporaryObject(layout_flowTopToBottom_Component, container);
compare(layout.children[0].x, 0);
compare(layout.children[0].y, 0);
compare(layout.children[1].x, 20);
@@ -371,8 +366,6 @@ Item {
compare(layout.children[11].y, 60);
compare(layout.children[12].x, 80);
compare(layout.children[12].y, 0);
-
- layout.destroy();
}
Component {
@@ -432,7 +425,7 @@ Item {
}
function test_spanAcrossEmptyRows() {
- var layout = layout_spanAcrossEmptyRows_Component.createObject(container);
+ var layout = createTemporaryObject(layout_spanAcrossEmptyRows_Component, container);
compare(layout.children[0].x, 0);
compare(layout.children[0].y, 0);
compare(layout.children[1].x, 20);
@@ -442,8 +435,6 @@ Item {
compare(layout.implicitWidth, 60);
compare(layout.Layout.maximumWidth, 120);
-
- layout.destroy();
}
Component {
@@ -463,14 +454,13 @@ Item {
}
function test_spanIsMoreThanColumns() {
- var layout = layout_spanIsMoreThanColumns_Component.createObject(container);
+ var layout = createTemporaryObject(layout_spanIsMoreThanColumns_Component, container);
// item was not added, therefore implicit width is 0
compare(layout.implicitWidth, 0);
- layout.destroy();
}
function test_sizeHints() {
- var layout = layout_spanAcrossEmptyRows_Component.createObject(container);
+ var layout = createTemporaryObject(layout_spanAcrossEmptyRows_Component, container);
compare(layout.visible, true)
var minWidth = layout.Layout.minimumWidth
@@ -489,8 +479,6 @@ Item {
compare(prefHeight, layout.implicitHeight)
compare(maxWidth, layout.Layout.maximumWidth)
compare(maxHeight, layout.Layout.maximumHeight)
-
- layout.destroy();
}
Component {
@@ -567,7 +555,7 @@ Item {
function test_alignment()
{
- var layout = layout_alignment_Component.createObject(container);
+ var layout = createTemporaryObject(layout_alignment_Component, container);
layout.width = 60;
layout.height = 100;
@@ -596,8 +584,6 @@ Item {
layout.children[4].Layout.alignment = Qt.AlignLeft
tryCompare(layout.children[4], "x", 0);
tryCompare(layout.children[4], "y", 60);
-
- layout.destroy();
}
@@ -648,7 +634,7 @@ Item {
function test_rightToLeft()
{
- var layout = layout_rightToLeft_Component.createObject(container);
+ var layout = createTemporaryObject(layout_rightToLeft_Component, container);
layout.width = 180;
layout.height = 50;
@@ -674,8 +660,6 @@ Item {
layout.LayoutMirroring.enabled = true
verifyIsRightToLeft(layout)
-
- layout.destroy();
}
Component {
@@ -698,7 +682,7 @@ Item {
function test_columnsChanged()
{
- var layout = layout_columnsOrRowsChanged_Component.createObject(container);
+ var layout = createTemporaryObject(layout_columnsOrRowsChanged_Component, container);
layout.width = 40;
layout.height = 20;
tryCompare(layout.children[0], "itemRect", [ 0, 5, 10, 10])
@@ -711,13 +695,11 @@ Item {
tryCompare(layout.children[1], "itemRect", [20, 0, 10, 10])
tryCompare(layout.children[2], "itemRect", [ 0, 10, 10, 10])
tryCompare(layout.children[3], "itemRect", [20, 10, 10, 10])
-
- layout.destroy()
}
function test_rowsChanged()
{
- var layout = layout_columnsOrRowsChanged_Component.createObject(container);
+ var layout = createTemporaryObject(layout_columnsOrRowsChanged_Component, container);
layout.flow = GridLayout.TopToBottom
layout.width = 20;
layout.height = 40;
@@ -731,8 +713,6 @@ Item {
tryCompare(layout.children[1], "itemRect", [ 0, 25, 10, 10])
tryCompare(layout.children[2], "itemRect", [10, 5, 10, 10])
tryCompare(layout.children[3], "itemRect", [10, 25, 10, 10])
-
- layout.destroy()
}
Component {
@@ -767,7 +747,7 @@ Item {
function test_columnOrRowChanged()
{
- var layout = layout_columnOrRowChanged_Component.createObject(container);
+ var layout = createTemporaryObject(layout_columnOrRowChanged_Component, container);
layout.width = layout.implicitWidth
layout.height = layout.implicitHeight
// c0-c1-c2
@@ -795,8 +775,6 @@ Item {
tryCompare(layout.children[0], "itemRect", [10, 10, 10, 10])
tryCompare(layout.children[1], "itemRect", [ 0, 0, 10, 10])
tryCompare(layout.children[2], "itemRect", [20, 0, 10, 10])
-
- layout.destroy()
}
Component {
@@ -819,7 +797,7 @@ Item {
}
function test_baselines()
{
- var layout = layout_baselines_Component.createObject(container);
+ var layout = createTemporaryObject(layout_baselines_Component, container);
tryCompare(layout.children[0], "itemRect", [ 0, 0, 10, 10])
tryCompare(layout.children[1], "itemRect", [10, 0, 10, 10])
compare(layout.implicitWidth, 20)
@@ -832,8 +810,6 @@ Item {
tryCompare(layout.children[1], "itemRect", [10, 10, 10, 10])
compare(layout.implicitWidth, 20)
compare(layout.implicitHeight, 20)
-
- layout.destroy();
}
Component {
@@ -851,30 +827,42 @@ Item {
}
}
- function test_spacings()
+ function test_spacings_data()
+ {
+ let data = [
+ { spacing: Number.NaN },
+ { spacing: 0 },
+ { spacing: 10 },
+ { spacing: -5 },
+ { spacing: -19 }
+ ]
+ for (let i = 0; i < data.length; ++i) {
+ data[i].tag = data[i].spacing.toString()
+ }
+ return data
+ }
+
+ function test_spacings(data)
{
- var layout = layout_spacings_Component.createObject(container);
+ var layout = createTemporaryObject(layout_spacings_Component, container);
// breaks down below -19. This is acceptable, since it means that the implicit size of the layout is negative
var testSpacings = [Number.NaN, 0, 10, -5, -19]
layout.rowSpacing = 0
- for (var i = 0; i < testSpacings.length; ++i) {
- var sp = testSpacings[i]
- if (isNaN(sp)) {
- sp = 5 // Test defaults
- } else {
- layout.columnSpacing = sp
- }
- tryCompare(layout.children[0], "itemRect", [ 0, 0, 10, 10])
- tryCompare(layout.children[1], "itemRect", [10 + sp, 0, 10, 10])
- compare(layout.implicitWidth, 20 + sp)
+ var spacing = data.spacing
+ if (isNaN(spacing)) {
+ spacing = 5 // Test defaults
+ } else {
+ layout.columnSpacing = spacing
}
+ tryCompare(layout.children[0], "itemRect", [ 0, 0, 10, 10])
+ tryCompare(layout.children[1], "itemRect", [10 + spacing, 0, 10, 10])
+ compare(layout.implicitWidth, 20 + spacing)
// do not crash
layout.columnSpacing = -100
waitForRendering(layout)
verify(isFinite(layout.implicitWidth))
- layout.destroy();
}
Component {
@@ -1026,11 +1014,10 @@ Item {
function test_invalidateWhileRearranging_QTBUG_44139()
{
- var layout = layout_invalidateWhileRearranging_Component.createObject(container)
+ var layout = createTemporaryObject(layout_invalidateWhileRearranging_Component, container)
waitForRendering(layout);
verify(layout.children[1].visible == false);
- layout.destroy()
}
}
}
diff --git a/tests/auto/quick/qquickmousearea/BLACKLIST b/tests/auto/quick/qquickmousearea/BLACKLIST
new file mode 100644
index 0000000000..f2cb00225b
--- /dev/null
+++ b/tests/auto/quick/qquickmousearea/BLACKLIST
@@ -0,0 +1,4 @@
+# QTBUG-78153
+[nestedStopAtBounds]
+opensuse-leap
+
diff --git a/tests/auto/quick/qquicktext/data/transparentBackground.qml b/tests/auto/quick/qquicktext/data/transparentBackground.qml
new file mode 100644
index 0000000000..a10a1779bb
--- /dev/null
+++ b/tests/auto/quick/qquicktext/data/transparentBackground.qml
@@ -0,0 +1,16 @@
+import QtQuick 2.0
+
+Rectangle {
+ width: 200
+ height: 200
+ color: "white"
+ Text {
+ objectName: "text"
+ textFormat: Text.RichText
+ anchors.fill: parent
+ color: "black"
+ text: "<h1 style=\"background-color:rgba(255,255,255,0.00)\">foo</h1>"
+ verticalAlignment: Text.AlignTop
+ horizontalAlignment: Text.AlignLeft
+ }
+}
diff --git a/tests/auto/quick/qquicktext/tst_qquicktext.cpp b/tests/auto/quick/qquicktext/tst_qquicktext.cpp
index 97107694bd..e62db81d27 100644
--- a/tests/auto/quick/qquicktext/tst_qquicktext.cpp
+++ b/tests/auto/quick/qquicktext/tst_qquicktext.cpp
@@ -164,6 +164,8 @@ private slots:
void verticallyAlignedImageInTable();
+ void transparentBackground();
+
private:
QStringList standard;
QStringList richText;
@@ -4429,6 +4431,26 @@ void tst_qquicktext::verticallyAlignedImageInTable()
// Don't crash
}
+void tst_qquicktext::transparentBackground()
+{
+ if ((QGuiApplication::platformName() == QLatin1String("offscreen"))
+ || (QGuiApplication::platformName() == QLatin1String("minimal")))
+ QSKIP("Skipping due to grabToImage not functional on offscreen/minimimal platforms");
+
+ QScopedPointer<QQuickView> window(new QQuickView);
+ window->setSource(testFileUrl("transparentBackground.qml"));
+ QTRY_COMPARE(window->status(), QQuickView::Ready);
+
+ window->show();
+ QVERIFY(QTest::qWaitForWindowExposed(window.data()));
+ QImage img = window->grabWindow();
+ QCOMPARE(img.isNull(), false);
+
+ QColor color = img.pixelColor(0, 0);
+ QCOMPARE(color.red(), 255);
+ QCOMPARE(color.blue(), 255);
+ QCOMPARE(color.green(), 255);
+}
QTEST_MAIN(tst_qquicktext)
#include "tst_qquicktext.moc"
diff --git a/tests/auto/quick/qquicktextinput/BLACKLIST b/tests/auto/quick/qquicktextinput/BLACKLIST
new file mode 100644
index 0000000000..ada7c57c75
--- /dev/null
+++ b/tests/auto/quick/qquicktextinput/BLACKLIST
@@ -0,0 +1,3 @@
+# QTBUG-78162
+[mouseSelectionMode]
+opensuse-leap
diff --git a/tests/manual/scenegraph_lancelot/scenegrabber/main.cpp b/tests/manual/scenegraph_lancelot/scenegrabber/main.cpp
index 6da0799bbc..23c678380c 100644
--- a/tests/manual/scenegraph_lancelot/scenegrabber/main.cpp
+++ b/tests/manual/scenegraph_lancelot/scenegrabber/main.cpp
@@ -36,6 +36,11 @@
#include <QtQuick/QQuickView>
#include <QtQuick/QQuickItem>
+#ifdef Q_OS_WIN
+# include <fcntl.h>
+# include <io.h>
+#endif // Q_OS_WIN
+
// Timeout values:
// A valid screen grab requires the scene to not change
@@ -101,6 +106,10 @@ private slots:
#endif
if (ofile == "-") { // Write to stdout
QFile of;
+#ifdef Q_OS_WIN
+ // Make sure write to stdout doesn't do LF->CRLF
+ _setmode(_fileno(stdout), _O_BINARY);
+#endif // Q_OS_WIN
if (!of.open(1, QIODevice::WriteOnly) || !lastGrab.save(&of, "ppm")) {
qWarning() << "Error: failed to write grabbed image to stdout.";
QGuiApplication::exit(2);
diff --git a/tests/manual/scenegraph_lancelot/scenegraph/scenegraph.pro b/tests/manual/scenegraph_lancelot/scenegraph/scenegraph.pro
index 65819ab5bf..dd0ef268b1 100644
--- a/tests/manual/scenegraph_lancelot/scenegraph/scenegraph.pro
+++ b/tests/manual/scenegraph_lancelot/scenegraph/scenegraph.pro
@@ -9,3 +9,7 @@ SOURCES += tst_scenegraph.cpp
# Include Lancelot protocol code to communicate with baseline server.
# Assuming that we are in a normal Qt5 source code tree
include(../../../../../qtbase/tests/baselineserver/shared/qbaselinetest.pri)
+
+TEST_HELPER_INSTALLS += .././qmlscenegrabber
+
+TESTDATA += ../data
diff --git a/tests/manual/scenegraph_lancelot/scenegraph/tst_scenegraph.cpp b/tests/manual/scenegraph_lancelot/scenegraph/tst_scenegraph.cpp
index 95188ec0f8..40b17ec2a2 100644
--- a/tests/manual/scenegraph_lancelot/scenegraph/tst_scenegraph.cpp
+++ b/tests/manual/scenegraph_lancelot/scenegraph/tst_scenegraph.cpp
@@ -68,6 +68,7 @@ private:
bool renderAndGrab(const QString& qmlFile, const QStringList& extraArgs, QImage *screenshot, QString *errMsg);
quint16 checksumFileOrDir(const QString &path);
+ QString testSuitePath;
int consecutiveErrors; // Not test failures (image mismatches), but system failures (so no image at all)
bool aborted; // This run given up because of too many system failures
};
@@ -81,6 +82,14 @@ tst_Scenegraph::tst_Scenegraph()
void tst_Scenegraph::initTestCase()
{
+ QString dataDir = QFINDTESTDATA("../data/.");
+ if (dataDir.isEmpty())
+ dataDir = QStringLiteral("data");
+ QFileInfo fi(dataDir);
+ if (!fi.exists() || !fi.isDir() || !fi.isReadable())
+ QSKIP("Test suite data directory missing or unreadable: " + fi.canonicalFilePath().toLatin1());
+ testSuitePath = fi.canonicalFilePath();
+
const char *backendVarName = "QT_QUICK_BACKEND";
const QString backend = qEnvironmentVariable(backendVarName, QString::fromLatin1("default"));
QBaselineTest::addClientProperty(QString::fromLatin1(backendVarName), backend);
@@ -95,7 +104,7 @@ void tst_Scenegraph::cleanup()
{
// Allow subsystems time to settle
if (!aborted)
- QTest::qWait(200);
+ QTest::qWait(20);
}
void tst_Scenegraph::testNoTextRendering_data()
@@ -131,13 +140,6 @@ void tst_Scenegraph::setupTestSuite(const QByteArray& filter)
QTest::addColumn<QString>("qmlFile");
int numItems = 0;
- QString testSuiteDir = QLatin1String("data");
- QString testSuiteLocation = QCoreApplication::applicationDirPath();
- QString testSuitePath = testSuiteLocation + QDir::separator() + testSuiteDir;
- QFileInfo fi(testSuitePath);
- if (!fi.exists() || !fi.isDir() || !fi.isReadable())
- QSKIP("Test suite data directory missing or unreadable: " + testSuitePath.toLatin1());
-
QStringList ignoreItems;
QFile ignoreFile(testSuitePath + "/Ignore");
if (ignoreFile.open(QIODevice::ReadOnly)) {
@@ -237,7 +239,7 @@ quint16 tst_Scenegraph::checksumFileOrDir(const QString &path)
QFile f(path);
f.open(QIODevice::ReadOnly);
QByteArray contents = f.readAll();
- return qChecksum(contents.constData(), contents.size());
+ return qChecksum(contents.constData(), uint(contents.size()));
}
if (fi.isDir()) {
static const QStringList nameFilters = QStringList() << "*.qml" << "*.cpp" << "*.png" << "*.jpg";