Mailinglist Archive: opensuse-commit (1903 mails)

< Previous Next >
commit kdeclarative for openSUSE:Factory
Hello community,

here is the log from the commit of package kdeclarative for openSUSE:Factory
checked in at 2019-04-19 21:21:41
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/kdeclarative (Old)
and /work/SRC/openSUSE:Factory/.kdeclarative.new.5536 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "kdeclarative"

Fri Apr 19 21:21:41 2019 rev:67 rq:695211 version:5.57.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/kdeclarative/kdeclarative.changes
2019-03-21 09:44:44.358919118 +0100
+++ /work/SRC/openSUSE:Factory/.kdeclarative.new.5536/kdeclarative.changes
2019-04-19 21:22:23.723722255 +0200
@@ -1,0 +2,13 @@
+Sun Apr 14 20:21:42 UTC 2019 - lbeltrame@xxxxxxx
+
+- Update to 5.57.0
+ * New feature release
+ * For more details please see:
+ * https://www.kde.org/announcements/kde-frameworks-5.57.0.php
+- Changes since 5.56.0:
+ * [kdeclarative] compile without foreach
+ * [GridViewKCM] Fix implicit width calculation
+ * move the gridview in a separate file
+ * Avoid fractionals in GridDelegate sizes and alignments
+
+-------------------------------------------------------------------

Old:
----
kdeclarative-5.56.0.tar.xz

New:
----
kdeclarative-5.57.0.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ kdeclarative.spec ++++++
--- /var/tmp/diff_new_pack.2Yb5dZ/_old 2019-04-19 21:22:24.151722800 +0200
+++ /var/tmp/diff_new_pack.2Yb5dZ/_new 2019-04-19 21:22:24.151722800 +0200
@@ -17,14 +17,14 @@


%define lname libKF5Declarative5
-%define _tar_path 5.56
+%define _tar_path 5.57
# 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: kdeclarative
-Version: 5.56.0
+Version: 5.57.0
Release: 0
Summary: Integration of QML and KDE workspaces
License: LGPL-2.1-or-later

++++++ kdeclarative-5.56.0.tar.xz -> kdeclarative-5.57.0.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/kdeclarative-5.56.0/.gitignore
new/kdeclarative-5.57.0/.gitignore
--- old/kdeclarative-5.56.0/.gitignore 1970-01-01 01:00:00.000000000 +0100
+++ new/kdeclarative-5.57.0/.gitignore 2019-04-07 09:26:10.000000000 +0200
@@ -0,0 +1,21 @@
+# Ignore the following files
+*~
+*.[oa]
+*.diff
+*.kate-swp
+*.kdev4
+.kdev_include_paths
+*.kdevelop.pcs
+*.moc
+*.moc.cpp
+*.orig
+*.user
+.*.swp
+.swp.*
+Doxyfile
+Makefile
+avail
+random_seed
+/build*/
+CMakeLists.txt.user*
+*.unc-backup*
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/kdeclarative-5.56.0/CMakeLists.txt
new/kdeclarative-5.57.0/CMakeLists.txt
--- old/kdeclarative-5.56.0/CMakeLists.txt 2019-03-02 14:36:54.000000000
+0100
+++ new/kdeclarative-5.57.0/CMakeLists.txt 2019-04-07 09:26:10.000000000
+0200
@@ -1,12 +1,12 @@
cmake_minimum_required(VERSION 3.5)

-set(KF5_VERSION "5.56.0") # handled by release scripts
-set(KF5_DEP_VERSION "5.56.0") # handled by release scripts
+set(KF5_VERSION "5.57.0") # handled by release scripts
+set(KF5_DEP_VERSION "5.57.0") # handled by release scripts
project(KDeclarative VERSION ${KF5_VERSION})

