Hello community,

here is the log from the commit of package ark for openSUSE:Factory checked in 
at 2016-10-06 12:27:15
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ark (Old)
 and      /work/SRC/openSUSE:Factory/.ark.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ark"

Changes:
--------
--- /work/SRC/openSUSE:Factory/ark/ark.changes  2016-09-25 14:27:41.000000000 
+0200
+++ /work/SRC/openSUSE:Factory/.ark.new/ark.changes     2016-10-06 
12:27:16.000000000 +0200
@@ -1,0 +2,20 @@
+Sat Oct  1 18:44:04 UTC 2016 - [email protected]
+
+- Replace mimeinfo17.patch by patches until git master:
+  * 0001-SVN_SILENT-made-messages-after-extraction.patch
+  * 0002-Add-support-for-application-vnd.rar-fixes-opening-RA.patch
+  * 0003-Stop-crashing-when-dropping-on-empty-ArchiveView.patch
+  * 0004-Show-extraction-dialog-only-after-archive-has-been-l.patch
+  * 0005-SVN_SILENT-made-messages-after-extraction.patch
+  * 0006-Accept-drop-events-when-creating-a-new-archive.patch
+  * 0007-SVN_SILENT-made-messages-after-extraction.patch
+  * 0008-Fix-potential-crash-when-aborting-a-ListJob.patch
+  * 0009-Improve-focus-handling-of-internal-previewer.patch
+  * 0010-SVN_SILENT-made-messages-.desktop-file-always-resolv.patch
+  * 0011-Fix-drag-and-drop-with-RPM-archives.patch
+  * 0012-Add-test-cases-for-RPM-and-AppImage.patch
+  * 0013-Fix-drag-and-drop-extraction-of-entries-from-certain.patch
+  * 0014-Fix-drag-and-drop-extraction-of-parentless-files.patch
+- kde#369535, kde#369390, kde#369401, kde#369283, kde#368807, kde#368786, 
kde#367549
+
+-------------------------------------------------------------------

Old:
----
  mimeinfo17.patch

New:
----
  0001-SVN_SILENT-made-messages-after-extraction.patch
  0002-Add-support-for-application-vnd.rar-fixes-opening-RA.patch
  0003-Stop-crashing-when-dropping-on-empty-ArchiveView.patch
  0004-Show-extraction-dialog-only-after-archive-has-been-l.patch
  0005-SVN_SILENT-made-messages-after-extraction.patch
  0006-Accept-drop-events-when-creating-a-new-archive.patch
  0007-SVN_SILENT-made-messages-after-extraction.patch
  0008-Fix-potential-crash-when-aborting-a-ListJob.patch
  0009-Improve-focus-handling-of-internal-previewer.patch
  0010-SVN_SILENT-made-messages-.desktop-file-always-resolv.patch
  0011-Fix-drag-and-drop-with-RPM-archives.patch
  0012-Add-test-cases-for-RPM-and-AppImage.patch
  0013-Fix-drag-and-drop-extraction-of-entries-from-certain.patch
  0014-Fix-drag-and-drop-extraction-of-parentless-files.patch

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

Other differences:
------------------
++++++ ark.spec ++++++
--- /var/tmp/diff_new_pack.MsHLd4/_old  2016-10-06 12:27:18.000000000 +0200
+++ /var/tmp/diff_new_pack.MsHLd4/_new  2016-10-06 12:27:18.000000000 +0200
@@ -24,8 +24,22 @@
 Group:          Productivity/Other
 Url:            http://www.kde.org
 Source0:        ark-%{version}.tar.xz
-# PATCH-FIX-UPSTREAM mimeinfo17.patch Add support for application/vnd.rar, 
fixes opening RAR with shared-mime-info 1.7 kde#368786
-Patch1:         mimeinfo17.patch
+# PATCH-FIX-UPSTREAM Apply all patches until 593568d (binary diffs stripped)
+# (kde#369535, kde#369390, kde#369401, kde#369283, kde#368807, kde#368786)
+Patch1:         0001-SVN_SILENT-made-messages-after-extraction.patch
+Patch2:         0002-Add-support-for-application-vnd.rar-fixes-opening-RA.patch
+Patch3:         0003-Stop-crashing-when-dropping-on-empty-ArchiveView.patch
+Patch4:         0004-Show-extraction-dialog-only-after-archive-has-been-l.patch
+Patch5:         0005-SVN_SILENT-made-messages-after-extraction.patch
+Patch6:         0006-Accept-drop-events-when-creating-a-new-archive.patch
+Patch7:         0007-SVN_SILENT-made-messages-after-extraction.patch
+Patch8:         0008-Fix-potential-crash-when-aborting-a-ListJob.patch
+Patch9:         0009-Improve-focus-handling-of-internal-previewer.patch
+Patch10:        0010-SVN_SILENT-made-messages-.desktop-file-always-resolv.patch
+Patch11:        0011-Fix-drag-and-drop-with-RPM-archives.patch
+Patch12:        0012-Add-test-cases-for-RPM-and-AppImage.patch
+Patch13:        0013-Fix-drag-and-drop-extraction-of-entries-from-certain.patch
+Patch14:        0014-Fix-drag-and-drop-extraction-of-parentless-files.patch
 BuildRequires:  extra-cmake-modules >= 1.7.0
 BuildRequires:  karchive-devel >= 5.2.0
 BuildRequires:  kconfig-devel >= 5.2.0
@@ -63,6 +77,19 @@
 %prep
 %setup -q
 %patch1 -p1
+%patch2 -p1
+%patch3 -p1
+%patch4 -p1
+%patch5 -p1
+%patch6 -p1
+%patch7 -p1
+%patch8 -p1
+%patch9 -p1
+%patch10 -p1
+%patch11 -p1
+%patch12 -p1
+%patch13 -p1
+%patch14 -p1
 
 %build
   %cmake_kf5 -d build

