Hello community,
here is the log from the commit of package libqt5-qtquickcontrols for openSUSE:Factory checked in at 2014-02-11 10:34:53
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libqt5-qtquickcontrols (Old)
and /work/SRC/openSUSE:Factory/.libqt5-qtquickcontrols.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libqt5-qtquickcontrols"
Changes:
--------
--- /work/SRC/openSUSE:Factory/libqt5-qtquickcontrols/libqt5-qtquickcontrols.changes 2013-12-17 07:05:55.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.libqt5-qtquickcontrols.new/libqt5-qtquickcontrols.changes 2014-02-11 10:34:55.000000000 +0100
@@ -1,0 +2,12 @@
+Mon Feb 10 11:24:34 UTC 2014 - mlin@suse.com
+
+- Install LICENSE files to %doc
+
+-------------------------------------------------------------------
+Wed Feb 5 17:07:24 UTC 2014 - hrvoje.senjan@gmail.com
+
+- Update to 5.2.1:
+ * For more details please see:
+ http://blog.qt.digia.com/blog/2014/02/05/qt-5-2-1-released/
+
+-------------------------------------------------------------------
Old:
----
qtquickcontrols-opensource-src-5.2.0.tar.xz
New:
----
qtquickcontrols-opensource-src-5.2.1.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ libqt5-qtquickcontrols.spec ++++++
--- /var/tmp/diff_new_pack.0HgHUe/_old 2014-02-11 10:34:55.000000000 +0100
+++ /var/tmp/diff_new_pack.0HgHUe/_new 2014-02-11 10:34:55.000000000 +0100
@@ -1,7 +1,7 @@
#
# spec file for package libqt5-qtquickcontrols
#
-# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -16,20 +16,34 @@
#
+%define qt5_snapshot 0
+
Name: libqt5-qtquickcontrols
-Version: 5.2.0
+Version: 5.2.1
Release: 0
Summary: Qt 5 Serial Port Addon
License: SUSE-LGPL-2.1-with-digia-exception-1.1 or GPL-3.0
Group: Development/Libraries/X11
Url: http://qt.digia.com
-Source: %{tar_version}.tar.xz
-BuildRequires: fdupes
%define base_name libqt5
-%define real_version 5.2.0
-%define so_version 5.2.0
+%define real_version 5.2.1
+%define so_version 5.2.1
+%if %qt5_snapshot
+%define tar_version qtquickcontrols-%{real_version}
+%else
%define tar_version qtquickcontrols-opensource-src-%{real_version}
-BuildRequires: libQt5Quick-private-headers-devel >= %{version}
+%endif
+Source: %{tar_version}.tar.xz
+BuildRequires: fdupes
+BuildRequires: libQt5Core-private-headers-devel >= %{version}
+BuildRequires: libQt5Gui-private-headers-devel >= %{version}
+BuildRequires: libqt5-qtdeclarative-private-headers-devel >= %{version}
+BuildRequires: pkgconfig(Qt5Qml) >= %{version}
+BuildRequires: pkgconfig(Qt5Quick) >= %{version}
+%if %qt5_snapshot
+#to create the forwarding headers
+BuildRequires: perl
+%endif
BuildRequires: xz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -40,10 +54,17 @@
handling.
%prep
-%define plugindir %{_libdir}/qt5/plugins
+%if %qt5_snapshot
+%setup -q -n qtquickcontrols-%{real_version}
+%else
%setup -q -n qtquickcontrols-opensource-src-%{real_version}
+%endif
%build
+%if %qt5_snapshot
+#force the configure script to generate the forwarding headers (it checks whether .git directory exists)
+mkdir .git
+%endif
%qmake5
%make_jobs
@@ -52,6 +73,7 @@
%files
%defattr(-,root,root,755)
+%doc LGPL_EXCEPTION.txt LICENSE.FDL LICENSE.GPL LICENSE.LGPL
%{_libqt5_archdatadir}/qml/QtQuick
%changelog
++++++ qtquickcontrols-opensource-src-5.2.0.tar.xz -> qtquickcontrols-opensource-src-5.2.1.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtquickcontrols-opensource-src-5.2.0/.qmake.conf new/qtquickcontrols-opensource-src-5.2.1/.qmake.conf
--- old/qtquickcontrols-opensource-src-5.2.0/.qmake.conf 2013-12-08 18:09:38.000000000 +0100
+++ new/qtquickcontrols-opensource-src-5.2.1/.qmake.conf 2014-02-01 21:37:21.000000000 +0100
@@ -1,3 +1,3 @@
load(qt_build_config)
-MODULE_VERSION = 5.2.0
+MODULE_VERSION = 5.2.1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtquickcontrols-opensource-src-5.2.0/.tag new/qtquickcontrols-opensource-src-5.2.1/.tag
--- old/qtquickcontrols-opensource-src-5.2.0/.tag 2013-12-08 18:09:39.000000000 +0100
+++ new/qtquickcontrols-opensource-src-5.2.1/.tag 2014-02-01 21:37:21.000000000 +0100
@@ -1 +1 @@
-1d684b38a4fb0b8ce33401fa9c8f415eba6097bf
+08a32dff66a89fb517e86d3a2232407bd37fb715
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtquickcontrols-opensource-src-5.2.0/examples/quick/controls/basiclayouts/basiclayouts.pro new/qtquickcontrols-opensource-src-5.2.1/examples/quick/controls/basiclayouts/basiclayouts.pro
--- old/qtquickcontrols-opensource-src-5.2.0/examples/quick/controls/basiclayouts/basiclayouts.pro 2013-12-08 18:09:38.000000000 +0100
+++ new/qtquickcontrols-opensource-src-5.2.1/examples/quick/controls/basiclayouts/basiclayouts.pro 2014-02-01 21:37:21.000000000 +0100
@@ -3,6 +3,7 @@
!android: !ios: !blackberry: qtHaveModule(widgets): QT += widgets
include(src/src.pri)
+include(../shared/shared.pri)
OTHER_FILES += \
main.qml
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtquickcontrols-opensource-src-5.2.0/examples/quick/controls/basiclayouts/main.qml new/qtquickcontrols-opensource-src-5.2.1/examples/quick/controls/basiclayouts/main.qml
--- old/qtquickcontrols-opensource-src-5.2.0/examples/quick/controls/basiclayouts/main.qml 2013-12-08 18:09:38.000000000 +0100
+++ new/qtquickcontrols-opensource-src-5.2.1/examples/quick/controls/basiclayouts/main.qml 2014-02-01 21:37:21.000000000 +0100
@@ -47,6 +47,7 @@
import QtQuick.Layouts 1.0
ApplicationWindow {
+ visible: true
title: "Basic layouts"
property int margin: 11
width: mainLayout.implicitWidth + 2 * margin
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtquickcontrols-opensource-src-5.2.0/examples/quick/controls/basiclayouts/src/main.cpp new/qtquickcontrols-opensource-src-5.2.1/examples/quick/controls/basiclayouts/src/main.cpp
--- old/qtquickcontrols-opensource-src-5.2.0/examples/quick/controls/basiclayouts/src/main.cpp 2013-12-08 18:09:38.000000000 +0100
+++ new/qtquickcontrols-opensource-src-5.2.1/examples/quick/controls/basiclayouts/src/main.cpp 2014-02-01 21:37:21.000000000 +0100
@@ -38,5 +38,12 @@
**
****************************************************************************/
-#include "../../shared/qt_quick_controls_examplemain.h"
-QT_QUICK_CONTROLS_EXAMPLE_MAIN(qrc:/main.qml)
+#include "qtquickcontrolsapplication.h"
+#include
+
+int main(int argc, char *argv[])
+{
+ QtQuickControlsApplication app(argc, argv);
+ QQmlApplicationEngine engine(QUrl("qrc:/main.qml"));
+ return app.exec();
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtquickcontrols-opensource-src-5.2.0/examples/quick/controls/gallery/content/ChildWindow.qml new/qtquickcontrols-opensource-src-5.2.1/examples/quick/controls/gallery/content/ChildWindow.qml
--- old/qtquickcontrols-opensource-src-5.2.0/examples/quick/controls/gallery/content/ChildWindow.qml 2013-12-08 18:09:38.000000000 +0100
+++ new/qtquickcontrols-opensource-src-5.2.1/examples/quick/controls/gallery/content/ChildWindow.qml 2014-02-01 21:37:21.000000000 +0100
@@ -59,7 +59,7 @@
color: syspal.window
anchors.fill: parent
- Text {
+ Label {
id: dimensionsText
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: parent.top
@@ -67,7 +67,7 @@
horizontalAlignment: Text.AlignHCenter
}
- Text {
+ Label {
id: availableDimensionsText
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: dimensionsText.bottom
@@ -75,7 +75,7 @@
horizontalAlignment: Text.AlignHCenter
}
- Text {
+ Label {
id: closeText
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: availableDimensionsText.bottom
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtquickcontrols-opensource-src-5.2.0/examples/quick/controls/gallery/content/Styles.qml new/qtquickcontrols-opensource-src-5.2.1/examples/quick/controls/gallery/content/Styles.qml
--- old/qtquickcontrols-opensource-src-5.2.0/examples/quick/controls/gallery/content/Styles.qml 2013-12-08 18:09:38.000000000 +0100
+++ new/qtquickcontrols-opensource-src-5.2.1/examples/quick/controls/gallery/content/Styles.qml 2014-02-01 21:37:21.000000000 +0100
@@ -309,7 +309,7 @@
anchors.rightMargin: -parent.anchors.rightMargin
}
}
- ParticleSystem{ id: bubbles }
+ ParticleSystem{ id: bubbles; running: visible }
ImageParticle{
id: fireball
system: bubbles
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtquickcontrols-opensource-src-5.2.0/examples/quick/controls/gallery/gallery.pro new/qtquickcontrols-opensource-src-5.2.1/examples/quick/controls/gallery/gallery.pro
--- old/qtquickcontrols-opensource-src-5.2.0/examples/quick/controls/gallery/gallery.pro 2013-12-08 18:09:38.000000000 +0100
+++ new/qtquickcontrols-opensource-src-5.2.1/examples/quick/controls/gallery/gallery.pro 2014-02-01 21:37:21.000000000 +0100
@@ -3,6 +3,7 @@
!android: !ios: !blackberry: qtHaveModule(widgets): QT += widgets
include(src/src.pri)
+include(../shared/shared.pri)
OTHER_FILES += \
main.qml \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtquickcontrols-opensource-src-5.2.0/examples/quick/controls/gallery/main.qml new/qtquickcontrols-opensource-src-5.2.1/examples/quick/controls/gallery/main.qml
--- old/qtquickcontrols-opensource-src-5.2.0/examples/quick/controls/gallery/main.qml 2013-12-08 18:09:38.000000000 +0100
+++ new/qtquickcontrols-opensource-src-5.2.1/examples/quick/controls/gallery/main.qml 2014-02-01 21:37:21.000000000 +0100
@@ -49,6 +49,7 @@
import "content"
ApplicationWindow {
+ visible: true
title: "Component Gallery"
width: 640
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtquickcontrols-opensource-src-5.2.0/examples/quick/controls/gallery/src/main.cpp new/qtquickcontrols-opensource-src-5.2.1/examples/quick/controls/gallery/src/main.cpp
--- old/qtquickcontrols-opensource-src-5.2.0/examples/quick/controls/gallery/src/main.cpp 2013-12-08 18:09:38.000000000 +0100
+++ new/qtquickcontrols-opensource-src-5.2.1/examples/quick/controls/gallery/src/main.cpp 2014-02-01 21:37:21.000000000 +0100
@@ -38,5 +38,12 @@
**
****************************************************************************/
-#include "../../shared/qt_quick_controls_examplemain.h"
-QT_QUICK_CONTROLS_EXAMPLE_MAIN(qrc:/main.qml)
+#include "qtquickcontrolsapplication.h"
+#include
+
+int main(int argc, char *argv[])
+{
+ QtQuickControlsApplication app(argc, argv);
+ QQmlApplicationEngine engine(QUrl("qrc:/main.qml"));
+ return app.exec();
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtquickcontrols-opensource-src-5.2.0/examples/quick/controls/shared/qt_quick_controls_examplemain.h new/qtquickcontrols-opensource-src-5.2.1/examples/quick/controls/shared/qt_quick_controls_examplemain.h
--- old/qtquickcontrols-opensource-src-5.2.0/examples/quick/controls/shared/qt_quick_controls_examplemain.h 2013-12-08 18:09:38.000000000 +0100
+++ new/qtquickcontrols-opensource-src-5.2.1/examples/quick/controls/shared/qt_quick_controls_examplemain.h 1970-01-01 01:00:00.000000000 +0100
@@ -1,80 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the Qt Quick Controls module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
-**
-** 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, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
-** version 1.1, 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.
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QT_QUICK_CONTROLS_EXAMPLEMAIN_H
-#define QT_QUICK_CONTROLS_EXAMPLEMAIN_H
-
-#include <QtQml>
-#include
-#include
-
-#ifdef QT_WIDGETS_LIB
-#include
-#else
-#include
-#endif
-
-QT_BEGIN_NAMESPACE
-
-#ifdef QT_WIDGETS_LIB
-#define Application QApplication
-#else
-#define Application QGuiApplication
-#endif
-
-#define QT_QUICK_CONTROLS_EXAMPLE_MAIN(url) \
- int main(int argc, char *argv[]) \
- { \
- Application app(argc, argv); \
- QQmlApplicationEngine engine(QUrl(#url)); \
- QObject *topLevel = engine.rootObjects().value(0); \
- QQuickWindow *window = qobject_cast(topLevel); \
- if ( !window ) { \
- qWarning("Error: Your root item has to be a Window."); \
- return -1; \
- } \
- window->show(); \
- return app.exec(); \
- }
-
-QT_END_NAMESPACE
-
-#endif // QT_QUICK_CONTROLS_EXAMPLEMAIN_H
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtquickcontrols-opensource-src-5.2.0/examples/quick/controls/shared/qtquickcontrolsapplication.h new/qtquickcontrols-opensource-src-5.2.1/examples/quick/controls/shared/qtquickcontrolsapplication.h
--- old/qtquickcontrols-opensource-src-5.2.0/examples/quick/controls/shared/qtquickcontrolsapplication.h 1970-01-01 01:00:00.000000000 +0100
+++ new/qtquickcontrols-opensource-src-5.2.1/examples/quick/controls/shared/qtquickcontrolsapplication.h 2014-02-01 21:37:21.000000000 +0100
@@ -0,0 +1,61 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the Qt Quick Controls module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** 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 Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** 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, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, 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.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QTQUICKCONTROLSAPPLICATION_H
+#define QTQUICKCONTROLSAPPLICATION_H
+
+#ifdef QT_WIDGETS_LIB
+#include
+#else
+#include
+#endif
+
+QT_BEGIN_NAMESPACE
+
+#ifdef QT_WIDGETS_LIB
+#define QtQuickControlsApplication QApplication
+#else
+#define QtQuickControlsApplication QGuiApplication
+#endif
+
+QT_END_NAMESPACE
+
+#endif // QTQUICKCONTROLSAPPLICATION_H
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtquickcontrols-opensource-src-5.2.0/examples/quick/controls/shared/shared.pri new/qtquickcontrols-opensource-src-5.2.1/examples/quick/controls/shared/shared.pri
--- old/qtquickcontrols-opensource-src-5.2.0/examples/quick/controls/shared/shared.pri 1970-01-01 01:00:00.000000000 +0100
+++ new/qtquickcontrols-opensource-src-5.2.1/examples/quick/controls/shared/shared.pri 2014-02-01 21:37:21.000000000 +0100
@@ -0,0 +1,4 @@
+INCLUDEPATH += $$PWD
+
+SOURCES += \
+ $$PWD/qtquickcontrolsapplication.h
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtquickcontrols-opensource-src-5.2.0/examples/quick/controls/splitview/main.qml new/qtquickcontrols-opensource-src-5.2.1/examples/quick/controls/splitview/main.qml
--- old/qtquickcontrols-opensource-src-5.2.0/examples/quick/controls/splitview/main.qml 2013-12-08 18:09:38.000000000 +0100
+++ new/qtquickcontrols-opensource-src-5.2.1/examples/quick/controls/splitview/main.qml 2014-02-01 21:37:21.000000000 +0100
@@ -47,6 +47,7 @@
import QtQuick.Layouts 1.0
ApplicationWindow {
+ visible: true
width: 600
height: 400
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtquickcontrols-opensource-src-5.2.0/examples/quick/controls/splitview/splitview.pro new/qtquickcontrols-opensource-src-5.2.1/examples/quick/controls/splitview/splitview.pro
--- old/qtquickcontrols-opensource-src-5.2.0/examples/quick/controls/splitview/splitview.pro 2013-12-08 18:09:38.000000000 +0100
+++ new/qtquickcontrols-opensource-src-5.2.1/examples/quick/controls/splitview/splitview.pro 2014-02-01 21:37:21.000000000 +0100
@@ -3,6 +3,7 @@
!android: !ios: !blackberry: qtHaveModule(widgets): QT += widgets
include(src/src.pri)
+include(../shared/shared.pri)
OTHER_FILES += \
main.qml
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtquickcontrols-opensource-src-5.2.0/examples/quick/controls/splitview/src/main.cpp new/qtquickcontrols-opensource-src-5.2.1/examples/quick/controls/splitview/src/main.cpp
--- old/qtquickcontrols-opensource-src-5.2.0/examples/quick/controls/splitview/src/main.cpp 2013-12-08 18:09:38.000000000 +0100
+++ new/qtquickcontrols-opensource-src-5.2.1/examples/quick/controls/splitview/src/main.cpp 2014-02-01 21:37:21.000000000 +0100
@@ -38,5 +38,12 @@
**
****************************************************************************/
-#include "../../shared/qt_quick_controls_examplemain.h"
-QT_QUICK_CONTROLS_EXAMPLE_MAIN(qrc:/main.qml)
+#include "qtquickcontrolsapplication.h"
+#include
+
+int main(int argc, char *argv[])
+{
+ QtQuickControlsApplication app(argc, argv);
+ QQmlApplicationEngine engine(QUrl("qrc:/main.qml"));
+ return app.exec();
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtquickcontrols-opensource-src-5.2.0/examples/quick/controls/tableview/main.qml new/qtquickcontrols-opensource-src-5.2.1/examples/quick/controls/tableview/main.qml
--- old/qtquickcontrols-opensource-src-5.2.0/examples/quick/controls/tableview/main.qml 2013-12-08 18:09:38.000000000 +0100
+++ new/qtquickcontrols-opensource-src-5.2.1/examples/quick/controls/tableview/main.qml 2014-02-01 21:37:21.000000000 +0100
@@ -48,7 +48,7 @@
import QtQuick.XmlListModel 2.0
Window {
-
+ visible: true
width: 538 + frame.margins * 2
height: 360 + frame.margins * 2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtquickcontrols-opensource-src-5.2.0/examples/quick/controls/tableview/src/main.cpp new/qtquickcontrols-opensource-src-5.2.1/examples/quick/controls/tableview/src/main.cpp
--- old/qtquickcontrols-opensource-src-5.2.0/examples/quick/controls/tableview/src/main.cpp 2013-12-08 18:09:38.000000000 +0100
+++ new/qtquickcontrols-opensource-src-5.2.1/examples/quick/controls/tableview/src/main.cpp 2014-02-01 21:37:21.000000000 +0100
@@ -38,5 +38,12 @@
**
****************************************************************************/
-#include "../../shared/qt_quick_controls_examplemain.h"
-QT_QUICK_CONTROLS_EXAMPLE_MAIN(qrc:/main.qml)
+#include "qtquickcontrolsapplication.h"
+#include
+
+int main(int argc, char *argv[])
+{
+ QtQuickControlsApplication app(argc, argv);
+ QQmlApplicationEngine engine(QUrl("qrc:/main.qml"));
+ return app.exec();
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtquickcontrols-opensource-src-5.2.0/examples/quick/controls/tableview/tableview.pro new/qtquickcontrols-opensource-src-5.2.1/examples/quick/controls/tableview/tableview.pro
--- old/qtquickcontrols-opensource-src-5.2.0/examples/quick/controls/tableview/tableview.pro 2013-12-08 18:09:38.000000000 +0100
+++ new/qtquickcontrols-opensource-src-5.2.1/examples/quick/controls/tableview/tableview.pro 2014-02-01 21:37:21.000000000 +0100
@@ -3,6 +3,7 @@
!android: !ios: !blackberry: qtHaveModule(widgets): QT += widgets
include(src/src.pri)
+include(../shared/shared.pri)
OTHER_FILES += \
main.qml
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtquickcontrols-opensource-src-5.2.0/examples/quick/controls/texteditor/qml/main.qml new/qtquickcontrols-opensource-src-5.2.1/examples/quick/controls/texteditor/qml/main.qml
--- old/qtquickcontrols-opensource-src-5.2.0/examples/quick/controls/texteditor/qml/main.qml 2013-12-08 18:09:38.000000000 +0100
+++ new/qtquickcontrols-opensource-src-5.2.1/examples/quick/controls/texteditor/qml/main.qml 2014-02-01 21:37:21.000000000 +0100
@@ -46,6 +46,7 @@
import org.qtproject.example 1.0
ApplicationWindow {
+ visible: true
width: 640
height: 480
minimumWidth: 400
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtquickcontrols-opensource-src-5.2.0/examples/quick/controls/texteditor/src/main.cpp new/qtquickcontrols-opensource-src-5.2.1/examples/quick/controls/texteditor/src/main.cpp
--- old/qtquickcontrols-opensource-src-5.2.0/examples/quick/controls/texteditor/src/main.cpp 2013-12-08 18:09:38.000000000 +0100
+++ new/qtquickcontrols-opensource-src-5.2.1/examples/quick/controls/texteditor/src/main.cpp 2014-02-01 21:37:21.000000000 +0100
@@ -38,32 +38,14 @@
**
****************************************************************************/
-#ifdef QT_WIDGETS_LIB
-#include
-#else
-#include
-#endif
-#include <QtQml>
-#include
-#include
-
+#include "qtquickcontrolsapplication.h"
#include "documenthandler.h"
+#include
int main(int argc, char *argv[])
{
-#ifdef QT_WIDGETS_LIB
- QApplication app(argc, argv);
-#else
- QGuiApplication app(argc, argv);
-#endif
+ QtQuickControlsApplication app(argc, argv);
qmlRegisterType<DocumentHandler>("org.qtproject.example", 1, 0, "DocumentHandler");
QQmlApplicationEngine engine(QUrl("qrc:/qml/main.qml"));
- QObject *topLevel = engine.rootObjects().value(0);
- QQuickWindow *window = qobject_cast(topLevel);
- if ( !window ) {
- qWarning("Error: Your root item has to be a Window.");
- return -1;
- }
- window->show();
return app.exec();
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtquickcontrols-opensource-src-5.2.0/examples/quick/controls/texteditor/texteditor.pro new/qtquickcontrols-opensource-src-5.2.1/examples/quick/controls/texteditor/texteditor.pro
--- old/qtquickcontrols-opensource-src-5.2.0/examples/quick/controls/texteditor/texteditor.pro 2013-12-08 18:09:38.000000000 +0100
+++ new/qtquickcontrols-opensource-src-5.2.1/examples/quick/controls/texteditor/texteditor.pro 2014-02-01 21:37:21.000000000 +0100
@@ -3,6 +3,7 @@
!android: !ios: !blackberry: qtHaveModule(widgets): QT += widgets
include(src/src.pri)
+include(../shared/shared.pri)
OTHER_FILES += \
qml/main.qml \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtquickcontrols-opensource-src-5.2.0/examples/quick/controls/touch/main.qml new/qtquickcontrols-opensource-src-5.2.1/examples/quick/controls/touch/main.qml
--- old/qtquickcontrols-opensource-src-5.2.0/examples/quick/controls/touch/main.qml 2013-12-08 18:09:38.000000000 +0100
+++ new/qtquickcontrols-opensource-src-5.2.1/examples/quick/controls/touch/main.qml 2014-02-01 21:37:21.000000000 +0100
@@ -43,6 +43,7 @@
import "content"
ApplicationWindow {
+ visible: true
width: 800
height: 1280
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtquickcontrols-opensource-src-5.2.0/examples/quick/controls/touch/src/main.cpp new/qtquickcontrols-opensource-src-5.2.1/examples/quick/controls/touch/src/main.cpp
--- old/qtquickcontrols-opensource-src-5.2.0/examples/quick/controls/touch/src/main.cpp 2013-12-08 18:09:38.000000000 +0100
+++ new/qtquickcontrols-opensource-src-5.2.1/examples/quick/controls/touch/src/main.cpp 2014-02-01 21:37:21.000000000 +0100
@@ -38,5 +38,12 @@
**
****************************************************************************/
-#include "../../shared/qt_quick_controls_examplemain.h"
-QT_QUICK_CONTROLS_EXAMPLE_MAIN(qrc:/main.qml)
+#include "qtquickcontrolsapplication.h"
+#include
+
+int main(int argc, char *argv[])
+{
+ QtQuickControlsApplication app(argc, argv);
+ QQmlApplicationEngine engine(QUrl("qrc:/main.qml"));
+ return app.exec();
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtquickcontrols-opensource-src-5.2.0/examples/quick/controls/touch/touch.pro new/qtquickcontrols-opensource-src-5.2.1/examples/quick/controls/touch/touch.pro
--- old/qtquickcontrols-opensource-src-5.2.0/examples/quick/controls/touch/touch.pro 2013-12-08 18:09:38.000000000 +0100
+++ new/qtquickcontrols-opensource-src-5.2.1/examples/quick/controls/touch/touch.pro 2014-02-01 21:37:21.000000000 +0100
@@ -3,6 +3,7 @@
!android: !ios: !blackberry: qtHaveModule(widgets): QT += widgets
include(src/src.pri)
+include(../shared/shared.pri)
OTHER_FILES += \
main.qml \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtquickcontrols-opensource-src-5.2.0/src/controls/ComboBox.qml new/qtquickcontrols-opensource-src-5.2.1/src/controls/ComboBox.qml
--- old/qtquickcontrols-opensource-src-5.2.0/src/controls/ComboBox.qml 2013-12-08 18:09:39.000000000 +0100
+++ new/qtquickcontrols-opensource-src-5.2.1/src/controls/ComboBox.qml 2014-02-01 21:37:21.000000000 +0100
@@ -119,6 +119,9 @@
/*! \qmlproperty int ComboBox::currentIndex
The index of the currently selected item in the ComboBox.
+ Setting currentIndex to \c -1 will reset the selection and clear the text
+ label. If \l editable is \c true, you may also need to manually clear \l editText.
+
\sa model
*/
property alias currentIndex: popup.__selectedIndex
@@ -268,6 +271,28 @@
}
/*! \internal */
+ function __selectPrevItem() {
+ input.blockUpdate = true
+ if (currentIndex > 0) {
+ currentIndex--;
+ input.text = popup.currentText;
+ activated(currentIndex);
+ }
+ input.blockUpdate = false;
+ }
+
+ /*! \internal */
+ function __selectNextItem() {
+ input.blockUpdate = true;
+ if (currentIndex < popupItems.count - 1) {
+ currentIndex++;
+ input.text = popup.currentText;
+ activated(currentIndex);
+ }
+ input.blockUpdate = false;
+ }
+
+ /*! \internal */
property var __popup: popup
style: Qt.createComponent(Settings.style + "/ComboBoxStyle.qml", comboBox)
@@ -285,6 +310,13 @@
forceActiveFocus()
popup.show()
}
+ onWheel: {
+ if (wheel.angleDelta.y > 0) {
+ __selectPrevItem();
+ } else if (wheel.angleDelta.y < 0){
+ __selectNextItem();
+ }
+ }
}
Component.onCompleted: {
@@ -313,7 +345,6 @@
enabled: editable
focus: true
clip: contentWidth > width
- text: currentText
anchors.fill: parent
anchors.leftMargin: 8
@@ -323,27 +354,26 @@
renderType: Text.NativeRendering
selectByMouse: true
- selectionColor: syspal.highlight
- selectedTextColor: syspal.highlightedText
+ color: __style.__syspal.text
+ selectionColor: __style.__syspal.highlight
+ selectedTextColor: __style.__syspal.highlightedText
onAccepted: {
- var idx = input.find(editText)
+ var idx = input.find(editText, Qt.MatchFixedString)
if (idx > -1) {
- var string = textAt(idx);
- if (string.length === editText.length) {
- currentIndex = idx;
- editText = string;
- }
+ editTextMatches = true;
+ currentIndex = idx;
+ editText = textAt(idx);
} else {
+ editTextMatches = false;
currentIndex = -1;
popup.currentText = editText;
}
comboBox.accepted();
}
- SystemPalette { id: syspal }
-
property bool blockUpdate: false
property string prevText
+ property bool editTextMatches: true
function find (text, searchType) {
for (var i = 0 ; i < popupItems.count ; ++i) {
@@ -354,6 +384,10 @@
} else if (searchType === Qt.CaseSensitive) {
if (currentString.indexOf(text) === 0)
return i;
+ } else if (searchType === Qt.MatchFixedString) {
+ if (currentString.toLowerCase().indexOf(text.toLowerCase()) === 0
+ && currentString.length === text.length)
+ return i;
} else if (currentString.toLowerCase().indexOf(text.toLowerCase()) === 0) {
return i
}
@@ -396,7 +430,7 @@
Keys.onPressed: allowComplete = (event.key !== Qt.Key_Backspace && event.key !== Qt.Key_Delete);
onTextChanged: {
- if (editable && !blockUpdate && allowComplete) {
+ if (editable && !blockUpdate && allowComplete && text.length > 0) {
var completed = input.tryComplete(text)
if (completed.length > text.length) {
var oldtext = input.text;
@@ -408,6 +442,13 @@
}
}
+ Binding {
+ target: input
+ property: "text"
+ value: popup.currentText
+ when: input.editTextMatches
+ }
+
onTextRoleChanged: popup.resolveTextValue(textRole)
Menu {
@@ -420,7 +461,12 @@
onSelectedTextChanged: if (selectedText) popup.currentText = selectedText
property string selectedText
- on__SelectedIndexChanged: updateSelectedText()
+ on__SelectedIndexChanged: {
+ if (__selectedIndex === -1)
+ popup.currentText = ""
+ else
+ updateSelectedText()
+ }
property string textRole: ""
property bool ready: false
@@ -432,7 +478,7 @@
property ExclusiveGroup eg: ExclusiveGroup { id: eg }
- property bool __modelIsArray: popupItems.model ? popupItems.model.constructor === Array : false
+ property bool modelIsArray: false
Instantiator {
id: popupItems
@@ -440,6 +486,7 @@
property bool updatingModel: false
onModelChanged: {
+ popup.modelIsArray = !!model ? model.constructor === Array : false
if (active) {
if (updatingModel && popup.__selectedIndex === 0) {
// We still want to update the currentText
@@ -449,12 +496,13 @@
popup.__selectedIndex = 0
}
}
+ popup.resolveTextValue(comboBox.textRole)
}
MenuItem {
text: popup.textRole === '' ?
modelData :
- ((popup.__modelIsArray ? modelData[popup.textRole] : model[popup.textRole]) || '')
+ ((popup.modelIsArray ? modelData[popup.textRole] : model[popup.textRole]) || '')
onTriggered: {
if (index !== currentIndex)
activated(index)
@@ -479,7 +527,7 @@
}
var get = model['get'];
- if (!get && popup.__modelIsArray) {
+ if (!get && popup.modelIsArray && !!model[0]) {
if (model[0].constructor !== String && model[0].constructor !== Number)
get = function(i) { return model[i]; }
}
@@ -528,8 +576,10 @@
function updateSelectedText() {
var selectedItem;
- if (__selectedIndex !== -1 && (selectedItem = items[__selectedIndex]))
+ if (__selectedIndex !== -1 && (selectedItem = items[__selectedIndex])) {
+ input.editTextMatches = true
selectedText = selectedItem.text
+ }
}
}
@@ -540,23 +590,6 @@
popup.show()
}
- Keys.onUpPressed: {
- input.blockUpdate = true
- if (currentIndex > 0) {
- currentIndex--;
- input.text = popup.currentText;
- activated(currentIndex);
- }
- input.blockUpdate = false;
- }
-
- Keys.onDownPressed: {
- input.blockUpdate = true;
- if (currentIndex < popupItems.count - 1) {
- currentIndex++;
- input.text = popup.currentText;
- activated(currentIndex);
- }
- input.blockUpdate = false;
- }
+ Keys.onUpPressed: __selectPrevItem()
+ Keys.onDownPressed: __selectNextItem()
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtquickcontrols-opensource-src-5.2.0/src/controls/Label.qml new/qtquickcontrols-opensource-src-5.2.1/src/controls/Label.qml
--- old/qtquickcontrols-opensource-src-5.2.0/src/controls/Label.qml 2013-12-08 18:09:39.000000000 +0100
+++ new/qtquickcontrols-opensource-src-5.2.1/src/controls/Label.qml 2014-02-01 21:37:21.000000000 +0100
@@ -88,4 +88,6 @@
id: pal
colorGroup: enabled ? SystemPalette.Active : SystemPalette.Disabled
}
+ Accessible.name: text
+ Accessible.role: Accessible.StaticText
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtquickcontrols-opensource-src-5.2.0/src/controls/Private/qquickspinboxvalidator.cpp new/qtquickcontrols-opensource-src-5.2.1/src/controls/Private/qquickspinboxvalidator.cpp
--- old/qtquickcontrols-opensource-src-5.2.0/src/controls/Private/qquickspinboxvalidator.cpp 2013-12-08 18:09:39.000000000 +0100
+++ new/qtquickcontrols-opensource-src-5.2.1/src/controls/Private/qquickspinboxvalidator.cpp 2014-02-01 21:37:21.000000000 +0100
@@ -69,7 +69,7 @@
QString QQuickSpinBoxValidator::text() const
{
- return m_prefix + locale().toString(m_value, 'f', m_validator.decimals()) + m_suffix;
+ return textFromValue(m_value);
}
qreal QQuickSpinBoxValidator::value() const
@@ -178,7 +178,7 @@
void QQuickSpinBoxValidator::fixup(QString &input) const
{
- input.remove(locale().groupSeparator());
+ input = textFromValue(m_value).remove(locale().groupSeparator());
}
QValidator::State QQuickSpinBoxValidator::validate(QString &input, int &pos) const
@@ -207,8 +207,11 @@
if (state == QValidator::Acceptable) {
bool ok = false;
qreal val = locale().toDouble(value, &ok);
- if (ok)
+ if (ok) {
const_cast(this)->setValue(val);
+ if (input != textFromValue(val))
+ state = QValidator::Intermediate;
+ }
}
return state;
}
@@ -229,4 +232,9 @@
setValue(m_value - m_step);
}
+QString QQuickSpinBoxValidator::textFromValue(qreal value) const
+{
+ return m_prefix + locale().toString(value, 'f', m_validator.decimals()) + m_suffix;
+}
+
QT_END_NAMESPACE
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtquickcontrols-opensource-src-5.2.0/src/controls/Private/qquickspinboxvalidator_p.h new/qtquickcontrols-opensource-src-5.2.1/src/controls/Private/qquickspinboxvalidator_p.h
--- old/qtquickcontrols-opensource-src-5.2.0/src/controls/Private/qquickspinboxvalidator_p.h 2013-12-08 18:09:39.000000000 +0100
+++ new/qtquickcontrols-opensource-src-5.2.1/src/controls/Private/qquickspinboxvalidator_p.h 2014-02-01 21:37:21.000000000 +0100
@@ -107,6 +107,9 @@
void suffixChanged();
void textChanged();
+protected:
+ QString textFromValue(qreal value) const;
+
private:
qreal m_value;
qreal m_step;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtquickcontrols-opensource-src-5.2.0/src/controls/Private/qquickstyleitem.cpp new/qtquickcontrols-opensource-src-5.2.1/src/controls/Private/qquickstyleitem.cpp
--- old/qtquickcontrols-opensource-src-5.2.0/src/controls/Private/qquickstyleitem.cpp 2013-12-08 18:09:39.000000000 +0100
+++ new/qtquickcontrols-opensource-src-5.2.1/src/controls/Private/qquickstyleitem.cpp 2014-02-01 21:37:21.000000000 +0100
@@ -917,6 +917,7 @@
frame.state = m_styleoption->state;
frame.lineWidth = qApp->style()->pixelMetric(QStyle::PM_DefaultFrameWidth, m_styleoption, 0);
frame.rect = m_styleoption->rect;
+ frame.styleObject = this;
size = qApp->style()->sizeFromContents(QStyle::CT_LineEdit, &frame, QSize(width, height));
}
break;
@@ -1582,6 +1583,7 @@
frame.lineWidth = fw;
frame.midLineWidth = 0;
frame.rect = m_styleoption->rect;
+ frame.styleObject = this;
qApp->style()->drawPrimitive(QStyle::PE_FrameMenu, &frame, painter);
}
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtquickcontrols-opensource-src-5.2.0/src/controls/ScrollView.qml new/qtquickcontrols-opensource-src-5.2.1/src/controls/ScrollView.qml
--- old/qtquickcontrols-opensource-src-5.2.0/src/controls/ScrollView.qml 2013-12-08 18:09:38.000000000 +0100
+++ new/qtquickcontrols-opensource-src-5.2.1/src/controls/ScrollView.qml 2014-02-01 21:37:21.000000000 +0100
@@ -60,7 +60,7 @@
Example:
\code
ScrollView {
- Image { imageSource: "largeImage.png" }
+ Image { source: "largeImage.png" }
}
\endcode
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtquickcontrols-opensource-src-5.2.0/src/controls/Slider.qml new/qtquickcontrols-opensource-src-5.2.1/src/controls/Slider.qml
--- old/qtquickcontrols-opensource-src-5.2.0/src/controls/Slider.qml 2013-12-08 18:09:39.000000000 +0100
+++ new/qtquickcontrols-opensource-src-5.2.1/src/controls/Slider.qml 2014-02-01 21:37:21.000000000 +0100
@@ -181,8 +181,10 @@
style: Qt.createComponent(Settings.style + "/SliderStyle.qml", slider)
- Keys.onRightPressed: value += (maximumValue - minimumValue)/10.0
- Keys.onLeftPressed: value -= (maximumValue - minimumValue)/10.0
+ Keys.onRightPressed: if (__horizontal) value += (maximumValue - minimumValue)/10.0
+ Keys.onLeftPressed: if (__horizontal) value -= (maximumValue - minimumValue)/10.0
+ Keys.onUpPressed: if (!__horizontal) value += (maximumValue - minimumValue)/10.0
+ Keys.onDownPressed: if (!__horizontal) value -= (maximumValue - minimumValue)/10.0
RangeModel {
id: range
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtquickcontrols-opensource-src-5.2.0/src/controls/SpinBox.qml new/qtquickcontrols-opensource-src-5.2.1/src/controls/SpinBox.qml
--- old/qtquickcontrols-opensource-src-5.2.0/src/controls/SpinBox.qml 2013-12-08 18:09:39.000000000 +0100
+++ new/qtquickcontrols-opensource-src-5.2.1/src/controls/SpinBox.qml 2014-02-01 21:37:21.000000000 +0100
@@ -180,13 +180,15 @@
/*! \internal */
function __increment() {
validator.increment()
- input.selectValue()
+ if (activeFocus)
+ input.selectValue()
}
/*! \internal */
function __decrement() {
validator.decrement()
- input.selectValue()
+ if (activeFocus)
+ input.selectValue()
}
/*! \internal */
@@ -253,7 +255,7 @@
horizontalAlignment: spinbox.horizontalAlignment
verticalAlignment: __panel ? __panel.verticalAlignment : Qt.AlignVCenter
- selectByMouse: true
+ selectByMouse: activeFocus || activeFocusOnPress
validator: SpinBoxValidator {
id: validator
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtquickcontrols-opensource-src-5.2.0/src/controls/StatusBar.qml new/qtquickcontrols-opensource-src-5.2.1/src/controls/StatusBar.qml
--- old/qtquickcontrols-opensource-src-5.2.0/src/controls/StatusBar.qml 2013-12-08 18:09:38.000000000 +0100
+++ new/qtquickcontrols-opensource-src-5.2.1/src/controls/StatusBar.qml 2014-02-01 21:37:21.000000000 +0100
@@ -72,7 +72,7 @@
\endcode
*/
-Item {
+FocusScope {
id: statusbar
activeFocusOnTab: false
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtquickcontrols-opensource-src-5.2.0/src/controls/Styles/Base/BusyIndicatorStyle.qml new/qtquickcontrols-opensource-src-5.2.1/src/controls/Styles/Base/BusyIndicatorStyle.qml
--- old/qtquickcontrols-opensource-src-5.2.0/src/controls/Styles/Base/BusyIndicatorStyle.qml 2013-12-08 18:09:39.000000000 +0100
+++ new/qtquickcontrols-opensource-src-5.2.1/src/controls/Styles/Base/BusyIndicatorStyle.qml 2014-02-01 21:37:21.000000000 +0100
@@ -77,6 +77,8 @@
/*! This defines the appearance of the busy indicator. */
property Component indicator: Item {
+ id: indicatorItem
+
implicitWidth: 48
implicitHeight: 48
@@ -96,6 +98,7 @@
loops: Animation.Infinite
from: 0
to: 360
+ running: indicatorItem.visible && (control.running || indicatorItem.opacity > 0);
}
}
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtquickcontrols-opensource-src-5.2.0/src/controls/Styles/Base/SpinBoxStyle.qml new/qtquickcontrols-opensource-src-5.2.1/src/controls/Styles/Base/SpinBoxStyle.qml
--- old/qtquickcontrols-opensource-src-5.2.0/src/controls/Styles/Base/SpinBoxStyle.qml 2013-12-08 18:09:39.000000000 +0100
+++ new/qtquickcontrols-opensource-src-5.2.1/src/controls/Styles/Base/SpinBoxStyle.qml 2014-02-01 21:37:21.000000000 +0100
@@ -76,8 +76,7 @@
}
/*! The content margins of the text field. */
- padding { top: 1 ; left: Math.round(TextSingleton.implicitHeight/2) ; right: Math.round(TextSingleton.implicitHeight) ; bottom: 0 }
-
+ padding { top: 1 ; left: Math.round(styleData.contentHeight/2) ; right: Math.max(22, Math.round(styleData.contentHeight)) ; bottom: 0 }
/*! \qmlproperty enumeration horizontalAlignment
This property defines the default text aligment.
@@ -141,8 +140,8 @@
/*! The background of the SpinBox. */
property Component background: Item {
- implicitHeight: Math.max(25, Math.round(TextSingleton.implicitHeight * 1.2))
- implicitWidth: styleData.contentWidth + 26
+ implicitHeight: Math.max(25, Math.round(styleData.contentHeight * 1.2))
+ implicitWidth: styleData.contentWidth + padding.left + padding.right
Rectangle {
anchors.fill: parent
anchors.bottomMargin: -1
@@ -156,7 +155,7 @@
GradientStop {color: "#fff" ; position: 0.1}
GradientStop {color: "#fff" ; position: 1}
}
- radius: TextSingleton.implicitHeight * 0.16
+ radius: control.font.pixelSize * 0.16
anchors.fill: parent
border.color: control.activeFocus ? "#47b" : "#999"
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtquickcontrols-opensource-src-5.2.0/src/controls/Styles/Base/TabViewStyle.qml new/qtquickcontrols-opensource-src-5.2.1/src/controls/Styles/Base/TabViewStyle.qml
--- old/qtquickcontrols-opensource-src-5.2.0/src/controls/Styles/Base/TabViewStyle.qml 2013-12-08 18:09:39.000000000 +0100
+++ new/qtquickcontrols-opensource-src-5.2.1/src/controls/Styles/Base/TabViewStyle.qml 2014-02-01 21:37:21.000000000 +0100
@@ -142,11 +142,9 @@
implicitWidth: Math.round(Math.min(maxTabWidth, textitem.implicitWidth + 20))
implicitHeight: Math.round(textitem.implicitHeight + 10)
- clip: true
Item {
anchors.fill: parent
anchors.bottomMargin: styleData.selected ? 0 : 2
- clip: true
BorderImage {
anchors.fill: parent
source: styleData.selected ? "images/tab_selected.png" : "images/tab.png"
@@ -157,25 +155,27 @@
anchors.topMargin: styleData.selected ? 0 : 1
}
}
- Rectangle {
- anchors.fill: textitem
- anchors.margins: -1
- anchors.leftMargin: -3
- anchors.rightMargin: -3
- visible: (styleData.activeFocus && styleData.selected)
- height: 6
- radius: 3
- color: "#224f9fef"
- border.color: "#47b"
- }
Text {
id: textitem
- anchors.centerIn: parent
- anchors.alignWhenCentered: true
+ anchors.fill: parent
+ anchors.leftMargin: 4
+ anchors.rightMargin: 4
+ verticalAlignment: Text.AlignVCenter
+ horizontalAlignment: Text.AlignHCenter
text: styleData.title
+ elide: Text.ElideMiddle
renderType: Text.NativeRendering
scale: control.tabPosition === Qt.TopEdge ? 1 : -1
color: __syspal.text
+ Rectangle {
+ anchors.centerIn: parent
+ width: textitem.paintedWidth + 6
+ height: textitem.paintedHeight + 4
+ visible: (styleData.activeFocus && styleData.selected)
+ radius: 3
+ color: "#224f9fef"
+ border.color: "#47b"
+ }
}
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtquickcontrols-opensource-src-5.2.0/src/controls/Styles/Base/TextFieldStyle.qml new/qtquickcontrols-opensource-src-5.2.1/src/controls/Styles/Base/TextFieldStyle.qml
--- old/qtquickcontrols-opensource-src-5.2.0/src/controls/Styles/Base/TextFieldStyle.qml 2013-12-08 18:09:39.000000000 +0100
+++ new/qtquickcontrols-opensource-src-5.2.1/src/controls/Styles/Base/TextFieldStyle.qml 2014-02-01 21:37:21.000000000 +0100
@@ -77,7 +77,7 @@
readonly property TextField control: __control
/*! The content margins of the text field. */
- padding { top: 4 ; left: TextSingleton.implicitHeight/3 ; right: TextSingleton.implicitHeight/3 ; bottom:4 }
+ padding { top: 4 ; left: Math.round(control.__contentHeight/3) ; right: control.__contentHeight/3 ; bottom: 4 }
/*! The current font. */
property font font
@@ -93,6 +93,7 @@
/*!
\qmlproperty enumeration renderType
+ \since 5.2
Override the default rendering type for the control.
@@ -113,8 +114,8 @@
/*! The background of the text field. */
property Component background: Item {
- implicitWidth: Math.round(TextSingleton.implicitHeight * 8)
- implicitHeight: Math.max(25, Math.round(TextSingleton.implicitHeight * 1.2))
+ implicitWidth: Math.round(control.__contentHeight * 8)
+ implicitHeight: Math.max(25, Math.round(control.__contentHeight * 1.2))
Rectangle {
anchors.fill: parent
anchors.bottomMargin: -1
@@ -128,7 +129,7 @@
GradientStop {color: "#fff" ; position: 0.1}
GradientStop {color: "#fff" ; position: 1}
}
- radius: TextSingleton.implicitHeight * 0.16
+ radius: control.__contentHeight * 0.16
anchors.fill: parent
border.color: control.activeFocus ? "#47b" : "#999"
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtquickcontrols-opensource-src-5.2.0/src/controls/Styles/Desktop/SliderStyle.qml new/qtquickcontrols-opensource-src-5.2.1/src/controls/Styles/Desktop/SliderStyle.qml
--- old/qtquickcontrols-opensource-src-5.2.0/src/controls/Styles/Desktop/SliderStyle.qml 2013-12-08 18:09:39.000000000 +0100
+++ new/qtquickcontrols-opensource-src-5.2.1/src/controls/Styles/Desktop/SliderStyle.qml 2014-02-01 21:37:21.000000000 +0100
@@ -57,6 +57,7 @@
horizontal: control.orientation === Qt.Horizontal
enabled: control.enabled
hasFocus: control.activeFocus
+ hover: control.hovered
hints: control.styleHints
activeControl: control.tickmarksEnabled ? "ticks" : ""
property int handleWidth: 15
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtquickcontrols-opensource-src-5.2.0/src/controls/Styles/Desktop/TextAreaStyle.qml new/qtquickcontrols-opensource-src-5.2.1/src/controls/Styles/Desktop/TextAreaStyle.qml
--- old/qtquickcontrols-opensource-src-5.2.0/src/controls/Styles/Desktop/TextAreaStyle.qml 2013-12-08 18:09:39.000000000 +0100
+++ new/qtquickcontrols-opensource-src-5.2.1/src/controls/Styles/Desktop/TextAreaStyle.qml 2014-02-01 21:37:21.000000000 +0100
@@ -43,17 +43,15 @@
ScrollViewStyle {
property font font: __styleitem.font
- property color textColor: __styleitem.textColor
+ property color textColor: __syspal.text
property color selectionColor: __syspal.highlight
property color selectedTextColor: __syspal.highlightedText
property color backgroundColor: control.backgroundVisible ? __syspal.base : "transparent"
property StyleItem __styleitem: StyleItem{
- property color textColor: styleHint("textColor")
elementType: "edit"
visible: false
active: control.activeFocus
- onActiveChanged: textColor = styleHint("textColor")
}
property int renderType: Text.NativeRendering
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtquickcontrols-opensource-src-5.2.0/src/controls/TableView.qml new/qtquickcontrols-opensource-src-5.2.1/src/controls/TableView.qml
--- old/qtquickcontrols-opensource-src-5.2.0/src/controls/TableView.qml 2013-12-08 18:09:39.000000000 +0100
+++ new/qtquickcontrols-opensource-src-5.2.1/src/controls/TableView.qml 2014-02-01 21:37:21.000000000 +0100
@@ -696,7 +696,7 @@
model: root.model
function keySelect(shiftPressed, row) {
- if (row < 0 || row === rowCount - 1)
+ if (row < 0 || row > rowCount - 1)
return
if (shiftPressed && (selectionMode >= SelectionMode.ExtendedSelection)) {
selection.__ranges = new Array()
@@ -830,7 +830,6 @@
}
}
}
- onWidthChanged: listView.contentWidth = width
}
}
@@ -991,6 +990,7 @@
}
}
}
+ onWidthChanged: listView.contentWidth = width
}
Loader {
id: loader
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtquickcontrols-opensource-src-5.2.0/src/controls/TextField.qml new/qtquickcontrols-opensource-src-5.2.1/src/controls/TextField.qml
--- old/qtquickcontrols-opensource-src-5.2.0/src/controls/TextField.qml 2013-12-08 18:09:39.000000000 +0100
+++ new/qtquickcontrols-opensource-src-5.2.1/src/controls/TextField.qml 2014-02-01 21:37:21.000000000 +0100
@@ -584,7 +584,7 @@
selectionColor: __panel ? __panel.selectionColor : "darkred"
selectedTextColor: __panel ? __panel.selectedTextColor : "white"
- font: __panel ? __panel.font : font
+ font: __panel ? __panel.font : undefined
anchors.leftMargin: __panel ? __panel.leftMargin : 0
anchors.topMargin: __panel ? __panel.topMargin : 0
anchors.rightMargin: __panel ? __panel.rightMargin : 0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtquickcontrols-opensource-src-5.2.0/src/controls/ToolBar.qml new/qtquickcontrols-opensource-src-5.2.1/src/controls/ToolBar.qml
--- old/qtquickcontrols-opensource-src-5.2.0/src/controls/ToolBar.qml 2013-12-08 18:09:39.000000000 +0100
+++ new/qtquickcontrols-opensource-src-5.2.1/src/controls/ToolBar.qml 2014-02-01 21:37:21.000000000 +0100
@@ -76,7 +76,7 @@
\endcode
*/
-Item {
+FocusScope {
id: toolbar
activeFocusOnTab: false
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtquickcontrols-opensource-src-5.2.0/src/controls/plugin.cpp new/qtquickcontrols-opensource-src-5.2.1/src/controls/plugin.cpp
--- old/qtquickcontrols-opensource-src-5.2.0/src/controls/plugin.cpp 2013-12-08 18:09:38.000000000 +0100
+++ new/qtquickcontrols-opensource-src-5.2.1/src/controls/plugin.cpp 2014-02-01 21:37:21.000000000 +0100
@@ -61,6 +61,11 @@
#include "Private/qquickstyleitem_p.h"
#endif
+static void initResources()
+{
+ Q_INIT_RESOURCE(controls);
+}
+
QT_BEGIN_NAMESPACE
static const struct {
@@ -100,6 +105,7 @@
void QtQuickControlsPlugin::registerTypes(const char *uri)
{
+ initResources();
qmlRegisterType<QQuickAction>(uri, 1, 0, "Action");
qmlRegisterType<QQuickExclusiveGroup>(uri, 1, 0, "ExclusiveGroup");
qmlRegisterType<QQuickMenu>(uri, 1, 0, "MenuPrivate");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtquickcontrols-opensource-src-5.2.0/src/controls/qquickmenu.cpp new/qtquickcontrols-opensource-src-5.2.1/src/controls/qquickmenu.cpp
--- old/qtquickcontrols-opensource-src-5.2.0/src/controls/qquickmenu.cpp 2013-12-08 18:09:39.000000000 +0100
+++ new/qtquickcontrols-opensource-src-5.2.1/src/controls/qquickmenu.cpp 2014-02-01 21:37:21.000000000 +0100
@@ -236,7 +236,7 @@
*/
QQuickMenu::QQuickMenu(QObject *parent)
- : QQuickMenuText(parent),
+ : QQuickMenuText(parent, QQuickMenuItemType::Menu),
m_itemsCount(0),
m_selectedIndex(-1),
m_parentWindow(0),
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtquickcontrols-opensource-src-5.2.0/src/controls/qquickmenu_p.h new/qtquickcontrols-opensource-src-5.2.1/src/controls/qquickmenu_p.h
--- old/qtquickcontrols-opensource-src-5.2.0/src/controls/qquickmenu_p.h 2013-12-08 18:09:39.000000000 +0100
+++ new/qtquickcontrols-opensource-src-5.2.1/src/controls/qquickmenu_p.h 2014-02-01 21:37:21.000000000 +0100
@@ -132,7 +132,6 @@
QQuickItem *menuContentItem() const { return m_menuContentItem; }
bool popupVisible() const { return m_popupVisible; }
- QQuickMenuItemType::MenuItemType type() { return QQuickMenuItemType::Menu; }
bool isNative() { return m_platformMenu != 0; }
protected Q_SLOTS:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtquickcontrols-opensource-src-5.2.0/src/controls/qquickmenuitem.cpp new/qtquickcontrols-opensource-src-5.2.1/src/controls/qquickmenuitem.cpp
--- old/qtquickcontrols-opensource-src-5.2.0/src/controls/qquickmenuitem.cpp 2013-12-08 18:09:38.000000000 +0100
+++ new/qtquickcontrols-opensource-src-5.2.1/src/controls/qquickmenuitem.cpp 2014-02-01 21:37:21.000000000 +0100
@@ -51,12 +51,15 @@
QT_BEGIN_NAMESPACE
-QQuickMenuBase::QQuickMenuBase(QObject *parent)
- : QObject(parent), m_visible(true), m_parentMenu(0), m_container(0), m_visualItem(0)
-{
- m_platformItem = QGuiApplicationPrivate::platformTheme()->createPlatformMenuItem();
- if (m_platformItem)
- m_platformItem->setRole(QPlatformMenuItem::TextHeuristicRole);
+QQuickMenuBase::QQuickMenuBase(QObject *parent, int type)
+ : QObject(parent), m_visible(true), m_type(static_castQQuickMenuItemType::MenuItemType(type))
+ , m_parentMenu(0), m_container(0), m_platformItem(0), m_visualItem(0)
+{
+ if (type >= 0) {
+ m_platformItem = QGuiApplicationPrivate::platformTheme()->createPlatformMenuItem();
+ if (m_platformItem)
+ m_platformItem->setRole(QPlatformMenuItem::TextHeuristicRole);
+ }
}
QQuickMenuBase::~QQuickMenuBase()
@@ -98,7 +101,7 @@
void QQuickMenuBase::setParentMenu(QQuickMenu *parentMenu)
{
- if (m_parentMenu && m_parentMenu->platformMenu())
+ if (m_platformItem && m_parentMenu && m_parentMenu->platformMenu())
m_parentMenu->platformMenu()->removeMenuItem(m_platformItem);
m_parentMenu = parentMenu;
@@ -155,14 +158,14 @@
*/
QQuickMenuSeparator::QQuickMenuSeparator(QObject *parent)
- : QQuickMenuBase(parent)
+ : QQuickMenuBase(parent, QQuickMenuItemType::Separator)
{
if (platformItem())
platformItem()->setIsSeparator(true);
}
-QQuickMenuText::QQuickMenuText(QObject *parent)
- : QQuickMenuBase(parent), m_action(new QQuickAction(this))
+QQuickMenuText::QQuickMenuText(QObject *parent, QQuickMenuItemType::MenuItemType type)
+ : QQuickMenuBase(parent, type), m_action(new QQuickAction(this))
{
connect(m_action, SIGNAL(enabledChanged()), this, SLOT(updateEnabled()));
connect(m_action, SIGNAL(textChanged()), this, SLOT(updateText()));
@@ -417,7 +420,7 @@
*/
QQuickMenuItem::QQuickMenuItem(QObject *parent)
- : QQuickMenuText(parent), m_boundAction(0)
+ : QQuickMenuText(parent, QQuickMenuItemType::Item), m_boundAction(0)
{
connect(this, SIGNAL(__textChanged()), this, SIGNAL(textChanged()));
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtquickcontrols-opensource-src-5.2.0/src/controls/qquickmenuitem_p.h new/qtquickcontrols-opensource-src-5.2.1/src/controls/qquickmenuitem_p.h
--- old/qtquickcontrols-opensource-src-5.2.0/src/controls/qquickmenuitem_p.h 2013-12-08 18:09:38.000000000 +0100
+++ new/qtquickcontrols-opensource-src-5.2.1/src/controls/qquickmenuitem_p.h 2014-02-01 21:37:21.000000000 +0100
@@ -66,7 +66,7 @@
public:
enum MenuItemType {
- Separator,
+ Separator = 0,
Item,
Menu
};
@@ -86,7 +86,7 @@
void visibleChanged();
public:
- QQuickMenuBase(QObject *parent = 0);
+ QQuickMenuBase(QObject *parent, int type);
~QQuickMenuBase();
bool visible() const { return m_visible; }
@@ -105,11 +105,12 @@
QQuickItem *visualItem() const;
void setVisualItem(QQuickItem *item);
- virtual QQuickMenuItemType::MenuItemType type() { return QQuickMenuItemType::Item; }
+ QQuickMenuItemType::MenuItemType type() { return m_type; }
virtual bool isNative() { return m_platformItem != 0; }
private:
bool m_visible;
+ QQuickMenuItemType::MenuItemType m_type;
QQuickMenu *m_parentMenu;
QQuickMenuItemContainer *m_container;
QPlatformMenuItem *m_platformItem;
@@ -121,8 +122,6 @@
Q_OBJECT
public:
QQuickMenuSeparator(QObject *parent = 0);
-
- QQuickMenuItemType::MenuItemType type() { return QQuickMenuItemType::Separator; }
};
class QQuickMenuText : public QQuickMenuBase
@@ -143,7 +142,7 @@
void __iconChanged();
public:
- QQuickMenuText(QObject *parent = 0);
+ QQuickMenuText(QObject *parent, QQuickMenuItemType::MenuItemType type);
~QQuickMenuText();
bool enabled() const;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtquickcontrols-opensource-src-5.2.0/src/controls/qquickmenuitemcontainer_p.h new/qtquickcontrols-opensource-src-5.2.1/src/controls/qquickmenuitemcontainer_p.h
--- old/qtquickcontrols-opensource-src-5.2.0/src/controls/qquickmenuitemcontainer_p.h 2013-12-08 18:09:38.000000000 +0100
+++ new/qtquickcontrols-opensource-src-5.2.1/src/controls/qquickmenuitemcontainer_p.h 2014-02-01 21:37:21.000000000 +0100
@@ -52,7 +52,7 @@
Q_OBJECT
public:
explicit QQuickMenuItemContainer(QObject *parent = 0)
- : QQuickMenuBase(parent)
+ : QQuickMenuBase(parent, -1)
{ }
~QQuickMenuItemContainer()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtquickcontrols-opensource-src-5.2.0/src/layouts/qquicklinearlayout.cpp new/qtquickcontrols-opensource-src-5.2.1/src/layouts/qquicklinearlayout.cpp
--- old/qtquickcontrols-opensource-src-5.2.0/src/layouts/qquicklinearlayout.cpp 2013-12-08 18:09:39.000000000 +0100
+++ new/qtquickcontrols-opensource-src-5.2.1/src/layouts/qquicklinearlayout.cpp 2014-02-01 21:37:21.000000000 +0100
@@ -736,6 +736,9 @@
Q_ASSERT(columnSpan >= 1);
Q_ASSERT(rowSpan >= 1);
+ const int sp = span[flowOrientation];
+ if (sp > flowBound)
+ return;
if (row >= 0)
nextRow = row;
@@ -758,7 +761,7 @@
bool cellAcceptsItem;
while (true) {
// Check if the item does not span beyond the layout bound
- cellAcceptsItem = (flowColumn + span[flowOrientation]) <= flowBound;
+ cellAcceptsItem = (flowColumn + sp) <= flowBound;
// Check if all the required cells are not taken
for (int rs = 0; cellAcceptsItem && rs < rowSpan; ++rs) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtquickcontrols-opensource-src-5.2.0/tests/auto/controls/data/tst_combobox.qml new/qtquickcontrols-opensource-src-5.2.1/tests/auto/controls/data/tst_combobox.qml
--- old/qtquickcontrols-opensource-src-5.2.0/tests/auto/controls/data/tst_combobox.qml 2013-12-08 18:09:38.000000000 +0100
+++ new/qtquickcontrols-opensource-src-5.2.1/tests/auto/controls/data/tst_combobox.qml 2014-02-01 21:37:21.000000000 +0100
@@ -118,13 +118,15 @@
}
function test_arraymodelwithtextrole() {
- // FIXME The use-case before this change should work.
- var comboBox = Qt.createQmlObject('import QtQuick.Controls 1.1 ; \
- ComboBox { \
- model: [ { "text": "Banana", "color": "Yellow"}, \
- { "text": "Apple", "color": "Green"}, \
- { "text": "Coconut", "color": "Brown"} ]; \
- textRole: "text" }', testCase, '');
+ var arrayModel = [
+ {text: 'Banana', color: 'Yellow'},
+ {text: 'Apple', color: 'Green'},
+ {text: 'Coconut', color: 'Brown'}
+ ];
+
+ var comboBox = Qt.createQmlObject('import QtQuick.Controls 1.1 ; ComboBox { }', testCase, '');
+ comboBox.textRole = "text"
+ comboBox.model = arrayModel
compare(comboBox.currentIndex, 0)
compare(comboBox.currentText, "Banana")
comboBox.textRole = "color"
@@ -265,6 +267,7 @@
compare(comboBox.acceptedCount, 3)
comboBox.editText = ""
+ compare(comboBox.editText, "")
keyPress(Qt.Key_A)
compare(comboBox.currentText, "Cocomuffin")
@@ -305,6 +308,24 @@
compare(comboBox.editText, "Coco")
compare(comboBox.currentIndex, 1)
+ comboBox.editText = ""
+ keyPress(Qt.Key_C)
+ keyPress(Qt.Key_O)
+ keyPress(Qt.Key_C) // autocompletes "coco"
+ keyPress(Qt.Key_Backspace)
+ keyPress(Qt.Key_Return) // Accept "coc"
+ compare(comboBox.editText, "coc")
+ compare(comboBox.currentText, "coc")
+
+ comboBox.editText = ""
+ keyPress(Qt.Key_C)
+ keyPress(Qt.Key_O)
+ keyPress(Qt.Key_C) // autocompletes "coc"
+ keyPress(Qt.Key_Space)
+ keyPress(Qt.Key_Return) // Accept "coc "
+ compare(comboBox.editText, "coc ")
+ compare(comboBox.currentText, "coc ")
+
comboBox.destroy()
}
@@ -659,5 +680,22 @@
}
return index
}
+
+ function test_minusOneIndexResetsSelection_QTBUG_35794() {
+ var qmlObjects = ['import QtQuick.Controls 1.1 ; ComboBox { model: ["A", "B", "C"] }',
+ 'import QtQuick.Controls 1.1 ; ComboBox { editable: true; model: ["A", "B", "C"] }']
+ for (var i = 0; i < qmlObjects.length; i++) {
+ var comboBox = Qt.createQmlObject(qmlObjects[i], testCase, '');
+ compare(comboBox.currentIndex, 0)
+ compare(comboBox.currentText, "A")
+ comboBox.currentIndex = -1
+ compare(comboBox.currentIndex, -1)
+ compare(comboBox.currentText, "")
+ comboBox.currentIndex = 1
+ compare(comboBox.currentIndex, 1)
+ compare(comboBox.currentText, "B")
+ comboBox.destroy()
+ }
+ }
}
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtquickcontrols-opensource-src-5.2.0/tests/auto/controls/data/tst_gridlayout.qml new/qtquickcontrols-opensource-src-5.2.1/tests/auto/controls/data/tst_gridlayout.qml
--- old/qtquickcontrols-opensource-src-5.2.0/tests/auto/controls/data/tst_gridlayout.qml 2013-12-08 18:09:38.000000000 +0100
+++ new/qtquickcontrols-opensource-src-5.2.1/tests/auto/controls/data/tst_gridlayout.qml 2014-02-01 21:37:21.000000000 +0100
@@ -438,6 +438,28 @@
layout.destroy();
}
+ Component {
+ id: layout_spanIsMoreThanColumns_Component
+
+ GridLayout {
+ columnSpacing: 1
+ rowSpacing: 1
+ columns: 2
+
+ Rectangle {
+ implicitWidth: 10
+ implicitHeight: 10
+ Layout.columnSpan: 3
+ }
+ }
+ }
+
+ function test_spanIsMoreThanColumns() {
+ var layout = layout_spanIsMoreThanColumns_Component.createObject(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);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtquickcontrols-opensource-src-5.2.0/tests/auto/controls/data/tst_spinbox.qml new/qtquickcontrols-opensource-src-5.2.1/tests/auto/controls/data/tst_spinbox.qml
--- old/qtquickcontrols-opensource-src-5.2.0/tests/auto/controls/data/tst_spinbox.qml 2013-12-08 18:09:38.000000000 +0100
+++ new/qtquickcontrols-opensource-src-5.2.1/tests/auto/controls/data/tst_spinbox.qml 2014-02-01 21:37:21.000000000 +0100
@@ -343,6 +343,16 @@
spinbox2.destroy()
}
+ function test_setFontsize(){
+ var control = Qt.createQmlObject('import QtQuick.Controls 1.1; import QtQuick.Controls.Styles 1.1; SpinBox {style: SpinBoxStyle{}}', container, '')
+ var width = control.width;
+ var height = control.height;
+ control.font.pixelSize = 40
+ verify(control.width > width) // ensure that the text field resizes
+ verify(control.height > height)
+ control.destroy()
+ }
+
function test_get_active_focus_when_up_or_down_was_pressed(){
var test_control = 'import QtQuick 2.1; \
import QtQuick.Controls 1.1; \
@@ -608,7 +618,33 @@
downCoord.y = item.y + item.height - arrowMargin
}
+ function test_fixup() {
+ var spinbox = Qt.createQmlObject('import QtQuick.Controls 1.1; SpinBox { minimumValue: -1 }', container, '')
+ verify(spinbox)
+ spinbox.forceActiveFocus()
+ verify(spinbox.activeFocus)
+
+ keyClick(Qt.Key_Minus)
+ keyClick(Qt.Key_0)
+ compare(spinbox.__text, "-0")
+
+ // fixup "-0" to "0" on accept
+ keyClick(Qt.Key_Enter)
+ compare(spinbox.__text, "0")
+
+ spinbox.prefix = "pfx"
+ spinbox.suffix = "sfx"
+ keyClick(Qt.Key_A, Qt.ControlModifier)
+ keyClick(Qt.Key_Minus)
+ keyClick(Qt.Key_0)
+ compare(spinbox.__text, "pfx-0sfx")
+
+ // fixup "-0" to "0" on defocus
+ spinbox.focus = false
+ compare(spinbox.__text, "pfx0sfx")
+ spinbox.destroy()
+ }
}
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtquickcontrols-opensource-src-5.2.0/tests/auto/controls/data/tst_tableview.qml new/qtquickcontrols-opensource-src-5.2.1/tests/auto/controls/data/tst_tableview.qml
--- old/qtquickcontrols-opensource-src-5.2.0/tests/auto/controls/data/tst_tableview.qml 2013-12-08 18:09:38.000000000 +0100
+++ new/qtquickcontrols-opensource-src-5.2.1/tests/auto/controls/data/tst_tableview.qml 2014-02-01 21:37:21.000000000 +0100
@@ -148,6 +148,34 @@
verify(table.selection.contains(4))
verify(table.selection.contains(5))
verify(table.selection.count === 2)
+
+ // Navigate to end using arrow keys
+ table.selectionMode = SelectionMode.SingleSelection
+ table.model = 3
+ table.currentRow = -1
+ keyClick(Qt.Key_Down);
+ verify(table.currentRow === 0)
+ verify(rangeTest([[0,0]], table))
+ verify(table.selection.contains(0))
+ keyClick(Qt.Key_Down);
+ verify(table.currentRow === 1)
+ verify(table.selection.contains(1))
+ keyClick(Qt.Key_Down);
+ verify(table.currentRow === 2)
+ verify(table.selection.contains(2))
+ keyClick(Qt.Key_Down);
+ verify(table.currentRow === 2)
+ verify(table.selection.contains(2))
+ keyClick(Qt.Key_Up);
+ verify(table.currentRow === 1)
+ verify(table.selection.contains(1))
+ keyClick(Qt.Key_Up);
+ verify(table.currentRow === 0)
+ verify(table.selection.contains(0))
+ keyClick(Qt.Key_Up);
+ verify(table.currentRow === 0)
+ verify(table.selection.contains(0))
+
table.destroy()
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtquickcontrols-opensource-src-5.2.0/tests/auto/controls/data/tst_textfield.qml new/qtquickcontrols-opensource-src-5.2.1/tests/auto/controls/data/tst_textfield.qml
--- old/qtquickcontrols-opensource-src-5.2.0/tests/auto/controls/data/tst_textfield.qml 2013-12-08 18:09:38.000000000 +0100
+++ new/qtquickcontrols-opensource-src-5.2.1/tests/auto/controls/data/tst_textfield.qml 2014-02-01 21:37:21.000000000 +0100
@@ -280,6 +280,16 @@
control.destroy()
}
+ function test_setFontsize(){
+ var control = Qt.createQmlObject('import QtQuick.Controls 1.1; import QtQuick.Controls.Styles 1.1; TextField {style:TextFieldStyle{}}', container, '')
+ var width = control.width;
+ var height = control.height;
+ control.font.pixelSize = 40
+ verify(control.width > width) // ensure that the text field resizes
+ verify(control.height > height)
+ control.destroy()
+ }
+
function test_activeFocusOnTab() {
// Set TextField readonly so the tab/backtab can be tested toward the navigation
var test_control = 'import QtQuick 2.1; \
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org