[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#858775: unblock: plasma-integration/5.8.6-1



Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock

Dear release team,

KDE Plasma 5.8 is an LTS release that I consider fit to be updated in stretch. 
This particular request is for plasma-integration 5.8.6.

The fixes included in the plasma-integration 5.8.6 release are:
 + translation updates
 + 4 fixes:
   + Do not treat filename in selection as URL (e70f813) KDE#376365
   + [KHintsSettings] Emit QGuiApplication::paletteChanged when run as
     QApplication (ab3298b)
     QtQuick-based interfaces will now more reliably adapt to color scheme
     changes at runtime
   + Fix Plasma-QPA filedialog to show wrong directory with
     QFileDialog::selectUrl() (7bbbd93 87b2747)
   + Fix compilation with Qt 5.8. (6b405fe)
     Not affecting stretch, but might make backporting qt5.8 feasible.

On the Debian side, we added a patch so it builds correctly against any 
version of breeze in the same plasma major.minor version, otherwise it 
requires breeze 5.8.6 (which in turn contains no relevant changes between 
since the 5.8.5 release).

I'm attaching the full debdiff between the 5.8.4-1 currently in testing and the 
5.8.6-1 version that I haven't uploaded yet. And the upstream gitlog between 
5.8.4 and the 5.8.6 releases. I'll happily upload this if this gets approved.

Please unblock package plasma-integration

Happy hacking,

unblock plasma-integration/5.8.6-1

-- System Information:
Debian Release: 9.0
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'testing-debug'), (500, 'testing'), (500, 'stable'), (50, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386, armhf

Kernel: Linux 4.9.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Init: systemd (via /run/systemd/system)
diff -Nru plasma-integration-5.8.4/autotests/kfiledialog_unittest.cpp plasma-integration-5.8.6/autotests/kfiledialog_unittest.cpp
--- plasma-integration-5.8.4/autotests/kfiledialog_unittest.cpp	2016-11-22 11:23:53.000000000 +0100
+++ plasma-integration-5.8.6/autotests/kfiledialog_unittest.cpp	2017-02-21 13:11:12.000000000 +0100
@@ -77,6 +77,47 @@
         QCOMPARE(dialog.directory().absolutePath(), QDir::rootPath());
     }
 
+    void testSelectUrl()
+    {
+        QTemporaryFile tempFile(QDir::tempPath()+"/kfiledialogtest_XXXXXX");
+        tempFile.setAutoRemove(true);
+        tempFile.open();
+        QString tempName = tempFile.fileName();
+        QUrl url = QUrl::fromLocalFile(tempName);
+        int idx = tempName.lastIndexOf('/');
+        QUrl directoryUrl = QUrl::fromLocalFile(tempName.left(idx+1));
+
+        QFileDialog dialog;
+        dialog.selectUrl(url);
+        dialog.show();
+
+        // check if dialog was set to base directory url of the passed file url
+        QCOMPARE(dialog.directoryUrl(), directoryUrl);
+    }
+
+    void testGetSaveFileUrl()
+    {
+        QObject lambdaGuard;
+        QTemporaryFile tempFile(QDir::tempPath()+"/kfiledialogtest_XXXXXX");
+        tempFile.open();
+        const QString tempName = tempFile.fileName();
+        const QUrl url = QUrl::fromLocalFile(tempName);
+
+        // Need to use a lambda and not just QTest::qWaitForWindowExposed();
+        // because with the static getSaveFileUrl we do not have access
+        // to the QFileDialog object, so instead we hook to a signal
+        KFileWidget::OperationMode saveFileOperationMode = KFileWidget::Other;
+        connect(qApp, &QGuiApplication::focusWindowChanged, &lambdaGuard, [&saveFileOperationMode] {
+            KFileWidget *fileWidget = findFileWidget();
+            saveFileOperationMode = fileWidget->operationMode();
+            qApp->activeWindow()->close();
+        });
+
+        QFileDialog::getSaveFileUrl(0, QString(), url);
+
+        QCOMPARE(saveFileOperationMode, KFileWidget::Saving);
+    }
+
     void testViewMode()
     {
         // Open a file dialog, and change view mode to tree
diff -Nru plasma-integration-5.8.4/CMakeLists.txt plasma-integration-5.8.6/CMakeLists.txt
--- plasma-integration-5.8.4/CMakeLists.txt	2016-11-22 11:24:02.000000000 +0100
+++ plasma-integration-5.8.6/CMakeLists.txt	2017-02-21 13:11:22.000000000 +0100
@@ -1,7 +1,7 @@
 cmake_minimum_required(VERSION 2.8.12)
 
 project(PlasmaIntegration)
-set(PROJECT_VERSION "5.8.4")
+set(PROJECT_VERSION "5.8.6")
 set(PROJECT_VERSION_MAJOR 5)
 
 include(FeatureSummary)
diff -Nru plasma-integration-5.8.4/debian/changelog plasma-integration-5.8.6/debian/changelog
--- plasma-integration-5.8.4/debian/changelog	2016-11-23 18:37:50.000000000 +0100
+++ plasma-integration-5.8.6/debian/changelog	2017-03-26 15:40:34.000000000 +0200
@@ -1,3 +1,24 @@
+plasma-integration (5.8.6-1) unstable; urgency=medium
+
+  * New upstream release (5.8.6)
+  * Update build-deps and deps with the info from cmake
+  * Add new patch: Drop-the-patch-version-for-breeze.patch
+
+ -- Maximiliano Curia <maxy@debian.org>  Sun, 26 Mar 2017 15:40:34 +0200
+
+plasma-integration (5.8.5-2) experimental; urgency=medium
+
+  * Team upload
+  * Bump minimum breeze-dev requirement to 4:5.8.5 to match new requirement
+
+ -- Scott Kitterman <scott@kitterman.com>  Sat, 28 Jan 2017 12:10:33 -0500
+
+plasma-integration (5.8.5-1) experimental; urgency=medium
+
+  * New upstream release (5.8.5).
+
+ -- Maximiliano Curia <maxy@debian.org>  Fri, 30 Dec 2016 18:46:21 +0100
+
 plasma-integration (5.8.4-1) unstable; urgency=medium
 
   [ Automatic packaging ]
diff -Nru plasma-integration-5.8.4/debian/control plasma-integration-5.8.6/debian/control
--- plasma-integration-5.8.4/debian/control	2016-11-23 18:37:50.000000000 +0100
+++ plasma-integration-5.8.6/debian/control	2017-03-26 15:40:34.000000000 +0200
@@ -3,7 +3,7 @@
 Priority: optional
 Maintainer: Debian/Kubuntu Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>
 Uploaders: Maximiliano Curia <maxy@debian.org>
-Build-Depends: breeze-dev (>= 4:5.8.4~),
+Build-Depends: breeze-dev (>= 4:5.8.0~),
                cmake (>= 2.8.12),
                debhelper (>= 9),
                extra-cmake-modules (>= 5.17.0~),
diff -Nru plasma-integration-5.8.4/debian/patches/Drop-the-patch-version-for-breeze.patch plasma-integration-5.8.6/debian/patches/Drop-the-patch-version-for-breeze.patch
--- plasma-integration-5.8.4/debian/patches/Drop-the-patch-version-for-breeze.patch	1970-01-01 01:00:00.000000000 +0100
+++ plasma-integration-5.8.6/debian/patches/Drop-the-patch-version-for-breeze.patch	2017-03-26 15:40:34.000000000 +0200
@@ -0,0 +1,33 @@
+From: Maximiliano Curia <maxy@gnuservers.com.ar>
+Date: Sun, 26 Mar 2017 14:30:55 +0200
+Subject: Drop the patch version for breeze
+
+Breeze doesn't even receive changes on every point release, and really lts
+components shouldn't introduce incompatible changes in the same
+major.minor, so dropping this unnecessary requirement.
+---
+ CMakeLists.txt | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 800a523..369c797 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -3,6 +3,8 @@ cmake_minimum_required(VERSION 2.8.12)
+ project(PlasmaIntegration)
+ set(PROJECT_VERSION "5.8.6")
+ set(PROJECT_VERSION_MAJOR 5)
++string(REGEX MATCHALL "[0-9]+" PROJECT_VERSION_COMPONENTS ${PROJECT_VERSION})
++list(GET PROJECT_VERSION_COMPONENTS 1 PROJECT_VERSION_MINOR)
+ 
+ include(FeatureSummary)
+ find_package(ECM 5.17.0  NO_MODULE)
+@@ -38,7 +40,7 @@ find_package(KF5WidgetsAddons ${KF5_DEP_VERSION} REQUIRED)
+ find_package(KF5WindowSystem ${KF5_DEP_VERSION} REQUIRED)
+ find_package(KF5Wayland 5.5 CONFIG REQUIRED)
+ 
+-find_package(Breeze ${PROJECT_VERSION} CONFIG)
++find_package(Breeze ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR} CONFIG)
+ set_package_properties(Breeze PROPERTIES
+                        TYPE REQUIRED
+                        PURPOSE "For setting the default QStyle name")
diff -Nru plasma-integration-5.8.4/debian/patches/series plasma-integration-5.8.6/debian/patches/series
--- plasma-integration-5.8.4/debian/patches/series	1970-01-01 01:00:00.000000000 +0100
+++ plasma-integration-5.8.6/debian/patches/series	2017-03-26 15:40:34.000000000 +0200
@@ -0,0 +1 @@
+Drop-the-patch-version-for-breeze.patch
diff -Nru plasma-integration-5.8.4/po/fr/plasmaintegration5.po plasma-integration-5.8.6/po/fr/plasmaintegration5.po
--- plasma-integration-5.8.4/po/fr/plasmaintegration5.po	2016-11-22 11:23:56.000000000 +0100
+++ plasma-integration-5.8.6/po/fr/plasmaintegration5.po	2017-02-21 13:11:15.000000000 +0100
@@ -1,14 +1,15 @@
 # Copyright (C) YEAR This_file_is_part_of_KDE
 # This file is distributed under the same license as the PACKAGE package.
 # Johan Claude-Breuninger <johan.claudebreuninger@gmail.com>, 2016.