# Dependencies
include(FeatureSummary)
-find_package(ECM 5.56.0 NO_MODULE)
+find_package(ECM 5.57.0 NO_MODULE)
set_package_properties(ECM PROPERTIES TYPE REQUIRED DESCRIPTION "Extra CMake
Modules." URL
"https://projects.kde.org/projects/kdesupport/extra-cmake-modules";)
feature_summary(WHAT REQUIRED_PACKAGES_NOT_FOUND
FATAL_ON_MISSING_REQUIRED_PACKAGES)

@@ -73,7 +73,7 @@
if(epoxy_FOUND)
set(HAVE_EPOXY 1)
endif()
-
+add_definitions(-DQT_NO_FOREACH)
add_subdirectory(src)
if (BUILD_TESTING)
add_subdirectory(autotests)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/kdeclarative-5.56.0/po/en_GB/kdeclarative5.po
new/kdeclarative-5.57.0/po/en_GB/kdeclarative5.po
--- old/kdeclarative-5.56.0/po/en_GB/kdeclarative5.po 2019-03-02
14:36:54.000000000 +0100
+++ new/kdeclarative-5.57.0/po/en_GB/kdeclarative5.po 2019-04-07
09:26:10.000000000 +0200
@@ -2,21 +2,21 @@
# Malcolm Hunter <malcolm.hunter@xxxxxxxxx>, 2002,2003,2004, 2005, 2006, 2007,
2008, 2009.
# Jonathan Riddell <kde-en-gb@xxxxxxxxxxxx>, 2003.
# Andrew Coles <andrew_coles@xxxxxxxxxxx>, 2004, 2005, 2009, 2010.
-# Steve Allewell <steve.allewell@xxxxxxxxx>, 2014, 2015.
+# Steve Allewell <steve.allewell@xxxxxxxxx>, 2014, 2015, 2019.
msgid ""
msgstr ""
"Project-Id-Version: kdelibs4\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n";
"POT-Creation-Date: 2019-02-04 03:08+0100\n"
-"PO-Revision-Date: 2015-03-14 14:49+0000\n"
-"Last-Translator: \n"
-"Language-Team: British English <kde-l10n-en_gb@xxxxxxx>\n"
+"PO-Revision-Date: 2019-03-24 19:11+0000\n"
+"Last-Translator: Steve Allewell <steve.allewell@xxxxxxxxx>\n"
+"Language-Team: British English <kde-i18n-doc@xxxxxxx>\n"
"Language: en_GB\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Lokalize 1.5\n"
+"X-Generator: Lokalize 19.07.70\n"

#, kde-format
msgctxt "NAME OF TRANSLATORS"
@@ -39,9 +39,7 @@
msgstr "The unique name of the application (mandatory)"

#: qmlcontrols/kcmcontrols/qml/GridDelegate.qml:108
-#, fuzzy, kde-format
-#| msgctxt "No shortcut defined"
-#| msgid "None"
+#, kde-format
msgid "None"
msgstr "None"

diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/kdeclarative-5.56.0/po/id/kdeclarative5.po
new/kdeclarative-5.57.0/po/id/kdeclarative5.po
--- old/kdeclarative-5.56.0/po/id/kdeclarative5.po 2019-03-02
14:36:54.000000000 +0100
+++ new/kdeclarative-5.57.0/po/id/kdeclarative5.po 2019-04-07
09:26:10.000000000 +0200
@@ -16,7 +16,7 @@
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=n != 1;\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Lokalize 18.12.1\n"

#, kde-format
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/kdeclarative-5.56.0/po/pl/kdeclarative5.po
new/kdeclarative-5.57.0/po/pl/kdeclarative5.po
--- old/kdeclarative-5.56.0/po/pl/kdeclarative5.po 2019-03-02
14:36:54.000000000 +0100
+++ new/kdeclarative-5.57.0/po/pl/kdeclarative5.po 2019-04-07
09:26:10.000000000 +0200
@@ -134,8 +134,6 @@

#: qmlcontrols/kcmcontrols/qml/GridDelegate.qml:108
#, kde-format
-#| msgctxt "No shortcut defined"
-#| msgid "None"
msgid "None"
msgstr "Brak"

diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/kdeclarative-5.56.0/po/te/kdeclarative5.po
new/kdeclarative-5.57.0/po/te/kdeclarative5.po
--- old/kdeclarative-5.56.0/po/te/kdeclarative5.po 2019-03-02
14:36:54.000000000 +0100
+++ new/kdeclarative-5.57.0/po/te/kdeclarative5.po 2019-04-07
09:26:10.000000000 +0200
@@ -22,8 +22,7 @@
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Lokalize 1.5\n"
-"Plural-Forms: nplurals=5; plural=n==1 ? 0 : n==2 ? 1 : n<7 ? 2 : n<11 ? 3 : "
-"4;\n"
+"Plural-Forms: nplurals=2; plural=(n != 1)\n"

#, kde-format
msgctxt "NAME OF TRANSLATORS"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/kdeclarative-5.56.0/po/zh_CN/kdeclarative5.po
new/kdeclarative-5.57.0/po/zh_CN/kdeclarative5.po
--- old/kdeclarative-5.56.0/po/zh_CN/kdeclarative5.po 2019-03-02
14:36:54.000000000 +0100
+++ new/kdeclarative-5.57.0/po/zh_CN/kdeclarative5.po 2019-04-07
09:26:10.000000000 +0200
@@ -15,7 +15,7 @@
"Project-Id-Version: kdeorg\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n";
"POT-Creation-Date: 2019-02-04 03:08+0100\n"
-"PO-Revision-Date: 2019-02-20 23:16\n"
+"PO-Revision-Date: 2019-03-07 09:22\n"
"Last-Translator: guoyunhe <i@xxxxxxxxxxx>\n"
"Language-Team: Chinese Simplified\n"
"Language: zh_CN\n"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/kdeclarative-5.56.0/src/kdeclarative/configpropertymap.cpp
new/kdeclarative-5.57.0/src/kdeclarative/configpropertymap.cpp
--- old/kdeclarative-5.56.0/src/kdeclarative/configpropertymap.cpp
2019-03-02 14:36:54.000000000 +0100
+++ new/kdeclarative-5.57.0/src/kdeclarative/configpropertymap.cpp
2019-04-07 09:26:10.000000000 +0200
@@ -108,7 +108,8 @@
return;
}

