Hello community, here is the log from the commit of package kquickcharts for openSUSE:Factory checked in at 2020-07-14 07:54:06 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/kquickcharts (Old) and /work/SRC/openSUSE:Factory/.kquickcharts.new.3060 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kquickcharts" Tue Jul 14 07:54:06 2020 rev:8 rq:820389 version:5.72.0 Changes: -------- --- /work/SRC/openSUSE:Factory/kquickcharts/kquickcharts.changes 2020-06-16 13:43:59.225365478 +0200 +++ /work/SRC/openSUSE:Factory/.kquickcharts.new.3060/kquickcharts.changes 2020-07-14 07:55:24.261034827 +0200 @@ -1,0 +2,17 @@ +Sun Jul 5 07:55:41 UTC 2020 - Christophe Giboudeaux <[email protected]> + +- Update to 5.72.0 + * New feature release + * For more details please see: + * https://kde.org/announcements/kde-frameworks-5.72.0 +- Changes since 5.71.0: + * Elide value Label of LegendDelegate when there isn't enough width + * Fix for error "C1059: non constant expression ..." + * Account for line width when bounds checking + * Don't use fwidth when rendering line chart lines + * Rewrite removeValueSource so it doesn't use destroyed QObjects + * Use insertValueSource in Chart::appendSource + * Improve documentation of Model and Value history sources + * Properly initialise ModelHistorySource::{m_row,m_maximumHistory} + +------------------------------------------------------------------- Old: ---- kquickcharts-5.71.0.tar.xz kquickcharts-5.71.0.tar.xz.sig New: ---- kquickcharts-5.72.0.tar.xz kquickcharts-5.72.0.tar.xz.sig ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kquickcharts.spec ++++++ --- /var/tmp/diff_new_pack.ePvg2b/_old 2020-07-14 07:55:24.901036900 +0200 +++ /var/tmp/diff_new_pack.ePvg2b/_new 2020-07-14 07:55:24.905036912 +0200 @@ -16,14 +16,14 @@ # -%define _tar_path 5.71 +%define _tar_path 5.72 # Full KF5 version (e.g. 5.33.0) %{!?_kf5_version: %global _kf5_version %{version}} # Last major and minor KF5 version (e.g. 5.33) %{!?_kf5_bugfix_version: %define _kf5_bugfix_version %(echo %{_kf5_version} | awk -F. '{print $1"."$2}')} %bcond_without lang Name: kquickcharts -Version: 5.71.0 +Version: 5.72.0 Release: 0 Summary: Set of charts for QtQuick applications License: LGPL-2.1-or-later @@ -70,7 +70,7 @@ %kf5_makeinstall -C build %files -%license COPYING +%license LICENSES/* %doc README.md %dir %{_kf5_qmldir}/org %dir %{_kf5_qmldir}/org/kde ++++++ kquickcharts-5.71.0.tar.xz -> kquickcharts-5.72.0.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kquickcharts-5.71.0/CMakeLists.txt new/kquickcharts-5.72.0/CMakeLists.txt --- old/kquickcharts-5.71.0/CMakeLists.txt 2020-06-06 21:35:38.000000000 +0200 +++ new/kquickcharts-5.72.0/CMakeLists.txt 2020-07-04 11:55:45.000000000 +0200 @@ -1,12 +1,12 @@ cmake_minimum_required(VERSION 3.5) -set(KF5_VERSION "5.71.0") # handled by release scripts -set(KF5_DEP_VERSION "5.71.0") # handled by release scripts +set(KF5_VERSION "5.72.0") # handled by release scripts +set(KF5_DEP_VERSION "5.72.0") # handled by release scripts project(KQuickCharts VERSION ${KF5_VERSION}) include(FeatureSummary) -find_package(ECM 5.71.0 NO_MODULE) +find_package(ECM 5.72.0 NO_MODULE) set_package_properties(ECM PROPERTIES TYPE REQUIRED DESCRIPTION "Extra CMake Modules." URL "https://commits.kde.org/extra-cmake-modules") feature_summary(WHAT REQUIRED_PACKAGES_NOT_FOUND FATAL_ON_MISSING_REQUIRED_PACKAGES) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kquickcharts-5.71.0/controls/LegendDelegate.qml new/kquickcharts-5.72.0/controls/LegendDelegate.qml --- old/kquickcharts-5.71.0/controls/LegendDelegate.qml 2020-06-06 21:35:38.000000000 +0200 +++ new/kquickcharts-5.72.0/controls/LegendDelegate.qml 2020-07-04 11:55:45.000000000 +0200 @@ -66,7 +66,7 @@ Label { id: name - + visible: delegate.width - delegate.colorWidth - delegate.spacing - value.implicitWidth > 0 Layout.fillWidth: true Layout.fillHeight: true Layout.minimumWidth: 0 @@ -79,17 +79,17 @@ Label { id: value - Layout.fillHeight: true Layout.fillWidth: true - Layout.minimumWidth: implicitWidth - //Layout.preferredWidth: delegate.valueWidth + Layout.minimumWidth: name.visible ? implicitWidth : 0 + Layout.preferredWidth: implicitWidth text: delegate.value; + elide: Text.ElideRight font: name.font color: delegate.valueColor verticalAlignment: Qt.AlignVCenter - horizontalAlignment: Qt.AlignRight + horizontalAlignment: name.visible ? Qt.AlignRight : Qt.AlignLeft } Component { id: defaultIndicator; Rectangle { color: delegateColor } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kquickcharts-5.71.0/src/Chart.cpp new/kquickcharts-5.72.0/src/Chart.cpp --- old/kquickcharts-5.71.0/src/Chart.cpp 2020-06-06 21:35:38.000000000 +0200 +++ new/kquickcharts-5.72.0/src/Chart.cpp 2020-07-04 11:55:45.000000000 +0200 @@ -98,7 +98,17 @@ void Chart::removeValueSource(QObject *source) { - removeValueSource(m_valueSources.indexOf(qobject_cast<ChartDataSource *>(source))); + auto itr = std::find_if(m_valueSources.begin(), m_valueSources.end(), [source](QObject *dataSource) { + return dataSource == source; + }); + + if (itr != m_valueSources.end()) { + (*itr)->disconnect(this); + m_valueSources.erase(itr); + } + + onDataChanged(); + Q_EMIT valueSourcesChanged(); } Chart::IndexingMode Chart::indexingMode() const @@ -127,9 +137,7 @@ void Chart::appendSource(Chart::DataSourcesProperty *list, ChartDataSource *source) { auto chart = reinterpret_cast<Chart *>(list->data); - chart->m_valueSources.append(source); - QObject::connect(source, &ChartDataSource::dataChanged, chart, &Chart::onDataChanged); - chart->onDataChanged(); + chart->insertValueSource(chart->valueSources().size(), source); } int Chart::sourceCount(Chart::DataSourcesProperty *list) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kquickcharts-5.71.0/src/datasource/ModelHistorySource.h new/kquickcharts-5.72.0/src/datasource/ModelHistorySource.h --- old/kquickcharts-5.71.0/src/datasource/ModelHistorySource.h 2020-06-06 21:35:38.000000000 +0200 +++ new/kquickcharts-5.72.0/src/datasource/ModelHistorySource.h 2020-07-04 11:55:45.000000000 +0200 @@ -18,15 +18,31 @@ class ModelHistorySource : public ModelSource { Q_OBJECT - // The row to read data from. The items of this source will be the values of - // that row, using the column and role from ModelSource. + /** + * The row to read data from. + * + * The items of this source will be the values of that row, using the column + * and role from ModelSource. + * + * The default is 0. + */ Q_PROPERTY(int row READ row WRITE setRow NOTIFY rowChanged) - // The maximum amount of history to keep. + /** + * The maximum amount of history to keep. + * + * The default is 10. + */ Q_PROPERTY(int maximumHistory READ maximumHistory WRITE setMaximumHistory NOTIFY maximumHistoryChanged) - // The update interval. If not set or set to a value < 0, a new item will be - // added whenever the underlying model changes. Otherwise, the source will - // sample the underlying model every interval milliseconds and add a new item - // with whatever value the model has at that point - even if it did not change. + /** + * The interval, in milliseconds, with which to query the model. + * + * If not set or set to a value < 0, a new item will be added whenever the + * underlying model changes. Otherwise, the source will sample the + * underlying model every interval milliseconds and add a new item with + * whatever value the model has at that point - even if it did not change. + * + * The default is 0. + */ Q_PROPERTY(int interval READ interval WRITE setInterval NOTIFY intervalChanged) public: @@ -55,8 +71,8 @@ void onModelChanged(); void onDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight, const QVector<int> &roles); - int m_row; - int m_maximumHistory; + int m_row = 0; + int m_maximumHistory = 10; QVariantList m_history; std::unique_ptr<QTimer> m_updateTimer; }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kquickcharts-5.71.0/src/datasource/ValueHistorySource.h new/kquickcharts-5.72.0/src/datasource/ValueHistorySource.h --- old/kquickcharts-5.71.0/src/datasource/ValueHistorySource.h 2020-06-06 21:35:38.000000000 +0200 +++ new/kquickcharts-5.72.0/src/datasource/ValueHistorySource.h 2020-07-04 11:55:45.000000000 +0200 @@ -21,8 +21,29 @@ class ValueHistorySource : public ChartDataSource { Q_OBJECT + /** + * The value to track. + * + * Depending on the value of \property interval , changing this will add a + * new item to the source. + */ Q_PROPERTY(QVariant value READ value WRITE setValue NOTIFY dataChanged) + /** + * The maximum amount of history to keep. + * + * The default is 10. + */ Q_PROPERTY(int maximumHistory READ maximumHistory WRITE setMaximumHistory NOTIFY maximumHistoryChanged) + /** + * The interval, in milliseconds, with which to query the value. + * + * If not set or set to a value < 0, a new item will be added whenever value + * changes. Otherwise, the source will sample the value every interval + * milliseconds and add a new item with whatever value it has at that point + * - even if it did not change. + * + * The default is 0. + */ Q_PROPERTY(int interval READ interval WRITE setInterval NOTIFY intervalChanged) public: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kquickcharts-5.71.0/src/shaders/linechart.frag new/kquickcharts-5.72.0/src/shaders/linechart.frag --- old/kquickcharts-5.71.0/src/shaders/linechart.frag 2020-06-06 21:35:38.000000000 +0200 +++ new/kquickcharts-5.72.0/src/shaders/linechart.frag 2020-07-04 11:55:45.000000000 +0200 @@ -52,16 +52,18 @@ lowp vec4 color = vec4(0.0, 0.0, 0.0, 0.0); + lowp float bounds_range = max(0.01, lineWidth); + // bounds.y contains the line segment's maximum value. If we are a bit above // that, we will never render anything, so just discard the pixel. - if (point.y > bounds.y + 0.01) { + if (point.y > bounds.y + bounds_range) { discard; } // bounds.x contains the line segment's minimum value. If we are a bit below // that, we know we will always be inside the polygon described by points. // So just return a pixel with fillColor. - if (point.y < bounds.x - 0.01) { + if (point.y < bounds.x - bounds_range) { #ifdef LEGACY_STAGE_INOUT gl_FragColor = fillColor * opacity; #else @@ -79,7 +81,7 @@ color = sdf_render(polygon, color, fillColor); if (lineWidth > 0.0) { - color = sdf_render(sdf_annular(sdf_outline(polygon), lineWidth), color, lineColor); + color = mix(color, lineColor, 1.0 - smoothstep(-0.001, 0.001, sdf_annular(polygon, lineWidth))); } #ifdef LEGACY_STAGE_INOUT diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kquickcharts-5.71.0/src/shaders/sdf.glsl new/kquickcharts-5.72.0/src/shaders/sdf.glsl --- old/kquickcharts-5.71.0/src/shaders/sdf.glsl 2020-06-06 21:35:38.000000000 +0200 +++ new/kquickcharts-5.72.0/src/shaders/sdf.glsl 2020-07-04 11:55:45.000000000 +0200 @@ -14,7 +14,7 @@ #define SDF_POLYGON_MAX_POINT_COUNT 400 // A constant for pi -const lowp float pi = acos(-1.0); +const lowp float pi = 3.1415926535897932384626433832795; /********************************* Shapes