+# Vincent Pinon <vpinon@kde.org>, 2016.
 #
 msgid ""
 msgstr ""
 "Project-Id-Version: \n"
 "Report-Msgid-Bugs-To: http://bugs.kde.org\n";
 "POT-Creation-Date: 2016-11-19 22:53+0100\n"
-"PO-Revision-Date: 2016-05-10 22:58+0100\n"
-"Last-Translator: Johan Claude-Breuninger <johan.claudebreuninger@gmail.com>\n"
+"PO-Revision-Date: 2016-11-23 18:17+0100\n"
+"Last-Translator: Vincent Pinon <vpinon@kde.org>\n"
 "Language-Team: French <kde-i18n-doc@kde.org>\n"
 "Language: fr\n"
 "MIME-Version: 1.0\n"
@@ -24,19 +25,19 @@
 #, kde-format
 msgctxt "@title:window"
 msgid "Open File"
-msgstr ""
+msgstr "Ouvrir un fichier"
 
 #: platformtheme/kdeplatformfiledialoghelper.cpp:256
 #, kde-format
 msgctxt "@title:window"
 msgid "Save File"
-msgstr ""
+msgstr "Enregistrer le fichier"
 
 #: platformtheme/kdeplatformtheme.cpp:237
 #, kde-format
 msgctxt "@action:button"
 msgid "Save All"
-msgstr "Enregistrer tout"
+msgstr "Tout enregistrer"
 
 #: platformtheme/kdeplatformtheme.cpp:243
 #, kde-format
diff -Nru plasma-integration-5.8.4/po/nb/plasmaintegration5.po plasma-integration-5.8.6/po/nb/plasmaintegration5.po
--- plasma-integration-5.8.4/po/nb/plasmaintegration5.po	2016-11-22 11:23:59.000000000 +0100
+++ plasma-integration-5.8.6/po/nb/plasmaintegration5.po	2017-02-21 13:11:18.000000000 +0100
@@ -5,7 +5,7 @@
 msgstr ""
 "Project-Id-Version: \n"
 "Report-Msgid-Bugs-To: http://bugs.kde.org\n";
-"POT-Creation-Date: 2016-04-15 07:51+0000\n"
+"POT-Creation-Date: 2016-11-19 22:53+0100\n"
 "PO-Revision-Date: 2015-02-24 20:41+0100\n"
 "Last-Translator: Bjørn Steensrud <bjornst@skogkatt.homelinux.org>\n"
 "Language-Team: Norwegian Bokmål <i18n-nb@lister.ping.uio.no>\n"
@@ -20,51 +20,61 @@
 "X-Text-Markup: kde4\n"
 
 #: platformtheme/kdeplatformfiledialoghelper.cpp:256
+#, kde-format
 msgctxt "@title:window"
 msgid "Open File"
 msgstr "Åpne fil"
 
 #: platformtheme/kdeplatformfiledialoghelper.cpp:256
