Hello community,

here is the log from the commit of package kio for openSUSE:Factory checked in 
at 2018-02-16 21:31:49
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/kio (Old)
 and      /work/SRC/openSUSE:Factory/.kio.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "kio"

Fri Feb 16 21:31:49 2018 rev:60 rq:576540 version:5.43.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/kio/kio.changes  2018-01-22 16:09:14.799958799 
+0100
+++ /work/SRC/openSUSE:Factory/.kio.new/kio.changes     2018-02-16 
21:31:52.350803306 +0100
@@ -1,0 +2,23 @@
+Tue Feb 13 16:52:12 UTC 2018 - [email protected]
+
+- Add patch to fix a problem that made kio copy files too slowly (kde#384561)
+  * 0001-Dont-stat-etc-localtime-between-read-and-write.patch
+
+- Add patch to fix kdialog writing files with .bin extension in chrome
+  when downloading files (kde#382437)
+  * 0001-Fix-bug-382437-Regression-in-kdialog-causes-wrong-file-ext.patch
+
+-------------------------------------------------------------------
+Mon Feb 12 23:42:09 CET 2018 - [email protected]
+
+- Update to 5.43.0
+  * New feature release
+  * For more details please see:
+  * https://www.kde.org/announcements/kde-frameworks-5.43.0.php
+- Changes since 5.42.0:
+  * Too many changes to list here
+- Dropped patches, now upstream:
+  * 0001-Fix-KFilePreviewGenerator-LayoutBlocker.patch
+  * fix-overlap-of-first-item-in-kfileplacesview.patch
+
+-------------------------------------------------------------------

Old:
----
  0001-Fix-KFilePreviewGenerator-LayoutBlocker.patch
  fix-overlap-of-first-item-in-kfileplacesview.patch
  kio-5.42.0.tar.xz

New:
----
  0001-Dont-stat-etc-localtime-between-read-and-write.patch
  0001-Fix-bug-382437-Regression-in-kdialog-causes-wrong-file-ext.patch
  kio-5.43.0.tar.xz

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

Other differences:
------------------
++++++ kio.spec ++++++
--- /var/tmp/diff_new_pack.aczBqf/_old  2018-02-16 21:31:54.082740764 +0100
+++ /var/tmp/diff_new_pack.aczBqf/_new  2018-02-16 21:31:54.086740620 +0100
@@ -17,9 +17,9 @@
 
 
 %bcond_without lang
-%define _tar_path 5.42
+%define _tar_path 5.43
 Name:           kio
-Version:        5.42.0
+Version:        5.43.0
 Release:        0
 %define kf5_version %{version}
 # Full KF5 version (e.g. 5.33.0)
@@ -35,9 +35,9 @@
 # PATCH-FIX-OPENSUSE kio_help-fallback-to-kde4-docs.patch -- allow kio_help to 
see into kde4 documentation, needed especially for khelpcenter5
 Patch0:         kio_help-fallback-to-kde4-docs.patch
 # PATCH-FIX-UPSTREAM
-Patch1:         0001-Fix-KFilePreviewGenerator-LayoutBlocker.patch
+Patch1:         0001-Dont-stat-etc-localtime-between-read-and-write.patch
 # PATCH-FIX-UPSTREAM
-Patch2:         fix-overlap-of-first-item-in-kfileplacesview.patch
+Patch2:         
0001-Fix-bug-382437-Regression-in-kdialog-causes-wrong-file-ext.patch
 BuildRequires:  cmake >= 3.0
 BuildRequires:  extra-cmake-modules >= %{_kf5_bugfix_version}
 BuildRequires:  fdupes
@@ -138,6 +138,10 @@
 %install
   %kf5_makeinstall -C build
   %fdupes %{buildroot}
+rm %{buildroot}%{_kf5_sysconfdir}/dbus-1/system.d/org.kde.kio.file.conf
+rm %{buildroot}%{_kf5_libdir}/libexec/kauth/file_helper
+rm %{buildroot}%{_kf5_sharedir}/dbus-1/system-services/org.kde.kio.file.service
+rm %{buildroot}%{_kf5_sharedir}/polkit-1/actions/org.kde.kio.file.policy
 
 %if %{with lang}
 %find_lang %{name} --with-man --all-name

++++++ 0001-Dont-stat-etc-localtime-between-read-and-write.patch ++++++
>From 8d73867b3d4339ec026f92c4c2e89c265249aeb2 Mon Sep 17 00:00:00 2001
From: Jaime Torres <[email protected]>
Date: Wed, 7 Feb 2018 19:02:16 +0100
Subject: Don't stat(/etc/localtime) between read() and write() copying files

Summary:
CCBUG: 384561

Unfortunately, QDateTime::currentDateTime() checks /etc/localtime
each time it is called.
Chaning to QElapsedTime, no check of /etc/localtime.
Reproducing bug 384561, the strace of file.so was something like:
read(), stat(/etc/localtime), stat(/etc/localtime),
stat(/etc/localtime), stat(/etc/localtime), stat(/etc/localtime),
write(), read() ......
Now it is: read(), write()
It also reduces the cpu in io/wait around 10% in a debug build.

Test Plan:
kio tests work as before
desktop: works in dolphin

Reviewers: #frameworks, fvogt, dfaure

Reviewed By: dfaure

Subscribers: fvogt, ngraham

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D9983
---
 src/core/slavebase.cpp | 27 ++++++++++++++-------------
 1 file changed, 14 insertions(+), 13 deletions(-)

diff --git a/src/core/slavebase.cpp b/src/core/slavebase.cpp
index 4f8a5da..5e8effb 100644
--- a/src/core/slavebase.cpp
+++ b/src/core/slavebase.cpp
@@ -80,7 +80,7 @@ class SlaveBasePrivate
 {
 public:
     SlaveBase *q;
-    SlaveBasePrivate(SlaveBase *owner): q(owner), m_passwdServerClient(nullptr)
+    SlaveBasePrivate(SlaveBase *owner): q(owner), nextTimeoutMsecs(0), 
m_passwdServerClient(nullptr)
     {
         if (!qEnvironmentVariableIsEmpty("KIOSLAVE_ENABLE_TESTMODE")) {
             QStandardPaths::enableTestMode(true);
@@ -110,8 +110,9 @@ public:
     KConfigGroup *configGroup;
     QUrl onHoldUrl;
 
-    QDateTime lastTimeout;
-    QDateTime nextTimeout;
+    QElapsedTimer lastTimeout;
+    QElapsedTimer nextTimeout;
+    qint64 nextTimeoutMsecs;
     KIO::filesize_t totalSize;
     KRemoteEncoding *remotefile;
     enum { Idle, InsideMethod, FinishedCalled, ErrorCalled } m_state;
@@ -273,9 +274,9 @@ SlaveBase::~SlaveBase()
 void SlaveBase::dispatchLoop()
 {
     while (!d->exit_loop) {
-        if (d->nextTimeout.isValid() && (d->nextTimeout < 
QDateTime::currentDateTime())) {
+        if (d->nextTimeout.isValid() && 
(d->nextTimeout.hasExpired(d->nextTimeoutMsecs))) {
             QByteArray data = d->timeoutData;
-            d->nextTimeout = QDateTime();
+            d->nextTimeout.invalidate();
             d->timeoutData = QByteArray();
             special(data);
         }
@@ -284,7 +285,7 @@ void SlaveBase::dispatchLoop()
 
         int ms = -1;
         if (d->nextTimeout.isValid()) {
-            ms = 
qMax<int>(QDateTime::currentDateTime().msecsTo(d->nextTimeout), 1);
+            ms = qMax<int>(d->nextTimeout.elapsed() - d->nextTimeoutMsecs, 1);
         }
 
         int ret = -1;
@@ -529,13 +530,11 @@ void SlaveBase::processedSize(KIO::filesize_t _bytes)
 {
     bool emitSignal = false;
 
-    QDateTime now = QDateTime::currentDateTime();
-
     if (_bytes == d->totalSize) {
         emitSignal = true;
     } else {
         if (d->lastTimeout.isValid()) {
-            emitSignal = d->lastTimeout.msecsTo(now) >= 100; // emit size 10 
times a second
+            emitSignal = d->lastTimeout.hasExpired(100); // emit size 10 times 
a second
         } else {
             emitSignal = true;
         }
@@ -544,7 +543,7 @@ void SlaveBase::processedSize(KIO::filesize_t _bytes)
     if (emitSignal) {
         KIO_DATA << KIO_FILESIZE_T(_bytes);
         send(INF_PROCESSED_SIZE, data);
-        d->lastTimeout = now;
+        d->lastTimeout.start();
     }
 
     //    d->processed_size = _bytes;
@@ -1046,11 +1045,13 @@ int SlaveBase::readData(QByteArray &buffer)
 void SlaveBase::setTimeoutSpecialCommand(int timeout, const QByteArray &data)
 {
     if (timeout > 0) {
-        d->nextTimeout = QDateTime::currentDateTime().addSecs(timeout);
+        d->nextTimeoutMsecs = timeout*1000; // from seconds to miliseconds
+        d->nextTimeout.start();
     } else if (timeout == 0) {
-        d->nextTimeout = QDateTime::currentDateTime().addSecs(1);    // 
Immediate timeout
+        d->nextTimeoutMsecs = 1000;  // Immediate timeout
+        d->nextTimeout.start();
     } else {
-        d->nextTimeout = QDateTime();    // Canceled
+        d->nextTimeout.invalidate();  // Canceled
     }
 
     d->timeoutData = data;
-- 
cgit v0.11.2

++++++ 0001-Fix-bug-382437-Regression-in-kdialog-causes-wrong-file-ext.patch 
++++++
>From 0f8c2d7922ca130971ac3a83ed86d8e552171389 Mon Sep 17 00:00:00 2001
From: Igor Janssen <[email protected]>
Date: Sat, 10 Feb 2018 09:48:52 -0700
Subject: Fix bug #382437 "Regression in kdialog causes wrong file extension"

Summary:
BUG: 382437
One cause of the bug is commit at plasma-integration:
0dafb9403266d6064074250d44b74dc0db946cfb
//Make sure we always set a default mime filter in save mode
KFileWidget::setMimeFilter() documentation says a default mime filter
should be set if the dialog is being open in save mode.
Without a default filter, the dialog uses a custom item (created by
concatenating all the mime type filters) as default. This is not useful
because it means an additional click for the user to select a filter that can
actually be useful.
If the initiallySelectedMimeTypeFilter() is empty, we use the first mime
filter as fallback.//

Chrome opens kdialog with 2 mime types: application/octet-stream (means any 
file) and (for example) image/jpeg. But application/octet-stream is associated 
with *.bin extension. When you choose this mime extention becomes *.bin. That 
commit does this mime default (it's first).
This patch blocks changing extention to bin for "application/octet-stream" 
selected.

Test Plan: Tested with Google  Chrome. Used Open/Save dialogs for files.

Reviewers: #plasma, dfaure

Reviewed By: dfaure

Subscribers: ngraham, aacid, broulik, plasma-devel, #frameworks

Tags: #frameworks, #plasma

Differential Revision: https://phabricator.kde.org/D10114
---
 src/filewidgets/kfilewidget.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/filewidgets/kfilewidget.cpp b/src/filewidgets/kfilewidget.cpp
index aeb8dea..39c09b8 100644
--- a/src/filewidgets/kfilewidget.cpp
+++ b/src/filewidgets/kfilewidget.cpp
@@ -2258,7 +2258,8 @@ void KFileWidgetPrivate::updateAutoSelectExtension()
                 }
             }
 
-            if (!currentExtension.isEmpty() && 
extensionList.contains(QLatin1String("*.") + currentExtension)) {
+            if ((!currentExtension.isEmpty() && 
extensionList.contains(QLatin1String("*.") + currentExtension))
+                    || filter == QStringLiteral("application/octet-stream")) {
                 extension = QLatin1Char('.') + currentExtension;
             } else {
                 extension = defaultExtension;
-- 
cgit v0.11.2

++++++ kio-5.42.0.tar.xz -> kio-5.43.0.tar.xz ++++++
++++ 92348 lines of diff (skipped)


Reply via email to