From cce0aadcd7a15f026c265b23b6e9dbe3310b70b1 Mon Sep 17 00:00:00 2001 From: Jani Heikkinen Date: Wed, 30 Nov 2016 11:56:33 +0200 Subject: Add changes file for 5.8.0 Change-Id: I268e83918de17d7ae2d0e98ff63f214fe669ed45 Reviewed-by: Mitch Curtis --- dist/changes-5.8.0 | 208 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 208 insertions(+) create mode 100644 dist/changes-5.8.0 diff --git a/dist/changes-5.8.0 b/dist/changes-5.8.0 new file mode 100644 index 00000000..5b431fca --- /dev/null +++ b/dist/changes-5.8.0 @@ -0,0 +1,208 @@ +Qt 5.8 introduces many new features and improvements as well as bugfixes +over the 5.7.x series. For more details, refer to the online documentation +included in this distribution. The documentation is also available online: + + http://doc.qt.io/qt-5/index.html + +The Qt version 5.8 series is binary compatible with the 5.7.x series. +Applications compiled for 5.7 will continue to run with 5.8. + +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 * +**************************************************************************** + + - Control: + * Control::hoverEnabled has been made to inherit to children, to make it + possible to disable hover effects for a tree of controls in one place. + + - Tumbler: + * Changed the default value of visibleItemCount to 5 to make it visually + clearer that it's a Tumbler. + * [QTBUG-53587] Changed the default value of wrap to be false when count + is less than visibleItemCount. Explicitly setting wrap overrides this + behavior. + +**************************************************************************** +* Controls * +**************************************************************************** + + - AbstractButton: + * A plain AbstractButton now calculates its implicit size based on the + implicit size of the content item plus paddings, and the implicit size + of the background item. + * [QTBUG-51554] The checkable property has been made accessible from + QML. Previously it was only exposed for Button and MenuItem, but it is + now available for any AbstractButton to make it possible to create + custom QML-based checkable buttons. + * [QTBUG-57085] Fixed auto-repeat to not cancel on the tiniest mouse/touch + move, but keep repeating until moved outside the button. + * Fixed press-and-hold for checkable buttons to not toggle the checked + state on release after press-and-hold. + + - ButtonGroup: + * Added clicked(AbstractButton) signal for centralized click handling for + grouped buttons. + + - ComboBox: + * [QTBUG-56884] Added handling for Home and End keys. + * [QTBUG-56884] Added missing keyboard search functionality. + * [QTBUG-54935] Added a flat property that provides more suitable looks + for using ComboBox in a ToolBar. + + - Container: + * Added incrementCurrentIndex() and decrementCurrentIndex() methods for + changing the current index without losing its property binding. + * A plain Container now calculates its implicit size based on the + implicit size of the content item plus paddings, and the implicit size + of the background item. + + - Control: + * A plain Control now calculates its implicit size based on the implicit + size of the content item plus paddings, and the implicit size of the + background item. + + - Dialog: + * Added a new Dialog type to provide convenience for handling dialog + popups. Dialog integrates with DialogButtonBox, and provides convenient + accepted() and rejected() signals. + + - DialogButtonBox: + * Added DialogButtonBox to provide convenience for handling dialog buttons. + DialogButtonBox is able to create a set of standard buttons with a single + line of QML code, and provides convenient accepted() and rejected() signals. + + - Drawer: + * [QTBUG-55360] Made it possible to control the vertical position of a + horizontal drawer, and vice versa. This allows placing a drawer below + a header/toolbar, for instance. + + - MenuSeparator: + * [QTBUG-54862] Added MenuSeparator to visually distinguish between groups + of items in a menu. + + - Page: + * [QTBUG-56709] Page has been made to calculate its implicit size based + on the implicit size of the header, content, and footer plus paddings, + and the implicit size of the background item. + + - Popup: + * [QTBUG-56025] Fixed to respect explicitly set width and height. + * [QTBUG-56562] The QML Shortcut type from QtQuick has been fixed to + respect modal popups from QtQuick Controls 2. + * [QTBUG-56755] Fixed binding loops with size-dependent positioning. + + - RangeSlider: + * [QTBUG-50003] Added first.hovered and second.hovered properties that + hold whether the respective handles are hovered. + + - RoundButton: + * [QTBUG-54967] Added RoundButton. + + - Slider: + * [QTBUG-53847] Added valueAt() method for converting any position to a + value in the slider's range. It is also possible to use valueAt() to get + continuous value updates. + + - SpinBox: + * [QTBUG-50003] Added up.hovered and down.hovered properties that hold + whether the respective buttons are hovered. + * [QTBUG-57085] Fixed auto-repeat to not cancel on the tiniest mouse/touch + move, but keep repeating until moved outside the button. + + - StackView: + * Added attached StackView.activated(), StackView.deactivated(), + StackView.activating(), and StackView.deactivating() signals that are + convenient for initializing and cleaning up item-specific resources. + * [QTBUG-55405] Added StackView.removed() attached signal to provide a + way to delete items that StackView won't. + * Made it possible to choose the visual transition type for any operation. + This allows using for example push and pop transitions with replace(), + which allows implementing an "infinite" back and forward navigation + pattern while keeping the amount of instantiated items constant. + + - SwipeDelegate: + * [QTBUG-54651] Added swipe.close() for setting swipe.position to 0. + * [QTBUG-54651] Added swipe.completed() for responding to completion of + swipes. + * [QTBUG-54651] Added attached SwipeDelegate.pressed property and + SwipeDelegate.clicked() signal for detecting when non-interactive + left/right/behind items are pressed and clicked. + * [QTBUG-56312][QTBUG-57285] Fixed spurious clicked() signal emission when + released outside the delegate. + * [QTBUG-57271] Fixed swipes that begin over a child item of a delegate. + + - SwipeView: + * Added SwipeView.isNextItem and SwipeView.isPreviousItem attached + properties to make it straight-forward to use Loader for unloading + pages that are outside the reach. + * [QTBUG-54268] Added interactive property for controlling whether swipe + interaction is enabled. + + - TextArea: + * [QTBUG-51009] Added pressed() and released() signals. + + - TextField: + * [QTBUG-51009] Added pressed() and released() signals. + * Aligned the name of the pressAndHold() argument with TextArea + + - ToolSeparator: + * [QTBUG-54862] Added ToolSeparator to visually distinguish between groups + of items in a toolbar by separating them with a line. It can be used in + horizontal or vertical toolbars. + + - Tumbler: + * [QTBUG-53587] Added wrap property to control whether or not tumbler + wraps when it reaches the top and bottom. + +**************************************************************************** +* Styles * +**************************************************************************** + + - Added support for specifying the fallback style for custom styles via + :/qtquickcontrols2.conf, QT_QUICK_CONTROLS_FALLBACK_STYLE or + QQuickStyle::setFallbackStyle(). + +Material +-------- + + - [QTBUG-50003] Implemented ripple and hover effects. + - Fixed (optional) elevation effects for Frame, GroupBox, Pane, and + TabBar. + - Added Material.System theme enum value, that can be used to let the + Material style choose either the light or dark theme based on the + system theme colors. + +Universal +--------- + + - [QTBUG-50003] Implemented hover effects + - Added Universal.System theme enum value, that can be used to let the + Universal style choose either the light or dark theme based on the + system theme colors. + +**************************************************************************** +* Platform * +**************************************************************************** + + - Introduced a new experimental Qt Labs Platform module that provides the + following native (Qt Widgets fallback when not available) QML types: + * ColorDialog + * FileDialog + * FolderDialog + * FontDialog + * Menu + * MenuBar + * MenuItem + * MenuItemGroup + * MenuSeparator + * MessageDialog + * StandardPaths + * SystemTrayIcon -- cgit v1.2.3 From b1e9db69064fb7b30cdc3d9321c81684b2f56090 Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Mon, 28 Nov 2016 16:00:04 +0100 Subject: Allow specifying a relative style path in qtquickcontrols2.conf The style path is resolved relative to the location of config file. Even though qtquickcontrols2.conf is normally located in the root of resources, Quick Designer uses QT_QUICK_CONTROLS_CONF to set a custom location for the preview, where the standard config location is not feasible. This patch extends the config and style lookup further by allowing to specify a relative path to a custom style for the Quick Designer preview. This is a cherry-pick of 5efd4b6a61498f0668d7367d620275367894140e, which fixes the style lookup so that QTBUG-57618 gets resolved. Change-Id: I7b656c42cb6aca0914ad20c94c7b527bea74cb16 Task-number: QTBUG-57618 Reviewed-by: Thomas Hartmann Reviewed-by: Paul Olav Tvete Reviewed-by: Mitch Curtis --- src/quickcontrols2/qquickstyle.cpp | 29 +++++++++++++++++++++++++++++ src/quickcontrols2/qquickstyle_p.h | 1 + src/quickcontrols2/qquickstyleattached.cpp | 15 ++------------- 3 files changed, 32 insertions(+), 13 deletions(-) diff --git a/src/quickcontrols2/qquickstyle.cpp b/src/quickcontrols2/qquickstyle.cpp index d7143be7..3ad7c074 100644 --- a/src/quickcontrols2/qquickstyle.cpp +++ b/src/quickcontrols2/qquickstyle.cpp @@ -183,6 +183,15 @@ struct QQuickStyleSpec setFallbackStyle(settings->value(QStringLiteral("FallbackStyle")).toString(), ":/qtquickcontrols2.conf"); } } + + // resolve a path relative to the config + QString configPath = QFileInfo(resolveConfigFilePath()).path(); + QString stylePath = findStyle(configPath, style); + if (!stylePath.isEmpty()) { + style = stylePath; + resolved = true; + } + custom = style.contains(QLatin1Char('/')); if (baseUrl.isValid()) { @@ -221,11 +230,26 @@ struct QQuickStyleSpec fallbackMethod.clear(); } + QString resolveConfigFilePath() + { + if (configFilePath.isEmpty()) { + configFilePath = QFile::decodeName(qgetenv("QT_QUICK_CONTROLS_CONF")); + if (!QFile::exists(configFilePath)) { + if (!configFilePath.isEmpty()) + qWarning("QT_QUICK_CONTROLS_CONF=%s: No such file", qPrintable(configFilePath)); + + configFilePath = QStringLiteral(":/qtquickcontrols2.conf"); + } + } + return configFilePath; + } + bool custom; bool resolved; QString style; QString fallbackStyle; QByteArray fallbackMethod; + QString configFilePath; }; Q_GLOBAL_STATIC(QQuickStyleSpec, styleSpec) @@ -262,6 +286,11 @@ void QQuickStylePrivate::reset() styleSpec()->reset(); } +QString QQuickStylePrivate::configFilePath() +{ + return styleSpec()->resolveConfigFilePath(); +} + /*! Returns the name of the application style. diff --git a/src/quickcontrols2/qquickstyle_p.h b/src/quickcontrols2/qquickstyle_p.h index cfe87fbb..65f48d95 100644 --- a/src/quickcontrols2/qquickstyle_p.h +++ b/src/quickcontrols2/qquickstyle_p.h @@ -60,6 +60,7 @@ public: static bool isCustomStyle(); static void init(const QUrl &baseUrl); static void reset(); + static QString configFilePath(); }; QT_END_NAMESPACE diff --git a/src/quickcontrols2/qquickstyleattached.cpp b/src/quickcontrols2/qquickstyleattached.cpp index 2ef07fd6..d1f27ff3 100644 --- a/src/quickcontrols2/qquickstyleattached.cpp +++ b/src/quickcontrols2/qquickstyleattached.cpp @@ -35,6 +35,7 @@ ****************************************************************************/ #include "qquickstyleattached_p.h" +#include "qquickstyle_p.h" #include #include @@ -167,18 +168,6 @@ static QList findChildStyles(const QMetaObject *type, QOb return children; } -static QString resolveConfigFile() -{ - QString filePath = QFile::decodeName(qgetenv("QT_QUICK_CONTROLS_CONF")); - if (!QFile::exists(filePath)) { - if (!filePath.isEmpty()) - qWarning("QT_QUICK_CONTROLS_CONF=%s: No such file", qPrintable(filePath)); - - filePath = QStringLiteral(":/qtquickcontrols2.conf"); - } - return filePath; -} - QQuickStyleAttached::QQuickStyleAttached(QObject *parent) : QObject(parent) { QQuickItem *item = qobject_cast(parent); @@ -208,7 +197,7 @@ QQuickStyleAttached::~QQuickStyleAttached() QSharedPointer QQuickStyleAttached::settings(const QString &group) { #ifndef QT_NO_SETTINGS - static const QString filePath = resolveConfigFile(); + const QString filePath = QQuickStylePrivate::configFilePath(); if (QFile::exists(filePath)) { QFileSelector selector; QSettings *settings = new QSettings(selector.select(filePath), QSettings::IniFormat); -- cgit v1.2.3 From d0ba7b41f27fbfac366930a5e92b80e530b39630 Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Mon, 19 Dec 2016 15:06:28 +0100 Subject: DialogButtonBox: add missing import DialogButtonBox uses the Button-type from the QtQuick.Controls namespace, but did not import it. Change-Id: Ibe635461e280a8f8a78a52a2454fd8524a90a7e1 Task-number: QTBUG-57618 Reviewed-by: Mitch Curtis --- src/imports/controls/material/DialogButtonBox.qml | 1 + src/imports/controls/universal/DialogButtonBox.qml | 1 + 2 files changed, 2 insertions(+) diff --git a/src/imports/controls/material/DialogButtonBox.qml b/src/imports/controls/material/DialogButtonBox.qml index 312aa4eb..a596da91 100644 --- a/src/imports/controls/material/DialogButtonBox.qml +++ b/src/imports/controls/material/DialogButtonBox.qml @@ -36,6 +36,7 @@ import QtQuick 2.8 import QtQuick.Templates 2.1 as T +import QtQuick.Controls 2.1 import QtQuick.Controls.Material 2.1 import QtQuick.Controls.Material.impl 2.1 diff --git a/src/imports/controls/universal/DialogButtonBox.qml b/src/imports/controls/universal/DialogButtonBox.qml index 043496d9..25e62bf5 100644 --- a/src/imports/controls/universal/DialogButtonBox.qml +++ b/src/imports/controls/universal/DialogButtonBox.qml @@ -36,6 +36,7 @@ import QtQuick 2.8 import QtQuick.Templates 2.1 as T +import QtQuick.Controls 2.1 import QtQuick.Controls.Universal 2.1 T.DialogButtonBox { -- cgit v1.2.3