+#, kde-format
 msgctxt "@title:window"
 msgid "Save File"
 msgstr "Lagre fil"
 
 #: platformtheme/kdeplatformtheme.cpp:237
+#, kde-format
 msgctxt "@action:button"
 msgid "Save All"
 msgstr "Lagre alle"
 
 #: platformtheme/kdeplatformtheme.cpp:243
+#, kde-format
 msgctxt "@action:button"
 msgid "Yes to All"
 msgstr "Ja til alt"
 
 #: platformtheme/kdeplatformtheme.cpp:247
+#, kde-format
 msgctxt "@action:button"
 msgid "No to All"
 msgstr "Nei til alt"
 
 #: platformtheme/kdeplatformtheme.cpp:250
+#, kde-format
 msgctxt "@action:button"
 msgid "Abort"
 msgstr "Avbryt"
 
 #: platformtheme/kdeplatformtheme.cpp:252
+#, kde-format
 msgctxt "@action:button"
 msgid "Retry"
 msgstr "Prøv igjen"
 
 #: platformtheme/kdeplatformtheme.cpp:254
+#, kde-format
 msgctxt "@action:button"
 msgid "Ignore"
 msgstr "Ignorer"
 
 #: platformtheme/kdirselectdialog.cpp:132
+#, kde-format
 msgctxt "folder name"
 msgid "New Folder"
 msgstr "Ny mappe"
 
 #: platformtheme/kdirselectdialog.cpp:137
+#, kde-format
 msgctxt "@title:window"
 msgid "New Folder"
 msgstr "Ny mappe"
@@ -85,44 +95,53 @@
 msgstr "En fil eller mappe med navnet %1 finnes fra før."
 
 #: platformtheme/kdirselectdialog.cpp:171
+#, kde-format
 msgid "You do not have permission to create that folder."
 msgstr "Du har ikke rettighet til å lage den mappa."
 
 #: platformtheme/kdirselectdialog.cpp:285
+#, kde-format
 msgctxt "@title:window"
 msgid "Select Folder"
 msgstr "Velg mappe"
 
 #: platformtheme/kdirselectdialog.cpp:294
+#, kde-format
 msgctxt "@action:button"
 msgid "New Folder..."
 msgstr "Ny mappe …"
 
 #: platformtheme/kdirselectdialog.cpp:340
+#, kde-format
 msgctxt "@action:inmenu"
 msgid "New Folder..."
 msgstr "Ny mappe …"
 
 #: platformtheme/kdirselectdialog.cpp:347
+#, kde-format
 msgctxt "@action:inmenu"
 msgid "Move to Trash"
 msgstr "Flytt til papirkurven"
 
 #: platformtheme/kdirselectdialog.cpp:354
+#, kde-format
 msgctxt "@action:inmenu"
 msgid "Delete"
 msgstr "Slett"
 
 #: platformtheme/kdirselectdialog.cpp:363
+#, kde-format
 msgctxt "@option:check"
 msgid "Show Hidden Folders"
 msgstr "Vis skjulte mapper"
 
 #: platformtheme/kdirselectdialog.cpp:370
+#, kde-format
 msgctxt "@action:inmenu"
 msgid "Properties"
 msgstr "Egenskaper"
 
 #: platformtheme/kfiletreeview.cpp:192
+#, kde-format
 msgid "Show Hidden Folders"
 msgstr "Vis skjulte mapper"
\ No newline at end of file
diff -Nru plasma-integration-5.8.4/po/pt/plasmaintegration5.po plasma-integration-5.8.6/po/pt/plasmaintegration5.po
--- plasma-integration-5.8.4/po/pt/plasmaintegration5.po	2016-11-22 11:23:59.000000000 +0100
+++ plasma-integration-5.8.6/po/pt/plasmaintegration5.po	2017-02-21 13:11:19.000000000 +0100
@@ -11,7 +11,7 @@
 "PO-Revision-Date: 2016-01-12 11:24+0000\n"
 "Last-Translator: José Nuno Coelho Pires <zepires@gmail.com>\n"
 "Language-Team: Portuguese <kde-i18n-pt@kde.org>\n"
-"Language: \n"
+"Language: pt\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
diff -Nru plasma-integration-5.8.4/po/sr/plasmaintegration5.po plasma-integration-5.8.6/po/sr/plasmaintegration5.po
--- plasma-integration-5.8.4/po/sr/plasmaintegration5.po	2016-11-22 11:24:00.000000000 +0100
+++ plasma-integration-5.8.6/po/sr/plasmaintegration5.po	2017-02-21 13:11:20.000000000 +0100
@@ -4,7 +4,7 @@
 msgstr ""
 "Project-Id-Version: frameworkintegration5\n"
 "Report-Msgid-Bugs-To: http://bugs.kde.org\n";
-"POT-Creation-Date: 2016-04-15 07:51+0000\n"
+"POT-Creation-Date: 2016-11-19 22:53+0100\n"
 "PO-Revision-Date: 2016-04-15 23:42+0200\n"
 "Last-Translator: Chusslove Illich <caslav.ilic@gmx.net>\n"
 "Language-Team: Serbian <kde-i18n-sr@kde.org>\n"
@@ -19,51 +19,61 @@
 "X-Environment: kde\n"
 
 #: platformtheme/kdeplatformfiledialoghelper.cpp:256
+#, kde-format
 msgctxt "@title:window"
 msgid "Open File"
 msgstr "Отварање фајла"
 
 #: platformtheme/kdeplatformfiledialoghelper.cpp:256
+#, kde-format
 msgctxt "@title:window"
 msgid "Save File"
 msgstr "Уписивање фајла"
 
 #: platformtheme/kdeplatformtheme.cpp:237
+#, kde-format
 msgctxt "@action:button"
 msgid "Save All"
 msgstr "Сачувај све"
 
 #: platformtheme/kdeplatformtheme.cpp:243
+#, kde-format
 msgctxt "@action:button"
 msgid "Yes to All"
 msgstr "Да за све"
 
 #: platformtheme/kdeplatformtheme.cpp:247
+#, kde-format
 msgctxt "@action:button"
 msgid "No to All"
 msgstr "Не за све"
 
 #: platformtheme/kdeplatformtheme.cpp:250
+#, kde-format
 msgctxt "@action:button"
 msgid "Abort"
 msgstr "Обустави"
 
 #: platformtheme/kdeplatformtheme.cpp:252
+#, kde-format
 msgctxt "@action:button"
 msgid "Retry"
 msgstr "Покушај поново"
 
 #: platformtheme/kdeplatformtheme.cpp:254