++++++ 0001-SVN_SILENT-made-messages-after-extraction.patch ++++++
>From 7dbd6e9dd07cf6e1984c6bca29f9107a71933009 Mon Sep 17 00:00:00 2001
From: l10n daemon script <[email protected]>
Date: Tue, 13 Sep 2016 11:40:38 +0000
Subject: [PATCH 01/13] SVN_SILENT made messages (after extraction)

---
 kerfuffle/mime/kerfuffle.xml | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/kerfuffle/mime/kerfuffle.xml b/kerfuffle/mime/kerfuffle.xml
index 682d0d5..6c8cbdf 100644
--- a/kerfuffle/mime/kerfuffle.xml
+++ b/kerfuffle/mime/kerfuffle.xml
@@ -11,6 +11,7 @@
       <comment xml:lang="nl">Tar-archief (lzip-gecomprimeerd)</comment>
       <comment xml:lang="pl">Archiwum Tar (kompresja lzip)</comment>
       <comment xml:lang="pt">Pacote TAR (comprimido com Lzip)</comment>
+      <comment xml:lang="pt_BR">Arquivo tar (compressão lzip)</comment>
       <comment xml:lang="sk">Tar archív (lzip komprimovaný)</comment>
       <comment xml:lang="sl">Arhiv tar (stisnjen z lzip)</comment>
       <comment xml:lang="sr">тар архива (ЛЗИП‑компресована)</comment>
@@ -32,6 +33,7 @@
       <comment xml:lang="nl">XAR-archief</comment>
       <comment xml:lang="pl">Archiwum XAR</comment>
       <comment xml:lang="pt">Pacote XAR</comment>
+      <comment xml:lang="pt_BR">Arquivo XAR</comment>
       <comment xml:lang="sk">XAR archív</comment>
       <comment xml:lang="sl">Arhiv XAR</comment>
       <comment xml:lang="sr">КСАР архива</comment>
@@ -57,6 +59,7 @@
       <comment xml:lang="nl">Tar-archief (lz4-gecomprimeerd)</comment>
       <comment xml:lang="pl">Archiwum Tar (kompresja LZ4)</comment>
       <comment xml:lang="pt">Pacote TAR (comprimido com LZ4)</comment>
+      <comment xml:lang="pt_BR">Arquivo tar (compressão LZ4)</comment>
       <comment xml:lang="sk">Tar archív (LZ4 komprimovaný)</comment>
       <comment xml:lang="sl">Arhiv tar (stisnjen z LZ4)</comment>
       <comment xml:lang="sr">тар архива (ЛЗ4‑компресована)</comment>
-- 
2.10.0

++++++ 0002-Add-support-for-application-vnd.rar-fixes-opening-RA.patch ++++++
>From 9a9a851049cd904f08c9594cc6aacf696886404e Mon Sep 17 00:00:00 2001
From: Elvis Angelaccio <[email protected]>
Date: Wed, 14 Sep 2016 12:09:49 +0200
Subject: [PATCH 02/13] Add support for application/vnd.rar, fixes opening RAR
 with shared-mime-info 1.7

shared-mime-info 1.7 introduced the official IANA mimetype
`application/vnd.rar` and degraded `application/x-rar` to alias.

For now we need to register both mimetypes. Once distributions start
shipping shared-mime-info 1.7, we can drop the alias.

For this reason, we cannot have a reliable test case in mimetypetest.
Also, in `PluginLoader::sortByComment()` we need to check whether
mimetypes are valid, because `application/vnd.rar` might not be in
`QMimeDatabase()`.

BUG: 368786
FIXED-IN: 16.08.2

Closes T3729
---
 autotests/kerfuffle/adddialogtest.cpp            | 4 ++--
 autotests/kerfuffle/addtoarchivetest.cpp         | 2 +-
 autotests/kerfuffle/createdialogtest.cpp         | 8 ++++----
 kerfuffle/pluginmanager.cpp                      | 4 +++-
 plugins/clirarplugin/CMakeLists.txt              | 9 +++++++--
 plugins/clirarplugin/kerfuffle_clirar.json.cmake | 9 +++++++++
 plugins/cliunarchiverplugin/CMakeLists.txt       | 9 +++++++--
 7 files changed, 33 insertions(+), 12 deletions(-)

diff --git a/autotests/kerfuffle/adddialogtest.cpp 
b/autotests/kerfuffle/adddialogtest.cpp
index 8b32702..d1b7b4c 100644
--- a/autotests/kerfuffle/adddialogtest.cpp
+++ b/autotests/kerfuffle/adddialogtest.cpp
@@ -79,8 +79,8 @@ void AddDialogTest::testBasicWidgets_data()
         qDebug() << "7z format not available, skipping test.";
     }
 
-    if (writeMimeTypes.contains(QStringLiteral("application/x-rar"))) {
-        QTest::newRow("rar") << QStringLiteral("application/x-rar") << true << 
2 << 5;
+    if (writeMimeTypes.contains(QStringLiteral("application/vnd.rar"))) {
+        QTest::newRow("rar") << QStringLiteral("application/vnd.rar") << true 
<< 2 << 5;
     } else {
         qDebug() << "rar format not available, skipping test.";
     }
diff --git a/autotests/kerfuffle/addtoarchivetest.cpp 
b/autotests/kerfuffle/addtoarchivetest.cpp
index 0613d6e..25af951 100644
--- a/autotests/kerfuffle/addtoarchivetest.cpp
+++ b/autotests/kerfuffle/addtoarchivetest.cpp
@@ -153,7 +153,7 @@ void AddToArchiveTest::testCompressHere_data()
         qDebug() << "7z/zip executable not found in path. Skipping 
compress-here-(ZIP) tests.";
     }
 
