aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2017-10-30 08:45:13 +0100
committerLiang Qi <liang.qi@qt.io>2017-10-30 09:21:39 +0100
commit61cb7ca7e8d8ebc5103870ae2795dbc65eb2c89f (patch)
treedc28618df7f4ebfe398ec3a8597b61bbb492e42c
parent82eee3b411f23eb01ab3658d77504970ddb151ef (diff)
parent1d39e62ada99d85a411e1d6fc26925e342f5b59b (diff)
Merge remote-tracking branch 'origin/5.9' into 5.10
Conflicts: src/imports/controls/MenuItem.qml Change-Id: Id4cae0e53a58796694ad1fc9f8380b317ee62984
-rw-r--r--src/imports/controls/MenuItem.qml15
-rw-r--r--src/quicktemplates2/qquickstackview.cpp1
-rw-r--r--tests/auto/qquickapplicationwindow/data/clearfocusondestruction.qml14
3 files changed, 19 insertions, 11 deletions
diff --git a/src/imports/controls/MenuItem.qml b/src/imports/controls/MenuItem.qml
index 751b33f6..8633c311 100644
--- a/src/imports/controls/MenuItem.qml
+++ b/src/imports/controls/MenuItem.qml
@@ -94,16 +94,13 @@ T.MenuItem {
defaultColor: "#353637"
}
- background: Item {
+ background: Rectangle {
implicitWidth: 200
implicitHeight: 40
-
- Rectangle {
- x: 1
- y: 1
- width: parent.width - 2
- height: parent.height - 2
- color: control.down ? control.palette.midlight : control.highlighted ? control.palette.light : "transparent"
- }
+ x: 1
+ y: 1
+ width: parent.width - 2
+ height: parent.height - 2
+ color: control.down ? control.palette.midlight : control.highlighted ? control.palette.light : "transparent"
}
}
diff --git a/src/quicktemplates2/qquickstackview.cpp b/src/quicktemplates2/qquickstackview.cpp
index 674e6ee1..2f13b1a1 100644
--- a/src/quicktemplates2/qquickstackview.cpp
+++ b/src/quicktemplates2/qquickstackview.cpp
@@ -1029,6 +1029,7 @@ void QQuickStackView::componentComplete()
element = QQuickStackElement::fromString(d->initialItem.toString(), this, &error);
if (!error.isEmpty()) {
d->warn(error);
+ delete element;
} else if (d->pushElement(element)) {
d->depthChange(d->elements.count(), oldDepth);
d->setCurrentItem(element);
diff --git a/tests/auto/qquickapplicationwindow/data/clearfocusondestruction.qml b/tests/auto/qquickapplicationwindow/data/clearfocusondestruction.qml
index 3589439e..a992e0be 100644
--- a/tests/auto/qquickapplicationwindow/data/clearfocusondestruction.qml
+++ b/tests/auto/qquickapplicationwindow/data/clearfocusondestruction.qml
@@ -1,12 +1,22 @@
/****************************************************************************
**
** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are