+#, kde-format
 msgctxt "@action:button"
 msgid "Ignore"
 msgstr "Игнориши"
 
 #: platformtheme/kdirselectdialog.cpp:132
+#, kde-format
 msgctxt "folder name"
 msgid "New Folder"
 msgstr "Нова фасцикла"
 
 #: platformtheme/kdirselectdialog.cpp:137
+#, kde-format
 msgctxt "@title:window"
 msgid "New Folder"
 msgstr "Нова фасцикла"
@@ -84,44 +94,53 @@
 msgstr "Фајл или фасцикла по имену <filename>%1</filename> већ постоји."
 
 #: platformtheme/kdirselectdialog.cpp:171
+#, kde-format
 msgid "You do not have permission to create that folder."
 msgstr "Немате дозволу да направите ту фасциклу."
 
 #: platformtheme/kdirselectdialog.cpp:285
+#, kde-format
 msgctxt "@title:window"
 msgid "Select Folder"
 msgstr "Избор фасцикле"
 
 #: platformtheme/kdirselectdialog.cpp:294
+#, kde-format
 msgctxt "@action:button"
 msgid "New Folder..."
 msgstr "Нова фасцикла..."
 
 #: platformtheme/kdirselectdialog.cpp:340
+#, kde-format
 msgctxt "@action:inmenu"
 msgid "New Folder..."
 msgstr "Нова фасцикла..."
 
 #: platformtheme/kdirselectdialog.cpp:347
+#, kde-format
 msgctxt "@action:inmenu"
 msgid "Move to Trash"
 msgstr "Премести у смеће"
 
 #: platformtheme/kdirselectdialog.cpp:354
+#, kde-format
 msgctxt "@action:inmenu"
 msgid "Delete"
 msgstr "Обриши"
 
 #: platformtheme/kdirselectdialog.cpp:363
+#, kde-format
 msgctxt "@option:check"
 msgid "Show Hidden Folders"
 msgstr "Скривене фасцикле"
 
 #: platformtheme/kdirselectdialog.cpp:370
+#, kde-format
 msgctxt "@action:inmenu"
 msgid "Properties"
 msgstr "Својства"
 
 #: platformtheme/kfiletreeview.cpp:192
+#, kde-format
 msgid "Show Hidden Folders"
 msgstr "Скривене фасцикле"
\ No newline at end of file
diff -Nru plasma-integration-5.8.4/po/sr@ijekavian/plasmaintegration5.po plasma-integration-5.8.6/po/sr@ijekavian/plasmaintegration5.po
--- plasma-integration-5.8.4/po/sr@ijekavian/plasmaintegration5.po	2016-11-22 11:24:00.000000000 +0100
+++ plasma-integration-5.8.6/po/sr@ijekavian/plasmaintegration5.po	2017-02-21 13:11:20.000000000 +0100
@@ -4,7 +4,7 @@
 msgstr ""
 "Project-Id-Version: frameworkintegration5\n"
 "Report-Msgid-Bugs-To: http://bugs.kde.org\n";
-"POT-Creation-Date: 2016-04-15 07:51+0000\n"
+"POT-Creation-Date: 2016-11-19 22:53+0100\n"
 "PO-Revision-Date: 2016-04-15 23:42+0200\n"
 "Last-Translator: Chusslove Illich <caslav.ilic@gmx.net>\n"
 "Language-Team: Serbian <kde-i18n-sr@kde.org>\n"
@@ -19,51 +19,61 @@
 "X-Environment: kde\n"
 
 #: platformtheme/kdeplatformfiledialoghelper.cpp:256
+#, kde-format
 msgctxt "@title:window"
 msgid "Open File"
 msgstr "Отварање фајла"
 
 #: platformtheme/kdeplatformfiledialoghelper.cpp:256
+#, kde-format
 msgctxt "@title:window"
 msgid "Save File"
 msgstr "Уписивање фајла"
 
 #: platformtheme/kdeplatformtheme.cpp:237
+#, kde-format
 msgctxt "@action:button"
 msgid "Save All"
 msgstr "Сачувај све"
 
 #: platformtheme/kdeplatformtheme.cpp:243
+#, kde-format
 msgctxt "@action:button"
 msgid "Yes to All"
 msgstr "Да за све"
 
 #: platformtheme/kdeplatformtheme.cpp:247
+#, kde-format
 msgctxt "@action:button"
 msgid "No to All"
 msgstr "Не за све"
 
 #: platformtheme/kdeplatformtheme.cpp:250
+#, kde-format
 msgctxt "@action:button"
 msgid "Abort"
 msgstr "Обустави"
 
 #: platformtheme/kdeplatformtheme.cpp:252
+#, kde-format
 msgctxt "@action:button"
 msgid "Retry"
 msgstr "Покушај поново"
 
 #: platformtheme/kdeplatformtheme.cpp:254
+#, kde-format
 msgctxt "@action:button"
 msgid "Ignore"
 msgstr "Игнориши"
 
 #: platformtheme/kdirselectdialog.cpp:132
+#, kde-format
 msgctxt "folder name"
 msgid "New Folder"
 msgstr "Нова фасцикла"
 
 #: platformtheme/kdirselectdialog.cpp:137
+#, kde-format
 msgctxt "@title:window"
 msgid "New Folder"
 msgstr "Нова фасцикла"
@@ -84,44 +94,53 @@
 msgstr "Фајл или фасцикла по имену <filename>%1</filename> већ постоји."
 
 #: platformtheme/kdirselectdialog.cpp:171
+#, kde-format
 msgid "You do not have permission to create that folder."
 msgstr "Немате дозволу да направите ту фасциклу."
 
 #: platformtheme/kdirselectdialog.cpp:285
+#, kde-format
 msgctxt "@title:window"
 msgid "Select Folder"
 msgstr "Избор фасцикле"
 
 #: platformtheme/kdirselectdialog.cpp:294
+#, kde-format
 msgctxt "@action:button"
 msgid "New Folder..."
 msgstr "Нова фасцикла..."
 
 #: platformtheme/kdirselectdialog.cpp:340
+#, kde-format
 msgctxt "@action:inmenu"
 msgid "New Folder..."
 msgstr "Нова фасцикла..."
 
 #: platformtheme/kdirselectdialog.cpp:347
+#, kde-format
 msgctxt "@action:inmenu"
 msgid "Move to Trash"
 msgstr "Премјести у смеће"
 
 #: platformtheme/kdirselectdialog.cpp:354
+#, kde-format
 msgctxt "@action:inmenu"
 msgid "Delete"
 msgstr "Обриши"
 
 #: platformtheme/kdirselectdialog.cpp:363
