Hello community, here is the log from the commit of package qqc2-desktop-style for openSUSE:Factory checked in at 2019-11-12 11:52:15 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/qqc2-desktop-style (Old) and /work/SRC/openSUSE:Factory/.qqc2-desktop-style.new.2990 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "qqc2-desktop-style" Tue Nov 12 11:52:15 2019 rev:28 rq:747153 version:5.64.0 Changes: -------- --- /work/SRC/openSUSE:Factory/qqc2-desktop-style/qqc2-desktop-style.changes 2019-10-14 13:40:34.649542050 +0200 +++ /work/SRC/openSUSE:Factory/.qqc2-desktop-style.new.2990/qqc2-desktop-style.changes 2019-11-12 11:52:22.343153398 +0100 @@ -1,0 +2,18 @@ +Thu Nov 7 15:02:22 UTC 2019 - Christophe Giboudeaux <[email protected]> + +- Make sure the required libqt5-qtquickcontrols2 package is usable (kde#413829) + +------------------------------------------------------------------- +Sun Nov 3 15:47:22 UTC 2019 - Christophe Giboudeaux <[email protected]> + +- Update to 5.64.0 + * New feature release + * For more details please see: + * https://www.kde.org/announcements/kde-frameworks-5.64.0.php +- Changes since 5.63.0: + * Do not assign combobox currentIndex as it breaks binding. + * docs: fix typo te -> the + * Fix warning when we're not hovering a Control + * Listen to the application style changing + +------------------------------------------------------------------- Old: ---- qqc2-desktop-style-5.63.0.tar.xz qqc2-desktop-style-5.63.0.tar.xz.sig New: ---- qqc2-desktop-style-5.64.0.tar.xz qqc2-desktop-style-5.64.0.tar.xz.sig ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ qqc2-desktop-style.spec ++++++ --- /var/tmp/diff_new_pack.FHBu1y/_old 2019-11-12 11:52:23.059154130 +0100 +++ /var/tmp/diff_new_pack.FHBu1y/_new 2019-11-12 11:52:23.063154134 +0100 @@ -16,11 +16,11 @@ # -%define _tar_path 5.63 +%define _tar_path 5.64 # Only needed for the package signature condition %bcond_without lang Name: qqc2-desktop-style -Version: 5.63.0 +Version: 5.64.0 Release: 0 Summary: A Qt Quick Controls 2 Style for Desktop UIs License: GPL-2.0-or-later @@ -44,7 +44,9 @@ BuildRequires: cmake(Qt5QuickControls2) BuildRequires: cmake(Qt5Svg) BuildRequires: cmake(Qt5Widgets) -Requires: libqt5-qtquickcontrols2 +# Make sure the required libqt5-qtquickcontrols2 package is usable +# See https://bugs.kde.org/413829#c3 +%requires_eq libqt5-qtquickcontrols2 # plasma5-workspace sets up the env variables so that this theme # is picked by default. It still works fine without it (no requires), # but looks better with it. By itself plasma5-workspace does not use ++++++ qqc2-desktop-style-5.63.0.tar.xz -> qqc2-desktop-style-5.64.0.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qqc2-desktop-style-5.63.0/CMakeLists.txt new/qqc2-desktop-style-5.64.0/CMakeLists.txt --- old/qqc2-desktop-style-5.63.0/CMakeLists.txt 2019-10-06 11:38:45.000000000 +0200 +++ new/qqc2-desktop-style-5.64.0/CMakeLists.txt 2019-11-02 12:47:27.000000000 +0100 @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.5) -set(KF5_VERSION "5.63.0") # handled by release scripts -set(KF5_DEP_VERSION "5.63.0") # handled by release scripts +set(KF5_VERSION "5.64.0") # handled by release scripts +set(KF5_DEP_VERSION "5.64.0") # handled by release scripts project(qqc2-desktop-style VERSION ${KF5_VERSION}) @@ -21,7 +21,7 @@ ################# set KDE specific information ################# -find_package(ECM 5.63.0 REQUIRED NO_MODULE) +find_package(ECM 5.64.0 REQUIRED NO_MODULE) # where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is checked set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH}) @@ -88,6 +88,7 @@ ######################################################################### add_definitions(-DQT_NO_FOREACH) add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x050d00) +add_definitions(-DQT_DEPRECATED_WARNINGS_SINCE=0x060000) add_subdirectory(plugin) if (KF5IconThemes_FOUND AND KF5WidgetsAddons_FOUND) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qqc2-desktop-style-5.63.0/Mainpage.dox new/qqc2-desktop-style-5.64.0/Mainpage.dox --- old/qqc2-desktop-style-5.63.0/Mainpage.dox 2019-10-06 11:38:45.000000000 +0200 +++ new/qqc2-desktop-style-5.64.0/Mainpage.dox 2019-11-02 12:47:27.000000000 +0100 @@ -25,7 +25,7 @@ \section overview Introduction This is a style for QtQuicControls2 which is using QStyle to paint the controls in order to give it a native look and feel. It has no api, applications shouldn't (and can't) use it directly, but they can depend from this framework in their desktop version if they want to impose an integrated look when running on the desktop. -It will be used when te environment variable QT_QUICK_CONTROLS_STYLE=org.kde.desktop is exported, or from the following C++ code: +It will be used when the environment variable QT_QUICK_CONTROLS_STYLE=org.kde.desktop is exported, or from the following C++ code: @code #include <QQuickStyle> ... diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qqc2-desktop-style-5.63.0/org.kde.desktop/ComboBox.qml new/qqc2-desktop-style-5.64.0/org.kde.desktop/ComboBox.qml --- old/qqc2-desktop-style-5.63.0/org.kde.desktop/ComboBox.qml 2019-10-06 11:38:45.000000000 +0200 +++ new/qqc2-desktop-style-5.64.0/org.kde.desktop/ComboBox.qml 2019-11-02 12:47:27.000000000 +0100 @@ -53,14 +53,16 @@ property bool separatorVisible: false Kirigami.Theme.colorSet: controlRoot.Kirigami.Theme.inherit ? controlRoot.Kirigami.Theme.colorSet : Kirigami.Theme.View Kirigami.Theme.inherit: controlRoot.Kirigami.Theme.inherit - onClicked: { - controlRoot.currentIndex = index; - controlRoot.popup.visible = false; - } } indicator: Item {} + StylePrivate.PropertyWriter { + id: controlRootWriter + target: controlRoot + propertyName: 'currentIndex' + } + contentItem: MouseArea { id: mouseArea anchors.fill: parent @@ -69,11 +71,10 @@ property int indexUnderMouse: -1 onWheel: { if (wheel.pixelDelta.y < 0 || wheel.angleDelta.y < 0) { - controlRoot.currentIndex = Math.min(controlRoot.currentIndex + 1, delegateModel.count -1); + controlRoot.incrementCurrentIndex(); } else { - controlRoot.currentIndex = Math.max(controlRoot.currentIndex - 1, 0); + controlRoot.decrementCurrentIndex(); } - controlRoot.activated(controlRoot.currentIndex); } onPressed: { indexUnderMouse = -1; @@ -89,7 +90,7 @@ controlRoot.popup.visible = false; } if (indexUnderMouse > -1) { - controlRoot.currentIndex = indexUnderMouse; + controlRootWriter.writeProperty(indexUnderMouse); controlRoot.activated(indexUnderMouse); } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qqc2-desktop-style-5.63.0/org.kde.desktop/ToolTip.qml new/qqc2-desktop-style-5.64.0/org.kde.desktop/ToolTip.qml --- old/qqc2-desktop-style-5.63.0/org.kde.desktop/ToolTip.qml 2019-10-06 11:38:45.000000000 +0200 +++ new/qqc2-desktop-style-5.64.0/org.kde.desktop/ToolTip.qml 2019-11-02 12:47:27.000000000 +0100 @@ -45,9 +45,9 @@ margins: 6 padding: 6 - visible: parent && (Kirigami.Settings.tabletMode ? parent.pressed : (parent.hasOwnProperty("hovered") ? parent.hovered : parent.containsMouse)) + visible: parent && (Kirigami.Settings.tabletMode ? parent.pressed : (parent.hasOwnProperty("hovered") ? parent.hovered : parent.hasOwnProperty("containsMouse") && parent.containsMouse)) delay: Kirigami.Settings.tabletMode ? Qt.styleHints.mousePressAndHoldInterval : 1000 - timeout: 5000 + timeout: Kirigami.Units.toolTipDelay closePolicy: T.Popup.CloseOnEscape | T.Popup.CloseOnPressOutsideParent | T.Popup.CloseOnReleaseOutsideParent diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qqc2-desktop-style-5.63.0/plugin/CMakeLists.txt new/qqc2-desktop-style-5.64.0/plugin/CMakeLists.txt --- old/qqc2-desktop-style-5.63.0/plugin/CMakeLists.txt 2019-10-06 11:38:45.000000000 +0200 +++ new/qqc2-desktop-style-5.64.0/plugin/CMakeLists.txt 2019-11-02 12:47:27.000000000 +0100 @@ -3,6 +3,7 @@ set(qqc2desktopstyle_SRCS qqc2desktopstyleplugin.cpp kquickstyleitem.cpp + kpropertywriter.cpp ) if(Qt5_VERSION VERSION_LESS "5.8.0") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qqc2-desktop-style-5.63.0/plugin/kpropertywriter.cpp new/qqc2-desktop-style-5.64.0/plugin/kpropertywriter.cpp --- old/qqc2-desktop-style-5.63.0/plugin/kpropertywriter.cpp 1970-01-01 01:00:00.000000000 +0100 +++ new/qqc2-desktop-style-5.64.0/plugin/kpropertywriter.cpp 2019-11-02 12:47:27.000000000 +0100 @@ -0,0 +1,61 @@ +/* + * Copyright (C) 2019 Cyril Rossi <[email protected]> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Library General Public License as + * published by the Free Software Foundation; either version 2, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Library General Public License for more details + * + * You should have received a copy of the GNU Library General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include "kpropertywriter_p.h" + +QObject *KPropertyWriter::target() const +{ + return m_target; +} + +QString KPropertyWriter::propertyName() const +{ + return m_propertyName; +} + +bool KPropertyWriter::writeProperty(const QVariant &value) +{ + if (!m_target) { + return false; + } + + return m_target->setProperty(qUtf8Printable(m_propertyName), value); +} + +void KPropertyWriter::setTarget(QObject *target) +{ + if (m_target == target) { + return; + } + + m_target = target; + emit targetChanged(m_target); +} + +void KPropertyWriter::setPropertyName(const QString &propertyName) +{ + if (m_propertyName == propertyName) { + return; + } + + m_propertyName = propertyName; + emit propertyNameChanged(m_propertyName); +} + +#include "moc_kpropertywriter_p.cpp" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qqc2-desktop-style-5.63.0/plugin/kpropertywriter_p.h new/qqc2-desktop-style-5.64.0/plugin/kpropertywriter_p.h --- old/qqc2-desktop-style-5.63.0/plugin/kpropertywriter_p.h 1970-01-01 01:00:00.000000000 +0100 +++ new/qqc2-desktop-style-5.64.0/plugin/kpropertywriter_p.h 2019-11-02 12:47:27.000000000 +0100 @@ -0,0 +1,54 @@ +/* + * Copyright (C) 2019 Cyril Rossi <[email protected]> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Library General Public License as + * published by the Free Software Foundation; either version 2, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Library General Public License for more details + * + * You should have received a copy of the GNU Library General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef KPROPERTYWRITER_H +#define KPROPERTYWRITER_H + +#include <QObject> +#include <QVariant> + +class KPropertyWriter : public QObject +{ + Q_OBJECT + + Q_PROPERTY(QObject *target READ target WRITE setTarget NOTIFY targetChanged) + Q_PROPERTY(QString propertyName READ propertyName WRITE setPropertyName NOTIFY propertyNameChanged) + +public: + using QObject::QObject; + + QObject *target() const; + QString propertyName() const; + + Q_INVOKABLE bool writeProperty(const QVariant &value); + +public Q_SLOTS: + void setTarget(QObject *target); + void setPropertyName(const QString &propertyName); + +Q_SIGNALS: + void targetChanged(QObject *target); + void propertyNameChanged(const QString &propertyName); + +private: + QObject *m_target = nullptr; + QString m_propertyName; +}; + +#endif // KPROPERTYWRITER_H diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qqc2-desktop-style-5.63.0/plugin/kquickstyleitem.cpp new/qqc2-desktop-style-5.64.0/plugin/kquickstyleitem.cpp --- old/qqc2-desktop-style-5.63.0/plugin/kquickstyleitem.cpp 2019-10-06 11:38:45.000000000 +0200 +++ new/qqc2-desktop-style-5.64.0/plugin/kquickstyleitem.cpp 2019-11-02 12:47:27.000000000 +0100 @@ -89,7 +89,10 @@ m_textureHeight(0), m_lastFocusReason(Qt::NoFocusReason) { - if (!qApp->style()) { + // There is no styleChanged signal and QApplication sends QEvent::StyleChange only to all QWidgets + if (qApp->style()) { + connect(qApp->style(), &QObject::destroyed, this, &KQuickStyleItem::styleChanged); + } else { KSharedConfig::Ptr kdeglobals = KSharedConfig::openConfig(); KConfigGroup cg(kdeglobals, "KDE"); auto style = s_style; @@ -1686,9 +1689,6 @@ polish(); } return true; - } else if (ev->type() == QEvent::StyleChange) { - if (m_itemType == ScrollBar) - initStyleOption(); } return QQuickItem::event(ev); } @@ -1818,6 +1818,20 @@ return QQuickItem::eventFilter(watched, event); } +void KQuickStyleItem::styleChanged() +{ + if (!qApp->style() || QApplication::closingDown()) { + return; + } + + Q_ASSERT(qApp->style() != sender()); + + connect(qApp->style(), &QObject::destroyed, this, &KQuickStyleItem::styleChanged); + + updateSizeHint(); + updateItem(); +} + QPixmap QQuickTableRowImageProvider1::requestPixmap(const QString &id, QSize *size, const QSize &requestedSize) { Q_UNUSED (requestedSize); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qqc2-desktop-style-5.63.0/plugin/kquickstyleitem_p.h new/qqc2-desktop-style-5.64.0/plugin/kquickstyleitem_p.h --- old/qqc2-desktop-style-5.63.0/plugin/kquickstyleitem_p.h 2019-10-06 11:38:45.000000000 +0200 +++ new/qqc2-desktop-style-5.64.0/plugin/kquickstyleitem_p.h 2019-11-02 12:47:27.000000000 +0100 @@ -83,7 +83,7 @@ Q_PROPERTY( QString elementType READ elementType WRITE setElementType NOTIFY elementTypeChanged) Q_PROPERTY( QString text READ text WRITE setText NOTIFY textChanged) Q_PROPERTY( QString activeControl READ activeControl WRITE setActiveControl NOTIFY activeControlChanged) - Q_PROPERTY( QString styleName READ styleName NOTIFY styleChanged) + Q_PROPERTY( QString styleName READ styleName NOTIFY styleNameChanged) Q_PROPERTY( QVariantMap hints READ hints WRITE setHints NOTIFY hintChanged RESET resetHints) Q_PROPERTY( QVariantMap properties READ properties WRITE setProperties NOTIFY propertiesChanged) Q_PROPERTY( QFont font READ font NOTIFY fontChanged) @@ -262,7 +262,7 @@ void valueChanged(); void activeControlChanged(); void infoChanged(); - void styleChanged(); + void styleNameChanged(); void paintMarginsChanged(); void hintChanged(); void propertiesChanged(); @@ -290,6 +290,7 @@ const char* classNameForItem() const; QSize sizeFromContents(int width, int height); qreal baselineOffset(); + void styleChanged(); protected: Kirigami::PlatformTheme *m_theme = nullptr; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qqc2-desktop-style-5.63.0/plugin/qqc2desktopstyleplugin.cpp new/qqc2-desktop-style-5.64.0/plugin/qqc2desktopstyleplugin.cpp --- old/qqc2-desktop-style-5.63.0/plugin/qqc2desktopstyleplugin.cpp 2019-10-06 11:38:45.000000000 +0200 +++ new/qqc2-desktop-style-5.64.0/plugin/qqc2desktopstyleplugin.cpp 2019-11-02 12:47:27.000000000 +0100 @@ -19,6 +19,7 @@ #include "qqc2desktopstyleplugin.h" #include "kquickstyleitem_p.h" +#include "kpropertywriter_p.h" #include <QQmlEngine> #include <QQmlContext> @@ -30,6 +31,7 @@ Q_ASSERT(QLatin1String(uri) == QLatin1String("org.kde.qqc2desktopstyle.private")); qmlRegisterType<KQuickStyleItem>(uri, 1, 0, "StyleItem"); + qmlRegisterType<KPropertyWriter>(uri, 1, 0, "PropertyWriter"); qmlProtectModule(uri, 2); }