- foreach (KConfigSkeletonItem *item, config.data()->items()) {
+ const auto lstItems = config.data()->items();
+ for (KConfigSkeletonItem *item : lstItems) {
item->setProperty(q->value(item->key()));
}

diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/kdeclarative-5.56.0/src/kdeclarative/qmlobject.cpp
new/kdeclarative-5.57.0/src/kdeclarative/qmlobject.cpp
--- old/kdeclarative-5.56.0/src/kdeclarative/qmlobject.cpp 2019-03-02
14:36:54.000000000 +0100
+++ new/kdeclarative-5.57.0/src/kdeclarative/qmlobject.cpp 2019-04-07
09:26:10.000000000 +0200
@@ -100,8 +100,8 @@
{
QString errorStr = QStringLiteral("Error loading QML file.\n");
if (component->isError()) {
- QList<QQmlError> errors = component->errors();
- foreach (const QQmlError &error, errors) {
+ const QList<QQmlError> errors = component->errors();
+ for (const QQmlError &error : errors) {
errorStr += (error.line() > 0 ?
QString(QString::number(error.line()) + QLatin1String(": ")) :
QLatin1String(""))
+ error.description() + QLatin1Char('\n');
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/kdeclarative-5.56.0/src/qmlcontrols/draganddrop/DeclarativeDragArea.cpp
new/kdeclarative-5.57.0/src/qmlcontrols/draganddrop/DeclarativeDragArea.cpp
--- old/kdeclarative-5.56.0/src/qmlcontrols/draganddrop/DeclarativeDragArea.cpp
2019-03-02 14:36:54.000000000 +0100
+++ new/kdeclarative-5.57.0/src/qmlcontrols/draganddrop/DeclarativeDragArea.cpp
2019-04-07 09:26:10.000000000 +0200
@@ -360,7 +360,7 @@
pm.fill(Qt::transparent);
QPainter p(&pm);
int i = 0;
- foreach (const QString &ic, icons) {
+ for (const QString &ic : qAsConst(icons)) {
p.drawPixmap(QPoint(i * imageSize, 0),
QIcon::fromTheme(ic).pixmap(imageSize));
i++;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/kdeclarative-5.56.0/src/qmlcontrols/draganddrop/DeclarativeMimeData.cpp
new/kdeclarative-5.57.0/src/qmlcontrols/draganddrop/DeclarativeMimeData.cpp
--- old/kdeclarative-5.56.0/src/qmlcontrols/draganddrop/DeclarativeMimeData.cpp
2019-03-02 14:36:54.000000000 +0100
+++ new/kdeclarative-5.57.0/src/qmlcontrols/draganddrop/DeclarativeMimeData.cpp
2019-04-07 09:26:10.000000000 +0200
@@ -52,7 +52,8 @@
m_source(nullptr)
{
// Copy the standard MIME data
- foreach(QString format, copy->formats()) {
+ const auto formats = copy->formats();
+ for (const QString &format : formats) {
QMimeData::setData(format, copy->data(format));
}

@@ -90,7 +91,8 @@
QJsonArray DeclarativeMimeData::urls() const
{
QJsonArray varUrls;
- foreach (const QUrl &url, QMimeData::urls()) {
+ const auto lstUrls = QMimeData::urls();
+ for (const QUrl &url : lstUrls) {
varUrls.append(url.toString());
}
return varUrls;
@@ -100,7 +102,7 @@
{
QList<QUrl> urlList;
urlList.reserve(urls.size());
- foreach (const QVariant &varUrl, urls) {
+ for (const QVariant &varUrl : urls) {
urlList << varUrl.toUrl();
}
QMimeData::setUrls(urlList);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/kdeclarative-5.56.0/src/qmlcontrols/draganddrop/MimeDataWrapper.cpp
new/kdeclarative-5.57.0/src/qmlcontrols/draganddrop/MimeDataWrapper.cpp
--- old/kdeclarative-5.56.0/src/qmlcontrols/draganddrop/MimeDataWrapper.cpp
2019-03-02 14:36:54.000000000 +0100
+++ new/kdeclarative-5.57.0/src/qmlcontrols/draganddrop/MimeDataWrapper.cpp
2019-04-07 09:26:10.000000000 +0200
@@ -56,7 +56,8 @@
QJsonArray MimeDataWrapper::urls() const
{
QJsonArray varUrls;
- foreach (const QUrl &url, m_data->urls()) {
+ const auto urls = m_data->urls();
+ for (const QUrl &url : urls) {
varUrls.append(url.toString());
}
return varUrls;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/kdeclarative-5.56.0/src/qmlcontrols/kcmcontrols/qml/GridDelegate.qml
new/kdeclarative-5.57.0/src/qmlcontrols/kcmcontrols/qml/GridDelegate.qml
--- old/kdeclarative-5.56.0/src/qmlcontrols/kcmcontrols/qml/GridDelegate.qml
2019-03-02 14:36:54.000000000 +0100
+++ new/kdeclarative-5.57.0/src/qmlcontrols/kcmcontrols/qml/GridDelegate.qml
2019-04-07 09:26:10.000000000 +0200
@@ -67,10 +67,10 @@
id: thumbnail
anchors {
centerIn: parent
- verticalCenterOffset: -label.height/2
+ verticalCenterOffset: Math.ceil(-label.height/2)
}
width: Kirigami.Settings.isMobile ? delegate.width -
Kirigami.Units.gridUnit : Math.min(delegate.GridView.view.implicitCellWidth,
delegate.width - Kirigami.Units.gridUnit)
- height: width / 1.6
+ height: Math.round(width / 1.6)
radius: Kirigami.Units.smallSpacing
Kirigami.Theme.inherit: false
Kirigami.Theme.colorSet: Kirigami.Theme.View
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/kdeclarative-5.56.0/src/qmlcontrols/kcmcontrols/qml/GridView.qml
new/kdeclarative-5.57.0/src/qmlcontrols/kcmcontrols/qml/GridView.qml
--- old/kdeclarative-5.56.0/src/qmlcontrols/kcmcontrols/qml/GridView.qml
2019-03-02 14:36:54.000000000 +0100
+++ new/kdeclarative-5.57.0/src/qmlcontrols/kcmcontrols/qml/GridView.qml
2019-04-07 09:26:10.000000000 +0200
@@ -20,6 +20,7 @@
import QtQuick.Layouts 1.1
import QtQuick.Controls 2.2 as QtControls
import org.kde.kirigami 2.3 as Kirigami
+import "private"

/**
* A ScrollView containing a GridView, with the default behavior about
@@ -51,47 +52,8 @@

Component.onCompleted: scroll.background.visible = true;

- GridView {
+ GridViewInternal {
id: view
- property int implicitCellWidth: Kirigami.Units.gridUnit * 10
- property int implicitCellHeight: Math.round(implicitCellWidth / 1.6) +
Kirigami.Units.gridUnit*2
-
- onCurrentIndexChanged: positionViewAtIndex(currentIndex,
GridView.Contain);
-
- QtObject {
- id: internal
- readonly property int availableWidth: scroll.width -
internal.scrollBarSpace - 4
- readonly property int scrollBarSpace:
scroll.QtControls.ScrollBar.vertical.width
- }
- anchors {
- fill: parent
- margins: 2
- leftMargin: scroll.QtControls.ScrollBar.vertical.visible ? 2 :
internal.scrollBarSpace/2 + 2
- }
- clip: true
- activeFocusOnTab: true
-
- cellWidth: Math.floor(internal.availableWidth /
Math.max(Math.floor(internal.availableWidth / (implicitCellWidth +
Kirigami.Units.gridUnit)), 2))
- cellHeight: Kirigami.Settings.isMobile ? cellWidth/1.6 +
Kirigami.Units.gridUnit : implicitCellHeight
-
- keyNavigationEnabled: true
- keyNavigationWraps: true
- highlightMoveDuration: 0
-
- remove: Transition {
- ParallelAnimation {
- NumberAnimation { property: "scale"; to: 0.5; duration:
Kirigami.Units.longDuration }
- NumberAnimation { property: "opacity"; to: 0.0; duration:
Kirigami.Units.longDuration }
- }
- }
-
- removeDisplaced: Transition {
- SequentialAnimation {
- // wait for the "remove" animation to finish
- PauseAnimation { duration: Kirigami.Units.longDuration }
- NumberAnimation { properties: "x,y"; duration:
Kirigami.Units.longDuration }
- }
- }
}
QtControls.ScrollBar.horizontal.visible: false
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/kdeclarative-5.56.0/src/qmlcontrols/kcmcontrols/qml/GridViewKCM.qml
new/kdeclarative-5.57.0/src/qmlcontrols/kcmcontrols/qml/GridViewKCM.qml
--- old/kdeclarative-5.56.0/src/qmlcontrols/kcmcontrols/qml/GridViewKCM.qml
2019-03-02 14:36:54.000000000 +0100
+++ new/kdeclarative-5.57.0/src/qmlcontrols/kcmcontrols/qml/GridViewKCM.qml
2019-04-07 09:26:10.000000000 +0200
@@ -59,8 +59,22 @@
property alias view: scroll.view

title: kcm.name
- implicitWidth: view.implicitCellWidth * 3 +
scroll.QtControls.ScrollBar.vertical.width + Kirigami.Units.gridUnit
+ implicitWidth: {
+ var width = 0;
+
+ // Show three columns at once, every colum occupies implicitCellWidth
+ Units.gridUnit
+ width += 3 * (view.implicitCellWidth + Kirigami.Units.gridUnit);
+
+ var scrollBar = scroll.QtControls.ScrollBar.vertical;
+ width += scrollBar.width + scrollBar.leftPadding +
scrollBar.rightPadding;
+
+ width += scroll.leftPadding + scroll.rightPadding
+ width += root.leftPadding + root.rightPadding;
+
+ return width;
+ }
implicitHeight: view.implicitCellHeight * 3 + (header ? header.height : 0)
+ (footer ? footer.height : 0) + Kirigami.Units.gridUnit
+
flickable: scroll.view

//NOTE: this should be smallspacing buit we need a pixel size in order to
align with systemsettings widgets
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/kdeclarative-5.56.0/src/qmlcontrols/kcmcontrols/qml/private/GridViewInternal.qml

new/kdeclarative-5.57.0/src/qmlcontrols/kcmcontrols/qml/private/GridViewInternal.qml
---
old/kdeclarative-5.56.0/src/qmlcontrols/kcmcontrols/qml/private/GridViewInternal.qml
1970-01-01 01:00:00.000000000 +0100
+++
new/kdeclarative-5.57.0/src/qmlcontrols/kcmcontrols/qml/private/GridViewInternal.qml
2019-04-07 09:26:10.000000000 +0200
@@ -0,0 +1,66 @@
+/*
+ Copyright (c) 2019 Marco Martin <mart@xxxxxxx>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License version 2 as published by the Free Software Foundation.
+
+ This library 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 library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+import QtQuick 2.7
+import QtQuick.Layouts 1.1
+import QtQuick.Controls 2.2 as QtControls
+import org.kde.kirigami 2.3 as Kirigami
+
+
+GridView {
+ id: view
+ property int implicitCellWidth: Kirigami.Units.gridUnit * 10
+ property int implicitCellHeight: Math.round(implicitCellWidth / 1.6) +
Kirigami.Units.gridUnit*2
+
+ onCurrentIndexChanged: positionViewAtIndex(currentIndex, GridView.Contain);
+
+ QtObject {
+ id: internal
+ readonly property int availableWidth: scroll.width -
internal.scrollBarSpace - 4
+ readonly property int scrollBarSpace:
scroll.QtControls.ScrollBar.vertical.width
+ }
+ anchors {
+ fill: parent
+ margins: 2
+ leftMargin: scroll.QtControls.ScrollBar.vertical.visible ? 2 :
internal.scrollBarSpace/2 + 2
+ }
+ clip: true
+ activeFocusOnTab: true
+
+ cellWidth: Math.floor(internal.availableWidth /
Math.max(Math.floor(internal.availableWidth / (implicitCellWidth +
Kirigami.Units.gridUnit)), 2))
+ cellHeight: Kirigami.Settings.isMobile ? cellWidth/1.6 +
Kirigami.Units.gridUnit : implicitCellHeight
+
+ keyNavigationEnabled: true
+ keyNavigationWraps: true
+ highlightMoveDuration: 0
+
+ remove: Transition {
+ ParallelAnimation {
+ NumberAnimation { property: "scale"; to: 0.5; duration:
Kirigami.Units.longDuration }
+ NumberAnimation { property: "opacity"; to: 0.0; duration:
Kirigami.Units.longDuration }
+ }
+ }
+
+ removeDisplaced: Transition {
+ SequentialAnimation {
+ // wait for the "remove" animation to finish
+ PauseAnimation { duration: Kirigami.Units.longDuration }
+ NumberAnimation { properties: "x,y"; duration:
Kirigami.Units.longDuration }
+ }
+ }
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/kdeclarative-5.56.0/src/qmlcontrols/kquickcontrolsaddons/clipboard.cpp
new/kdeclarative-5.57.0/src/qmlcontrols/kquickcontrolsaddons/clipboard.cpp
--- old/kdeclarative-5.56.0/src/qmlcontrols/kquickcontrolsaddons/clipboard.cpp
2019-03-02 14:36:54.000000000 +0100
+++ new/kdeclarative-5.57.0/src/qmlcontrols/kquickcontrolsaddons/clipboard.cpp
2019-04-07 09:26:10.000000000 +0200
@@ -60,7 +60,8 @@
QVariant ret;
if(format == QStringLiteral("text/uri-list")) {
QVariantList retList;
- foreach(const QUrl& url, data->urls())
+ const auto urls = data->urls();
+ for (const QUrl& url : urls)
retList += url;
ret = retList;
} else if(format.startsWith(QStringLiteral("text/"))) {
@@ -95,10 +96,10 @@
break;
default:
if (content.type() == QVariant::List) {
- QVariantList list = content.toList();
+ const QVariantList list = content.toList();
QList<QUrl> urls;
bool wasUrlList = true;
- foreach (const QVariant& url, list) {
+ for (const QVariant& url : list) {
if (url.type() != QVariant::Url) {
wasUrlList = false;
break;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/kdeclarative-5.56.0/src/qmlcontrols/kquickcontrolsaddons/eventgenerator.cpp
new/kdeclarative-5.57.0/src/qmlcontrols/kquickcontrolsaddons/eventgenerator.cpp
---
old/kdeclarative-5.56.0/src/qmlcontrols/kquickcontrolsaddons/eventgenerator.cpp
2019-03-02 14:36:54.000000000 +0100
+++
new/kdeclarative-5.57.0/src/qmlcontrols/kquickcontrolsaddons/eventgenerator.cpp
2019-04-07 09:26:10.000000000 +0200
@@ -65,7 +65,7 @@

const QList<QQuickItem *> items = allChildItemsRecursive(parentItem);

- foreach(QQuickItem *item, items) {
+ for (QQuickItem *item : items) {
sendMouseEvent(item, type, x, y, button, buttons, modifiers);
}
}
@@ -90,7 +90,7 @@

const QList<QQuickItem *> items = allChildItemsRecursive(parentItem);

- foreach(QQuickItem *item, items) {
+ for (QQuickItem *item : items) {
sendWheelEvent(item, x, y, pixelDelta, angleDelta, buttons, modifiers);
}
}
@@ -129,7 +129,7 @@

const QList<QQuickItem *> items = allChildItemsRecursive(parentItem);

- foreach(QQuickItem *item, items) {
+ for (QQuickItem *item : items) {
sendGrabEvent(item, type);
}
}
@@ -138,9 +138,11 @@
{
QList<QQuickItem *> itemList;

- itemList.append(parentItem->childItems());
+ const auto childsItems = parentItem->childItems();
+ itemList.append(childsItems);

- foreach(QQuickItem *childItem, parentItem->childItems()) {
+
+ for (QQuickItem *childItem : childsItems) {
itemList.append(allChildItemsRecursive(childItem));
}

diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/kdeclarative-5.56.0/src/qmlcontrols/kquickcontrolsaddons/mouseeventlistener.cpp

new/kdeclarative-5.57.0/src/qmlcontrols/kquickcontrolsaddons/mouseeventlistener.cpp
---
old/kdeclarative-5.56.0/src/qmlcontrols/kquickcontrolsaddons/mouseeventlistener.cpp
2019-03-02 14:36:54.000000000 +0100
+++
new/kdeclarative-5.57.0/src/qmlcontrols/kquickcontrolsaddons/mouseeventlistener.cpp
2019-04-07 09:26:10.000000000 +0200
@@ -375,7 +375,8 @@

QScreen* MouseEventListener::screenForGlobalPos(const QPoint& globalPos)
{
- foreach(QScreen *screen, QGuiApplication::screens()) {
+ const auto screens = QGuiApplication::screens();
+ for (QScreen *screen : screens) {
if (screen->geometry().contains(globalPos)) {
return screen;
}


< Previous Next >
This Thread
  • No further messages