+#, kde-format
 msgctxt "@option:check"
 msgid "Show Hidden Folders"
 msgstr "Скривене фасцикле"
 
 #: platformtheme/kdirselectdialog.cpp:370
+#, kde-format
 msgctxt "@action:inmenu"
 msgid "Properties"
 msgstr "Својства"
 
 #: platformtheme/kfiletreeview.cpp:192
+#, kde-format
 msgid "Show Hidden Folders"
 msgstr "Скривене фасцикле"
\ No newline at end of file
diff -Nru plasma-integration-5.8.4/po/sr@ijekavianlatin/plasmaintegration5.po plasma-integration-5.8.6/po/sr@ijekavianlatin/plasmaintegration5.po
--- plasma-integration-5.8.4/po/sr@ijekavianlatin/plasmaintegration5.po	2016-11-22 11:24:00.000000000 +0100
+++ plasma-integration-5.8.6/po/sr@ijekavianlatin/plasmaintegration5.po	2017-02-21 13:11:20.000000000 +0100
@@ -4,7 +4,7 @@
 msgstr ""
 "Project-Id-Version: frameworkintegration5\n"
 "Report-Msgid-Bugs-To: http://bugs.kde.org\n";
-"POT-Creation-Date: 2016-04-15 07:51+0000\n"
+"POT-Creation-Date: 2016-11-19 22:53+0100\n"
 "PO-Revision-Date: 2016-04-15 23:42+0200\n"
 "Last-Translator: Chusslove Illich <caslav.ilic@gmx.net>\n"
 "Language-Team: Serbian <kde-i18n-sr@kde.org>\n"
@@ -19,51 +19,61 @@
 "X-Environment: kde\n"
 
 #: platformtheme/kdeplatformfiledialoghelper.cpp:256
+#, kde-format
 msgctxt "@title:window"
 msgid "Open File"
 msgstr "Otvaranje fajla"
 
 #: platformtheme/kdeplatformfiledialoghelper.cpp:256
+#, kde-format
 msgctxt "@title:window"
 msgid "Save File"
 msgstr "Upisivanje fajla"
 
 #: platformtheme/kdeplatformtheme.cpp:237
+#, kde-format
 msgctxt "@action:button"
 msgid "Save All"
 msgstr "Sačuvaj sve"
 
 #: platformtheme/kdeplatformtheme.cpp:243
+#, kde-format
 msgctxt "@action:button"
 msgid "Yes to All"
 msgstr "Da za sve"
 
 #: platformtheme/kdeplatformtheme.cpp:247
+#, kde-format
 msgctxt "@action:button"
 msgid "No to All"
 msgstr "Ne za sve"
 
 #: platformtheme/kdeplatformtheme.cpp:250
+#, kde-format
 msgctxt "@action:button"
 msgid "Abort"
 msgstr "Obustavi"
 
 #: platformtheme/kdeplatformtheme.cpp:252
+#, kde-format
 msgctxt "@action:button"
 msgid "Retry"
 msgstr "Pokušaj ponovo"
 
 #: platformtheme/kdeplatformtheme.cpp:254
+#, kde-format
 msgctxt "@action:button"
 msgid "Ignore"
 msgstr "Ignoriši"
 
 #: platformtheme/kdirselectdialog.cpp:132
+#, kde-format
 msgctxt "folder name"
 msgid "New Folder"
 msgstr "Nova fascikla"
 
 #: platformtheme/kdirselectdialog.cpp:137
+#, kde-format
 msgctxt "@title:window"
 msgid "New Folder"
 msgstr "Nova fascikla"
@@ -84,44 +94,53 @@
 msgstr "Fajl ili fascikla po imenu <filename>%1</filename> već postoji."
 
 #: platformtheme/kdirselectdialog.cpp:171
+#, kde-format
 msgid "You do not have permission to create that folder."
 msgstr "Nemate dozvolu da napravite tu fasciklu."
 
 #: platformtheme/kdirselectdialog.cpp:285
+#, kde-format
 msgctxt "@title:window"
 msgid "Select Folder"
 msgstr "Izbor fascikle"
 
 #: platformtheme/kdirselectdialog.cpp:294
+#, kde-format
 msgctxt "@action:button"
 msgid "New Folder..."
 msgstr "Nova fascikla..."
 
 #: platformtheme/kdirselectdialog.cpp:340
+#, kde-format
 msgctxt "@action:inmenu"
 msgid "New Folder..."
 msgstr "Nova fascikla..."
 
 #: platformtheme/kdirselectdialog.cpp:347
+#, kde-format
 msgctxt "@action:inmenu"
 msgid "Move to Trash"
 msgstr "Premjesti u smeće"
 
 #: platformtheme/kdirselectdialog.cpp:354
+#, kde-format
 msgctxt "@action:inmenu"
 msgid "Delete"
 msgstr "Obriši"
 
 #: platformtheme/kdirselectdialog.cpp:363
+#, kde-format
 msgctxt "@option:check"
 msgid "Show Hidden Folders"
 msgstr "Skrivene fascikle"
 
 #: platformtheme/kdirselectdialog.cpp:370
+#, kde-format
 msgctxt "@action:inmenu"
 msgid "Properties"
 msgstr "Svojstva"
 
 #: platformtheme/kfiletreeview.cpp:192
+#, kde-format
 msgid "Show Hidden Folders"
 msgstr "Skrivene fascikle"
\ No newline at end of file
diff -Nru plasma-integration-5.8.4/po/sr@latin/plasmaintegration5.po plasma-integration-5.8.6/po/sr@latin/plasmaintegration5.po
--- plasma-integration-5.8.4/po/sr@latin/plasmaintegration5.po	2016-11-22 11:24:01.000000000 +0100
+++ plasma-integration-5.8.6/po/sr@latin/plasmaintegration5.po	2017-02-21 13:11:21.000000000 +0100
@@ -4,7 +4,7 @@
 msgstr ""
 "Project-Id-Version: frameworkintegration5\n"
 "Report-Msgid-Bugs-To: http://bugs.kde.org\n";
-"POT-Creation-Date: 2016-04-15 07:51+0000\n"
+"POT-Creation-Date: 2016-11-19 22:53+0100\n"
 "PO-Revision-Date: 2016-04-15 23:42+0200\n"
 "Last-Translator: Chusslove Illich <caslav.ilic@gmx.net>\n"
 "Language-Team: Serbian <kde-i18n-sr@kde.org>\n"
@@ -19,51 +19,61 @@
 "X-Environment: kde\n"
 
 #: platformtheme/kdeplatformfiledialoghelper.cpp:256