-    if 
(!PluginManager().preferredWritePluginsFor(QMimeDatabase().mimeTypeForName(QStringLiteral("application/x-rar"))).isEmpty())
 {
+    if 
(!PluginManager().preferredWritePluginsFor(QMimeDatabase().mimeTypeForName(QStringLiteral("application/vnd.rar"))).isEmpty())
 {
         QTest::newRow("compress here (as RAR) - dir with files")
             << QStringLiteral("rar")
             << QStringList {QFINDTESTDATA("data/testdir")}
diff --git a/autotests/kerfuffle/createdialogtest.cpp 
b/autotests/kerfuffle/createdialogtest.cpp
index c237d4d..c17cd7e 100644
--- a/autotests/kerfuffle/createdialogtest.cpp
+++ b/autotests/kerfuffle/createdialogtest.cpp
@@ -78,8 +78,8 @@ void CreateDialogTest::testBasicWidgets_data()
         qDebug() << "7z format not available in CreateDialog, skipping test.";
     }
 
-    if (writeMimeTypes.contains(QStringLiteral("application/x-rar"))) {
-        QTest::newRow("rar") << QStringLiteral("application/x-rar");
+    if (writeMimeTypes.contains(QStringLiteral("application/vnd.rar"))) {
+        QTest::newRow("rar") << QStringLiteral("application/vnd.rar");
     } else {
         qDebug() << "rar format not available in CreateDialog, skipping test.";
     }
@@ -133,8 +133,8 @@ void CreateDialogTest::testEncryption_data()
         qDebug() << "7z format not available in CreateDialog, skipping test.";
     }
 
-    if 
(m_pluginManager.supportedWriteMimeTypes().contains(QStringLiteral("application/x-rar")))
 {
-        QTest::newRow("rar") << QStringLiteral("application/x-rar") << true << 
true;
+    if 
(m_pluginManager.supportedWriteMimeTypes().contains(QStringLiteral("application/vnd.rar")))
 {
+        QTest::newRow("rar") << QStringLiteral("application/vnd.rar") << true 
<< true;
     } else {
         qDebug() << "rar format not available in CreateDialog, skipping test.";
     }
diff --git a/kerfuffle/pluginmanager.cpp b/kerfuffle/pluginmanager.cpp
index 9e6cde4..5cca2ab 100644
--- a/kerfuffle/pluginmanager.cpp
+++ b/kerfuffle/pluginmanager.cpp
@@ -199,7 +199,9 @@ QStringList PluginManager::sortByComment(const 
QSet<QString> &mimeTypes)
     // Initialize the QMap to sort by comment.
     foreach (const QString &mimeType, mimeTypes) {
         QMimeType mime(QMimeDatabase().mimeTypeForName(mimeType));
-        map[mime.comment().toLower()] = mime.name();
+        if (mime.isValid()) {
+            map[mime.comment().toLower()] = mime.name();
+        }
     }
 
     // Convert to sorted QStringList.
diff --git a/plugins/clirarplugin/CMakeLists.txt 
b/plugins/clirarplugin/CMakeLists.txt
index 4bad5a5..50f2bce 100644
--- a/plugins/clirarplugin/CMakeLists.txt
+++ b/plugins/clirarplugin/CMakeLists.txt
@@ -1,6 +1,7 @@
 ########### next target ###############
 
-set(SUPPORTED_CLIRAR_MIMETYPES "application/x-rar;")
+# TODO: drop application/x-rar alias once distributions ship shared-mime-info 
1.7
+set(SUPPORTED_CLIRAR_MIMETYPES "application/vnd.rar;application/x-rar;")
 
 set(kerfuffle_clirar_SRCS cliplugin.cpp)
 
@@ -9,7 +10,11 @@ ecm_qt_declare_logging_category(kerfuffle_clirar_SRCS
                                 IDENTIFIER ARK
                                 CATEGORY_NAME ark.clirar)
 
-set(SUPPORTED_MIMETYPES "application/x-rar")
+# NOTE: the first double-quotes of the first mime and the last
+# double-quotes of the last mime must NOT be escaped.
+set(SUPPORTED_MIMETYPES
+    "application/vnd.rar\",
+    \"application/x-rar")
 
 configure_file(
     ${CMAKE_CURRENT_SOURCE_DIR}/kerfuffle_clirar.json.cmake
diff --git a/plugins/clirarplugin/kerfuffle_clirar.json.cmake 
b/plugins/clirarplugin/kerfuffle_clirar.json.cmake
index 96c993d..a722840 100644
--- a/plugins/clirarplugin/kerfuffle_clirar.json.cmake
+++ b/plugins/clirarplugin/kerfuffle_clirar.json.cmake
@@ -45,6 +45,15 @@
         "rar"
     ],
     "X-KDE-Priority": 120,
+    "application/vnd.rar": {
+        "CompressionLevelDefault": 3,
+        "CompressionLevelMax": 5,
+        "CompressionLevelMin": 0,
+        "SupportsWriteComment": true,
+        "SupportsTesting": true,
+        "HeaderEncryption": true,
+        "SupportsMultiVolume": true
+    },
     "application/x-rar": {
         "CompressionLevelDefault": 3,
         "CompressionLevelMax": 5,
diff --git a/plugins/cliunarchiverplugin/CMakeLists.txt 
b/plugins/cliunarchiverplugin/CMakeLists.txt
index 4ee1f6a..b38fcd8 100644
--- a/plugins/cliunarchiverplugin/CMakeLists.txt
+++ b/plugins/cliunarchiverplugin/CMakeLists.txt
@@ -1,6 +1,7 @@
 ########### next target ###############
 
-set(SUPPORTED_CLIUNARCHIVER_MIMETYPES "application/x-rar;")
+# TODO: drop application/x-rar alias once distributions ship shared-mime-info 
1.7
+set(SUPPORTED_CLIUNARCHIVER_MIMETYPES "application/vnd.rar;application/x-rar;")
 
 set(kerfuffle_cliunarchiver_SRCS cliplugin.cpp)
 
@@ -9,7 +10,11 @@ ecm_qt_declare_logging_category(kerfuffle_cliunarchiver_SRCS
                                 IDENTIFIER ARK
                                 CATEGORY_NAME ark.cliunarchiver)
 
-set(SUPPORTED_MIMETYPES "application/x-rar")
+# NOTE: the first double-quotes of the first mime and the last
+# double-quotes of the last mime must NOT be escaped.
+set(SUPPORTED_MIMETYPES
+    "application/vnd.rar\",
+    \"application/x-rar")
 
 configure_file(
     ${CMAKE_CURRENT_SOURCE_DIR}/kerfuffle_cliunarchiver.json.cmake
-- 
2.10.0

++++++ 0003-Stop-crashing-when-dropping-on-empty-ArchiveView.patch ++++++
>From 1f0753660f13ad7e2a2b51aa34b7580118bcbd33 Mon Sep 17 00:00:00 2001
From: Elvis Angelaccio <[email protected]>
Date: Thu, 15 Sep 2016 16:13:34 +0200
Subject: [PATCH 03/13] Stop crashing when dropping on empty ArchiveView

ArchiveView was accepting drops events unconditionally, overriding the
MainWindow's ones. This resulted in a crash when the ArchiveView was
empty. Now we initially disable drop events, so that we can actually
open an archive by dropping it to any position in the Ark window.

BUG: 368807
FIXED-IN: 16.08.2
---
 part/archiveview.cpp | 13 ++++---------
 part/archiveview.h   |  2 --
 part/part.cpp        |  5 +++--
 3 files changed, 7 insertions(+), 13 deletions(-)

diff --git a/part/archiveview.cpp b/part/archiveview.cpp
index 7a31a86..1d678d3 100644
--- a/part/archiveview.cpp
+++ b/part/archiveview.cpp
@@ -33,23 +33,18 @@
 ArchiveView::ArchiveView(QWidget *parent)
     : QTreeView(parent)
 {
-}
-
-void ArchiveView::setModel(QAbstractItemModel *model)
-{
-    QTreeView::setModel(model);
     setSelectionMode(QAbstractItemView::ExtendedSelection);
     setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
     setAlternatingRowColors(true);
     setAnimated(true);
     setAllColumnsShowFocus(true);
     setSortingEnabled(true);
-
-    //drag and drop
     setDragEnabled(true);
-    setAcceptDrops(true);
     setDropIndicatorShown(true);
-    setDragDropMode(QAbstractItemView::DragDrop);
+    // #368807: drops must be initially disabled, otherwise they will override 
the MainWindow's ones.
+    // They will be enabled in Part::slotLoadingFinished().
+    setAcceptDrops(false);
+    setDragDropMode(QAbstractItemView::NoDragDrop);
 }
 
 void ArchiveView::startDrag(Qt::DropActions supportedActions)
diff --git a/part/archiveview.h b/part/archiveview.h
index 1f0a63a..27a4f7d 100644
--- a/part/archiveview.h
+++ b/part/archiveview.h
@@ -34,8 +34,6 @@ public:
     virtual void dropEvent(class QDropEvent * event) Q_DECL_OVERRIDE;
     virtual void dragMoveEvent(class QDragMoveEvent * event) Q_DECL_OVERRIDE;
     virtual void startDrag(Qt::DropActions supportedActions) Q_DECL_OVERRIDE;
-
-    void setModel(QAbstractItemModel *model) Q_DECL_OVERRIDE;
 };
 
 #endif /* ARCHIVEVIEW_H */
diff --git a/part/part.cpp b/part/part.cpp
index 14054e6..ed6094b 100644
--- a/part/part.cpp
+++ b/part/part.cpp
@@ -287,8 +287,6 @@ void Part::setupView()
 
     m_view->setModel(m_model);
 
-    m_view->setSortingEnabled(true);
-
     connect(m_view->selectionModel(), &QItemSelectionModel::selectionChanged,
             this, &Part::updateActions);
     connect(m_view->selectionModel(), &QItemSelectionModel::selectionChanged,
@@ -810,6 +808,9 @@ void Part::slotLoadingFinished(KJob *job)
 
     // After loading all files, resize the columns to fit all fields
     m_view->header()->resizeSections(QHeaderView::ResizeToContents);
+    // Now we can start accepting drops in the archive view.
+    m_view->setAcceptDrops(true);
+    m_view->setDragDropMode(QAbstractItemView::DragDrop);
 
     updateActions();
 
-- 
2.10.0

++++++ 0004-Show-extraction-dialog-only-after-archive-has-been-l.patch ++++++
>From 1b41f96eb77004022336c0d6fa0f0330d50067a4 Mon Sep 17 00:00:00 2001
From: Elvis Angelaccio <[email protected]>
Date: Sat, 17 Sep 2016 14:48:16 +0200
Subject: [PATCH 04/13] Show extraction dialog only after archive has been
 loaded

Otherwise the dialog is open when the archive instance is still not
valid and displays a broken subfolder name.

Tested with a huge archive, e.g. `ark linux.tar.xz --dialog`
---
 part/part.cpp | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/part/part.cpp b/part/part.cpp
index ed6094b..bc08b6a 100644
--- a/part/part.cpp
+++ b/part/part.cpp
@@ -678,10 +678,6 @@ bool Part::openFile()
 
     m_infoPanel->setIndex(QModelIndex());
 
-    if (arguments().metaData()[QStringLiteral("showExtractDialog")] == 
QLatin1String("true")) {
-        QTimer::singleShot(0, this, &Part::slotShowExtractionDialog);
-    }
-
     const QString password = 
arguments().metaData()[QStringLiteral("encryptionPassword")];
     if (!password.isEmpty()) {
         m_model->encryptArchive(password,
@@ -836,6 +832,10 @@ void Part::slotLoadingFinished(KJob *job)
             displayMsgWidget(KMessageWidget::Warning, xi18nc("@info", "Ark 
does not currently support ISO files with UDF filesystem."));
         }
     }
+
+    if (arguments().metaData()[QStringLiteral("showExtractDialog")] == 
QLatin1String("true")) {
+        QTimer::singleShot(0, this, &Part::slotShowExtractionDialog);
+    }
 }
 
 void Part::setReadyGui()
-- 
2.10.0

++++++ 0005-SVN_SILENT-made-messages-after-extraction.patch ++++++
>From 6e9bd80efcb5ab3a03c0a064fc95804e98b378af Mon Sep 17 00:00:00 2001
From: l10n daemon script <[email protected]>
Date: Mon, 19 Sep 2016 10:26:16 +0000
Subject: [PATCH 05/13] SVN_SILENT made messages (after extraction)

---
 kerfuffle/mime/kerfuffle.xml | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/kerfuffle/mime/kerfuffle.xml b/kerfuffle/mime/kerfuffle.xml
index 6c8cbdf..756dc34 100644
--- a/kerfuffle/mime/kerfuffle.xml
+++ b/kerfuffle/mime/kerfuffle.xml
@@ -5,6 +5,7 @@
       <comment xml:lang="ca">Arxiu tar (comprimit amb LZIP)</comment>
       <comment xml:lang="ca@valencia">Arxiu tar (comprimit amb LZIP)</comment>
       <comment xml:lang="cs">Archiv Tar (komprimovaný lzip)</comment>
+      <comment xml:lang="de">Tar-Archiv (lzip-komprimiert)</comment>
       <comment xml:lang="en_GB">Tar archive (lzip-compressed)</comment>
       <comment xml:lang="es">Archivo comprimido Tar (comprimido con 
lzip)</comment>
       <comment xml:lang="et">Tar-arhiiv (lzip-tihendusega)</comment>
@@ -27,6 +28,7 @@
       <comment xml:lang="ca">Arxiu XAR</comment>
       <comment xml:lang="ca@valencia">Arxiu XAR</comment>
       <comment xml:lang="cs">Archiv XAR</comment>
+      <comment xml:lang="de">XAR-Archiv</comment>
       <comment xml:lang="en_GB">XAR archive</comment>
       <comment xml:lang="es">Archivo comprimido XAR</comment>
       <comment xml:lang="et">XAR-arhiiv</comment>
@@ -53,6 +55,7 @@
       <comment xml:lang="ca">Arxiu tar (comprimit amb LZ4)</comment>
       <comment xml:lang="ca@valencia">Arxiu tar (comprimit amb LZ4)</comment>
       <comment xml:lang="cs">Archiv Tar (komprimovaný LZ4)</comment>
+      <comment xml:lang="de">Tar-Archiv (LZ4-komprimiert)</comment>
       <comment xml:lang="en_GB">Tar archive (LZ4-compressed)</comment>
       <comment xml:lang="es">Archivo comprimido Tar (comprimido con 
LZ4)</comment>
       <comment xml:lang="et">Tar-arhiiv (LZ4 tihendusega)</comment>
-- 
2.10.0

++++++ 0006-Accept-drop-events-when-creating-a-new-archive.patch ++++++
>From e90f49e0b66ee1ae4cc421ecfc4ba36c7581c2c3 Mon Sep 17 00:00:00 2001
From: Elvis Angelaccio <[email protected]>
Date: Mon, 19 Sep 2016 13:36:14 +0200
Subject: [PATCH 06/13] Accept drop events when creating a new archive

This fixes a small regression introduced by 1f0753660f.
---
 part/archiveview.cpp | 8 ++++++--
 part/archiveview.h   | 5 +++++
 part/part.cpp        | 4 ++--
 part/part.h          | 3 ++-
 4 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/part/archiveview.cpp b/part/archiveview.cpp
index 1d678d3..762b7ad 100644
--- a/part/archiveview.cpp
+++ b/part/archiveview.cpp
@@ -43,8 +43,7 @@ ArchiveView::ArchiveView(QWidget *parent)
     setDropIndicatorShown(true);
     // #368807: drops must be initially disabled, otherwise they will override 
the MainWindow's ones.
     // They will be enabled in Part::slotLoadingFinished().
-    setAcceptDrops(false);
-    setDragDropMode(QAbstractItemView::NoDragDrop);
+    setDropsEnabled(false);
 }
 
 void ArchiveView::startDrag(Qt::DropActions supportedActions)
@@ -58,6 +57,11 @@ void ArchiveView::startDrag(Qt::DropActions supportedActions)
     QTreeView::startDrag(supportedActions);
 }
 
+void ArchiveView::setDropsEnabled(bool enabled)
+{
+    setAcceptDrops(enabled);
+    setDragDropMode(enabled ? QAbstractItemView::DragDrop : 
QAbstractItemView::NoDragDrop);
+}
 
 void ArchiveView::dragEnterEvent(QDragEnterEvent * event)
 {
diff --git a/part/archiveview.h b/part/archiveview.h
index 27a4f7d..c0253db 100644
--- a/part/archiveview.h
+++ b/part/archiveview.h
@@ -34,6 +34,11 @@ public:
     virtual void dropEvent(class QDropEvent * event) Q_DECL_OVERRIDE;
     virtual void dragMoveEvent(class QDragMoveEvent * event) Q_DECL_OVERRIDE;
     virtual void startDrag(Qt::DropActions supportedActions) Q_DECL_OVERRIDE;
+
+    /**
+     * Set whether the view should accept drop events.
+     */
+    void setDropsEnabled(bool enabled);
 };
 
 #endif /* ARCHIVEVIEW_H */
diff --git a/part/part.cpp b/part/part.cpp
index bc08b6a..0bb2bcb 100644
--- a/part/part.cpp
+++ b/part/part.cpp
@@ -674,6 +674,7 @@ bool Part::openFile()
         job->start();
     } else {
         updateActions();
+        m_view->setDropsEnabled(true);
     }
 
     m_infoPanel->setIndex(QModelIndex());
@@ -805,8 +806,7 @@ void Part::slotLoadingFinished(KJob *job)
     // After loading all files, resize the columns to fit all fields
     m_view->header()->resizeSections(QHeaderView::ResizeToContents);
     // Now we can start accepting drops in the archive view.
-    m_view->setAcceptDrops(true);
-    m_view->setDragDropMode(QAbstractItemView::DragDrop);
+    m_view->setDropsEnabled(true);
 
     updateActions();
 
diff --git a/part/part.h b/part/part.h
index 00b5a54..25741c4 100644
--- a/part/part.h
+++ b/part/part.h
@@ -33,6 +33,7 @@
 #include <QModelIndex>
 
 class ArchiveModel;
+class ArchiveView;
 class InfoPanel;
 
 class KAboutData;
@@ -145,7 +146,7 @@ private:
     void registerJob(KJob *job);
 
     ArchiveModel         *m_model;
-    QTreeView            *m_view;
+    ArchiveView          *m_view;
     QAction *m_previewAction;
     QAction *m_openFileAction;
     QAction *m_openFileWithAction;
-- 
2.10.0

++++++ 0007-SVN_SILENT-made-messages-after-extraction.patch ++++++
>From e306625ca8236804c02a2dd18ace0820c0e1a7e3 Mon Sep 17 00:00:00 2001
From: l10n daemon script <[email protected]>
Date: Wed, 21 Sep 2016 10:36:06 +0000
Subject: [PATCH 07/13] SVN_SILENT made messages (after extraction)

---
 kerfuffle/mime/kerfuffle.xml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/kerfuffle/mime/kerfuffle.xml b/kerfuffle/mime/kerfuffle.xml
index 756dc34..b74f9d8 100644
--- a/kerfuffle/mime/kerfuffle.xml
+++ b/kerfuffle/mime/kerfuffle.xml
@@ -77,6 +77,7 @@
       <comment>AppImage application bundle</comment>
       <comment xml:lang="ca">Paquet d'aplicació «AppImage»</comment>
       <comment xml:lang="ca@valencia">Paquet d'aplicació «AppImage»</comment>
+      <comment xml:lang="de">AppImage-Anwendungspaket</comment>
       <comment xml:lang="en_GB">AppImage application bundle</comment>
       <comment xml:lang="es">Paquete de aplicación AppImage</comment>
       <comment xml:lang="et">AppImage rakendusekimp</comment>
-- 
2.10.0

++++++ 0008-Fix-potential-crash-when-aborting-a-ListJob.patch ++++++
>From c866108ceecdffa6e0263294153cad00eb297d69 Mon Sep 17 00:00:00 2001
From: Elvis Angelaccio <[email protected]>
Date: Tue, 27 Sep 2016 11:33:27 +0200
Subject: [PATCH 08/13] Fix potential crash when aborting a ListJob

Libarchive's error() signal is connected to the `Job::onError` slot, but
when we abort a ListJob, the slot might be called when the job instance
has already been deleted. So we now emit this signal only when we are not
aborting the job.

BUG: 369283
FIXED-IN: 16.08.2

Differential Revision: D2852
---
 plugins/libarchive/libarchiveplugin.cpp | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/plugins/libarchive/libarchiveplugin.cpp 
b/plugins/libarchive/libarchiveplugin.cpp
index 934e5a2..db31e12 100644
--- a/plugins/libarchive/libarchiveplugin.cpp
+++ b/plugins/libarchive/libarchiveplugin.cpp
@@ -104,12 +104,13 @@ bool LibarchivePlugin::list()
         m_cachedArchiveEntryCount++;
         archive_read_data_skip(arch_reader.data());
     }
-    m_abortOperation = false;
 
     if (result != ARCHIVE_EOF) {
-        const QString errorString = 
QLatin1String(archive_error_string(arch_reader.data()));
-        // FIXME: what about the other archive_error_string() calls? Do they 
also happen to return empty strings?
-        emit error(errorString.isEmpty() ? i18nc("@info", "Could not read 
until the end of the archive") : errorString);
+        if (!m_abortOperation) {
+            const QString errorString = 
QLatin1String(archive_error_string(arch_reader.data()));
+            // FIXME: what about the other archive_error_string() calls? Do 
they also happen to return empty strings?
+            emit error(errorString.isEmpty() ? i18nc("@info", "Could not read 
until the end of the archive") : errorString);
+        }
         return false;
     }
 
-- 
2.10.0

++++++ 0009-Improve-focus-handling-of-internal-previewer.patch ++++++
>From 0ec7aa626901c9349f2ba8f878f35f7748b125e5 Mon Sep 17 00:00:00 2001
From: Ragnar Thomsen <[email protected]>
Date: Tue, 27 Sep 2016 11:43:50 +0200
Subject: [PATCH 09/13] Improve focus handling of internal previewer

This diff sets the initial focus of the internal previewer to the Part
widget and sets the autodefault property of the Close button to false.
The latter prevents the Enter key from closing the dialog which allows
the Part widget to handle the key press event instead.

BUG: 369390
BUG: 369401
FIXED-IN: 16.08.2
---
 part/arkviewer.cpp | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/part/arkviewer.cpp b/part/arkviewer.cpp
index 7c9c220..5548114 100644
--- a/part/arkviewer.cpp
+++ b/part/arkviewer.cpp
@@ -30,10 +30,11 @@
 #include <KSharedConfig>
 #include <KWindowConfig>
 
-#include <QProgressDialog>
 #include <QDebug>
 #include <QFile>
 #include <QMimeDatabase>
+#include <QProgressDialog>
+#include <QPushButton>
 
 ArkViewer::ArkViewer()
         : QDialog()
@@ -44,6 +45,9 @@ ArkViewer::ArkViewer()
 
     setupUi(this);
 
+    // Bug 369390: This prevents the Enter key from closing the dialog.
+    m_buttonBox->button(QDialogButtonBox::Close)->setAutoDefault(false);
+
     connect(m_buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject);
     connect(this, &ArkViewer::finished, this, &ArkViewer::dialogClosed);
 }
@@ -204,6 +208,7 @@ bool ArkViewer::viewInInternalViewer(const QString& 
fileName, const QMimeType &m
     layout()->replaceWidget(m_partPlaceholder, m_part.data()->widget());
 
     m_part.data()->openUrl(QUrl::fromLocalFile(fileName));
+    m_part.data()->widget()->setFocus();
 
     return true;
 }
-- 
2.10.0

++++++ 0010-SVN_SILENT-made-messages-.desktop-file-always-resolv.patch ++++++
++++ 981 lines (skipped)

++++++ 0011-Fix-drag-and-drop-with-RPM-archives.patch ++++++
>From 94d8567d46b5529e65805ba8d95611bcc53d8aa2 Mon Sep 17 00:00:00 2001
From: Elvis Angelaccio <[email protected]>
Date: Sat, 1 Oct 2016 10:17:49 +0200
Subject: [PATCH 11/13] Fix drag-and-drop with RPM archives

RPM paths start with ./ so removing the rootNode substring starting
from index 0 is wrong.

BUG: 369535
FIXED-IN: 16.08.2

Differential Revision: D2895
---
 autotests/kerfuffle/archivetest.cpp                    |  11 +++++++++++
 .../data/firmware-pine64-20160329-6.1.aarch64.rpm      | Bin 0 -> 197840 bytes
 plugins/libarchive/libarchiveplugin.cpp                |  15 +++++++--------
 3 files changed, 18 insertions(+), 8 deletions(-)
 create mode 100644 
autotests/kerfuffle/data/firmware-pine64-20160329-6.1.aarch64.rpm

Index: ark-16.08.1/autotests/kerfuffle/archivetest.cpp
===================================================================
--- ark-16.08.1.orig/autotests/kerfuffle/archivetest.cpp
+++ ark-16.08.1/autotests/kerfuffle/archivetest.cpp
@@ -557,6 +557,17 @@ void ArchiveTest::testExtraction_data()
             << QVariantList()
             << optionsPreservePaths
             << 3;
+
+    archivePath = 
QFINDTESTDATA("data/firmware-pine64-20160329-6.1.aarch64.rpm");
+    QTest::newRow("#369535: broken drag-and-drop from rpm")
+            << archivePath
+            << QVariantList {
+                   // Remember that RPM paths start with ./
+                   
QVariant::fromValue(fileRootNodePair(QStringLiteral("./boot/sunxi-spl.bin"), 
QStringLiteral("boot/"))),
+                   
QVariant::fromValue(fileRootNodePair(QStringLiteral("./boot/u-boot.img"), 
QStringLiteral("boot/")))
+               }
+            << dragAndDropOptions
+            << 2;
 }
 
 void ArchiveTest::testExtraction()
Index: ark-16.08.1/plugins/libarchive/libarchiveplugin.cpp
===================================================================
--- ark-16.08.1.orig/plugins/libarchive/libarchiveplugin.cpp
+++ ark-16.08.1/plugins/libarchive/libarchiveplugin.cpp
@@ -286,14 +286,13 @@ bool LibarchivePlugin::copyFiles(const Q
                 entryFI = QFileInfo(fileWithoutPath);
 
             // OR, if the file has a rootNode attached, remove it from file 
path.
-            } else if (!extractAll && removeRootNode && entryName != 
fileBeingRenamed &&
-                       
!files.at(index).value<fileRootNodePair>().rootNode.isEmpty()) {
-
-                //qCDebug(ARK) << "Removing" << 
files.at(index).value<fileRootNodePair>().rootNode << "from" << entryName;
-
-                const QString truncatedFilename(entryName.remove(0, 
files.at(index).value<fileRootNodePair>().rootNode.size()));
-                archive_entry_copy_pathname(entry, 
QFile::encodeName(truncatedFilename).constData());
-                entryFI = QFileInfo(truncatedFilename);
+            } else if (!extractAll && removeRootNode && entryName != 
fileBeingRenamed) {
+                const QString rootNode = 
files.at(index).value<fileRootNodePair>().rootNode;
+                if (!rootNode.isEmpty()) {
+                    const QString truncatedFilename = 
entryName.remove(entryName.indexOf(rootNode), rootNode.size());
+                    archive_entry_copy_pathname(entry, 
QFile::encodeName(truncatedFilename).constData());
+                    entryFI = QFileInfo(truncatedFilename);
+                }
             }
 
             // Check if the file about to be written already exists.
++++++ 0012-Add-test-cases-for-RPM-and-AppImage.patch ++++++
>From 868bc931ae33efc261eddfccc5960897be93eca6 Mon Sep 17 00:00:00 2001
From: Ragnar Thomsen <[email protected]>
Date: Sat, 1 Oct 2016 15:27:50 +0200
Subject: [PATCH 12/13] Add test cases for RPM and AppImage

Test cases were added for testing extraction of selected entries.
---
 autotests/kerfuffle/archivetest.cpp | 20 +++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)

diff --git a/autotests/kerfuffle/archivetest.cpp 
b/autotests/kerfuffle/archivetest.cpp
index 5b5e553..77da145 100644
--- a/autotests/kerfuffle/archivetest.cpp
+++ b/autotests/kerfuffle/archivetest.cpp
@@ -537,13 +537,22 @@ void ArchiveTest::testExtraction_data()
             << optionsPreservePaths
             << 6;
 
-    archivePath = QFINDTESTDATA("data/hello-2.8-x86_64.AppImage");
+    archivePath = QFINDTESTDATA("data/hello-1.0-x86_64.AppImage");
     QTest::newRow("extract all entries from an AppImage with path")
             << archivePath
             << QVariantList()
             << optionsPreservePaths
             << 7;
 
+    archivePath = QFINDTESTDATA("data/hello-1.0-x86_64.AppImage");
+    QTest::newRow("extract selected entries from an AppImage with path")
+            << archivePath
+            << QVariantList {
+                   
QVariant::fromValue(fileRootNodePair(QStringLiteral("./usr/bin/hello"), 
QString()))
+               }
+            << optionsPreservePaths
+            << 3;
+
     archivePath = QFINDTESTDATA("data/archive-multivolume.7z.001");
     QTest::newRow("extract all entries from a multivolume 7z archive with 
path")
             << archivePath
@@ -559,6 +568,15 @@ void ArchiveTest::testExtraction_data()
             << 3;
 
     archivePath = 
QFINDTESTDATA("data/firmware-pine64-20160329-6.1.aarch64.rpm");
+    QTest::newRow("extract selected entries from rpm with path")
+            << archivePath
+            << QVariantList {
+                   
QVariant::fromValue(fileRootNodePair(QStringLiteral("./boot/sunxi-spl.bin"), 
QString()))
+               }
+            << optionsPreservePaths
+            << 2;
+
+    archivePath = 
QFINDTESTDATA("data/firmware-pine64-20160329-6.1.aarch64.rpm");
     QTest::newRow("#369535: broken drag-and-drop from rpm")
             << archivePath
             << QVariantList {
-- 
2.10.0

++++++ 0013-Fix-drag-and-drop-extraction-of-entries-from-certain.patch ++++++
>From 593568d0c489a4ecffb5c53bc54cef64c33cca40 Mon Sep 17 00:00:00 2001
From: Ragnar Thomsen <[email protected]>
Date: Sat, 1 Oct 2016 20:13:25 +0200
Subject: [PATCH 13/13] Fix drag-and-drop extraction of entries from certain
 archive formats

When listing certain archive formats e.g. AppImage and RPM,
libarchiveplugin outputs no trailing slash for folders. This diff adds a
trailing slash to folders that miss one. The code is added in
ArchiveModel::newEntry() so it's applied for all plugins.

Differential Revision: D2908
---
 part/archivemodel.cpp | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/part/archivemodel.cpp b/part/archivemodel.cpp
index 21ae068..8b297b5 100644
--- a/part/archivemodel.cpp
+++ b/part/archivemodel.cpp
@@ -805,6 +805,14 @@ void ArchiveModel::newEntry(const ArchiveEntry& 
receivedEntry, InsertBehaviour b
     }
     entry[FileName] = entryFileName;
 
+    // For some archive formats (e.g. AppImage and RPM) paths of folders do not
+    // contain a trailing slash, so we append it.
+    if (entry[IsDirectory].toBool() && 
!entry[FileName].toString().endsWith(QLatin1Char('/'))) {
+        entry[FileName] = entry[FileName].toString() + QLatin1Char('/');
+        entry[InternalID] = entry[FileName];
+        qCDebug(ARK) << "Trailing slash appended to entry:" << entry[FileName];
+    }
+
     /// 1. Skip already created nodes
     if (m_rootNode) {
         ArchiveNode *existing = m_rootNode->findByPath(entry[ FileName 
].toString().split(QLatin1Char( '/' )));
-- 
2.10.0

++++++ 0014-Fix-drag-and-drop-extraction-of-parentless-files.patch ++++++
>From bb9ede753623f7d3958f7a78985bb4142fbc0bb0 Mon Sep 17 00:00:00 2001
From: Ragnar Thomsen <[email protected]>
Date: Sat, 1 Oct 2016 21:24:20 +0200
Subject: [PATCH 14/14] Fix drag-and-drop extraction of parentless files

In some archives parent folders of some files might not be part of the
archive themselves, i.e. the archive does not contain separate entries
for them. In this case ArchiveModel creates ArchiveDirNodes for the
folders. However, the FileName and InternalID properties of these
folders do not get a trailing slash. This results in faulty root nodes
leading to e.g. broken drag-n-drop extraction of files within these
folders.

This diff simply appends a traling slash to the properties in
ArchiveModel::parentFor().

BUG: 367549
FIXED-IN: 16.08.2
Differential Revision: D2909
---
 part/archivemodel.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/part/archivemodel.cpp b/part/archivemodel.cpp
index 8b297b5..1569a36 100644
--- a/part/archivemodel.cpp
+++ b/part/archivemodel.cpp
@@ -679,7 +679,7 @@ ArchiveDirNode* ArchiveModel::parentFor(const ArchiveEntry& 
entry)
         if (!node) {
             ArchiveEntry e;
             e[ FileName ] = (parent == m_rootNode) ?
-                            piece : parent->entry()[ FileName ].toString() + 
QLatin1Char( '/' ) + piece;
+                            piece + QLatin1Char('/') : 
parent->entry()[FileName].toString() + piece + QLatin1Char('/');
             e[ InternalID ] = e.value(FileName);
             e[ IsDirectory ] = true;
             node = new ArchiveDirNode(parent, e);
-- 
2.10.0


Reply via email to