From c08964f0bb6b2622f94b377679d6689e6d960017 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Thu, 28 Sep 2017 16:41:51 +0200 Subject: Fix outdated BSD license header Change-Id: Ibec1396de3e929a229e1550b8045d687aa5a513c Reviewed-by: Jani Heikkinen --- .../data/clearfocusondestruction.qml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) 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 -- cgit v1.2.3 From 4c0aac07d422e8bce9dfc7f8345e2af62217e886 Mon Sep 17 00:00:00 2001 From: Jesus Fernandez Date: Tue, 24 Oct 2017 18:54:27 +0200 Subject: Fix resource leak MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The system resource will not be reclaimed and reused, reducing the future availability of the resource. In QQuickStackView::​componentComplete(): Leak of memory or pointers to system resources (CWE-404) Coverity-Id: 178431 Change-Id: Iff8f8e2d228042789faae56512fd3255c3e56498 Reviewed-by: J-P Nurmi --- src/quicktemplates2/qquickstackview.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/quicktemplates2/qquickstackview.cpp b/src/quicktemplates2/qquickstackview.cpp index ea4e36d0..20e3c817 100644 --- a/src/quicktemplates2/qquickstackview.cpp +++ b/src/quicktemplates2/qquickstackview.cpp @@ -996,6 +996,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)) { emit depthChanged(); d->setCurrentItem(element); -- cgit v1.2.3 From 1d39e62ada99d85a411e1d6fc26925e342f5b59b Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Thu, 26 Oct 2017 19:40:25 +0200 Subject: Default: cleanup an unnecessary extra item from the background The size (and position) of the background item is respected if explicitly defined, so the wrapper item is not needed. This does not reduce or simplify bindings, so the performance boost is not remarkable, but this can improve the qmlbench results by a frame or two depending on the hardware. ;) Change-Id: Ibd45cf02a3eb30b48b4af86e369a1db4cc5d3864 Reviewed-by: Mitch Curtis --- src/imports/controls/MenuItem.qml | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/src/imports/controls/MenuItem.qml b/src/imports/controls/MenuItem.qml index d2420d86..2c8eab5f 100644 --- a/src/imports/controls/MenuItem.qml +++ b/src/imports/controls/MenuItem.qml @@ -72,16 +72,13 @@ T.MenuItem { source: control.checkable ? "qrc:/qt-project.org/imports/QtQuick/Controls.2/images/check.png" : "" } - background: Item { + background: Rectangle { implicitWidth: 200 implicitHeight: 40 - - Rectangle { - x: 1 - y: 1 - width: parent.width - 2 - height: parent.height - 2 - color: control.visualFocus || control.down ? Default.delegateColor : "transparent" - } + x: 1 + y: 1 + width: parent.width - 2 + height: parent.height - 2 + color: control.visualFocus || control.down ? Default.delegateColor : "transparent" } } -- cgit v1.2.3