+#, kde-format
 msgctxt "@title:window"
 msgid "Open File"
 msgstr "Otvaranje fajla"
 
 #: platformtheme/kdeplatformfiledialoghelper.cpp:256
+#, kde-format
 msgctxt "@title:window"
 msgid "Save File"
 msgstr "Upisivanje fajla"
 
 #: platformtheme/kdeplatformtheme.cpp:237
+#, kde-format
 msgctxt "@action:button"
 msgid "Save All"
 msgstr "Sačuvaj sve"
 
 #: platformtheme/kdeplatformtheme.cpp:243
+#, kde-format
 msgctxt "@action:button"
 msgid "Yes to All"
 msgstr "Da za sve"
 
 #: platformtheme/kdeplatformtheme.cpp:247
+#, kde-format
 msgctxt "@action:button"
 msgid "No to All"
 msgstr "Ne za sve"
 
 #: platformtheme/kdeplatformtheme.cpp:250
+#, kde-format
 msgctxt "@action:button"
 msgid "Abort"
 msgstr "Obustavi"
 
 #: platformtheme/kdeplatformtheme.cpp:252
+#, kde-format
 msgctxt "@action:button"
 msgid "Retry"
 msgstr "Pokušaj ponovo"
 
 #: platformtheme/kdeplatformtheme.cpp:254
+#, kde-format
 msgctxt "@action:button"
 msgid "Ignore"
 msgstr "Ignoriši"
 
 #: platformtheme/kdirselectdialog.cpp:132
+#, kde-format
 msgctxt "folder name"
 msgid "New Folder"
 msgstr "Nova fascikla"
 
 #: platformtheme/kdirselectdialog.cpp:137
+#, kde-format
 msgctxt "@title:window"
 msgid "New Folder"
 msgstr "Nova fascikla"
@@ -84,44 +94,53 @@
 msgstr "Fajl ili fascikla po imenu <filename>%1</filename> već postoji."
 
 #: platformtheme/kdirselectdialog.cpp:171
+#, kde-format
 msgid "You do not have permission to create that folder."
 msgstr "Nemate dozvolu da napravite tu fasciklu."
 
 #: platformtheme/kdirselectdialog.cpp:285
+#, kde-format
 msgctxt "@title:window"
 msgid "Select Folder"
 msgstr "Izbor fascikle"
 
 #: platformtheme/kdirselectdialog.cpp:294
+#, kde-format
 msgctxt "@action:button"
 msgid "New Folder..."
 msgstr "Nova fascikla..."
 
 #: platformtheme/kdirselectdialog.cpp:340
+#, kde-format
 msgctxt "@action:inmenu"
 msgid "New Folder..."
 msgstr "Nova fascikla..."
 
 #: platformtheme/kdirselectdialog.cpp:347
+#, kde-format
 msgctxt "@action:inmenu"
 msgid "Move to Trash"
 msgstr "Premesti u smeće"
 
 #: platformtheme/kdirselectdialog.cpp:354
+#, kde-format
 msgctxt "@action:inmenu"
 msgid "Delete"
 msgstr "Obriši"
 
 #: platformtheme/kdirselectdialog.cpp:363
+#, kde-format
 msgctxt "@option:check"
 msgid "Show Hidden Folders"
 msgstr "Skrivene fascikle"
 
 #: platformtheme/kdirselectdialog.cpp:370
+#, kde-format
 msgctxt "@action:inmenu"
 msgid "Properties"
 msgstr "Svojstva"
 
 #: platformtheme/kfiletreeview.cpp:192
+#, kde-format
 msgid "Show Hidden Folders"
 msgstr "Skrivene fascikle"
\ No newline at end of file
diff -Nru plasma-integration-5.8.4/src/platformtheme/kdeplatformfiledialoghelper.cpp plasma-integration-5.8.6/src/platformtheme/kdeplatformfiledialoghelper.cpp
--- plasma-integration-5.8.4/src/platformtheme/kdeplatformfiledialoghelper.cpp	2016-11-22 11:23:53.000000000 +0100
+++ plasma-integration-5.8.6/src/platformtheme/kdeplatformfiledialoghelper.cpp	2017-02-21 13:11:12.000000000 +0100
@@ -126,7 +126,7 @@
 {
     QUrl dirUrl = filename.adjusted(QUrl::RemoveFilename);
     m_fileWidget->setUrl(dirUrl);
-    m_fileWidget->setSelection(filename.fileName());
+    m_fileWidget->setSelection(filename.toString());
 }
 
 void KDEPlatformFileDialog::setViewMode(QFileDialogOptions::ViewMode view)
@@ -361,6 +361,11 @@
 void KDEPlatformFileDialogHelper::selectFile(const QUrl &filename)
 {
     m_dialog->selectFile(filename);
+
+    // Qt 5 at least <= 5.8.0 does not derive the directory from the passed url
+    // and set the initialDirectory option accordingly, also not for known schemes
+    // like file://, so we have to do it ourselves
+    options()->setInitialDirectory(m_dialog->directory());
 }
 
 void KDEPlatformFileDialogHelper::setDirectory(const QUrl &directory)
diff -Nru plasma-integration-5.8.4/src/platformtheme/khintssettings.cpp plasma-integration-5.8.6/src/platformtheme/khintssettings.cpp
--- plasma-integration-5.8.4/src/platformtheme/khintssettings.cpp	2016-11-22 11:23:53.000000000 +0100
+++ plasma-integration-5.8.6/src/platformtheme/khintssettings.cpp	2017-02-21 13:11:12.000000000 +0100
@@ -231,7 +231,12 @@
         //QApplication::setPalette and QGuiApplication::setPalette are different functions
         //and non virtual. Call the correct one
         if (qobject_cast<QApplication *>(QCoreApplication::instance())) {
-            QApplication::setPalette(*m_palettes[QPlatformTheme::SystemPalette]);
+            QPalette palette = *m_palettes[QPlatformTheme::SystemPalette];
+            QApplication::setPalette(palette);
+            // QTBUG QGuiApplication::paletteChanged() signal is only emitted by QGuiApplication
+            // so things like SystemPalette QtQuick item that use it won't notice a palette
+            // change when a QApplication which causes e.g. QML System Settings modules to not update
+            emit qApp->paletteChanged(palette);
         } else if (qobject_cast<QGuiApplication *>(QCoreApplication::instance())) {
             QGuiApplication::setPalette(*m_palettes[QPlatformTheme::SystemPalette]);
         }
commit 517181d4c36dda5278401b91e04564638463118e
Author: Jonathan Riddell <jr@jriddell.org>
Date:   Tue Feb 21 11:45:58 2017 +0000

    Update version number for 5.8.6
    GIT_SILENT

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3bef915..800a523 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,7 +1,7 @@
 cmake_minimum_required(VERSION 2.8.12)
 
 project(PlasmaIntegration)
-set(PROJECT_VERSION "5.8.5")
+set(PROJECT_VERSION "5.8.6")
 set(PROJECT_VERSION_MAJOR 5)
 
 include(FeatureSummary)

commit e70f8134a2bc4b3647e245c05f469aeed462a246
Author: Fabian Vogt <fabian@ritter-vogt.de>
Date:   Sat Feb 11 22:07:54 2017 +0100

    Do not treat filename in selection as URL
    
    Summary:
    KFileWidget::setSelection(QString &) accepts either absolute URLs
    or relative paths. If the filename contains a :, it gets treated
    as a URL and gets rejected. This forces setSelection to parse
    it as URL.
    
    CCBUG: 376365
    
    Subscribers: plasma-devel
    
    Tags: #plasma
    
    Differential Revision: https://phabricator.kde.org/D4579

diff --git a/src/platformtheme/kdeplatformfiledialoghelper.cpp b/src/platformtheme/kdeplatformfiledialoghelper.cpp
index 05cfe35..c0ce601 100644
--- a/src/platformtheme/kdeplatformfiledialoghelper.cpp
+++ b/src/platformtheme/kdeplatformfiledialoghelper.cpp
@@ -126,7 +126,7 @@ void KDEPlatformFileDialog::selectFile(const QUrl &filename)
 {
     QUrl dirUrl = filename.adjusted(QUrl::RemoveFilename);
     m_fileWidget->setUrl(dirUrl);
-    m_fileWidget->setSelection(filename.fileName());
+    m_fileWidget->setSelection(filename.toString());
 }
 
 void KDEPlatformFileDialog::setViewMode(QFileDialogOptions::ViewMode view)

commit ab3298b3f5f728765d5afa8830aa7793140617c8
Author: Kai Uwe Broulik <kde@privat.broulik.de>
Date:   Wed Feb 8 14:25:33 2017 +0100

    [KHintsSettings] Emit QGuiApplication::paletteChanged when run as QApplication
    
    QGuiApplication::setPalette and QApplication::setPalette are two distinct static functions and
    when the paletteChanged signal was introduced in QGuiApplication the latter was never adjusted.
    
    SystemPalette connects to this signal to avoid installing an eventFilter on qApp for ApplicationPaletteChanged.
    This causes e.g. QML-based System Settings modules to not update when changing color schemes but only the
    widget-based application around it.
    
    CHANGELOG: QtQuick-based interfaces will now more reliably adapt to color scheme changes at runtime
    
    Differential Revision: https://phabricator.kde.org/D4492

diff --git a/src/platformtheme/khintssettings.cpp b/src/platformtheme/khintssettings.cpp
index 7768a1c..64210d4 100644
--- a/src/platformtheme/khintssettings.cpp
+++ b/src/platformtheme/khintssettings.cpp
@@ -231,7 +231,12 @@ void KHintsSettings::slotNotifyChange(int type, int arg)
         //QApplication::setPalette and QGuiApplication::setPalette are different functions
         //and non virtual. Call the correct one
         if (qobject_cast<QApplication *>(QCoreApplication::instance())) {
-            QApplication::setPalette(*m_palettes[QPlatformTheme::SystemPalette]);
+            QPalette palette = *m_palettes[QPlatformTheme::SystemPalette];
+            QApplication::setPalette(palette);
+            // QTBUG QGuiApplication::paletteChanged() signal is only emitted by QGuiApplication
+            // so things like SystemPalette QtQuick item that use it won't notice a palette
+            // change when a QApplication which causes e.g. QML System Settings modules to not update
+            emit qApp->paletteChanged(palette);
         } else if (qobject_cast<QGuiApplication *>(QCoreApplication::instance())) {
             QGuiApplication::setPalette(*m_palettes[QPlatformTheme::SystemPalette]);
         }

commit 87b27476cc8a3865994da066ce06a3e836462719
Author: Albert Astals Cid <aacid@kde.org>
Date:   Sat Dec 31 11:55:43 2016 +0100

    Fix regression in which the Save dialog appears as an Open dialog
    
    7bbbd93cd3fc0abdffd3fa7f144cb50a33fafad9 makes the save dialog appear as Open dialog.
    
    Simplify the code in that commit so it does not regress anymore.
    
    Comes with a unit test
    
    New test fails without the patch, works with it. Kate Save As dialog no longer shows as Open dialog.
    
    REVIEW: 129732

diff --git a/autotests/kfiledialog_unittest.cpp b/autotests/kfiledialog_unittest.cpp
index 47a5543..d53c7e3 100644
--- a/autotests/kfiledialog_unittest.cpp
+++ b/autotests/kfiledialog_unittest.cpp
@@ -95,6 +95,29 @@ private Q_SLOTS:
         QCOMPARE(dialog.directoryUrl(), directoryUrl);
     }
 
+    void testGetSaveFileUrl()
+    {
+        QObject lambdaGuard;
+        QTemporaryFile tempFile(QDir::tempPath()+"/kfiledialogtest_XXXXXX");
+        tempFile.open();
+        const QString tempName = tempFile.fileName();
+        const QUrl url = QUrl::fromLocalFile(tempName);
+
+        // Need to use a lambda and not just QTest::qWaitForWindowExposed();
+        // because with the static getSaveFileUrl we do not have access
+        // to the QFileDialog object, so instead we hook to a signal
+        KFileWidget::OperationMode saveFileOperationMode = KFileWidget::Other;
+        connect(qApp, &QGuiApplication::focusWindowChanged, &lambdaGuard, [&saveFileOperationMode] {
+            KFileWidget *fileWidget = findFileWidget();
+            saveFileOperationMode = fileWidget->operationMode();
+            qApp->activeWindow()->close();
+        });
+
+        QFileDialog::getSaveFileUrl(0, QString(), url);
+
+        QCOMPARE(saveFileOperationMode, KFileWidget::Saving);
+    }
+
     void testViewMode()
     {
         // Open a file dialog, and change view mode to tree
diff --git a/src/platformtheme/kdeplatformfiledialoghelper.cpp b/src/platformtheme/kdeplatformfiledialoghelper.cpp
index 990b983..05cfe35 100644
--- a/src/platformtheme/kdeplatformfiledialoghelper.cpp
+++ b/src/platformtheme/kdeplatformfiledialoghelper.cpp
@@ -365,15 +365,7 @@ void KDEPlatformFileDialogHelper::selectFile(const QUrl &filename)
     // Qt 5 at least <= 5.8.0 does not derive the directory from the passed url
     // and set the initialDirectory option accordingly, also not for known schemes
     // like file://, so we have to do it ourselves
-
-    // Syntax-wise we have to use a copy ctor until Qt 5.7.x and clone() since Qt 5.8.
-#if QT_VERSION < QT_VERSION_CHECK(5, 8, 0)
-    QSharedPointer<QFileDialogOptions> opt(new QFileDialogOptions(*options()));
-#else
-    auto opt = options()->clone();
-#endif
-    opt->setInitialDirectory(m_dialog->directory());
-    setOptions(opt);
+    options()->setInitialDirectory(m_dialog->directory());
 }
 
 void KDEPlatformFileDialogHelper::setDirectory(const QUrl &directory)

commit f807b57ba20ac1ffb196c98d93d134a8178bc769
Author: Jonathan Riddell <jr@jriddell.org>
Date:   Tue Dec 27 09:28:59 2016 +0000

    Update version number for 5.8.5
    GIT_SILENT

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 147265b..3bef915 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,7 +1,7 @@
 cmake_minimum_required(VERSION 2.8.12)
 
 project(PlasmaIntegration)
-set(PROJECT_VERSION "5.8.4")
+set(PROJECT_VERSION "5.8.5")
 set(PROJECT_VERSION_MAJOR 5)
 
 include(FeatureSummary)

commit 6b405fead515df417514c9aa9bb72cfa5372d2e7
Author: David Faure <faure@kde.org>
Date:   Fri Dec 23 15:46:41 2016 +0100

    Fix compilation with Qt 5.8.

diff --git a/src/platformtheme/kdeplatformfiledialoghelper.cpp b/src/platformtheme/kdeplatformfiledialoghelper.cpp
index 7e7e2e9..990b983 100644
--- a/src/platformtheme/kdeplatformfiledialoghelper.cpp
+++ b/src/platformtheme/kdeplatformfiledialoghelper.cpp
@@ -365,7 +365,13 @@ void KDEPlatformFileDialogHelper::selectFile(const QUrl &filename)
     // Qt 5 at least <= 5.8.0 does not derive the directory from the passed url
     // and set the initialDirectory option accordingly, also not for known schemes
     // like file://, so we have to do it ourselves
+
+    // Syntax-wise we have to use a copy ctor until Qt 5.7.x and clone() since Qt 5.8.
+#if QT_VERSION < QT_VERSION_CHECK(5, 8, 0)
     QSharedPointer<QFileDialogOptions> opt(new QFileDialogOptions(*options()));
+#else
+    auto opt = options()->clone();
+#endif
     opt->setInitialDirectory(m_dialog->directory());
     setOptions(opt);
 }

commit 7bbbd93cd3fc0abdffd3fa7f144cb50a33fafad9
Author: Friedrich W. H. Kossebau <kossebau@kde.org>
Date:   Thu Dec 22 19:51:32 2016 +0100

    Fix Plasma-QPA filedialog to show wrong directory with QFileDialog::selectUrl()
    
    Summary:
    QFileDialog does not set the initialDirectory option in codepaths from
    QFileDialog::selectUrl(...) or QFileDialog::selectFile(...) when passing
    the task on to the native widget. So KDEPlatformFileDialogHelper has to
    make sure itself that info is kept.
    Because KDEPlatformFileDialogHelper::initializeDialog() calls
    setDirectory(options()->initialDirectory()); as intended, usually during
    the show event. And by that it resets any otherwise wanted state of the
    filewidget it had from previous setup calls via QFileDialog, and instead
    to whatever value the initialDirectory option had before, usually the
    working directory as set during initialization.
    
    Test Plan:
    New unit test kfiledialog_unittest testSelectUrl no longer fails with added
    code, also behaves now as expected with code e.g. from KUrlRequester.
    
    Reviewers: #plasma, #frameworks, dfaure
    
    Reviewed By: #plasma, graesslin, dfaure
    
    Subscribers: plasma-devel
    
    Tags: #plasma
    
    Differential Revision: https://phabricator.kde.org/D3796

diff --git a/autotests/kfiledialog_unittest.cpp b/autotests/kfiledialog_unittest.cpp
index b32cd8e..47a5543 100644
--- a/autotests/kfiledialog_unittest.cpp
+++ b/autotests/kfiledialog_unittest.cpp
@@ -77,6 +77,24 @@ private Q_SLOTS:
         QCOMPARE(dialog.directory().absolutePath(), QDir::rootPath());
     }
 
+    void testSelectUrl()
+    {
+        QTemporaryFile tempFile(QDir::tempPath()+"/kfiledialogtest_XXXXXX");
+        tempFile.setAutoRemove(true);
+        tempFile.open();
+        QString tempName = tempFile.fileName();
+        QUrl url = QUrl::fromLocalFile(tempName);
+        int idx = tempName.lastIndexOf('/');
+        QUrl directoryUrl = QUrl::fromLocalFile(tempName.left(idx+1));
+
+        QFileDialog dialog;
+        dialog.selectUrl(url);
+        dialog.show();
+
+        // check if dialog was set to base directory url of the passed file url
+        QCOMPARE(dialog.directoryUrl(), directoryUrl);
+    }
+
     void testViewMode()
     {
         // Open a file dialog, and change view mode to tree
diff --git a/src/platformtheme/kdeplatformfiledialoghelper.cpp b/src/platformtheme/kdeplatformfiledialoghelper.cpp
index 15b5e90..7e7e2e9 100644
--- a/src/platformtheme/kdeplatformfiledialoghelper.cpp
+++ b/src/platformtheme/kdeplatformfiledialoghelper.cpp
@@ -361,6 +361,13 @@ QUrl KDEPlatformFileDialogHelper::directory() const
 void KDEPlatformFileDialogHelper::selectFile(const QUrl &filename)
 {
     m_dialog->selectFile(filename);
+
+    // Qt 5 at least <= 5.8.0 does not derive the directory from the passed url
+    // and set the initialDirectory option accordingly, also not for known schemes
+    // like file://, so we have to do it ourselves
+    QSharedPointer<QFileDialogOptions> opt(new QFileDialogOptions(*options()));
+    opt->setInitialDirectory(m_dialog->directory());
+    setOptions(opt);
 }
 
 void KDEPlatformFileDialogHelper::setDirectory(const QUrl &directory)

Reply to: